From 2e2dd46d969e6394a6761dbf48b4d4fb06f054bc Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 31 May 2023 17:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/components/confirmSubmit.vue | 37 +++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/views/order/components/confirmSubmit.vue b/src/views/order/components/confirmSubmit.vue index f02d542..a062d5b 100644 --- a/src/views/order/components/confirmSubmit.vue +++ b/src/views/order/components/confirmSubmit.vue @@ -30,7 +30,9 @@ - {{ controlWindows.addInfo.salePrice }}元 + {{ controlWindows.addInfo.salePrice }} 元/{{ controlWindows.addInfo.productMeasurement }} {{ controlWindows.addInfo.preQuantity | toNumberFixed }} {{ controlWindows.addInfo.productMeasurement }} @@ -66,13 +68,13 @@ - + - + @@ -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 } },