From c140987b3ef6fd47e3b795fc3a2c6f880f49f9c2 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期三, 12 三月 2025 13:41:28 +0800
Subject: [PATCH] qx

---
 src/views/system/Checkout/index.vue |  135 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 104 insertions(+), 31 deletions(-)

diff --git a/src/views/system/Checkout/index.vue b/src/views/system/Checkout/index.vue
index 46b4bf8..dda798a 100644
--- a/src/views/system/Checkout/index.vue
+++ b/src/views/system/Checkout/index.vue
@@ -15,6 +15,7 @@
           v-model="queryParams.name"
           placeholder="璇疯緭鍏ュ鍚�"
           @keyup.enter.native="handleQuery"
+          @input="queryParams.name = $event.replace(/\s/g, '')"
         />
       </el-form-item>
       <el-form-item label="浣撴鍙�" prop="tjNum">
@@ -26,6 +27,7 @@
           @blur="hb"
           style="width: 170px"
           clearable
+          @input="queryParams.tjNum = $event.replace(/\s/g, '')"
         />
       </el-form-item>
       <el-form-item label="鐧昏鏃堕棿" prop="createTimeList">
@@ -120,9 +122,10 @@
           :show-overflow-tooltip="true"
         >
           <template slot-scope="scope">
-            <span v-if="scope.row.tjCustomerSex == '0'">鐢�</span>
-            <span v-if="scope.row.tjCustomerSex == '1'">濂�</span>
-            <span v-if="scope.row.tjCustomerSex == '2'">鏈煡</span>
+            <dict-tag
+              :options="dict.type.sys_user_sex"
+              :value="scope.row.tjCustomerSex"
+            />
           </template>
         </el-table-column>
         <el-table-column
@@ -251,7 +254,12 @@
     </el-dialog>
 
     <!-- 娣诲姞鎴栦慨鏀逛綋妫�璁板綍瀵硅瘽妗� -->
-    <el-dialog :title="title" :visible.sync="open" width="660px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="660px"
+      :close-on-click-modal="false"
+    >
       <el-form
         :model="formIn"
         ref="queryForm"
@@ -288,7 +296,8 @@
             style="width: 116px"
             ref="inputName"
             v-model="formIn.tjCustomerSex"
-          />
+          >
+          </el-input>
         </el-form-item>
         <el-form-item label="骞撮緞" prop="tjCustomerAge">
           <el-input
@@ -318,15 +327,19 @@
         </el-table-column>
         <el-table-column label="瀹屾垚" prop="type" width="86" align="center">
           <template slot-scope="scope">
-            <el-checkbox v-model="scope.row.type" disabled></el-checkbox>
+            <el-checkbox
+              @change="handelcheckbox1(scope.row)"
+              v-model="scope.row.type"
+              :disabled="scope.row.leave"
+            ></el-checkbox>
           </template>
         </el-table-column>
         <el-table-column label="寮冩" prop="type2" width="86" align="center">
           <template slot-scope="scope">
             <el-checkbox
-              @change="handelcheckbox"
+              @change="handelcheckbox(scope.row)"
               v-model="scope.row.type2"
-              :disabled="leave"
+              :disabled="scope.row.leave"
             >
               <!-- <el-checkbox v-model="scope.row.type2"></el-checkbox> -->
             </el-checkbox>
@@ -335,9 +348,9 @@
         <el-table-column label="寤舵湡" prop="type3" width="86" align="center">
           <template slot-scope="scope">
             <el-checkbox
-              @change="handelcheck"
+              @change="handelcheck(scope.row)"
               v-model="scope.row.type3"
-              :disabled="leave"
+              :disabled="scope.row.leave"
             >
             </el-checkbox>
           </template>
@@ -376,7 +389,7 @@
       <!-- 寮冩2锛屽欢鏈�3 -->
       <div slot="footer" class="dialog-footer">
         <!-- <el-button @click="cancel">寤舵湡</el-button> -->
-        <el-button @click="canaffirm">纭绛剧</el-button>
+        <el-button :loading = isLoading @click="canaffirm">纭绛剧</el-button>
       </div>
     </el-dialog>
   </div>
@@ -401,7 +414,7 @@
   components: {
     ViewPdf,
   },
-  dicts: ["dict_pay_type"],
+  dicts: ["dict_pay_type","sys_user_sex"],
   name: "Order",
   data() {
     return {
@@ -409,6 +422,7 @@
       leave: false,
       checked: false,
       radioId1: false,
+      isLoading:false,
       createTimeList: [],
       cusId: "",
       payType: "0",
@@ -438,6 +452,7 @@
       // remarkId1: "",
       type: null,
       type1: null,
+      types: null,
       // 濂楅鎻愪氦鎸夐挳
       confirm: false,
       list1: true,
@@ -523,7 +538,7 @@
   },
   created() {
     // this.getNowTime();
-  
+
     this.getdate();
   },
   mounted() {
@@ -568,14 +583,13 @@
       if (this.startTime) {
         this.queryParams.djbeginTime = this.startTime[0];
         this.queryParams.djendTime = this.startTime[1];
-      } else if(this.createTimeList){
+      } else if (this.createTimeList) {
         this.queryParams.djbeginTime = this.createTimeList[0];
         this.queryParams.djendTime = this.createTimeList[1];
-      } else if(this.createTimeList == null){
+      } else if (this.createTimeList == null) {
         this.queryParams.djbeginTime = null;
         this.queryParams.djendTime = null;
       }
-      
 
       this.loading = true;
       getQianLiList(this.queryParams).then((response) => {
@@ -672,8 +686,8 @@
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
-      this.createTimeList = []
-      this.startTime= []
+      this.createTimeList = [];
+      this.startTime = [];
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -767,17 +781,56 @@
       });
     },
 
-    handelcheckbox(val) {
+    handelcheckbox1(val) {
       // this.numberList.forEach(item => {
       //   if(item.type2 === true){
       //     item.type3 = false
       //   }
       // })
       for (let i = 0; i <= this.numberList.length; i++) {
-        if (this.numberList[i].type2 === true) {
-          this.numberList[i].type3 = false;
-          this.tcShow = false;
-          return;
+        if (val.proId == this.numberList[i].proId) {
+          if (this.numberList[i].type === true) {
+            this.numberList[i].type3 = false;
+            this.numberList[i].type2 = false;
+            this.tcShow = false;
+            return;
+          } else {
+            return;
+          }
+        }
+      }
+      // this.type2 = val
+      // this.numberList.forEach(item => {
+      //   if (item.type === true) {
+      //     item.type2 = false;
+      //     item.type3 = false;
+      //   } else{
+      //     this.type2 = val
+      //     if (this.type2 === true) {
+      //       item.type = false
+      //       item.type3 = false
+      //     }
+      //   }
+      // })
+    },
+
+    handelcheckbox(val) {
+      // this.numberList.forEach(item => {
+      //   if(item.type2 === true){
+      //     item.type3 = false
+      //   }
+      // })
+
+      for (let i = 0; i <= this.numberList.length; i++) {
+        if (val.proId == this.numberList[i].proId) {
+          if (this.numberList[i].type2 === true) {
+            this.numberList[i].type3 = false;
+            this.numberList[i].type = false;
+            this.tcShow = false;
+            return;
+          } else {
+            return;
+          }
         }
       }
       // this.type2 = val
@@ -805,10 +858,17 @@
       //   }
       // })
       for (let i = 0; i <= this.numberList.length; i++) {
-        if (this.numberList[i].type3 === true) {
-          this.numberList[i].type2 = false;
-          this.tcShow = true;
-          return;
+        if (val.proId == this.numberList[i].proId) {
+          if (this.numberList[i].type3) {
+            if (this.numberList[i].type3 === true) {
+              this.numberList[i].type2 = false;
+              this.numberList[i].type = false;
+              this.tcShow = true;
+              return;
+            }
+          } else {
+            return;
+          }
         }
       }
       // this.numberList.forEach(item => {
@@ -831,7 +891,9 @@
     /** 绛剧鎸夐挳鎿嶄綔 */
     handleDelete() {
       this.title = "绛剧鐧昏";
-      this.List.forEach((item) => {
+      this.numberList = [];
+      let list = JSON.parse(JSON.stringify(this.List))
+      list.forEach((item) => {
         this.formIn = item;
         if (this.formIn.tjCustomerSex === 0) {
           this.formIn.tjCustomerSex = "鐢�";
@@ -853,13 +915,14 @@
               item.type = true;
               item.type2 = false;
               item.type3 = false;
-              this.leave = true;
+              item.leave = true;
             } else {
-              this.leave = false;
+              item.leave = false;
             }
             item = {
               type2: false,
               type3: false,
+              leave: false,
             };
           });
           this.open = true;
@@ -877,13 +940,21 @@
         }
       });
     },
+
     // 纭寮冩
     canaffirm() {
       this.List.forEach((item) => {
         this.tjNumber = item.tjNumber;
       });
       this.numberList.forEach((element) => {
-        if (element.type2 === true) {
+        if (element.type === true) {
+          this.types = 1;
+          this.DataList.push({
+            tjNumber: this.tjNumber,
+            type: this.types,
+            remarkId: element.remarkId,
+          });
+        } else if (element.type2 === true) {
           this.type = 2;
           this.DataList.push({
             tjNumber: this.tjNumber,
@@ -905,11 +976,13 @@
         domainVos: this.DataList,
         tjNumber: this.tjNumber,
       };
+      this.isLoading = true
       gettjGoOut(data).then((res) => {
         if (res.code === 200) {
           this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
           this.open = false;
           this.multiple = true;
+          this.isLoading = false
           this.getList();
         }
       });

--
Gitblit v1.8.0