From 8dd45484b6894d0d04489547c7019102d1189707 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 10 Jun 2026 14:14:31 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-10=20RoHs=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/rohs/rohsRecord.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index 9094240..01e2a1d 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/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)