From 29dfbd30fe46004d61a571457dc275c97fd4cc53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Wed, 18 Nov 2026 10:44:44 +0800 Subject: [PATCH] 1 --- src/api/production/inspect.js | 1 + src/views/modules/production/inspect.vue | 68 ++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/src/api/production/inspect.js b/src/api/production/inspect.js index 53d8681..afa45f2 100644 --- a/src/api/production/inspect.js +++ b/src/api/production/inspect.js @@ -2,6 +2,7 @@ import { createAPI } from "@/utils/httpRequest.js"; // 获取生产报告信息 export const getInspectData = data => createAPI(`inspect/getInspectData`, 'post', data); +export const getInspectPrintForQMS = data => createAPI(`inspect/getInspectPrintForQMS`, 'post', data); export const inspectSave = data => createAPI(`inspect/inspectSave`, 'post', data); export const inspectPrint = data => createAPI(`inspect/inspectPrint`, 'post', data); export const cancelInspect = data => createAPI(`inspect/cancelInspect`, 'post', data); diff --git a/src/views/modules/production/inspect.vue b/src/views/modules/production/inspect.vue index 5389485..0701b6c 100644 --- a/src/views/modules/production/inspect.vue +++ b/src/views/modules/production/inspect.vue @@ -346,6 +346,7 @@ import { printInspectStockLabel, } from "@/views/modules/print/print_inspect_labelForPartStock.js" + import {getInspectPrintForQMS} from '../../../api/production/inspect' export default { name: 'soscheduleRouting', @@ -679,6 +680,73 @@ let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() return Y + M + D + H + MM + S }, + toPrintForQMS(){ + let indata={ + site:'', + 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: '确定' + }) + } + }) + } + }) + }, }, created () { }