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 ++++++++++++++----
 vue.config.js                     |    4 
 src/api/system/tijian.js          |  169 +++++++++++++++++----------------
 3 files changed, 160 insertions(+), 109 deletions(-)

diff --git a/src/api/system/tijian.js b/src/api/system/tijian.js
index cfb50a5..7dbb90c 100644
--- a/src/api/system/tijian.js
+++ b/src/api/system/tijian.js
@@ -1,169 +1,172 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 鏌ヨ浣撴濂楅鍒楄〃
 export function deptTreeSelect(cusSex) {
   return request({
-    url: '/system/package/getList' ,
-    method: 'get',
-    params:{
-      cusSex:cusSex
-    }
-  })
+    url: "/system/package/getList",
+    method: "get",
+    params: {
+      cusSex: cusSex,
+    },
+  });
 }
 // 姣忎釜椤圭洰
 export function getIsRequired() {
   return request({
-    url: '/hosp/order/getIsRequired',
-    method: 'get',
-  })
+    url: "/hosp/order/getIsRequired",
+    method: "get",
+  });
 }
 
 // 閫夋嫨浣撴椤圭洰(鎵�鏈夋湇椤圭洰)閫夊崟椤规椂璋冪敤鐨勬帴鍙�
 export function projectGetList() {
   return request({
-    url: '/hosp/project/getDxList',
-    method: 'get',
-  })
+    url: "/hosp/project/getDxList",
+    method: "get",
+  });
 }
-
 
 // 閫夋嫨浣撴椤圭洰(鏍规嵁鐖堕」id閫夋嫨瀛愰」)閫夊崟椤规椂璋冪敤鐨勬帴鍙�
 export function getProSonDxList(proId) {
   return request({
-    url: '/hosp/project/getProSonDxList',
-    method: 'get',
-    params:{
-      proId:proId
-    }
-  })
+    url: "/hosp/project/getProSonDxList",
+    method: "get",
+    params: {
+      proId: proId,
+    },
+  });
 }
 
 export function getProParentIdDxList() {
   return request({
-    url: '/hosp/project/getProParentIdDxList',
-    method: 'get',
-  })
+    url: "/hosp/project/getProParentIdDxList",
+    method: "get",
+  });
 }
 
 // 姣忎釜椤圭洰
 export function getOrder(data) {
   return request({
-    url: '/hosp/order',
-    method: 'post',
-    data:data,
+    url: "/hosp/order",
+    method: "post",
+    data: data,
     // responseType: 'blob',
     // headers:{
     //   "type": 'application/pdf'
     // }
-  })
+  });
 }
 
 // 鏍规嵁韬唤璇佹樉绀轰俊鎭�
 export function getCusIdcard(cusIdcard) {
   return request({
-    url: '/hosp/customer/cusIdcard',
-    method: 'post',
-    params:{
-      cusIdcard:cusIdcard
-    }
-  })
+    url: "/hosp/customer/cusIdcard",
+    method: "post",
+    params: {
+      cusIdcard: cusIdcard,
+    },
+  });
 }
 
 // 鏍规嵁鎷奸煶鐮佹垨濂楅鍚嶇О鎼滅储濂楅
 export function getPackageListName(name) {
   return request({
-    url: '/system/package/getPackageListByPyName',
-    method: 'get',
-    params:{
-      name:name
-    }
-  })
+    url: "/system/package/getPackageListByPyName",
+    method: "get",
+    params: {
+      name: name,
+    },
+  });
 }
 
 // 涓汉棰勭害鎺ュ彛
 export function getaddTj(data) {
   return request({
-    url: '/reservation/reservation/addTjReservation',
-    method: 'post',
-    data:data
-  })
+    url: "/reservation/reservation/addTjReservation",
+    method: "post",
+    data: data,
+  });
 }
-
 
 // 娣诲姞杩囨浮琛ㄦ暟鎹�
 export function getaddtTransition(data) {
   return request({
-    url: '/hosp/order/addtTransition',
-    method: 'post',
-    data:data
-  })
+    url: "/hosp/order/addtTransition",
+    method: "post",
+    data: data,
+  });
 }
 
 // 鏌ヨ杩囨浮琛ㄦ暟鎹�
 export function getTransitionList(cusId) {
   return request({
-    url: '/hosp/order/getTransitionList',
-    method: 'get',
-    params:{
-      cusId:cusId
-    }
-  })
+    url: "/hosp/order/getTransitionList",
+    method: "get",
+    params: {
+      cusId: cusId,
+    },
+  });
 }
 
 // 鐧昏鎴愬姛鍚庣敓鎴愬璇婂崟
 export function getGuide(tjNumber) {
   return request({
-    url: '/hosp/order/printGuidance/'+ tjNumber,
-    method: 'get',
-    responseType: 'blob',
-    headers:{
-      "type": 'application/pdf'
-    }
-  })
+    url: "/hosp/order/printGuidance/" + tjNumber,
+    method: "get",
+    responseType: "blob",
+    headers: {
+      type: "application/pdf",
+    },
+  });
 }
 
 // 閫氱敤鏂囦欢涓婁紶base64
 export function getLoadFile(formData) {
   return request({
-    url: '/common/upload',
-    method: 'post',
-    data:formData,
-  })
+    url: "/common/upload",
+    method: "post",
+    data: formData,
+  });
 }
 
 // 鏍规嵁鍗曚綅id鍜屽洟闃熺紪鍙疯幏鍙栭绾﹁鎯�
 export function getByTeamNo(data) {
   return request({
-    url:'/reservation/reservation/getSelectRecordByTeamNo',
-    method:'get',
-    params:data
-   
-  })
+    url: "/reservation/reservation/getSelectRecordByTeamNo",
+    method: "get",
+    params: data,
+  });
 }
 
 // 鏍规嵁韬唤璇佸彿鏌ョ湅鍘嗗彶浣撴璁板綍
 export function getHistryTjOrderByCusIdCard(cusIdCard) {
   return request({
-    url:'/hosp/order/getHistryTjOrderByCusIdCard',
-    method:'get',
-    params:{cusIdCard:cusIdCard}
-   
-  })
+    url: "/hosp/order/getHistryTjOrderByCusIdCard",
+    method: "get",
+    params: { cusIdCard: cusIdCard },
+  });
 }
 
 // 鏍规嵁韬唤璇佸彿鏌ョ湅鍘嗗彶浣撴椤圭洰璁板綍
 export function getHistryTjOrderProByCusIdCard(cusIdCard) {
   return request({
-    url:'/hosp/order/getHistryTjOrderProByCusIdCard',
-    method:'get',
-    params:{cusIdCard:cusIdCard}
-   
-  })
+    url: "/hosp/order/getHistryTjOrderProByCusIdCard",
+    method: "get",
+    params: { cusIdCard: cusIdCard },
+  });
 }
 
 export function getconfigKey(configKey) {
   return request({
-    url: '/system/config/configKey/' + configKey,
-    method: 'get'
-  })
+    url: "/system/config/configKey/" + configKey,
+    method: "get",
+  });
+}
+
+export function delTbBycusCardIdAndProId(data) {
+  return request({
+    url: "/hosp/order/delTbBycusCardIdAndProId",
+    method: "get",
+    params: data,
+  });
 }
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("璇烽�夋嫨浣撴绫诲埆");
       }
     },
diff --git a/vue.config.js b/vue.config.js
index 2f2ec9c..654d3ca 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -52,8 +52,8 @@
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        //target: `https://ltpeis.xaltjdkj.cn:5501/prod-api/getInfo`,
-        target: `http://192.168.1.113:5011`,
+        target: `https://ltpeis.xaltjdkj.cn:5801/`,
+        // target: `http://192.168.1.113:5011`,
         // // target: `http://192.168.0.99:8080/ltkj-admin`,
         // target: `https://ltpeis.xaltjdkj.cn:5011/ltkj-admin`,
         // target: `http://10.168.0.9:5011`,

--
Gitblit v1.8.0