From 7f78bf8e0745ff51e3d307bd531ff40ea624568a Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 31 十二月 2024 18:50:17 +0800
Subject: [PATCH] 3

---
 src/views/system/tijian/index.vue |  189 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 153 insertions(+), 36 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index 3a8821d..9d0231d 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -135,10 +135,11 @@
                 },
               ]"
             >
-            <span
+          
+              <span
                 slot="label"
                 style="display: inline-block; border-bottom: 2px solid blue"
-                @click="openname"
+            @click="openname"
               >
                 濮撳悕
               </span>
@@ -1087,13 +1088,30 @@
             </div>
           </el-dialog>
 
-          <div style="display: flex; align-items: flex-end;margin-bottom: 10px">
-            <div style="margin-left: 46px;font-size:16px;">
-              宸查�夐」鐩潯鏁帮細0鏉�
+          <div
+            style="
+              display: flex;
+              align-items: center;
+              justify-content: flex-start;
+              width: 100%;
+            "
+          >
+            <div
+              style="
+                white-space: nowrap;
+                overflow: hidden;
+                text-overflow: ellipsis;
+              margin-left: 46px;
+                font-size: 16px;
+                margin-right: 20px;
+              "
+            >
+              <span v-if="this.tableData1[0]">{{ this.tableData1[0].pacName || "" }}</span> 宸查�夐」鐩潯鏁帮細<span
+                style="font-weight: 700; color: red; margin-right: 5px"
+                >{{ this.tableData1.length || 0 }}</span
+              >鏉�
             </div>
-            <div style="margin-left: 242px;font-size:26px;font-weight: 700">
-              宸查�夐」鐩垪琛�
-            </div>
+            宸查�夐」鐩垪琛�
           </div>
           <div
             style="
@@ -1115,8 +1133,6 @@
                   <template slot="title">
                     <div style="width: 70%">
                       {{
-                        item.pacName +
-                        ":" +
                         item.parentName +
                         " (搴旀敹閲戦:" +
                         item.ordPrice +
@@ -1488,10 +1504,12 @@
       </span>
     </el-dialog>
     <Packages ref="aaa" @add="handleChanges" />
+    <selectName ref="bbb" @add="handleChangesName"/>
   </div>
 </template>
 
 <script>
+import selectName from "@/components/selectName";
 import { dataURLtoFile, random } from "./file";
 import { getInfo } from "@/api/login";
 import {
@@ -1502,6 +1520,7 @@
 } from "@/api/hosp/customer";
 import { getPrintSetUp } from "@/api/system/examcharge";
 import {
+  tuantiSelect,
   deptTreeSelect,
   projectGetList,
   getOrder,
@@ -1510,6 +1529,7 @@
   getCusIdcard,
   getPackageListName,
   getaddtTransition,
+  tuantiqueren,
   getTransitionList,
   getByTeamNo,
   delTbBycusCardIdAndProId,
@@ -1545,6 +1565,7 @@
     VTreeTransfer,
     historyTj,
     Packages,
+    selectName,
   },
   data() {
     return {
@@ -1814,7 +1835,12 @@
   mounted() {},
 
   methods: {
-    openname: {},
+    openname() {
+          
+      this.$refs.bbb.open = true;
+      this.$refs.bbb.title = "鎼滅储濮撳悕";
+      this.$refs.bbb.getList();
+    },
     getCompanyList() {
       this.loading = true;
       getconfigKey("team_reservation_default_day").then((res) => {
@@ -2340,13 +2366,7 @@
             this.responseList = response.data;
             
             this.$modal.msgSuccess("鏂板鎴愬姛");
-            // let cusSex = this.form.cusSex;
-            // //鍏ㄩ儴濂楅
-            // deptTreeSelect(cusSex).then((response) => {
-            //   this.newpacName = response.rows;
-            //   this.loading = false;
-            // });
-            // this.handleQuery();
+  
             _this.tcShow = true;
             _this.tcShows = true;
             _this.isDisabled = true;
@@ -2837,7 +2857,19 @@
       // this.form.cusName = param1[0].pacName;
       // this.form.cusPhone = param1[0].pacRemark;
     },
-
+    handleChangesName(params){
+      this.form.cusName = params[0].xm
+      this.form.cusPhone = params[0].sjh
+      if (params[0].xb == '鐢�') {
+        this.form.cusSex = 0
+      }
+      if (params[0].xb == '濂�') {
+        this.form.cusSex = 1
+      }
+      if (params[0].xb == '鏈煡') {
+        this.form.cusSex = 2
+      }
+    },
     // selected(row, index) {
     //   if (this.formPacId !== null) {
     //     if (row.pacId == this.formPacId) {
@@ -2892,16 +2924,27 @@
     handle() {
       this.loading = true;
       this.name = this.queryParam.pacName;
+      let param = {
+        sex: this.form.cusSex,
+        dwId: this.form.dictCompId
+      }
       if (this.name) {
         getPackageListName(this.name).then((response) => {
           this.newpacName = response.data;
           this.loading = false;
         });
       } else {
-        deptTreeSelect().then((response) => {
+        if(this.form.tjType == 1) {
+          tuantiSelect(param).then((response) => {
+          this.newpacName = response.data;
+          this.loading = false;
+        })
+        } else{
+          deptTreeSelect().then((response) => {
           this.newpacName = response.rows;
           this.loading = false;
         });
+        }
       }
     },
 
@@ -2988,13 +3031,51 @@
     },
 
     Package() {
-      this.taocan = true;
+      
       this.activeNames = "first";
       let cusSex = this.form.cusSex;
       this.datekey = Date.now();
       //鍏ㄩ儴濂楅
-      this.loading = true;
-      deptTreeSelect(cusSex).then((response) => {
+ 
+      let param = {
+        sex: cusSex,
+        dwId: this.form.dictCompId || ''
+      }
+      if(this.form.tjType == 1) {
+       if(!this.form.dictCompId) {
+        this.$message({
+                        type: "warning",
+                        message: "璇峰厛缁存姢鍗曚綅锛�",
+                      });
+
+       } else {
+        this.taocan = true;
+        this.loading = true;
+        tuantiSelect(param).then((res) => {
+          this.newpacName = res.data;
+          try {
+          if (this.tableData1.length >= 1) {
+            this.newpacName.forEach((item3) => {
+              this.tableData1.forEach((item4) => {
+                item4.list.forEach((item6) => {
+                  if (item6.pacName === item3.pacName) {
+                    this.$nextTick(() => {
+                      this.$refs.tb.toggleRowSelection(item3, true);
+                    });
+                    throw Error();
+                  }
+                });
+              });
+            });
+          }
+        } catch (error) {}
+        this.loading = false;
+        })
+       }
+      } else {
+        this.taocan = true;
+        this.loading = true;
+        deptTreeSelect(cusSex).then((response) => {
         this.newpacName = response.rows;
         try {
           if (this.tableData1.length >= 1) {
@@ -3014,7 +3095,9 @@
         } catch (error) {}
         this.loading = false;
       });
-      // this.getData();
+      }
+      
+
     },
 
     // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁
@@ -3410,7 +3493,8 @@
         pacId: _this.pacId,
         proIds: this.proIds,
       };
-      getaddtTransition(data).then((response) => {
+      if (this.form.tjType == 1){
+        tuantiqueren(data).then((response) => {
         if (response.code == 200) {
           let cusId = this.form.cusIdcard;
           this.proIds = [];
@@ -3450,21 +3534,54 @@
           console.log(澶辫触浜�);
         }
       });
+      } else {
+        getaddtTransition(data).then((response) => {
+        if (response.code == 200) {
+          let cusId = this.form.cusIdcard;
+          this.proIds = [];
+          getTransitionList(cusId).then((response) => {
+            this.tableData1 = response.data;
+            this.TotalPrice1 = 0;
+            if (this.tableData1) {
+              this.tableData1.forEach((item) => {
+                this.TotalPrice1 += item.nowPrice;
+                if (item.tjCategory != null) {
+                  this.tjCategory = item.tjCategory;
+                }
+                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;
+              this.list2 = false;
+            } else {
+              this.list1 = true;
+              this.TotalPrice = "0.00";
+            }
+          });
+        } else {
+          console.log(澶辫触浜�);
+        }
+      });
+      }
+      
+     
       this.taocan = false;
       this.defaultKeys = [];
       this.DataLists = [];
     },
-    // changeCategoryKeys(val) {
-    //   this.proIds = [];
-    //   this.proIds = val;
-    // if (this.DataList.length != 0) {
-    //   this.DataList.forEach((item) => {
-    //     this.proIds.push(item.proId);
-    //   });
-    // } else {
-    //   this.proIds = [];
-    // }
-    // },
     submitCheckinfee() {
       let _this = this;
       if (_this.tjCategory !== "") {

--
Gitblit v1.8.0