From b54b3c4662338ca0897b8dbc9172f7f00306a09d Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期二, 25 六月 2024 17:42:04 +0800
Subject: [PATCH] qxtj

---
 src/views/system/tijianall/index.vue |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/src/views/system/tijianall/index.vue b/src/views/system/tijianall/index.vue
index a85cbf4..55e6f44 100644
--- a/src/views/system/tijianall/index.vue
+++ b/src/views/system/tijianall/index.vue
@@ -679,6 +679,12 @@
                       ".00鍏�)"
                     }}
                   </template>
+                  <el-button
+                    type="primary"
+                    @click="candelete(item)"
+                    style="margin: 5px"
+                    >鍒� 闄�</el-button
+                  >
                   <el-table
                     :data="item.list"
                     border
@@ -842,6 +848,7 @@
   getaddTj,
   getHistryTjOrderByCusIdCard,
   getHistryTjOrderProByCusIdCard,
+  delTbBycusCardIdAndProId,
 } from "@/api/system/tijian";
 import { MessageBox } from "element-ui";
 import VTreeTransfer from "../tijian/TreeTransfer.vue";
@@ -1156,11 +1163,51 @@
     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";
+          }
+        });
+      });
+    },
     filterNode(value, data) {
       if (!value) return true;
       // return data.proName.indexOf(value) !== -1;
-      if(value == data.proName){
+      if(data.proName.indexOf(value) !== -1){
         return data.proName.indexOf(value) !== -1;
       }else{
         return data.proEngName.indexOf(value) !== -1;
@@ -1751,7 +1798,6 @@
     },
     //  // 榛樿鎺ュ彈鍥涗釜鍊� { 褰撳墠琛岀殑鍊�, 褰撳墠鍒楃殑鍊�, 琛岀殑涓嬫爣, 鍒楃殑涓嬫爣 }
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      console.log(row, column, rowIndex, columnIndex);
       let fields = ["propinName"];
       let cellValue = row[column.property];
       if (cellValue && fields.includes(column.property)) {

--
Gitblit v1.8.0