Pārlūkot izejas kodu

refactor: 优化收款支付列表逻辑,移除不必要的条件判断

xieyong 4 dienas atpakaļ
vecāks
revīzija
a5d07818be

+ 5 - 4
src/views/purchasingManage/purchaseOrder/components/addDialogNew.vue

@@ -2500,14 +2500,15 @@
             sourceTypeName: this.requirementSourceType.find(
               (val) => val.value == this.form.sourceType
             )?.label,
-            receiptPaymentList: this.form.isGeneratePaymentPlan == 0 ? [] : 
-              this.$refs?.paymentCollectionPlanRef?.getTableValue() || [],
+            // receiptPaymentList: this.form.isGeneratePaymentPlan == 0 ? [] : 
+            //   this.$refs?.paymentCollectionPlanRef?.getTableValue() || [],
+            receiptPaymentList: this.$refs?.paymentCollectionPlanRef?.getTableValue() || [],
             endSettlementDate: this.form.settlementDate?.length ? this.form.settlementDate[1] : '',
             startSettlementDate: this.form.settlementDate?.length ? this.form.settlementDate[0] : ''
           });
 
 
-          if(this.form.isGeneratePaymentPlan != 0) {
+          // if(this.form.isGeneratePaymentPlan != 0) {
             const ratioSum = commitData.receiptPaymentList.reduce((acc, cur) => acc + +cur.ratio, 0);
           // if(+ratioSum != 100){
           //   this.$message.error('比例合计必须为100%');
@@ -2518,7 +2519,7 @@
               this.$message.error('比例合计不能超过100%');
               return;
             }
-          }
+          // }