From c26deaa0190c0ed42b398f3e5696013127a6c10f Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期二, 11 三月 2025 16:17:51 +0800
Subject: [PATCH] 1.看板修改

---
 src/views/workOrder/workOrderList.vue |  593 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 581 insertions(+), 12 deletions(-)

diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index 4063fb7..1427b1b 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -8,7 +8,11 @@
           <el-button v-waves type="success" icon="el-icon-connection" @click="send">娲惧彂</el-button>
         </div>
 
-        <!--        <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</el-button>-->
+        <!--        <el-button v-waves type="primary" @click="batchUpdate"><i-->
+        <!--          class="el-icon-edit"-->
+        <!--          style="margin-right: 0;"-->
+        <!--        /> 鎵归噺缁戝畾-->
+        <!--        </el-button>-->
       </div>
 
       <div class="bodyTopFormGroup">
@@ -175,6 +179,20 @@
               <div v-if="row.status==='SCHED'">宸叉帓绋�</div>
             </template>
           </el-table-column>
+
+          <el-table-column
+            prop="isstep"
+            label="宸ヨ壓鐘舵��"
+            sortable="custom"
+            width="110"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <el-tag v-if="row.isstep==='Y'" type="success" size="mini">宸茬粦瀹�</el-tag>
+              <el-tag v-if="row.isstep==='N'" type="danger" size="mini">鏈粦瀹�</el-tag>
+            </template>
+          </el-table-column>
+
           <el-table-column
             prop="wo_code"
             label="宸ュ崟缂栧彿"
@@ -707,8 +725,8 @@
             :popper-append-to-body="false"
             style="width: 200px;"
             placeholder="璇烽�夋嫨杞﹂棿"
-            @change="getMesOrderNewStepContent"
           >
+            <!--            @change="getMesOrderNewStepContent"-->
             <!--            @change="sourceType? getMesOrderNewStepContent():routecodeChange()"-->
             <el-option
               v-for="item in wkshopArr"
@@ -2336,6 +2354,255 @@
       </span>
     </el-dialog>
 
+    <!--   鎵归噺淇敼-->
+    <el-dialog
+      v-el-drag-dialog
+      title="鎵归噺淇敼"
+      :visible.sync="dialogVisibleBatchUpdate"
+      width="1200px"
+      top="8vh"
+      :close-on-click-modal="false"
+      @closed="handleCloseBatchUpdate"
+      @close="handleCloseBatchUpdate"
+    >
+
+      <div
+        v-if="formData3.filter(i => !i.routecode).length>0&&mesSetting.route"
+        style="display: flex;align-items: center"
+      >
+        <div style="height: 34px;width: 80%;margin-bottom: 10px;">
+          <el-alert
+            :title="'褰撳墠閫変腑'+multipleSelection.length+'涓伐鍗曪紝鏈�'+(formData3.filter(i => !i.routecode).length)+'涓伐鍗曟湭鎸囧畾宸ヨ壓璺嚎锛岃鍏堟寚瀹氾紒'"
+            type="error"
+            :closable="false"
+          />
+        </div>
+        <el-button
+          v-waves
+          type="text"
+          style="margin-left: 20px;"
+          @click="dialogVisibleBatchUpdate=false;$router.push('../materialManager/inventoryList')"
+        >鐐瑰嚮璺宠浆瀛樿揣缁戝畾宸ヨ壓
+        </el-button>
+      </div>
+
+      <div v-for="(i,index) in formData3" :key="index" class="customDiv">
+
+        <el-form
+          ref="dialogForm"
+          inline
+          :model="i"
+          label-width="110px"
+        >
+
+          <el-divider content-position="left">鍩烘湰淇℃伅 {{ index + 1 }}</el-divider>
+
+          <el-form-item
+            label="宸ュ崟鐘舵��"
+            prop="mesorderstus"
+          >
+            <div style="width: 200px;">{{ erporderstusArr.find(item => item.code === i.mesorderstus).name }}</div>
+          </el-form-item>
+          <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
+            <div style="width: 200px;">{{ i.mesordercode }}</div>
+          </el-form-item>
+          <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
+            <div style="width: 200px;">{{ ordertypeArr.find(item => item.code === i.ordertype).name }}</div>
+          </el-form-item>
+          <el-form-item label="婧愬崟鍗曞彿">
+            <div style="width: 200px;">{{ i.sourceorder }}</div>
+          </el-form-item>
+          <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
+            <div style="width: 200px;">{{ i.mesqty }}</div>
+          </el-form-item>
+
+          <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
+            <el-select
+              v-model="i.wkshopcode"
+              filterable
+              :popper-append-to-body="false"
+              style="width: 200px;"
+              placeholder="璇烽�夋嫨杞﹂棿"
+            >
+              <!--              @change="val=>getMesOrderNewStepContentBatchUpdate(val,index)"-->
+              <el-option
+                v-for="item in wkshopArr"
+                :key="item.torg_code"
+                :label="item.torg_name"
+                :value="item.torg_code"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item
+            label="浜у搧鍚嶇О"
+            prop="partcode"
+          >
+            <div style="width: 200px;">{{ partArr.find(item => item.partcode === i.partcode).partname }}</div>
+          </el-form-item>
+          <el-form-item
+            label="浜у搧缂栫爜"
+            prop="partcode"
+          >
+            <div style="width: 200px;">{{ i.partcode }}</div>
+          </el-form-item>
+
+          <el-form-item label="浜у搧瑙勬牸" prop="partspec">
+            <div style="width: 200px;">{{
+              partArr.find(item => item.partcode === i.partcode).partspec ? partArr.find(item => item.partcode === i.partcode).partspec : '/'
+            }}
+            </div>
+          </el-form-item>
+          <el-form-item v-if="mesSetting.route" label="宸ヨ壓璺嚎" prop="wkshopcode">
+            <el-select
+              v-model="i.routecode"
+              filterable
+              :popper-append-to-body="false"
+              style="width: 200px;"
+              placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
+              @change="val=>routecodeChangeBatchUpdate(val,index)"
+            >
+              <el-option
+                v-for="item in i.routecodeArr"
+                :key="item.route_code"
+                :label="item.route_name"
+                :value="item.route_code"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
+            <el-date-picker
+              v-model="i.deliverydate"
+              type="date"
+              size="mini"
+              :clearable="false"
+              class="dateMini"
+              :picker-options="pickerOptions"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              placeholder="閫夋嫨鏃ユ湡"
+            />
+          </el-form-item>
+          <el-form-item label="宸ュ簭鏉ユ簮" required>
+            <el-switch
+              v-model="i.sourceType"
+              style="width: 200px;"
+              inactive-text="鍩虹璁剧疆"
+              active-text="鍘嗗彶鏈�鏂�"
+              :disabled="!i.wkshopcode"
+              @change="val=>sourceTypeChangeBatchUpdate(val,index)"
+            />
+          </el-form-item>
+
+          <el-divider content-position="left">宸ュ簭淇℃伅 {{ index + 1 }}</el-divider>
+
+          <div style="display: flex;align-items: center">
+            <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>
+
+            <el-select
+              v-model="i.stepSelectedValue"
+              class="stepSelectedValueClass"
+              style="width: 930px;"
+              multiple
+              placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
+              @change="val=>stepSelectedValueChangeBatchUpdate(val,index)"
+            >
+              <el-option
+                v-for="item in stepSelectArr"
+                :key="item.stepcode"
+                :label="item.stepname"
+                :value="item.stepcode"
+              />
+            </el-select>
+          </div>
+
+          <el-table
+            :ref="'stepTableDataRef'+index"
+            :key="index"
+            :data="i.stepTableData"
+            border
+            :row-class-name="tableRowClassName"
+            height="300"
+            :header-cell-style="{
+              background: '#f8f8fa', padding: '0', color: '#000', fontWeight: 500
+            }"
+            :cell-style="{padding: '5px 0'}"
+            style="width: 100%;margin-top: 15px;"
+            highlight-current-row
+            row-key="stepcode"
+          >
+            <el-table-column
+              type="index"
+              label="搴忓彿"
+              width="50"
+            />
+            <el-table-column
+              prop="stepcode"
+              show-tooltip-when-overflow
+              label="宸ュ簭缂栫爜"
+            />
+            <el-table-column
+              prop="stepname"
+              label="宸ュ簭鍚嶇О"
+              show-tooltip-when-overflow
+            />
+            <el-table-column
+              prop="stepprice"
+              label="鐢熶骇鍗曚环"
+              show-tooltip-when-overflow
+            >
+              <template slot-scope="{row}">
+                <el-input
+                  v-model="row.stepprice"
+                  placeholder="璇疯緭鍏ュ伐搴忓崟浠�"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                  style="width: 100%"
+                />
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="鎿嶄綔"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <div class="operationClass">
+                  <!--                   <i-->
+                  <!--                    class="el-icon-rank"-->
+                  <!--                    :style="{color:$store.state.settings.theme}"-->
+                  <!--                    style="cursor: move"-->
+                  <!--                  />-->
+                  <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+                    <i
+                      class="el-icon-delete"
+                      :style="{color:$store.state.settings.theme}"
+                      style="margin-left: 15px;"
+                      @click="stepDelBatchUpdate(index,scope.$index)"
+                    />
+                  </el-tooltip>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+
+        </el-form>
+
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="dialogVisibleCancelBatchUpdate">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirmBatchUpdate"
+          >纭� 瀹�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -2349,9 +2616,9 @@
 import waves from '@/directive/waves'
 import {
   AddMesOrderCodeSearch,
-  AddUpdateMesOrder, DeleteMesOrder,
+  AddUpdateMesOrder, AddUpdateMesOrderList, DeleteMesOrder,
   MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
-  MesOrderSearch, MesOrderSopSearch,
+  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch,
   UpdateMesOrderStepSearch
 } from '@/api/WorkOrder'
 import { PartSelect } from '@/api/ProductModel'
@@ -2360,7 +2627,7 @@
 import ElDragSelect from '@/components/DragSelect'
 import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
 import DateType from '@/components/DateType'
-import { PartSelectRpute, RouteSelectStep } from '@/api/basicSettings'
+import { PartSelectRpute, PartSelectRputeList, RouteSelectStep, RouteSelectStepList } from '@/api/basicSettings'
 import { DeviceSopSearch } from '@/api/DeviceManager'
 
 export default {
@@ -2645,7 +2912,10 @@
       },
       sopArr: [],
       routeCode: '', // 宸ヨ壓璺嚎code
-      partCode: ''
+      partCode: '',
+
+      dialogVisibleBatchUpdate: false, // 鎵归噺淇敼
+      formData3: []
     }
   },
   watch: {
@@ -2686,6 +2956,279 @@
     // })
   },
   methods: {
+    stepDelBatchUpdate(index, ind) {
+      this.formData3[index].stepTableData.splice(ind, 1)
+      this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+    },
+    // 鎵归噺淇敼
+    async batchUpdate() {
+      if (this.multipleSelection.length === 0) {
+        return this.$message.info('璇峰厛鍕鹃�夌浉瀵瑰簲鐨勫伐鍗曪紒')
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
+      const data2 = []
+      const data3 = []
+      this.formData3 = []
+
+      const partcodeArr = []
+
+      this.multipleSelection.forEach(i => {
+        partcodeArr.push({
+          partcode: i.partcode
+        })
+
+        if (this.mesSetting.route) {
+          data2.push(
+            { partcode: i.partcode, routecode: i.route_code ? i.route_code : i.default_route }
+          )
+        }
+
+        data3.push({
+          sourceid: i.sourceid,
+          sourcewo: i.m_po,
+          wocode: i.wo_code,
+          data_sources: i.data_sources
+        })
+
+        this.formData3.push({
+          mesorderstus: i.status, // 宸ュ崟鐘舵�佺爜
+          mesordercode: i.wo_code, // 宸ュ崟缂栧彿
+          ordertype: i.wotype, // 宸ュ崟绫诲瀷
+          sourceorderid: i.sourceid, // 婧愬崟id
+          sourceorder: i.m_po, // 婧愬崟鍗曞彿
+          partcode: i.partcode, // 浜у搧缂栫爜
+          partname: i.partname, // 浜у搧鍚嶇О
+          partspec: i.partspec, // 浜у搧瑙勬牸
+          mesqty: i.plan_qty, // 宸ュ崟鏁伴噺
+          wkshopcode: i.wkshp_code, // 鐢熶骇杞﹂棿缂栫爜
+          wkshopname: i.wkshp_name, // 鐢熶骇杞﹂棿鍚嶇О
+          deliverydate: i.saleOrderDeliveryDate.substring(0, 11), // 浜や粯鏃堕棿
+          data_sources: i.data_sources, // 鏁版嵁鏉ユ簮
+          sourceType: this.sourceType, // 宸ュ簭鏉ユ簮
+          routecode: i.route_code ? i.route_code : i.default_route, // 宸ヨ壓璺嚎
+          routecodeArr: [], // 宸ヨ壓璺嚎鏁扮粍
+          stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
+          stepTableData: []// 宸ュ簭琛ㄥ��
+        })
+      })
+      const { data: res3 } = await UpdateMesOrderStepListSearch(data3)
+      res3.forEach((i, index) => {
+        if (i.stepdata.length > 0) {
+          this.formData3[index].stepTableData = i.stepdata
+          this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode)
+        }
+      })
+
+      const { data: res } = await PartSelectRputeList(partcodeArr)
+      if (this.mesSetting.route) {
+        res.forEach((i, index) => {
+          if (i.routedata.length > 0) {
+            this.formData3[index].routecodeArr = i.routedata
+          }
+        })
+      } else {
+        this.formData3.forEach((i, index) => {
+          if (i.stepTableData.length === 0) {
+            i.stepTableData = res[index].stepdata
+            i.stepSelectedValue = res[index].stepdata.length > 0 ? res[index].stepdata.map(j => j.stepcode) : []
+          }
+        })
+      }
+
+      if (this.mesSetting.route) {
+        const { data: res2 } = await RouteSelectStepList(data2)
+        this.formData3.forEach((i, index) => {
+          if (i.stepTableData.length === 0) {
+            i.stepTableData = res2[index].stepdata
+            i.stepSelectedValue = res2[index].stepdata.length > 0 ? res2[index].stepdata.map(j => j.stepcode) : []
+          }
+        })
+      }
+
+      // this.formData3 = this.multipleSelection
+      this.dialogVisibleBatchUpdate = true
+      loading.close()
+    },
+    // 瀵硅瘽妗嗗叧闂�
+    handleCloseBatchUpdate() {
+      this.multipleSelection = []
+      this.formData3 = []
+      this.$refs.tableDataRef.clearSelection()
+    },
+    dialogVisibleCancelBatchUpdate() {
+      this.dialogVisibleBatchUpdate = false
+    },
+    async dialogVisibleConfirmBatchUpdate() {
+      this.$store.state.app.buttonIsDisabled = true
+      let flag = false
+      const data = []
+      this.formData3.forEach((i, index) => {
+        const workListSub = []
+        if (i.stepTableData.length > 0) {
+          i.stepTableData.forEach((it, j) => {
+            workListSub.push(
+              {
+                stepseq: j + 1,
+                stepcode: it.stepcode,
+                stepprice: it.stepprice,
+                isbott: j === 0 ? 'Y' : 'N',
+                isend: j === i.stepTableData.length - 1 ? 'Y' : 'N'
+              }
+            )
+          })
+        } else {
+          flag = true
+        }
+
+        data.push({
+          wostatus: i.mesorderstus, // 宸ュ崟鐘舵��
+          wocode: i.mesordercode, // 宸ュ崟鍙�
+          wotype: i.ordertype, // 宸ュ崟绫诲瀷
+          sourceid: i.sourceorderid, // 婧愬崟id
+          sourcewo: i.sourceorder, // 婧愬崟鍗曞彿
+          partcode: i.partcode, // 浜у搧缂栧彿
+          wkshopcode: i.wkshopcode,
+          woqty: i.mesqty, // 宸ュ崟鏁伴噺
+          deliverydate: i.deliverydate, // 浜や粯鏃堕棿
+          data_sources: i.data_sources, // 鏁版嵁鏉ユ簮
+          isstep: workListSub.length > 0 ? 'Y' : 'N', //
+          difference: 0, // 鏁版嵁宸��
+          routecode: i.routecode,
+          workListSub
+        })
+      })
+      if (flag) {
+        this.$store.state.app.buttonIsDisabled = false
+        return this.$message.error('鏁版嵁鏈淮鎶ゅソ锛岃鍏堟鏌ワ紒')
+      }
+
+      const res = await AddUpdateMesOrderList(data)
+      if (res.code === '200') {
+        this.$message.success('淇敼鎿嶄綔鎴愬姛锛�')
+        this.$store.state.app.buttonIsDisabled = false
+      }
+      await this.getMesOrderSearch()
+      this.dialogVisibleBatchUpdate = false
+    },
+    async sourceTypeChangeBatchUpdate(val, index) {
+      if (val) {
+        const data = {
+          routecode: this.formData3[index].routecode,
+          wkshopcode: this.formData3[index].wkshopcode,
+          partcode: this.formData3[index].partcode
+        }
+        const { data: res } = await MesOrderNewStepContent(data)
+        this.formData3[index].stepSelectedValue = []
+        this.formData3[index].stepTableData = []
+
+        if (res.length > 0) {
+          res.forEach(i => {
+            this.formData3[index].stepTableData.push(
+              {
+                stepcode: i.step_code,
+                stepname: i.step_name,
+                stepprice: i.stepprice
+              }
+            )
+          })
+          this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+        }
+      } else {
+        if (this.mesSetting.route) {
+          // this.routecodeChange()
+          const data = {
+            partcode: this.formData3[index].partcode,
+            routecode: this.formData3[index].routecode
+          }
+          const { data: res } = await RouteSelectStep(data)
+          this.formData3[index].stepSelectedValue = []
+          this.formData3[index].stepTableData = []
+          if (res.length > 0) {
+            res.sort((a, b) => a.step_seq - b.step_seq)
+            res.forEach(i => {
+              this.formData3[index].stepTableData.push(
+                {
+                  stepcode: i.step_code,
+                  stepname: i.step_name,
+                  stepprice: i.unprice
+                }
+              )
+            })
+            this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+          }
+        } else {
+          // this.getBasicProcessData()
+          const { data: res } = await PartSelectRpute({ partcode: this.formData3[index].partcode })
+          res.sort((a, b) => a.step_seq - b.step_seq)
+          this.formData3[index].stepSelectedValue = []
+          this.formData3[index].stepTableData = []
+          res.forEach(i => {
+            this.formData3[index].stepTableData.push(
+              {
+                stepcode: i.step_code,
+                stepname: i.step_name,
+                stepprice: i.unprice
+              }
+            )
+          })
+          this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+        }
+      }
+    },
+    async getMesOrderNewStepContentBatchUpdate(val, index) {
+      const data = {
+        routecode: this.formData3[index].routecode,
+        wkshopcode: this.formData3[index].wkshopcode,
+        partcode: this.formData3[index].partcode
+      }
+      const { data: res } = await MesOrderNewStepContent(data)
+      this.formData3[index].stepSelectedValue = []
+      this.formData3[index].stepTableData = []
+      if (res.length > 0) {
+        res.forEach(i => {
+          this.formData3[index].stepTableData.push(
+            {
+              stepcode: i.step_code,
+              // stepname: i.stepname,
+              stepprice: i.stepprice
+            }
+          )
+        })
+        this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+      }
+    },
+    async routecodeChangeBatchUpdate(val, index) {
+      // this.sourceType
+
+      const data = {
+        partcode: this.formData3[index].partcode,
+        routecode: this.formData3[index].routecode
+      }
+      const { data: res } = await RouteSelectStep(data)
+
+      this.formData3[index].stepSelectedValue = []
+      this.formData3[index].stepTableData = []
+      if (res.length > 0) {
+        res.sort((a, b) => a.step_seq - b.step_seq)
+        res.forEach(i => {
+          this.formData3[index].stepTableData.push(
+            {
+              stepcode: i.step_code,
+              stepname: i.step_name,
+              stepprice: i.unprice
+            }
+          )
+        })
+        this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
+      }
+    },
     // 寮瑰嚭妗嗗叧闂�
     handleSopClose() {
       this.SopDialogVisible = false
@@ -2904,11 +3447,12 @@
       this.dialogVisibleTask = false
     },
     handleSelectionChange(val) {
-      this.multipleSelection = val.map(i => i.wo_code)
+      this.multipleSelection = val
     },
 
     selected(row, index) {
-      return row.status === 'NEW' && row.isstep === 'Y'
+      return row.status === 'NEW'
+      // return row.status === 'NEW' && row.isstep === 'Y'
     },
     // 娲惧彂
     send() {
@@ -2921,7 +3465,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        MesOrderDistribution(this.multipleSelection).then(res => {
+        MesOrderDistribution(this.multipleSelection.map(i => i.wo_code)).then(res => {
           if (res.code === '200') {
             this.$notify.success('娲惧彂鎴愬姛!')
             this.getMesOrderSearch()
@@ -2989,13 +3533,17 @@
       }
       const { data: res } = await UpdateMesOrderStepSearch(data)
       this.dialogForm.mesmaxqty = res.canupdate_qty
-
       if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
         if (!this.dialogForm.routecode) {
           await this.getPartcodeChangeDialog()
+        } else {
+          const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
+          this.routecodeArr = res
         }
 
         if (res.stepdata.length > 0) {
+          this.stepTableData = []
+          this.stepSelectedValue = []
           res.stepdata.forEach(i => {
             this.stepTableData.push(
               {
@@ -3783,6 +4331,18 @@
     stepSelectedValueChange(val) {
       // console.log(val, 123)
     },
+    stepSelectedValueChangeBatchUpdate(val, index) {
+      console.log(val, index)
+      this.formData3[index].stepTableData = []
+
+      val.forEach(i => {
+        this.formData3[index].stepTableData.push({
+          stepcode: i,
+          stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
+          stepprice: 0
+        })
+      })
+    },
     getSummaries(param) {
       const { columns, data } = param
       const sums = []
@@ -3824,8 +4384,8 @@
 <style lang="scss" scoped>
 $main_color: #42b983;
 
-.stepSelectedValueClass{
-  ::v-deep input{
+.stepSelectedValueClass {
+  ::v-deep input {
     //min-height: 34px !important;
     height: 68px !important;
   }
@@ -4128,6 +4688,14 @@
     height: 100% !important;
   }
 }
+
+.customDiv {
+  ::v-deep .el-divider:first-child {
+    width: 120%;
+    margin-left: -10%;
+  }
+}
+
 </style>
 <style>
 
@@ -4141,3 +4709,4 @@
   color: #fff !important;
   background: #42b983 !important;
 }
+</style>

--
Gitblit v1.9.3