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