From eaff2fbd473362115c8c45e22b86b2ecb73e5a97 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 10 九月 2026 15:17:12 +0800
Subject: [PATCH] 新疆——新聚lims 1.标准库层级需要修改层级,行业-标准,总共两级;实验室换成行业 2.每个标准下的检验项列表加一个搜索查询功能

---
 src/views/business/inspectionTask/inspection.vue |  683 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 500 insertions(+), 183 deletions(-)

diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 512b516..8b4c763 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -1,7 +1,7 @@
 <template>
   <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
     <el-row class="title">
-      <el-col :span="8" style="text-align: left">
+      <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left">
         <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
           style="text-align: right; padding-top: 0; display: inline">
           <el-form-item label="娓╁害:" style="margin-bottom: 0">
@@ -16,10 +16,11 @@
           </el-form-item>
         </el-form>
       </el-col>
-      <el-col :span="16" style="text-align: right">
+      <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right">
+        <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS鐗╂枡灞炴�ф洿鏂�</el-button>
         <el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button>
         <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
-        <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary"
+        <el-button v-if="state == 1 && [0,1].includes(Number(typeSource))" size="small" type="primary"
           @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button>
         <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">鏍峰搧鍒囨崲</el-button>
         <!--        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>-->
@@ -32,49 +33,94 @@
       </el-col>
     </el-row>
     <div class="search">
-      <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">
-        <el-form-item label="濮旀墭缂栧彿:">
-          <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="鏍峰搧缂栧彿:">
-          <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">
-            <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-          </el-tooltip>
-        </el-form-item>
-        <el-form-item label="鏍峰搧鍚嶇О:">
-          <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="鏍峰搧鏁伴噺:">
-          <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="鏍峰搧鍨嬪彿:">
-          <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="涓嬪彂鏃堕棿:">
-          <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="绱ф�ョ▼搴�:">
-          <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="绾﹀畾鏃堕棿:">
-          <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">
-          <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">
-          <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">
-          <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
-        </el-form-item>
-        <el-form-item label="澶囨敞:">
-          <!--          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>-->
+<!--      <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">-->
+<!--        <el-form-item label="濮旀墭缂栧彿:">-->
+<!--          <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="鏍峰搧缂栧彿:">-->
+<!--          <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">-->
+<!--            <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--          </el-tooltip>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="鏍峰搧鍚嶇О:">-->
+<!--          <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="鏍峰搧鏁伴噺:">-->
+<!--          <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="鏍峰搧鍨嬪彿:">-->
+<!--          <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="涓嬪彂鏃堕棿:">-->
+<!--          <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="绱ф�ョ▼搴�:">-->
+<!--          <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="绾﹀畾鏃堕棿:">-->
+<!--          <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">-->
+<!--          <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">-->
+<!--          <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">-->
+<!--          <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="澶囨敞:">-->
+<!--          &lt;!&ndash;          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>&ndash;&gt;-->
+<!--          <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"-->
+<!--            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>-->
+<!--          &lt;!&ndash; <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> &ndash;&gt;-->
+<!--        </el-form-item>-->
+<!--        <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">-->
+<!--          <el-form-item label="澶栨姢棰滆壊:">-->
+<!--            <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="缁濈紭棰滆壊:">-->
+<!--            <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="鐩樺彿:">-->
+<!--            <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>-->
+<!--          </el-form-item>-->
+<!--        </template>-->
+<!--      </el-form>-->
+      <el-descriptions title="妫�楠屽崟姒傚喌" :column="4" border>
+        <template v-if="insOrder.ifsOrderType">
+          <el-descriptions-item label="闆朵欢鍙�">{{insOrder.partNo}}</el-descriptions-item>
+          <el-descriptions-item label="闆朵欢鍚嶇О">{{insOrder.partDetail}}</el-descriptions-item>
+          <el-descriptions-item label="鎵规鍙�">{{ insOrder.lotBatchNo }}</el-descriptions-item>
+          <el-descriptions-item label="鏍峰搧鍨嬪彿" >{{currentSample.model}}</el-descriptions-item>
+          <el-descriptions-item label="鎶芥鏁伴噺">{{insOrder.testQuantity}}</el-descriptions-item>
+          <el-descriptions-item label="鍘傚瀵嗗害">{{supplierDensity}}</el-descriptions-item>
+          <template v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'">
+            <el-descriptions-item label="杞藉叿缂栧彿">{{insOrder.drumNo}}</el-descriptions-item>
+            <el-descriptions-item label="璧峰绫虫爣(km)">{{insOrder.startMeterMark}}</el-descriptions-item>
+            <el-descriptions-item label="鎴绫虫爣(km)">{{insOrder.endMeterMark}}</el-descriptions-item>
+            <el-descriptions-item label="鍏ュ簱闀垮害(km)">{{calcInbondLength(insOrder.startMeterMark,insOrder.endMeterMark)}}</el-descriptions-item>
+            <el-descriptions-item label="缁濈紭棰滆壊">{{insOrder.insulationColor}}</el-descriptions-item>
+            <el-descriptions-item label="澶栨姢棰滆壊">{{insOrder.outerColor}}</el-descriptions-item>
+            <el-descriptions-item label="鍗板瓧淇℃伅">{{insOrder.letteringInfo}}</el-descriptions-item>
+          </template>
+        </template>
+        <template v-else>
+          <el-descriptions-item label="濮旀墭缂栧彿">{{ insOrder.entrustCode }}</el-descriptions-item>
+          <el-descriptions-item label="鏍峰搧缂栧彿">{{ currentSample.sampleCode }}</el-descriptions-item>
+          <el-descriptions-item label="鏍峰搧鍚嶇О">{{ currentSample.sample }}</el-descriptions-item>
+          <el-descriptions-item label="鏍峰搧鏁伴噺">{{ sampleProduct.length }}</el-descriptions-item>
+          <el-descriptions-item label="鏍峰搧鍨嬪彿">{{ currentSample.model }}</el-descriptions-item>
+          <el-descriptions-item label="涓嬪彂鏃堕棿">{{ insOrder.sendTime }}</el-descriptions-item>
+          <el-descriptions-item label="绱ф�ョ▼搴�">{{ insOrder.typeName }}</el-descriptions-item>
+          <el-descriptions-item label="绾﹀畾鏃堕棿">{{ insOrder.appointed }}</el-descriptions-item>
+        </template>
+        <el-descriptions-item label="褰撳墠鏍峰搧浣嶆暟"><el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag></el-descriptions-item>
+        <el-descriptions-item label="澶囨敞">
           <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"
-            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
-          <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
-        </el-form-item>
-      </el-form>
+                    @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
+        </el-descriptions-item>
+      </el-descriptions>
     </div>
     <div class="center">
       <div class="search" style="
@@ -98,7 +144,7 @@
           <el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="璇烽�夋嫨" size="small"
             @change="(m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
               " @focus="getCableTag(currentSample.id)">
-            <el-option v-for="item in cableTagList" :key="item.cableTag" :label="item.cableTag" :value="item.cableTag">
+            <el-option v-for="(item, index) in cableTagList" :key="index" :label="item.cableTag" :value="item.cableTag">
               <span style="float: left">{{ item.cableTag }}</span>
               <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
                 type="danger">鏈</el-tag>
@@ -113,7 +159,7 @@
             size="small" @change="(m) =>
               handleChangeCableTag(currentSample.id, 0, 'repetitionTag', m)
               " @focus="getRepetitionTag(currentSample.id)">
-            <el-option v-for="item in repetitionTagList" :key="item.repetitionTag" :label="item.radius"
+            <el-option v-for="(item, index) in repetitionTagList" :key="index" :label="item.radius"
               :value="item.repetitionTag">
               <span style="float: left">{{ item.radius }}</span>
               <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
@@ -127,7 +173,7 @@
           <span v-if="typeSource == '1'">&nbsp;&nbsp;寰呮楠屾暟閲忥細</span>
           <el-select v-if="typeSource == '1'" v-model="rawMaterialTag" placeholder="璇烽�夋嫨" size="small" @change="(m) => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)
             " @focus="getRawMaterialTag(currentSample.id)">
-            <el-option v-for="item in rawMaterialTagList" :key="item.rawMaterialTag" :label="item.rawMaterialTag"
+            <el-option v-for="(item, index) in rawMaterialTagList" :key="index" :label="item.rawMaterialTag"
               :value="item.rawMaterialTag">
               <span style="float: left">{{ item.rawMaterialTag }}</span>
               <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
@@ -264,7 +310,7 @@
                     <template v-else-if="
                       n.v.ps != undefined && n.v.ps.value === '璁惧鍚嶇О'
                     ">
-                      <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple
+                      <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple clearable
                         placeholder="璁惧" remote @change="(val) => changeEquip(val, n)"
                         @visible-change="(e) => getEquipOptions(e, n.i)">
                         <el-option v-for="item in equipOptions" :key="item.value" :label="item.label"
@@ -401,6 +447,17 @@
           </el-select>
         </div>
       </div>
+      <div class="body" style="display: flex; padding: 10px; align-items: center">
+        <div class="search_label" style="width: 150px">
+          <span class="required-span">*</span>鎶ュ憡绫诲瀷
+        </div>
+        <div class="search_input" style="width: 100%">
+          <el-select v-model="reportType" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
+            <el-option label="妫�娴嬫姤鍛�" :value="0"></el-option>
+            <el-option label="妫�楠屾姤鍛�" :value="1"></el-option>
+          </el-select>
+        </div>
+      </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="addVerifyDia = false">鍙� 娑�</el-button>
         <el-button :loading="submitLoading" type="primary" @click="submit()">纭� 瀹�</el-button>
@@ -501,17 +558,65 @@
         <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button>
       </span>
     </el-dialog>
+    <!-- 娣诲姞涓嶅悎鏍煎娴嬪脊妗�-->
     <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
       @resetAddUnPass="resetAddUnPass"></add-un-pass>
+    <!-- 涓嶅悎鏍煎鐞嗗脊妗�-->
     <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
       @resetForm="resetForm"></UnPassDialog>
+    <!-- 涓嶅悎鏍煎娴嬪脊妗�-->
     <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
+                    :cableTag="temCableTag" :repetitionTag="repetitionTag"
       :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
       :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
+    <!-- 杩涜揣楠岃瘉寮规-->
     <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
       :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
     <!--鏌ョ湅宸ユ椂寮规-->
     <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
+    <!--    IFS鐗╂枡灞炴�х紪杈戝脊妗�-->
+    <el-dialog
+      title="鏇存柊IFS搴撳瓨鐗╂枡鎵规灞炴��"
+      :visible.sync="ifsMaterialPropsVisible"
+      width="20%">
+      <el-form style="width:100%" :model="ifsMaterialPropsForm">
+        <el-form-item label="杞藉叿缂栧彿(Attr1):">
+          <el-input placeholder="杞藉叿缂栧彿" size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input>
+        </el-form-item>
+        <el-form-item label="璧峰绫虫爣(Attr2):">
+          <el-input @blur="validateQuality()" placeholder="璧峰绫虫爣" size="small" v-model="ifsMaterialPropsForm.startMeterMark">
+            <span slot="suffix">km</span>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鎴绫虫爣(Attr3):">
+          <el-input @blur="validateQuality()" placeholder="鎴绫虫爣" size="small" v-model="ifsMaterialPropsForm.endMeterMark">
+            <span slot="suffix">km</span>
+          </el-input>
+        </el-form-item>
+        <!--        <el-form-item label="鍏ュ簱闀垮害">-->
+        <!--          <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>-->
+        <!--        </el-form-item>-->
+        <el-form-item label="澶栨姢棰滆壊(Attr4):">
+          <el-select size="small" v-model="ifsMaterialPropsForm.outerColor">
+            <el-option v-for="(item,index) in outerColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="缁濈紭棰滆壊(Attr5):">
+          <el-select size="small" v-model="ifsMaterialPropsForm.insulationColor">
+            <el-option v-for="(item,index) in insulationColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鍗板瓧淇℃伅(Attr8):">
+          <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="璇烽�夋嫨">
+            <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="closePartPropDialog()">鍙� 娑�</el-button>
+    <el-button type="primary" @click="saveOrUpdatePartProp()">纭� 瀹�</el-button>
+  </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -522,6 +627,7 @@
 import AddUnPass from "../unpass/components/addUnPass.vue";
 import InspectionWord from "./components/InspectionWord.vue";
 import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
+import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js";
 import {
   doInsOrder,
   getCableTag,
@@ -541,11 +647,12 @@
   delfile,
   inspectionOrderDetailsTaskSwitching
 } from "@/api/business/inspectionTask.js";
-import InspectionWorker from '../../../workers/InspectionWorker.worker';
-import DataWorker from '../../../workers/DataWorker.worker';
+import InspectionWorker from '@/workers/InspectionWorker.worker.js';
+import DataWorker from '@/workers/DataWorker.worker.js';
 import html2canvas from "html2canvas";
 import { mapGetters } from "vuex";
 import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
+import {getDicts} from "@/api/system/dict/data";
 export default {
   name: 'Inspection',
   components: {
@@ -558,6 +665,21 @@
   },
   data() {
     return {
+      outerColorList:[],
+      insulationColorList:[],
+      letteringInfoList: [],
+      ifsMaterialPropsForm:{
+        id:null,
+        ifsInventoryId: null,
+        drumNo: '', // 杞藉叿缂栧彿
+        startMeterMark: '', // 璧峰绫虫爣
+        endMeterMark: '', // 鎴绫虫爣
+        insulationColor: '', // 缁濈紭棰滆壊
+        outerColor: '', // 澶栨姢棰滆壊
+        inboundLength: '', // 鍏ュ簱闀垮害
+        letteringInfo: '', // 鍗板瓧淇℃伅
+      },
+      ifsMaterialPropsVisible:false,
       sonLaboratory: null,
       orderId: null,
       state: null,
@@ -610,6 +732,7 @@
       widthList: [],
       addVerifyDia: false,
       verifyUser: null,
+      reportType: null,
       personList: [],
       enumList: [],
       tableLoading: false,
@@ -633,6 +756,8 @@
       result: null,
       worker: null,
       worker0: null,
+      // 妫�楠屽�兼寜瑙﹀彂椤哄簭涓茶淇濆瓨锛岄伩鍏嶅悓涓�妫�楠岄」鐨勬棫璇锋眰瑕嗙洊鏂拌姹傘��
+      saveQueue: null,
       wareLength: [],
       dataAcquisitionInfo: {},
       dataAcquisitionInfoNew: {},
@@ -730,7 +855,6 @@
         size: 10,
         current: 0,
       },
-      tableLoading: false,
       // 鏂囦欢鍒楄〃鐩稿叧--缁撴潫
       // 浠诲姟鍒囨崲鍒楄〃--寮�濮�
       tableData0: [],
@@ -765,6 +889,7 @@
       },
       tableLoading0: false,
       // 浠诲姟鍒囨崲鍒楄〃--缁撴潫
+      isSplit: 0, // 鏄惁鏄媶鍗曡繃鏉ョ殑
     };
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -775,7 +900,8 @@
     },
   },
   created() {
-    let { sonLaboratory, orderId, state, inspectorList, typeSource } =
+    this.saveQueue = Promise.resolve();
+    let { sonLaboratory, orderId, state, inspectorList, typeSource,isSplit } =
       this.$route.query;
     this.sonLaboratory = sonLaboratory;
     this.orderId = orderId;
@@ -783,6 +909,7 @@
     this.state = state;
     this.inspectorList = inspectorList;
     this.typeSource = typeSource;
+    this.isSplit = isSplit;
   },
   mounted() {
     this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
@@ -808,8 +935,9 @@
       this.refreshView()
     },
     // 鐩戝惉褰撳墠妯℃澘鍙樺寲
-    currentTable(val1, val0) {
+    async currentTable(val1, val0) {
       if (val0 != null && val1 != val0) {
+        await this.waitForPendingSaves();
         if (this.changeType && this.changeType > 0) {
           // 濡傛灉鏄厜绾ゃ�佸厜绾ゅ甫锛屽垯涓嶆墽琛屼笅闈㈡搷浣�
           return;
@@ -873,6 +1001,87 @@
     this.stopWorker();
   },
   methods: {
+    validateQuality(){
+      let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark));
+      let testQuantity = Number(this.insOrder.testQuantity);
+      if(inboundLength!=null && testQuantity!==inboundLength){
+        this.$message.warning(`鍏ュ簱闀垮害(${inboundLength}km)涓庢楠屾暟閲�(${testQuantity}km)涓嶇锛岃纭锛乣);
+      }
+    },
+    calcInbondLength(startMeterMark,endMeterMark){
+      let inboundLength = null;
+      if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){
+        let minus = this.$Big(endMeterMark).minus(this.$Big(startMeterMark));
+        inboundLength = Math.abs(minus)
+      }
+      return inboundLength;
+    },
+    getLetteringInfoDicts(){
+      getDicts("lettering_info_type").then(res=>{
+        if(res.code==200){
+          this.letteringInfoList = res.data
+        }
+      })
+    },
+    getInsulationColorDicts(){
+      getDicts("insulation_color_type").then(res=>{
+        if(res.code==200){
+          this.insulationColorList = res.data
+        }
+      })
+    },
+    getOuterColorDicts(){
+      getDicts("outer_color_type").then(res=>{
+        if(res.code==200){
+          this.outerColorList = res.data
+        }
+      })
+    },
+    closePartPropDialog(){
+      this.ifsMaterialPropsForm = {
+        id:null,
+        ifsInventoryId: null,
+        drumNo: '', // 杞藉叿缂栧彿
+        startMeterMark: '', // 璧峰绫虫爣
+        endMeterMark: '', // 鎴绫虫爣
+        insulationColor: '', // 缁濈紭棰滆壊
+        outerColor: '', // 澶栨姢棰滆壊
+        inboundLength: '', // 鍏ュ簱闀垮害
+        letteringInfo: '', // 鍗板瓧淇℃伅
+      }
+      this.ifsMaterialPropsVisible = false;
+    },
+    getPartProps(ifsId){
+      getOneByIfsId(ifsId).then((res)=>{
+        if(res.code==200 && res.data){
+          this.ifsMaterialPropsForm = res.data;
+        }
+      })
+    },
+    saveOrUpdatePartProp(){
+      this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId
+      saveOrUpdateProps({
+        ...this.ifsMaterialPropsForm,
+        partNo: this.insOrder.partNo,
+        lotBatchNo: this.insOrder.lotBatchNo,
+      }).then((res)=>{
+        if(res.code==200){
+          this.$message.success("淇濆瓨鎴愬姛");
+          this.ifsMaterialPropsVisible = false;
+          this.refreshView()
+        }
+      })
+    },
+    //鎵撳紑IFS鐗╂枡灞炴�у脊妗�
+    showMaterialPropsDialog(){
+      this.getPartProps(this.insOrder.ifsInventoryId)
+      this.getOuterColorDicts()
+      this.getInsulationColorDicts()
+      this.getLetteringInfoDicts()
+      this.$nextTick(()=>{
+        this.ifsMaterialPropsVisible = true;
+      })
+    },
     // 鏂囦欢绠$悊--寮�濮�
     getList() {
       this.tableLoading = true;
@@ -932,13 +1141,18 @@
       this.checkUser = "";
     },
     // 鍒锋柊椤甸潰
-    refreshView() {
+    async refreshView() {
+      await this.waitForPendingSaves();
       this.loading = true;
       doInsOrder({
         id: this.id,
         laboratory: this.sonLaboratory,
       }).then(async (res) => {
         this.insOrder = res.data.insOrder;
+        if(res.data.insOrder.ifsOrderType==='02wg'){
+          //鏌ヨ闆朵欢灞炴��
+          this.getPartProps(res.data.insOrder.ifsInventoryId)
+        }
         this.supplierDensity = res.data.supplierDensity;
         this.getList()
         this.urgentList.forEach((m) => {
@@ -1038,8 +1252,9 @@
         id: this.currentSample.id,
         type: this.type,
         laboratory: this.sonLaboratory,
-        cableTag: "",
+        cableTag: this.temCableTag,
         rawMaterialTag: this.rawMaterialTag,
+        repetitionTag: this.repetitionTag,
       };
       this.$nextTick(() => {
         this.$refs.addUnPassDialog.getInsOrder(info);
@@ -1529,6 +1744,7 @@
     },
     // 鍒囨崲鏍峰搧
     async handleChangeSample(row, column, event) {
+      await this.waitForPendingSaves();
       // 鍒濆鍖栨暟鎹�
       this.param = {};
       this.sampleVisible = false;
@@ -1635,20 +1851,6 @@
         this.comparisonList = this.dictToValue(response.data);
       });
     },
-    // 鑾峰彇妫�楠屽�间负涓嬫媺鏃剁殑涓嬫媺鍒楄〃
-    // selectEnumByCategoryOfSelect(val) {
-    //   this.enumList = [];
-    //   if (val === undefined || val === null) {
-    //     return;
-    //   }
-    //   this.$axios
-    //     .post(this.$api.enums.selectEnumByCategory, {
-    //       category: val,
-    //     })
-    //     .then((res) => {
-    //       this.enumList = res.data;
-    //     });
-    // },
     tableRowClassName({ row, rowIndex }) {
       row.index = rowIndex + 1;
     },
@@ -1717,6 +1919,24 @@
     handleTableData() {
       this.excelMethodList = []; //excel鍑芥暟鍒楄〃
       this.widthList = this.tableList[0].style.columnlen; //椤甸潰瀹藉害--鏍规嵁妯℃澘鏉ョ殑
+      // 瀵圭収鎺ュ彛杩斿洖鐨勬楠岄」妯℃澘 ID 涓庨〉闈㈠疄闄呭弬涓庡尮閰嶇殑妯℃澘 ID銆�
+      this.tableList.forEach((template) => {
+        console.log("[templateId鏍稿]", {
+          sampleId: this.currentSample.id,
+          currentTable: this.currentTable,
+          templateName: template.templateName,
+        });
+        console.table(this.currentSample.insProduct.map((product) => ({
+          妫�楠岄」ID: product.id,
+          妫�楠岄」: product.inspectionItem,
+          妫�楠屽瓙椤�: product.inspectionItemSubclass,
+          "妫�楠岄」templateId锛堟帴鍙h繑鍥烇級": product.templateId,
+          妫�楠岄」ID绫诲瀷: typeof product.templateId,
+          "褰撳墠妯℃澘templateId": template.templateId,
+          妯℃澘ID绫诲瀷: typeof template.templateId,
+          "鏄惁涓�鑷达紙涓ユ牸姣旇緝锛�": product.templateId === template.templateId,
+        })));
+      });
       // 鏈寰幆涓昏鍋氶〉闈㈡覆鏌撳眰闈㈢殑澶勭悊--鍗曞厓鏍煎悎骞堕澶勭悊
       this.tableList.forEach((a) => {
         let mcList = a.template.filter(
@@ -1921,6 +2141,37 @@
                 count2++;
               }
               if (count2 == this.currentSample.insProduct.length) {
+                console.warn("[妯℃澘琛屾湭鍖归厤] 鍗冲皢闅愯棌璇ヨ", {
+                  sampleId: this.currentSample.id,
+                  templateId: a.templateId,
+                  templateName: a.templateName,
+                  妯℃澘琛屽彿: b.r + 1,
+                  妯℃澘鎷兼帴鍚嶇О: str,
+                  妯℃澘鏍囪鍗曞厓鏍�: a.template
+                    .filter((cell) => cell.r === b.r && cell.v.ps != undefined)
+                    .map((cell) => ({
+                      鍒楀彿: cell.c + 1,
+                      鏍囪: cell.v.ps.value,
+                      鏂囧瓧: cell.v.v,
+                    })),
+                });
+                console.table(this.currentSample.insProduct
+                  .filter((product) => product.templateId === a.templateId)
+                  .map((product) => {
+                    const name = [product.inspectionItemClass, product.inspectionItem,
+                      product.inspectionItemSubclass]
+                      .map((value) => value == null ? "" : value.replace(/\s*/g, ""))
+                      .join("");
+                    return {
+                      妫�楠岄」ID: product.id,
+                      妫�楠岄」鍒嗙被: product.inspectionItemClass,
+                      妫�楠岄」: product.inspectionItem,
+                      妫�楠屽瓙椤�: product.inspectionItemSubclass,
+                      鎺ュ彛鎷兼帴鍚嶇О: name,
+                      妯℃澘鎷兼帴鍚嶇О: str,
+                      鍚嶇О鏄惁涓�鑷�: name === str,
+                    };
+                  }));
                 dels.add(b.r);
               }
             }
@@ -2085,9 +2336,11 @@
       });
       // 鏈寰幆涓昏鏄椤甸潰鍙婂悗绔紶鍙傝繘琛屽垵濮嬪寲璧嬪��
       this.currentSample.insProduct.forEach(async (a) => {
+        // 灏氭棤妫�楠岀粨鏋滄椂锛屼繚鐣欏墠闈㈠垵濮嬪寲鐨勭┖鍊笺��
+        const savedResult = a.insProductResult || {};
         try {
           // 璁$畻鍊艰祴鍊�
-          let comValue = JSON.parse(a.insProductResult.comValue);
+          let comValue = JSON.parse(savedResult.comValue || "[]");
           for (var i = 0; i < comValue.length; i++) {
             if (
               this.param[a.id].comValue.find(
@@ -2112,7 +2365,7 @@
         } catch (e) { }
         try {
           // 妫�楠屽�艰祴鍊�
-          let insValue = JSON.parse(a.insProductResult.insValue);
+          let insValue = JSON.parse(savedResult.insValue || "[]");
           for (let i = 0; i < insValue.length; i++) {
             if (
               this.param[a.id].insValue.find(
@@ -2137,7 +2390,7 @@
         } catch (e) { }
         try {
           // 璁惧缂栧彿璧嬪��
-          let equipValue = JSON.parse(a.insProductResult.equipValue);
+          let equipValue = JSON.parse(savedResult.equipValue || "[]");
           for (let i = 0; i < equipValue.length; i++) {
             // 鏅�氳澶囪祴鍊�
             this.param[a.id].equipValue[i].v.v = equipValue[i].v;
@@ -2145,7 +2398,7 @@
         } catch (e) { }
         try {
           // 璁惧鍚嶇О璧嬪��
-          let equipName = JSON.parse(a.insProductResult.equipName);
+          let equipName = JSON.parse(savedResult.equipName || "[]");
           for (let i = 0; i < equipName.length; i++) {
             equipName[i].v !== "" &&
               equipName[i].v.map((val) => {
@@ -2216,26 +2469,30 @@
             currentInsItem: n,
           })
         );
+        // 鍏堜繚瀛樹富绾跨▼涓凡缁忚緭鍏ョ殑鍘熷鍊笺�俉orker 瀹屾垚璁$畻鍚庝細鍐嶆鍏ラ槦淇濆瓨璁$畻缁撴灉銆�
+        // 杩欐牱鍗充娇鐢ㄦ埛杈撳叆鍚庣珛鍗冲埛鏂般�佸垏鎹㈡垨杩斿洖锛屾渶鍚庣紪杈戠殑鍗曞厓鏍间篃涓嶄細涓㈠け銆�
+        if (currentInsItemId) {
+          this.saveInsContext(currentInsItemId);
+        }
       } catch (error) {
         console.log(444, error);
       }
 
       // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋�
       this.worker.onmessage = (event) => {
-        this.result = JSON.parse(event.data);
-        switch (this.result.method) {
+        const workerResult = JSON.parse(event.data);
+        this.result = workerResult;
+        switch (workerResult.method) {
           case "saveInsContext":
             this.$nextTick(() => {
+              const resultValue = workerResult.value;
               // this.$delete(this.tableList[0],'arr')
               this.$set(
                 this.tableList[0],
                 "arr",
-                this.result.value.tableList[0].arr
+                resultValue.tableList[0].arr
               );
-              this.param = this.result.value.param;
-              if (this.result.value.currentInsItemId) {
-                currentInsItemId = this.result.value.currentInsItemId;
-              }
+              this.param = resultValue.param;
               // 鐗规畩澶勭悊涓�涓嬬粨璁�,浼氭湁杩欑鐗规畩鎯呭喌
               for (var i in this.param) {
                 if (
@@ -2250,23 +2507,28 @@
                   }
                 }
               }
-              this.saveInsContext(currentInsItemId);
+              const sourceInsItemId =
+                resultValue.sourceInsItemId != null &&
+                  resultValue.sourceInsItemId !== ""
+                  ? resultValue.sourceInsItemId
+                  : currentInsItemId;
+              this.saveInsContext([
+                sourceInsItemId,
+                resultValue.currentInsItemId,
+              ]);
             });
             break;
           case "tableList":
             this.$nextTick(() => {
               // 鏇存柊鏁版嵁
               this.$delete(this.tableList[0], "arr");
-              this.$set(this.tableList[0], "arr", this.result.value[0].arr);
+              this.$set(this.tableList[0], "arr", workerResult.value[0].arr);
               // this.param = this.result.value.param
-              if (this.result.value.currentInsItem) {
-                currentInsItemId = this.result.value.currentInsItem.i;
-              }
             });
             break;
           case "getCurrentInsProduct":
             // 鏇存柊椤甸潰鏁版嵁
-            this.getCurrentInsProduct(this.result.value);
+            this.getCurrentInsProduct(workerResult.value);
             break;
         }
       };
@@ -2559,59 +2821,90 @@
       this.$refs.viewManHourDia.showDialog(this.id, 99);
     },
     openAddVerifyDia() {
+      this.reportType = null;
       this.addVerifyDia = true;
     },
-    submit() {
+    confirmSubmit(registerInsResults){
+      submitPlan({
+        orderId: this.orderId,
+        laboratory: this.sonLaboratory,
+        verifyUser: this.verifyUser,
+        entrustCode: this.insOrder.entrustCode,
+        registerInsResults: this.reportType === 1 && registerInsResults,
+        reportType: this.reportType
+      }).then((res) => {
+        if (res.code === 200) {
+          this.$message.success("鎿嶄綔鎴愬姛");
+          this.goback();
+          this.submitLoading = false;
+          this.addVerifyDia = false;
+        }
+      })
+        .catch((error) => {
+          console.error(error);
+          this.submitLoading = false;
+        });
+    },
+    async submit() {
       if (this.verifyUser === null || this.verifyUser === "") {
         this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
         return;
       }
-      if (!this.otherForm.humidity) {
+      if (this.reportType === null || this.reportType === "") {
+        this.$message.error("璇烽�夋嫨鎶ュ憡绫诲瀷");
+        return;
+      }
+      if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') {
         this.$message.error("璇疯緭鍏ユ箍搴�");
         return;
       }
-      if (!this.otherForm.temperature) {
+      if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') {
         this.$message.error("璇疯緭鍏ユ俯搴�");
         return;
       }
+      if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') {
+        this.$message.error("璇峰~鍐橧FS搴撳瓨鐗╂枡鎵规灞炴��");
+        return;
+      }
+      await this.waitForPendingSaves();
       this.submitLoading = true;
       checkSubmitPlan({
         orderId: this.orderId,
         laboratory: this.sonLaboratory,
+        reportType: this.reportType,
       }).then((res) => {
         if (res.code === 200) {
-          if (!res.data || res.data.length == 0) {
+          if (!res.data || res.data.errorMsg.length == 0) {
             this.submitLoading = true;
-            submitPlan({
-              orderId: this.orderId,
-              laboratory: this.sonLaboratory,
-              verifyUser: this.verifyUser,
-              entrustCode: this.insOrder.entrustCode,
-            }).then((res) => {
-              if (res.code === 200) {
-                this.$message.success("鎿嶄綔鎴愬姛");
-                this.goback();
-                this.submitLoading = false;
-                this.addVerifyDia = false;
-              }
-            })
-              .catch((error) => {
-                console.error(error);
-                this.submitLoading = false;
+            //妫�楠岀被鍨嬩负鍘熸潗鏂�
+            if(this.reportType === 1 && this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){
+              const htmlStr = "鏄惁鐧昏IFS閲囪喘妫�楠岀粨鏋滃苟绉诲簱锛熻鎿嶄綔浼氱櫥璁�<span style='color:#ff4949'>鍚屼竴闆朵欢鍚屼竴璁㈠崟鐨勬墍鏈夋媶鍒嗘壒娆�</span>锛岃璋ㄦ厧閫夋嫨銆�"
+              this.$confirm(htmlStr, '鎻愮ず', {
+                confirmButtonText: '鏄�',
+                cancelButtonText: '鍚�',
+                type: 'warning',
+                dangerouslyUseHTMLString: true
+              }).then(() => {
+                this.confirmSubmit(true)
+              }).catch(() => {
+                this.confirmSubmit(false)
               });
+            }else{
+              this.confirmSubmit(true)
+            }
           } else {
             let newData = [];
             const h = this.$createElement;
-            for (let i in res.data) {
-              const lastChar = res.data[i].slice(-1);
+            for (let i in res.data.errorMsg) {
+              const lastChar = res.data.errorMsg[i].slice(-1);
               if (lastChar == "-") {
-                res.data[i] = res.data[i].slice(0, -1);
+                res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
               }
               newData.push(
                 h(
                   "p",
                   { style: "font-size: 14px;color: red;" },
-                  Number(i) + 1 + "銆�" + res.data[i]
+                  Number(i) + 1 + "銆�" + res.data.errorMsg[i]
                 )
               );
             }
@@ -2634,22 +2927,23 @@
             })
               .then(() => {
                 this.submitLoading = true;
-                submitPlan({
-                  orderId: this.orderId,
-                  laboratory: this.sonLaboratory,
-                  verifyUser: this.verifyUser,
-                }).then((res) => {
-                  if (res.code === 200) {
-                    this.$message.success("鎿嶄綔鎴愬姛");
-                    this.addVerifyDia = false;
-                    this.goback();
-                  }
-                  this.submitLoading = false;
-                })
-                  .catch((error) => {
-                    console.error(error);
-                    this.submitLoading = false;
-                  });
+                this.confirmSubmit(false)
+                // submitPlan({
+                //   orderId: this.orderId,
+                //   laboratory: this.sonLaboratory,
+                //   verifyUser: this.verifyUser,
+                // }).then((res) => {
+                //   if (res.code === 200) {
+                //     this.$message.success("鎿嶄綔鎴愬姛");
+                //     this.addVerifyDia = false;
+                //     this.goback();
+                //   }
+                //   this.submitLoading = false;
+                // })
+                //   .catch((error) => {
+                //     console.error(error);
+                //     this.submitLoading = false;
+                //   });
               })
               .catch(() => { });
           }
@@ -2662,24 +2956,56 @@
       return;
     },
     // 缁熶竴鍦ㄨ繖閲屼繚瀛樻暟鎹�
-    saveInsContext(currentInsItemId) {
+    saveInsContext(currentInsItemIds) {
       try {
         if (this.param) {
-          let param = null;
-          if (currentInsItemId) {
-            param = { [currentInsItemId]: this.param[currentInsItemId] };
-          } else {
-            param = this.param;
+          const ids = (Array.isArray(currentInsItemIds)
+            ? currentInsItemIds
+            : [currentInsItemIds]
+          )
+            .filter((id) => id != null && id !== "")
+            .map((id) => String(id));
+          let param = this.param;
+          if (ids.length > 0) {
+            param = {};
+            [...new Set(ids)].forEach((id) => {
+              if (this.param[id]) {
+                param[id] = this.param[id];
+              }
+            });
+            if (Object.keys(param).length === 0) {
+              return;
+            }
           }
-          saveInsContext({
+          let isNoTestValue = ''
+          for (let key in param) {
+            if (param[key]) {
+              if (param[key].insValue?.length === 0) {
+                isNoTestValue = 1
+              } else {
+                isNoTestValue = ''
+              }
+            }
+          }
+          const payload = {
             param: JSON.stringify(param),
             currentTable: this.currentTable,
             sampleId: this.currentSample.id,
             orderId: this.orderId,
-            sonLaboratory: this.sonLaboratory
-          }).then((res) => {
-            this.$message.success("宸蹭繚瀛�");
-          });
+            sonLaboratory: this.sonLaboratory,
+            isNoTestValue: isNoTestValue
+          };
+          const previousSave = this.saveQueue || Promise.resolve();
+          this.saveQueue = previousSave
+            .catch(() => undefined)
+            .then(() => saveInsContext(payload))
+            .then(() => {
+              this.$message.success("宸蹭繚瀛�");
+            })
+            .catch((error) => {
+              console.error("妫�楠屾暟鎹繚瀛樺け璐�", error);
+              this.$message.error("妫�楠屾暟鎹繚瀛樺け璐ワ紝璇烽噸璇�");
+            });
           // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
           this.worker.postMessage(
             JSON.stringify({
@@ -2695,54 +3021,43 @@
         console.log(999, error);
       }
     },
+    async waitForPendingSaves() {
+      if (this.saveQueue) {
+        await this.saveQueue;
+      }
+    },
     // 璁惧鏀瑰彉
-    changeEquip(val, n, v) {
-      try {
-        // this.$set(n.v,'v',val)
-        this.tableList[0].arr.forEach((item, index) => {
-          item.forEach((m, i) => {
-            if (this.param[m.i]) {
-              this.param[m.i].state = 1;
+    changeEquip(val, n) {
+      const itemParam = this.param[n.i];
+      if (!itemParam) {
+        this.$message.error("璁惧鏈叧鑱旀楠岄」锛岃鍒锋柊椤甸潰鍚庨噸璇�");
+        return;
+      }
+      const selectedDevices = Array.isArray(val) ? [...val] : [];
+      const deviceCodes = selectedDevices.join("锛�");
+      this.$set(n.v, "v", selectedDevices);
+      // 鍚嶇О涓庣紪鐮佸崟鍏冩牸鍙兘鏁伴噺涓嶅悓锛屽垎鍒洿鏂帮紝閬垮厤涓嬫爣瓒婄晫涓柇淇濆瓨銆�
+      (itemParam.equipName || []).forEach((cell) => {
+        this.$set(cell.v, "v", [...selectedDevices]);
+      });
+      (itemParam.equipValue || []).forEach((cell) => {
+        this.$set(cell.v, "v", deviceCodes);
+      });
+      this.tableList.forEach((table) => {
+        (table.arr || []).forEach((row) => {
+          row.forEach((cell) => {
+            if (cell.i == n.i && cell.v.ps) {
+              if (cell.v.ps.value === "璁惧鍚嶇О") {
+                this.$set(cell.v, "v", [...selectedDevices]);
+              } else if (cell.v.ps.value === "璁惧缂栫爜") {
+                this.$set(cell.v, "v", deviceCodes);
+              }
             }
-            // if(m.i==n.i&&m.v.ps&&m.v.ps.value=='璁惧鍚嶇О'&&v){
-            //   this.$set(m.v,'v',v)
-            // }
           });
         });
-        for (let i in this.param) {
-          if (this.param[i].state != 1) {
-            delete this.param[i];
-          }
-        }
-        // this.equipOptions涓鸿澶囧悕绉颁笅鎷夋閫夐」鏁版嵁
-        for (let i1 in this.param[n.i].equipName) {
-          if (
-            this.param[n.i].equipName[i1].i === n.i &&
-            this.param[n.i].equipName[i1].r === n.r
-          ) {
-            this.$delete(this.param[n.i].equipValue[i1].v, "v");
-            // 灏嗘暟缁勮祴鍊肩粰璁惧缂栫爜
-            this.$set(this.param[n.i].equipValue[i1].v, "v", val.join("锛�"));
-            this.$delete(this.param[n.i].equipName[i1].v, "v");
-            // 灏嗘暟缁勮祴鍊肩粰璁惧缂栫爜
-            this.$set(this.param[n.i].equipName[i1].v, "v", val);
-            this.tableList[0].arr.forEach((item, index) => {
-              item.forEach((m) => {
-                if (m.i == n.i && m.v.ps && m.v.ps.value == "璁惧缂栫爜") {
-                  this.$set(m.v, "v", val.join("锛�"));
-                }
-                if (m.i == n.i && m.v.ps && m.v.ps.value == "璁惧鍚嶇О") {
-                  this.$set(m.v, "v", val);
-                }
-              });
-            });
-          }
-        }
-        // 淇濆瓨鏁版嵁
-        this.saveInsContext(n.i);
-      } catch (e) {
-        console.log("changeEquip----", e);
-      }
+      });
+      // 閫夋嫨銆佺Щ闄ゃ�佹竻绌哄潎鐢� change 浜嬩欢瑙﹀彂锛岀珛鍗充繚瀛樺綋鍓嶆楠岄」銆�
+      this.saveInsContext(n.i);
     },
     getAuthorizedPerson() {
       selectUserCondition({ type: 1 }).then((res) => {
@@ -2872,7 +3187,8 @@
         return v;
       }
     },
-    goback() {
+    async goback() {
+      await this.waitForPendingSaves();
       this.$router.go(-1)
     }
   },
@@ -2915,6 +3231,7 @@
   background-color: #fff;
   border-radius: 3px;
   margin-bottom: 10px;
+  padding: 10px;
 }
 
 .search .form-inline {

--
Gitblit v1.9.3