|
|
|
@ -28,6 +28,7 @@ |
|
|
|
|
|
|
|
|
|
<uni-forms-item v-if="item.documentsType=='5501'" label="证件号码" required name="idCardNumber"> |
|
|
|
|
<uni-easyinput type="text" v-model="item.idCardNumber" placeholder="请输入身份证号码号码" /> |
|
|
|
|
<view class="v-form-tip" v-if="item.idCardState">请填写正确的身份证件号码</view> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item v-if="item.documentsType=='5502'" label="证件号码" required name="passportNumber"> |
|
|
|
|
<uni-easyinput type="text" v-model="item.passportNumber" placeholder="请输入护照码号码" /> |
|
|
|
@ -168,6 +169,7 @@ |
|
|
|
|
phone: "", |
|
|
|
|
documentsType: '5501', |
|
|
|
|
idCardNumber: "", |
|
|
|
|
idCardState: false, |
|
|
|
|
passportNumber: "", |
|
|
|
|
} |
|
|
|
|
//判断最多预约人数 |
|
|
|
@ -192,9 +194,21 @@ |
|
|
|
|
let state = [] |
|
|
|
|
that.dynamicLists.map((item, index) => { |
|
|
|
|
that.$refs.form[index].validate().then(res => { |
|
|
|
|
state[index] = '1' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let idreg = |
|
|
|
|
/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/; |
|
|
|
|
if (!idreg.test(item.idCardNumber)) { |
|
|
|
|
state[index] = '0' |
|
|
|
|
that.dynamicLists[index].idCardState=true |
|
|
|
|
} else { |
|
|
|
|
state[index] = '1' |
|
|
|
|
that.dynamicLists[index].idCardState=false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
state[index] = '0' |
|
|
|
|
that.dynamicLists[index].idCardState=false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
setTimeout(function() { |
|
|
|
@ -207,13 +221,11 @@ |
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
promise.then(value => { |
|
|
|
|
if (value == 'success') { |
|
|
|
|
this.postReserve() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//传输数据 |
|
|
|
|
postReserve: function() { |
|
|
|
@ -313,4 +325,12 @@ |
|
|
|
|
.yue_xuzhi text { |
|
|
|
|
color: rgb(22, 119, 255); |
|
|
|
|
} |
|
|
|
|
.v-form-tip{color: #f56c6c; |
|
|
|
|
font-size: 12px; |
|
|
|
|
line-height: 1; |
|
|
|
|
padding-top: 4px; |
|
|
|
|
position: absolute; |
|
|
|
|
top: 5px; |
|
|
|
|
left: 0; |
|
|
|
|
} |
|
|
|
|
</style> |