2 Commits

Author SHA1 Message Date
896182c58d Merge pull request '炼厂下单确认' (#13) from KongDuo into master
Reviewed-on: #13
2023-05-22 01:55:44 +00:00
KongDuo
81015fd44f 炼厂下单确认 2023-05-22 09:54:53 +08:00

View File

@@ -149,20 +149,23 @@ export default {
// console.log(salePrice, preQuantity, preAmount)
if ((salePrice, preQuantity, preAmount)) {
// 原策略
Object.assign(this.tableData[0], { salePrice, floorPrice, preQuantity, preAmount })
Object.assign(this.tableData[0], { salePrice: salePrice.toFixed(2),
floorPrice: floorPrice.toFixed(2),
preQuantity: preQuantity.toFixed(2),
preAmount: preAmount.toFixed(2) })
// 以提货量为准
Object.assign(this.tableData[1], {
salePrice: this.newSalePrice,
floorPrice: this.newCostPrice,
preQuantity,
preAmount: +this.newSalePrice * +preQuantity
salePrice: (this.newSalePrice).toFixed(2),
floorPrice: (this.newCostPrice).toFixed(2),
preQuantity: preQuantity.toFixed(2),
preAmount: (+this.newSalePrice * +preQuantity).toFixed(2)
})
// 以订单金额为准
Object.assign(this.tableData[2], {
salePrice: this.newSalePrice,
floorPrice: this.newCostPrice,
preQuantity: +preAmount / +this.newSalePrice,
preAmount
salePrice: (this.newSalePrice).toFixed(2),
floorPrice: (this.newCostPrice).toFixed(2),
preQuantity: (+preAmount / +this.newSalePrice).toFixed(2),
preAmount: preAmount.toFixed(2)
})
this.undergoChanges = true
}