From 663dbe4ddca1fa409e6acbc1f77d924c161b0c39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 09 六月 2025 17:04:50 +0800
Subject: [PATCH] 提交一把订单

---
 company/src/components/business/modification.vue |   54 ++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/company/src/components/business/modification.vue b/company/src/components/business/modification.vue
index b0e28c8..7d186a0 100644
--- a/company/src/components/business/modification.vue
+++ b/company/src/components/business/modification.vue
@@ -7,8 +7,9 @@
         @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
             border
             style="width: 100%">
             <el-table-column
@@ -23,8 +24,7 @@
                 align="center"
                 label="淇濋櫓鏂规">
                 <template slot-scope="scope">
-<!--                    :value="{ id:item.id, baseId: item.baseId }"-->
-                    <el-select v-model="scope.row.solution.id" @change="changeSolution($event, scope.$index)" placeholder="璇烽�夋嫨">
+                    <el-select v-model="scope.row.solution.id" :disabled="scope.row.disabled" filterable @change="changeSolution($event, scope.$index)" placeholder="璇烽�夋嫨">
                         <el-option
                             v-for="item in programme"
                             :key="item.id"
@@ -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 v-model="scope.row.shopId" clearable value-key="id" placeholder="璇烽�夋嫨">
                 <el-option
                     v-for="item in shops"
                     :key="item.id"
@@ -52,8 +52,16 @@
                 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
+                align="center"
+                label="绛剧讲鐘舵��">
+                <template slot-scope="{row}">
+                    <template v-if="row.signStatus === 0">寰呯绔�</template>
+                    <template v-else-if="row.signStatus === 1">宸茬绔�</template>
                 </template>
             </el-table-column>
             <el-table-column
@@ -73,7 +81,7 @@
 import GlobalWindow from '@/components/common/GlobalWindow'
 import { all, listForCompany } from '@/api/business/solutions'
 
-import { updateSolutions, pageAll as shopList } from '@/api/business/company'
+import {updateSolutions, pageAll as shopList, allForFp} from '@/api/business/company'
 
 export default {
   name: 'modification',
@@ -86,8 +94,9 @@
         id: null,
         solutionList: [
           {
-            solution: { id: null, baseId: null },
+            solution: { id: null, baseId: null,type:0 },
             canAdd: 0,
+            shopId:null,
             canReduce: 0
           }
         ]
@@ -114,8 +123,14 @@
       this.programme.forEach(item => {
         if (item.id === e) {
           baseId = item.baseId
+          this.form.solutionList[index].solution.type = item.type
+          // console.log(item.type)
+          // if(item.type == 1){
+            this.form.solutionList[index].shopId =item.shopId
+          // }
         }
       })
+
       this.form.solutionList[index].solution.baseId = baseId
     },
     confirm () {
@@ -139,7 +154,7 @@
         .then(res => {
           this.programme = res
         })
-      shopList({ type: 1, status: 0 })
+      allForFp({ type: 1, status: 0 })
         .then(res => {
           console.log(res)
           this.shops = res
@@ -152,26 +167,29 @@
         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({
+              disabled: true,
+              solution: { id: item.solutionId, baseId: item.solutionBaseId,type:item.solutionType },
               shopId: item.shopId,
-              canAdd: item.canAdd,
-              canReduce: item.canReduce
-            }
+              canAdd: 1,
+              canReduce: 1,
+              signStatus: item.signStatus
+            })
           })
-          console.log(that.form.solutionList)
           that.visible = true
         })
     },
     add () {
       this.form.solutionList.push({
+        disabled: false,
         solution: { id: null, baseId: null },
         shopId: null,
-        canAdd: '',
-        canReduce: ''
+        canAdd: 1,
+        canReduce: 1
       })
     },
     dele (index) {

--
Gitblit v1.9.3