...
|
...
|
@@ -3,8 +3,9 @@ var app = getApp(); |
3
|
3
|
var baseUrl = app.globalData.baseUrl;
|
4
|
4
|
// var countryInfo = require('../../../../utils/country.js');
|
5
|
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类)'}];
|
7
|
|
-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类)' }];
|
|
6
|
+const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)'];
|
|
7
|
+// 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类)'}];
|
|
8
|
+// 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类)' }];
|
8
|
9
|
|
9
|
10
|
Page({
|
10
|
11
|
|
...
|
...
|
@@ -54,8 +55,8 @@ Page({ |
54
|
55
|
bindtype: 'cardtype',
|
55
|
56
|
placeholder: '请选择证照类型',
|
56
|
57
|
selected: '',
|
57
|
|
- values: cardTypes8,
|
58
|
|
- range_key:'name',
|
|
58
|
+ values: cardTypeArray8,
|
|
59
|
+ // range_key:'name',
|
59
|
60
|
// values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
|
60
|
61
|
// '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
|
61
|
62
|
// ],
|
...
|
...
|
@@ -68,7 +69,7 @@ Page({ |
68
|
69
|
placeholder: '请选择证照类型',
|
69
|
70
|
selected: '',
|
70
|
71
|
values: [],
|
71
|
|
- range_key: 'name',
|
|
72
|
+ // range_key: 'name',
|
72
|
73
|
onChange: 'onPickerSelect'
|
73
|
74
|
},
|
74
|
75
|
countryData: {
|
...
|
...
|
@@ -398,17 +399,17 @@ Page({ |
398
|
399
|
}
|
399
|
400
|
|
400
|
401
|
this.data.personstatusData.selected = tax_info.taxpayer_status
|
401
|
|
- this.data.cardtypeData.selected = cardTypeDicts[parseInt(tax_info.id_card_type) - 1]['name']
|
402
|
|
- this.data.cardtypeData.selected_code = tax_info.id_card_type
|
|
402
|
+ this.data.cardtypeData.selected = tax_info.id_card_type //cardTypeDicts[parseInt(tax_info.id_card_type) - 1]['name']
|
|
403
|
+ // this.data.cardtypeData.selected_code = tax_info.id_card_type
|
403
|
404
|
this.data.card_number = tax_info.id_card_no
|
404
|
405
|
|
405
|
|
- // this.data.otherCardtypeData.selected = cardTypeDicts[parseInt(tax_info.other_id_card_type) - 1]['name']
|
|
406
|
+ this.data.otherCardtypeData.selected = tax_info.other_id_card_type //cardTypeDicts[parseInt(tax_info.other_id_card_type) - 1]['name']
|
406
|
407
|
// this.data.otherCardtypeData.selected_code = tax_info.other_id_card_type
|
407
|
408
|
|
408
|
409
|
this.data.other_card_number = tax_info.other_id_card_no
|
409
|
410
|
this.data.overseas = tax_info.is_overseas_personnel
|
410
|
411
|
this.data.countryData.selected = tax_info.native
|
411
|
|
- this.data.birthCountryData.selected = tax_info.brith_native
|
|
412
|
+ this.data.birthCountryData.selected = tax_info.birth_native
|
412
|
413
|
this.data.taxpayerTypeData.selected = tax_info.taxpayer_type =='resident'?'居民':'非居民'
|
413
|
414
|
|
414
|
415
|
this.data.mobile = tax_info.mobile
|
...
|
...
|
@@ -436,7 +437,7 @@ Page({ |
436
|
437
|
this.data.firstEntryDate.selected = (firstEntryDate.indexOf("NaN") == -1) ? firstEntryDate:''
|
437
|
438
|
this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("NaN") == -1) ? predictLeaveDate : ''
|
438
|
439
|
|
439
|
|
- this.data.professionData.selected = tax_info.profession.three_level_name
|
|
440
|
+ // this.data.professionData.selected = tax_info.profession.three_level_name
|
440
|
441
|
|
441
|
442
|
this.data.birthDate.end = curdate
|
442
|
443
|
this.data.startDate.end = curdate
|
...
|
...
|
@@ -446,7 +447,7 @@ Page({ |
446
|
447
|
this.data.lieshuInfo.selected = tax_info.is_martyr_family
|
447
|
448
|
this.data.lonelyolderInfo.selected = tax_info.is_lonely_man
|
448
|
449
|
this.data.bankInfo.selected = tax_info.bank
|
449
|
|
- // this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
|
|
450
|
+ this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
|
450
|
451
|
this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district
|
451
|
452
|
this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "")
|
452
|
453
|
this.data.employeeInfo.selected = tax_info.is_employee
|
...
|
...
|
@@ -485,7 +486,7 @@ Page({ |
485
|
486
|
endDate: this.data.endDate,
|
486
|
487
|
firstEntryDate: this.data.firstEntryDate,
|
487
|
488
|
predictLeaveDate: this.data.predictLeaveDate,
|
488
|
|
- isIdCard: '1' == tax_info.id_card_type ? true : false,
|
|
489
|
+ isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
|
489
|
490
|
card_number: this.data.card_number,
|
490
|
491
|
other_card_number: this.data.other_card_number,
|
491
|
492
|
countryData: this.data.countryData,
|
...
|
...
|
@@ -648,7 +649,7 @@ Page({ |
648
|
649
|
|
649
|
650
|
var cardtypeData = that.data.cardtypeData
|
650
|
651
|
cardtypeData.selected = '居民身份证'
|
651
|
|
- cardtypeData.selected_code = '1'
|
|
652
|
+ // cardtypeData.selected_code = '1'
|
652
|
653
|
var gender_Data = that.data.genderData
|
653
|
654
|
gender_Data.selected = id_info.gender
|
654
|
655
|
|
...
|
...
|
@@ -707,11 +708,12 @@ Page({ |
707
|
708
|
|
708
|
709
|
},
|
709
|
710
|
|
710
|
|
- dealCardType: function (new_type_code){
|
711
|
|
- console.log('cardtype_code', new_type_code)
|
|
711
|
+ dealCardType: function (new_type){
|
|
712
|
+ // console.log('cardtype_code', new_type_code)
|
|
713
|
+ console.log('cardtype', new_type)
|
712
|
714
|
var is_idcard = this.data.isIdCard
|
713
|
|
- const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name']
|
714
|
|
- this.data.cardtypeData.selected_code = new_type_code
|
|
715
|
+ // const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name']
|
|
716
|
+ // this.data.cardtypeData.selected_code = new_type_code
|
715
|
717
|
this.data.cardtypeData.selected = new_type
|
716
|
718
|
|
717
|
719
|
if ('居民身份证' == new_type) {
|
...
|
...
|
@@ -741,7 +743,7 @@ Page({ |
741
|
743
|
// if (new_type.indexOf('通行证') != -1){
|
742
|
744
|
// this.data.otherCardtypeData.values = [{ 'code': '4', 'name': '港澳居民居住证'}];
|
743
|
745
|
// }else{
|
744
|
|
- this.data.otherCardtypeData.values = [{ 'code': '3', 'name': '港澳居民来往内地通行证'}];
|
|
746
|
+ this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}];
|
745
|
747
|
// }
|
746
|
748
|
} else if (new_type.indexOf("台湾") != -1) {
|
747
|
749
|
this.data.countryData.selected = '中国台湾'
|
...
|
...
|
@@ -750,7 +752,7 @@ Page({ |
750
|
752
|
// if (new_type.indexOf('通行证') != -1) {
|
751
|
753
|
// this.data.otherCardtypeData.values = [{ 'code': '6', 'name': '台湾居民居住证' }];
|
752
|
754
|
// } else {
|
753
|
|
- this.data.otherCardtypeData.values = [{ 'code': '5', 'name': '台湾居民来往大陆通行证' }];
|
|
755
|
+ this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }];
|
754
|
756
|
// }
|
755
|
757
|
|
756
|
758
|
} else {
|
...
|
...
|
@@ -762,7 +764,7 @@ Page({ |
762
|
764
|
// if (new_type.indexOf("外国护照") != -1) {
|
763
|
765
|
// this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }];
|
764
|
766
|
// } else {
|
765
|
|
- this.data.otherCardtypeData.values = [{ 'code': '7', 'name': '外国护照' }];
|
|
767
|
+ this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }];
|
766
|
768
|
// }
|
767
|
769
|
}
|
768
|
770
|
this.setData({
|
...
|
...
|
@@ -794,11 +796,11 @@ Page({ |
794
|
796
|
break;
|
795
|
797
|
case 'cardtype':
|
796
|
798
|
var cardtypeData = this.data.cardtypeData
|
797
|
|
- var new_type = cardtypeData.values[e.detail.value]['name']
|
798
|
|
- var new_type_code = cardtypeData.values[e.detail.value]['code']
|
|
799
|
+ var new_type = cardtypeData.values[e.detail.value] //['name']
|
|
800
|
+ // var new_type_code = cardtypeData.values[e.detail.value]['code']
|
799
|
801
|
var selected = cardtypeData.selected
|
800
|
802
|
if (new_type != selected) {
|
801
|
|
- this.dealCardType(new_type_code)
|
|
803
|
+ this.dealCardType(new_type)
|
802
|
804
|
var setData = { card_number: ''}
|
803
|
805
|
if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) {
|
804
|
806
|
console.log('外国人', new_type, selected)
|
...
|
...
|
@@ -812,12 +814,12 @@ Page({ |
812
|
814
|
break;
|
813
|
815
|
case 'other_cardtype':
|
814
|
816
|
var otherCardtypeData = this.data.otherCardtypeData
|
815
|
|
- var new_type = otherCardtypeData.values[e.detail.value]['name']
|
816
|
|
- var new_type_code = otherCardtypeData.values[e.detail.value]['code']
|
|
817
|
+ var new_type = otherCardtypeData.values[e.detail.value] //['name']
|
|
818
|
+ // var new_type_code = otherCardtypeData.values[e.detail.value]['code']
|
817
|
819
|
|
818
|
820
|
if (new_type != otherCardtypeData.selected) {
|
819
|
821
|
otherCardtypeData.selected = new_type
|
820
|
|
- otherCardtypeData.selected_code = new_type_code
|
|
822
|
+ // otherCardtypeData.selected_code = new_type_code
|
821
|
823
|
this.setData({
|
822
|
824
|
other_card_number: "",
|
823
|
825
|
otherCardtypeData: this.data.otherCardtypeData
|
...
|
...
|
@@ -1310,9 +1312,10 @@ Page({ |
1310
|
1312
|
"native": that.data.countryData.selected,
|
1311
|
1313
|
"taxpayer_type": that.data.taxpayerTypeData.selected == '是' ? 'resident' :'non-resident',
|
1312
|
1314
|
"is_overseas_personnel": that.data.overseas,
|
1313
|
|
- "id_card_type": ''+that.data.cardtypeData.selected_code,
|
|
1315
|
+ 'birth_native': that.data.birthCountryData.selected,
|
|
1316
|
+ "id_card_type": that.data.cardtypeData.selected, //selected_code,
|
1314
|
1317
|
"id_card_no": that.data.card_number,
|
1315
|
|
- "other_id_card_type": that.data.otherCardtypeData.selected_code,
|
|
1318
|
+ "other_id_card_type": that.data.otherCardtypeData.selected, //selected_code,
|
1316
|
1319
|
"other_id_card_no": formdata.other_card_number,
|
1317
|
1320
|
"gender": that.data.genderData.selected,
|
1318
|
1321
|
"birth_date": that.data.long_birth_date,
|
...
|
...
|
|