From c1a6c4dde23f7bb58a2656209e8aebc07727900f Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 3 Aug 2026 11:25:20 +0800 Subject: [PATCH] =?UTF-8?q?2026-08-03=20RoHS=E5=92=8CLab=EF=BC=9A=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A9=B3=E5=9B=9E=E6=8E=A7=E5=88=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lab/lab.js | 2 +- src/api/rohs/rohs.js | 2 +- src/views/modules/lab/labRecord.vue | 13 +++++++------ src/views/modules/rohs/rohsRecord.vue | 17 +++++++++-------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/api/lab/lab.js b/src/api/lab/lab.js index 459ed2d..e44c335 100644 --- a/src/api/lab/lab.js +++ b/src/api/lab/lab.js @@ -7,7 +7,7 @@ export const getLabList = params => createAPI(`/lab/list`, 'get', params) export const getLabListAny = data => createAPI(`/lab/list/any`, 'post', data) // 获取详情 -export const getLabDetail = (site, referenceNo) => createAPI(`/lab/info`, 'get', { site, referenceNo }) +export const getLabDetail = (site, referenceNo, menuId) => createAPI(`/lab/info`, 'get', { site, referenceNo, menuId }) // 新增 export const saveLab = data => createAPI(`/lab/save`, 'post', data) diff --git a/src/api/rohs/rohs.js b/src/api/rohs/rohs.js index c46afc8..89343ed 100644 --- a/src/api/rohs/rohs.js +++ b/src/api/rohs/rohs.js @@ -7,7 +7,7 @@ export const getRohsList = params => createAPI(`/rohs/list`, 'get', params); export const getRohsListAny = data => createAPI(`/rohs/list/any`, 'post', data); // 获取详情 -export const getRohsDetail = (site, referenceNo) => createAPI(`/rohs/info`, 'get', { site, referenceNo }); +export const getRohsDetail = (site, referenceNo, menuId) => createAPI(`/rohs/info`, 'get', { site, referenceNo, menuId }); // 查询物料(用于RoHs材料明细选择) export const getRohsProjectMaterialList = params => createAPI(`/rohs/projectMaterialList`, 'get', params); diff --git a/src/views/modules/lab/labRecord.vue b/src/views/modules/lab/labRecord.vue index 1032393..014b6b0 100644 --- a/src/views/modules/lab/labRecord.vue +++ b/src/views/modules/lab/labRecord.vue @@ -2370,7 +2370,7 @@ export default { this.currentTestSpecFileList = [] this.currentTestReportFileList = [] this.loadCurrentAttachmentFileLists(row.site, row.referenceNo, requestId) - api.getLabDetail(row.site, row.referenceNo).then(({data}) => { + api.getLabDetail(row.site, row.referenceNo, this.menuId).then(({data}) => { if (requestId !== this.currentDetailRequestId) { return } @@ -2706,7 +2706,7 @@ export default { if (row) { this.modalTitle = 'Lab Test 编辑' - api.getLabDetail(row.site, row.referenceNo).then(({data}) => { + api.getLabDetail(row.site, row.referenceNo, this.menuId).then(({data}) => { if (data && data.code === 0) { const detail = data.data || {} this.modalData = this.buildDefaultModalData() @@ -2722,7 +2722,7 @@ export default { this.$set(this.modalData, 'labApproverList', this.modalData.labApproverCodeList || []) this.$set(this.modalData, 'customerIdFlag', true) this.$set(this.modalData, 'projectIdFlag', true) - this.applyModalButtonCondition(row || {}) + this.applyModalButtonCondition(this.modalData, row || {}) this.$set(this.modalData, 'testerName', this.modalData.testerName || this.modalData.tester || '') this.$set(this.modalData, 'labApproverName', this.modalData.labApproverName || this.modalData.labApprover || '') Promise.all([ @@ -2789,10 +2789,11 @@ export default { this.$set(target, 'customerName', target.customerName || source.customerName || '') this.$set(target, 'projectName', target.projectName || source.projectName || '') }, - applyModalButtonCondition (source) { + applyModalButtonCondition (source, fallbackSource = {}) { const buttonSource = source || {} - const approverNames = String(buttonSource.createBy2 || buttonSource.currentApprover || '').trim() - const isReject = String(buttonSource.isReject || '').trim().toUpperCase() === 'Y' ? 'Y' : 'N' + const fallback = fallbackSource || {} + const approverNames = String(buttonSource.createBy2 || buttonSource.currentApprover || fallback.createBy2 || fallback.currentApprover || '').trim() + const isReject = String(buttonSource.isReject || fallback.isReject || '').trim().toUpperCase() === 'Y' ? 'Y' : 'N' this.$set(this.modalData, 'createBy2', approverNames) this.$set(this.modalData, 'isReject', isReject) }, diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index 3781727..80199ee 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/src/views/modules/rohs/rohsRecord.vue @@ -3288,7 +3288,7 @@ export default { this.$set(this.rohsRemarkForm, 'remark', this.modalData.remark || '') return } - api.getRohsDetail(this.modalData.site, this.modalData.referenceNo).then(({data}) => { + api.getRohsDetail(this.modalData.site, this.modalData.referenceNo, this.menuId).then(({data}) => { if (data && data.code === 0 && data.data) { this.$set(this.rohsRemarkForm, 'remark', data.data.remark || '') } else { @@ -3339,7 +3339,7 @@ export default { this.$set(this.rohsMaterialDescForm, 'materialDesc', this.modalData.materialDesc || '') return } - api.getRohsDetail(this.modalData.site, this.modalData.referenceNo).then(({data}) => { + api.getRohsDetail(this.modalData.site, this.modalData.referenceNo, this.menuId).then(({data}) => { if (data && data.code === 0 && data.data) { this.$set(this.rohsMaterialDescForm, 'materialDesc', data.data.materialDesc || '') } else { @@ -3381,10 +3381,11 @@ export default { this.$message.error('保存失败') }) }, - applyModalButtonCondition (source) { + applyModalButtonCondition (source, fallbackSource = {}) { const buttonSource = source || {} - const approverNames = String(buttonSource.createBy2 || buttonSource.currentApprover || '').trim() - const isReject = String(buttonSource.isReject || '').trim().toUpperCase() === 'Y' ? 'Y' : 'N' + const fallback = fallbackSource || {} + const approverNames = String(buttonSource.createBy2 || buttonSource.currentApprover || fallback.createBy2 || fallback.currentApprover || '').trim() + const isReject = String(buttonSource.isReject || fallback.isReject || '').trim().toUpperCase() === 'Y' ? 'Y' : 'N' this.$set(this.modalData, 'createBy2', approverNames) this.$set(this.modalData, 'isReject', isReject) }, @@ -3459,7 +3460,7 @@ export default { this.applyCurrentRowData(row || {}, fallbackData || {}) return Promise.resolve() } - return api.getRohsDetail(row.site, row.referenceNo).then(({data}) => { + return api.getRohsDetail(row.site, row.referenceNo, this.menuId).then(({data}) => { if (data && data.code === 0 && data.data) { this.applyCurrentRowData(data.data, fallbackData || row) } else { @@ -3962,7 +3963,7 @@ export default { if (row) { this.modalTitle = 'RoHS 编辑' - api.getRohsDetail(row.site, row.referenceNo).then(({data}) => { + api.getRohsDetail(row.site, row.referenceNo, this.menuId).then(({data}) => { if (data && data.code === 0) { this.modalData = data.data || {} this.$set(this.modalData, 'qualificationDocumentsNeededList', this.modalData.qualificationDocumentsNeeded ? this.modalData.qualificationDocumentsNeeded.split(';').filter(item => item) : []) @@ -3979,7 +3980,7 @@ export default { // 编辑时默认可修改工艺、最终客户和项目编码(若流程管控不可编辑则以流程为准) this.$set(this.modalData, 'endCustomerFlag', false) this.$set(this.modalData, 'projectIdFlag', false) - this.applyModalButtonCondition(row || {}) + this.applyModalButtonCondition(this.modalData, row || {}) this.ensureModalBuNo(true, false).then((buNo) => { if (!buNo) { return