Просмотр исходного кода

fix: 更新应付金额标签为“本次对账应付总金额”,优化应付总金额计算逻辑

xieyong 3 недель назад
Родитель
Сommit
88f20f2c46

+ 10 - 5
src/views/purchasingManage/purchaseOrder/accountstatement/components/payablesInfo.vue

@@ -269,7 +269,7 @@
           {
             minWidth: 120,
             prop: 'payablePrice',
-            label: '本次应付金额',
+            label: '本次对账应付总金额',
             align: 'center',
             showOverflowTooltip: true
           },
@@ -298,10 +298,15 @@
       },
       receivedTotalPrice() {
         return (
-          Math.round(
-            ((+this.dataForm.amountTotalPrice || 0) -
-              this.statementAdvanceTotalPrice) *
-              100
+          // Math.round(
+          //   ((+this.dataForm.amountTotalPrice || 0) -
+          //     this.statementAdvanceTotalPrice) *
+          //     100
+          // ) / 100
+          this.localList.reduce(
+            (pre, cur) =>
+              pre + Math.round((+cur.payablePrice || 0) * 100),
+            0
           ) / 100
         );
       }