From cd8cf59ad458828ff29cceaa57734d7df70d8b91 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 21 Jul 2026 13:58:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(qc):=20=E6=B7=BB=E5=8A=A0SQC=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E6=98=8E=E7=BB=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增getBatchDetailsByLaboratoryOrder API接口用于获取批次明细 - 在SQC结果录入页面添加批次明细查看按钮 - 实现批次明细弹窗显示物料编码、批次号、数量、仓库库位等信息 - 添加批次明细相关的数据字段和状态管理 - 实现批次明细数据加载和错误处理逻辑 --- src/api/qc/qc.js | 3 + src/views/modules/qc/SQCResultEntry.vue | 100 +++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index d686c79..381e85b 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -290,6 +290,9 @@ export const importOQCTemplateItems = data => createAPI(`/pms/qc/importOQCTempla // ===================================== SQC取消审核 ===================================== export const cancelSQCApproval = data => createAPI(`/pms/qc/cancelSQCApproval`,'post',data) +// ===================================== SQC批次明细 ===================================== +export const getBatchDetailsByLaboratoryOrder = data => createAPI(`/pms/qc/getBatchDetailsByLaboratoryOrder`,'post',data) + // ===================================== 外采设备维护 ===================================== export const queryEquipmentFolderLocationList = data => createAPI(`/pms/qc/queryEquipmentFolderLocationList`,'post',data) export const deleteEquipmentFolderLocationList = data => createAPI(`/pms/qc/deleteEquipmentFolderLocationList`,'post',data) diff --git a/src/views/modules/qc/SQCResultEntry.vue b/src/views/modules/qc/SQCResultEntry.vue index 5023553..97aaef9 100644 --- a/src/views/modules/qc/SQCResultEntry.vue +++ b/src/views/modules/qc/SQCResultEntry.vue @@ -238,6 +238,7 @@ + @@ -245,6 +246,7 @@ + @@ -286,6 +288,9 @@ + + 批次明细 +
+ + + + + + + + + + + + + + + + + + 关闭 + + + @@ -635,6 +697,7 @@ getResponsibleOperatorList, getSQCItemObjectList, cancelSQCApproval, + getBatchDetailsByLaboratoryOrder, } from "@/api/qc/qc.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {getInspectionFile} from '@/api/eam/eam_object_list.js' @@ -765,7 +828,8 @@ passQty: 0, notPassQty: 0, batchQualifiedQty: 0, - notbatchQualifiedQty: 0 + notbatchQualifiedQty: 0, + refInfo1: '' }, saveInformationData: { site: '', @@ -1104,7 +1168,7 @@ fixed: '', columnWidth: 120, }, - + { userId: this.$store.state.user.name, functionId: 301015, @@ -1740,6 +1804,11 @@ // file upload folder fileFolder: 'qcSQC', + + // 批次明细 + batchDetailFlag: false, + batchDetailList: [], + batchDetailLoading: false, } }, methods: { @@ -1795,6 +1864,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 { @@ -2600,6 +2670,32 @@ }, getBaseData () {}, + + // 显示批次明细 + showBatchDetails () { + if (!this.detailData.refInfo1) { + this.$message.warning('实验室单号(refInfo1)不能为空!') + return + } + this.batchDetailLoading = true + this.batchDetailFlag = true + getBatchDetailsByLaboratoryOrder({ laboratoryOrderNo: this.detailData.refInfo1 }).then(({data}) => { + this.batchDetailLoading = false + if (data && data.code === 0) { + this.batchDetailList = data.rows || [] + if (this.batchDetailList.length === 0) { + this.$message.info('暂无批次明细数据') + } + } else { + this.$message.warning((data && data.msg) || '获取批次明细失败') + this.batchDetailList = [] + } + }).catch(() => { + this.batchDetailLoading = false + this.$message.error('获取批次明细失败') + this.batchDetailList = [] + }) + }, }, created () { this.getButtonAuthData()