|
|
|
@ -40,7 +40,7 @@ |
|
|
|
|
<view class="solid-top margin-top-sm shadow-warp"> |
|
|
|
|
<view class="cu-form-group"> |
|
|
|
|
<view class="title">加油升数</view> |
|
|
|
|
<input type="number" v-model="vol" @input="calcMoney" placeholder="请输入加油升数" name="input" /> |
|
|
|
|
<input type="digit" v-model="vol" @input="calcMoney" placeholder="请输入加油升数" name="input" /> |
|
|
|
|
<text>约¥{{money.total|numberFilter}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="my-cell"> |
|
|
|
@ -132,7 +132,11 @@ |
|
|
|
|
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) |
|
|
|
|