Browse Source

fix:修改支付逻辑

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

+ 4 - 2
src/views/business/financial/payment/form.vue

@@ -612,9 +612,11 @@
       let item = form.value.details[i];
 
       const tempAmount = rowNum((Number(item.reallyAmount) || 0) - (Number(item.payment) || 0)) - (Number(item.reviewAmount || 0));
-
+      const countAmount = rowNum((Number(item.reallyAmount) || 0)  + (Number(item.payment) || 0) -rowNum((Number(item.reviewAmount) || 0) - (Number(item.paymentAmount) || 0)) + (Number(item.thisPaymentAmount || 0)));
+      console.log(countAmount);
       if (item.paymentAmount !== 0 && tempAmount <  item.paymentAmount) {
-        if(item.reallyAmount < (rowNum((Number(item.paymentAmount) || 0) + (Number(item.reviewAmount || 0)) + (Number(item.payment) || 0) -  (Number(item.thisPaymentAmount) || 0))) ){
+        if(item.reallyAmount < countAmount){
+          console.log(item.paymentAmount,item.reviewAmount,item.payment,item.thisPaymentAmount)
           proxy.$modal.msgError("当前的" + item.taskTypeName + "本次支出金额超过可支出金额,不可提交,请联系财务人员。");
           return;
         }