From 6e08327e5ac538a54c11fe3fe9952b11ce1888e4 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期四, 10 四月 2025 16:47:20 +0800 Subject: [PATCH] qx --- src/views/system/tijian/index.vue | 399 +++++++++++++++++++++++--------------------- src/api/system/comp.js | 6 src/views/system/comp/index.vue | 98 +++++----- src/views/system/comp/12334.vue | 1 src/views/sampling/sampling/index.vue | 7 5 files changed, 266 insertions(+), 245 deletions(-) diff --git a/src/api/system/comp.js b/src/api/system/comp.js index 164eacd..318c8c2 100644 --- a/src/api/system/comp.js +++ b/src/api/system/comp.js @@ -92,13 +92,11 @@ } // 鑾峰彇浣撴鍗曢」椤圭洰淇℃伅 -export function getProjectList(proName) { +export function getProjectList(query) { return request({ url: '/hosp/dwgrouping/getTjParentProjectList', method: 'get', - params:{ - proName:proName - } + params: query }) } diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue index 88fd823..a2a25db 100644 --- a/src/views/sampling/sampling/index.vue +++ b/src/views/sampling/sampling/index.vue @@ -105,7 +105,7 @@ </div> <div style="width: 50%"> <!-- v-if="this.rightTabShow" --> - <el-table :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange" + <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px"> <el-table-column type="selection" width="40" align="center" /> <!-- :selectable="selectEnable" --> @@ -298,6 +298,7 @@ proName: null, }, startTime: "", + tableKey : "", pickerOptions: { shortcuts: [ { @@ -673,6 +674,7 @@ .then((response) => { if (response.data) { this.tableList = response.data; + this.tableKey = Date.now() this.$nextTick(() => { if (this.$refs.tab1) { this.$refs.tab1.doLayout(); // 淇敼涓烘纭殑 ref 鍚嶇О @@ -680,6 +682,7 @@ } }); resolve(this.tableList); + this.loading = false; } else { this.tableList = []; this.selectList = []; @@ -1083,7 +1086,7 @@ <style> #ta .el-table__header-wrapper .el-checkbox { - /* display: none; */ + display: none; } .el-table .warning-row { diff --git a/src/views/system/comp/12334.vue b/src/views/system/comp/12334.vue index af48456..02b9296 100644 --- a/src/views/system/comp/12334.vue +++ b/src/views/system/comp/12334.vue @@ -1213,7 +1213,6 @@ }); } else { console.log('杩涙潵浜唀lse'); - deptTreeSelect().then((response) => { this.newpacName = response.rows; console.log('6', response.rows); diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index 1840edc..fbeafe1 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -139,7 +139,7 @@ </div> <div> - <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="false"> + <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="true"> <el-row :gutter="20"> <el-col :span="7" :xs="24"> <div style="padding: 0 20px"> @@ -210,10 +210,6 @@ <el-input v-model="forms.gtAge" style="width: 54px" /> </el-col> </el-form-item> - - - - </el-form> <el-row :gutter="10" class="mb8"> @@ -322,13 +318,13 @@ </div> </el-col> <el-col :span="8" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> <el-form-item> <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> </el-form-item> <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -402,7 +398,7 @@ }}</span>鏉�</div> </el-col> - <el-col :span="2" :xs="24"> + <!-- <el-col :span="2" :xs="24"> <div style="margin: 240% 16%" class="btntoleft"> <el-button type="primary" size="medium" style="writing-mode: vertical-rl; text-align: center; letter-spacing: 5px;" @click="resetright"> @@ -411,16 +407,16 @@ <i class="el-icon-back"></i> </el-button> </div> - </el-col> + </el-col> --> <el-col :span="7" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> <el-form-item> <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> </el-form-item> <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -505,13 +501,13 @@ </div> </el-col> <el-col :span="8" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> <el-form-item> <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> </el-form-item> <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -703,6 +699,10 @@ xianprice: null, limits: null }, + queryParams1: { + proName: null, + pym: null, + }, id: "", // 琛ㄥ崟鍙傛暟 form: {}, @@ -882,8 +882,8 @@ updateProPrice(row) { const proPrice = new Big(row.proPrice); const limits = new Big(row.limits); - const result = proPrice.times(limits.div(10)); // ordPrice * (discount / 10) - row.ysPrice = result.toNumber(); + const result = proPrice.times(limits.div(10)).toNumber(); // ordPrice * (discount / 10) + row.ysPrice = result.toFixed(2); this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); }, new Big(0)).toNumber(); @@ -892,8 +892,8 @@ updateProPrice1(row) { const proPrice = new Big(row.proPrice); const limits = new Big(row.limits); - const result = proPrice.times(limits.div(10)); - row.ysPrice = result.toNumber(); + const result = proPrice.times(limits.div(10)).toNumber(); // ordPrice * (discount / 10) + row.ysPrice = result.toFixed(2); const totalYsPrice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); }, new Big(0)); @@ -923,12 +923,9 @@ }, changeXianjia() { // 鍘熷鎶樻墸鐜囪绠� - - if (this.queryParams.price !== 0) { this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; } - }, getList() { @@ -938,7 +935,6 @@ (this.loading = true); listComp(this.queryParams).then((response) => { this.compList = response.rows; - response.rows.forEach((item, index) => { item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + @@ -1103,7 +1099,7 @@ item.ysPrice = result.toNumber(); this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); - }, new Big(0)); + }, new Big(0)).toNumber(); }) // ---------------------------------------------------------- @@ -1187,7 +1183,7 @@ }); } else { deptTreeSelect().then((response) => { - console.log('222', response.rows); + this.newpacName = response.rows; this.loading = false; response.rows.forEach((item, index) => { @@ -1241,21 +1237,27 @@ } }, handleSearchFor() { - getProjectList(this.queryParams.proName).then((response) => { - - response.data.forEach((item, index) => { - item.newID = - (this.queryParams.pageNum - 1) * this.queryParams.pageSize + - index + - 1; + // 鍒ゆ柇鏄惁涓烘眽瀛� + const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) + if (isChineseChar(this.queryParams1.proName)) { + this.queryParams1.pym = null + getProjectList(this.queryParams1).then((response) => { + this.Treedata = response.data; }); - this.Treedata = response.data; - }); + } else { + this.queryParams1.pym = this.queryParams1.proName + this.queryParams1.proName = null + getProjectList(this.queryParams1).then((response) => { + this.Treedata = response.data; + }); + } }, // 鍗曢」鏁版嵁鑾峰彇 handleChangesingle(selection) { + console.log(selection,22222222) if (selection) { this.dataList = selection; + this.resetright() } }, resetright() { @@ -1269,7 +1271,7 @@ const newItemsToAdd = []; // 鐢ㄤ簬瀛樺偍鏂伴渶瑕佹坊鍔犵殑椤圭洰 this.dataList.forEach((item) => { - this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵�� + // 浣跨敤 $set 纭繚鍝嶅簲鎬� this.$set(item, 'limits', 10); // 璁剧疆闄愬埗鏁伴噺 this.$set(item, 'ysPrice', item.proPrice); // 璁剧疆鐜颁环涓哄師浠� @@ -1280,11 +1282,12 @@ newItemsToAdd.push(item); // 濡傛灉涓嶅瓨鍦ㄧ浉鍚岄」鐩紝鍒欐坊鍔犲埌鏂版暟缁� this.updateProPrice(item); } + this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵�� }); // 娣诲姞鏂伴」鐩埌 OnenewpacName this.OnenewpacName.push(...newItemsToAdd); - + console.log( this.OnenewpacName,2121) // 鍒犻櫎閲嶅椤圭洰锛岃繖閲屾垜浠彧闇�澶勭悊鏂版坊鍔犵殑椤圭洰鍜屽師鏈夐」鐩箣闂寸殑閲嶅 for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) { for (let j = i + 1; j < this.OnenewpacName.length; j++) { @@ -1299,11 +1302,12 @@ // 閲嶆柊璁$畻鎬讳环鍜岀幇浠� this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; // 绱姞鍘熶环 - this.queryParams.xianprice += item.ysPrice || 0; // 绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0 + //this.queryParams.xianprice += item.ysPrice || 0; 绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0 }); - - // 璁$畻浼樻儬锛岃繖閲屽亣璁句紭鎯犳槸鐜颁环涓庡師浠风殑宸鐧惧垎姣� - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; + this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { + return sum.plus(new Big(item.ysPrice || '0')); + }, new Big(0)).toNumber(); + this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 } }, handledbelete(row) { @@ -1474,13 +1478,16 @@ let id = this.groupList[0].id || ''; getDetails(id).then((res) => { this.OnenewpacName = res.data.groupingProList; - this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { - return sum.plus(new Big(item.ysPrice || '0')); - }, new Big(0)); - this.OnenewpacName.forEach((item, index) => { - this.queryParams.price += item.proPrice; - }); - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 + // this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { + // return sum.plus(new Big(item.ysPrice || '0')); + // }, new Big(0)).toNumber(); + // this.OnenewpacName.forEach((item, index) => { + // this.queryParams.price += item.proPrice; + // }); + // this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 + this.queryParams.xianprice = res.data.ysPrice + this.queryParams.price= res.data.price + this.youhui= res.data.limits }); } // console.log(this.groupList[0].id, 9966); @@ -1522,7 +1529,6 @@ } getProjectList().then((response) => { this.Treedata = response.data; - // console.log(this.Treedata,999888); }); }, diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index f1d88a9..97c63ae 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -89,7 +89,8 @@ <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="openname"> 濮撳悕 </span> - <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" :disabled="isDisabled" @input="form.cusName = $event.replace(/\s/g, '')" /> + <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" :disabled="isDisabled" + @input="form.cusName = $event.replace(/\s/g, '')" /> </el-form-item> <el-form-item label="璇佷欢绫诲瀷" prop="idType"> @@ -147,7 +148,8 @@ <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handleQuery"> 璇佷欢鍙风爜 </span> - <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" @input="handleIdCardInput"/> + <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" + @input="handleIdCardInput" /> <!-- <i style=" font-size: 1rem; position: absolute; @@ -179,7 +181,8 @@ trigger: 'blur', }, ]"> - <el-input v-model="form.cusPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" :disabled="isDisabled" @input="form.cusPhone = $event.replace(/\s/g, '')"/> + <el-input v-model="form.cusPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" :disabled="isDisabled" + @input="form.cusPhone = $event.replace(/\s/g, '')" /> </el-form-item> <el-form-item label="鍑虹敓鏃ユ湡" prop="cusBrithday"> @@ -336,7 +339,7 @@ margin-top: 10px; "> 宸查�夐」鐩垪琛� - + </div> <el-table :data="DataLists" border style="width: 100%" height="400" :span-method="objectspanmethod"> <el-table-column prop="propinName" label="妫�鏌ラ」鐩�"> @@ -529,7 +532,7 @@ this.tableData1[0].pacName || "" }}</span> 宸查�夐」鐩潯鏁帮細<span style="font-weight: 700; color: red; margin-right: 5px">{{ this.tableData1.length || 0 - }}</span>鏉� + }}</span>鏉� </div> 宸查�夐」鐩垪琛� </div> @@ -1074,9 +1077,9 @@ }, methods: { handleIdCardInput(value) { - this.form.cusIdcard = value.replace(/\s/g, ''); - this.inputChange(); // 淇濈暀鍘熸湁鐨勮韩浠借瘉杈撳叆澶勭悊閫昏緫 -}, + this.form.cusIdcard = value.replace(/\s/g, ''); + this.inputChange(); // 淇濈暀鍘熸湁鐨勮韩浠借瘉杈撳叆澶勭悊閫昏緫 + }, debounceNumberChange(currentValue, oldValue) { clearTimeout(this.debounceTimer); this.debounceTimer = setTimeout(() => { @@ -1116,7 +1119,7 @@ }); this.TotalPrice = this.tableData1.reduce((sum, item) => { return sum.plus(new Big(item.nowPrice || "0")); - }, new Big(0)); + }, new Big(0)).toNumber(); this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10; @@ -1147,13 +1150,13 @@ row.nowPrice = result.toNumber(); this.TotalPrice = this.tableData1.reduce((sum, item) => { return sum.plus(new Big(item.nowPrice || "0")); - }, new Big(0)); + }, new Big(0)).toNumber(); this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10; }, updateProPrice1(row) { - console.log("杩涘叆浜�1") + console.log("杩涘叆浜�1", row) const ordPrice = new Big(row.ordPrice); const discount = new Big(row.discount); const result = ordPrice.times(discount.div(10)); @@ -1237,15 +1240,15 @@ if (this.form.firmId === originalCompId) { this.form.firmId = ""; } - + } if (this.form.firmName) { - this.form.tjType = this.dict.type.dict_team[1].value; - }else{ - this.form.tjType = this.dict.type.dict_team[0].value; - } - + this.form.tjType = this.dict.type.dict_team[1].value; + } else { + this.form.tjType = this.dict.type.dict_team[0].value; + } + }, getCurrentDateTime() { const currentDate = new Date(); @@ -1285,25 +1288,25 @@ // return data.proEngName.indexOf(value) !== -1; // } if (!value) return true; - if (data.proName.indexOf(value) !== -1) return true; - if (data.proEngName.indexOf(value) !== -1) return true; - // 鍖归厤灏忓啓 - let arr = data.proName.spell('low', 'array'); - let spell = arr.join(''); - let lengths = [0]; - for (var i = 0; i < arr.length - 1; i++) { - lengths.push(lengths[i] + arr[i].length); - }; - //鍒ゆ柇label瀹屾暣鎷奸煶 涓� 杈撳叆鍊肩殑 index 鏄笉鏄瓑浜庢煇涓眽瀛楃涓�涓嫾闊冲瓧姣嶇殑index鍊� - if(lengths.indexOf(spell.indexOf(value)) !== -1) return true - // 澶у啓 - let arrUp = data.proName.spell('up', 'array'); - let spellUp = arrUp.join(''); - let lengthsUp = [0]; - for (var i = 0; i < arrUp.length - 1; i++) { - lengthsUp.push(lengthsUp[i] + arrUp[i].length); - }; - return lengthsUp.indexOf(spellUp.indexOf(value)) !== -1; + if (data.proName.indexOf(value) !== -1) return true; + if (data.proEngName.indexOf(value) !== -1) return true; + // 鍖归厤灏忓啓 + let arr = data.proName.spell('low', 'array'); + let spell = arr.join(''); + let lengths = [0]; + for (var i = 0; i < arr.length - 1; i++) { + lengths.push(lengths[i] + arr[i].length); + }; + //鍒ゆ柇label瀹屾暣鎷奸煶 涓� 杈撳叆鍊肩殑 index 鏄笉鏄瓑浜庢煇涓眽瀛楃涓�涓嫾闊冲瓧姣嶇殑index鍊� + if (lengths.indexOf(spell.indexOf(value)) !== -1) return true + // 澶у啓 + let arrUp = data.proName.spell('up', 'array'); + let spellUp = arrUp.join(''); + let lengthsUp = [0]; + for (var i = 0; i < arrUp.length - 1; i++) { + lengthsUp.push(lengthsUp[i] + arrUp[i].length); + }; + return lengthsUp.indexOf(spellUp.indexOf(value)) !== -1; }, filterpackage(value, data) { if (!value) return true; @@ -1646,7 +1649,7 @@ item.nowPrice = result.toNumber(); this.TotalPrice = this.tableData1.reduce((sum, item) => { return sum.plus(new Big(item.nowPrice || "0")); - }, new Big(0)); + }, new Big(0)).toNumber(); }); }) .catch(() => { @@ -1704,45 +1707,46 @@ }, /** 鐧昏鎻愪氦鎸夐挳 */ /** 鐧昏鎻愪氦鎸夐挳 */ -submitForm() { - let _this = this; - if(!this.form.cusPhone || !this.form.cusName){ + submitForm() { + let _this = this; + if (!this.form.cusPhone || !this.form.cusName) { this.$message.warning("璇峰~閫夊繀濉」"); - }else{ - this.$refs["form"].validate((valid) => { - if (valid) { - // 鍒涘缓琛ㄥ崟鏁版嵁鐨勫壇鏈苟鍘婚櫎绌烘牸 - const formData = { ...this.form }; - formData.cusName = formData.cusName ? formData.cusName.replace(/\s/g, '') : ''; - formData.cusPhone = formData.cusPhone ? formData.cusPhone.replace(/\s/g, '') : ''; - formData.cusIdcard = formData.cusIdcard ? formData.cusIdcard.replace(/\s/g, '') : ''; + } else { + this.$refs["form"].validate((valid) => { + if (valid) { + // 鍒涘缓琛ㄥ崟鏁版嵁鐨勫壇鏈苟鍘婚櫎绌烘牸 + const formData = { ...this.form }; + formData.cusName = formData.cusName ? formData.cusName.replace(/\s/g, '') : ''; + formData.cusPhone = formData.cusPhone ? formData.cusPhone.replace(/\s/g, '') : ''; + formData.cusIdcard = formData.cusIdcard ? formData.cusIdcard.replace(/\s/g, '') : ''; - // 澶勭悊鎬у埆鍊� - if (formData.cusSex === "濂�") { - formData.cusSex = 1; - } - if (formData.cusSex === "鐢�") { - formData.cusSex = 0; - } - if (formData.cusSex === "鏈煡") { - formData.cusSex = 2; - } - if (formData.tjType === "") { - formData.tjType = this.dict.type.dict_team[0].value; - } + // 澶勭悊鎬у埆鍊� + if (formData.cusSex === "濂�") { + formData.cusSex = 1; + } + if (formData.cusSex === "鐢�") { + formData.cusSex = 0; + } + if (formData.cusSex === "鏈煡") { + formData.cusSex = 2; + } + if (formData.tjType === "") { + formData.tjType = this.dict.type.dict_team[0].value; + + } - addCustomer(formData).then((response) => { - this.responseList = response.data; - this.form.tjType = this.dict.type.dict_team[0].value; - this.$modal.msgSuccess("鏂板鎴愬姛"); - _this.tcShow = true; - _this.isDisabled = true; - _this.top = false; - }); - } - }); -} -}, + addCustomer(formData).then((response) => { + this.responseList = response.data; + this.form.tjType = this.dict.type.dict_team[0].value; + this.$modal.msgSuccess("鏂板鎴愬姛"); + _this.tcShow = true; + _this.isDisabled = true; + _this.top = false; + }); + } + }); + } + }, getmailType() { if (this.getType == "2") { @@ -1780,8 +1784,8 @@ if (this.form.reservationId != null) { if (this.form.groupingId) { this.form.firmName = this.form.compName; - this.dict.type.dict_team.forEach((item)=> { - if(item.label == "鍥㈤槦"){ + this.dict.type.dict_team.forEach((item) => { + if (item.label == "鍥㈤槦") { this.form.tjType = item.value; } }) @@ -2256,7 +2260,7 @@ this.malldisble = false; this.defaultKeys = []; this.DataLists = []; - + }, cancell() { @@ -2340,10 +2344,10 @@ Package() { this.activeNames = "first"; if (this.form.cusSex == "鐢�") { - this.form.cusSex = 0; - } else if (this.form.cusSex == "濂�"){ - _this.form.cusSex = 1; - } + this.form.cusSex = 0; + } else if (this.form.cusSex == "濂�") { + _this.form.cusSex = 1; + } let cusSex = this.form.cusSex; this.datekey = Date.now(); //鍏ㄩ儴濂楅 @@ -2927,10 +2931,15 @@ // 澶勭悊璁㈠崟椤圭洰 processOrderItems(cusId) { + console.log(11222) getTransitionList1(cusId).then((response) => { this.tableData1 = response.data; + let Price = 0; if (this.tableData1) { this.tableData1.forEach((item) => { + if (typeof item.nowPrice === 'number') { + item.nowPrice = Number(item.nowPrice.toFixed(2)); + } if (item.tjCategory != null) { this.tjCategory = item.tjCategory; } @@ -2940,8 +2949,11 @@ }); } this.TotalPrice1 += item.ordPrice || 0; // 绱姞搴旀敹閲戦 - this.TotalPrice += item.nowPrice || 0; // 绱姞瀹炴敹閲戦 + // this.TotalPrice += item.nowPrice || 0; + Price += item.nowPrice || 0; // 绱姞瀹炴敹閲戦 + this.TotalPrice = Price.toFixed(2); }); + console.log( this.TotalPrice1,this.TotalPrice) // 璁$畻鎶樻墸 this.discount = this.TotalPrice1 > 0 ? (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 : 0; @@ -2956,122 +2968,122 @@ }); }, submitCheckinfee() { - let _this = this; - if (_this.tjCategory !== "") { - let List = _this.tableData1; - if (this.responseList.cusId) { - var userId = this.responseList.cusId; - } else { - var userId = _this.form.cusId; - } - let tjType = _this.form.tjType; - if (this.tableData[0]) { - var pacId = this.tableData[0].pacId; - } + let _this = this; + if (_this.tjCategory !== "") { + let List = _this.tableData1; + if (this.responseList.cusId) { + var userId = this.responseList.cusId; + } else { + var userId = _this.form.cusId; + } + let tjType = _this.form.tjType; + if (this.tableData[0]) { + var pacId = this.tableData[0].pacId; + } - // 鍘荤┖鏍煎鐞� - const processedForm = { - ...this.form, - cusName: this.form.cusName ? this.form.cusName.replace(/\s/g, '') : '', - cusPhone: this.form.cusPhone ? this.form.cusPhone.replace(/\s/g, '') : '', - cusIdcard: this.form.cusIdcard ? this.form.cusIdcard.replace(/\s/g, '') : '' - }; + // 鍘荤┖鏍煎鐞� + const processedForm = { + ...this.form, + cusName: this.form.cusName ? this.form.cusName.replace(/\s/g, '') : '', + cusPhone: this.form.cusPhone ? this.form.cusPhone.replace(/\s/g, '') : '', + cusIdcard: this.form.cusIdcard ? this.form.cusIdcard.replace(/\s/g, '') : '' + }; - List.forEach((item) => { - if (item.list) { - item.list.forEach((item1) => { - this.tjOrderList.push({ - proName: item1.proName, - proPrice: item1.nowPrice, - proId: item1.proId, - }); + List.forEach((item) => { + if (item.list) { + item.list.forEach((item1) => { + this.tjOrderList.push({ + proName: item1.proName, + proPrice: item1.nowPrice, + proId: item1.proId, + }); + }); + } else if (item.tjProjectList) { + item.tjProjectList.forEach((item1) => { + this.tjOrderList.push({ + proName: item1.proName, + proPrice: item1.priceNow, + proId: item1.proId, + }); + }); + } else { + this.tjOrderList.push({ + proName: item.proName, + proPrice: item.ysPrice, + proId: item.proId, + }); + } }); - } else if (item.tjProjectList) { - item.tjProjectList.forEach((item1) => { - this.tjOrderList.push({ - proName: item1.proName, - proPrice: item1.priceNow, - proId: item1.proId, + + let copeWith = this.TotalPrice1; + let paidIn = this.TotalPrice.toString(); + let discount = this.discount; + this.tjFlowingWater = { copeWith, paidIn, discount }; + + let data; + if (pacId || this.getType == "2") { + data = { + photo: this.srcUrl, + pacId, + tjOrderList: this.tjOrderList, + tjFlowingWater: this.tjFlowingWater, + userId, + tjType, + getType: this.getType, + addAddress: this.addAddress, + tjCategory: this.tjCategory, + // 浣跨敤鍘绘帀绌烘牸鍚庣殑鏁版嵁 + cusName: processedForm.cusName, + cusPhone: processedForm.cusPhone, + cusIdcard: processedForm.cusIdcard + }; + } else { + data = { + photo: this.srcUrl, + tjOrderList: this.tjOrderList, + tjFlowingWater: this.tjFlowingWater, + userId, + tjType, + getType: this.getType, + tjCategory: this.tjCategory, + // 浣跨敤鍘绘帀绌烘牸鍚庣殑鏁版嵁 + cusName: processedForm.cusName, + cusPhone: processedForm.cusPhone, + cusIdcard: processedForm.cusIdcard + }; + } + + getOrder(data).then((res) => { + this.$modal.msgSuccess("鎻愪氦鎴愬姛"); + this.tjNumbers = res.msg; + this.charge = true; + let data = { + tjNum: res.msg, + }; + getfindTj(data).then((response) => { + if (response.data) { + this.feeitems = response.data; + if (this.feeitems.length != 0) { + this.$nextTick(() => { + this.$refs.multipleTable.toggleRowSelection( + this.feeitems[0], + true + ); + }); + } else { + this.$refs.multipleTable.clearSelection(); + } + this.loading = false; + } else { + this.feeitems = []; + this.loading = false; + } }); }); } else { - this.tjOrderList.push({ - proName: item.proName, - proPrice: item.ysPrice, - proId: item.proId, - }); + this.$modal.msgError("璇烽�夋嫨浣撴绫诲埆"); } - }); - - let copeWith = this.TotalPrice1; - let paidIn = this.TotalPrice.toString(); - let discount = this.discount; - this.tjFlowingWater = { copeWith, paidIn, discount }; - - let data; - if (pacId || this.getType == "2") { - data = { - photo: this.srcUrl, - pacId, - tjOrderList: this.tjOrderList, - tjFlowingWater: this.tjFlowingWater, - userId, - tjType, - getType: this.getType, - addAddress: this.addAddress, - tjCategory: this.tjCategory, - // 浣跨敤鍘绘帀绌烘牸鍚庣殑鏁版嵁 - cusName: processedForm.cusName, - cusPhone: processedForm.cusPhone, - cusIdcard: processedForm.cusIdcard - }; - } else { - data = { - photo: this.srcUrl, - tjOrderList: this.tjOrderList, - tjFlowingWater: this.tjFlowingWater, - userId, - tjType, - getType: this.getType, - tjCategory: this.tjCategory, - // 浣跨敤鍘绘帀绌烘牸鍚庣殑鏁版嵁 - cusName: processedForm.cusName, - cusPhone: processedForm.cusPhone, - cusIdcard: processedForm.cusIdcard - }; - } - - getOrder(data).then((res) => { - this.$modal.msgSuccess("鎻愪氦鎴愬姛"); - this.tjNumbers = res.msg; - this.charge = true; - let data = { - tjNum: res.msg, - }; - getfindTj(data).then((response) => { - if (response.data) { - this.feeitems = response.data; - if (this.feeitems.length != 0) { - this.$nextTick(() => { - this.$refs.multipleTable.toggleRowSelection( - this.feeitems[0], - true - ); - }); - } else { - this.$refs.multipleTable.clearSelection(); - } - this.loading = false; - } else { - this.feeitems = []; - this.loading = false; - } - }); - }); - } else { - this.$modal.msgError("璇烽�夋嫨浣撴绫诲埆"); - } -}, + }, // 琛ㄦ牸鍗曢�� handleSelect(selection, val) { @@ -3386,8 +3398,10 @@ } .filter-tree { - overflow-y: auto; /* 淇濈暀绾靛悜婊氬姩鏉� */ - overflow-x: hidden; /* 闅愯棌妯悜婊氬姩鏉� */ + overflow-y: auto; + /* 淇濈暀绾靛悜婊氬姩鏉� */ + overflow-x: hidden; + /* 闅愯棌妯悜婊氬姩鏉� */ height: 350px; } @@ -3498,6 +3512,7 @@ width: 100%; display: flex; } + /* .tab3 { overflow-y: auto; } -- Gitblit v1.8.0