gaoluyang
2025-03-03 29ef871aa6793a8f3e808dfa0702fd8ce8e6dae2
检验任务不合格处理报错修改
已修改3个文件
37 ■■■■■ 文件已修改
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/unPassDialog.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -149,7 +149,7 @@
        path: "inspection",
        component: () => import("@/views/business/inspectionTask/inspection"),
        name: "inspection",
        meta: { title: "检验单详情", activeMenu: "/business/inspectionTask" },
        meta: { title: "检验单详情", activeMenu: "/business/inspectionTask", keepAlive: false },
      },
    ],
  },
src/views/business/inspectionTask/inspection.vue
@@ -515,7 +515,7 @@
<script>
import excelFunction from "@/utils/excelFountion";
import limsTable from "@/components/Table/lims-table.vue";
import UnPassDialog from "../unpass/components/addUnPass.vue";
import UnPassDialog from "../unpass/components/unPassDialog.vue";
import AddUnPass from "../unpass/components/addUnPass.vue";
import InspectionWord from "./components/InspectionWord.vue";
import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
@@ -543,7 +543,7 @@
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
export default {
  name: 'inspection',
  name: 'Inspection',
  components: {
    PurchaseVerification,
    AddUnPass,
@@ -789,6 +789,16 @@
    // this.getList0() // 任务切换
    this.scrollInit();
  },
  activated() {
    this.getTypeDicts(); // 获取紧急程度下拉框选项
    this.getInsStateDicts();
    this.getComparisonList();
    this.getAuthorizedPerson();
    // this.getPower();
    this.startWorker();
    // this.getList0() // 任务切换
    this.scrollInit();
  },
  watch: {
    // 监听任务id,获取任务信息
    id(val) {
src/views/business/unpass/components/unPassDialog.vue
@@ -62,7 +62,7 @@
          </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">
          :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="uploadHeader" :file-list="unPassFilesList">
          <el-button size="small" type="primary" style="text-align: left">附件上传</el-button>
        </el-upload>
        <div v-if="type !== 'add'">
@@ -84,6 +84,7 @@
<script>
import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js'
import {mapGetters} from "vuex";
export default {
  name: "unPassDialog",
  // import 引入的组件需要注入到对象中才能使用
@@ -148,17 +149,17 @@
          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.headline = `No.0005-中天装备电线-外购品不合格反馈评审及纠正预防流程(正式版)-${this.nickName}-${new Date().toISOString().substring(0, 10)}` // 标题
            this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 报检时间
            this.unPassForm.feedbackUser = this.nickName // 反馈人
            this.unPassForm.insOrderId = res.data.insOrder.id // 订单id
            this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 供应商名称
            this.unPassForm.materialName = res.data.insOrder.sampleType // 物料名称
            this.unPassForm.specsModels = res.data.insOrder.partDetail // 规格型号
            this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 原材料id
            this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 供应商名称
            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 {
@@ -256,11 +257,7 @@
    },
  },
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    ...mapGetters(["nickName"]),
    action2() {
      return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified'
    }