This commit is contained in:
xiaozhiyong
2023-05-30 15:30:20 +08:00
parent f996006dad
commit f4f44eb502

View File

@@ -146,18 +146,17 @@ export default {
// 策略选择 // 策略选择
policyPopulation() { policyPopulation() {
let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo
// console.log(salePrice, preQuantity, preAmount)
if (salePrice && floorPrice && preQuantity && preAmount) { if (salePrice && floorPrice && preQuantity && preAmount) {
let strategyArr = [ let strategyArr = [
// 原策略 // 原策略
{ salePrice, floorPrice: floorPrice, preQuantity: preQuantity, preAmount, preCostAmount: +floorPrice * +preQuantity }, { salePrice, floorPrice, preQuantity, preAmount, preCostAmount: +floorPrice * +preQuantity },
// 以提货量为准 // 以提货量为准
{ {
salePrice: this.newSalePrice, salePrice: this.newSalePrice,
floorPrice: this.newCostPrice, floorPrice: this.newCostPrice,
preQuantity, preQuantity,
preAmount: +this.newSalePrice * +preQuantity, preAmount: +this.newSalePrice * +preQuantity,
preCostAmount: +floorPrice * +preQuantity preCostAmount: +this.newCostPrice * +preQuantity
}, },
// 以订单金额为准 // 以订单金额为准
{ {
@@ -165,7 +164,7 @@ export default {
floorPrice: this.newCostPrice, floorPrice: this.newCostPrice,
preQuantity: +preAmount / +this.newSalePrice, preQuantity: +preAmount / +this.newSalePrice,
preAmount, preAmount,
preCostAmount: +floorPrice * +preQuantity preCostAmount: +this.newCostPrice * (+preAmount / +this.newSalePrice)
} }
] ]
strategyArr.forEach((item, index) => { strategyArr.forEach((item, index) => {