|
|
@ -20,8 +20,8 @@ |
|
|
|
<view class="capital__item dis-flex flex-y-center"> |
|
|
|
<view class="capital__item dis-flex flex-y-center"> |
|
|
|
<view class="item__left">{{ words.money.value }}:</view> |
|
|
|
<view class="item__left">{{ words.money.value }}:</view> |
|
|
|
<view class="item__right flex-box"> |
|
|
|
<view class="item__right flex-box"> |
|
|
|
<input class="input" v-model="inputValue" type="digit" name="money" |
|
|
|
<input class="input" v-model="inputValue" type="digit" name="money" @blur="wordsAmount" |
|
|
|
@blur="wordsAmount" :placeholder="words.money_placeholder.value" /> |
|
|
|
:placeholder="words.money_placeholder.value" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -150,7 +150,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
wordsAmount(e) { |
|
|
|
wordsAmount(e) { |
|
|
|
let that=this |
|
|
|
|
|
|
|
let amount = e.detail.value |
|
|
|
let amount = e.detail.value |
|
|
|
let num = null |
|
|
|
let num = null |
|
|
|
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1') |
|
|
|
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1') |
|
|
@ -169,19 +168,26 @@ |
|
|
|
.replace(/\./g, "") |
|
|
|
.replace(/\./g, "") |
|
|
|
.replace("$#$", ".") |
|
|
|
.replace("$#$", ".") |
|
|
|
} |
|
|
|
} |
|
|
|
if (num > Number(that.settlement.min_money)) { |
|
|
|
if (Number(this.dealer.money) == 0) { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: that.settlement.min_money > 0 ? `最多可用${Number(that.settlement.min_money)}元, 请重新输入` : |
|
|
|
title: `暂无可提现金额`, |
|
|
|
'暂无可提现金额', |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
that.inputValue = '' |
|
|
|
this.inputValue = '' |
|
|
|
that.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
|
|
|
|
} else if (Number(this.settlement.min_money) > num) { // 判断value值是否小于等于100, 如果大于100限制输入100 |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: `最低可提现金额为${Number(this.settlement.min_money)}元, 请重新输入`, |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.inputValue = '' |
|
|
|
|
|
|
|
this.$forceUpdate(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (!num) { // 判断value值是否等于空,为空amount默认0, |
|
|
|
if (!num) { // 判断value值是否等于空,为空amount默认0, |
|
|
|
that.inputValue = '' |
|
|
|
this.inputValue = '' |
|
|
|
that.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|