Browse Source

2026-06-10

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

Loading…
Cancel
Save