From eeac81ae464d3b905da959790b5baa531ee766f5 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 23 七月 2025 13:39:53 +0800
Subject: [PATCH] .

---
 src/views/reservation/reservations/index.vue |  166 +++++++++++++++++++++++++-----------------------------
 1 files changed, 77 insertions(+), 89 deletions(-)

diff --git a/src/views/reservation/reservations/index.vue b/src/views/reservation/reservations/index.vue
index 53eb1b0..54a1bf5 100644
--- a/src/views/reservation/reservations/index.vue
+++ b/src/views/reservation/reservations/index.vue
@@ -605,10 +605,10 @@
                   style="width: 160px"
                 />
               </el-form-item>
-              <el-form-item label="鍗曚綅鍚嶇О" prop="companyId">
+              <el-form-item label="鍗曚綅鍚嶇О" prop="company">
                 <el-select
                   :remote-method="getRemoteData"
-                  v-model="formIn.companyId"
+                  v-model="formIn.company"
                   remote
                   default-first-option
                   allow-create
@@ -915,24 +915,16 @@
                       align="center"
                     >
                     </el-table-column>
-                    <el-table-column
+                    <!-- <el-table-column
                       prop="proType"
                       label="鎬у埆"
                       width="50"
                       align="center"
                     >
                       <template slot-scope="scope">
-                        <template v-if="isAll(scope.row.proType)">
-                          鍏ㄩ儴
-                        </template>
-                        <template v-else>
-                          <dict-tag
-                            :options="dict.type.sys_user_sex"
-                            :value="String(scope.row.proType || '')"
-                          />
-                        </template>
+                        {{ scope.row.proType || '鍏ㄩ儴' }}
                       </template>
-                    </el-table-column>
+                    </el-table-column> -->
 
                     <el-table-column
                       prop="ordPrice"
@@ -941,10 +933,11 @@
                     >
                     </el-table-column>
                     <el-table-column label="鎶樻墸" width="160px" align="center">
+                      <!-- @input="validateDiscount(scope.row)" -->
+
                       <template slot-scope="scope">
                         <el-input-number
                           v-model.number="scope.row.discount"
-                          @input="validateDiscount(scope.row)"
                           placeholder="杈撳叆鎶樻墸"
                           size="small"
                           type="number"
@@ -1716,10 +1709,10 @@
                     >
                     </el-table-column>
                     <el-table-column label="鎶樻墸" width="160px" align="center">
+                      <!--  @input="validateDiscount(scope.row)" -->
                       <template slot-scope="scope">
                         <el-input-number
                           v-model.number="scope.row.discount"
-                          @input="validateDiscount(scope.row)"
                           placeholder="杈撳叆鎶樻墸"
                           size="small"
                           type="number"
@@ -2205,7 +2198,8 @@
         address: "",
         tjCategory: "",
         department: "",
-        company: "", // 涓嶈璁句负瀵硅薄
+        companyId: "",
+        company: "",
         career: "",
         reservationTime: "",
         timeRegion: "",
@@ -2462,7 +2456,6 @@
       this.title = "娣诲姞浣撴鍗曚綅淇℃伅缁存姢";
     },
     idFn1(value) {
-      console.log(value, 888888);
       if (value) {
         this.form.dictCompId = value;
         // this.CompanyList.forEach((item) => {
@@ -2775,76 +2768,61 @@
       }
       let id = row.id;
       this.list1 = true;
-      (this.tableData1 = []),
-        (this.newpacName = []),
-        this.drawer1 = true;
-        getReservation(id).then((response) => {
+      (this.tableData1 = []), (this.newpacName = []), (this.drawer1 = true);
+      getReservation(id).then((response) => {
+        if (response.data) {
+          this.formIn = response.data;
 
-          if (response.data) {
-            // console.log("formIn data:", this.formIn);
-            this.formIn = response.data;
-            /* for (const key in this.formIn) {
-              if (
-                typeof this.formIn[key] === "object" &&
-                this.formIn[key] !== null
-              ) {
-                console.warn(
-                  `formIn.${key} 鏄璞★紝鍙兘瀵艰嚧缁戝畾閿欒`,
-                  this.formIn[key]
-                );
-              }
-            } */
+          if (this.formIn.timeRegion === 0) {
+            this.formIn.timeRegion = "8:00-9:00";
+          }
+          if (row.timeRegion === 1) {
+            this.formIn.timeRegion = "9:00-10:00";
+          }
+          if (row.timeRegion === 2) {
+            this.formIn.timeRegion = "10:00-11:00";
+          }
+          if (row.timeRegion === 3) {
+            this.formIn.timeRegion = "11:00-12:00";
+          }
+          if (this.formIn.isExpire === 1) {
+            this.tijiao1 = false;
+          }
+          // this.drawer1 = true;
+          if (this.formIn.discount != null) {
+            this.discount = this.formIn.discount;
+          }
+          let cusId = this.formIn.idCard;
+          getTransitionList1(cusId).then((response) => {
+            if (response.data) {
+              this.tableData1 = response.data.list;
+              console.log("tableData1", this.tableData1);
 
-            if (this.formIn.timeRegion === 0) {
-              this.formIn.timeRegion = "8:00-9:00";
-            }
-            if (row.timeRegion === 1) {
-              this.formIn.timeRegion = "9:00-10:00";
-            }
-            if (row.timeRegion === 2) {
-              this.formIn.timeRegion = "10:00-11:00";
-            }
-            if (row.timeRegion === 3) {
-              this.formIn.timeRegion = "11:00-12:00";
-            }
-            if (this.formIn.isExpire === 1) {
-              this.tijiao1 = false;
-            }
-            // this.drawer1 = true;
-            if (this.formIn.discount != null) {
-              this.discount = this.formIn.discount;
-            }
-            let cusId = this.formIn.idCard;
-            getTransitionList1(cusId).then((response) => {
-              if (response.data) {
-                this.tableData1 = response.data.list;
-                console.log('tableData1', this.tableData1);
-
-                if (this.tableData1.length != 0) {
-                  this.TotalPrice1 = 0;
-                  this.tableData1.forEach((item) => {
-                    this.TotalPrice1 += item.nowPrice;
-                    this.TotalPrice = (
-                      this.TotalPrice1 *
-                      (this.discount / 10)
-                    ).toFixed(2);
-                    if (item.pacName === null) {
-                      item.pacName = "鍗曢」";
-                    }
-                  });
-                  this.list1 = false;
-                  this.list3 = true;
-                } else {
-                  this.list1 = true;
-                }
+              if (this.tableData1.length != 0) {
+                this.TotalPrice1 = 0;
+                this.tableData1.forEach((item) => {
+                  this.TotalPrice1 += item.nowPrice;
+                  this.TotalPrice = (
+                    this.TotalPrice1 *
+                    (this.discount / 10)
+                  ).toFixed(2);
+                  if (item.pacName === null) {
+                    item.pacName = "鍗曢」";
+                  }
+                });
+                this.list1 = false;
+                this.list3 = true;
               } else {
-                this.tableData1 = [];
-                this.list3 = false;
                 this.list1 = true;
               }
-            });
-          }
-        });
+            } else {
+              this.tableData1 = [];
+              this.list3 = false;
+              this.list1 = true;
+            }
+          });
+        }
+      });
 
       /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
       projectGetList().then((response) => {
@@ -3172,13 +3150,19 @@
       if (this.formIn.timeRegion === "11:00-12:00") {
         this.formIn.timeRegion = 3;
       }
+      this.CompanyList.forEach((item) => {
+        if (item.drugManufacturerId === this.formIn.companyId) {
+          this.formIn.company = item.cnName;
+        }
+      });
       let data;
       if (pacId) {
         data = {
           id: this.formIn.id,
           isExpire: this.formIn.isExpire,
           address: this.formIn.address,
-          company: this.formIn.companyId,
+          companyId: this.formIn.companyId,
+          company: this.formIn.company,
           department: this.formIn.department,
           discount: this.discount,
           email: this.formIn.email,
@@ -3204,6 +3188,7 @@
           id: this.formIn.id,
           isExpire: this.formIn.isExpire,
           address: this.formIn.address,
+          companyId: this.formIn.companyId,
           company: this.formIn.company,
           department: this.formIn.department,
           discount: this.discount,
@@ -3226,20 +3211,23 @@
           career: this.formIn.career,
         };
       }
+      console.log('鎻愪氦鍙傛暟', data);
       tjReappoint(data).then((res) => {
         if (res.code === 200) {
           this.$modal.msgSuccess("棰勭害鎴愬姛");
+          this.getList();
+          this.$tab.refreshPage();
+          _this.drawer = false;
         }
-        _this.drawer = false;
       });
-      this.getList();
-      this.$tab.refreshPage();
+      // this.getList();
+      // this.$tab.refreshPage();
       // } else {
       //   this.$message.warning("璇烽�夋嫨鎮ㄨ浣撴鐨勫唴瀹�");
       // }
     },
     // 鏈�鍚庢彁浜ゆ寜閽�
-    submitPrice1() {
+    /*  submitPrice1() {
       let _this = this;
       if (_this.tableData1.length > 0) {
         if (this.tableData[0]) {
@@ -3293,7 +3281,7 @@
             id: this.formIn.id,
             isExpire: this.formIn.isExpire,
             address: this.formIn.address,
-            company: this.formIn.company,
+            companyId: this.formIn.companyId,
             department: this.formIn.department,
             discount: this.discount,
             email: this.formIn.email,
@@ -3326,7 +3314,7 @@
       } else {
         this.$message.warning("璇烽�夋嫨鎮ㄨ浣撴鐨勫唴瀹�");
       }
-    },
+    }, */
 
     // 鎾ら攢棰勭害路
     handleDelete(row) {

--
Gitblit v1.8.0