Browse Source

fix:修改支付逻辑

ly 9 months ago
parent
commit
576129b23e
1 changed files with 12 additions and 8 deletions
  1. 12 8
      src/views/business/financial/payment/form.vue

+ 12 - 8
src/views/business/financial/payment/form.vue

@@ -217,11 +217,11 @@
                       <span>{{ rowNum(scope.row.payment) }}</span>
                     </template>
                   </el-table-column>
-<!--                  <el-table-column label="审核支付金额" prop="reviewAmount" width="100" align="center">-->
-<!--                    <template #default="scope">-->
-<!--                      <span>{{ rowNum(scope.row.reviewAmount) }}</span>-->
-<!--                    </template>-->
-<!--                  </el-table-column>-->
+                  <el-table-column label="审核支付金额" prop="reviewAmount" width="100" align="center">
+                    <template #default="scope">
+                      <span>{{ rowNum(scope.row.reviewAmount) }}</span>
+                    </template>
+                  </el-table-column>
                   <el-table-column label="可支出金额" align="center">
                     <template #default="scope">
                       {{rowNum((Number(scope.row.reallyAmount) || 0) - (Number(scope.row.payment) || 0))}}
@@ -612,10 +612,14 @@
       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);
+
+     // 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 < countAmount){
+        if(item.reallyAmount < amount){
           console.log(item.paymentAmount,item.reviewAmount,item.payment,item.thisPaymentAmount)
           proxy.$modal.msgError("当前的" + item.taskTypeName + "本次支出金额超过可支出金额,不可提交,请联系财务人员。");
           return;