| | |
| | | delfile, |
| | | inspectionOrderDetailsTaskSwitching |
| | | } from "@/api/business/inspectionTask.js"; |
| | | import InspectionWorker from '@/workers/InspectionWorker.worker'; |
| | | import DataWorker from '../../../workers/DataWorker.worker'; |
| | | import InspectionWorker from '@/workers/InspectionWorker.worker.js'; |
| | | import DataWorker from '@/workers/DataWorker.worker.js'; |
| | | import html2canvas from "html2canvas"; |
| | | import { mapGetters } from "vuex"; |
| | | import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue"; |
| | |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | // 文件列表相关--结束 |
| | | // 任务切换列表--开始 |
| | | tableData0: [], |
| | |
| | | }, |
| | | tableLoading0: false, |
| | | // 任务切换列表--结束 |
| | | isSplit: 0, // 是否是拆单过来的 |
| | | }; |
| | | }, |
| | | // 用于上传文件的信息 |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | let { sonLaboratory, orderId, state, inspectorList, typeSource } = |
| | | let { sonLaboratory, orderId, state, inspectorList, typeSource,isSplit } = |
| | | this.$route.query; |
| | | this.sonLaboratory = sonLaboratory; |
| | | this.orderId = orderId; |
| | |
| | | this.state = state; |
| | | this.inspectorList = inspectorList; |
| | | this.typeSource = typeSource; |
| | | this.isSplit = isSplit; |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | |
| | | openAddVerifyDia() { |
| | | this.addVerifyDia = true; |
| | | }, |
| | | confirmSubmit(registerInsResults){ |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | registerInsResults: registerInsResults |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.goback(); |
| | | this.submitLoading = false; |
| | | this.addVerifyDia = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | }); |
| | | }, |
| | | submit() { |
| | | if (this.verifyUser === null || this.verifyUser === "") { |
| | | this.$message.error("请指定复核人员"); |
| | |
| | | laboratory: this.sonLaboratory, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.length == 0) { |
| | | if (!res.data || res.data.errorMsg.length == 0) { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.goback(); |
| | | this.submitLoading = false; |
| | | this.addVerifyDia = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | //检验类型为原材料 |
| | | if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){ |
| | | const htmlStr = "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。" |
| | | this.$confirm(htmlStr, '提示', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | dangerouslyUseHTMLString: true |
| | | }).then(() => { |
| | | this.confirmSubmit(true) |
| | | }).catch(() => { |
| | | this.confirmSubmit(false) |
| | | }); |
| | | }else{ |
| | | this.confirmSubmit(false) |
| | | } |
| | | } else { |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | |
| | | }) |
| | | .then(() => { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.addVerifyDia = false; |
| | | this.goback(); |
| | | } |
| | | this.submitLoading = false; |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | }); |
| | | this.confirmSubmit(false) |
| | | // submitPlan({ |
| | | // orderId: this.orderId, |
| | | // laboratory: this.sonLaboratory, |
| | | // verifyUser: this.verifyUser, |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.$message.success("操作成功"); |
| | | // this.addVerifyDia = false; |
| | | // this.goback(); |
| | | // } |
| | | // this.submitLoading = false; |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.error(error); |
| | | // this.submitLoading = false; |
| | | // }); |
| | | }) |
| | | .catch(() => { }); |
| | | } |
| | |
| | | } else { |
| | | param = this.param; |
| | | } |
| | | let isNoTestValue = '' |
| | | for (let key in param) { |
| | | if (param[key]) { |
| | | if (param[key].insValue?.length === 0) { |
| | | isNoTestValue = 1 |
| | | } else { |
| | | isNoTestValue = '' |
| | | } |
| | | } |
| | | } |
| | | saveInsContext({ |
| | | param: JSON.stringify(param), |
| | | currentTable: this.currentTable, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.orderId, |
| | | sonLaboratory: this.sonLaboratory |
| | | sonLaboratory: this.sonLaboratory, |
| | | isNoTestValue: isNoTestValue |
| | | }).then((res) => { |
| | | this.$message.success("已保存"); |
| | | }); |