|
@@ -417,7 +417,7 @@
|
|
|
append-to-body
|
|
|
class="el-dialogDeep"
|
|
|
:visible.sync="dialogVisible"
|
|
|
- width="60%"
|
|
|
+ width="80%"
|
|
|
:close-on-click-modal="false"
|
|
|
:destroy-on-close="true"
|
|
|
:close-on-press-escape="false"
|
|
@@ -427,7 +427,7 @@
|
|
|
>
|
|
|
<span>
|
|
|
<el-row>
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="4">
|
|
|
<div>
|
|
|
<el-scrollbar>
|
|
|
<basic-container>
|
|
@@ -440,7 +440,7 @@
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="19">
|
|
|
+ <el-col :span="20">
|
|
|
<avue-crud
|
|
|
:option="goodsOption"
|
|
|
:table-loading="loading"
|
|
@@ -521,7 +521,7 @@ export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
- oldExchange: 1,
|
|
|
+ oldExchange: null,
|
|
|
treeStyle: "height:" + (window.innerHeight - 315) + "px",
|
|
|
itemtypeList: [],
|
|
|
switchDialog: false,
|
|
@@ -694,7 +694,14 @@ export default {
|
|
|
label: "汇率",
|
|
|
prop: "exchangeRate",
|
|
|
span: 8,
|
|
|
- row: true
|
|
|
+ row: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "箱型",
|
|
@@ -878,6 +885,7 @@ export default {
|
|
|
if (e.dictValue == "USD") {
|
|
|
this.form.exchangeRate = e.remark;
|
|
|
this.oldform.exchangeRate = e.remark;
|
|
|
+ this.oldExchange = e.remark;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -910,13 +918,12 @@ export default {
|
|
|
this.form.coefficient = row.coefficient;
|
|
|
if (this.data.length > 0) {
|
|
|
this.data.forEach(e => {
|
|
|
- e.productPrice = productCal(e.purchaseAmount, this.form.coefficient);
|
|
|
- e.price = sellingCal(
|
|
|
- e.productPrice,
|
|
|
+ e.productPrice = productCal(
|
|
|
+ e.purchaseAmount,
|
|
|
e.partsPrice,
|
|
|
- this.form.coefficient,
|
|
|
- this.form.exchangeRate
|
|
|
+ this.form.coefficient
|
|
|
);
|
|
|
+ e.price = sellingCal(e.productPrice, this.form.exchangeRate);
|
|
|
e.amount = amountCal(
|
|
|
e.price,
|
|
|
e.orderQuantity,
|
|
@@ -999,12 +1006,11 @@ export default {
|
|
|
// 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
|
|
|
this.data[index].productPrice = productCal(
|
|
|
this.data[index].purchaseAmount,
|
|
|
+ this.data[index].partsPrice,
|
|
|
this.form.coefficient
|
|
|
);
|
|
|
this.data[index].price = sellingCal(
|
|
|
this.data[index].productPrice,
|
|
|
- this.data[index].partsPrice,
|
|
|
- this.form.coefficient,
|
|
|
this.form.exchangeRate
|
|
|
);
|
|
|
this.data[index].amount = amountCal(
|
|
@@ -1056,13 +1062,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
purchaseAmountChange(row) {
|
|
|
- row.productPrice = productCal(row.purchaseAmount, this.form.coefficient);
|
|
|
- row.price = sellingCal(
|
|
|
- row.productPrice,
|
|
|
+ row.productPrice = productCal(
|
|
|
+ row.purchaseAmount,
|
|
|
row.partsPrice,
|
|
|
- this.form.coefficient,
|
|
|
- this.form.exchangeRate
|
|
|
+ this.form.coefficient
|
|
|
);
|
|
|
+ row.price = sellingCal(row.productPrice, this.form.exchangeRate);
|
|
|
row.amount = amountCal(
|
|
|
row.price,
|
|
|
row.orderQuantity,
|
|
@@ -1098,12 +1103,7 @@ export default {
|
|
|
this.oldExchange,
|
|
|
this.form.exchangeRate
|
|
|
);
|
|
|
- e.price = sellingCal(
|
|
|
- e.productPrice,
|
|
|
- e.partsPrice,
|
|
|
- this.form.coefficient,
|
|
|
- this.form.exchangeRate
|
|
|
- );
|
|
|
+ e.price = sellingCal(e.productPrice, this.form.exchangeRate);
|
|
|
e.amount = amountCal(
|
|
|
e.price,
|
|
|
e.orderQuantity,
|
|
@@ -1120,12 +1120,7 @@ export default {
|
|
|
this.data.forEach(e => {
|
|
|
e.freight = transformCal(e.freight, this.oldExchange, row);
|
|
|
e.insurance = transformCal(e.insurance, this.oldExchange, row);
|
|
|
- e.price = sellingCal(
|
|
|
- e.productPrice,
|
|
|
- e.partsPrice,
|
|
|
- this.form.coefficient,
|
|
|
- row
|
|
|
- );
|
|
|
+ e.price = sellingCal(e.productPrice, row);
|
|
|
e.amount = amountCal(
|
|
|
e.price,
|
|
|
e.orderQuantity,
|
|
@@ -1337,11 +1332,9 @@ export default {
|
|
|
partsPrice: 0,
|
|
|
itemType: e.specs,
|
|
|
tradeTerms: null,
|
|
|
- productPrice: productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
+ productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
|
|
|
price: sellingCal(
|
|
|
- productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
- 0,
|
|
|
- this.form.coefficient,
|
|
|
+ productCal(e.purchaseAmount, 0, this.form.coefficient),
|
|
|
this.form.exchangeRate
|
|
|
),
|
|
|
orderQuantity: 1,
|
|
@@ -1349,9 +1342,7 @@ export default {
|
|
|
freight: 0,
|
|
|
discount: null,
|
|
|
amount: sellingCal(
|
|
|
- productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
- 0,
|
|
|
- this.form.coefficient,
|
|
|
+ productCal(e.purchaseAmount, 0, this.form.coefficient),
|
|
|
this.form.exchangeRate
|
|
|
),
|
|
|
taxRate: 0,
|