正在显示
3 个修改的文件
包含
40 行增加
和
39 行删除
| ... | ... | @@ -4,8 +4,8 @@ var baseUrl = app.globalData.baseUrl; |
| 4 | 4 | const reg_18_Number = /^[0-9]{18}$/; |
| 5 | 5 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; |
| 6 | 6 | // var countryInfo = require('../../../../utils/country.js'); |
| 7 | -// const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
| 8 | -const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
| 7 | +const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
| 8 | +// const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
| 9 | 9 | // const cardTypeDicts = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '3', 'name': '港澳居民来往内地通行证' }, { 'code': '4', 'name': '港澳居民居住证' }, { 'code': '5', 'name': '台湾居民来往大陆通行证' }, { 'code': '6', 'name': '台湾居民居住证' }, { 'code': '7', 'name': '外国护照' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)'}]; |
| 10 | 10 | // const cardTypes8 = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '4', 'name': '港澳居民居住证' }, { 'code': '6', 'name': '台湾居民居住证' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; |
| 11 | 11 | |
| ... | ... | @@ -57,7 +57,7 @@ Page({ |
| 57 | 57 | bindtype: 'cardtype', |
| 58 | 58 | placeholder: '请选择证照类型', |
| 59 | 59 | selected: '', |
| 60 | - values: cardTypeArray8, | |
| 60 | + values: cardTypeArray, | |
| 61 | 61 | // range_key:'name', |
| 62 | 62 | // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
| 63 | 63 | // '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证' |
| ... | ... | @@ -65,7 +65,7 @@ Page({ |
| 65 | 65 | onChange: 'onPickerSelect' |
| 66 | 66 | }, |
| 67 | 67 | otherCardtypeData: { |
| 68 | - isrequre: true, | |
| 68 | + // isrequre: true, | |
| 69 | 69 | label: '其他证照类型', |
| 70 | 70 | bindtype: 'other_cardtype', |
| 71 | 71 | placeholder: '请选择证照类型', |
| ... | ... | @@ -750,34 +750,35 @@ Page({ |
| 750 | 750 | this.data.countryData.selected = '' |
| 751 | 751 | this.data.countryData.disabled = false |
| 752 | 752 | this.data.nameText = '英文名' |
| 753 | - // if (new_type.indexOf('通行证') != -1){ | |
| 754 | - // this.data.otherCardtypeData.values = [{ 'code': '4', 'name': '港澳居民居住证'}]; | |
| 755 | - // }else{ | |
| 756 | - this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | |
| 757 | - this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | |
| 758 | - // } | |
| 753 | + if (new_type.indexOf('通行证') != -1){ | |
| 754 | + this.data.otherCardtypeData.values = ['港澳居民居住证'];// [{ 'code': '4', 'name': '港澳居民居住证'}]; | |
| 755 | + }else{ | |
| 756 | + this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | |
| 757 | + // this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | |
| 758 | + } | |
| 759 | 759 | } else if (new_type.indexOf("台湾") != -1) { |
| 760 | 760 | this.data.countryData.selected = '中国台湾' |
| 761 | 761 | this.data.countryData.disabled = true |
| 762 | 762 | this.data.nameText = '英文名' |
| 763 | - // if (new_type.indexOf('通行证') != -1) { | |
| 764 | - // this.data.otherCardtypeData.values = [{ 'code': '6', 'name': '台湾居民居住证' }]; | |
| 765 | - // } else { | |
| 766 | - this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | |
| 767 | - this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | |
| 768 | - // } | |
| 763 | + if (new_type.indexOf('通行证') != -1) { | |
| 764 | + this.data.otherCardtypeData.values = ['台湾居民居住证'];//[{ 'code': '6', 'name': '台湾居民居住证' }]; | |
| 765 | + } else { | |
| 766 | + this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | |
| 767 | + // this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | |
| 768 | + } | |
| 769 | 769 | |
| 770 | 770 | } else { |
| 771 | 771 | this.data.countryData.selected = '' |
| 772 | 772 | this.data.countryData.values = this.countrys ? this.countrys : [] |
| 773 | 773 | this.data.countryData.disabled = false |
| 774 | 774 | this.data.nameText = '中文名' |
| 775 | - // if (new_type.indexOf("外国护照") != -1) { | |
| 775 | + if (new_type.indexOf("外国护照") != -1) { | |
| 776 | 776 | // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; |
| 777 | - // } else { | |
| 778 | - this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; | |
| 779 | - this.data.otherCardtypeData.selected = '外国护照'; | |
| 780 | - // } | |
| 777 | + this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)','外国人工作许可证(C类)']; | |
| 778 | + } else { | |
| 779 | + this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; | |
| 780 | + // this.data.otherCardtypeData.selected = '外国护照'; | |
| 781 | + } | |
| 781 | 782 | } |
| 782 | 783 | this.setData({ |
| 783 | 784 | isIdCard: is_idcard, |
| ... | ... | @@ -817,8 +818,8 @@ Page({ |
| 817 | 818 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { |
| 818 | 819 | console.log('外国人', new_type, selected) |
| 819 | 820 | }else { |
| 820 | - // this.data.otherCardtypeData.selected = '' | |
| 821 | - // setData.otherCardtypeData = this.data.otherCardtypeData | |
| 821 | + this.data.otherCardtypeData.selected = '' | |
| 822 | + setData.otherCardtypeData = this.data.otherCardtypeData | |
| 822 | 823 | setData.other_card_number = '' |
| 823 | 824 | } |
| 824 | 825 | this.setData(setData) |
| ... | ... | @@ -1217,16 +1218,16 @@ Page({ |
| 1217 | 1218 | return |
| 1218 | 1219 | } |
| 1219 | 1220 | if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected) { |
| 1220 | - this.showtoast('请选择其他证照类型'); | |
| 1221 | - return | |
| 1221 | + // this.showtoast('请选择其他证照类型'); | |
| 1222 | + // return | |
| 1222 | 1223 | } |
| 1223 | 1224 | if (this.data.hasOtherCard && !formdata.other_card_number.length) { |
| 1224 | - this.showtoast('请输入其他证照号码'); | |
| 1225 | - return | |
| 1225 | + // this.showtoast('请输入其他证照号码'); | |
| 1226 | + // return | |
| 1226 | 1227 | } else if (this.data.otherCardtypeData.selected.indexOf('居住证') > -1 && !reg_18_Number.test(formdata.other_card_number)) { |
| 1227 | 1228 | this.showtoast('其他证照号码有误'); |
| 1228 | 1229 | return |
| 1229 | - } else if (this.data.otherCardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(formdata.other_card_number)) { | |
| 1230 | + } else if (this.data.otherCardtypeData.selected.indexOf('护照') > -1 && !reg_9_n_a.test(formdata.other_card_number)) { | |
| 1230 | 1231 | this.showtoast('其他证照号码有误'); |
| 1231 | 1232 | return |
| 1232 | 1233 | } | ... | ... |
| ... | ... | @@ -73,21 +73,21 @@ |
| 73 | 73 | <view class="divide_line_30"></view> |
| 74 | 74 | <template is="picker_cell_normal" data="{{...predictLeaveDate}}" /> |
| 75 | 75 | <view class="divide_line_30"></view> |
| 76 | - <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> | |
| 77 | - <view class="divide_line_30"></view> | |
| 78 | - <view class='item_body'> | |
| 79 | - <text class='red_star_right_10'>*</text> | |
| 80 | - <text class='text_777_30 float_left' style='line-height: 90rpx'>其他证照号码</text> | |
| 81 | - <view> | |
| 82 | - <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_card_number' maxlength='20'></input> | |
| 83 | - </view> | |
| 84 | - </view> | |
| 85 | - <view class="divide_line_30"></view> | |
| 86 | 76 | <template is="picker_cell_normal" data="{{...birthCountryData}}" /> |
| 87 | 77 | </view> |
| 88 | 78 | <view hidden='{{!isshow01}}'> |
| 89 | 79 | <view wx:if='{{hasOtherCard}}'> |
| 90 | 80 | <view class="divide_line_30"></view> |
| 81 | + <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> | |
| 82 | + <view class="divide_line_30"></view> | |
| 83 | + <view class='item_body'> | |
| 84 | + <!-- <text class='red_star_right_10'>*</text> --> | |
| 85 | + <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>其他证照号码</text> | |
| 86 | + <view> | |
| 87 | + <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_card_number' maxlength='20'></input> | |
| 88 | + </view> | |
| 89 | + </view> | |
| 90 | + <view class="divide_line_30"></view> | |
| 91 | 91 | <view class='item_body'> |
| 92 | 92 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text> |
| 93 | 93 | <input class='input_wrap' placeholder="请输入{{nameText}}" value='{{other_name}}' bindblur='bindOtherName' style='line-height: 90rpx'></input> | ... | ... |
请
注册
或
登录
后发表评论