|
|
|
@ -30,7 +30,9 @@ |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<el-descriptions style="width: 50%; margin: 0 auto" direction="vertical" :column="3" border> |
|
|
|
|
<el-descriptions-item label="价格">{{ controlWindows.addInfo.salePrice }}元</el-descriptions-item> |
|
|
|
|
<el-descriptions-item label="价格" |
|
|
|
|
>{{ controlWindows.addInfo.salePrice }} 元/{{ controlWindows.addInfo.productMeasurement }}</el-descriptions-item |
|
|
|
|
> |
|
|
|
|
<el-descriptions-item label="订单提货量"> |
|
|
|
|
{{ controlWindows.addInfo.preQuantity | toNumberFixed }} |
|
|
|
|
{{ controlWindows.addInfo.productMeasurement }} |
|
|
|
@ -66,13 +68,13 @@ |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="销售价格"> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.salePrice }} 元 </template> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.salePrice }} 元/{{ controlWindows.addInfo.productMeasurement }} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="销售总金额"> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.preAmount }} 元 </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="成本价格"> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.floorPrice }} 元 </template> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.floorPrice }} 元/{{ controlWindows.addInfo.productMeasurement }} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="成本总金额"> |
|
|
|
|
<template slot-scope="{ row }"> {{ row.preCostAmount }} 元 </template> |
|
|
|
@ -95,8 +97,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
newCostPrice: '', |
|
|
|
|
newSalePrice: '', |
|
|
|
|
// newCostPrice: '', |
|
|
|
|
// newSalePrice: '', |
|
|
|
|
undergoChanges: false, |
|
|
|
|
tableData: [ |
|
|
|
|
{ |
|
|
|
@ -146,12 +148,8 @@ export default { |
|
|
|
|
serve.getRefineryProduct(productId).then(res => { |
|
|
|
|
let data = res.data |
|
|
|
|
if (data.salePrice2company != salePrice || data.floorPrice != floorPrice) { |
|
|
|
|
console.log('价格发生变化了捏') |
|
|
|
|
// 新的价格 |
|
|
|
|
this.newSalePrice = data.salePrice2company |
|
|
|
|
this.newCostPrice = data.floorPrice |
|
|
|
|
this.policyPopulation() |
|
|
|
|
} else console.log('芜湖 没变') |
|
|
|
|
this.policyPopulation(data.salePrice2company, data.floorPrice) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -174,7 +172,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 策略选择 |
|
|
|
|
policyPopulation() { |
|
|
|
|
policyPopulation(newSalePrice, newCostPrice) { |
|
|
|
|
let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo |
|
|
|
|
if (salePrice && floorPrice && preQuantity && preAmount) { |
|
|
|
|
let strategyArr = [ |
|
|
|
@ -184,8 +182,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 以提货量为准 |
|
|
|
|
() => { |
|
|
|
|
let _salePrice = this.newSalePrice |
|
|
|
|
let _floorPrice = this.newCostPrice |
|
|
|
|
let _salePrice = newSalePrice |
|
|
|
|
let _floorPrice = newCostPrice |
|
|
|
|
return { |
|
|
|
|
salePrice: _salePrice, |
|
|
|
|
floorPrice: _floorPrice, |
|
|
|
@ -196,8 +194,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// // 以订单金额为准 |
|
|
|
|
// () => { |
|
|
|
|
// let _salePrice = this.newSalePrice |
|
|
|
|
// let _floorPrice = this.newCostPrice |
|
|
|
|
// let _salePrice = newSalePrice |
|
|
|
|
// let _floorPrice = newCostPrice |
|
|
|
|
// return { |
|
|
|
|
// salePrice: _salePrice, |
|
|
|
|
// floorPrice: _floorPrice, |
|
|
|
@ -208,11 +206,9 @@ export default { |
|
|
|
|
// }, |
|
|
|
|
// 自定义数量 |
|
|
|
|
() => { |
|
|
|
|
let _salePrice = this.newSalePrice |
|
|
|
|
let _floorPrice = this.newCostPrice |
|
|
|
|
return { |
|
|
|
|
salePrice: _salePrice, |
|
|
|
|
floorPrice: _floorPrice, |
|
|
|
|
salePrice: newSalePrice, |
|
|
|
|
floorPrice: newCostPrice, |
|
|
|
|
preQuantity: '', |
|
|
|
|
preAmount: '', |
|
|
|
|
preCostAmount: '' |
|
|
|
@ -231,7 +227,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
Object.assign(originData, data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.undergoChanges = true |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|