Commit db9e10fb by chenwq

银行账户只能输数字

1 parent 1b2694b6
......@@ -321,8 +321,8 @@ export default {
isClear: true,
maxlength: 30,
inputFn: (event) => {
if (!(/^\d|\s+$/.test(event.slice(event.length - 1)))) {
this.infoForm.bankAccountNo = event.slice(0, event.length - 1)
if (!(/^\d|\s+$/.test(event.slice(event.length)))) {
this.infoForm.bankAccountNo = event.replace(/\D/g, '')
}
this.infoForm.bankAccountNo = this.infoForm.bankAccountNo.replace(/\s/g, '').replace(/(.{4})/g, "$1 ")
}
......
......@@ -127,8 +127,8 @@ export default {
isClear: true,
maxlength: 30,
inputFn: (event) => {
if (!(/^\d|\s+$/.test(event.slice(event.length - 1)))) {
this.infoForm.bankAccountNo = event.slice(0, event.length - 1)
if (!(/^\d|\s+$/.test(event.slice(event.length)))) {
this.infoForm.bankAccountNo = event.replace(/\D/g, '')
}
this.infoForm.bankAccountNo = this.infoForm.bankAccountNo.replace(/\s/g, '').replace(/(.{4})/g, "$1 ")
}
......@@ -184,6 +184,9 @@ export default {
this.infoForm = deepClone(this.detailInfo)
this.getPlatformMerchant()
this.dealAttachment()
if(this.infoForm.bankAccountNo) {
this.infoForm.bankAccountNo = this.infoForm.bankAccountNo.replace(/\s/g, '').replace(/(.{4})/g, "$1 ")
}
console.log(this.infoForm, 'infoForm--------')
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!