From 3a45da15c947c2d478a44a51bd0f926647b1b841 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 11 四月 2025 16:33:17 +0800
Subject: [PATCH] 提交
---
 company/src/components/business/OperaCompanyWindow.vue |   51 +++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/company/src/components/business/OperaCompanyWindow.vue b/company/src/components/business/OperaCompanyWindow.vue
index 00aa20c..d01fc90 100644
--- a/company/src/components/business/OperaCompanyWindow.vue
+++ b/company/src/components/business/OperaCompanyWindow.vue
@@ -86,12 +86,12 @@
                 align="center"
                 label="淇濋櫓鏂规">
                 <template slot-scope="scope">
-                  <el-select  v-model="scope.row.solution"  value-key="id" placeholder="璇烽�夋嫨" change="changeSolution($event,scope.$index)">
+                  <el-select v-model="scope.row.solution.id" @change="changeSolution($event, scope.$index)" placeholder="璇烽�夋嫨">
                     <el-option
                         v-for="item in programme"
                         :key="item.id"
                         :label="item.name"
-                        :value="item">
+                        :value="item.id">
                     </el-option>
                   </el-select>
                 </template>
@@ -100,7 +100,7 @@
                 align="center"
                 label="濮旀墭鍟嗘埛">
                 <template slot-scope="scope">
-                  <el-select  v-model="scope.row.shopId" clearable value-key="id" placeholder="璇烽�夋嫨" >
+                  <el-select  v-model="scope.row.shopId"  :disabled="scope.row.solution.type ==1" clearable value-key="id" placeholder="璇烽�夋嫨" >
                     <el-option
                         v-for="item in shops"
                         :key="item.id"
@@ -114,8 +114,8 @@
                 align="center"
                 label="鍔犲噺淇濆姛鑳�">
                 <template slot-scope="{row}">
-                    <el-checkbox :true-label="1" :false-label="0" v-model="row.canAdd">鍔犱繚</el-checkbox>
-                    <el-checkbox :true-label="1" :false-label="0" v-model="row.canReduce">鍑忎繚</el-checkbox>
+                    <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canAdd">鍔犱繚</el-checkbox>
+                    <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canReduce">鍑忎繚</el-checkbox>
                 </template>
             </el-table-column>
             <el-table-column
@@ -142,6 +142,13 @@
   extends: BaseOpera,
   components: { GlobalWindow, UploadAvatarImage },
   data () {
+      var idcardImgList = (rule, value, callback) => {
+          if (value.length === 0) {
+              callback(new Error('璇蜂笂浼犳硶浜鸿韩浠借瘉'));
+          } else {
+              callback();
+          }
+      };
     return {
       // 琛ㄥ崟鏁版嵁
       initParam:{
@@ -170,10 +177,10 @@
         },
         solutionList: [
           {
-            solution: null,
-            shop: null,
-            canAdd: 0,
-            canReduce: 0
+            solution: { id: null, baseId: null,type:0 },
+            canAdd: 1,
+            shopId:null,
+            canReduce: 1
           }
         ],
         type: '0',
@@ -225,7 +232,7 @@
           { required: true, message: '璇蜂笂浼犺惀涓氭墽鐓�' }
         ],
         idcardImgList: [
-          { required: true, message: '璇蜂笂浼犳硶浜鸿韩浠借瘉' }
+          { required: true, validator: idcardImgList }
         ],
         signImg: [
           { required: true, message: '璇蜂笂浼犵數瀛愮绔�' }
@@ -255,8 +262,21 @@
     }
   },
   methods: {
-    changeSolution(row,index){
-     this.form.solutionList[index].solution=row
+    changeSolution(e,index){
+      let baseId = ''
+      this.programme.forEach(item => {
+        if (item.id === e) {
+          baseId = item.baseId
+          this.form.solutionList[index].solution.type = item.type
+          if(item.type == 1){
+            this.form.solutionList[index].shopId =item.shopId
+          }
+        }
+      })
+
+      this.form.solutionList[index].solution.baseId = baseId
+
+     // this.form.solutionList[index].solution=row
     },
     send () {
       if (!this.form.phone) {
@@ -295,6 +315,7 @@
       this.$nextTick(() => {
         for (const key in this.form) {
           this.form[key] = target[key]
+          this.form.username=null
         }
       })
     },
@@ -322,8 +343,8 @@
         solutionId: null,
         solution: {},
         shopId: null,
-        canAdd: '',
-        canReduce: ''
+        canAdd: 1,
+        canReduce: 1
       })
     },
     handleRemove (file, fileList) {
@@ -345,6 +366,7 @@
         name: ''
       }
       this.form.idcardImgList[0] = { fileurl: data.imgurl, name: data.name }
+        this.$forceUpdate()
     },
     // 韬唤璇佺収鐗�2
     result2 (data) {
@@ -353,6 +375,7 @@
         name: ''
       }
       this.form.idcardImgList[1] = { fileurl: data.imgurl, name: data.name }
+        this.$forceUpdate()
     },
     // 鐢靛瓙绛剧珷
     result3 (data) {
--
Gitblit v1.9.3