|
@@ -204,7 +204,7 @@
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
- icon="el-icon-edit"
|
|
|
|
|
|
+ icon="el-icon-delete"
|
|
type="text"
|
|
type="text"
|
|
@click="rowDel(row, index)"
|
|
@click="rowDel(row, index)"
|
|
:disabled="detailData.status == 1"
|
|
:disabled="detailData.status == 1"
|
|
@@ -647,7 +647,14 @@ export default {
|
|
if (value == "USD") {
|
|
if (value == "USD") {
|
|
this.form.exchangeRate = 6.3843;
|
|
this.form.exchangeRate = 6.3843;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ rules: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "",
|
|
|
|
+ trigger: "blur"
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "汇率",
|
|
label: "汇率",
|
|
@@ -931,17 +938,15 @@ export default {
|
|
this.data[index].partsPrice = sum;
|
|
this.data[index].partsPrice = sum;
|
|
// 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
|
|
// 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
|
|
// this.data[index].price=_.multiply(multiplier, multiplicand)
|
|
// this.data[index].price=_.multiply(multiplier, multiplicand)
|
|
-
|
|
|
|
- this.data[index].price = Number(
|
|
|
|
|
|
+ this.data[index].productPrice = Number(
|
|
_.multiply(
|
|
_.multiply(
|
|
- _.divide(
|
|
|
|
- _.add(
|
|
|
|
- Number(sum),
|
|
|
|
- Number(
|
|
|
|
- this.data[index].partsPrice ? this.data[index].partsPrice : 0
|
|
|
|
- )
|
|
|
|
- ),
|
|
|
|
- Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
|
|
|
|
|
|
+ _.add(
|
|
|
|
+ Number(sum),
|
|
|
|
+ Number(
|
|
|
|
+ this.data[index].purchaseAmount
|
|
|
|
+ ? this.data[index].purchaseAmount
|
|
|
|
+ : 0
|
|
|
|
+ )
|
|
),
|
|
),
|
|
_.add(
|
|
_.add(
|
|
1,
|
|
1,
|
|
@@ -952,11 +957,33 @@ export default {
|
|
)
|
|
)
|
|
)
|
|
)
|
|
).toFixed(2);
|
|
).toFixed(2);
|
|
|
|
+ this.data[index].price = Number(
|
|
|
|
+ _.divide(
|
|
|
|
+ _.multiply(
|
|
|
|
+ _.add(
|
|
|
|
+ Number(sum),
|
|
|
|
+ Number(
|
|
|
|
+ this.data[index].purchaseAmount
|
|
|
|
+ ? this.data[index].purchaseAmount
|
|
|
|
+ : 0
|
|
|
|
+ )
|
|
|
|
+ ),
|
|
|
|
+ _.add(
|
|
|
|
+ 1,
|
|
|
|
+ _.divide(
|
|
|
|
+ Number(this.form.coefficient ? this.form.coefficient : 0),
|
|
|
|
+ 100
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ ),
|
|
|
|
+ Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
|
|
|
|
+ )
|
|
|
|
+ ).toFixed(2);
|
|
const names = [];
|
|
const names = [];
|
|
const namePrices = [];
|
|
const namePrices = [];
|
|
rows.map(e => {
|
|
rows.map(e => {
|
|
names.push(e.goodName);
|
|
names.push(e.goodName);
|
|
- namePrices.push(e.goodName + ":" + e.price);
|
|
|
|
|
|
+ namePrices.push(e.goodName + ":" + e.amout);
|
|
});
|
|
});
|
|
this.data[index].partsDescribe = names.join(",");
|
|
this.data[index].partsDescribe = names.join(",");
|
|
this.data[index].partsPriceDescribe = namePrices.join(";");
|
|
this.data[index].partsPriceDescribe = namePrices.join(";");
|