From 2eef2588025c46411b2e6d6b94b1a66d165dad4b Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期一, 06 一月 2025 10:33:11 +0800 Subject: [PATCH] 1 --- src/views/system/comp/index.vue | 118 +++++++++++++++++++++++++++------------------------------- 1 files changed, 55 insertions(+), 63 deletions(-) diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index 07b3d74..8afc583 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -121,8 +121,8 @@ <el-col :span="7" :xs="24"> <div style="padding: 0 20px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true"> - <el-form-item label="閮ㄩ棬鍚嶇О" prop="dwDeptName"> - <el-input v-model="form.dwDeptName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" /> + <el-form-item label="濂楅鍚嶇О" prop="dwDeptName"> + <el-input v-model="form.dwDeptName" placeholder="璇疯緭鍏ュ椁愬悕绉�" /> </el-form-item> <el-form-item label="绛剧害閲戦" prop="signingPrice"> <el-input v-model="form.signingPrice" placeholder="璇疯緭鍏ョ绾﹂噾棰�" /> @@ -131,7 +131,7 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddDept" - v-hasPermi="['system:comp:add']">淇濆瓨閮ㄩ棬</el-button> + v-hasPermi="['system:comp:add']">淇濆瓨濂楅</el-button> </el-col> <el-col :span="1.5"> <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="singleg" @click="handledeleDept" @@ -141,7 +141,7 @@ <el-table ref="tb" v-loading="loading" :data="deptList" @selection-change="handleSelection" border style="width: 320px" height="350"> <el-table-column type="selection" width="40px" align="center" /> - <el-table-column label="閮ㄩ棬鍚嶇О" align="center" prop="dwDeptName" /> + <el-table-column label="濂楅鍚嶇О" align="center" prop="dwDeptName" /> </el-table> </div> </el-col> @@ -963,7 +963,7 @@ if (this.form.drugManufacturerId) { this.beCurrentDept(); } - this.title = "閮ㄩ棬鍒嗙粍缁存姢" + "( " + this.form.cnName + ")"; + this.title = "濂楅鍒嗙粍缁存姢" + "( " + this.form.cnName + ")"; getInfo().then((response) => { this.getInfodis = response.user.discount; if (this.getInfodis == null || this.getInfodis == 10) { @@ -1093,73 +1093,65 @@ } }, resetright() { - this.queryParams.price = 0; - this.queryParams.xianprice = 0; // 鍒濆鍖栫幇浠� - this.youhui = 0; // 鍒濆鍖栦紭鎯� + this.queryParams.price = 0; + this.queryParams.xianprice = 0; // 鍒濆鍖栫幇浠� + this.youhui = 0; // 鍒濆鍖栦紭鎯� - const newItemsToAdd = []; + const newItemsToAdd = []; - this.dataList.forEach((item) => { - this.$refs.tre.toggleRowSelection(item, false); - // 浣跨敤 $set 纭繚鍝嶅簲鎬� - this.$set(item, 'limits', 10); - this.$set(item, 'ysPrice', item.proPrice); - - // 妫�鏌ユ槸鍚﹀凡缁忓瓨鍦ㄧ浉鍚岀殑椤圭洰 - const existingItem = this.OnenewpacName.find(existing => existing.proId === item.proId); - if (!existingItem) { - newItemsToAdd.push(item); - this.updateProPrice(item); // 鏇存柊鍗曚釜椤圭洰鐨勪环鏍� - } - }); + this.dataList.forEach((item) => { + this.$refs.tre.toggleRowSelection(item, false); + // 浣跨敤 $set 纭繚鍝嶅簲鎬� + this.$set(item, 'limits', 10); + this.$set(item, 'ysPrice', item.proPrice); - // 娣诲姞鏂伴」鐩埌 OnenewpacName - this.OnenewpacName.push(...newItemsToAdd); + // 妫�鏌ユ槸鍚﹀凡缁忓瓨鍦ㄧ浉鍚岀殑椤圭洰 + const existingItem = this.OnenewpacName.find(existing => existing.proId === item.proId); + if (!existingItem) { + newItemsToAdd.push(item); + this.updateProPrice(item); // 鏇存柊鍗曚釜椤圭洰鐨勪环鏍� + } + }); - // 鍒犻櫎閲嶅椤圭洰锛岃繖閲屾垜浠彧闇�澶勭悊鏂版坊鍔犵殑椤圭洰鍜屽師鏈夐」鐩箣闂寸殑閲嶅 - for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) { - for (let j = i + 1; j < this.OnenewpacName.length; j++) { - if (this.OnenewpacName[i].proId === this.OnenewpacName[j].proId) { - this.OnenewpacName.splice(j, 1); - j--; + // 娣诲姞鏂伴」鐩埌 OnenewpacName + this.OnenewpacName.push(...newItemsToAdd); + + // 鍒犻櫎閲嶅椤圭洰锛岃繖閲屾垜浠彧闇�澶勭悊鏂版坊鍔犵殑椤圭洰鍜屽師鏈夐」鐩箣闂寸殑閲嶅 + for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) { + for (let j = i + 1; j < this.OnenewpacName.length; j++) { + if (this.OnenewpacName[i].proId === this.OnenewpacName[j].proId) { + this.OnenewpacName.splice(j, 1); + j--; + } + } } - } - } - // 璁$畻鎬讳环鍜岀幇浠� - this.OnenewpacName.forEach((item) => { - this.queryParams.price += item.proPrice; - this.queryParams.xianprice += item.ysPrice || 0; // 纭繚ysPrice瀛樺湪 - }); + this.OnenewpacName.forEach((item) => { + this.queryParams.price += item.proPrice; + this.queryParams.xianprice += item.ysPrice || 0; // 纭繚ysPrice瀛樺湪 + }) + }, + handledbelete(row) { + this.queryParams.price = 0; + this.queryParams.xianprice = 0; // 鍒濆鍖栫幇浠� + this.youhui = 0; // 鍒濆鍖栦紭鎯� - // 璁$畻浼樻儬 - if (this.queryParams.price > 0) { - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; - } else { - this.youhui = 0; - } -}, -handledbelete(row) { - this.queryParams.price = 0; - this.queryParams.xianprice = 0; // 鍒濆鍖栫幇浠� - this.youhui = 0; // 鍒濆鍖栦紭鎯� - - // 鍏堟壘鍒板苟鍒犻櫎椤圭洰 - this.OnenewpacName = this.OnenewpacName.filter(item => item.proId !== row.proId); + // 鍏堟壘鍒板苟鍒犻櫎椤圭洰 + this.OnenewpacName = this.OnenewpacName.filter(item => item.proId !== row.proId); - // 鐒跺悗鏇存柊鎬讳环鍜岀幇浠� - this.OnenewpacName.forEach((item) => { - this.queryParams.price += item.proPrice; - this.queryParams.xianprice += item.ysPrice || 0; // 纭繚ysPrice瀛樺湪 - }); + // 鐒跺悗鏇存柊鎬讳环鍜岀幇浠� + this.OnenewpacName.forEach((item) => { + this.queryParams.price += item.proPrice; + this.queryParams.xianprice += item.ysPrice || 0; // 纭繚ysPrice瀛樺湪 + }); - // 璁$畻浼樻儬 - if (this.queryParams.price > 0) { - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; - } else { - this.youhui = 0; - } -}, + // 璁$畻浼樻儬 + if (this.queryParams.price > 0) { + this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; + } else { + this.youhui = 0; + } + }, submitrighr() { this.openOne = false; -- Gitblit v1.8.0