Explorar el Código

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

yh hace 1 semana
padre
commit
6fb3a9f8e3

+ 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 = '';