Browse Source

采购订单-主表折后金额计算

jingbb 1 month ago
parent
commit
63ff2b37ef

+ 2 - 2
src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

@@ -814,7 +814,7 @@
       };
       // 计算折扣金额
       const getDiscountAmount = () => {
-        formData.discountAmount = Number((formData.totalAmount * (1 - formData.discountHead / 100)).toFixed(2));
+        formData.discountAmount = (Number(formData.totalAmount )* (1 - Number(formData.discountHead) / 100)).toFixed(2);
       };
       // 监听 count 的变化
       watch(
@@ -823,7 +823,7 @@
           let data = newValue.dataSource;
           let total = 0;
           data.map((item) => {
-            total += item.taxAmount;
+            total += Number(item.taxAmount);
           });
           formData.totalAmount = total;
           getDiscountAmount();