From 772d8df8a3ee02a6fe2dbd6ba7216e3e3ee0ec63 Mon Sep 17 00:00:00 2001 From: qx <2540746708@qq.com> Date: 星期四, 20 六月 2024 22:18:38 +0800 Subject: [PATCH] qxtj --- src/views/system/tijian/index.vue | 96 ++++++++++++++++++++++++++++++++++++------------ 1 files changed, 72 insertions(+), 24 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index ca35b8c..b693f41 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -334,7 +334,6 @@ </el-col> </el-row> </el-form> - <el-row v-show="top"> <el-col :span="19"> @@ -431,7 +430,7 @@ <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" - v-model="activeNames" + v-model="activeNames" @tab-click="handleClick" > <el-tab-pane label="濂楅" name="first"> @@ -476,7 +475,6 @@ @selection-change="handleSelectionChange" height="450px" ref="tb" - > <el-table-column type="selection" @@ -616,9 +614,12 @@ :span-method="objectSpanMethod" > <el-table-column prop="propinName" label="妫�鏌ラ」鐩�"> - </el-table-column> - <el-table-column prop="proPrice" label="鍘熶环" width="56px"></el-table-column> + <el-table-column + prop="proPrice" + label="鍘熶环" + width="56px" + ></el-table-column> <el-table-column prop="proName" label="鏄庣粏椤圭洰" @@ -914,6 +915,12 @@ "鍏�)" }} </template> + <el-button + type="primary" + @click="candelete(item)" + style="margin: 5px" + >鍒� 闄�</el-button + > <el-table :data="item.list" border @@ -1272,6 +1279,7 @@ getaddtTransition, getTransitionList, getByTeamNo, + delTbBycusCardIdAndProId, getLoadFile, getIsRequired, getconfigKey, @@ -1322,7 +1330,7 @@ }, ], isNow: 1, - marryall:0, + marryall: 0, treeId: [], treeList: [], defaultKeys: [], @@ -1427,7 +1435,7 @@ proIds: [], // 鏄剧ず鎼滅储鏉′欢 showSearch: true, - activeNames: 'first', + activeNames: "first", // 鏍戠姸褰㈢姸 Treedata: [], TreedataList: [], @@ -1613,6 +1621,47 @@ }, inputChanges() { this.$refs.historyTj.getlist(); + }, + + candelete(item) { + let data = { + cusCardId: this.form.cusIdcard, + proId: item.proPrantId, + }; + delTbBycusCardIdAndProId(data).then((res) => {}); + getTransitionList(this.form.cusIdcard).then((response) => { + this.tableData1 = response.data; + this.TotalPrice1 = 0; + if (this.tableData1) { + this.tableData1.forEach((item) => { + this.TotalPrice1 += item.nowPrice; + if (item.pacName === null) { + item.pacName = "鍗曢」"; + } + if (item.pacName == "鍗曢」") { + item.list.forEach((item9) => { + this.treeList.push(item9.proId); + }); + } + this.pacName = item.pacName; + }); + + const r = /^\+?[0-9][0-9]*$/; //姝f暣鏁帮紙鍙互0鎵撳ご锛� + let TotalPrice = this.TotalPrice1 * (this.discount / 10); + if (r.test(TotalPrice)) { + this.TotalPrice = TotalPrice + ".00"; + } else { + this.TotalPrice = TotalPrice; + } + + this.list1 = false; + this.list3 = true; + } else { + this.list1 = true; + + this.TotalPrice = "0.00"; + } + }); }, cope() { this.tcShow = true; @@ -2280,14 +2329,14 @@ // } // }, - resetpackage(){ + resetpackage() { if (this.form.cusIdcard) { var cusId = this.form.cusIdcard; } else { this.$message.warning("璇峰厛濉啓淇℃伅锛屽啀閫変綋妫�鍐呭"); } let _this = this; - _this.pacId = ""; + _this.pacId = ""; this.proIds = []; let data = { cusId, @@ -2301,7 +2350,7 @@ getTransitionList(cusId).then((response) => { this.tableData1 = response.data; this.TotalPrice1 = 0; - if (this.tableData1.length>=1) { + if (this.tableData1.length >= 1) { this.list1 = false; this.list3 = true; } else { @@ -2316,7 +2365,7 @@ Package() { this.taocan = true; - this.activeNames="first" + this.activeNames = "first"; let cusSex = this.form.cusSex; this.datekey = Date.now(); //鍏ㄩ儴濂楅 @@ -2427,7 +2476,7 @@ this.list1 = false; this.DataList.forEach((item) => { this.TotalPrice1 = item.proPrice + this.TotalPrice1; - this.marryall += item.proPrice + this.marryall += item.proPrice; }); } }); @@ -2459,7 +2508,7 @@ this.list1 = false; this.DataList.forEach((item) => { // this.TotalPrice1 = item.proPrice + this.TotalPrice1; - this.marryall += item.proPrice + this.marryall += item.proPrice; }); } }); @@ -2486,14 +2535,13 @@ }, renderContent(h, { node, data, store }) { - return ( - <span class="custom-tree-node"> - 聽 <span>{node.label}</span> - - <span>({data.proPrice}鍏�)</span> - - </span>); - }, + return ( + <span class="custom-tree-node"> + 聽 <span>{node.label}</span> + <span>({data.proPrice}鍏�)</span> + </span> + ); + }, // 鐐瑰嚮鑾峰彇姣忎釜鏍戣妭鐐� handleCurrentChecked1(data, checked, checkedNodes) { if (checked == false) { @@ -2516,7 +2564,7 @@ this.spliceData(); this.marryall = 0; this.DataList.forEach((item1) => { - this.marryall += item1.proPrice + this.marryall += item1.proPrice; }); } }, @@ -2528,7 +2576,7 @@ this.DataList.splice(index, 1); this.marryall = 0; this.DataList.forEach((item1) => { - this.marryall += item1.proPrice + this.marryall += item1.proPrice; }); } }); @@ -2968,7 +3016,7 @@ message: "璇烽�夋嫨濂楅!", }); } - }else { + } else { this.$modal.msgError("璇烽�夋嫨浣撴绫诲埆"); } }, -- Gitblit v1.8.0