正在显示
5 个修改的文件
包含
55 行增加
和
36 行删除
... | ... | @@ -163,27 +163,27 @@ Page({ |
163 | 163 | var gender_Data = that.data.genderData |
164 | 164 | gender_Data.selected = id_info.gender |
165 | 165 | |
166 | - that.data.birthDate.selected = birth_day | |
167 | - | |
168 | - if (that.data.name.length > 0 && id_info.name != that.data.name) { | |
169 | - that.showtoast("姓名冲突") | |
170 | - return | |
171 | - } | |
172 | - if (that.data.card_number.length > 0 && id_info.id_card_number != that.data.card_number) { | |
173 | - that.showtoast("证照号码冲突") | |
174 | - return | |
175 | - } | |
166 | + // that.data.birthDate.selected = birth_day | |
167 | + | |
168 | + // if (that.data.name.length > 0 && id_info.name != that.data.name) { | |
169 | + // that.showtoast("姓名冲突") | |
170 | + // return | |
171 | + // } | |
172 | + // if (that.data.card_number.length > 0 && id_info.id_card_number != that.data.card_number) { | |
173 | + // that.showtoast("证照号码冲突") | |
174 | + // return | |
175 | + // } | |
176 | 176 | that.setData({ |
177 | 177 | idInfoData: id_info, |
178 | 178 | name: id_info.name, |
179 | - birthday: birth_day, | |
179 | + // birthday: birth_day, | |
180 | 180 | // cardtypeData: cardtype_Data, |
181 | 181 | genderData: gender_Data, |
182 | - long_birth_date: Date.parse(new Date(birth_day)) / 1000, | |
183 | - birthDate: that.data.birthDate, | |
182 | + // long_birth_date: Date.parse(new Date(birth_day)) / 1000, | |
183 | + // birthDate: that.data.birthDate, | |
184 | 184 | card_number: id_info.id_card_number |
185 | 185 | }) |
186 | - this.dealIdInfo(id_info.id_card_number) | |
186 | + that.dealIdInfo(id_info.id_card_number) | |
187 | 187 | } |
188 | 188 | }, |
189 | 189 | }) |
... | ... | @@ -231,7 +231,12 @@ Page({ |
231 | 231 | } |
232 | 232 | |
233 | 233 | }, |
234 | - | |
234 | + bindinputmobile: function (e) { | |
235 | + console.log('bindinputmobile', e) | |
236 | + this.setData({ | |
237 | + mobile: e.detail.value | |
238 | + }) | |
239 | + }, | |
235 | 240 | |
236 | 241 | // =============其他数据选中处理============== |
237 | 242 | |
... | ... | @@ -263,10 +268,7 @@ Page({ |
263 | 268 | } else if (this.data.isIdCard && !format.isIDCardNum(formdata.id_card_no)) { |
264 | 269 | this.showtoast('证照号码有误'); |
265 | 270 | return |
266 | - } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) { | |
267 | - this.showtoast('请填写证照号码'); | |
268 | - return | |
269 | - } | |
271 | + } | |
270 | 272 | if (formdata.name.length < 1) { |
271 | 273 | this.showtoast('姓名未填写'); |
272 | 274 | return |
... | ... | @@ -274,6 +276,10 @@ Page({ |
274 | 276 | this.showtoast('请输入正确姓名'); |
275 | 277 | return |
276 | 278 | } |
279 | + if (formdata.mobile.length > 0 && !format.isMobile(formdata.mobile)) { | |
280 | + this.showtoast('手机号码有误'); | |
281 | + return | |
282 | + } | |
277 | 283 | var new_card_num = '' |
278 | 284 | if (this.data.isIdCard) { |
279 | 285 | if (this.data.card_number.length > 0) { |
... | ... | @@ -316,6 +322,7 @@ Page({ |
316 | 322 | "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number, |
317 | 323 | "name": formdata.name, |
318 | 324 | "gender": that.data.genderData.selected, |
325 | + "mobile": formdata.mobile, | |
319 | 326 | //"age": formdata.age ? formdata.age : '',//不传 |
320 | 327 | "native": "中国", |
321 | 328 | "is_overseas_personnel": "否", | ... | ... |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | <view wx:if="{{isIdCard}}" > |
25 | 25 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo'></image> |
26 | 26 | <!-- <text class='text_333_28 float_right'>{{card_number}}</text> --> |
27 | - <input class='input_wrap float_right' placeholder='请输入或拍摄身份证' placeholder-class='text_777_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input> | |
27 | + <input class='input_wrap float_right' placeholder='请输入或拍摄身份证' placeholder-class='text_777_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}' type='idcard'></input> | |
28 | 28 | </view> |
29 | 29 | <view wx:else> |
30 | 30 | <input class='input_wrap float_right' placeholder='请输入证照号码' placeholder-class='text_777_30' name='id_card_no' maxlength='18' type="idcard" value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input> |
... | ... | @@ -53,7 +53,11 @@ |
53 | 53 | <text class='text_777_30 float_left' style='line-height: 90rpx'>国籍</text> |
54 | 54 | <text class='text_black_30 float_right' style='line-height: 90rpx' >中国</text> |
55 | 55 | </view> |
56 | - | |
56 | + <view class="divide_line_30"></view> | |
57 | + <view class='item_body'> | |
58 | + <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>手机号码</text> | |
59 | + <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input> | |
60 | + </view> | |
57 | 61 | <view class="divide_line_30"></view> |
58 | 62 | <view class='item_body'> |
59 | 63 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>是否境外人员</text> | ... | ... |
... | ... | @@ -868,10 +868,16 @@ Page({ |
868 | 868 | // else if (this.data.mobile.length < 1) { |
869 | 869 | // this.showtoast('有必填项未填写'); |
870 | 870 | // return |
871 | - // } else if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) { | |
872 | - // this.showtoast('手机号码有误'); | |
873 | - // return | |
874 | - // } else if (this.data.investInfo.selected.length < 1) { | |
871 | + // } else | |
872 | + if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) { | |
873 | + this.showtoast('手机号码有误'); | |
874 | + return | |
875 | + } | |
876 | + if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) { | |
877 | + this.showtoast('请输入正确邮箱'); | |
878 | + return | |
879 | + } | |
880 | + //else if (this.data.investInfo.selected.length < 1) { | |
875 | 881 | // this.showtoast('有必填项未填写'); |
876 | 882 | // return |
877 | 883 | // } else if (this.data.specificIndustryInfo.selected.length < 1) { |
... | ... | @@ -880,11 +886,8 @@ Page({ |
880 | 886 | // } else if (this.data.employeeInfo.selected.length < 1) { |
881 | 887 | // this.showtoast('有必填项未填写'); |
882 | 888 | // return |
883 | - // } | |
884 | - // else if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) { | |
885 | - // this.showtoast('请输入正确邮箱'); | |
886 | - // return | |
887 | - // } | |
889 | + // } else | |
890 | + | |
888 | 891 | // else if (this.data.company_equity_total && this.data.company_equity_total.length > 0 && !regMoney.test(this.data.company_equity_total)) { |
889 | 892 | // this.showtoast('请输入正确金额'); |
890 | 893 | // return | ... | ... |
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text> |
30 | 30 | <view> |
31 | 31 | <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active'}}"></image> |
32 | - <input class='input_wrap float_right' disabled="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input> | |
32 | + <input class='input_wrap float_right' disabled="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum' type='idcard'></input> | |
33 | 33 | <!-- <input class='input_wrap float_right' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input> |
34 | 34 | <input class='input_wrap float_right' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> --> |
35 | 35 | </view> |
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | <view class='item_body'> |
92 | 92 | <text class='red_star_right_10'>*</text> |
93 | 93 | <text class='text_777_30 float_left' style='line-height: 90rpx'>手机号码</text> |
94 | - <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile'></input> | |
94 | + <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input> | |
95 | 95 | </view> |
96 | 96 | |
97 | 97 | <!-- 非必填部分02 --> |
... | ... | @@ -148,14 +148,14 @@ |
148 | 148 | <view class="divide_line_30"></view> |
149 | 149 | <view class='item_body'> |
150 | 150 | <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>银行账号</text> |
151 | - <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24'></input> | |
151 | + <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24' type='number'></input> | |
152 | 152 | </view> |
153 | 153 | <view class="divide_line_30"></view> |
154 | 154 | <template is="picker_cell_normal" data="{{...disabilityInfo}}" /> |
155 | 155 | <view class="divide_line_30" hidden="{{disabilityInfo.selected!='是'}}"></view> |
156 | 156 | <view class='item_body' hidden="{{disabilityInfo.selected!='是'}}"> |
157 | 157 | <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>残疾证号</text> |
158 | - <input class='input_wrap float_right' name='disability_no' type='number' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input> | |
158 | + <input class='input_wrap float_right' name='disability_no' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input> | |
159 | 159 | </view> |
160 | 160 | <view class="divide_line_30"></view> |
161 | 161 | |
... | ... | @@ -163,7 +163,7 @@ |
163 | 163 | <view class="divide_line_30" hidden="{{lieshuInfo.selected!='是'}}"></view> |
164 | 164 | <view class='item_body' hidden="{{lieshuInfo.selected!='是'}}"> |
165 | 165 | <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>烈属证号</text> |
166 | - <input class='input_wrap float_right' name='martyr_family_no' type='number' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input> | |
166 | + <input class='input_wrap float_right' name='martyr_family_no' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input> | |
167 | 167 | </view> |
168 | 168 | <view class="divide_line_30"></view> |
169 | 169 | ... | ... |
... | ... | @@ -135,6 +135,10 @@ function analyzeIDCard(IDCard){ |
135 | 135 | //返回性别和年龄 |
136 | 136 | return sexAndAge; |
137 | 137 | } |
138 | +function isMobile(mobile) { | |
139 | + var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/; | |
140 | + return regMobile.test(mobile) | |
141 | +} | |
138 | 142 | |
139 | 143 | module.exports = { |
140 | 144 | formatTime: formatTime, |
... | ... | @@ -146,5 +150,6 @@ module.exports = { |
146 | 150 | dayFormString: dayFormString, |
147 | 151 | isIDCardNum: isIDCardNum, |
148 | 152 | curDateTime: curDateTime, |
149 | - analyzeIDCard: analyzeIDCard | |
153 | + analyzeIDCard: analyzeIDCard, | |
154 | + isMobile: isMobile | |
150 | 155 | } | ... | ... |
请
注册
或
登录
后发表评论