From 602b3a5f1826b91716ce98420d99b82c3c2795e2 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Wed, 18 Nov 2026 23:03:46 -0800 Subject: [PATCH] =?UTF-8?q?oqc=E5=BC=80=E5=A7=8B=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=9C=AA=E5=87=BA=E7=8E=B0=E8=AE=BE=E5=A4=87=E9=80=89=E6=8B=A9?= =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cclqms-vue/src/api/qc/qc.js | 1 + .../src/views/modules/qc/OQCResultEntry.vue | 102 +++++++++++++----- 2 files changed, 76 insertions(+), 27 deletions(-) diff --git a/cclqms-vue/src/api/qc/qc.js b/cclqms-vue/src/api/qc/qc.js index 5e8fb0f..5123095 100644 --- a/cclqms-vue/src/api/qc/qc.js +++ b/cclqms-vue/src/api/qc/qc.js @@ -353,6 +353,7 @@ export const saveFQASSubmitResult = data => createAPI(`/pms/qc/saveFQASSubmitRes export const fqasRecordDelete = data => createAPI(`/pms/qc/fqasRecordDelete`,'post',data) export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`,'post',data) export const actionFQASInspection = data => createAPI(`/pms/qc/actionFQASInspection`,'post',data) +export const getOQCItemObjectList = data => createAPI(`/pms/qc/getOQCItemObjectList`,'post',data) export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data) /** 同步 EDS 检验结果 */ export const syncEdsInspectionResults = data => createAPI(`/pms/qc/syncEdsInspectionResults`,'post',data) diff --git a/cclqms-vue/src/views/modules/qc/OQCResultEntry.vue b/cclqms-vue/src/views/modules/qc/OQCResultEntry.vue index 091da6b..ea2de6d 100644 --- a/cclqms-vue/src/views/modules/qc/OQCResultEntry.vue +++ b/cclqms-vue/src/views/modules/qc/OQCResultEntry.vue @@ -1461,7 +1461,12 @@ :maintaining.sync="maintainingAcquisitionEquipment" :inspection="detailData" flag="oqc" + :start-visible.sync="startEquipmentVisible" + :start-order="startInspectionRow" + :start-items="startEquipmentItems" + :can-start-save="!authStartInspection" :can-batch-select="true" + @start-save="confirmStartInspection(startInspectionRow)" > { - let tempData = { + async actionModal (row) { + if (this.startInspectionBusy || this.startEquipmentVisible) return + this.startInspectionBusy = true + try { + const { data } = await getOQCItemObjectList({ + site: row.site, + buNo: row.buNo, + inspectionNo: row.inspectionNo + }) + if (!data || data.code !== 0) { + this.$message.error((data && data.msg) || this.$t('qc.common.systemError')) + return + } + this.startInspectionRow = row + this.startEquipmentItems = data.rows || [] + if (this.startEquipmentItems.length) { + this.startEquipmentVisible = true + return + } + } catch (error) { + this.$message.error(this.$t('qc.common.systemError')) + return + } finally { + this.startInspectionBusy = false + } + return this.confirmStartInspection(row) + }, + + async confirmStartInspection (row) { + if (this.startInspectionBusy) return + this.startInspectionBusy = true + try { + const confirmed = await this.$confirm(this.$t('qc.entry.confirmStart'), this.$t('qc.common.tip'), { + confirmButtonText: this.$t('qc.common.confirm'), + cancelButtonText: this.$t('qc.common.cancel'), + type: 'warning' + }).then(() => true, () => false) + if (!confirmed) return + + const tempData = { site: row.site, buNo: row.buNo, inspectionNo: row.inspectionNo, actionBy: this.$store.state.user.name, - state: '待检验' + state: '待检验', + equipmentCollectList: this.startEquipmentItems + .filter(item => item.equipmentNo) + .map(({ itemNo, equipmentNo }) => ({ itemNo, equipmentNo })) } - actionFQASInspection(tempData).then(async ({data}) => { - if (data && data.code === 0) { - this.$message({ - message: this.$t('qc.common.operationSuccess'), - type: 'success', - duration: 1500, - onClose: () => { - } - }) - this.searchData.inspectionNo = row.inspectionNo - row.state = tempData.state - await this.getDataList() - this.detailModal(row) - } else { - await this.$alert(data.msg, this.$t('qc.common.errorTitle'), { - confirmButtonText: this.$t('qc.common.confirm') - }) - } + const { data } = await actionFQASInspection(tempData) + if (!data || data.code !== 0) { + await this.$alert((data && data.msg) || this.$t('qc.common.systemError'), this.$t('qc.common.errorTitle'), { + confirmButtonText: this.$t('qc.common.confirm') + }).catch(() => {}) + return + } + this.startEquipmentVisible = false + this.$message({ + message: this.$t('qc.common.operationSuccess'), + type: 'success', + duration: 1500 }) - }) + this.searchData.inspectionNo = row.inspectionNo + row.state = tempData.state + this.getDataList() + this.detailModal(row) + } catch (error) { + this.$message.error(this.$t('qc.common.systemError')) + } finally { + this.startInspectionBusy = false + } }, // 明细记录信息查询