Просмотр исходного кода

fix: 强制收款条件为必填项,移除生成收款计划的依赖校验

xieyong 3 недель назад
Родитель
Сommit
6a2edaf1d2
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/views/saleManage/saleOrder/components/addDialogNew.vue

+ 3 - 3
src/views/saleManage/saleOrder/components/addDialogNew.vue

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