From 80d2a48dec31ffa89d262e6147a85c39dd62da8b Mon Sep 17 00:00:00 2001 From: xk_guohonglei <2057494155@qq.com> Date: Fri, 25 Sep 2020 18:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E9=94=AE=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/OrderOil.vue | 14 +++++++++----- components/service-hotline.vue | 21 ++++++++++++++------- pages/stationDetail/stationDetail.vue | 2 +- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/components/OrderOil.vue b/components/OrderOil.vue index c734672..13597fa 100644 --- a/components/OrderOil.vue +++ b/components/OrderOil.vue @@ -40,7 +40,7 @@ 加油升数 - + 约¥{{money.total|numberFilter}} @@ -126,18 +126,22 @@ vol: this.vol, oilPrice: this.selected.xkPrice ? this.selected.xkPrice : this.selected.lvPrice, gunId: this.gunId + 1, - realPay:this.money.realPay + realPay: this.money.realPay } console.log('被选中的', data5) this.$emit('confirmVol', data5) }, - calcMoney() { + calcMoney(e) { + // var vol; + // vol = e.detail.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); + // this.vol = vol + this.price = this.selected.xkPrice ? this.selected.xkPrice : this.selected.lvPrice this.money.total = this.vol * this.selected.standardPrice this.money.discount = this.money.total - this.vol * (this.selected.standardPrice - this.price) this.money.realPay = (this.money.total - this.money.discount).toFixed(2) - console.log('总金额','折扣','实际支付') + console.log('总金额', '折扣', '实际支付') } }, filters: { @@ -145,7 +149,7 @@ value = value - 1 + 1 if (value) { return value.toFixed(2) - }else{ + } else { return '0.00' } } diff --git a/components/service-hotline.vue b/components/service-hotline.vue index b90ca34..b3b6034 100644 --- a/components/service-hotline.vue +++ b/components/service-hotline.vue @@ -1,15 +1,22 @@