spring
2025-02-20 1aa5952ed531348d22ac907aefdfb035bd160206
检验任务完成80%
已修改10个文件
已添加4个文件
1650 ■■■■ 文件已修改
src/api/business/inspectionTask.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/unpass.js 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/method/standardMethod.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/performance/class.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/performance/manHour.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/model.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/standardLibrary.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 495 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/PurchaseVerification.vue 376 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/addUnPass.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/unPassDialog.vue 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/inspectionTask.js
@@ -1,3 +1,4 @@
// æ£€éªŒä»»åŠ¡ç›¸å…³æŽ¥å£
import request from "@/utils/request";
// é€šè¿‡æ£€éªŒå•查询检验数据(数据查看)
src/api/business/unpass.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
// ä¸åˆæ ¼ç®¡ç†ç›¸å…³æŽ¥å£
import request from "@/utils/request";
//查询进货验证信息
export function getFactoryVerify(query) {
  return request({
    url: "/insOrderPlan/getFactoryVerify",
    method: "get",
    params: query,
  });
}
// ä¿å­˜è¿›è´§åŽŸå§‹è®°å½•
export function addFactoryVerify(data) {
  return request({
    url: "/insOrderPlan/addFactoryVerify",
    method: "post",
    data: data,
  });
}
//查询不合格的检验项
export function getInsProductUnqualified(query) {
  return request({
    url: "/insOrderPlan/getInsProductUnqualified",
    method: "get",
    params: query,
  });
}
// æäº¤éœ€è¦å¤æµ‹çš„æ£€éªŒé¡¹
export function addUnqualifiedRetest(data) {
  return request({
    url: "/insOrderPlan/addUnqualifiedRetest",
    method: "post",
    data: data,
  });
}
// æŸ¥è¯¢æ£€éªŒä¸‹å•内容详情
export function getInsOrder(query) {
  return request({
    url: "/insOrder/getInsOrder",
    method: "get",
    params: query,
  });
}
// æŸ¥çœ‹OA详情
export function getUnqualifiedHandler(query) {
  return request({
    url: "/unqualifiedHandler/getUnqualifiedHandler",
    method: "get",
    params: query,
  });
}
// ä¸‹è½½OA附件
export function downFile(query) {
  return request({
    url: "/unqualifiedHandler/downFile",
    method: "get",
    params: query,
  });
}
// æäº¤ä¸åˆæ ¼å¤„理
export function addUnqualifiedHandler(data) {
  return request({
    url: "/unqualifiedHandler/addUnqualifiedHandler",
    method: "post",
    data: data,
  });
}
src/api/cnas/process/method/standardMethod.js
@@ -1,3 +1,4 @@
// å®žéªŒå®¤çš„æ£€æµ‹èƒ½åŠ›æ¡£æ¡ˆç›¸å…³æŽ¥å£
import request from "@/utils/request";
//获取标准方法列表
src/api/performance/class.js
@@ -1,3 +1,5 @@
// ç­æ¬¡ç›¸å…³æŽ¥å£
import request from "@/utils/request";
// ç»©æ•ˆç®¡ç†-班次-分页查询
src/api/performance/manHour.js
@@ -1,3 +1,5 @@
// å·¥æ—¶ç®¡ç†ç›¸å…³æŽ¥å£
import request from "@/utils/request";
// æŸ¥è¯¢å·¥æ—¶æ±‡æ€»
src/api/standard/model.js
@@ -1,3 +1,5 @@
// åŽŸå§‹è®°å½•æ¨¡æ¿ç›¸å…³æŽ¥å£
import request from "@/utils/request";
// æŸ¥è¯¢å®¢æˆ·åˆ—表
src/api/standard/standardLibrary.js
@@ -1,3 +1,5 @@
// æ ‡å‡†åº“相关接口
import request from "@/utils/request";
// æ ‡å‡†åº“树排序
src/views/business/inspectionTask/index.vue
@@ -89,7 +89,7 @@
</style>
<template>
  <div class="ins-order-plan-main">
    <div v-show="activeFace == 0" style="height: 100%">
    <div style="height: 100%">
      <div class="search">
        <div class="search_thing">
          <div class="search_label">委托编号:</div>
@@ -178,31 +178,6 @@
        <el-button :loading="loading" type="primary" @click="confirmConnect">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <div v-if="activeFace > 0 && isCopper == null" style="width: 100%; height: 100%">
      <!-- <Add :active="activeFace" :currentId="currentId" :examine="examine" /> -->
    </div>
    <div v-if="activeFace > 0 && isCopper == 0" style="width: 100%; height: 100%">
      <!-- <CustomsInspection
        :active="activeFace"
        :currentId="currentId"
        :customsInspection="customsInspection"
        :isReport="isReport"
      /> -->
    </div>
    <div v-if="activeFace > 0 && isCopper == 1" style="width: 100%; height: 100%">
      <!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder> -->
    </div>
    <!--<Inspection
      v-if="state > 0"
      :key="InspectionKey"
      :inspectorList="inspectorList"
      :orderId="orderId"
      :sonLaboratory="sonLaboratory"
      :state="state"
      :typeSource="typeSource"
      @goback="goback"
      @refreshView="refreshView"
    />-->
    <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%">
      <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
        <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
@@ -261,13 +236,7 @@
</template>
<script>
import ValueTable from "@/components/Table/value-table.vue";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
// import CustomsInspection from "../do/b1-material-ins-order/customs-inspection.vue";
import { getYearAndMonthAndDays } from "@/utils/date";
// import Add from "../do/b1-ins-order/add.vue";
// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
// import CopperOrder from "../do/b1-material-ins-order/copper-order.vue";
import EditInspectionItem from "./components/EditInspectionItem.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {
@@ -286,13 +255,7 @@
export default {
  components: {
    EditInspectionItem,
    // CopperOrder,
    // ShowInfo,
    ValueTable,
    limsTable,
    // Inspection,
    // Add,
    // CustomsInspection,
  },
  dicts: ["urgency_level", "inspection_task_state"],
  computed: {
@@ -384,14 +347,15 @@
        {
          label: "委托编号",
          prop: "entrustCode",
          width: "140px",
          width: "160px",
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: "样品名称", prop: "sample", width: "140px" },
        { label: "样品名称", prop: "sample", width: "160px" },
        {
          label: "下单类别",
          prop: "typeSource",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
@@ -413,6 +377,7 @@
        {
          label: "检验类型",
          prop: "orderType",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            return this.orderTypeList.find((m) => m.value == params).label;
@@ -794,6 +759,39 @@
      this.examine = 1;
      this.isReport = 0;
      this.currentId = parseInt(row.id);
      switch (row.isCopper) {
        case 0:
          // åŽŸææ–™
          this.$router.push({
            path: "/materialOrder/customsInspection", query: {
              customsInspection: row,
              active: this.activeFace,
              currentId: this.currentId,
              isReport: this.isReport
            }
          });
          break;
        case null:
          // æˆå“
          this.$router.push({
            path: "/productOrder/add", query: {
              examine: this.examine,
              active: this.activeFace,
              currentId: this.currentId
            }
          });
          break;
        case 1:
          // é“œæ
          this.$router.push({
            path: "/materialOrder/copperOrder", query: {
              active: this.activeFace,
              currentId: this.currentId
            }
          });
          break;
      }
    },
    playOrder(num) {
      this.activeFace = num;
@@ -843,6 +841,16 @@
      this.state = 3;
      this.typeSource = row.typeSource;
      this.orderId = row.id;
      this.$router.push({
        path: "/inspectionTask/inspection",
        query: {
          inspectorList: this.inspectorList,
          sonLaboratory: this.sonLaboratory,
          state: this.state,
          typeSource: this.typeSource,
          orderId: this.orderId,
        },
      });
    },
    handleConnect(row) {
      this.orderId = row.id;
src/views/business/inspectionTask/inspection.vue
@@ -1,5 +1,5 @@
<template>
  <div v-loading="loading" class="inspection">
  <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-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
@@ -17,7 +17,7 @@
        </el-form>
      </el-col>
      <el-col :span="16" style="text-align: right">
        <!-- <el-button size="small" type="primary" @click="refreshView">刷新</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"
          @click="openUnPassDialog('add')">不合格处理</el-button>
@@ -31,7 +31,7 @@
        <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">通过</el-button>
        <el-button v-if="state == 2" size="medium" @click="upInsReview(0)">不通过</el-button>
        <el-button type="primary" size="small" @click="exportTable('myTable')">下载原始记录</el-button>
        <el-button size="small" @click="$emit('goback')">返回</el-button>
        <el-button size="small" @click="goback">返回</el-button>
      </el-col>
    </el-row>
    <div class="search">
@@ -78,7 +78,6 @@
          <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
        </el-form-item>
      </el-form>
      <el-divider></el-divider>
    </div>
    <div class="center">
      <div class="search" style="
@@ -292,7 +291,7 @@
                      state == 1
                    "><span :style="`font-family:${n.v.ff} !important;`">{{
                      toFixed(n.v.v, n.v.ct)
                        }}</span></template>
                    }}</span></template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '最终值' &&
@@ -505,44 +504,25 @@
        <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!-- <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
      @resetAddUnPass="resetAddUnPass"></add-un-pass> -->
    <!-- <UnPassDialog
      v-if="unPassDialog"
      ref="unPassDialog"
      :orderId="orderId"
      :unPassDialog="unPassDialog"
      @resetForm="resetForm"
    ></UnPassDialog> -->
    <!-- <InspectionWord
      v-if="unPassCheck"
      :inspectorList="inspectorList"
      :orderId="orderId"
      :rawMaterialTag="rawMaterialTag"
      :sonLaboratory="sonLaboratory"
      :state="state"
      :typeSource="typeSource"
      :unPassCheck="unPassCheck"
      @closeUnPassCheckDialog="closeUnPassCheckDialog"
      @refreshView="refreshView"
    /> -->
    <!-- <purchase-verification
      v-if="purchaseDialog"
      ref="purchaseDialog"
      :orderId="orderId"
      :purchaseDialog="purchaseDialog"
      @resetPurchaseDialog="resetPurchaseDialog"
    ></purchase-verification> -->
    <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
      @resetAddUnPass="resetAddUnPass"></add-un-pass>
    <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
      @resetForm="resetForm"></UnPassDialog>
    <!-- <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
      :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
      :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" /> -->
    <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
      :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
  </div>
</template>
<script>
import excelFunction from "@/utils/excelFountion";
import limsTable from "@/components/Table/lims-table.vue";
// import UnPassDialog from "../b1-unpass-manage/unPassDialog.vue";
// import AddUnPass from "../b1-unpass-manage/addUnPass.vue";
// import InspectionWord from "./InspectionWord.vue";
// import PurchaseVerification from "../b1-unpass-manage/PurchaseVerification.vue";
import UnPassDialog from "../unpass/components/addUnPass.vue";
import AddUnPass from "../unpass/components/addUnPass.vue";
// import InspectionWord from "./components/InspectionWord.vue";
import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
import {
  doInsOrder,
  getCableTag,
@@ -567,12 +547,11 @@
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
export default {
  // props: ["sonLaboratory", "orderId", "state", "inspectorList", "typeSource"],
  components: {
    // PurchaseVerification,
    // AddUnPass,
    PurchaseVerification,
    AddUnPass,
    limsTable,
    // UnPassDialog,
    UnPassDialog,
    // InspectionWord,
  },
  data() {
@@ -821,65 +800,7 @@
  watch: {
    // ç›‘听任务id,获取任务信息
    id(val) {
      this.loading = true;
      doInsOrder({
        id: val,
        laboratory: this.sonLaboratory,
      }).then(async (res) => {
        this.insOrder = res.data.insOrder;
        this.supplierDensity = res.data.supplierDensity;
        this.getList()
        this.urgentList.forEach((m) => {
          if (m.value == this.insOrder.type) {
            this.insOrder.typeName = m.label;
          }
        });
        this.loading = false;
        if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
          this.$emit("goback");
          return this.$message.error("该任务没有样品信息");
        }
        // èµ‹å€¼å½“前样品列表
        this.sampleProduct = res.data.sampleProduct;
        this.currentSample = this.HaveJson(this.sampleProduct[0]);
        let insProduct = this.HaveJson(this.currentSample.insProduct);
        // æ¸©åº¦ã€æ¹¿åº¦èµ‹å€¼
        this.otherForm = {
          temperature: this.insOrder.temperature
            ? this.insOrder.temperature
            : null,
          humidity: this.insOrder.humidity ? this.insOrder.humidity : null,
        };
        if (this.typeSource == "1") {
          this.getRawMaterialTag(this.currentSample.id); // åŽŸææ–™çš„æ£€éªŒä»»åŠ¡æŸ¥è¯¢æ‰¹æ•°
          this.rawMaterialTag = "1";
        }
        this.getEquipOptions(1);
        // èŽ·å–å½“å‰æ ·å“çš„æ£€éªŒé¡¹
        let list = await this.getCurrentProduct(this.currentSample.id, 0);
        this.currentSample.insProduct = this.HaveJson(list);
        // åˆå§‹åŒ–传递到后端的参数
        this.param = {};
        this.changeType = 0;
        this.currentSample.insProduct.forEach((a) => {
          this.param[a.id] = {
            insValue: [],
            comValue: [],
            resValue: null,
            equipValue: [],
            equipName: [],
            insResult: null,
          };
        });
        if (this.currentSample.index == undefined)
          this.currentSample["index"] = 1;
        let bushing = this.currentSample.bushing;
        this.getTableLists(); //处理模板列表信息
        this.currentKey = 1;
        this.getCableTag(this.currentSample.id); // æŸ¥è¯¢æ˜¯å¦æœ‰è¦å¤šæ¬¡æ£€éªŒçš„电缆配置
        this.getRepetitionTag(this.currentSample.id); // æŸ¥è¯¢æ˜¯å¦æœ‰è¦é‡å¤æ£€éªŒé¡¹
      });
      this.refreshView()
    },
    // ç›‘听当前模板变化
    currentTable(val1, val0) {
@@ -1009,9 +930,67 @@
      this.checkUser = "";
    },
    // åˆ·æ–°é¡µé¢
    // refreshView() {
    //   this.$emit("refreshView");
    // },
    refreshView() {
      this.loading = true;
      doInsOrder({
        id: this.id,
        laboratory: this.sonLaboratory,
      }).then(async (res) => {
        this.insOrder = res.data.insOrder;
        this.supplierDensity = res.data.supplierDensity;
        this.getList()
        this.urgentList.forEach((m) => {
          if (m.value == this.insOrder.type) {
            this.insOrder.typeName = m.label;
          }
        });
        this.loading = false;
        if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
          this.goback();
          return this.$message.error("该任务没有样品信息");
        }
        // èµ‹å€¼å½“前样品列表
        this.sampleProduct = res.data.sampleProduct;
        this.currentSample = this.HaveJson(this.sampleProduct[0]);
        let insProduct = this.HaveJson(this.currentSample.insProduct);
        // æ¸©åº¦ã€æ¹¿åº¦èµ‹å€¼
        this.otherForm = {
          temperature: this.insOrder.temperature
            ? this.insOrder.temperature
            : null,
          humidity: this.insOrder.humidity ? this.insOrder.humidity : null,
        };
        if (this.typeSource == "1") {
          this.getRawMaterialTag(this.currentSample.id); // åŽŸææ–™çš„æ£€éªŒä»»åŠ¡æŸ¥è¯¢æ‰¹æ•°
          this.rawMaterialTag = "1";
        }
        this.getEquipOptions(1);
        // èŽ·å–å½“å‰æ ·å“çš„æ£€éªŒé¡¹
        let list = await this.getCurrentProduct(this.currentSample.id, 0);
        this.currentSample.insProduct = this.HaveJson(list);
        // åˆå§‹åŒ–传递到后端的参数
        this.param = {};
        this.changeType = 0;
        this.currentSample.insProduct.forEach((a) => {
          this.param[a.id] = {
            insValue: [],
            comValue: [],
            resValue: null,
            equipValue: [],
            equipName: [],
            insResult: null,
          };
        });
        if (this.currentSample.index == undefined)
          this.currentSample["index"] = 1;
        let bushing = this.currentSample.bushing;
        this.getTableLists(); //处理模板列表信息
        this.currentKey = 1;
        this.getCableTag(this.currentSample.id); // æŸ¥è¯¢æ˜¯å¦æœ‰è¦å¤šæ¬¡æ£€éªŒçš„电缆配置
        this.getRepetitionTag(this.currentSample.id); // æŸ¥è¯¢æ˜¯å¦æœ‰è¦é‡å¤æ£€éªŒé¡¹
      });
    },
    closeUnPassCheckDialog() {
      this.unPassCheck = false;
    },
@@ -2565,7 +2544,7 @@
        }).then((res) => {
          if (res.code === 200) {
            this.$message.success("操作成功");
            this.$emit("goback");
            this.goback();
            this.addCheck = false;
          }
          this.reviewLoading = false;
@@ -2590,7 +2569,7 @@
        }).then((res) => {
          if (res.code === 200) {
            this.$message.success("操作成功");
            this.$emit("goback");
            this.goback();
          }
          this.reviewLoading = false;
        })
@@ -2631,7 +2610,7 @@
            }).then((res) => {
              if (res.code === 200) {
                this.$message.success("操作成功");
                this.$emit("goback");
                this.goback();
                this.submitLoading = false;
                this.addVerifyDia = false;
              }
@@ -2683,7 +2662,7 @@
                  if (res.code === 200) {
                    this.$message.success("操作成功");
                    this.addVerifyDia = false;
                    this.$emit("goback");
                    this.goback();
                  }
                  this.submitLoading = false;
                })
@@ -2926,14 +2905,13 @@
        return v;
      }
    },
    goback() {
      this.$tab.closeOpenPage({ path: "/business/inspectionTask" });
    }
  },
};
</script>
<style scoped>
>>>.el-divider {
  margin: 0 !important;
}
.custom-table .el-table__header-wrapper th {
  background-color: #87ceeb;
  /* åªå¯¹å¸¦æœ‰my-custom-table类的表格生效 */
@@ -2969,6 +2947,7 @@
  width: 100%;
  background-color: #fff;
  border-radius: 3px;
  margin-bottom: 10px;
}
.search .form-inline {
@@ -3136,9 +3115,9 @@
}
</style>
<style>
.inspection .el-form-item__label {
/* .inspection .el-form-item__label {
  color: #000;
}
} */
.inspection .el-drawer__header::before {
  content: "";
src/views/business/materialOrder/index.vue
@@ -3,60 +3,50 @@
    <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="refreshTable">
          </el-input>
        </el-form-item><el-form-item label="委托编号" prop="entrustCode">
          <el-input v-model="entity.entrustCode" clearable placeholder="请输入"
                    size="small"
                    @keyup.enter.native="refreshTable">
          </el-input>
        </el-form-item><el-form-item label="零件号" prop="partNo">
          <el-input v-model="entity.partNo" clearable placeholder="请输入"
                    size="small"
                    @keyup.enter.native="refreshTable">
          </el-input>
        </el-form-item><el-form-item label="零件描述" prop="partDesc">
          <el-input v-model="entity.partDesc" clearable placeholder="请输入"
                    size="small"
                    @keyup.enter.native="refreshTable">
          </el-input>
        </el-form-item>
            <el-input v-model="entity.updateBatchNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="委托编号" prop="entrustCode">
            <el-input v-model="entity.entrustCode" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件号" prop="partNo">
            <el-input v-model="entity.partNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件描述" prop="partDesc">
            <el-input v-model="entity.partDesc" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </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 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="refreshTable()">查询</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="refreshTable">
          <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="refreshTable">
            </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="refreshTable">
          <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="refreshTable">
            </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="refreshTable()">
          <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="refreshTable()">
              <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="选择日期"
              range-separator="至"
              size="small"
              start-placeholder="开始日期"
              type="daterange"
              value-format="yyyy-MM-dd">
            <el-date-picker v-model="entity.date" end-placeholder="结束日期" format="yyyy-MM-dd" placeholder="选择日期"
              range-separator="至" size="small" start-placeholder="开始日期" type="daterange" value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-form>
@@ -65,48 +55,45 @@
        <div class="table-tab">
          <div>
            <ul class="tab">
              <li v-for="(m,i) in tabList" :key="m.value" :class="{active:m.value===tabIndex}" @click="handleTab(m)">{{m.label}}</li>
              <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" @click="handleTab(m)">
                {{ m.label }}</li>
            </ul>
          </div>
          <div>
            <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary" @click="handleOut">导出</el-button>
            <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary"
              @click="handleOut">导出</el-button>
            <el-button v-if="tabIndex === 0" size="small" type="primary" @click="copper">铜材料下单</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" :height="'calc(100vh - 290px)'" key="tableData"
            :page="page" :tableLoading="tableLoading"></lims-table>
          <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
            :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" :handleSelectionChange="selectMethod"
                      @pagination="pagination1" :height="'calc(100vh - 290px)'" key="tableData1"
                      :page="page1" :tableLoading="tableLoading1"></lims-table>
          <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true"
            :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" :handleSelectionChange="selectMethod"
                      @pagination="pagination2" :height="'calc(100vh - 290px)'" key="tableData2"
                      :page="page2" :tableLoading="tableLoading2"></lims-table>
          <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true"
            :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" :handleSelectionChange="selectMethod"
                      @pagination="pagination3" :height="'calc(100vh - 290px)'" key="tableData3"
                      :page="page3" :tableLoading="tableLoading3"></lims-table>
          <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true"
            :handleSelectionChange="selectMethod" @pagination="pagination3" :height="'calc(100vh - 290px)'"
            key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table>
        </div>
        <!--季度检验-->
        <div class="table">
          <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4"
                      :isSelection="true" :handleSelectionChange="selectMethod"
                      @pagination="pagination4" :height="'calc(100vh - 290px)'" key="tableData4"
                      :page="page4" :tableLoading="tableLoading4"></lims-table>
          <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" :isSelection="true"
            :handleSelectionChange="selectMethod" @pagination="pagination4" :height="'calc(100vh - 290px)'"
            key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table>
        </div>
      </div>
    </div>
@@ -114,9 +101,8 @@
    <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"
                  @keyup.enter.native="refreshTable"></el-input>
        <el-input v-model="exemptionInfo.partDetail" clearable placeholder="请输入" size="small"
          @keyup.enter.native="refreshTable"></el-input>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
@@ -128,13 +114,14 @@
    <!-- æ’¤é”€æŠ¥æ£€ -->
    <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>
          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-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%">
@@ -155,42 +142,37 @@
      </span>
    </el-dialog>
    <!--标签打印弹框-->
    <print-dialog v-if="printDialog" ref="printDialog"
                  :printDialog="printDialog"
                  @closePrintDialog="closePrintDialog"></print-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>
    <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>
    <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>
      :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>
        <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>
        <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"/>-->
    <!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
    <!--                :sonLaboratory="'原材料'" :state="state"-->
    <!--                :typeSource="typeSource"-->
    <!--                @goback="goback" @refreshView="refreshView"/>-->
  </div>
</template>
@@ -213,22 +195,22 @@
  revokeInspectionReport,
  updateEntrustCode
} from "@/api/business/rawMaterialOrder";
import {getWarehouseSubmit} from "@/api/business/materialInspection";
import { getWarehouseSubmit } from "@/api/business/materialInspection";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
export default {
  name: "b1-material-inspection-order",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog},
  components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      tableData: [],
      tableLoading: false,
      column: [
        {label: '批号', prop: 'updateBatchNo'},
        {label: '零件号', prop: 'partNo'},
        {label: '零件描述', prop: 'partDesc'},
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        {
          dataType: 'tag',
          label: '物料类型',
@@ -248,11 +230,11 @@
            }
          }
        },
        {label: '抵达的采购数量', prop: 'qtyArrived'},
        {label: '单位', prop: 'buyUnitMeas'},
        {label: '订单号', prop: 'orderNo'},
        {label: '接收时间', prop: 'receiverDate'},
        {label: '报检时间', prop: 'declareDate'},
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '订单号', prop: 'orderNo' },
        { label: '接收时间', prop: 'receiverDate' },
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
@@ -283,21 +265,21 @@
        }
      ],
      page: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      tableData1: [],
      tableLoading1: false,
      column1: [
        {label: '批号', prop: 'updateBatchNo'},
        {label: '委托编号', prop: 'entrustCode'},
        {label: '零件号', prop: 'partNo'},
        {label: '零件描述', prop: 'partDesc'},
        {label: '样品名称', prop: 'sampleName'},
        {label: '样品型号', prop: 'sampleModel'},
        {label: '检验人', prop: 'userName'},
        {label: '下发时间', prop: 'sendTime'},
        { label: '批号', prop: 'updateBatchNo' },
        { label: '委托编号', prop: 'entrustCode' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        { label: '样品名称', prop: 'sampleName' },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '检验人', prop: 'userName' },
        { label: '下发时间', prop: 'sendTime' },
        {
          dataType: 'tag',
          label: '物料类型',
@@ -317,11 +299,11 @@
            }
          }
        },
        {label: '抵达的采购数量', prop: 'qtyArrived'},
        {label: '单位', prop: 'buyUnitMeas'},
        {label: '订单号', prop: 'orderNo'},
        {label: '接收时间', prop: 'receiverDate'},
        {label: '报检时间', prop: 'declareDate'},
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '订单号', prop: 'orderNo' },
        { label: '接收时间', prop: 'receiverDate' },
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
@@ -352,27 +334,27 @@
        }
      ],
      page1: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      tableData2: [],
      tableLoading2: false,
      column2: [
        {label: '委托编号', prop: 'entrustCode'},
        {label: '检验状态', prop: 'inspectStatus'},
        {label: '订单号', prop: 'orderNo'},
        {label: '抵达的采购数量', prop: 'qtyArrived'},
        {label: '下发时间', prop: 'sendTime'},
        {label: '批号', prop: 'updateBatchNo'},
        {label: '零件号', prop: 'partNo'},
        {label: '零件描述', prop: 'partDesc'},
        {label: '供应商名称', prop: 'supplierName'},
        {label: '不合格描述', prop: 'unqualifiedDesc'},
        {label: '免检', prop: 'isExemption'},
        {label: '样品名称', prop: 'sampleName'},
        {label: '样品型号', prop: 'sampleModel'},
        {label: '检验人', prop: 'userName'},
        { label: '委托编号', prop: 'entrustCode' },
        { label: '检验状态', prop: 'inspectStatus' },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        { label: '样品名称', prop: 'sampleName' },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '检验人', prop: 'userName' },
        {
          dataType: 'tag',
          label: '物料类型',
@@ -392,9 +374,9 @@
            }
          }
        },
        {label: '单位', prop: 'buyUnitMeas'},
        {label: '接收时间', prop: 'receiverDate'},
        {label: '报检时间', prop: 'declareDate'},
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '接收时间', prop: 'receiverDate' },
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
@@ -465,27 +447,27 @@
        }
      ],
      page2: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      tableData3: [],
      tableLoading3: false,
      column3: [
        {label: '委托编号', prop: 'entrustCode'},
        {label: '检验状态', prop: 'inspectStatus'},
        {label: '订单号', prop: 'orderNo'},
        {label: '抵达的采购数量', prop: 'qtyArrived'},
        {label: '下发时间', prop: 'sendTime'},
        {label: '批号', prop: 'updateBatchNo'},
        {label: '零件号', prop: 'partNo'},
        {label: '零件描述', prop: 'partDesc'},
        {label: '供应商名称', prop: 'supplierName'},
        {label: '不合格描述', prop: 'unqualifiedDesc'},
        {label: '免检', prop: 'isExemption'},
        {label: '样品名称', prop: 'sampleName'},
        {label: '样品型号', prop: 'sampleModel'},
        {label: '检验人', prop: 'userName'},
        { label: '委托编号', prop: 'entrustCode' },
        { label: '检验状态', prop: 'inspectStatus' },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        { label: '样品名称', prop: 'sampleName' },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '检验人', prop: 'userName' },
        {
          dataType: 'tag',
          label: '物料类型',
@@ -505,9 +487,9 @@
            }
          }
        },
        {label: '单位', prop: 'buyUnitMeas'},
        {label: '接收时间', prop: 'receiverDate'},
        {label: '报检时间', prop: 'declareDate'},
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '接收时间', prop: 'receiverDate' },
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
@@ -531,27 +513,27 @@
        }
      ],
      page3: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      tableData4: [],
      tableLoading4: false,
      column4: [
        {label: '委托编号', prop: 'entrustCode'},
        {label: '检验状态', prop: 'inspectStatus'},
        {label: '订单号', prop: 'orderNo'},
        {label: '抵达的采购数量', prop: 'qtyArrived'},
        {label: '下发时间', prop: 'sendTime'},
        {label: '批号', prop: 'updateBatchNo'},
        {label: '零件号', prop: 'partNo'},
        {label: '零件描述', prop: 'partDesc'},
        {label: '供应商名称', prop: 'supplierName'},
        {label: '不合格描述', prop: 'unqualifiedDesc'},
        {label: '免检', prop: 'isExemption'},
        {label: '样品名称', prop: 'sampleName'},
        {label: '样品型号', prop: 'sampleModel'},
        {label: '检验人', prop: 'userName'},
        { label: '委托编号', prop: 'entrustCode' },
        { label: '检验状态', prop: 'inspectStatus' },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        { label: '样品名称', prop: 'sampleName' },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '检验人', prop: 'userName' },
        {
          dataType: 'tag',
          label: '物料类型',
@@ -571,9 +553,9 @@
            }
          }
        },
        {label: '单位', prop: 'buyUnitMeas'},
        {label: '接收时间', prop: 'receiverDate'},
        {label: '报检时间', prop: 'declareDate'},
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '接收时间', prop: 'receiverDate' },
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
@@ -614,9 +596,9 @@
        }
      ],
      page4: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      entity: {
        updateBatchNo: null,
@@ -652,16 +634,16 @@
          value: 3
        }
      ],
      more:false,
      more: false,
      tabIndex: 0,
      multipleSelection:[],
      multipleSelection: [],
      active: 0, //1:下单,2:查看
      orderType: 0, //0:原材料下单,1:季度检验下单
      currentId: null,
      btnLoading: false,
      quashDialogVisible: false, // æ’¤é”€ä¸‹å•提醒弹框
      declareDialogVisible: false, // æ’¤é”€æŠ¥æ£€æé†’弹框
      insOrderRow:{},
      insOrderRow: {},
      upLoad: false,
      filesDialogVisible: false, // é™„件查看弹框
      printDialog: false, // æ ‡ç­¾æ‰“印弹框
@@ -678,11 +660,11 @@
      exemptionLoading: false,
      exemptionInfo: {},
      inspectStatusList: [
        {label: '检验中', value: 0},
        {label: '合格', value: 1},
        {label: '不合格', value: 2},
        {label: '未下单', value: 3},
        {label: '让步放行', value: 4},
        { label: '检验中', value: 0 },
        { label: '合格', value: 1 },
        { label: '不合格', value: 2 },
        { label: '未下单', value: 3 },
        { label: '让步放行', value: 4 },
      ],
      state: 0,
      orderId: 0,
@@ -691,10 +673,10 @@
      typeSource: null,// 0:成品下单,1:原材料下单, 2: é“œå•丝下单
      InspectInfoDialog: false, // æ•°æ®æŸ¥çœ‹å¼¹æ¡†
      insInfo: {},
      outLoading:false
      outLoading: false
    }
  },
  mounted () {
  mounted() {
    this.refreshTable()
  },
  // æ–¹æ³•集合
@@ -719,9 +701,9 @@
      }
    },
    // å¾…下单查询
    getPurchaseOrderList () {
    getPurchaseOrderList() {
      this.tableLoading = true
      const params = {...this.entity, isInspect: 1, state: 0}
      const params = { ...this.entity, isInspect: 1, state: 0 }
      getWarehouseSubmit(params).then(res => {
        this.tableLoading = false
        if (res.code === 200) {
@@ -733,9 +715,9 @@
      })
    },
    // æ£€éªŒä¸­æŸ¥è¯¢
    getIfsByStateOneList () {
    getIfsByStateOneList() {
      this.tableLoading1 = true
      const params = {...this.entity, orderState: 1, state: 1}
      const params = { ...this.entity, orderState: 1, state: 1 }
      getIfsByStateOne(params).then(res => {
        this.tableLoading1 = false
        if (res.code === 200) {
@@ -747,9 +729,9 @@
      })
    },
    // å·²æ£€éªŒæŸ¥è¯¢
    getIfsByOverList () {
    getIfsByOverList() {
      this.tableLoading2 = true
      const params = {...this.entity, orderState: 4, state: 2}
      const params = { ...this.entity, orderState: 4, state: 2 }
      getIfsByOver(params).then(res => {
        this.tableLoading2 = false
        if (res.code === 200) {
@@ -761,9 +743,9 @@
      })
    },
    // æŸ¥è¯¢å­£åº¦æ£€éªŒ
    getIfsByQuarterList () {
    getIfsByQuarterList() {
      this.tableLoading4 = true
      const params = {...this.entity}
      const params = { ...this.entity }
      getIfsByOver(params).then(res => {
        this.tableLoading4 = false
        if (res.code === 200) {
@@ -775,9 +757,9 @@
      })
    },
    // å…¨éƒ¨
    getIfsByAllList () {
    getIfsByAllList() {
      this.tableLoading3 = true
      const params = {...this.entity, isInspect: 1}
      const params = { ...this.entity, isInspect: 1 }
      getIfsByAll(params).then(res => {
        this.tableLoading3 = false
        if (res.code === 200) {
@@ -793,52 +775,52 @@
      this.resetForm('entity')
      this.refreshTable()
    },
    pagination (page) {
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
    pagination1 (page) {
    pagination1(page) {
      this.page1.size = page.limit
      this.refreshTable()
    },
    pagination2 (page) {
    pagination2(page) {
      this.page2.size = page.limit
      this.refreshTable()
    },
    pagination3 (page) {
    pagination3(page) {
      this.page3.size = page.limit
      this.refreshTable()
    },
    pagination4 (page) {
    pagination4(page) {
      this.page4.size = page.limit
      this.refreshTable()
    },
    // æŸ¥çœ‹æ£€éªŒæ•°æ®
    viewInspectInfo (row) {
    viewInspectInfo(row) {
      //当前检验任务的检验人列表
      let inspectorList = []
      if(row.userName){
      if (row.userName) {
        inspectorList = row.userName.split(',')
      }
      let user = JSON.parse(localStorage.getItem('user'))
      if(user){
      if (user) {
        inspectorList.push(user.name)
      }
      this.inspectorList = inspectorList
      this.insInfo = row
      this.InspectInfoDialog = true
    },
    closeInsInfoDialog () {
    closeInsInfoDialog() {
      this.InspectInfoDialog = false
    },
    // ç›´æŽ¥æ”¾è¡Œ
    goPass (row) {
    goPass(row) {
      this.$confirm('是否放行当前数据?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        concessionRelease({ifsInventoryId: row.id}).then(res => {
        concessionRelease({ ifsInventoryId: row.id }).then(res => {
          if (res.code === 200) {
            this.$message({
              type: 'success',
@@ -861,21 +843,21 @@
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
        repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
          if (res.code === 200) {
            this.$message.success('撤销成功')
            this.refreshTable('page')
          }
        })
      }).catch(() => {})
      }).catch(() => { })
    },
    viewInsInfo0 () {
    viewInsInfo0() {
      this.state = 3;
      this.typeSource = this.insInfo.typeSource
      this.orderId = this.insInfo.enterOrderId
      this.InspectInfoDialog = false
    },
    viewInsInfo1 () {
    viewInsInfo1() {
      this.state = 3;
      this.typeSource = this.insInfo.typeSource
      this.orderId = this.insInfo.quarterOrderId
@@ -886,16 +868,16 @@
      this.refreshTable('page')
    },
    // åˆ·æ–°é¡µé¢
    refreshView () {
    refreshView() {
      this.InspectionKey++
    },
    // é“œææ–™ä¸‹å•
    copper () {
    copper() {
      this.$router.push("/materialOrder/copperOrder");
      this.$router.push({ path: "/materialOrder/copperOrder", query: {active: 1} });
      this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } });
    },
    // æ‰“开标签打印弹框
    openPrint () {
    openPrint() {
      if (this.multipleSelection.length > 0) {
        this.printDialog = true
        this.$nextTick(() => {
@@ -907,29 +889,29 @@
      }
    },
    // å…³é—­æ ‡ç­¾æ‰“印弹框
    closePrintDialog () {
    closePrintDialog() {
      this.printDialog = false
    },
    // ä¸‹å•
    playOrder(row) {
      this.$router.push({ path: "/materialOrder/customsInspection", query: {orderType: 0, customsInspection: row, active: 1} });
      this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 0, customsInspection: row, active: 1 } });
    },
    // å­£åº¦æ£€éªŒä¸‹å•
    playOrderSec (row) {
    playOrderSec(row) {
      if (typeof row !== "object") {
        this.$router.push({ path: "/materialOrder/customsInspection", query: {active: row} });
        this.$router.push({ path: "/materialOrder/customsInspection", query: { active: row } });
      } else {
        this.$router.push({ path: "/materialOrder/customsInspection", query: {orderType: 1, customsInspection: row, active: 1} });
        this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 1, customsInspection: row, active: 1 } });
      }
    },
    // æ‰“开免检弹框
    exemption (row) {
    exemption(row) {
      this.exemptionVisible = true
      this.exemptionInfo = row
      this.$set(this.exemptionInfo, 'partDetail', row.partDesc)
    },
    // æäº¤å…æ£€ä¿¡æ¯
    submitExemption () {
    submitExemption() {
      this.exemptionLoading = true
      rawOrderRelease({
        ifsInventoryId: this.exemptionInfo.id,
@@ -947,13 +929,13 @@
      })
    },
    // æ‰“开撤销报检弹框
    cancelDeclare (row) {
    cancelDeclare(row) {
      this.declareDialogVisible = true
      this.insOrderRow = row
    },
    // æäº¤æ’¤é”€æŠ¥æ£€ç”³è¯·
    submitDeclare () {
      revokeInspectionReport({id: this.insOrderRow.id}).then(res => {
    submitDeclare() {
      revokeInspectionReport({ id: this.insOrderRow.id }).then(res => {
        if (res.code === 200) {
          this.declareDialogVisible = false
          this.refreshTable()
@@ -964,7 +946,7 @@
      })
    },
    // æ‰“开撤销下单的弹框
    cancelOrder (row) {
    cancelOrder(row) {
      if (row.enterOrderId && row.quarterOrderId) {
        this.quashDialogVisible = true
      } else if (row.enterOrderId && !row.quarterOrderId) {
@@ -973,56 +955,56 @@
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealEnterRawOrder({enterOrderId: row.enterOrderId}).then(res => {
          repealEnterRawOrder({ enterOrderId: row.enterOrderId }).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
        }).catch(() => { })
      } else if (!row.enterOrderId && row.quarterOrderId) {
        this.$confirm('是否撤销季度下单?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
          repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
        }).catch(() => { })
      }
      this.insOrderRow = row
    },
    cancelQuashOrder (type) {
    cancelQuashOrder(type) {
      if (type === 'enterOrderId') {
        this.$confirm('是否撤销当前数据?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealEnterRawOrder({enterOrderId: this.insOrderRow.enterOrderId}).then(res => {
          repealEnterRawOrder({ enterOrderId: this.insOrderRow.enterOrderId }).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
        }).catch(() => { })
      } else {
        this.$confirm('是否撤销当前数据?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealQuarterRawOrder({quarterOrderId: this.insOrderRow.quarterOrderId}).then(res => {
          repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
        }).catch(() => { })
      }
    },
    // ç‚¹å‡»æ ·å“åç§°æŸ¥çœ‹è¯¦æƒ…
@@ -1040,16 +1022,16 @@
      this.dataDialogVisible = true;
    },
    // å…³é—­æ•°æ®æŸ¥çœ‹å¼¹æ¡†
    closeDataLook () {
    closeDataLook() {
      this.dataDialogVisible = false
    },
    // é™„件查看
    handleFileLook (row) {
    handleFileLook(row) {
      this.filesDialogVisible = true
      this.filesLookInfo = row
    },
    // å…³é—­é™„件查看弹框
    closeFilesLook () {
    closeFilesLook() {
      this.filesDialogVisible = false
    },
    // æŠ¥å‘Šä¸‹è½½
@@ -1058,32 +1040,32 @@
      this.downLoadInfo = row
    },
    // å…³é—­æŠ¥å‘Šä¸‹è½½å¼¹æ¡†
    closeDownFileDialog () {
    closeDownFileDialog() {
      this.downFileDialogVisible = false
    },
    // æŸ¥çœ‹äº§ä¸šé“¾ä¿¡æ¯
    openInfoDialog (row) {
    openInfoDialog(row) {
      this.showInfoDialog = true
      this.$nextTick(() => {
        this.$refs.showInfoDialog.getInfo(row.id)
      })
    },
    // ä¿®æ”¹å§”托编号
    changeEntrustCode (row) {
    changeEntrustCode(row) {
      this.entrustCodeVisible = true
      this.entrustCodeInfo = {...row}
      this.entrustCodeInfo = { ...row }
    },
    // å¯¼å‡º
    handleOut(){
      let entity = this.tabIndex === 3 ? {...this.entity, isInspect: 2} : {...this.entity,state: 2, orderState: 4,}
    handleOut() {
      let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, }
      delete entity.orderBy
      this.outLoading = true
      rawAllExport({
        entity:entity
      },{responseType: "blob"}).then(res => {
        entity: entity
      }, { responseType: "blob" }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        const blob = new Blob([res], { type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
@@ -1092,7 +1074,7 @@
      })
    },
    // æäº¤ä¿®æ”¹å§”托编号信息
    submitCode () {
    submitCode() {
      this.submitCodeLoading = true
      try {
        updateEntrustCode({
@@ -1115,7 +1097,7 @@
      this.refreshTable()
    },
    // è¡¨æ ¼é€‰æ‹©æ–¹æ³•
    selectMethod(val){
    selectMethod(val) {
      this.multipleSelection = val
    },
  },
@@ -1127,6 +1109,7 @@
  display: flex;
  justify-content: space-between;
}
.tab {
  list-style-type: none;
  display: flex;
src/views/business/unpass/components/PurchaseVerification.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,376 @@
<template>
  <div>
    <el-dialog title="进货验证原始记录" :visible.sync="isShow" width="1000px" :show-close="false" :close-on-click-modal="false"
      style="max-height: 96vh; margin-top: 2vh" :modal-append-to-body="false" :close-on-press-escape="false">
      <div class="search">
        <el-form :inline="true" :model="purchaseForm" label-position="right" :rules="purchaseFormRules"
          ref="purchaseForm" class="form-inline" label-width="130px">
          <el-row>
            <el-col :span="8">
              <el-form-item label="检验编号:">
                <el-input clearable v-model="purchaseForm.entrustCode" disabled size="small"
                  placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="材料厂家:">
                <el-input clearable v-model="purchaseForm.supplierName" disabled size="small"
                  placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="到货日期:">
                <el-input clearable v-model="purchaseForm.declareDate" disabled size="small"
                  placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="材料名称:">
                <el-input clearable v-model="purchaseForm.sample" disabled size="small" placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="规格型号:">
                <el-input clearable v-model="purchaseForm.model" disabled size="small" placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="材料批号:">
                <el-input clearable v-model="purchaseForm.updateBatchNo" disabled size="small"
                  placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div>
            <el-form-item class="headLine" label="验证依据文件编号:" label-width="160px" style="width: 100%"
              prop="verifyFileCode">
              <el-input clearable v-model="purchaseForm.verifyFileCode" size="small"
                :disabled="operationType === 'view'" placeholder="请输入"></el-input>
            </el-form-item>
          </div>
          <h4>
            <span style="display: flex;align-items: center;">
              <span class="line"></span><span>验证内容</span>
            </span>
          </h4>
          <div class="title">一、供方产品检测报告的基本信息确认</div>
          <el-form-item label="材料名称:" prop="basicName">
            <el-radio-group v-model="purchaseForm.basicName" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="规格型号:" prop="basicModel">
            <el-radio-group v-model="purchaseForm.basicModel" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="材料批号:" prop="basicBatchNo">
            <el-radio-group v-model="purchaseForm.basicBatchNo" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="执行标准:" prop="basicStandard">
            <el-radio-group v-model="purchaseForm.basicStandard" :disabled="operationType === 'view'"
              v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="生产日期:" prop="basicDate">
            <el-radio-group v-model="purchaseForm.basicDate" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="供货数量:" prop="basicNumber">
            <el-radio-group v-model="purchaseForm.basicNumber" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="材料颜色:" prop="basicColor">
            <el-radio-group v-model="purchaseForm.basicColor" :disabled="operationType === 'view'" v-removeAriaHidden>
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <div>
            <el-form-item label="其他:">
              <el-input clearable v-model="purchaseForm.basicOtherValue" size="small"
                :disabled="operationType === 'view'" placeholder="请输入"></el-input>
            </el-form-item>
            <el-form-item>
              <el-radio-group v-model="purchaseForm.basicOther" :disabled="operationType === 'view'">
                <el-radio label="1">符合</el-radio>
                <el-radio label="2">不符合</el-radio>
              </el-radio-group>
            </el-form-item>
            <div class="titleSec">
              <span>二、供方产品检测报告中各项性能指标的验证</span>
              <span>
                <el-button type="primary" size="small" @click="addItem"
                  v-if="operationType === 'add'">手动添加检验项目</el-button>
                <el-button type="primary" @click="addFactoryVerifyItem" v-if="operationType === 'add'"
                  size="small">添加验证项目</el-button>
              </span>
            </div>
            <div>
              <el-table :data="factoryVerifyItemList" style="width: 98%" v-loading="tableLoading">
                <el-table-column type="index" label="序号" width="180" align="center"></el-table-column>
                <el-table-column prop="inspectionItem" label="验证项目" width="300"></el-table-column>
                <el-table-column prop="result" label="验证结果">
                  <template slot-scope="scope">
                    <el-radio-group v-model="scope.row.result" v-removeAriaHidden :disabled="operationType === 'view'">
                      <el-radio label="1">符合</el-radio>
                      <el-radio label="2">不符合</el-radio>
                      <el-radio label="3">不适用</el-radio>
                    </el-radio-group>
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="120" v-if="operationType === 'add'">
                  <template slot-scope="scope">
                    <el-button @click.native.prevent="deleteRow(scope.$index)" type="text" size="small">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </div>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('resetPurchaseDialog')">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading"
          v-if="operationType === 'add'">ç¡®
          å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog title="待验证项目" :visible.sync="factoryVerifyItemDia" width="1000px"
      style="max-height: 96vh; margin-top: 2vh" :show-close="false" :close-on-click-modal="false"
      :close-on-press-escape="false">
      <el-table :data="tableList" style="width: 100%" v-loading="tableLoading"
        @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
        <el-table-column prop="inspectionItem" label="验证项目"></el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="factoryVerifyItemDia = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="handleFactoryVerifyItem" :loading="handleFactoryVerifyLoading">æ·» åŠ </el-button>
      </span>
    </el-dialog>
    <el-dialog title="手动添加验证项目" :visible.sync="inspectionItemDia" width="500px" @close="resetInput" :show-close="false"
      :close-on-click-modal="false" :close-on-press-escape="false">
      <el-input v-model="inspectionItem"></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="inspectionItemDia = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="handleAdd">æ·» åŠ </el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getFactoryVerify, addFactoryVerify } from '@/api/business/unpass.js'
import {
  getInsProduct,
} from "@/api/business/inspectionTask.js";
export default {
  name: "PurchaseVerification",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  props: {
    purchaseDialog: {
      type: Boolean,
      default: () => false
    },
    orderId: {
      type: String,
      default: () => null
    },
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      type: '',
      info: {},
      isShow: this.purchaseDialog,
      purchaseForm: {
        entrustCode: '', // æ£€éªŒç¼–号
        supplierName: '', // ææ–™åނ家
        declareDate: '', // åˆ°è´§æ—¥æœŸ
        sample: '', // ææ–™åç§°
        model: '', // è§„格型号
        updateBatchNo: '', // ææ–™æ‰¹å·
        verifyFileCode: '', // éªŒè¯ä¾æ®æ–‡ä»¶ç¼–号
        // ç¡®è®¤ä¿¡æ¯
        basicName: '', // ææ–™åç§°
        basicModel: '', // è§„格型号
        basicBatchNo: '', // ææ–™æ‰¹å·
        basicStandard: '', // æ‰§è¡Œæ ‡å‡†
        basicDate: '', // ç”Ÿäº§æ—¥æœŸ
        basicNumber: '', // ä¾›è´§æ•°é‡
        basicColor: '', // ææ–™é¢œè‰²
        basicOtherValue: '', // å…¶ä»–名称
        basicOther: '', // å…¶ä»–
      },
      purchaseFormRules: {
        verifyFileCode: [{ required: true, message: '请填写验证依据文件编号', trigger: 'blur' }],
        basicName: [{ required: false, message: '请选择材料名称验证信息', trigger: 'change' }],
        basicModel: [{ required: false, message: '请选择规格型号验证信息', trigger: 'change' }],
        basicStandard: [{ required: false, message: '请选择执行标准验证信息', trigger: 'change' }],
        basicDate: [{ required: false, message: '请选择生产日期验证信息', trigger: 'change' }],
        basicNumber: [{ required: false, message: '请选择供货数量验证信息', trigger: 'change' }],
        basicColor: [{ required: false, message: '请选择材料颜色验证信息', trigger: 'change' }],
      },
      factoryVerifyItemList: [], // ä¾›æ–¹äº§å“æ£€æµ‹æŠ¥å‘Šä¸­å„项性能指标的验证
      tableList: [], //
      multipleSelection: [], //
      operationType: '',
      handlePurchaseLoading: false,
      tableLoading: false,
      factoryVerifyItemDia: false, // æ·»åŠ éªŒè¯é¡¹ç›®å¼¹æ¡†
      handleFactoryVerifyLoading: false,
      inspectionItemDia: false,
      inspectionItem: ''
    }
  },
  // æ–¹æ³•集合
  methods: {
    async getInsOrder(operationType, item) {
      this.operationType = operationType
      this.info = item
      // æŸ¥è¯¢å·²æäº¤çš„æ•°æ®
      let factoryVerify = await getFactoryVerify({ insOrderId: this.orderId })
      this.purchaseForm = factoryVerify.data
      this.factoryVerifyItemList = factoryVerify.data.factoryVerifyItemList || []
    },
    // æ‰“开添加验证项目弹框
    async addFactoryVerifyItem() {
      this.factoryVerifyItemDia = true
      this.tableList = []
      if (this.info.cableTag === undefined) {
        this.info.cableTag = ''
      }
      this.tableLoading = true;
      const type1 = 5
      // æŸ¥è¯¢æ£€éªŒé¡¹ç›®
      let res = await getInsProduct({ id: this.info.id, type: type1, laboratory: this.info.sonLaboratory, cableTag: this.info.cableTag, rawMaterialTag: this.info.rawMaterialTag })
      if (res.data.length > 0) {
        res.data.map((item) => {
          if (item.inspectionItemSubclass) {
            item.inspectionItem = item.inspectionItem + '-' + item.inspectionItemSubclass
          }
          const obj = Object.assign({
            inspectionItem: item.inspectionItem,
            result: item.result,
          })
          this.tableList.push(obj)
        })
        this.tableLoading = false;
      }
    },
    handleSelectionChange(val) {
      console.log('val---', val)
      this.multipleSelection = val;
    },
    addItem() {
      this.inspectionItemDia = true
    },
    deleteRow(index) {
      this.factoryVerifyItemList.splice(index, 1);
    },
    handleAdd() {
      if (!this.inspectionItem) {
        this.$message.warning('请填写内容')
        return
      }
      this.factoryVerifyItemList.push({
        inspectionItem: this.inspectionItem,
        result: null,
      })
      this.inspectionItemDia = false
    },
    resetInput() {
      this.inspectionItem = ''
      this.inspectionItemDia = false
    },
    // æäº¤æ·»åŠ è¦éªŒè¯çš„æ£€éªŒé¡¹
    handleFactoryVerifyItem() {
      if (this.multipleSelection.length === 0) {
        this.$message.warning('请选择数据')
      } else {
        this.factoryVerifyItemList = JSON.parse(JSON.stringify(this.multipleSelection))
        this.factoryVerifyItemDia = false
      }
    },
    handlePurchase() {
      this.$refs['purchaseForm'].validate((valid) => {
        if (valid) {
          if (this.factoryVerifyItemList.some(item => item.result === undefined || item.result === null || item.result === '')) {
            this.$message.warning('请选择供方产品验证结果')
            return
          }
          this.factoryVerifyItemList.forEach((item, index) => {
            item.sort = index
          })
          this.purchaseForm.factoryVerifyItemList = JSON.parse(JSON.stringify(this.factoryVerifyItemList))
          this.handlePurchaseLoading = true
          addFactoryVerify(this.purchaseForm).then(res => {
            if (res.code === 200) {
              this.$message.success('提交成功')
              this.$emit('resetPurchaseDialog')
            }
            this.handlePurchaseLoading = false
          })
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
  },
}
</script>
<style scoped>
.headLine>>>.el-form-item__content {
  width: 68%;
}
>>>.el-form-item__content {
  display: inline-block;
}
h4 .line {
  display: inline-block;
  width: 3px;
  height: 16px;
  background: #3A7BFA;
  margin-right: 4px;
}
.title {
  margin: 10px 0;
}
.titleSec {
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
}
>>>.el-dialog__body {
  max-height: 700px;
  overflow-y: auto;
}
</style>
src/views/business/unpass/components/addUnPass.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,124 @@
<template>
  <div>
    <el-dialog title="新增不合格复测" :visible.sync="isShow" width="70%" :show-close="false" :close-on-click-modal="false"
      :close-on-press-escape="false">
      <div class="table">
        <el-table class="el-table" ref="productTable" :data="productList" max-height="800px" tooltip-effect="dark"
          border v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;"
          @select-all="handleAll">
          <el-table-column type="selection" width="65"></el-table-column>
          <el-table-column prop="inspectionItemClass" label="检验项分类" min-width="140"
            show-overflow-tooltip></el-table-column>
          <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column>
          <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140"
            show-overflow-tooltip></el-table-column>
          <el-table-column prop="tell" label="要求描述" min-width="220px"></el-table-column>
          <el-table-column prop="ask" label="要求值" min-width="220px"></el-table-column>
          <el-table-column prop="lastValue" label="检验结果" min-width="140" show-overflow-tooltip></el-table-column>
          <el-table-column prop="insResult" label="结果判定" min-width="140" show-overflow-tooltip>
            <template>
              <el-tag type="danger">不合格</el-tag>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('resetAddUnPass')">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitHandle" :loading="handlePassLoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getInsProductUnqualified } from '@/api/business/unpass.js'
export default {
  name: "addUnPass",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  props: {
    addUnPassDialog: {
      type: Boolean,
      default: () => false
    },
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      type: '',
      isShow: this.addUnPassDialog,
      handlePassLoading: false,
      productList: [],
      productListSelected: [],
      productIds: [],
      tableLoading: false
    }
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    getInsOrder(info) {
      this.tableLoading = true
      try {
        getInsProductUnqualified({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag }).then(res => {
          if (res.code === 200) {
            this.productList = res.data
          }
          this.tableLoading = false
        })
      } catch (err) {
        this.tableLoading = false
      }
    },
    // æäº¤ä¸åˆæ ¼å¤„理
    submitHandle() {
      if (this.productListSelected.length === 0) {
        this.$message.warning('请选择需要复测的检验项')
        return
      }
      this.$confirm('确认提交不合格复测?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.handlePass()
      }).catch(() => {
      });
    },
    handlePass() {
      this.handlePassLoading = true
      try {
        addUnqualifiedRetest({
          ids: this.productIds
        }).then(res => {
          if (res.code === 200) {
            this.$message.success('提交成功')
            this.$emit('resetAddUnPass')
          }
          this.handlePassLoading = false
        })
      } catch (e) {
        this.handlePassLoading = false
      }
    },
    selectProduct(val) {
      this.productListSelected = val
      this.productIds = []
      val.forEach(a => {
        this.productIds.push(a.id)
      })
    },
    handleAll(val) {
      this.productListSelected = val
      this.productIds = []
      val.forEach(a => {
        this.productIds.push(a.id)
      })
    },
  },
}
</script>
<style scoped></style>
src/views/business/unpass/components/unPassDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,275 @@
<template>
  <div>
    <el-dialog title="新增不合格处理" :visible.sync="isShow" width="740px" :show-close="false" :close-on-click-modal="false"
      :close-on-press-escape="false">
      <div class="search">
        <el-form :inline="true" :model="unPassForm" :rules="unPassFormRules" ref="unPassForm" class="form-inline"
          label-width="120px">
          <div>
            <el-form-item class="headLine" label="标题:" style="width: 100%" prop="headline">
              <el-input clearable v-model="unPassForm.headline" size="small" :disabled="type === 'view'" type="textarea"
                placeholder="请输入"></el-input>
            </el-form-item>
          </div>
          <el-form-item label="供应商名称:">
            <el-input clearable v-model="unPassForm.supplierName" disabled size="small" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="物料名称:">
            <el-tooltip class="item" effect="dark" placement="top" :content="unPassForm.materialName">
              <el-input clearable v-model="unPassForm.materialName" disabled size="small" placeholder="请输入"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="生产批次:">
            <el-input clearable v-model="unPassForm.productionBatch" disabled size="small" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="到货数量:">
            <el-input clearable v-model="unPassForm.cargoQuantity" disabled size="small" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="规格型号:">
            <el-input clearable v-model="unPassForm.specsModels" disabled size="small" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="报检时间:">
            <el-date-picker v-model="unPassForm.inspectTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small"
              disabled style="width: 175px" type="date" placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="反馈人:">
            <el-input clearable v-model="unPassForm.feedbackUser" disabled size="small" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="反馈时间:" prop="feedbackTime">
            <el-date-picker v-model="unPassForm.feedbackTime" :disabled="type === 'view'" format="yyyy-MM-dd"
              value-format="yyyy-MM-dd HH:mm:ss" size="small" style="width: 175px" type="date" placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="分类:" prop="classification">
            <el-select v-model="unPassForm.classification" :disabled="type === 'view'" size="small" placeholder="请选择">
              <el-option v-for="item in classificationOptions" :key="item.value" :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="不合格归属:" prop="offGradeAscription">
            <el-select v-model="unPassForm.offGradeAscription" :disabled="type === 'view'" size="small"
              placeholder="请选择">
              <el-option v-for="item in offGradeAscriptionOptions" :key="item.value" :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="不合格情况描述:" prop="unqualifiedDesc">
            <el-input clearable type="textarea" v-model="unPassForm.unqualifiedDesc" :disabled="type === 'view'"
              style="width: 484px" size="small" placeholder="请输入"></el-input>
          </el-form-item>
        </el-form>
        <el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError"
          :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="headers" :file-list="unPassFilesList">
          <el-button size="small" type="primary" style="text-align: left">附件上传</el-button>
        </el-upload>
        <div v-if="type !== 'add'">
          <div style="padding-left: 40px;margin-bottom: 4px">附件:</div>
          <div style="padding-left: 40px;margin-bottom: 4px" v-for="item in unqualifiedHandlerFiles">
            <span>{{ item.fileName }}</span><el-link type="primary" style="margin-left: 20px;vertical-align: top"
              :underline="false" @click="handleDown(item)">下载</el-link>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('resetForm')">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="handlunPass" :loading="handlunPassLoading" v-if="type === 'add'">ç¡®
          å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js'
export default {
  name: "unPassDialog",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  props: {
    unPassDialog: {
      type: Boolean,
      default: () => false
    },
    orderId: {
      type: String,
      default: () => null
    },
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      type: '',
      isShow: this.unPassDialog,
      unPassForm: { // ä¸åˆæ ¼å¤„理数据
        headline: '', // æ ‡é¢˜
        inventoryQuantityId: '', // åŽŸææ–™id,不做展示,只传值
        supplierName: '', // ä¾›åº”商名称
        materialName: '', // ç‰©æ–™åç§°
        productionBatch: '', // ç”Ÿäº§æ‰¹æ¬¡
        cargoQuantity: '', // åˆ°è´§æ•°é‡
        specsModels: '', // è§„格型号
        inspectTime: '', // æŠ¥æ£€æ—¶é—´
        feedbackUser: '', // åé¦ˆäºº
        feedbackTime: '', // åé¦ˆæ—¶é—´
        classification: '', // åˆ†ç±»
        offGradeAscription: '', // ä¸åˆæ ¼å½’属
        unqualifiedDesc: '', // ä¸åˆæ ¼æƒ…况描述
        unqualifiedHandlerFiles: [], // ä¸åˆæ ¼é™„ä»¶URL
      },
      unPassFormRules: {
        offGradeAscription: [
          { required: true, message: '请选择不合格归属', trigger: 'change' }
        ],
        headline: [
          { required: true, message: '请填写标题', trigger: 'blur' }
        ]
      },
      unPassFilesList: [], // ä¸åˆæ ¼å¤„理附件数据
      classificationOptions: [], // ä¸åˆæ ¼åˆ†ç±»ä¸‹æ‹‰æ¡†
      offGradeAscriptionOptions: [], // ä¸åˆæ ¼å½’属下拉框
      handlunPassLoading: false,
      unqualifiedHandlerFiles: []
    }
  },
  mounted() {
    this.getClassificationOptions() // èŽ·å–ä¸åˆæ ¼åˆ†ç±»ä¸‹æ‹‰æ¡†é€‰é¡¹
    this.getOffGradeAscriptionOptions() // èŽ·å–ä¸åˆæ ¼å½’å±žä¸‹æ‹‰æ¡†é€‰é¡¹
  },
  // æ–¹æ³•集合
  methods: {
    getInsOrder(type, row) {
      this.type = type
      if (type === 'add') {
        // èµ‹å€¼é»˜è®¤æ•°æ®
        getInsOrder({
          orderId: this.orderId
        }).then(res => {
          if (res.code === 200) {
            this.unPassForm.headline = `No.0005-中天装备电线-外购品不合格反馈评审及纠正预防流程(正式版)-${JSON.parse(localStorage.getItem("user")).name}-${new Date().toISOString().substring(0, 10)}` // æ ‡é¢˜
            this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // åŽŸææ–™id
            this.unPassForm.insOrderId = res.data.insOrder.id // è®¢å•id
            this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // ä¾›åº”商名称
            this.unPassForm.materialName = res.data.insOrder.sampleType // ç‰©æ–™åç§°
            this.unPassForm.productionBatch = res.data.insOrderTemplate.updateBatchNo // ç”Ÿäº§æ‰¹æ¬¡
            this.unPassForm.cargoQuantity = res.data.insOrderTemplate.qtyArrived + res.data.insOrderTemplate.buyUnitMeas // åˆ°è´§æ•°é‡
            this.unPassForm.specsModels = res.data.insOrder.partDetail // è§„格型号
            this.unPassForm.inspectTime = res.data.insOrderTemplate.sendTime.substring(0, 10)  // æŠ¥æ£€æ—¶é—´
            this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // æŠ¥æ£€æ—¶é—´
            this.unPassForm.feedbackUser = JSON.parse(localStorage.getItem("user")).name // åé¦ˆäºº
          }
        })
      } else {
        this.getInfo(row.handlerId)
        this.unPassForm = { ...row }
      }
    },
    getInfo(handlerId) {
      getUnqualifiedHandler({
        id: handlerId
      }).then(res => {
        if (res.code === 200) {
          this.unqualifiedHandlerFiles = this.HaveJson(res.data.unqualifiedHandlerFiles)
        }
      })
    },
    handleDown(row) {
      downFile({
        id: row.id,
      }).then(res => {
        if (res.code === 200) {
          let url = '';
          if (res.data.type == 1) {
            url = this.javaApi + '/img/' + res.data.fileUrl
            this.$download.saveAs(url, row.fileName);
          } else {
            url = this.javaApi + '/word/' + res.data.fileUrl
            this.$download.saveAs(url, row.fileName);
          }
        }
      }).catch(error => {
      })
    },
    // æäº¤ä¸åˆæ ¼å¤„理
    handlunPass() {
      this.$refs['unPassForm'].validate((valid) => {
        if (valid) {
          this.unPassForm.unqualifiedHandlerFiles.forEach(item => {
            delete item.orderBy
          })
          this.handlunPassLoading = true
          addUnqualifiedHandler(this.unPassForm).then(res => {
            if (res.code === 200) {
              this.$message.success('提交成功')
              this.$emit('resetForm')
            }
            this.handlunPassLoading = false
          })
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    getUnpassUrl(response, file, fileList) {
      // é™„件上传成功后,将url在提交不合格处理时传给后台
      if (response.code == 200) {
        this.$message.success('上传成功')
        this.unPassForm.unqualifiedHandlerFiles.push(response.data)
      }
    },
    // ç§»é™¤é™„ä»¶
    handleRemoveFile(file) {
      const index = this.unPassForm.unqualifiedHandlerFiles.findIndex(val => val === file.response.data)
      if (index > -1) {
        this.unPassForm.unqualifiedHandlerFiles.splice(index, 1)
      }
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        return false;
      } else {
        this.upLoading = true;
        return true;
      }
    },
    onError(err, file, fileList) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    getClassificationOptions() {
      // ä¸åˆæ ¼åˆ†ç±»
      this.getDicts("categories_no_conformities").then((response) => {
        this.classificationOptions = this.dictToValue(response.data);
      });
    },
    getOffGradeAscriptionOptions() {
      // ä¸åˆæ ¼å½’属
      this.getDicts("attribution_no_conformities").then((response) => {
        this.offGradeAscriptionOptions = this.dictToValue(response.data);
      });
    },
  },
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    action2() {
      return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified'
    }
  },
}
</script>
<style scoped>
.headLine>>>.el-form-item__content {
  width: 68%;
}
</style>
vue.config.js
@@ -36,7 +36,7 @@
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://192.168.0.104:8002`,
        target: `http://192.168.0.170:8002`,
        changeOrigin: true,
        pathRewrite: {
          ["^" + process.env.VUE_APP_BASE_API]: "",