瀏覽代碼

采购订单折后金额不计算虚拟产品

yh 1 月之前
父節點
當前提交
6fb3a9f8e3
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

+ 7 - 1
src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

@@ -866,11 +866,17 @@
         (newValue, oldValue) => {
           let data = newValue.dataSource;
           let total = 0;
+          let other = 0;
           data.map((item) => {
-            total += Number(item.taxAmount);
+            if (item.sourceType) {
+              total += Number(item.taxAmount) || 0;
+            } else {
+              other += Number(item.taxAmount) || 0;
+            }
           });
           formData.totalAmount = total;
           getDiscountAmount();
+          formData.discountAmount = parseFloat(formData.discountAmount) + parseFloat(other);
           if (data.length < 1) {
             formData.discountHead = 0;
             formData.discountAmount = '';