|
|
@@ -1129,7 +1129,12 @@
|
|
|
}
|
|
|
],
|
|
|
collectionConditionName: [
|
|
|
- { required: true, message: '请选择收款条件', trigger: 'change' }
|
|
|
+ {
|
|
|
+ // 仅当「生成收款计划表 = 是」时收款条件才必填;选否则不再校验
|
|
|
+ required: this.form.isGenerateReceiptPlan !== 0,
|
|
|
+ message: '请选择收款条件',
|
|
|
+ trigger: 'change'
|
|
|
+ }
|
|
|
]
|
|
|
};
|
|
|
}
|
|
|
@@ -1199,7 +1204,8 @@
|
|
|
generatePlanChange(val) {
|
|
|
console.log(val)
|
|
|
if(val == 0) {
|
|
|
-
|
|
|
+ // 切到「否」时收款条件变为非必填,清掉已有的红字校验残留
|
|
|
+ this.$refs.form?.clearValidate(['collectionConditionName']);
|
|
|
} else {
|
|
|
this.issueNumberChange(this.form.issueNumber);
|
|
|
// this.$refs.paymentCollectionPlanRef?.setDiscountAmount(
|
|
|
@@ -2050,7 +2056,7 @@
|
|
|
getValidate() {
|
|
|
console.log(this.form);
|
|
|
|
|
|
- if (!this.form.collectionConditionName) {
|
|
|
+ if (this.form.isGenerateReceiptPlan !== 0 && !this.form.collectionConditionName) {
|
|
|
this.$message.error('收款条件不能为空');
|
|
|
}
|
|
|
|