Преглед на файлове

feat: 更新应收款总金额计算逻辑,使用dataForm中的数据替代本地列表计算

xieyong преди 1 ден
родител
ревизия
0e1ee1d5ff
променени са 1 файла, в които са добавени 14 реда и са изтрити 12 реда
  1. 14 12
      src/views/bpm/handleTask/components/saleOrder/accountstatement/receivableInfo.vue

+ 14 - 12
src/views/bpm/handleTask/components/saleOrder/accountstatement/receivableInfo.vue

@@ -250,22 +250,24 @@
         return this.dialogType === 'view';
       },
       statementAdvanceTotalPrice() {
-        return (
-          this.localList.reduce(
-            (pre, cur) =>
-              pre + Math.round((+cur.statementAdvanceConfirmAmount || 0) * 100),
-            0
-          ) / 100
-        );
+        // return (
+        //   this.localList.reduce(
+        //     (pre, cur) =>
+        //       pre + Math.round((+cur.statementAdvanceConfirmAmount || 0) * 100),
+        //     0
+        //   ) / 100
+        // );
+        return this.dataForm?.statReceipt?.statementAdvanceTotalPrice || 0;
       },
       receivedTotalPrice() {
-        return (
-          Math.round(
-            ((+this.dataForm.amountTotalPrice || 0) -
-              this.statementAdvanceTotalPrice) *
-              100
+        const value = (
+          this.dataForm?.statReceipt?.statReceiptDetailList?.reduce(
+            (pre, cur) =>
+              pre + Math.round((+cur.statementAmt || 0) * 100),
+            0
           ) / 100
         );
+        return isNaN(value) ? 0 : value;
       }
     },
     watch: {