|
@@ -2318,8 +2318,25 @@ export default {
|
|
|
// 复制的重新进行计算
|
|
|
for (let item of this.goodsoptions) {
|
|
|
if (item.itemId == this.data[i].itemId) {
|
|
|
+ this.data[i].purchaseCost = costCal(item.price, item.taxRate);
|
|
|
this.data[i].purchaseAmount = item.purchaseAmount
|
|
|
+
|
|
|
this.data[i].productPrice = productCal(item.purchaseAmount, 0, item.coefficient);
|
|
|
+ this.data[i].outFactoryPrice = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
|
|
|
+ this.data[i].shareAmount = 0;
|
|
|
+ this.data[i].internationalAmount = 0;
|
|
|
+ this.data[i].totalValue = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
|
|
|
+ this.data[i].orderQuantity = 1;
|
|
|
+ this.data[i].insurance = 0;
|
|
|
+ this.data[i].freight = 0;
|
|
|
+ this.data[i].discount = null;
|
|
|
+ this.data[i].price = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
|
|
|
+ this.data[i].amount = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
|
|
|
+ console.log(sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate),'出场价格')
|
|
|
+ this.data[i].taxRate = 0;
|
|
|
+ this.data[i].unit = item.unit;
|
|
|
+ this.data[i].itemMargin = grossProfitCal(item.purchaseAmount, 0, sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate), this.form.exchangeRate);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
// 处理金额
|
|
@@ -2398,6 +2415,7 @@ export default {
|
|
|
this.form.totalValue = sum(multiply(e.outFactoryPrice, e.orderQuantity), this.form.totalValue)
|
|
|
})
|
|
|
this.subLoading = true;
|
|
|
+ // return
|
|
|
submit({
|
|
|
...this.form,
|
|
|
orderItemsList: this.data,
|