diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue
index 81df395..9286856 100644
--- a/src/views/modules/rohs/rohsRecord.vue
+++ b/src/views/modules/rohs/rohsRecord.vue
@@ -230,7 +230,7 @@
商品组3/Comm Group 3
商品组3/Comm Group 3
-
+
@@ -241,7 +241,7 @@
否
-
+
是
否
@@ -1380,7 +1380,7 @@
否
-
+
是
否
@@ -2559,6 +2559,9 @@ export default {
if (fieldConfig.fieldId === 'hsfStandard' && !this.shouldShowHsfStandard(this.modalData.endCustomer)) {
continue
}
+ if (fieldConfig.fieldId === 'commGroup3' && String(this.modalData.commGroup1 || '').trim() !== '00100') {
+ continue
+ }
if (fieldConfig.fieldId === 'validUntil' || fieldConfig.fieldId === 'validUntilValue') {
if (validUntilPairRequiredChecked) {
continue
@@ -3793,6 +3796,9 @@ export default {
this.$set(this.modalData, 'isAhGrade', this.normalizeCheckboxFlag(this.modalData.isAhGrade))
this.normalizeHsfStandardByCustomer(this.modalData)
this.syncHsfApproverFields()
+ if (!this.validateCommGroupRule()) {
+ return
+ }
if (!this.validateValidUntilPair()) {
return
}
@@ -3865,6 +3871,9 @@ export default {
this.$set(this.modalData, 'isAhGrade', this.normalizeCheckboxFlag(this.modalData.isAhGrade))
this.normalizeHsfStandardByCustomer(this.modalData)
this.syncHsfApproverFields()
+ if (!this.validateCommGroupRule()) {
+ return
+ }
if (!this.validateValidUntilPair()) {
return
}
@@ -4721,8 +4730,27 @@ export default {
}).catch(() => {})
},
// ======== chooseList相关方法 ========
+ applyCommGroup3RuleByCommGroup1 (needValidate = false) {
+ const commGroup1 = String(this.modalData.commGroup1 || '').trim()
+ if (commGroup1 !== '00100') {
+ this.modalData.commGroup3 = ''
+ this.modalData.commGroup3Desc = ''
+ return true
+ }
+ if (needValidate && !String(this.modalData.commGroup3 || '').trim()) {
+ this.$message.warning('商品组1为"00100"时,商品组3必填!')
+ return false
+ }
+ return true
+ },
+ validateCommGroupRule () {
+ return this.applyCommGroup3RuleByCommGroup1(true)
+ },
// 获取基础数据列表
getBaseList (val, type) {
+ if (val === 130 && this.modalData.commGroup1 !== '00100') {
+ return
+ }
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
@@ -4801,6 +4829,7 @@ export default {
if (this.tagNo === 110) {
this.modalData.commGroup1 = val.product_group_id
this.modalData.commGroup1Desc = val.product_group_name
+ this.applyCommGroup3RuleByCommGroup1(false)
}
if (this.tagNo === 111) {
this.modalData.commGroup2 = val.product_group_id
@@ -5041,6 +5070,7 @@ export default {
},
// 商品组1输入校验
commGroup1Blur (tagNo) {
+ this.applyCommGroup3RuleByCommGroup1(false)
if (this.modalData.commGroup1 != null && this.modalData.commGroup1 !== '') {
let tempData = {
tagno: tagNo,
@@ -5050,6 +5080,7 @@ export default {
if (data && data.code === 0 && data.baseListData.length > 0) {
this.modalData.commGroup1 = data.baseListData[0].product_group_id
this.modalData.commGroup1Desc = data.baseListData[0].product_group_name
+ this.applyCommGroup3RuleByCommGroup1(false)
} else {
this.modalData.commGroup1Desc = ''
}
@@ -5079,6 +5110,10 @@ export default {
},
// 商品组3输入校验
commGroup3Blur (tagNo) {
+ if (this.modalData.commGroup1 !== '00100') {
+ this.applyCommGroup3RuleByCommGroup1(false)
+ return
+ }
if (this.modalData.commGroup3 != null && this.modalData.commGroup3 !== '') {
let tempData = {
tagno: tagNo,