|
@@ -180,6 +180,7 @@ import { detailListData } from "@/api/importTrade/purchase";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import { getOrgOrderNo } from "@/api/importTrade/salesContract"
|
|
|
import procurementDetail from "@/components/procurement/purchase";
|
|
|
+import { numCal } from "@/util/calculate";
|
|
|
import _ from "lodash";
|
|
|
|
|
|
export default {
|
|
@@ -433,12 +434,12 @@ export default {
|
|
|
item.cntrLiang = item.cntrNum
|
|
|
//如果箱量大于1 则根据箱量生成几条收货单明细 并均分发票重量
|
|
|
if (item.cntrLiang > 1) {
|
|
|
- let receiptInvoiceWeight = item.invoiceWeight / item.cntrLiang;
|
|
|
- let receiptActualQuantity = item.invoiceWeight / item.cntrLiang;
|
|
|
- let receiptGrossWeight = item.invoiceWeight / item.cntrLiang;
|
|
|
- let receiptBillWeight = item.billWeight / item.cntrLiang;
|
|
|
- let receiptPrice = item.price / item.cntrLiang;
|
|
|
- let receiptContractAmount = item.contractAmount / item.cntrLiang;
|
|
|
+ let receiptInvoiceWeight = numCal(numCal(item.invoiceWeight) / item.cntrLiang);
|
|
|
+ let receiptActualQuantity = numCal(numCal(item.invoiceWeight) / item.cntrLiang);
|
|
|
+ let receiptGrossWeight = numCal(numCal(item.invoiceWeight) / item.cntrLiang);
|
|
|
+ let receiptBillWeight = numCal(numCal(item.billWeight) / item.cntrLiang);
|
|
|
+ let receiptPrice = numCal(numCal(item.price) / item.cntrLiang);
|
|
|
+ let receiptContractAmount = numCal(numCal(item.contractAmount) / item.cntrLiang);
|
|
|
for (let i = 0; i < item.cntrLiang; i++) {
|
|
|
item.invoiceWeight = receiptInvoiceWeight;
|
|
|
item.actualQuantity = receiptActualQuantity;
|