From ce247af69bdbd81f50213e637cab608ba1bb6938 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 03 十一月 2026 16:49:40 +0800
Subject: [PATCH] feat(outsourcing): 新增外协订单管理模块及配套功能优化

---
 src/api/business/outsourcingOrder.js                        |   22 
 src/views/business/outsourcingOrder/index.vue               | 1605 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/views/business/rawMaterialInspection/index.vue          |   32 
 src/views/business/inspectionTask/inspection.vue            |   20 
 src/layout/components/Sidebar/SidebarItem.vue               |   15 
 src/views/business/materialOrder/customsInspectionOrder.vue |   21 
 6 files changed, 1,692 insertions(+), 23 deletions(-)

diff --git a/src/api/business/outsourcingOrder.js b/src/api/business/outsourcingOrder.js
new file mode 100644
index 0000000..fb40adc
--- /dev/null
+++ b/src/api/business/outsourcingOrder.js
@@ -0,0 +1,22 @@
+// 澶栧崗涓嬪崟椤甸潰鐩稿叧鎺ュ彛
+import request from '@/utils/request'
+
+// 鏌ヨ澶栧崗璁㈠崟寰呬笅鍗曟暟鎹��
+export function getWarehouseSubmit(query) {
+  return request({ url: '/rawMaterialOrder/getOutsourceWarehouseSubmit', method: 'get', params: query })
+}
+
+// 鏌ヨ澶栧崗璁㈠崟妫�楠屼腑鏁版嵁銆�
+export function getIfsByStateOne(query) {
+  return request({ url: '/rawMaterialOrder/getOutsourceByStateOne', method: 'get', params: query })
+}
+
+// 鏌ヨ澶栧崗璁㈠崟宸叉楠屾暟鎹��
+export function getIfsByOver(query) {
+  return request({ url: '/rawMaterialOrder/getOutsourceByOver', method: 'get', params: query })
+}
+
+// 鏌ヨ褰撳墠澶栧崗鍒嗙被鐨勫叏閮ㄦ姤妫�鏁版嵁銆�
+export function getIfsByAll(query) {
+  return request({ url: '/rawMaterialOrder/getOutsourceByAll', method: 'get', params: query })
+}
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index 1a7b1bf..6026efe 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -3,7 +3,7 @@
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
-          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+          <item :icon="menuIcon(onlyOneChild)" :title="menuTitle(onlyOneChild)" />
         </el-menu-item>
       </app-link>
     </template>
@@ -55,6 +55,19 @@
     return {}
   },
   methods: {
+    // 鍏煎宸插垱寤轰絾灏氭湭閰嶇疆鍥炬爣鐨勫鍗忓瓙鑿滃崟銆�
+    menuIcon(menu) {
+      const icon = menu.meta.icon || (this.item.meta && this.item.meta.icon)
+      if (icon && icon !== '#') return icon
+      if (this.basePath.endsWith('/outsourcingOrder/incoming')) return 'form'
+      if (this.basePath.endsWith('/outsourcingOrder/subcontract')) return 'table'
+      return icon
+    },
+    // 渚ф爮鐪佺暐澶栧崗鐖剁洰褰曠殑閲嶅鍓嶇紑锛屼繚鐣欓〉闈㈠畬鏁村悕绉般��
+    menuTitle(menu) {
+      const title = menu.meta.title
+      return this.basePath.includes('/outsourcingOrder/') ? title.replace(/^澶栧崗璁㈠崟-/, '') : title
+    },
     hasOneShowingChild(children = [], parent) {
       if (!children) {
         children = [];
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index bf77e81..6db42c7 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -6,7 +6,7 @@
   >
     <el-row class="title">
       <el-col
-        v-if="insOrder.ifsOrderType !== '02wg'"
+        v-if="effectiveOrderType !== '02wg'"
         :span="8"
         style="text-align: left"
       >
@@ -42,11 +42,11 @@
         </el-form>
       </el-col>
       <el-col
-        :span="insOrder.ifsOrderType !== '02wg' ? 16 : 24"
+        :span="effectiveOrderType !== '02wg' ? 16 : 24"
         style="text-align: right"
       >
         <el-button
-          v-if="insOrder.ifsOrderType && insOrder.ifsOrderType === '02wg'"
+          v-if="effectiveOrderType === '02wg'"
           size="small"
           type="primary"
           @click="showMaterialPropsDialog"
@@ -179,7 +179,7 @@
             supplierDensity
           }}</el-descriptions-item>
           <template
-            v-if="insOrder.ifsOrderType && insOrder.ifsOrderType === '02wg'"
+            v-if="effectiveOrderType === '02wg'"
           >
             <el-descriptions-item label="杞藉叿缂栧彿">{{
               insOrder.drumNo
@@ -1545,6 +1545,10 @@
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
     ...mapGetters(["userId"]),
+    // 浣跨敤鍚庡彴纭畾鐨勫鐞嗘祦绋嬶紝鐪熷疄閿�鍞垎绫讳粛淇濈暀鍦� ifsOrderType銆�
+    effectiveOrderType() {
+      return this.insOrder.flowOrderType || this.insOrder.ifsOrderType;
+    },
     action() {
       return this.javaApi + "/insOrderPlan/uploadFile";
     },
@@ -1835,7 +1839,7 @@
         laboratory: this.sonLaboratory,
       }).then(async (res) => {
         this.insOrder = res.data.insOrder;
-        if (res.data.insOrder.ifsOrderType === "02wg") {
+        if (this.effectiveOrderType === "02wg") {
           //鏌ヨ闆朵欢灞炴��
           this.getPartProps(res.data.insOrder.ifsInventoryId);
         }
@@ -3539,18 +3543,18 @@
         this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
         return;
       }
-      if (!this.otherForm.humidity && this.insOrder.ifsOrderType !== "02wg") {
+      if (!this.otherForm.humidity && this.effectiveOrderType !== "02wg") {
         this.$message.error("璇疯緭鍏ユ箍搴�");
         return;
       }
       if (
         !this.otherForm.temperature &&
-        this.insOrder.ifsOrderType !== "02wg"
+        this.effectiveOrderType !== "02wg"
       ) {
         this.$message.error("璇疯緭鍏ユ俯搴�");
         return;
       }
-      if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType === "02wg") {
+      if (!this.insOrder.lotPartId && this.effectiveOrderType === "02wg") {
         this.$message.error("璇峰~鍐橧FS搴撳瓨鐗╂枡鎵规灞炴��");
         return;
       }
diff --git a/src/views/business/materialOrder/customsInspectionOrder.vue b/src/views/business/materialOrder/customsInspectionOrder.vue
index 64d350e..17292ed 100644
--- a/src/views/business/materialOrder/customsInspectionOrder.vue
+++ b/src/views/business/materialOrder/customsInspectionOrder.vue
@@ -632,13 +632,8 @@
     // },
     isOutsourcing:{
       deep:  true,
-      handler(newVal){
-        if(newVal && newVal==='t'){
-          this.addObj.appointed = dateFormat(new Date(),'yyyy-MM-dd')
-          this.addObj.testQuantity = this.customsInspection.qtyArrived
-          this.addObj.orderType = '杩涘巶妫�楠�'
-          this.addObj.typeSource = 0
-        }
+      handler(){
+        this.initOrderSource()
       }
     },
     productList: {
@@ -674,6 +669,7 @@
     this.currentId = this.$route.query.currentId
     this.isReport = this.$route.query.isReport
     this.customsInspection = this.$route.query.customsInspection
+    this.initOrderSource()
     this.getInfo();
   },
   activated() {
@@ -683,12 +679,23 @@
     this.currentId = this.$route.query.currentId
     this.isReport = this.$route.query.isReport
     this.customsInspection = this.$route.query.customsInspection
+    this.initOrderSource()
     this.getInfo();
   },
   // getInfo() {
   //   this.getInfo() // 鑾峰彇鏁版嵁
   // },
   methods: {
+    // 姣忔杩涘叆涓嬪崟椤甸潰鏄庣‘璁剧疆鏉ユ簮锛岄伩鍏嶅鐢ㄧ紦瀛橀〉闈㈡椂娌跨敤涓婁竴寮犺鍗曘��
+    initOrderSource() {
+      if (this.active !== 1) return
+      this.addObj.typeSource = this.isOutsourcing === 't' ? 0 : 1
+      if (this.isOutsourcing === 't') {
+        this.addObj.appointed = dateFormat(new Date(),'yyyy-MM-dd')
+        this.addObj.testQuantity = this.customsInspection.qtyArrived
+        this.addObj.orderType = '杩涘巶妫�楠�'
+      }
+    },
     goBackAdd () {
       this.cableConfigShow = false
     },
diff --git a/src/views/business/outsourcingOrder/index.vue b/src/views/business/outsourcingOrder/index.vue
new file mode 100644
index 0000000..4185fad
--- /dev/null
+++ b/src/views/business/outsourcingOrder/index.vue
@@ -0,0 +1,1605 @@
+<template>
+  <div class="app-container">
+    <div>
+      <div class="search">
+        <el-form :model="entity" ref="entity" size="small" :inline="true">
+          <el-form-item label="IFS鍩�" prop="contract">
+            <el-select @keyup.enter.native="refreshTable" v-model="entity.contract" clearable placeholder="璇烽�夋嫨" size="small">
+              <el-option label="ZTNS" value="ZTNS"/>
+              <el-option label="KJNS" value="KJNS"/>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="鎵瑰彿" prop="updateBatchNo">
+            <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
+              @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="濮旀墭缂栧彿" prop="entrustCode" v-if="tabIndex !== 0">
+            <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
+              @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="闆朵欢鍙�" prop="partNo">
+            <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="闆朵欢鎻忚堪" prop="partDesc">
+            <el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+
+          <el-form-item label="鐗╂枡灞炴��" prop="materialProp">
+            <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%" @change="refreshTable()">
+              <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"
+                :value="dict.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label=" 渚涘簲鍟嗗悕绉�" prop="supplierName">
+            <el-input v-model="entity.supplierName" clearable placeholder="璇疯緭鍏�" size="small"
+              @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel"
+            v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+            <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small"
+              @keyup.enter.native="goSearch">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="妫�楠岀姸鎬�" prop="inspectStatus"
+            v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+            <el-select v-model="entity.inspectStatus" clearable size="small" @change="goSearch">
+              <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+            <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="閫夋嫨鏃ユ湡"
+                            :default-time="['00:00:00','23:59:59']"
+              @change="goSearch" range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="datetimerange">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 4"
+                       :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
+                       @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button>
+            <el-button size="mini" type="primary" @click="goSearch">鏌ヨ</el-button>
+            <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="table">
+        <div class="table-tab">
+          <div>
+            <ul class="tab">
+              <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:raw:await'])" @click="handleTab(0)">寰呬笅鍗�
+              </li>
+              <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:raw:testing'])" @click="handleTab(1)">妫�楠屼腑
+              </li>
+              <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:raw:check'])" @click="handleTab(2)">宸叉楠�
+              </li>
+              <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:Ifs:ByAll'])" @click="handleTab(3)">鍏ㄩ儴</li>
+            </ul>
+          </div>
+          <div>
+            <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary"
+              @click="handleOut">瀵煎嚭</el-button>
+            <el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
+          </div>
+        </div>
+        <!--寰呬笅鍗�-->
+        <div class="table">
+          <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
+            ref="tableData" :rowClassName="changeRowClass" :height="50" :more="more" key="tableData" :page="page"
+            :tableLoading="tableLoading"></lims-table>
+        </div>
+        <!--妫�楠屼腑-->
+        <div class="table">
+          <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true"
+            :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination1"
+            :height="50" :more="more" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table>
+        </div>
+        <!--宸叉楠�-->
+        <div class="table">
+          <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true"
+            :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination2"
+            :height="50" :more="more" key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table>
+        </div>
+        <!--鍏ㄩ儴-->
+        <div class="table">
+          <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true"
+            :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination3"
+            :height="50" :more="more" key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table>
+        </div>
+      </div>
+    </div>
+    <!-- 纭鍏嶆寮规 -->
+    <el-dialog :visible.sync="exemptionVisible" title="纭鍏嶆" width="42%">
+      <div style="display: flex">
+        <span style="width: 90px; line-height: 32px">瑙勬牸鍨嬪彿锛�</span>
+        <el-input v-model="exemptionInfo.partDetail" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-row>
+          <el-button @click="exemptionVisible = false">鍙� 娑�</el-button>
+          <el-button :loading="exemptionLoading" type="primary" @click="submitExemption">纭� 瀹�</el-button>
+        </el-row>
+      </span>
+    </el-dialog>
+    <!-- 鎾ら攢鎶ユ -->
+    <el-dialog :visible.sync="declareDialogVisible" title="鎶ユ鎾ら攢" width="30%">
+      <p style="font-size:16px;color:#333333">鎵瑰彿<span style="color:#34BD66">{{ this.insOrderRow.updateBatchNo
+          }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span>
+      </p>
+      <span slot="footer" class="dialog-footer">
+        <el-row>
+          <el-button @click="declareDialogVisible = false">鍙� 娑�</el-button>
+          <el-button :loading="upLoad" type="primary" @click="submitDeclare">纭� 瀹�</el-button>
+        </el-row>
+      </span>
+    </el-dialog>
+    <!-- 鎾ら攢涓嬪崟 -->
+    <el-dialog :visible.sync="quashDialogVisible" title="涓嬪崟鎾ら攢" width="30%">
+      <el-button size="small" type="primary" @click="cancelQuashOrder('enterOrderId')">鎾ら攢杩涘巶妫�楠屼笅鍗�</el-button>
+      <el-button size="small" type="primary" @click="cancelQuashOrder('quarterOrderId')">鎾ら攢瀛e害妫�楠屼笅鍗�</el-button>
+      <span slot="footer" class="dialog-footer">
+        <el-row>
+          <el-button @click="quashDialogVisible = false">鍙� 娑�</el-button>
+        </el-row>
+      </span>
+    </el-dialog>
+    <!-- 淇敼濮旀墭缂栧彿寮规 -->
+    <el-dialog :visible.sync="entrustCodeVisible" title="鎻愮ず" width="30%">
+      <el-input v-model="entrustCodeInfo.entrustCode"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="entrustCodeVisible = false">鍙� 娑�</el-button>
+        <el-button :loading="submitCodeLoading" type="primary" @click="submitCode">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+    <!--鏍囩鎵撳嵃寮规-->
+    <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog"
+      @closePrintDialog="closePrintDialog"></print-dialog>
+    <!--鏁版嵁鏌ョ湅寮规-->
+    <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" :dataDialogVisible="dataDialogVisible"
+      :dataLookInfo="dataLookInfo" @closeDataLook="closeDataLook"></data-look-visible>
+    <!--闄勪欢鏌ョ湅寮规-->
+    <files-look-visible v-if="filesDialogVisible" ref="filesDialogVisible" :filesDialogVisible="filesDialogVisible"
+      :filesLookInfo="filesLookInfo" @closeFilesLook="closeFilesLook"></files-look-visible>
+    <!--鎶ュ憡涓嬭浇寮规-->
+    <down-file-dialog v-if="downFileDialogVisible" ref="downFileDialogVisible"
+      :downFileDialogVisible="downFileDialogVisible" :downLoadInfo="downLoadInfo"
+      @closeDownFileDialog="closeDownFileDialog"></down-file-dialog>
+    <!--浜т笟閾句俊鎭煡鐪�-->
+    <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>
+    <!--妫�楠屼换鍔′俊鎭煡鐪�-->
+    <el-dialog :visible.sync="InspectInfoDialog" title="鏁版嵁鏌ョ湅" width="400px" @closed="closeInsInfoDialog">
+      <div style="margin-bottom: 8px">
+        <span style="font-size: 16px;">杩涘巶妫�楠屽師濮嬫暟鎹�</span>
+        <el-link :disabled="!insInfo.enterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px"
+          type="primary" @click="viewInsInfo0">鏌ョ湅</el-link>
+      </div>
+      <div>
+        <span style="font-size: 16px;">瀛e害妫�楠屽師濮嬫暟鎹�</span>
+        <el-link :disabled="!insInfo.quarterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px"
+          type="primary" @click="viewInsInfo1">鏌ョ湅</el-link>
+      </div>
+    </el-dialog>
+    <!--    IFS鐗╂枡灞炴�х紪杈戝脊妗�-->
+    <el-dialog
+      title="鏇存柊IFS搴撳瓨鐗╂枡鎵规灞炴��"
+      :visible.sync="ifsMaterialPropsVisible"
+      :close-on-click-modal="false"
+      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="澶栨姢棰滆壊(Attr4):">
+          <el-select style="width:100%" 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 style="width:100%" 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 style="width:100%" 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>
+
+<script>
+import PrintDialog from "@/views/business/outsourcingFinishProduct/components/printDialog.vue";
+import ShowInfo from "@/views/business/materialOrderComponents/materialOrder/showInfo.vue";
+import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
+import FilesLookVisible from "@/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue";
+import DownFileDialog from "@/views/business/materialOrderComponents/materialOrder/downFileDialog.vue";
+import limsTable from "@/components/Table/lims-table.vue";
+import {getDicts} from "@/api/system/dict/data";
+import {
+  concessionRelease,
+  getIfsByQuarter,
+  rawAllExport,
+  rawOrderRelease,
+  repealEnterRawOrder,
+  repealQuarterRawOrder,
+  revokeInspectionReport,
+  updateEntrustCode,
+  getOrderCountByIfsId
+} from "@/api/business/rawMaterialOrder";
+import { getWarehouseSubmit, getIfsByStateOne, getIfsByOver, getIfsByAll } from "@/api/business/outsourcingOrder";
+import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "OutsourcingOrder",
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog },
+  dicts: ['material_prop_type'],
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      selectedRow:{},
+      outerColorList:[],
+      insulationColorList:[],
+      letteringInfoList: [],
+      ifsMaterialPropsForm:{
+        id:null,
+        ifsInventoryId: null,
+        drumNo: '', // 杞藉叿缂栧彿
+        startMeterMark: '', // 璧峰绫虫爣
+        endMeterMark: '', // 鎴绫虫爣
+        insulationColor: '', // 缁濈紭棰滆壊
+        outerColor: '', // 澶栨姢棰滆壊
+        inboundLength: '', // 鍏ュ簱闀垮害
+        letteringInfo: '', // 鍗板瓧淇℃伅
+      },
+      ifsMaterialPropsVisible:false,
+      tableData: [],
+      tableLoading: false,
+      column: [
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
+        { label: '鎵瑰彿', prop: 'updateBatchNo' },
+        { label: '闆朵欢鍙�', prop: 'partNo' },
+        { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+        {
+          label: '鐗╂枡灞炴��',
+          prop: 'materialProp',
+          formatData: (params) => {
+            if (!params) return null
+
+            for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+              const item = this.dict.type.material_prop_type[i]
+              if (item.value == params) {
+                return item.label
+              }
+            }
+            return null
+          }
+        },
+        {
+          dataType: 'tag',
+          label: '鐗╂枡绫诲瀷',
+          prop: 'isExpire',
+          formatData: (params) => {
+            if (params == 1) {
+              return '杩囨湡鐗╂枡'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'info'
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+        { label: '鍗曚綅', prop: 'buyUnitMeas' },
+        { label: '璁㈠崟鍙�', prop: 'orderNo' },
+        { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+        {
+          dataType: 'action',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '涓嬪崟',
+              type: 'text',
+              clickFun: (row) => {
+                this.playOrder(row);
+              }
+            },
+            {
+              name: '鍏嶆',
+              type: 'text',
+              clickFun: (row) => {
+                this.exemption(row);
+              },
+            },
+            {
+              name: '鎾ら攢鎶ユ',
+              type: 'text',
+              clickFun: (row) => {
+                this.cancelDeclare(row);
+              },
+            },
+          ]
+        }
+      ],
+      page: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      tableData1: [],
+      tableLoading1: false,
+      column1: [
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
+        { label: '鎵瑰彿', prop: 'updateBatchNo' },
+        {
+          label: '濮旀墭缂栧彿',
+          prop: 'entrustCode',
+          width: "160px",
+          dataType: "link",
+          linkMethod: "changeEntrustCode",
+        },
+        { label: '闆朵欢鍙�', prop: 'partNo' },
+        { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+        {
+          label: '鏍峰搧鍚嶇О',
+          prop: 'sampleName',
+          width: "160px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+        { label: '妫�楠屼汉', prop: 'userName' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+        {
+          label: '鐗╂枡灞炴��',
+          prop: 'materialProp',
+          formatData: (params) => {
+            if (!params) return null
+
+            for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+              const item = this.dict.type.material_prop_type[i]
+              if (item.value == params) {
+                return item.label
+              }
+            }
+            return null
+          }
+        },
+        {
+          dataType: 'tag',
+          label: '鐗╂枡绫诲瀷',
+          prop: 'isExpire',
+          formatData: (params) => {
+            if (params == 1) {
+              return '杩囨湡鐗╂枡'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'info'
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+        { label: '鍗曚綅', prop: 'buyUnitMeas' },
+        { label: '璁㈠崟鍙�', prop: 'orderNo' },
+        { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '鏁版嵁鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDataLook(row);
+              },
+            },
+            {
+              name: '闄勪欢鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleFileLook(row);
+              },
+            },
+            {
+              name: '鎾ら攢涓嬪崟',
+              type: 'text',
+              clickFun: (row) => {
+                this.cancelOrder(row);
+              },
+            },
+          ]
+        }
+      ],
+      page1: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      tableData2: [],
+      tableLoading2: false,
+      column2: [
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
+        {
+          label: '濮旀墭缂栧彿',
+          prop: 'entrustCode',
+          width: "160px",
+          dataType: "link",
+          linkMethod: "changeEntrustCode",
+        },
+        {
+          dataType: 'tag',
+          label: '妫�楠岀姸鎬�',
+          prop: 'inspectStatus',
+          formatData: (params) => {
+            if (params == 0) {
+              return '妫�楠屼腑'
+            } else if (params == 1) {
+              return '鍚堟牸'
+            } else if (params == 2) {
+              return '涓嶅悎鏍�'
+            } else if (params == 3) {
+              return '鏈笅鍗�'
+            } else if (params == 4) {
+              return '璁╂鏀捐'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 0) {
+              return 'warning'
+            } else if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'danger'
+            } else if (params == 3) {
+              return 'info'
+            } else if (params == 4) {
+              return ''
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '璁㈠崟鍙�', prop: 'orderNo' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+        { label: '鎵瑰彿', prop: 'updateBatchNo' },
+        { label: '闆朵欢鍙�', prop: 'partNo' },
+        { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+        { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' },
+        {
+          dataType: 'tag',
+          label: '鍏嶆',
+          prop: 'isExemption',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍏嶆'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else {
+              return null
+            }
+          }
+        },
+        {
+          label: '鏍峰搧鍚嶇О',
+          prop: 'sampleName',
+          width: "160px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+        { label: '妫�楠屼汉', prop: 'userName' },
+        {
+          label: '鐗╂枡灞炴��',
+          prop: 'materialProp',
+          formatData: (params) => {
+            if (!params) return null
+
+            for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+              const item = this.dict.type.material_prop_type[i]
+              if (item.value == params) {
+                return item.label
+              }
+            }
+            return null
+          }
+        },
+        { label: '鍗曚綅', prop: 'buyUnitMeas' },
+        { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '鏁版嵁鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDataLook(row);
+              }
+            },
+            {
+              name: '闄勪欢鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleFileLook(row);
+              }
+            },
+            {
+              name: '鎶ュ憡涓嬭浇',
+              type: 'text',
+              clickFun: (row) => {
+                this.download(row);
+              }
+            },
+            {
+              name: '鍘熷璁板綍',
+              type: 'text',
+              clickFun: (row) => {
+                this.viewInspectInfo(row);
+              },
+              disabled: (row) => {
+                return row.sampleName === null
+              },
+            },
+            {
+              name: '鏀捐',
+              type: 'text',
+              clickFun: (row) => {
+                this.goPass(row);
+              },
+              disabled: (row) => {
+                return row.inspectStatus != 2
+              },
+              showHide: (row) => {
+                return this.checkPermi([
+                  "get:raw:check:operation",
+                ]);
+              },
+            },
+            {
+              name: '瀛e害鎾ら攢',
+              type: 'text',
+              clickFun: (row) => {
+                this.repealQuarter(row);
+              },
+              disabled: (row) => {
+                return row.quarterOrderId == null || row.quarterReportId != null
+              },
+              showHide: (row) => {
+                return this.checkPermi([
+                  "get:raw:check:operation",
+                ]);
+              },
+            },
+          ]
+        }
+      ],
+      page2: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      tableData3: [],
+      tableLoading3: false,
+      column3: [
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
+        { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: "160px", },
+        {
+          dataType: 'tag',
+          label: '妫�楠岀姸鎬�',
+          prop: 'inspectStatus',
+          formatData: (params) => {
+            if (params == 0) {
+              return '妫�楠屼腑'
+            } else if (params == 1) {
+              return '鍚堟牸'
+            } else if (params == 2) {
+              return '涓嶅悎鏍�'
+            } else if (params == 3) {
+              return '鏈笅鍗�'
+            } else if (params == 4) {
+              return '璁╂鏀捐'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 0) {
+              return 'warning'
+            } else if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'danger'
+            } else if (params == 3) {
+              return 'info'
+            } else if (params == 4) {
+              return ''
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '璁㈠崟鍙�', prop: 'orderNo' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+        { label: '鎵瑰彿', prop: 'updateBatchNo' },
+        { label: '闆朵欢鍙�', prop: 'partNo' },
+        { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+        { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' },
+        {
+          dataType: 'tag',
+          label: '鍏嶆',
+          prop: 'isExemption',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍏嶆'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else {
+              return null
+            }
+          }
+        },
+        {
+          label: '鏍峰搧鍚嶇О',
+          prop: 'sampleName',
+          width: "160px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+        { label: '妫�楠屼汉', prop: 'userName' },
+        {
+          label: '鐗╂枡灞炴��',
+          prop: 'materialProp',
+          formatData: (params) => {
+            if (!params) return null
+
+            for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+              const item = this.dict.type.material_prop_type[i]
+              if (item.value == params) {
+                return item.label
+              }
+            }
+            return null
+          }
+        },
+        {
+          dataType: 'tag',
+          label: '鐗╂枡绫诲瀷',
+          prop: 'isExpire',
+          formatData: (params) => {
+            if (params == 1) {
+              return '杩囨湡鐗╂枡'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'info'
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '鍗曚綅', prop: 'buyUnitMeas' },
+        { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '鏁版嵁鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDataLook(row);
+              }
+            },
+            {
+              name: '闄勪欢鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleFileLook(row);
+              },
+            },
+            {
+              name: '鏇存柊IFS鎵规灞炴��',
+              type: 'text',
+              clickFun: (row) => {
+                this.showMaterialPropsDialog(row);
+              },
+            }
+          ]
+        }
+      ],
+      page3: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      entity: {
+        contract: null,
+        updateBatchNo: null,
+        entrustCode: null,
+        partDesc: null,
+        supplierName: null,
+        sampleModel: null,
+        partNo: null,
+        inspectStatus: null,
+        date: null,
+        beginDeclareDate: null,
+        endDeclareDate: null,
+        materialProp: null
+      },
+      tabList: [
+        {
+          label: '寰呬笅鍗�',
+          value: 0
+        },
+        {
+          label: '妫�楠屼腑',
+          value: 1
+        },
+        {
+          label: '宸叉楠�',
+          value: 2
+        },
+        {
+          label: '瀛e害妫�楠�',
+          value: 4
+        },
+        {
+          label: '鍏ㄩ儴',
+          value: 3
+        }
+      ],
+      more: false,
+      tabIndex: '',
+      multipleSelection: [],
+      orderCheckVersion: 0,
+      active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪�
+      orderType: 0, //0锛氬師鏉愭枡涓嬪崟锛�1锛氬搴︽楠屼笅鍗�
+      currentId: null,
+      btnLoading: false,
+      quashDialogVisible: false, // 鎾ら攢涓嬪崟鎻愰啋寮规
+      declareDialogVisible: false, // 鎾ら攢鎶ユ鎻愰啋寮规
+      insOrderRow: {},
+      upLoad: false,
+      filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
+      printDialog: false, // 鏍囩鎵撳嵃寮规
+      showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪�
+      dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
+      dataLookInfo: {}, // 鏁版嵁鏌ョ湅寮规鏁版嵁
+      filesLookInfo: {}, // 闄勪欢鏌ョ湅寮规鏁版嵁
+      downFileDialogVisible: false, // 鎶ュ憡涓嬭浇寮规
+      downLoadInfo: {}, // 鎶ュ憡涓嬭浇寮规
+      entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规
+      entrustCodeInfo: {},
+      submitCodeLoading: false,
+      exemptionVisible: false, // 鍏嶆纭寮规
+      exemptionLoading: false,
+      exemptionInfo: {},
+      inspectStatusList: [
+        { label: '妫�楠屼腑', value: 0 },
+        { label: '鍚堟牸', value: 1 },
+        { label: '涓嶅悎鏍�', value: 2 },
+        { label: '鏈笅鍗�', value: 3 },
+        { label: '璁╂鏀捐', value: 4 },
+      ],
+      state: 0,
+      orderId: 0,
+      inspectorList: [],//妫�楠屼汉鍛樺垪琛�
+      InspectionKey: 1,
+      typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟, 2: 閾滃崟涓濅笅鍗�
+      InspectInfoDialog: false, // 鏁版嵁鏌ョ湅寮规
+      insInfo: {},
+      outLoading: false
+    }
+  },
+  computed: {
+    ...mapGetters(['nickName']),
+    // 涓や釜澶栧崗鑿滃崟鍒嗗埆鎸夌湡瀹為攢鍞鍗曞垎绫绘煡璇€��
+    salesOrderType() {
+      return this.$route.path.includes('/incoming') ? '03incoming' : '04subcontract'
+    }
+  },
+  watch: {
+    // 鍒囨崲澶栧崗鑿滃崟鏃堕噸缃瓫閫夈�佸垎椤靛拰閫変腑鏁版嵁銆�
+    '$route.path'(path) {
+      if (path.includes('/outsourcingOrder/')) {
+        this.resetForm('entity')
+        this.multipleSelection = []
+        this.goSearch()
+      }
+    }
+  },
+  mounted() {
+    if (this.checkPermi(['get:raw:await'])) {
+      this.tabIndex = 0
+    } else {
+      this.tabIndex = 2
+    }
+    this.refreshTable()
+  },
+  activated() {
+    this.refreshTable()
+  },
+  // 绂诲紑椤甸潰鎴栬繘鍏ョ紦瀛樺悗锛屼娇灏氭湭瀹屾垚鐨勪笅鍗曟牎楠屽け鏁堛��
+  beforeRouteLeave(to, from, next) {
+    this.orderCheckVersion++
+    next()
+  },
+  deactivated() {
+    this.orderCheckVersion++
+  },
+  beforeDestroy() {
+    this.orderCheckVersion++
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    validateQuality(){
+      let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark));
+      let testQuantity = Number(this.selectedRow.purQtyInStore);
+      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;
+    },
+    saveOrUpdatePartProp(){
+      this.ifsMaterialPropsForm.ifsInventoryId = this.selectedRow.id
+      saveOrUpdateProps({
+        ...this.ifsMaterialPropsForm,
+        partNo: this.selectedRow.partNo,
+        lotBatchNo: this.selectedRow.updateBatchNo,
+        contract: this.selectedRow.contract
+      }).then((res)=>{
+        if(res.code==200){
+          this.$message.success("淇濆瓨鎴愬姛");
+          this.ifsMaterialPropsVisible = false;
+          this.refreshView()
+        }
+      })
+    },
+    getPartProps(ifsId){
+      getOneByIfsId(ifsId).then((res)=>{
+        if(res.code==200 && res.data){
+          this.ifsMaterialPropsForm = res.data;
+        }
+      })
+    },
+    //鎵撳紑IFS鐗╂枡灞炴�у脊妗�
+    showMaterialPropsDialog(row){
+      this.selectedRow = row
+      this.getPartProps(row.id)
+      this.getOuterColorDicts()
+      this.getInsulationColorDicts()
+      this.getLetteringInfoDicts()
+      this.$nextTick(()=>{
+        this.ifsMaterialPropsVisible = true;
+      })
+    },
+    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.selectedRow = {}
+      this.ifsMaterialPropsVisible = false;
+    },
+    // 鐐瑰嚮鏌ヨ鍥炶皟
+    goSearch() {
+      this.page.current = 1
+      this.page1.current = 1
+      this.page2.current = 1
+      this.page3.current = 1
+      this.refreshTable()
+    },
+    // 鏌ヨ鍥炶皟
+    refreshTable() {
+      if (this.tabIndex === 0) {
+        // 寰呬笅鍗曟煡璇�
+        this.getPurchaseOrderList()
+      } else if (this.tabIndex === 1) {
+        // 妫�楠屼腑鏌ヨ
+        this.getIfsByStateOneList()
+      } else if (this.tabIndex === 2) {
+        // 宸叉楠屾煡璇�
+        this.getIfsByOverList()
+      } else if (this.tabIndex === 4) {
+        // 鏌ヨ瀛e害妫�楠�
+        this.getIfsByQuarterList()
+      } else {
+        // 鍏ㄩ儴鏌ヨ
+        this.getIfsByAllList()
+      }
+    },
+    // 寰呬笅鍗曟煡璇�
+    getPurchaseOrderList() {
+      this.tableLoading = true
+      const params = { ...this.entity, orderType: this.salesOrderType, isInspect: 1, state: 0, ...this.page }
+      getWarehouseSubmit(params).then(res => {
+        this.tableLoading = false
+        if (res.code === 200) {
+          this.tableData = res.data.records
+          this.page.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoading = false
+      })
+    },
+    // 妫�楠屼腑鏌ヨ
+    getIfsByStateOneList() {
+      this.tableLoading1 = true
+      const params = { ...this.entity, orderType: this.salesOrderType, orderState: 1, state: 1, ...this.page1 }
+      getIfsByStateOne(params).then(res => {
+        this.tableLoading1 = false
+        if (res.code === 200) {
+          this.tableData1 = res.data.records
+          this.page1.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoading1 = false
+      })
+    },
+    // 宸叉楠屾煡璇�
+    getIfsByOverList() {
+      this.tableLoading2 = true
+      if (null != this.entity.date) {
+        this.entity.beginDeclareDate = this.entity.date[0]
+        this.entity.endDeclareDate = this.entity.date[1]
+      } else {
+        this.entity.beginDeclareDate = ''
+        this.entity.endDeclareDate = ''
+      }
+      const params = { ...this.entity, orderType: this.salesOrderType, orderState: 4, state: 2, ...this.page2 }
+      getIfsByOver(params).then(res => {
+        this.tableLoading2 = false
+        if (res.code === 200) {
+          this.tableData2 = res.data.records
+          this.page2.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoading2 = false
+      })
+    },
+    // 鏌ヨ瀛e害妫�楠�
+    getIfsByQuarterList() {
+      this.tableLoading4 = true
+      if (null != this.entity.date) {
+        this.entity.beginDeclareDate = this.entity.date[0]
+        this.entity.endDeclareDate = this.entity.date[1]
+      } else {
+        this.entity.beginDeclareDate = ''
+        this.entity.endDeclareDate = ''
+      }
+      const params = { ...this.entity, orderType: this.salesOrderType, ...this.page4 }
+      getIfsByQuarter(params).then(res => {
+        this.tableLoading4 = false
+        if (res.code === 200) {
+          this.tableData4 = res.data.records
+          this.page4.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoading4 = false
+      })
+    },
+    // 鍏ㄩ儴
+    getIfsByAllList() {
+      this.tableLoading3 = true
+      if (null != this.entity.date) {
+        this.entity.beginDeclareDate = this.entity.date[0]
+        this.entity.endDeclareDate = this.entity.date[1]
+      } else {
+        this.entity.beginDeclareDate = ''
+        this.entity.endDeclareDate = ''
+      }
+      const params = { ...this.entity, orderType: this.salesOrderType, isInspect: 1, ...this.page3 }
+      getIfsByAll(params).then(res => {
+        this.tableLoading3 = false
+        if (res.code === 200) {
+          this.tableData3 = res.data.records
+          this.page3.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoading3 = false
+      })
+    },
+    // 閲� 缃�
+    refresh() {
+      this.resetForm('entity')
+      this.refreshTable()
+    },
+    pagination(page) {
+      this.page.size = page.limit
+      this.refreshTable()
+    },
+    pagination1(page) {
+      this.page1.size = page.limit
+      this.refreshTable()
+    },
+    pagination2(page) {
+      this.page2.size = page.limit
+      this.refreshTable()
+    },
+    pagination3(page) {
+      this.page3.size = page.limit
+      this.refreshTable()
+    },
+    pagination4(page) {
+      this.page4.size = page.limit
+      this.refreshTable()
+    },
+    // 鏌ョ湅妫�楠屾暟鎹�
+    viewInspectInfo(row) {
+      //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃
+      let inspectorList = []
+      if (row.userName) {
+        inspectorList = row.userName.split(',')
+      }
+      inspectorList.push(this.nickName)
+      this.inspectorList = inspectorList
+      this.insInfo = row
+      this.InspectInfoDialog = true
+    },
+    closeInsInfoDialog() {
+      this.InspectInfoDialog = false
+    },
+    // 鐩存帴鏀捐
+    goPass(row) {
+      this.$confirm('鏄惁鏀捐褰撳墠鏁版嵁?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        concessionRelease({ ifsInventoryId: row.id }).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              type: 'success',
+              message: '鏀捐鎴愬姛!'
+            });
+            this.refreshTable()
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'error',
+          message: '鏀捐澶辫触'
+        });
+      });
+    },
+    // 瀛e害鎾ら攢
+    repealQuarter(row) {
+      this.$confirm('鏄惁鎾ら攢瀛e害涓嬪崟?', "璀﹀憡", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning"
+      }).then(() => {
+        repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
+          if (res.code === 200) {
+            this.$message.success('鎾ら攢鎴愬姛')
+            this.refreshTable('page')
+          }
+        })
+      }).catch(() => { })
+    },
+    viewInsInfo0() {
+      let inspectorList = []
+      inspectorList.push(this.nickName)
+      this.InspectInfoDialog = false
+      if (this.checkPermi(['business:inspectionView'])) {
+        this.$router.push({
+          name: "InspectionView",
+          query: {
+            sonLaboratory: '鍘熸潗鏂�',
+            state: 3,
+            typeSource: this.insInfo.typeSource,
+            orderId: this.insInfo.enterOrderId,
+            inspectorList: inspectorList,
+          },
+        })
+      } else {
+        this.$router.push({
+          path: "/inspectionTask/inspection",
+          query: {
+            sonLaboratory: '鍘熸潗鏂�',
+            state: 3,
+            typeSource: this.insInfo.typeSource,
+            orderId: this.insInfo.enterOrderId,
+            inspectorList: inspectorList,
+          },
+        })
+      }
+    },
+    viewInsInfo1() {
+      let inspectorList = []
+      inspectorList.push(this.nickName)
+      this.InspectInfoDialog = false
+      if (this.checkPermi(['business:inspectionView'])) {
+        this.$router.push({
+          name: "InspectionView",
+          query: {
+            sonLaboratory: '鍘熸潗鏂�',
+            state: 3,
+            typeSource: this.insInfo.typeSource,
+            orderId: this.insInfo.quarterOrderId,
+            inspectorList: inspectorList,
+          },
+        })
+      } else {
+        this.$router.push({
+          path: "/inspectionTask/inspection",
+          query: {
+            sonLaboratory: '鍘熸潗鏂�',
+            state: 3,
+            typeSource: this.insInfo.typeSource,
+            orderId: this.insInfo.quarterOrderId,
+            inspectorList: inspectorList,
+          },
+        })
+      }
+    },
+    goback() {
+      this.state = 0
+      this.refreshTable('page')
+    },
+    // 鍒锋柊椤甸潰
+    refreshView() {
+      this.InspectionKey++
+    },
+    // 閾滄潗鏂欎笅鍗�
+    copper() {
+      this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } });
+    },
+    // 鎵撳紑鏍囩鎵撳嵃寮规
+    openPrint() {
+      if (this.multipleSelection.length > 0) {
+        this.printDialog = true
+        this.$nextTick(() => {
+          let selection = this.multipleSelection
+          this.$refs.printDialog.getLabelPrinting(selection)
+        })
+      } else {
+        this.$message.error('璇烽�夋嫨闇�瑕佹墦鍗扮殑鏁版嵁')
+      }
+    },
+    // 鍏抽棴鏍囩鎵撳嵃寮规
+    closePrintDialog() {
+      this.printDialog = false
+    },
+    // 澶栧崗璁㈠崟鏍规嵁鍒嗙被鍙婄墿鏂欏睘鎬у瓧鍏搁敭鍊煎鐢ㄥ搴斾笅鍗曟祦绋嬨��
+    playOrder(row) {
+      const orderType = row.orderType
+      if (!['03incoming', '04subcontract'].includes(orderType)) {
+        this.$message.error('闈炴硶鐨勫鍗忚鍗曞垎绫伙紝璇峰埛鏂板垪琛�')
+        return
+      }
+      if (orderType === '04subcontract' && !['鍗婃垚鍝�', '鎴愬搧'].includes(row.materialProp)) {
+        this.$message.error('濮斿鍔犲伐鐨勭墿鏂欏睘鎬у彧鑳戒负鍗婃垚鍝佹垨鎴愬搧')
+        return
+      }
+      const currentPath = this.$route.path
+      const requestVersion = ++this.orderCheckVersion
+      getOrderCountByIfsId(row.id).then(res => {
+        // 浠呭綋鍓嶉〉闈㈡渶鏂颁竴娆℃牎楠屽彲浠ュ鑸紝鍒嗘祦浣跨敤鐐瑰嚮鏃剁殑鐪熷疄璁㈠崟鍒嗙被銆�
+        if (this._isDestroyed || this._inactive || requestVersion !== this.orderCheckVersion
+          || this.$route.path !== currentPath) return
+        if (res.code !== 200) return
+        if (res.data > 0) {
+          this.$message.warning('璇ユ壒娆″凡涓嬪崟锛岃鍕块噸澶嶄笅鍗�')
+          this.refreshTable()
+          return
+        }
+        const isProduct = orderType === '04subcontract' && row.materialProp === '鎴愬搧'
+        this.$router.push({
+          path: isProduct ? '/outsourcingFinishProduct/customsInspectionOrder' : '/materialOrder/customsInspectionOrder',
+          query: { isOutsourcing: isProduct ? 't' : 'f', orderType: 0, customsInspection: row, active: 1 }
+        })
+      }).catch(error => {
+        console.error(error)
+      })
+    },
+    // 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
+    selectAllByOne(row) {
+      if (row.isCopper == 1) {
+        this.currentId = row.enterOrderId
+        this.$router.push({ path: "/materialOrder/CopperView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+      } else {
+        this.currentId = row.insOrderId
+        this.$router.push({ path: "/materialOrder/customsInspectionView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+      }
+    },
+    // 鎵撳紑鍏嶆寮规
+    exemption(row) {
+      this.exemptionVisible = true
+      this.exemptionInfo = row
+      this.$set(this.exemptionInfo, 'partDetail', row.partDesc)
+    },
+    // 鎻愪氦鍏嶆淇℃伅
+    submitExemption() {
+      this.exemptionLoading = true
+      rawOrderRelease({
+        ifsInventoryId: this.exemptionInfo.id,
+        partDetail: this.exemptionInfo.partDetail
+      }).then(res => {
+        if (res.code === 200) {
+          this.exemptionVisible = false
+          this.$message.success('鎿嶄綔鎴愬姛')
+          this.refreshTable()
+        }
+        this.exemptionLoading = false
+      }).catch(err => {
+        console.log(err)
+        this.exemptionLoading = false
+      })
+    },
+    // 鎵撳紑鎾ら攢鎶ユ寮规
+    cancelDeclare(row) {
+      this.declareDialogVisible = true
+      this.insOrderRow = row
+    },
+    // 鎻愪氦鎾ら攢鎶ユ鐢宠
+    submitDeclare() {
+      revokeInspectionReport({ id: this.insOrderRow.id }).then(res => {
+        if (res.code === 200) {
+          this.declareDialogVisible = false
+          this.refreshTable()
+          this.$message.success("鎾ら攢鎶ユ鎴愬姛")
+        }
+      }).catch(err => {
+        console.log(err)
+      })
+    },
+    // 鎵撳紑鎾ら攢涓嬪崟鐨勫脊妗�
+    cancelOrder(row) {
+      if (row.enterOrderId && row.quarterOrderId) {
+        this.quashDialogVisible = true
+      } else if (row.enterOrderId && !row.quarterOrderId) {
+        this.$confirm('鏄惁鎾ら攢杩涘巶涓嬪崟?', "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          repealEnterRawOrder({ enterOrderId: row.enterOrderId }).then(res => {
+            if (res.code === 200) {
+              this.$message.success('鎾ら攢鎴愬姛')
+              this.refreshTable('page')
+            }
+          })
+        }).catch(() => { })
+      } else if (!row.enterOrderId && row.quarterOrderId) {
+        this.$confirm('鏄惁鎾ら攢瀛e害涓嬪崟?', "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
+            if (res.code === 200) {
+              this.$message.success('鎾ら攢鎴愬姛')
+              this.refreshTable('page')
+            }
+          })
+        }).catch(() => { })
+      }
+      this.insOrderRow = row
+    },
+    cancelQuashOrder(type) {
+      if (type === 'enterOrderId') {
+        this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          repealEnterRawOrder({ enterOrderId: this.insOrderRow.enterOrderId }).then(res => {
+            if (res.code === 200) {
+              this.$message.success('鎾ら攢鎴愬姛')
+              this.refreshTable('page')
+            }
+          })
+        }).catch(() => { })
+      } else {
+        this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => {
+            if (res.code === 200) {
+              this.$message.success('鎾ら攢鎴愬姛')
+              this.refreshTable()
+            }
+          })
+        }).catch(() => { })
+      }
+    },
+    // 鏁版嵁鏌ョ湅
+    handleDataLook(row) {
+      this.dataLookInfo = row
+      this.dataDialogVisible = true;
+    },
+    // 鍏抽棴鏁版嵁鏌ョ湅寮规
+    closeDataLook() {
+      this.dataDialogVisible = false
+    },
+    // 闄勪欢鏌ョ湅
+    handleFileLook(row) {
+      this.filesDialogVisible = true
+      this.filesLookInfo = row
+    },
+    // 鍏抽棴闄勪欢鏌ョ湅寮规
+    closeFilesLook() {
+      this.filesDialogVisible = false
+    },
+    // 鎶ュ憡涓嬭浇
+    download(row) {
+      this.downFileDialogVisible = true
+      this.downLoadInfo = row
+    },
+    // 鍏抽棴鎶ュ憡涓嬭浇寮规
+    closeDownFileDialog() {
+      this.downFileDialogVisible = false
+    },
+    // 鏌ョ湅浜т笟閾句俊鎭�
+    openInfoDialog(row) {
+      this.showInfoDialog = true
+      this.$nextTick(() => {
+        this.$refs.showInfoDialog.getInfo(row.id)
+      })
+    },
+    // 淇敼濮旀墭缂栧彿
+    changeEntrustCode(row) {
+      this.entrustCodeVisible = true
+      this.entrustCodeInfo = { ...row }
+    },
+    // 瀵煎嚭
+    handleOut() {
+      this.outLoading = true
+      let params = {}
+      if (this.multipleSelection.length > 0) {
+        params.ids = this.multipleSelection.map(item => item.id).join(',');
+      } else {
+        params = { ...this.entity }
+      }
+      params.orderType = this.salesOrderType;
+      rawAllExport(params).then(res => {
+        this.outLoading = false
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, this.salesOrderType === '03incoming' ? '澶栧崗鏉ユ枡鍔犲伐妫�娴嬩俊鎭鍑�.xlsx' : '澶栧崗濮斿鍔犲伐妫�娴嬩俊鎭鍑�.xlsx');
+      })
+    },
+    // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅
+    submitCode() {
+      this.submitCodeLoading = true
+      try {
+        updateEntrustCode({
+          id: this.entrustCodeInfo.id,
+          entrustCode: this.entrustCodeInfo.entrustCode,
+        }).then(res => {
+          if (res.code === 200) {
+            this.entrustCodeVisible = false
+            this.$message.success('淇敼鎴愬姛')
+          }
+          this.refreshTable()
+          this.submitCodeLoading = false
+        })
+      } catch (e) {
+        this.submitCodeLoading = false
+      }
+    },
+    // 鍒囨崲涓嬪崟tab琛ㄦ牸
+    handleTab(m) {
+      this.tabIndex = m;
+      this.multipleSelection = []
+      this.refreshTable()
+    },
+    // 琛ㄦ牸閫夋嫨鏂规硶
+    selectMethod(val) {
+      this.multipleSelection = val
+    },
+    changeRowClass({ row, rowIndex }) {
+      if (row.isFirst == 1) {
+        return 'highlight-danger-row-border'
+      }
+      return ''
+    },
+  },
+}
+</script>
+
+<style scoped>
+.table-tab {
+  display: flex;
+  justify-content: space-between;
+}
+
+.tab {
+  list-style-type: none;
+  display: flex;
+  margin-bottom: 12px;
+  margin-top: 0;
+  padding-left: 0;
+}
+
+.tab li {
+  line-height: 24px;
+  padding: 6px 14px;
+  font-size: 14px;
+  color: #333333;
+  border: 1px solid #EEEEEE;
+  cursor: pointer;
+}
+
+.tab li:nth-child(1) {
+  border-radius: 8px 0 0 8px;
+}
+
+.tab li:nth-child(4) {
+  border-radius: 0 8px 8px 0;
+}
+
+.tab li.active {
+  border-color: #3A7BFA;
+  color: #3A7BFA;
+}
+</style>
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index c3d95ed..e5e29bd 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -93,17 +93,17 @@
       </div>
     </div>
     <!-- 鎵归噺鎶ユ -->
-    <el-dialog :visible.sync="declareDialogSVisible" title="鎵归噺鎶ユ" width="30%" :before-close="resetBatchFormData">
+    <el-dialog :visible.sync="declareDialogSVisible" title="鎵归噺鎶ユ" width="30%" :before-close="resetBatchFormData" @open="refreshDeclareDicts">
       <el-form ref="declareBatchObj" :inline="true" :model="declareBatchObj" :rules="declareObjBatchRules" label-width="130px"
                label-position="right">
         <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
-          <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small">
+          <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small" @change="changeOrderType(declareBatchObj)">
             <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item class="declareObj-form-item" label="鐗╂枡灞炴�э細" prop="materialProp">
           <el-select v-model="declareBatchObj.materialProp" clearable size="small">
-            <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
+            <el-option v-for="(item,index) in getMaterialProps(declareBatchObj.orderType)" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -116,7 +116,7 @@
     </el-dialog>
     <!-- 纭鎶ユ -->
     <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '閿�鍞鍗曟姤妫�'"
-      :visible.sync="declareDialogVisible" width="800px" @close="resetFormData">
+      :visible.sync="declareDialogVisible" width="800px" @close="resetFormData" @open="refreshDeclareDicts">
       <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px"
         label-position="right">
         <el-form-item class="declareObj-form-item" label="璁㈠崟鍙�:" prop="orderNo">
@@ -170,13 +170,13 @@
           </el-select>
         </el-form-item>
         <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
-          <el-select v-model="declareObj.orderType" clearable size="small">
+          <el-select v-model="declareObj.orderType" clearable size="small" @change="changeOrderType(declareObj)">
             <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item class="declareObj-form-item" label="鐗╂枡灞炴�э細" prop="materialProp">
           <el-select v-model="declareObj.materialProp" clearable size="small">
-            <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
+            <el-option v-for="(item,index) in getMaterialProps(declareObj.orderType)" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -298,7 +298,7 @@
       :visible.sync="materialPropVisible"
       width="15%">
       <el-select placeholder="璇烽�夋嫨鐗╂枡灞炴��" v-model="declareObj.materialProp" clearable size="small">
-        <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
+        <el-option v-for="(item,index) in getMaterialProps(declareObj.orderType)" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
       </el-select>
       <span slot="footer" class="dialog-footer">
     <el-button type="primary" @click="confirmSplitOrder">纭� 瀹�</el-button>
@@ -773,6 +773,24 @@
   },
   // 鏂规硶闆嗗悎
   methods: {
+    // 姣忔鎵撳紑鎶ユ寮圭獥閲嶆柊鑾峰彇瀛楀吀锛岄伩鍏嶉〉闈繚鐣欎慨鏀瑰墠鐨勯�夐」銆�
+    refreshDeclareDicts() {
+      this.getOrderTypeList()
+      this.getMaterialPropList()
+    },
+    // 濮斿鍔犲伐鎸夊瓧鍏搁敭鍊奸檺瀹氬崐鎴愬搧鍜屾垚鍝併��
+    getMaterialProps(orderType) {
+      if (orderType === '04subcontract') {
+        return this.materialPropList.filter(item => ['鍗婃垚鍝�', '鎴愬搧'].includes(item.dictValue))
+      }
+      return this.materialPropList
+    },
+    // 鍒囨崲璁㈠崟鍒嗙被鏃舵竻闄や笉閫傜敤鐨勭墿鏂欏睘鎬с��
+    changeOrderType(form) {
+      if (!this.getMaterialProps(form.orderType).some(item => item.dictValue === form.materialProp)) {
+        form.materialProp = null
+      }
+    },
     getOrderTypeList(){
       getDicts('inspection_type').then(res=>{
         if(res.code === 200){

--
Gitblit v1.9.3