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