正在显示
3 个修改的文件
包含
61 行增加
和
36 行删除
... | ... | @@ -2,8 +2,10 @@ |
2 | 2 | var app = getApp(); |
3 | 3 | var format = require('../../../../utils/util.js'); |
4 | 4 | var baseUrl = app.globalData.baseUrl; |
5 | -const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
5 | +// const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
6 | 6 | 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类)' }]; |
7 | +const cardTypes8 = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '3', 'name': '港澳居民来往内地通行证' }, { 'code': '5', 'name': '台湾居民来往大陆通行证' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | |
8 | + | |
7 | 9 | |
8 | 10 | Page({ |
9 | 11 | cur_id:null, |
... | ... | @@ -42,7 +44,7 @@ Page({ |
42 | 44 | label: '证照类型', |
43 | 45 | bindtype: 'cardtype', |
44 | 46 | placeholder: '请选择证照类型', |
45 | - values: cardTypeDicts, | |
47 | + values: cardTypes8, | |
46 | 48 | // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照','外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'], |
47 | 49 | range_key: 'name', |
48 | 50 | onChange: 'onPickerSelect' |
... | ... | @@ -244,7 +246,7 @@ Page({ |
244 | 246 | |
245 | 247 | dealCardType: function (new_type_code) { |
246 | 248 | var is_idcard = this.data.isIdCard |
247 | - const new_type = cardTypeArray[parseInt(new_type_code) - 1] | |
249 | + const new_type = cardTypeDicts[parseInt(new_type_code) - 1]['name'] | |
248 | 250 | this.data.cardtypeData.selected_code = new_type_code |
249 | 251 | this.data.cardtypeData.selected = new_type |
250 | 252 | |
... | ... |
... | ... | @@ -2,8 +2,10 @@ var format = require('../../../../utils/util.js'); |
2 | 2 | var app = getApp(); |
3 | 3 | var baseUrl = app.globalData.baseUrl; |
4 | 4 | // var countryInfo = require('../../../../utils/country.js'); |
5 | -const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
5 | +// const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | |
6 | 6 | 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类)'}]; |
7 | +const cardTypes8 = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '3', 'name': '港澳居民来往内地通行证' }, { 'code': '5', 'name': '台湾居民来往大陆通行证' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | |
8 | + | |
7 | 9 | Page({ |
8 | 10 | |
9 | 11 | /** |
... | ... | @@ -52,7 +54,7 @@ Page({ |
52 | 54 | bindtype: 'cardtype', |
53 | 55 | placeholder: '请选择证照类型', |
54 | 56 | selected: '', |
55 | - values: cardTypeDicts, | |
57 | + values: cardTypes8, | |
56 | 58 | range_key:'name', |
57 | 59 | // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
58 | 60 | // '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证' |
... | ... | @@ -60,6 +62,7 @@ Page({ |
60 | 62 | onChange: 'onPickerSelect' |
61 | 63 | }, |
62 | 64 | otherCardtypeData: { |
65 | + isrequre: true, | |
63 | 66 | label: '其他证照类型', |
64 | 67 | bindtype: 'other_cardtype', |
65 | 68 | placeholder: '请选择证照类型', |
... | ... | @@ -78,6 +81,7 @@ Page({ |
78 | 81 | onChange: 'onPickerSelect', |
79 | 82 | }, |
80 | 83 | birthCountryData: { |
84 | + isrequre: true, | |
81 | 85 | label: '出生国家(地区)', |
82 | 86 | bindtype: 'brith_country', |
83 | 87 | placeholder: '请选择国籍', |
... | ... | @@ -384,11 +388,11 @@ Page({ |
384 | 388 | } |
385 | 389 | |
386 | 390 | this.data.personstatusData.selected = tax_info.taxpayer_status |
387 | - this.data.cardtypeData.selected = cardTypeArray[parseInt(tax_info.id_card_type)-1] | |
391 | + this.data.cardtypeData.selected = cardTypeDicts[parseInt(tax_info.id_card_type) - 1]['name'] | |
388 | 392 | this.data.cardtypeData.selected_code = tax_info.id_card_type |
389 | 393 | this.data.card_number = tax_info.id_card_no |
390 | 394 | |
391 | - this.data.otherCardtypeData.selected = cardTypeArray[parseInt(tax_info.other_id_card_type)-1] | |
395 | + this.data.otherCardtypeData.selected = cardTypeDicts[parseInt(tax_info.other_id_card_type) - 1]['name'] | |
392 | 396 | this.data.otherCardtypeData.selected_code = tax_info.other_id_card_type |
393 | 397 | |
394 | 398 | this.data.other_card_number = tax_info.other_id_card_no |
... | ... | @@ -696,7 +700,7 @@ Page({ |
696 | 700 | dealCardType: function (new_type_code){ |
697 | 701 | console.log('cardtype_code', new_type_code) |
698 | 702 | var is_idcard = this.data.isIdCard |
699 | - const new_type = cardTypeArray[parseInt(new_type_code)-1] | |
703 | + const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name'] | |
700 | 704 | this.data.cardtypeData.selected_code = new_type_code |
701 | 705 | this.data.cardtypeData.selected = new_type |
702 | 706 | |
... | ... | @@ -724,20 +728,20 @@ Page({ |
724 | 728 | this.data.countryData.selected = '' |
725 | 729 | this.data.countryData.disabled = false |
726 | 730 | this.data.nameText = '英文名' |
727 | - if (new_type.indexOf('通行证') != -1){ | |
731 | + // if (new_type.indexOf('通行证') != -1){ | |
728 | 732 | this.data.otherCardtypeData.values = [{ 'code': '4', 'name': '港澳居民居住证'}]; |
729 | - }else{ | |
730 | - this.data.otherCardtypeData.values = [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | |
731 | - } | |
733 | + // }else{ | |
734 | + // this.data.otherCardtypeData.values = [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | |
735 | + // } | |
732 | 736 | } else if (new_type.indexOf("台湾") != -1) { |
733 | 737 | this.data.countryData.selected = '中国台湾' |
734 | 738 | this.data.countryData.disabled = true |
735 | 739 | this.data.nameText = '英文名' |
736 | - if (new_type.indexOf('通行证') != -1) { | |
740 | + // if (new_type.indexOf('通行证') != -1) { | |
737 | 741 | this.data.otherCardtypeData.values = [{ 'code': '6', 'name': '台湾居民居住证' }]; |
738 | - } else { | |
739 | - this.data.otherCardtypeData.values = [{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | |
740 | - } | |
742 | + // } else { | |
743 | + // this.data.otherCardtypeData.values = [{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | |
744 | + // } | |
741 | 745 | |
742 | 746 | } else { |
743 | 747 | this.data.overseas = '是' |
... | ... | @@ -745,11 +749,11 @@ Page({ |
745 | 749 | this.data.countryData.values = this.countrys ? this.countrys : [] |
746 | 750 | this.data.countryData.disabled = false |
747 | 751 | this.data.nameText = '中文名' |
748 | - if (new_type.indexOf("外国护照") != -1) { | |
749 | - this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | |
750 | - } else { | |
752 | + // if (new_type.indexOf("外国护照") != -1) { | |
753 | + // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | |
754 | + // } else { | |
751 | 755 | this.data.otherCardtypeData.values = [{ 'code': '7', 'name': '外国护照' }]; |
752 | - } | |
756 | + // } | |
753 | 757 | } |
754 | 758 | this.setData({ |
755 | 759 | isIdCard: is_idcard, |
... | ... | @@ -782,11 +786,18 @@ Page({ |
782 | 786 | var cardtypeData = this.data.cardtypeData |
783 | 787 | var new_type = cardtypeData.values[e.detail.value]['name'] |
784 | 788 | var new_type_code = cardtypeData.values[e.detail.value]['code'] |
785 | - if (new_type != cardtypeData.selected) { | |
789 | + var selected = cardtypeData.selected | |
790 | + if (new_type != selected) { | |
786 | 791 | this.dealCardType(new_type_code) |
787 | - this.setData({ | |
788 | - card_number: "" | |
789 | - }) | |
792 | + var setData = { card_number: ''} | |
793 | + if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { | |
794 | + console.log('外国人', new_type, selected) | |
795 | + }else { | |
796 | + this.data.otherCardtypeData.selected = '' | |
797 | + setData.otherCardtypeData = this.data.otherCardtypeData | |
798 | + setData.other_card_number = '' | |
799 | + } | |
800 | + this.setData(setData) | |
790 | 801 | } |
791 | 802 | break; |
792 | 803 | case 'other_cardtype': |
... | ... | @@ -1150,6 +1161,18 @@ Page({ |
1150 | 1161 | this.showtoast('请选择预计离境时间'); |
1151 | 1162 | return |
1152 | 1163 | } |
1164 | + if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected) { | |
1165 | + this.showtoast('请选择其他证照类型'); | |
1166 | + return | |
1167 | + } | |
1168 | + if (this.data.hasOtherCard && !this.data.other_card_number.length) { | |
1169 | + this.showtoast('请输入其他证照号码'); | |
1170 | + return | |
1171 | + } | |
1172 | + if (this.data.hasOtherCard && !this.data.birthCountryData.datelong) { | |
1173 | + this.showtoast('请选择出生国家'); | |
1174 | + return | |
1175 | + } | |
1153 | 1176 | |
1154 | 1177 | if (this.data.mobile.length < 1) { |
1155 | 1178 | this.showtoast('请输入手机号码'); |
... | ... |
... | ... | @@ -68,22 +68,22 @@ |
68 | 68 | <template is="picker_cell_normal" data="{{...firstEntryDate}}" /> |
69 | 69 | <view class="divide_line_30"></view> |
70 | 70 | <template is="picker_cell_normal" data="{{...predictLeaveDate}}" /> |
71 | + <view class="divide_line_30"></view> | |
72 | + <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> | |
73 | + <view class="divide_line_30"></view> | |
74 | + <view class='item_body'> | |
75 | + <text class='red_star_right_10'>*</text> | |
76 | + <text class='text_777_30 float_left' style='line-height: 90rpx'>其他证照号码</text> | |
77 | + <view> | |
78 | + <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_id_card_no' maxlength='30'></input> | |
79 | + </view> | |
80 | + </view> | |
81 | + <view class="divide_line_30"></view> | |
82 | + <template is="picker_cell_normal" data="{{...birthCountryData}}" /> | |
71 | 83 | </view> |
72 | 84 | <view hidden='{{!isshow01}}'> |
73 | 85 | <view wx:if='{{hasOtherCard}}'> |
74 | 86 | <view class="divide_line_30"></view> |
75 | - <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> | |
76 | - <view class="divide_line_30"></view> | |
77 | - <view class='item_body'> | |
78 | - <!-- <text class='red_star_right_10'>*</text> --> | |
79 | - <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>其他证照号码</text> | |
80 | - <view> | |
81 | - <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_id_card_no' maxlength='30'></input> | |
82 | - </view> | |
83 | - </view> | |
84 | - <view class="divide_line_30"></view> | |
85 | - <template is="picker_cell_normal" data="{{...birthCountryData}}" /> | |
86 | - <view class="divide_line_30"></view> | |
87 | 87 | <view class='item_body'> |
88 | 88 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text> |
89 | 89 | <input class='input_wrap' placeholder="请输入{{nameText}}" value='{{other_name}}' bindblur='bindOtherName' style='line-height: 90rpx'></input> |
... | ... |
请
注册
或
登录
后发表评论