From fd39b856a9d683b9ba64fa09257cb8dee9ca562f Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Wed, 18 Nov 2026 14:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=88IQC=E3=80=81IPQC=E3=80=81FQC=E3=80=81S?= =?UTF-8?q?QC=EF=BC=89=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../print/print_inspect_labelForPartStock.js | 2 +- src/views/modules/qc/FQCResultEntry.vue | 106 ++++++++++++++++++ src/views/modules/qc/IPQCResultEntry.vue | 89 +++++++++++++++ src/views/modules/qc/IQCResultEntry.vue | 89 +++++++++++++++ src/views/modules/qc/SQCResultEntry.vue | 86 ++++++++++++++ 5 files changed, 371 insertions(+), 1 deletion(-) diff --git a/src/views/modules/print/print_inspect_labelForPartStock.js b/src/views/modules/print/print_inspect_labelForPartStock.js index b2526b3..b1abae5 100644 --- a/src/views/modules/print/print_inspect_labelForPartStock.js +++ b/src/views/modules/print/print_inspect_labelForPartStock.js @@ -46,7 +46,7 @@ export function printInspectStockLabel(printList) { LODOP.ADD_PRINT_TEXT(64,8,112,25,"ExpireDate:"); LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"Bold",1); - LODOP.ADD_PRINT_TEXT(64,110,148,24,printData.remark==="不合格"?" ":printData.newDate.substring(0,10)); + LODOP.ADD_PRINT_TEXT(64,110,148,24,printData.remark==="不合格"?" ":(printData.newDate?printData.newDate.substring(0,10):"")); LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.ADD_PRINT_TEXT(194,8,128,25,"MFG Date:"); diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 07c5750..f65ba68 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -987,6 +987,19 @@ fqcRecordOverLoad, // 任务重载 searchPartAttributeDetails, // 查询物料属性模板 } from "@/api/qc/qc.js" + import { + getInspectData, + inspectPrint, + } from '@/api/production/inspect.js' + import { + printInspectLabel, + } from "@/views/modules/print/print_inspect_label.js" + import { + printInspectLabelForB, + } from "@/views/modules/print/print_inspect_labelForB.js" + import { + printInspectStockLabel, + } from "@/views/modules/print/print_inspect_labelForPartStock.js" import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js" import { getSiteData } from '@/api/board.js' import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -1681,6 +1694,8 @@ site: '', buNo: '', inspectionNo:'', + // 实验室检验单号(qc_fqc_record.ref_info1) + refInfo1: '', partNo:'', partDesc:'', rollQty:'', @@ -3699,6 +3714,10 @@ saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() + // 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印 + if (type === '2' && this.detailData.refInfo1) { + this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1) + } if (keepDetailOpen) { this.getInspectionFormData() if (!options.skipSuccessMessage) { @@ -3732,6 +3751,92 @@ }) }, + // 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签(复制自 inspect.vue) + toPrintForQMS (site, transNo) { + let indata={ + site:site, + transNo:transNo + } + getInspectData(indata).then(({data}) => { + if(!data.rows||data.rows.length===0){ + this.$alert("关联的实验室检验数据不存在或者已取消", '错误', { + confirmButtonText: '确定' + }) + return + } + let row=data.rows[0] + if(row.toTypeFlagDb=='S') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectStockLabel(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }).catch((err) => { + this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', { + confirmButtonText: '确定' + }) + }) + }else if(row.toTypeFlagDb=='B') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.qtyRequired=row.transQty + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectLabelForB(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }).catch((err) => { + this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', { + confirmButtonText: '确定' + }) + }) + }else { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData = data.row + printData.userId = this.$store.state.user.name + if (row.toTypeFlagDb != 'I') { + printData.seqNo = printData.orderNo + } + if (row.toTypeFlag == '硫化检验单(重复)') { + printData.type = '(变更)' + } else { + printData.type = '' + } + + let array = []; + array.push(printData) + printInspectLabel(array) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }).catch((err) => { + this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', { + confirmButtonText: '确定' + }) + }) + } + }).catch((err) => { + this.$alert('获取实验室检验数据失败:' + (err && err.message ? err.message : err), '错误', { + confirmButtonText: '确定' + }) + }) + }, + // 开始检验 actionModal (row) { this.actionData = { @@ -3817,6 +3922,7 @@ this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.state = row.state + this.detailData.refInfo1 = row.refInfo1 || '' this.detailData.releaseFlag = row.releaseFlag || 'N' if (row.state === '待检验') { this.detailData.passQty = row.samplingQty diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index c808d75..edfb54f 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -1004,6 +1004,19 @@ ipqcRecordOverLoad, // 任务重载 searchPartAttributeDetails, // 查询物料属性模板 } from "@/api/qc/qc.js" + import { + getInspectData, + inspectPrint, + } from '@/api/production/inspect.js' + import { + printInspectLabel, + } from "@/views/modules/print/print_inspect_label.js" + import { + printInspectLabelForB, + } from "@/views/modules/print/print_inspect_labelForB.js" + import { + printInspectStockLabel, + } from "@/views/modules/print/print_inspect_labelForPartStock.js" import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js" import { getSiteData } from '@/api/board.js' import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -1669,6 +1682,8 @@ site: '', buNo: '', inspectionNo:'', + // 实验室检验单号(qc_ipqc_record.ref_info1) + refInfo1: '', partNo:'', partDesc:'', rollQty:'', @@ -3737,6 +3752,10 @@ saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() + // 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印 + if (type === '2' && this.detailData.refInfo1) { + this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1) + } if (keepDetailOpen) { this.getInspectionFormData() if (!options.skipSuccessMessage) { @@ -3770,6 +3789,75 @@ }) }, + // 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签 + toPrintForQMS (site, transNo) { + let indata={ + site:site, + transNo:transNo + } + getInspectData(indata).then(({data}) => { + if(!data.rows||data.rows.length===0){ + this.$alert("关联的实验室检验数据不存在或者已取消", '错误', { + confirmButtonText: '确定' + }) + } + let row=data.rows[0] + if(row.toTypeFlagDb=='S') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectStockLabel(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else if(row.toTypeFlagDb=='B') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.qtyRequired=row.transQty + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectLabelForB(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData = data.row + printData.userId = this.$store.state.user.name + if (row.toTypeFlagDb != 'I') { + printData.seqNo = printData.orderNo + } + if (row.toTypeFlag == '硫化检验单(重复)') { + printData.type = '(变更)' + } else { + printData.type = '' + } + + let array = []; + array.push(printData) + printInspectLabel(array) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }) + }, + // 开始检验 actionModal (row) { @@ -3857,6 +3945,7 @@ this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.state = row.state + this.detailData.refInfo1 = row.refInfo1 || '' if (row.state === '待检验') { this.detailData.passQty = row.samplingQty } else { diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 67d4686..7ac8c87 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -866,6 +866,19 @@ import IqcFileTable from "./IQCFileTable.vue"; import column from "../common/column.vue"; import {getManufacturerList, searchPartAttributeDetails} from "../../../api/qc/qc"; + import { + getInspectData, + inspectPrint, + } from '@/api/production/inspect.js' + import { + printInspectLabel, + } from "@/views/modules/print/print_inspect_label.js" + import { + printInspectLabelForB, + } from "@/views/modules/print/print_inspect_labelForB.js" + import { + printInspectStockLabel, + } from "@/views/modules/print/print_inspect_labelForPartStock.js" export default { mixins: [workingFiles], components: { @@ -1890,6 +1903,8 @@ site: '', buNo: '', inspectionNo: '', + // 实验室检验单号(qc_iqc_record.ref_info1) + refInfo1: '', partNo: '', partDesc: '', cinvSourceCode:'', @@ -2781,6 +2796,10 @@ saveIQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() + // 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印 + if (type === '2' && this.detailData.refInfo1) { + this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1) + } if (keepDetailOpen) { this.getInspectionFormData() if (!options.skipSuccessMessage) { @@ -2814,6 +2833,75 @@ }) }, + // 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签 + toPrintForQMS (site, transNo) { + let indata={ + site:site, + transNo:transNo + } + getInspectData(indata).then(({data}) => { + if(!data.rows||data.rows.length===0){ + this.$alert("关联的实验室检验数据不存在或者已取消", '错误', { + confirmButtonText: '确定' + }) + } + let row=data.rows[0] + if(row.toTypeFlagDb=='S') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectStockLabel(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else if(row.toTypeFlagDb=='B') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.qtyRequired=row.transQty + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectLabelForB(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData = data.row + printData.userId = this.$store.state.user.name + if (row.toTypeFlagDb != 'I') { + printData.seqNo = printData.orderNo + } + if (row.toTypeFlag == '硫化检验单(重复)') { + printData.type = '(变更)' + } else { + printData.type = '' + } + + let array = []; + array.push(printData) + printInspectLabel(array) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }) + }, + // 开始检验 actionModal (row) { this.actionData = { @@ -2901,6 +2989,7 @@ this.detailData.invdefinetype = row.invdefinetype this.detailData.state = row.state this.detailData.inspectCode = row.inspectCode || '' + this.detailData.refInfo1 = row.refInfo1 || '' this.$set(this.detailData, 'submissionType', row.submissionType || '') this.$set(this.detailData, 'supplierNo', row.supplierNo || '') // if (row.state === '待检验') { diff --git a/src/views/modules/qc/SQCResultEntry.vue b/src/views/modules/qc/SQCResultEntry.vue index da6d230..2e32935 100644 --- a/src/views/modules/qc/SQCResultEntry.vue +++ b/src/views/modules/qc/SQCResultEntry.vue @@ -710,6 +710,19 @@ cancelSQCApproval, getBatchDetailsByLaboratoryOrder, } from "@/api/qc/qc.js" + import { + getInspectData, + inspectPrint, + } from '@/api/production/inspect.js' + import { + printInspectLabel, + } from "@/views/modules/print/print_inspect_label.js" + import { + printInspectLabelForB, + } from "@/views/modules/print/print_inspect_labelForB.js" + import { + printInspectStockLabel, + } from "@/views/modules/print/print_inspect_labelForPartStock.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import workingFiles from "./workingFiles" import { @@ -2054,6 +2067,10 @@ saveSQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() + // 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印 + if (type === '2' && this.detailData.refInfo1) { + this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1) + } if (keepDetailOpen) { this.getInspectionFormData() if (!options.skipSuccessMessage) { @@ -2074,6 +2091,75 @@ this.transferLoadFlag = false }) }, + + // 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签 + toPrintForQMS (site, transNo) { + let indata={ + site:site, + transNo:transNo + } + getInspectData(indata).then(({data}) => { + if(!data.rows||data.rows.length===0){ + this.$alert("关联的实验室检验数据不存在或者已取消", '错误', { + confirmButtonText: '确定' + }) + } + let row=data.rows[0] + if(row.toTypeFlagDb=='S') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectStockLabel(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else if(row.toTypeFlagDb=='B') { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData=data.row + printData.qtyRequired=row.transQty + printData.userId=this.$store.state.user.name + let array=[]; + array.push(printData) + printInspectLabelForB(array) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }else { + inspectPrint(row).then(({data}) => { + if (data && data.code === 0) { + let printData = data.row + printData.userId = this.$store.state.user.name + if (row.toTypeFlagDb != 'I') { + printData.seqNo = printData.orderNo + } + if (row.toTypeFlag == '硫化检验单(重复)') { + printData.type = '(变更)' + } else { + printData.type = '' + } + + let array = []; + array.push(printData) + printInspectLabel(array) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }) + }, disposalMeasuresSearch () { disposalMeasuresSearch({ inspectionTypeNo: '105' }).then(({data}) => { if (data && data.code === 0) {