Ver Fonte

fix: 修改付款弹窗已支付金额计算逻辑,确保使用正确的字段

xieyong há 1 mês atrás
pai
commit
b6bf749aee

+ 1 - 3
src/components/Dict/DictSelection.vue

@@ -59,7 +59,6 @@
     computed: {
       ...mapGetters(['dict', 'getDict']),
       dictList() {
-
         return (
           (this.listFormatte &&
             this.listFormatte(
@@ -84,8 +83,7 @@
       }
     },
     created() {
-      if (this.dictName&&this.isOne) {
-        
+      if (this.dictName && this.isOne) {
         this.requestDict(this.dictName);
       }
     },

+ 5 - 2
src/views/financialManage/prepayment/components/payDialog.vue

@@ -198,7 +198,7 @@
     computed: {
       paidAmount() {
         return this.form.tableData.reduce((sum, item) => {
-          const val = parseFloat(item.paidAmount);
+          const val = parseFloat(item.paidTotalPrice);
           return sum + (isNaN(val) ? 0 : val);
         }, 0).toFixed(2);
       },
@@ -213,7 +213,10 @@
         this.visible = true;
         this.row = row;
         this.info = await getPrepaymentInfo(row.id);
-        this.form.tableData = this.info.detailList || [];
+        this.form.tableData = (this.info.detailList || []).map(item => ({
+          ...item,
+          paymentType: item.paymentType != null ? String(item.paymentType) : ''
+        }));
       },
 
       addRow() {