提现输入 bug修改
This commit is contained in:
parent
2f6ca46b15
commit
895ad285b1
|
@ -53,8 +53,8 @@
|
||||||
<view class="withdrawal-form-item">
|
<view class="withdrawal-form-item">
|
||||||
<view class="withdrawal-form-item-label">提现金额</view>
|
<view class="withdrawal-form-item-label">提现金额</view>
|
||||||
<view class="withdrawal-form-item-val">
|
<view class="withdrawal-form-item-val">
|
||||||
<input type="number" v-model="payForm.extract_money" placeholder="请输入提现金额"
|
<input @input="onInput" type="number" placeholder="请输入提现金额"
|
||||||
placeholder-class="placeholderClass">
|
placeholder-class="placeholderClass" :value="payForm.extract_money">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<view class="withdrawal-form-item">
|
<view class="withdrawal-form-item">
|
||||||
<view class="withdrawal-form-item-label">提现金额</view>
|
<view class="withdrawal-form-item-label">提现金额</view>
|
||||||
<view class="withdrawal-form-item-val">
|
<view class="withdrawal-form-item-val">
|
||||||
<input type="number" v-model="payForm.extract_money" placeholder="请输入提现金额"
|
<input @input="onInput" type="number" placeholder="请输入提现金额" v-model="payForm.extract_money"
|
||||||
placeholder-class="placeholderClass">
|
placeholder-class="placeholderClass">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -180,6 +180,7 @@
|
||||||
financial_type: 1,
|
financial_type: 1,
|
||||||
withdrawal_pwd: "",
|
withdrawal_pwd: "",
|
||||||
},
|
},
|
||||||
|
value: '12311',
|
||||||
mer_id: '',
|
mer_id: '',
|
||||||
ot_margin: '', //押金
|
ot_margin: '', //押金
|
||||||
extract_money: '', //可提现金额
|
extract_money: '', //可提现金额
|
||||||
|
@ -201,6 +202,26 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
limitDecimalToTwo(input) {
|
||||||
|
console.log(input);
|
||||||
|
var regex = /^(\d+)?(\.\d{1,2})?$/;
|
||||||
|
var cleanInput = input.value.replace(regex, '$1$2');
|
||||||
|
if (cleanInput !== input.value) {
|
||||||
|
input.value = cleanInput;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
// 限制输入两个小数
|
||||||
|
onInput(e) {
|
||||||
|
let value = e.target.value;
|
||||||
|
// 使用正则表达式限制只能输入两位小数
|
||||||
|
value = value.replace(/^(\-)*(\d+)\.(\d{2}).*$/, '$1$2.$3');
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.payForm.extract_money = value;
|
||||||
|
})
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
|
||||||
//添加账户
|
//添加账户
|
||||||
isShowAdd() {
|
isShowAdd() {
|
||||||
if (this.bankList.length == 0) return true;
|
if (this.bankList.length == 0) return true;
|
||||||
|
|
|
@ -100,11 +100,8 @@
|
||||||
handleToUpdate(item) {
|
handleToUpdate(item) {
|
||||||
//如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户
|
//如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户
|
||||||
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
|
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
|
||||||
if (isCompany != 1 && item.is_own === 0) return;
|
|
||||||
|
|
||||||
let strUrl = "?mer_id=" + this.mer_id;
|
let strUrl = "?mer_id=" + this.mer_id;
|
||||||
strUrl += "&id=" + item.id
|
strUrl += "&id=" + item.id
|
||||||
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/withdrawal/add" + strUrl
|
url: "/pages/withdrawal/add" + strUrl
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue