From 3e72240f9926463bba8d2d5cbec743dbcdcf9bd3 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期日, 07 四月 2024 16:00:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1

---
 company/src/components/business/modification.vue |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/company/src/components/business/modification.vue b/company/src/components/business/modification.vue
index b0e28c8..7c2181f 100644
--- a/company/src/components/business/modification.vue
+++ b/company/src/components/business/modification.vue
@@ -7,7 +7,7 @@
         @confirm="confirm"
     >
         <el-button type="primary" style="margin-bottom: 15px;" @click="add">娣诲姞</el-button>
-        <el-table
+        <el-table v-if="form.solutionList && form.solutionList.length>0"
             :data="form.solutionList"
             border
             style="width: 100%">
@@ -38,7 +38,7 @@
               align="center"
               label="濮旀墭鍟嗘埛">
             <template slot-scope="scope">
-              <el-select  v-model="scope.row.shopId" clearable="true" value-key="id" placeholder="璇烽�夋嫨">
+              <el-select :ref="'shopSelect'+scope.$index" :disabled="scope.row.solution.type ==1" v-model="scope.row.shopId" clearable value-key="id" placeholder="璇烽�夋嫨">
                 <el-option
                     v-for="item in shops"
                     :key="item.id"
@@ -52,8 +52,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
@@ -86,8 +86,9 @@
         id: null,
         solutionList: [
           {
-            solution: { id: null, baseId: null },
+            solution: { id: null, baseId: null,type:0 },
             canAdd: 0,
+            shopId:null,
             canReduce: 0
           }
         ]
@@ -114,8 +115,13 @@
       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
     },
     confirm () {
@@ -152,17 +158,18 @@
         this.form[key] = target[key]
       }
       this.getAll()
+      this.form.solutionList=[]
       listForCompany({ companyId: target.id })
         .then(resa => {
-          that.form.solutionList = resa.map(item => {
-            return {
-              solution: { id: item.solutionId, baseId: item.solutionBaseId },
+          resa.forEach(item => {
+            this.form.solutionList.push({
+              solution: { id: item.solutionId, baseId: item.solutionBaseId,type:item.solutionType },
               shopId: item.shopId,
-              canAdd: item.canAdd,
-              canReduce: item.canReduce
-            }
+              canAdd: 1,
+              canReduce: 1
+            })
           })
-          console.log(that.form.solutionList)
+          console.log(this.form.solutionList)
           that.visible = true
         })
     },
@@ -170,8 +177,8 @@
       this.form.solutionList.push({
         solution: { id: null, baseId: null },
         shopId: null,
-        canAdd: '',
-        canReduce: ''
+        canAdd: 1,
+        canReduce: 1
       })
     },
     dele (index) {

--
Gitblit v1.9.3