From 81015fd44f8b4be232eb755b98e10166a91f2429 Mon Sep 17 00:00:00 2001 From: KongDuo Date: Mon, 22 May 2023 09:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=BC=E5=8E=82=E4=B8=8B=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/components/confirmSubmit.vue | 21 +++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/views/order/components/confirmSubmit.vue b/src/views/order/components/confirmSubmit.vue index b0eadf2..a54666f 100644 --- a/src/views/order/components/confirmSubmit.vue +++ b/src/views/order/components/confirmSubmit.vue @@ -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 }