|
|
@ -3288,7 +3288,7 @@ export default { |
|
|
this.$set(this.rohsRemarkForm, 'remark', this.modalData.remark || '') |
|
|
this.$set(this.rohsRemarkForm, 'remark', this.modalData.remark || '') |
|
|
return |
|
|
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) { |
|
|
if (data && data.code === 0 && data.data) { |
|
|
this.$set(this.rohsRemarkForm, 'remark', data.data.remark || '') |
|
|
this.$set(this.rohsRemarkForm, 'remark', data.data.remark || '') |
|
|
} else { |
|
|
} else { |
|
|
@ -3339,7 +3339,7 @@ export default { |
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', this.modalData.materialDesc || '') |
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', this.modalData.materialDesc || '') |
|
|
return |
|
|
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) { |
|
|
if (data && data.code === 0 && data.data) { |
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', data.data.materialDesc || '') |
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', data.data.materialDesc || '') |
|
|
} else { |
|
|
} else { |
|
|
@ -3381,10 +3381,11 @@ export default { |
|
|
this.$message.error('保存失败') |
|
|
this.$message.error('保存失败') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
applyModalButtonCondition (source) { |
|
|
|
|
|
|
|
|
applyModalButtonCondition (source, fallbackSource = {}) { |
|
|
const buttonSource = source || {} |
|
|
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, 'createBy2', approverNames) |
|
|
this.$set(this.modalData, 'isReject', isReject) |
|
|
this.$set(this.modalData, 'isReject', isReject) |
|
|
}, |
|
|
}, |
|
|
@ -3459,7 +3460,7 @@ export default { |
|
|
this.applyCurrentRowData(row || {}, fallbackData || {}) |
|
|
this.applyCurrentRowData(row || {}, fallbackData || {}) |
|
|
return Promise.resolve() |
|
|
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) { |
|
|
if (data && data.code === 0 && data.data) { |
|
|
this.applyCurrentRowData(data.data, fallbackData || row) |
|
|
this.applyCurrentRowData(data.data, fallbackData || row) |
|
|
} else { |
|
|
} else { |
|
|
@ -3962,7 +3963,7 @@ export default { |
|
|
|
|
|
|
|
|
if (row) { |
|
|
if (row) { |
|
|
this.modalTitle = 'RoHS 编辑' |
|
|
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) { |
|
|
if (data && data.code === 0) { |
|
|
this.modalData = data.data || {} |
|
|
this.modalData = data.data || {} |
|
|
this.$set(this.modalData, 'qualificationDocumentsNeededList', this.modalData.qualificationDocumentsNeeded ? this.modalData.qualificationDocumentsNeeded.split(';').filter(item => item) : []) |
|
|
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, 'endCustomerFlag', false) |
|
|
this.$set(this.modalData, 'projectIdFlag', false) |
|
|
this.$set(this.modalData, 'projectIdFlag', false) |
|
|
this.applyModalButtonCondition(row || {}) |
|
|
|
|
|
|
|
|
this.applyModalButtonCondition(this.modalData, row || {}) |
|
|
this.ensureModalBuNo(true, false).then((buNo) => { |
|
|
this.ensureModalBuNo(true, false).then((buNo) => { |
|
|
if (!buNo) { |
|
|
if (!buNo) { |
|
|
return |
|
|
return |
|
|
|