Browse Source

fix:修改支付逻辑

ly 9 months ago
parent
commit
4a010c0e76
1 changed files with 3 additions and 5 deletions
  1. 3 5
      src/views/business/financial/payment/form.vue

+ 3 - 5
src/views/business/financial/payment/form.vue

@@ -616,15 +616,13 @@
      // const countAmount = rowNum((Number(item.reviewAmount) || 0) + (Number(item.paymentAmount) || 0)) - (Number(item.thisPaymentAmount || 0));
       const countAmount = (Number(item.reviewAmount) || 0) + (Number(item.payment) || 0);
       const amount = (Number(countAmount || 0)) - (Number(item.thisPaymentAmount || 0))+(Number(item.paymentAmount || 0));
-      console.log("总金额",(Number(item.reviewAmount) || 0) + (Number(item.payment) || 0));
-      console.log("现总金额",amount)
-      if (item.paymentAmount !== 0 && tempAmount <  item.paymentAmount) {
-        if(item.reallyAmount < amount){
+      const paymentAmount = (Number(item.reviewAmount || 0)) - (Number(item.thisPaymentAmount || 0));
+      console.log("本次可支出金额",paymentAmount);
+        if(item.reallyAmount < paymentAmount + item.paymentAmount){
           console.log(item.paymentAmount,item.reviewAmount,item.payment,item.thisPaymentAmount)
           proxy.$modal.msgError("当前的" + item.taskTypeName + "本次支出金额超过可支出金额,不可提交,请联系财务人员。");
           return;
         }
-      }
     }
     proxy.$refs["orderRef"].validate((valid) => {
       if (valid && detailValid()) {