27264
This commit is contained in:
@@ -146,6 +146,19 @@ export default {
|
|||||||
callback(new Error('请输入身份证号'))
|
callback(new Error('请输入身份证号'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let regIcome = (rule, value, callback) => {
|
||||||
|
if (value) {
|
||||||
|
const reg = /^([0-9]{1,5})(\.[0-9]{1,3}){0,1}$/
|
||||||
|
if (reg.test(value)) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
callback(new Error('年收入为不能超过10万的数字'))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
showGrid: false,
|
showGrid: false,
|
||||||
formData: {
|
formData: {
|
||||||
@@ -222,7 +235,8 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '家庭年收入(万)',
|
label: '家庭年收入(万)',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
formDbName: 'income'
|
formDbName: 'income',
|
||||||
|
rules: { validator: regIcome, trigger: 'blur' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '婚姻情况',
|
label: '婚姻情况',
|
||||||
|
|||||||
Reference in New Issue
Block a user