From 0c2c35139886532e938ea304254a339bd22cbd41 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期一, 24 六月 2024 19:26:11 +0800
Subject: [PATCH] su

---
 src/views/system/tijianall/index.vue |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/src/views/system/tijianall/index.vue b/src/views/system/tijianall/index.vue
index a85cbf4..63be90b 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,7 +1163,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";
+          }
+        });
+      });
+    },
     filterNode(value, data) {
       if (!value) return true;
       // return data.proName.indexOf(value) !== -1;

--
Gitblit v1.8.0