zouyu
2025-10-23 f294efb8c01ad8b0704a92d51c14dbd55d898874
拆分原材料和外购成品的业务流程(报检、下单、检验)
已添加4个文件
已修改9个文件
1908 ■■■■■ 文件已修改
src/api/business/ifsOrderInspection.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/ifsPartProps.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/outsourcingFinishProductInspection.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspectionOrder.vue 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/outsourcingFinishProduct/index.vue 1270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/rawMaterialInspection/index.vue 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/standardLibrary/index.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/workers/DataWorker.worker.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/ifsOrderInspection.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
//销售订单报检查询接口
import request from '@/utils/request'
// é”€å”®è®¢å•报检查询全部
export function getIfsByAll(query) {
  return request({
    url: '/ifsOrderInspection/getIfsByAll',
    method: 'get',
    params: query
  })
}
// é”€å”®è®¢å•报检查看已完成信息
export function getIfsByFinish(query) {
  return request({
    url: '/ifsOrderInspection/getIfsByFinish',
    method: 'get',
    params: query
  })
}
src/api/business/ifsPartProps.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
//ifs零件属性接口
import request from '@/utils/request'
// æ–°å¢žæˆ–保存零件属性
export function saveOrUpdateProps(data) {
  return request({
    url: '/ifsPartProps/saveOrUpdateProps',
    method: 'post',
    data: data
  })
}
// æŸ¥è¯¢ifs订单的零件属性记录
export function getOneByIfsId(ifsId) {
  return request({
    url: '/ifsPartProps/getOneByIfsId/' + ifsId,
    method: 'get'
  })
}
src/api/business/outsourcingFinishProductInspection.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
// å¤–购下单页面相关接口
import request from '@/utils/request'
// æŸ¥è¯¢IFS订单-待报检
export function getWarehouseSubmit(query) {
  return request({
    url: '/outsourcingFinishProduct/getWarehouseSubmit',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢IFS订单-待检验
export function getIfsByStateOne(query) {
  return request({
    url: '/outsourcingFinishProduct/getIfsByStateOne',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢åŽŸææ–™ä¸‹å•-已检验
export function getIfsByOver(query) {
  return request({
    url: '/outsourcingFinishProduct/getIfsByOver',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢åŽŸææ–™ä¸‹å•-全部
export function getIfsByAll(query) {
  return request({
    url: '/outsourcingFinishProduct/getIfsByAll',
    method: 'get',
    params: query
  })
}
src/router/index.js
@@ -174,6 +174,55 @@
        name: "AddOrder",
        meta: { title: "进行成品下单", activeMenu: "/business/productOrder",keepAlive: true },
      },
      {
        // å¤–购下单-进行外购下单
        path: "customsInspectionOrder",
        component: () =>
          import("@/views/business/productOrder/components/addOrder.vue"),
        name: "CustomsInspectionOrder",
        meta: {
          title: "进行外购成品下单",
          activeMenu: "/business/outsourcingFinishProduct",
          keepAlive: true
        },
      },
    ],
  },
  {
    // å¤–购成品下单
    path: "/outsourcingFinishProduct",
    component: Layout,
    hidden: true,
    permissions: ["business:outsourcingFinishProduct"],
    children: [
      {
        // æŸ¥çœ‹æˆå“ä¸‹å•详情
        path: "addView",
        component: () =>
          import("@/views/business/productOrder/components/addView.vue"),
        name: "AddView",
        meta: { title: "查看成品下单详情", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true },
      },
      {
        // è¿›è¡Œä¸‹å•-成品下单
        path: "addOrder",
        component: () =>
          import("@/views/business/productOrder/components/addOrder.vue"),
        name: "AddOrder",
        meta: { title: "进行成品下单", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true },
      },
      {
        // å¤–购下单-进行外购下单
        path: "customsInspectionOrder",
        component: () =>
          import("@/views/business/materialOrder/customsInspectionOrder"),
        name: "CustomsInspectionOrder",
        meta: {
          title: "进行外购成品下单",
          activeMenu: "/business/outsourcingFinishProduct",
          keepAlive: true
        },
      },
    ],
  },
  {
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -17,19 +17,19 @@
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                tooltip-effect="dark" height="100%">
        <el-table-column type="index" label="序号" align="center" width="65"></el-table-column>
        <el-table-column prop="deviceName" align="center" min-width="100" label="设备名称"></el-table-column>
        <el-table-column prop="deviceName" align="center" min-width="100" label="设备名称" show-overflow-tooltip></el-table-column>
        <el-table-column prop="sample" align="center" label="检验对象" show-overflow-tooltip
          min-width="150"></el-table-column>
        <el-table-column prop="inspectionItemClass" align="center" label="检验项分类" min-width="120"></el-table-column>
        <el-table-column prop="inspectionItem" align="center" label="检验项" min-width="100"></el-table-column>
        <el-table-column prop="inspectionItemSubclass" align="center" label="检验子项" min-width="100"></el-table-column>
        <el-table-column prop="referx" align="center" label="参照X" min-width="100"></el-table-column>
        <el-table-column prop="x" align="center" label="X"></el-table-column>
        <el-table-column prop="refery" align="center" label="参照Y" min-width="100"></el-table-column>
        <el-table-column prop="y" align="center" label="Y"></el-table-column>
        <el-table-column prop="anotherName" align="center" label="别名" min-width="100"></el-table-column>
        <el-table-column prop="matchingName" align="center" label="匹配名称" min-width="100"></el-table-column>
        <el-table-column prop="formula" align="center" label="公式"></el-table-column>
        <el-table-column prop="inspectionItemClass" align="center" label="检验项分类" min-width="120" show-overflow-tooltip></el-table-column>
        <el-table-column prop="inspectionItem" align="center" label="检验项" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="inspectionItemSubclass" align="center" label="检验子项" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="referx" align="center" label="参照X" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="x" align="center" label="X" show-overflow-tooltip></el-table-column>
        <el-table-column prop="refery" align="center" label="参照Y" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="y" align="center" label="Y" show-overflow-tooltip></el-table-column>
        <el-table-column prop="anotherName" align="center" label="别名" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="matchingName" align="center" label="匹配名称" min-width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="formula" align="center" label="公式" show-overflow-tooltip></el-table-column>
        <el-table-column fixed="right" label="操作" width="120" align="center">
          <template slot-scope="scope">
            <el-button type="text" @click="dataConfig(scope.row)">数采配置</el-button>
@@ -98,7 +98,7 @@
                :content="formula.content" :key="key" placement="top">
                <label>{{ formula.label }}()</label>
              </el-tooltip>
              <el-input type="textarea" autosi:autosize="{ minRows: 2, maxRows: 4}" ze placeholder="请输入内容"
              <el-input type="textarea" autosize:autosize="{ minRows: 2, maxRows: 4}"  placeholder="请输入内容"
                v-model="configForm.formula" @change="evalResult">
              </el-input>
            </template>
@@ -476,6 +476,7 @@
        structureItemParameterId: row.structureItemParameterId
      }).then(res => {
        const data = res.data;
        console.log("数采配置--",data)
        if (data[0]) {
          this.domains.splice(0, 1);
          let formula = data[0].formula
@@ -527,7 +528,7 @@
                }
              }
            }
            if (isIncludes === false && this.configForm.formula !== "" && this.configForm.formula !== undefined) {
            if (isIncludes === false && this.configForm.formula !== "" && this.configForm.formula !== null && this.configForm.formula !== undefined) {
              i.formula = "(" + this.configForm.formula + ")";
            } else {
              i.formula = this.configForm.formula;
src/views/business/inspectionTask/index.vue
@@ -285,6 +285,7 @@
      tabList: [
        { label: "委托", value: 0 },
        { label: "原材料", value: 1 },
        { label: "外购", value: 2 },
      ],
      active: 1,
      tabIndex: 0,
@@ -550,7 +551,8 @@
      lookTableLoading: false,
      // æ•°æ®æŸ¥çœ‹ç›¸å…³å­—段---结束
      retestVisible: false,
      upIndex: 0
      upIndex: 0,
      tabLabel: ''
    };
  },
  mounted() {
@@ -646,7 +648,14 @@
    },
    refreshTable(e) {
      this.page.current = 1;
      this.queryParams.typeSource = this.tabIndex;
      let typeSource = null;
      if(this.tabIndex===1){
          typeSource=1
      }else if(this.tabIndex===2){
        typeSource = 0
      }
      this.queryParams.tabLabel = this.tabLabel;
      this.queryParams.typeSource = typeSource;
      this.getList();
    },
    // ä¸‹è½½æŠ¥å‘Š
@@ -733,6 +742,7 @@
    },
    handleTab(m, i) {
      this.tabIndex = i;
      this.tabLabel = m.label;
      this.queryParams.sonLaboratory = "";
      this.refreshTable();
    },
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,7 +16,8 @@
          </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" 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"
@@ -74,6 +75,17 @@
            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
          <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
        </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>
    </div>
    <div class="center">
@@ -526,6 +538,41 @@
      :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 size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input>
        </el-form-item>
        <el-form-item label="起始米标(Attr2):">
          <el-input size="small" v-model="ifsMaterialPropsForm.startMeterMark"></el-input>
        </el-form-item>
        <el-form-item label="截止米标(Attr3):">
          <el-input size="small" v-model="ifsMaterialPropsForm.endMeterMark"></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-input size="small" v-model="ifsMaterialPropsForm.insulationColor"></el-input>
        </el-form-item>
        <el-form-item label="外护颜色(Attr5):">
          <el-input size="small" v-model="ifsMaterialPropsForm.outerColor"></el-input>
        </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>
@@ -561,8 +608,9 @@
import DataWorker from '@/workers/DataWorker.worker.js';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import { connect,disconnect,weightList } from "@/utils/connect.js";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
import {connect,disconnect,weightList} from "@/utils/connect";
import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js";
export default {
  name: 'Inspection',
  components: {
@@ -575,6 +623,19 @@
  },
  data() {
    return {
      letteringInfoList: [],
      ifsMaterialPropsForm:{
        id:null,
        ifsOrderId: null,
        drumNo: '', // è½½å…·ç¼–号
        startMeterMark: '', // èµ·å§‹ç±³æ ‡
        endMeterMark: '', // æˆªæ­¢ç±³æ ‡
        insulationColor: '', // ç»ç¼˜é¢œè‰²
        outerColor: '', // å¤–护颜色
        inboundLength: '', // å…¥åº“长度
        letteringInfo: '', // å°å­—信息
      },
      ifsMaterialPropsVisible:false,
      sonLaboratory: null,
      orderId: null,
      state: null,
@@ -881,6 +942,7 @@
          }
        });
      }
      console.log("处理后的模板-",this.tableList)
    },
    // ç‰¹æ®Šæ£€éªŒé¡¹--监听设备信息改变
    equipForm: {
@@ -898,6 +960,49 @@
    }
  },
  methods: {
    closePartPropDialog(){
      this.ifsMaterialPropsForm = {
        id:null,
        ifsOrderId: 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(){
      saveOrUpdateProps({
        ...this.ifsMaterialPropsForm,
        partNo: this.insOrder.partNo,
        lotBatchNo: this.insOrder.lotBatchNo,
      }).then((res)=>{
        if(res.code==200){
          this.$message.success("保存成功");
          this.ifsMaterialPropsVisible = false;
        }
      })
    },
    //打开IFS物料属性弹框
    showMaterialPropsDialog(){
      this.getPartProps(this.insOrder.ifsInventoryId)
      this.$nextTick(()=>{
        this.ifsMaterialPropsVisible = true;
      })
    },
    disconnect() {
      return disconnect
    },
    sss() {
      console.log(this.$store.state.weightList) //
    },
@@ -983,6 +1088,8 @@
        laboratory: this.sonLaboratory,
      }).then(async (res) => {
        this.insOrder = res.data.insOrder;
        //查询零件属性
        this.getPartProps(res.data.insOrder.ifsInventoryId)
        this.supplierDensity = res.data.supplierDensity;
        this.getList()
        this.urgentList.forEach((m) => {
@@ -1197,6 +1304,7 @@
      return newObj;
    },
    handleDataAcquisition(data, noDialog) {
      console.log("dadad--",data)
      // æ˜¯å¦å¯ä»¥ç¼–辑数采数据
      if (this.dataAcquisitionEidtAble) {
        this.getDataType = 1;
@@ -1220,7 +1328,9 @@
          };
        }
        // å¾ªçŽ¯æ•°é‡‡æ•°æ®
        console.log(data[i],i)
        for (let j in data[i]) {
          console.log("jjjjj--",j)
          // æ‹¼æŽ¥å­—符串  æ£€éªŒé¡¹åˆ†ç±»+检验项+检验子项
          let str0 = "";
          if (i.includes("@")) {
@@ -1424,6 +1534,7 @@
          this.getDataIndexLoading = false;
          this.dataGetDia = false;
          this.getDataTypeId = "";
          console.log("dadada---",this.dataAcquisitionInfo)
          this.worker0.postMessage(
            JSON.stringify({
              dataAcquisitionInfo: this.dataAcquisitionInfo,
@@ -1437,6 +1548,7 @@
      // ç›‘听 Worker è¿”回的结果
      this.worker0.onmessage = (event) => {
        let result = JSON.parse(event.data);
        console.log("Worker è¿”回的结果:", result);
        if (result.method == "changeInput") {
          // é‡‡é›†åŽçš„æ•°æ®ï¼Œéœ€è¦è¿›è¡Œè®¡ç®—的线程进行计算
          let { list, n } = result.value;
@@ -1848,7 +1960,7 @@
                  if (c.v.ps != undefined && c.v.ps.value === "检验项") {
                    if (count4 === 0) {
                      if (c.v.v) {
                        c.v.v = c.v.v.replace(/\s*/g, "");
                        c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                      }
                      str += c.v.v;
                      count4 += 1;
@@ -1859,7 +1971,7 @@
                  ) {
                    if (count4 === 1) {
                      if (c.v.v) {
                        c.v.v = c.v.v.replace(/\s*/g, "");
                        c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                      }
                      str += c.v.v;
                      count4 += 1;
@@ -1869,7 +1981,7 @@
                  if (c.v.ps != undefined && c.v.ps.value === "检验项分类") {
                    if (count4 === 0) {
                      if (c.v.v) {
                        c.v.v = c.v.v.replace(/\s*/g, "");
                        c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                      }
                      str += c.v.v;
                      count4 += 1;
@@ -1877,7 +1989,8 @@
                  } else if (c.v.ps != undefined && c.v.ps.value === "检验项") {
                    if (count4 === 1) {
                      if (c.v.v) {
                        c.v.v = c.v.v.replace(/\s*/g, "");
                        console.log("进入1111111")
                        c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                      }
                      str += c.v.v;
                      count4 += 1;
@@ -1888,7 +2001,7 @@
                  ) {
                    if (count4 === 2) {
                      if (c.v.v) {
                        c.v.v = c.v.v.replace(/\s*/g, "");
                        c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                      }
                      str += c.v.v;
                      count4 += 1;
@@ -1898,7 +2011,7 @@
                if (str === "机械性能干态拉伸强度(纵向)") {
                  if (c.v.ps != undefined && c.v.ps.value === "单位") {
                    if (c.v.v) {
                      c.v.v = c.v.v.replace(/\s*/g, "");
                      c.v.v = c.v.v.replace(/[\n\r\s]*/g, "");
                    }
                    str2 = str + c.v.v;
                    unit2 = c.v.v;
@@ -1916,13 +2029,13 @@
                    undefined
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItemClass;
                inspectionItemClass = inspectionItemClass.replace(/\s*/g, "");
                inspectionItemClass = inspectionItemClass.replace(/[\n\r\s]*/g, "");
                let inspectionItem =
                  this.currentSample.insProduct[i].inspectionItem == null ||
                    this.currentSample.insProduct[i].inspectionItem == undefined
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItem;
                inspectionItem = inspectionItem.replace(/\s*/g, "");
                inspectionItem = inspectionItem.replace(/[\n\r\s]*/g, "");
                let inspectionItemSubclass =
                  this.currentSample.insProduct[i].inspectionItemSubclass ==
                    null ||
@@ -1931,7 +2044,7 @@
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItemSubclass;
                inspectionItemSubclass = inspectionItemSubclass.replace(
                  /\s*/g,
                  /[\n\r\s]*/g,
                  ""
                );
                if (inspectionItemSubclass === "干态拉伸强度(纵向)") {
@@ -2646,11 +2759,11 @@
        this.$message.error("请指定复核人员");
        return;
      }
      if (!this.otherForm.humidity) {
      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;
      }
@@ -2677,7 +2790,7 @@
                this.confirmSubmit(false)
              });
            }else{
              this.confirmSubmit(false)
              this.confirmSubmit(true)
            }
          } else {
            let newData = [];
src/views/business/materialOrder/customsInspectionOrder.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container">
    <div>
    <div v-show="!cableConfigShow&&!auxiliaryShow">
      <div class="header">
        <div>
          <span>采购订单信息</span>
@@ -24,6 +24,8 @@
          <el-button v-show="active==1" size="small" @click="templateDia=true">
            <span style="color: #3A7BFA;">保存模板</span>
          </el-button>
          <el-button v-if="active==1&&addObj.sample!=undefined&&(addObj.sample.indexOf('电缆')>-1 ||addObj.sample.indexOf('综合')>-1)" size="small" type="primary" @click="openCableConfig">电缆配置</el-button>
          <el-button v-if="active==1&&addObj.sample!=undefined&&addObj.sample.indexOf('电缆')>-1" size="small" type="primary" @click="openAuxiliaryCore">辅助线芯配置</el-button>
          <el-button v-show="active==1 && addObj.orderType === '进厂检验'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">免检</el-button>
          <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button>
          <el-button size="small" @click="goBack">
@@ -32,7 +34,7 @@
        </div>
      </div>
    </div>
    <div class="search">
    <div class="search"  v-show="!cableConfigShow&&!auxiliaryShow">
      <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
        <el-row>
          <el-col :span="6">
@@ -145,7 +147,7 @@
        </el-row>
      </el-form>
    </div>
    <div>
    <div  v-show="!cableConfigShow&&!auxiliaryShow">
      <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
        <div v-if="active==1">
          <el-form :inline="true" :model="addObj1" label-width="90px">
@@ -325,7 +327,7 @@
        <el-table-column :filter-method="filterHandler" :filters="filters" label="子实验室" min-width="130" prop="sonLaboratory"
                         show-overflow-tooltip></el-table-column>
      </el-table>
    </div>
    </div >
    <!--特殊值处理框-->
    <el-dialog :before-close="beforeClose" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
               :visible.sync="bsm1DiaAll"
@@ -433,6 +435,10 @@
        <el-button :loading="noNeedCheckLoad" type="primary" @click="handleNoNeedCheck">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!--电缆配置-->
    <cableConfig v-if="cableConfigShow" ref="cableConfigShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd="goBackAdd"/>
    <!--辅助线芯配置-->
    <auxiliary-wire-core v-if="auxiliaryShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd2="goBackAdd2"></auxiliary-wire-core>
  </div>
</template>
@@ -444,22 +450,30 @@
  delRawMaterOrderTemplate,
  getInsOrder,
  getUserNow,
  notificationRawOrder, selectRawMaterOrderTemplate,
  notificationRawOrder,
  selectRawMaterOrderTemplate,
  selectRawMaterOrderTemplateById,
  selectsStandardMethodByFLSSM,
  selectStandardMethodEnum,
  selectStandardProductList,
  selectStandardTreeListByPartNo
} from "@/api/business/rawMaterialOrder";
import {dateFormat} from "@/utils/date";
import AuxiliaryWireCore from "../productOrder/components/auxiliaryWireCore.vue";
import cableConfig from "../productOrder/components/cable-config.vue";
export default {
  name: "CustomsInspectionOrder",
  dicts: ['check_type', 'urgency_level'],
  components: {},
  components: {cableConfig, AuxiliaryWireCore},
  props: {
  },
  data() {
    return {
      cableConfigShow: false,
      auxiliaryShow: false,
      isSpecial: false,
      sampleSelectionList: [],//样品表格选中数据
      isOutsourcing: 'f',//是否外购成品
      customsInspection: {},
      orderType: '',
      active: 0,
@@ -614,6 +628,17 @@
    //   this.addObj.method = null
    //   this.productList = []
    // },
    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
        }
      }
    },
    productList: {
      deep: true,
      handler(val) {
@@ -643,6 +668,7 @@
  created() {
    this.active = this.$route.query.active
    this.orderType = this.$route.query.orderType
    this.isOutsourcing = this.$route.query.isOutsourcing
    this.currentId = this.$route.query.currentId
    this.isReport = this.$route.query.isReport
    this.customsInspection = this.$route.query.customsInspection
@@ -651,6 +677,7 @@
  activated() {
    this.active = this.$route.query.active
    this.orderType = this.$route.query.orderType
    this.isOutsourcing = this.$route.query.isOutsourcing
    this.currentId = this.$route.query.currentId
    this.isReport = this.$route.query.isReport
    this.customsInspection = this.$route.query.customsInspection
@@ -660,6 +687,82 @@
  //   this.getInfo() // èŽ·å–æ•°æ®
  // },
  methods: {
    goBackAdd () {
      this.cableConfigShow = false
    },
    goBackAdd2 () {
      this.auxiliaryShow = false
    },
    // ç¼–辑要求值表格
    editSpecial () {
      this.isSpecial = true
      this.$nextTick(() => {
        this.$refs.productTable.doLayout();
      });
    },
    areObjectsValuesEqual (objects, property) {
      if (!objects || objects.length === 0) return false;
      const firstValue = objects[0][property];
      return objects.every(obj => obj[property] === firstValue);
    },
    // è¾…助线芯配置
    openAuxiliaryCore () {
      if (this.active == 1) {
        if (this.sampleIds.length === 0) {
          this.$message.error("未选择样品")
        } else if (this.sampleIds.length === 1) {
          if (!this.sampleSelectionList[0].standardMethodListId) {
            this.$message.error("样品未选择检验标准")
            return
          }
          this.auxiliaryShow = true
        } else {
          // åŒæ—¶é…ç½®å¤šä¸ªæ ·å“çš„电缆配置时必须选择相同的检验标准
          if (!this.sampleSelectionList.every(value => value.standardMethodListId)) {
            this.$message.error("样品未选择检验标准")
          } else {
            if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) {
              this.$message.error("请选择相同的检验标准")
              return
            }
            this.auxiliaryShow = true
          }
        }
      } else {
        if (this.sampleId === null) {
          this.$message.error('未选中样品')
        }
      }
    },
    //打开电缆配置弹框
    openCableConfig() {
      if (this.active == 1) {
        if (this.sampleIds.length === 0) {
          this.$message.error("未选择样品")
        } else if (this.sampleIds.length === 1) {
          if (!this.sampleSelectionList[0].standardMethodListId) {
            this.$message.error("样品未选择检验标准")
            return
          }
          this.cableConfigShow = true
        } else {
          // åŒæ—¶é…ç½®å¤šä¸ªæ ·å“çš„电缆配置时必须选择相同的检验标准
          if (!this.sampleSelectionList.every(value => value.standardMethodListId)) {
            this.$message.error("样品未选择检验标准")
          } else {
            if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) {
              this.$message.error("请选择相同的检验标准")
              return
            }
            this.cableConfigShow = true
          }
        }
      } else {
        if (this.sampleId === null) {
          this.$message.error('未选中样品')
        }
      }
    },
    save1 () {
      if (this.bsm1DiaList.length > 0) {
        this.bsm1DiaList.forEach(item => {
@@ -747,7 +850,7 @@
            })
          }
        })
      } else {
      } else{
        notificationRawOrder({ifsInventoryId:this.customsInspection.id}).then(res => {
          if (res.code === 200) {
            if (res.data === 1) {
@@ -771,7 +874,9 @@
            this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate)
            this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo)
            this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser)
            this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
            if(this.isOutsourcing==='f'){
              this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
            }
            this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
            this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
            this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
@@ -1442,6 +1547,9 @@
      })
    },
    getProNum() {
      this.sampleSelectionList.forEach((m, i) => {
        this.$set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
      })
      this.$refs.sampleTable.doLayout()
    },
    methodFocus() {
@@ -1511,6 +1619,7 @@
      val.forEach(a => {
        this.sampleIds.push(a.id)
      })
      this.sampleSelectionList = val
    },
    // é€‰ä¸­è¡¨æ ¼è¡Œçš„回调
    rowClick(row, column, event) {
@@ -1524,7 +1633,11 @@
      this.sampleId = row.id
      if (this.active !== 1) {
        this.sampleIds = []
        this.sampleIds.push(row.id)
        this.sampleSelectionList.forEach(ele=>{
          if(ele.id == row.id){
            this.sampleIds.push(row.id)
          }
        })
      }
      // this.productList = row.insProduct
      if (this.productList !== null) {
src/views/business/materialOrder/index.vue
@@ -1190,11 +1190,11 @@
    },
    // ä¸‹å•
    playOrder(row) {
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } });
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 0, customsInspection: row, active: 1 } });
    },
    // å­£åº¦æ£€éªŒä¸‹å•
    playOrderSec(row) {
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } });
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 1, customsInspection: row, active: 1 } });
    },
    // ç‚¹å‡»æ ·å“åç§°æŸ¥çœ‹è¯¦æƒ…
    selectAllByOne(row) {
src/views/business/outsourcingFinishProduct/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1270 @@
<template>
  <div class="app-container">
    <div>
      <div class="search">
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <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>
            <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-item label="供应商名称" prop="supplierName"
                        v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
            <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" placeholder="选择日期" @change="goSearch"
                            range-separator="至" size="small" start-placeholder="开始日期" type="daterange" value-format="yyyy-MM-dd">
            </el-date-picker>
          </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="'calc(100vh - 290px)'"
                      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="'calc(100vh - 290px)'" 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="'calc(100vh - 290px)'" 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="'calc(100vh - 290px)'" 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')">撤销季度检验下单</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;">季度检验原始数据</span>
        <el-link :disabled="!insInfo.quarterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px"
                 type="primary" @click="viewInsInfo1">查看</el-link>
      </div>
    </el-dialog>
    <!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
    <!--                :sonLaboratory="'原材料'" :state="state"-->
    <!--                :typeSource="typeSource"-->
    <!--                @goback="goback" @refreshView="refreshView"/>-->
  </div>
</template>
<script>
import PrintDialog from "@/views/business/materialOrderComponents/materialOrder/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 {
  getWarehouseSubmit,
  concessionRelease,
  getIfsByAll,
  getIfsByOver,
  getIfsByQuarter,
  getIfsByStateOne,
  rawAllExport,
  rawOrderRelease,
  repealEnterRawOrder,
  repealQuarterRawOrder,
  revokeInspectionReport,
  updateEntrustCode
} from "@/api/business/outsourcingFinishProductInspection";
import {mapGetters} from "vuex";
export default {
  name: "MaterialOrder",
  // import å¼•入的组件需要注入到对象中才能使用
  components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      tableData: [],
      tableLoading: false,
      column: [
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        {
          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: '批号', 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' },
        {
          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: '委托编号',
          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' },
        {
          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: '报告下载',
              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: '季度撤销',
              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: '委托编号', 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' },
        {
          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);
              },
            }
          ]
        }
      ],
      page3: {
        total: 0,
        size: 20,
        current: 1
      },
      entity: {
        updateBatchNo: null,
        entrustCode: null,
        partDesc: null,
        supplierName: null,
        sampleModel: null,
        partNo: null,
        inspectStatus: null,
        date: null,
        beginDeclareDate: null,
        endDeclareDate: null,
      },
      tabList: [
        {
          label: '待下单',
          value: 0
        },
        {
          label: '检验中',
          value: 1
        },
        {
          label: '已检验',
          value: 2
        },
        {
          label: '季度检验',
          value: 4
        },
        {
          label: '全部',
          value: 3
        }
      ],
      more: false,
      tabIndex: '',
      multipleSelection: [],
      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'])
  },
  mounted() {
    if (this.checkPermi(['get:raw:await'])) {
      this.tabIndex = 0
    } else {
      this.tabIndex = 2
    }
    this.refreshTable()
  },
  activated () {
    this.refreshTable()
  },
  // æ–¹æ³•集合
  methods: {
    // ç‚¹å‡»æŸ¥è¯¢å›žè°ƒ
    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) {
        // æŸ¥è¯¢å­£åº¦æ£€éªŒ
        this.getIfsByQuarterList()
      } else {
        // å…¨éƒ¨æŸ¥è¯¢
        this.getIfsByAllList()
      }
    },
    // å¾…下单查询
    getPurchaseOrderList() {
      this.tableLoading = true
      const params = { ...this.entity, 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, 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, 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
      })
    },
    // æŸ¥è¯¢å­£åº¦æ£€éªŒ
    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, ...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, 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.refresh()
          }
        })
      }).catch(() => {
        this.$message({
          type: 'error',
          message: '放行失败'
        });
      });
    },
    // å­£åº¦æ’¤é”€
    repealQuarter(row) {
      this.$confirm('是否撤销季度下单?', "警告", {
        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) {
      this.$router.push({ path: "/outsourcingFinishProduct/customsInspectionOrder", query: {isOutsourcing:'t', orderType: 0, customsInspection: row, active: 1 } });
    },
    // ç‚¹å‡»æ ·å“åç§°æŸ¥çœ‹è¯¦æƒ…
    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.refresh()
        }
        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('是否撤销季度下单?', "警告", {
          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}
      }
      rawAllExport(params).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '原材料检测信息导出.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>
src/views/business/rawMaterialInspection/index.vue
@@ -47,6 +47,12 @@
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item>
          <el-form-item label="销售订单分类" prop="orderType" v-if="(tabIndex === 3 || tabIndex === 4) && more">
            <el-select v-model="componentData.orderType" clearable size="small"
              @keyup.enter.native="refreshTable">
              <el-option v-for="(item,index) in orderTypeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
            </el-select>
          </el-form-item>
        </el-row>
      </el-form>
    </div>
@@ -65,7 +71,7 @@
            @click="handleDown">导出</el-button>
          <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary"
            @click="openIFS">获取IFS订单</el-button>
          <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">报检</el-button>
          <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">批量报检</el-button>
          <el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">新增报检信息</el-button>
        </div>
      </div>
@@ -83,17 +89,24 @@
      </div>
    </div>
    <!-- æ‰¹é‡æŠ¥æ£€ -->
    <el-dialog :visible.sync="declareDialogSVisible" title="确认报检" width="30%">
      <p style="font-size:16px;color:#333333">是否确认报检选择的数据?</p>
    <el-dialog :visible.sync="declareDialogSVisible" title="批量报检" width="30%" :before-close="resetBatchFormData">
      <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-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="declareDialogSVisible = false">取 æ¶ˆ</el-button>
          <el-button @click="resetBatchFormData()">取 æ¶ˆ</el-button>
          <el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">ç¡® å®š</el-button>
        </el-row>
      </span>
    </el-dialog>
    <!-- ç¡®è®¤æŠ¥æ£€ -->
    <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '新增报检信息' : '原材料报检'"
    <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '新增报检信息' : '销售订单报检'"
      :visible.sync="declareDialogVisible" width="800px" @close="resetFormData">
      <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px"
        label-position="right">
@@ -139,6 +152,11 @@
          <el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable
            size="small">
            <el-option :value="1" label="过期物料"></el-option>
          </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-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
@@ -259,12 +277,15 @@
  addIfsInventoryQuantity,
  advancedGodown,
  concessionRelease, delIfsInventory,
  getIfsByAll,
  getIfsByFinish,
  getIfsOrder,
  getWarehouseSubmit, inspectionReport, inspectionReportOne, rawAllExport,
  revokeInspectionReport,downloadTemplate,confirmSplitOrder
} from '@/api/business/materialInspection'
import {
  getIfsByAll,
  getIfsByFinish,
} from '@/api/business/ifsOrderInspection'
import { getDicts } from "@/api/system/dict/data";
import limsTable from "@/components/Table/lims-table.vue";
import {transformExcel} from '@/utils/file'
@@ -280,6 +301,14 @@
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      declareBatchObj:{
        orderType:''
      },
      declareObjBatchRules:{
        orderType: [
          { required: true, message: '请选择销售订单分类', trigger: 'change' }
        ],
      },
      confirmSplitOrderLoading: false,
      detailDataLoading: false,
      pushToMes:false,//是否同步到mes
@@ -434,6 +463,7 @@
          }
        },
        { label: '订单号', prop: 'orderNo' },
        { label: '订单分类', prop: 'orderTypeName' },
        { label: '抵达的采购数量', prop: 'purQtyInStore',width:'160px' },
        { label: '报检时间', prop: 'declareDate' },
        { label: '批号', prop: 'updateBatchNo' },
@@ -549,6 +579,7 @@
        receiverDate: '', // æŽ¥æ”¶æ—¶é—´
        buyUnitMeas: '', // å•位
        isExpire: '', // å•位
        orderType: null, // é”€å”®è®¢å•分类
      },
      componentData: { // è¡¨æ ¼æ•°æ®
        updateBatchNo: null,
@@ -558,6 +589,7 @@
        date: null,
        entrustCode: '',
        inspectStatus: '',
        orderType: null,
      },
      declareDialogVisible1: false,
      upLoad: false,
@@ -594,6 +626,9 @@
        buyUnitMeas: [
          { required: false, message: '请填写单位', trigger: 'blur' }
        ],
        orderType: [
          { required: true, message: '请选择销售订单分类', trigger: 'change' }
        ],
      },
      tabList: [
        {
@@ -628,13 +663,24 @@
      ],
      outLoading: false,
      upLoading: false,
      orderTypeList: [],
    }
  },
  mounted() {
    this.refreshTable()
    this.getOrderTypeList()
  },
  // æ–¹æ³•集合
  methods: {
    getOrderTypeList(){
      getDicts('inspection_type').then(res=>{
        if(res.code === 200){
          this.orderTypeList = res.data
        }
      }).catch(error=>{
        console.error(error)
      })
    },
    resetOrderSplitData(){
      this.orderSplitBasicData = []
      this.orderSplitDetailData = []
@@ -713,6 +759,9 @@
    // åˆ‡æ¢tab表格
    handleTab(m) {
      this.tabIndex = m;
      if([0,1].includes(this.tabIndex)){
        this.componentData.orderType = null
      }
      this.refreshTable()
    },
    // æŸ¥è¯¢å›žè°ƒ
@@ -883,21 +932,28 @@
    },
    // æäº¤æ‰¹é‡æŠ¥æ£€
    submitDeclareS() {
      let ids = []
      this.multipleSelection.forEach(item => {
        ids.push(item.id)
      })
      this.declareDialogSVisible = true
      inspectionReport({ ids: ids }).then(res => {
        if (res.code === 200) {
          this.declareDialogSVisible = false
          this.$message.success('报检成功')
          this.refreshTable()
      this.$refs.declareBatchObj.validate(valid=>{
        if(valid){
          let ids = []
          this.multipleSelection.forEach(item => {
            ids.push(item.id)
          })
          this.declareDialogSVisible = true
          inspectionReport({
            ids: ids,
            orderType: this.declareBatchObj.orderType
          }).then(res => {
            if (res.code === 200) {
              this.declareDialogSVisible = false
              this.$message.success('报检成功')
              this.refreshTable()
            }
            this.submitDeclareLoading = false
          }).catch(err => {
            this.submitDeclareLoading = false
            console.log(err)
          })
        }
        this.submitDeclareLoading = false
      }).catch(err => {
        this.submitDeclareLoading = false
        console.log(err)
      })
    },
    // æ‰“开报检确认弹框
@@ -943,7 +999,8 @@
          if (valid) {
            inspectionReportOne({
              id: this.declareObj.id,
              updateBatchNo: this.declareObj.updateBatchNo
              updateBatchNo: this.declareObj.updateBatchNo,
              orderType: this.declareObj.orderType
            }).then(res => {
              if (res.code === 200) {
                this.declareDialogVisible = false
@@ -961,8 +1018,12 @@
      }
    },
    resetFormData() {
      this.$refs['declareObj'].resetFields();
      this.$refs.declareObj.resetFields();
      this.declareDialogVisible = false
    },
    resetBatchFormData() {
      this.$refs.declareBatchObj.resetFields();
      this.declareDialogSVisible = false
    },
    // æ‰“开删除弹框
    deleteMaterial(row) {
@@ -1023,6 +1084,7 @@
        receiverDate: '', // æŽ¥æ”¶æ—¶é—´
        buyUnitMeas: '', // å•位
        isExpire: '', // å•位
        orderType: null, // é”€å”®è®¢å•分类
      }
    }
  },
src/views/standard/standardLibrary/index.vue
@@ -19,38 +19,68 @@
          scrollbar-width: none;
        " @node-click="handleNodeClick"
               @node-drop="handleDrop">
        <div slot-scope="{ node, data }" class="custom-tree-node">
          <el-row style="width: 100%">
            <el-col :class="{ sort: node.level > 3 }" :span="19" :title="data.label" style="text-align: left">
              <span>
                <i :class="`node_i ${data.children != undefined
                  ? data.code === '[1]'
                    ? 'el-icon-folder-opened'
                    : 'el-icon-folder'
                  : 'el-icon-tickets'
                  }`"></i>
                {{ data.label }}
              </span>
            </el-col>
            <el-col v-if="
              checkPermi(['standard:standardLibrary:delStandardTree']) &&
              (node.data.children === null ||
                node.data.children === undefined)
            " :span="2" style="text-align: right">
              <el-button size="mini" type="text" @click.stop="editTreeName(node.data)">
        <div slot-scope="{ node, data }" class="custom-tree-node" style="width: calc(100% - 15px)">
          <div style="display: flex;align-items: center;flex-wrap: nowrap;flex-direction: row;justify-content: space-between;">
            <div style="width: calc(100% - 50px);text-overflow: ellipsis;white-space: nowrap;"
                 :style="`overflow:${(node.data.children === null || node.data.children === undefined)?'clip':'visible'}`"
            >
              <i :class="`node_i ${data.children != undefined
                ? data.code === '[1]'
                  ? 'el-icon-folder-opened'
                  : 'el-icon-folder'
                : 'el-icon-tickets'
                }`"></i>
              {{data.label}}
            </div>
            <div v-if="(node.data.children === null || node.data.children === undefined)" style="width:50px">
              <el-button v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text" @click.stop="editTreeName(node.data)">
                <i class="el-icon-edit"></i>
              </el-button>
            </el-col>
            <el-col v-if="
              checkPermi(['standard:standardLibrary:delStandardTree']) &&
              (node.data.children === null ||
                node.data.children === undefined)
            " :span="2" style="text-align: right">
              <el-button size="mini" type="text" @click.stop="remove(node, data)">
              <el-button style="margin-left: 0" size="mini" v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" type="text" @click.stop="remove(node, data)">
                <i class="el-icon-delete"></i>
              </el-button>
            </el-col>
          </el-row>
            </div>
          </div>
<!--          <div style="display: inline-block;width: calc(100% - 60px);text-overflow: ellipsis;white-space: nowrap;" :style="`overflow:${(node.data.children === null || node.data.children === undefined)?'clip':'visible'}`">-->
<!--              <i :class="`node_i ${data.children != undefined-->
<!--                ? data.code === '[1]'-->
<!--                  ? 'el-icon-folder-opened'-->
<!--                  : 'el-icon-folder'-->
<!--                : 'el-icon-tickets'-->
<!--                }`"></i>-->
<!--              {{ data.label }}-->
<!--          </div>-->
<!--          <span v-if="(node.data.children === null || node.data.children === undefined)" style="text-align: right">-->
<!--              <el-button style="width:20px" v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text" @click.stop="editTreeName(node.data)">-->
<!--                <i class="el-icon-edit"></i>-->
<!--              </el-button>-->
<!--              <el-button style="width:20px;margin-left: 0" size="mini" v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" type="text" @click.stop="remove(node, data)">-->
<!--                <i class="el-icon-delete"></i>-->
<!--              </el-button>-->
<!--          </span>-->
<!--          <el-row style="width: 100%">-->
<!--            <el-col :class="{ sort: node.level > 3 }" :span="19" :title="data.label" style="text-align: left">-->
<!--            </el-col>-->
<!--            <el-col v-if="-->
<!--              checkPermi(['standard:standardLibrary:delStandardTree']) &&-->
<!--              (node.data.children === null ||-->
<!--                node.data.children === undefined)-->
<!--            " :span="2" style="text-align: right">-->
<!--            </el-col>-->
<!--            <el-col v-if="-->
<!--              checkPermi(['standard:standardLibrary:delStandardTree']) &&-->
<!--              (node.data.children === null ||-->
<!--                node.data.children === undefined)-->
<!--            " :span="2" style="text-align: right">-->
<!--            </el-col>-->
<!--          </el-row>-->
        </div>
      </el-tree>
    </div>
src/workers/DataWorker.worker.js
@@ -17,7 +17,6 @@
  const data = JSON.parse(event.data);
  dataAcquisitionInfo = data.dataAcquisitionInfo;
  list = data.list;
  // console.log(111,dataAcquisitionInfo)
  arrSpecial = []
  // å¤„理数据
  handleData()