Browse Source

2026-06-10

RoHs优化
master
fengyuan_yang 1 day ago
parent
commit
8dd45484b6
  1. 16
      src/views/modules/rohs/rohsRecord.vue

16
src/views/modules/rohs/rohsRecord.vue

@ -1259,6 +1259,7 @@ export default {
rohsRemarkForm: {
remark: ''
},
hsfStandardDefaultText: 'With the follow environmental specification: Macallan regulated Substances specification(069-0135) /Macallan sustainable fiber specification(099-00532)',
modalData: {
site: 'DEFAULT',
referenceNo: '',
@ -1363,6 +1364,9 @@ export default {
this.refreshCurrentRowFromServer(this.modalData.site, this.modalData.referenceNo)
})
}
},
'modalData.endCustomer' () {
this.applyHsfStandardDefaultByCustomer(this.modalData)
}
},
methods: {
@ -1618,13 +1622,24 @@ export default {
shouldShowHsfStandard (customerCode) {
return String(customerCode || '').trim().toUpperCase() === 'C00052'
},
applyHsfStandardDefaultByCustomer (formData) {
if (!formData || !this.shouldShowHsfStandard(formData.endCustomer)) {
return
}
const currentValue = String(formData.hsfStandard || '').trim()
if (!currentValue) {
this.$set(formData, 'hsfStandard', this.hsfStandardDefaultText)
}
},
normalizeHsfStandardByCustomer (formData) {
if (!formData) {
return
}
if (!this.shouldShowHsfStandard(formData.endCustomer)) {
this.$set(formData, 'hsfStandard', '')
return
}
this.applyHsfStandardDefaultByCustomer(formData)
},
syncHsfApproverFields () {
const sourceList = Array.isArray(this.modalData.hsfApproverList)
@ -2398,6 +2413,7 @@ export default {
this.$set(this.modalData, 'validUntilValue', this.normalizeValidUntilValue(this.modalData.validUntilValue))
this.syncHsfApproverFields()
this.fillDisplayFields(this.modalData, row || {})
this.applyHsfStandardDefaultByCustomer(this.modalData)
//
this.$set(this.modalData, 'endCustomerFlag', true)
this.$set(this.modalData, 'projectIdFlag', true)

Loading…
Cancel
Save