Browse Source

2026-08-03

RoHS和Lab:
优化驳回控制查询
master
fengyuan_yang 7 hours ago
parent
commit
c1a6c4dde2
  1. 2
      src/api/lab/lab.js
  2. 2
      src/api/rohs/rohs.js
  3. 13
      src/views/modules/lab/labRecord.vue
  4. 17
      src/views/modules/rohs/rohsRecord.vue

2
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)

2
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);

13
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)
},

17
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

Loading…
Cancel
Save