提交 e882ce5a2160a279fcd5046e9080b561f9bd63e1
Merge branch '海峡new' into 苏州英格玛
# Conflicts: # app.js # pages/getPhone/getPhone.json # pages/login/login.json # pages/main/guide/guide.json # project.config.json
正在显示
3 个修改的文件
包含
111 行增加
和
50 行删除
| @@ -37,9 +37,13 @@ Page({ | @@ -37,9 +37,13 @@ Page({ | ||
| 37 | }, | 37 | }, |
| 38 | data: { 'declare_month': timestamp }, | 38 | data: { 'declare_month': timestamp }, |
| 39 | success: function (result) { | 39 | success: function (result) { |
| 40 | - that.setData({ | ||
| 41 | - taxDatas: that.handleTaxData(result.data.items) | ||
| 42 | - }) | 40 | + let taxDatas = that.handleTaxData(result.data.items) |
| 41 | + if (taxDatas) { | ||
| 42 | + that.setData({ | ||
| 43 | + taxDatas: taxDatas | ||
| 44 | + }) | ||
| 45 | + } | ||
| 46 | + | ||
| 43 | 47 | ||
| 44 | }, | 48 | }, |
| 45 | fail: function (res) { | 49 | fail: function (res) { |
| @@ -83,6 +87,7 @@ Page({ | @@ -83,6 +87,7 @@ Page({ | ||
| 83 | 87 | ||
| 84 | }, | 88 | }, |
| 85 | handleTaxData: function (items) { | 89 | handleTaxData: function (items) { |
| 90 | + if (!items) return | ||
| 86 | for (var i = 0; i < items.length; ++i) { | 91 | for (var i = 0; i < items.length; ++i) { |
| 87 | var item = items[i] | 92 | var item = items[i] |
| 88 | var method | 93 | var method |
| @@ -189,8 +194,9 @@ Page({ | @@ -189,8 +194,9 @@ Page({ | ||
| 189 | 194 | ||
| 190 | handleDetailsData: function (data) { | 195 | handleDetailsData: function (data) { |
| 191 | 196 | ||
| 192 | - var titles = JSON.parse(data['slip_titles']) | ||
| 193 | - var detail = JSON.parse(data['detail']) | 197 | + let titles = JSON.parse(data['slip_titles']) |
| 198 | + let detail = JSON.parse(data['detail']) | ||
| 199 | + let mapping_keys = data["mapping_keys"] ? data["mapping_keys"]:[] | ||
| 194 | var details = [] | 200 | var details = [] |
| 195 | for (var i = 0; i < titles.length; ++i) { | 201 | for (var i = 0; i < titles.length; ++i) { |
| 196 | var titleData = titles[i] | 202 | var titleData = titles[i] |
| @@ -200,9 +206,13 @@ Page({ | @@ -200,9 +206,13 @@ Page({ | ||
| 200 | title = titleData['original_column'] | 206 | title = titleData['original_column'] |
| 201 | } | 207 | } |
| 202 | if (!value) { | 208 | if (!value) { |
| 203 | - value = data[titleData['key']] + ('tax_rate' == titleData['key'] ? '%' : '') | 209 | + value = data[titleData['key']] |
| 210 | + if (value != undefined) { | ||
| 211 | + value += 'tax_rate' == titleData['key'] ? '%' : '' | ||
| 212 | + } | ||
| 204 | } | 213 | } |
| 205 | - if (!title || value == '0') continue; | 214 | + if (!title || !value) continue; |
| 215 | + if (mapping_keys.indexOf(title) == -1 && value == '0') continue; | ||
| 206 | details.push({ | 216 | details.push({ |
| 207 | title: title, | 217 | title: title, |
| 208 | value: value | 218 | value: value |
| @@ -3,9 +3,10 @@ var app = getApp(); | @@ -3,9 +3,10 @@ var app = getApp(); | ||
| 3 | var baseUrl = app.globalData.baseUrl; | 3 | var baseUrl = app.globalData.baseUrl; |
| 4 | const reg_18_Number = /^[0-9]{18}$/; | 4 | const reg_18_Number = /^[0-9]{18}$/; |
| 5 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; | 5 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; |
| 6 | +const reg_15_n_a = /^([a-zA-z]|[0-9]){15}$/; | ||
| 6 | // var countryInfo = require('../../../../utils/country.js'); | 7 | // var countryInfo = require('../../../../utils/country.js'); |
| 7 | -// const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | ||
| 8 | -const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | 8 | +const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; |
| 9 | +// const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | ||
| 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 | // 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 | // 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 | // 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 | 12 | ||
| @@ -57,7 +58,7 @@ Page({ | @@ -57,7 +58,7 @@ Page({ | ||
| 57 | bindtype: 'cardtype', | 58 | bindtype: 'cardtype', |
| 58 | placeholder: '请选择证照类型', | 59 | placeholder: '请选择证照类型', |
| 59 | selected: '', | 60 | selected: '', |
| 60 | - values: cardTypeArray8, | 61 | + values: cardTypeArray, |
| 61 | // range_key:'name', | 62 | // range_key:'name', |
| 62 | // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', | 63 | // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
| 63 | // '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证' | 64 | // '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证' |
| @@ -65,7 +66,7 @@ Page({ | @@ -65,7 +66,7 @@ Page({ | ||
| 65 | onChange: 'onPickerSelect' | 66 | onChange: 'onPickerSelect' |
| 66 | }, | 67 | }, |
| 67 | otherCardtypeData: { | 68 | otherCardtypeData: { |
| 68 | - isrequre: true, | 69 | + // isrequre: true, |
| 69 | label: '其他证照类型', | 70 | label: '其他证照类型', |
| 70 | bindtype: 'other_cardtype', | 71 | bindtype: 'other_cardtype', |
| 71 | placeholder: '请选择证照类型', | 72 | placeholder: '请选择证照类型', |
| @@ -90,6 +91,14 @@ Page({ | @@ -90,6 +91,14 @@ Page({ | ||
| 90 | placeholder: '请选择出生国家(地区)', | 91 | placeholder: '请选择出生国家(地区)', |
| 91 | onChange: 'onPickerSelect', | 92 | onChange: 'onPickerSelect', |
| 92 | }, | 93 | }, |
| 94 | + // taxReasonData: { | ||
| 95 | + // isrequre: true, | ||
| 96 | + // label: '涉税事由', | ||
| 97 | + // bindtype: 'tax_reason', | ||
| 98 | + // placeholder: '请选择涉税事由', | ||
| 99 | + // values: ["任职受雇","提供临时劳务","转让财产","从事投资和经营活动","其他"], | ||
| 100 | + // onChange: 'onPickerSelect', | ||
| 101 | + // }, | ||
| 93 | taxpayerTypeData: { | 102 | taxpayerTypeData: { |
| 94 | isrequre: true, | 103 | isrequre: true, |
| 95 | label: '纳税人类型', | 104 | label: '纳税人类型', |
| @@ -444,7 +453,7 @@ Page({ | @@ -444,7 +453,7 @@ Page({ | ||
| 444 | this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : '' | 453 | this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : '' |
| 445 | this.data.predictLeaveDate.datelong = tax_info.predict_leave_date | 454 | this.data.predictLeaveDate.datelong = tax_info.predict_leave_date |
| 446 | // this.data.professionData.selected = tax_info.profession.three_level_name | 455 | // this.data.professionData.selected = tax_info.profession.three_level_name |
| 447 | - | 456 | + // this.data.taxReasonData.selected = tax_info.tax_reason |
| 448 | this.data.birthDate.end = curdate | 457 | this.data.birthDate.end = curdate |
| 449 | this.data.startDate.end = curdate | 458 | this.data.startDate.end = curdate |
| 450 | this.data.endDate.end = curdate | 459 | this.data.endDate.end = curdate |
| @@ -491,6 +500,7 @@ Page({ | @@ -491,6 +500,7 @@ Page({ | ||
| 491 | long_end_date: tax_info.separate_date ? tax_info.separate_date : 0, | 500 | long_end_date: tax_info.separate_date ? tax_info.separate_date : 0, |
| 492 | endDate: this.data.endDate, | 501 | endDate: this.data.endDate, |
| 493 | firstEntryDate: this.data.firstEntryDate, | 502 | firstEntryDate: this.data.firstEntryDate, |
| 503 | + // taxReasonData: this.data.taxReasonData, | ||
| 494 | predictLeaveDate: this.data.predictLeaveDate, | 504 | predictLeaveDate: this.data.predictLeaveDate, |
| 495 | isIdCard: '居民身份证' == tax_info.id_card_type ? true : false, | 505 | isIdCard: '居民身份证' == tax_info.id_card_type ? true : false, |
| 496 | card_number: this.data.card_number, | 506 | card_number: this.data.card_number, |
| @@ -724,6 +734,7 @@ Page({ | @@ -724,6 +734,7 @@ Page({ | ||
| 724 | // const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name'] | 734 | // const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name'] |
| 725 | // this.data.cardtypeData.selected_code = new_type_code | 735 | // this.data.cardtypeData.selected_code = new_type_code |
| 726 | this.data.cardtypeData.selected = new_type | 736 | this.data.cardtypeData.selected = new_type |
| 737 | + this.data.otherCardtypeData.selected = '' | ||
| 727 | this.data.nameText = '' | 738 | this.data.nameText = '' |
| 728 | if ('居民身份证' == new_type) { | 739 | if ('居民身份证' == new_type) { |
| 729 | is_idcard = true | 740 | is_idcard = true |
| @@ -750,34 +761,41 @@ Page({ | @@ -750,34 +761,41 @@ Page({ | ||
| 750 | this.data.countryData.selected = '' | 761 | this.data.countryData.selected = '' |
| 751 | this.data.countryData.disabled = false | 762 | this.data.countryData.disabled = false |
| 752 | this.data.nameText = '英文名' | 763 | 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 | - // } | 764 | + if (new_type.indexOf('通行证') != -1){ |
| 765 | + this.data.otherCardtypeData.values = ['港澳居民居住证'];// [{ 'code': '4', 'name': '港澳居民居住证'}]; | ||
| 766 | + this.data.otherCardtypeData.isrequre = false | ||
| 767 | + }else{ | ||
| 768 | + this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | ||
| 769 | + this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | ||
| 770 | + this.data.otherCardtypeData.isrequre = true | ||
| 771 | + } | ||
| 759 | } else if (new_type.indexOf("台湾") != -1) { | 772 | } else if (new_type.indexOf("台湾") != -1) { |
| 760 | this.data.countryData.selected = '中国台湾' | 773 | this.data.countryData.selected = '中国台湾' |
| 761 | this.data.countryData.disabled = true | 774 | this.data.countryData.disabled = true |
| 762 | this.data.nameText = '英文名' | 775 | 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 | - // } | 776 | + if (new_type.indexOf('通行证') != -1) { |
| 777 | + this.data.otherCardtypeData.values = ['台湾居民居住证'];//[{ 'code': '6', 'name': '台湾居民居住证' }]; | ||
| 778 | + this.data.otherCardtypeData.isrequre = false | ||
| 779 | + } else { | ||
| 780 | + this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | ||
| 781 | + this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | ||
| 782 | + this.data.otherCardtypeData.isrequre = true | ||
| 783 | + } | ||
| 769 | 784 | ||
| 770 | } else { | 785 | } else { |
| 771 | this.data.countryData.selected = '' | 786 | this.data.countryData.selected = '' |
| 772 | this.data.countryData.values = this.countrys ? this.countrys : [] | 787 | this.data.countryData.values = this.countrys ? this.countrys : [] |
| 773 | this.data.countryData.disabled = false | 788 | this.data.countryData.disabled = false |
| 774 | this.data.nameText = '中文名' | 789 | this.data.nameText = '中文名' |
| 775 | - // if (new_type.indexOf("外国护照") != -1) { | 790 | + if (new_type.indexOf("外国护照") != -1) { |
| 776 | // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | 791 | // 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 | - // } | 792 | + this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)','外国人工作许可证(C类)']; |
| 793 | + this.data.otherCardtypeData.isrequre = false | ||
| 794 | + } else { | ||
| 795 | + this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; | ||
| 796 | + this.data.otherCardtypeData.selected = '外国护照'; | ||
| 797 | + this.data.otherCardtypeData.isrequre = true | ||
| 798 | + } | ||
| 781 | } | 799 | } |
| 782 | this.setData({ | 800 | this.setData({ |
| 783 | isIdCard: is_idcard, | 801 | isIdCard: is_idcard, |
| @@ -817,8 +835,6 @@ Page({ | @@ -817,8 +835,6 @@ Page({ | ||
| 817 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { | 835 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { |
| 818 | console.log('外国人', new_type, selected) | 836 | console.log('外国人', new_type, selected) |
| 819 | }else { | 837 | }else { |
| 820 | - // this.data.otherCardtypeData.selected = '' | ||
| 821 | - // setData.otherCardtypeData = this.data.otherCardtypeData | ||
| 822 | setData.other_card_number = '' | 838 | setData.other_card_number = '' |
| 823 | } | 839 | } |
| 824 | this.setData(setData) | 840 | this.setData(setData) |
| @@ -858,6 +874,16 @@ Page({ | @@ -858,6 +874,16 @@ Page({ | ||
| 858 | }) | 874 | }) |
| 859 | } | 875 | } |
| 860 | break; | 876 | break; |
| 877 | + // case 'tax_reason': | ||
| 878 | + // var taxReasonData = this.data.taxReasonData | ||
| 879 | + // var reason = taxReasonData.values[e.detail.value] | ||
| 880 | + // if (reason != taxReasonData.selected) { | ||
| 881 | + // taxReasonData.selected = reason | ||
| 882 | + // this.setData({ | ||
| 883 | + // taxReasonData: taxReasonData | ||
| 884 | + // }) | ||
| 885 | + // } | ||
| 886 | + // break; | ||
| 861 | case 'taxpayerType': | 887 | case 'taxpayerType': |
| 862 | var taxpayerTypeData = this.data.taxpayerTypeData | 888 | var taxpayerTypeData = this.data.taxpayerTypeData |
| 863 | taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value] | 889 | taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value] |
| @@ -1095,7 +1121,10 @@ Page({ | @@ -1095,7 +1121,10 @@ Page({ | ||
| 1095 | this.showtoast('证照号码有误'); | 1121 | this.showtoast('证照号码有误'); |
| 1096 | return | 1122 | return |
| 1097 | } | 1123 | } |
| 1098 | - | 1124 | + if (this.data.cardtypeData.selected.indexOf('永久居留') > -1 && !reg_15_n_a.test(idCardNo)) { |
| 1125 | + this.showtoast('证照号码有误'); | ||
| 1126 | + return | ||
| 1127 | + } | ||
| 1099 | }, | 1128 | }, |
| 1100 | bindinputcardnum: function(e) { | 1129 | bindinputcardnum: function(e) { |
| 1101 | var idCardNo = e.detail.value | 1130 | var idCardNo = e.detail.value |
| @@ -1122,6 +1151,12 @@ Page({ | @@ -1122,6 +1151,12 @@ Page({ | ||
| 1122 | return | 1151 | return |
| 1123 | } | 1152 | } |
| 1124 | } | 1153 | } |
| 1154 | + if (e.detail.value.length == 15) { | ||
| 1155 | + if (this.data.cardtypeData.selected.indexOf('永久居留') > -1 && !reg_15_n_a.test(idCardNo)) { | ||
| 1156 | + this.showtoast('证照号码有误'); | ||
| 1157 | + return | ||
| 1158 | + } | ||
| 1159 | + } | ||
| 1125 | }, | 1160 | }, |
| 1126 | //根据身份证号码,获取相关信息 | 1161 | //根据身份证号码,获取相关信息 |
| 1127 | dealIdInfo: function (idCardNum) { | 1162 | dealIdInfo: function (idCardNum) { |
| @@ -1181,6 +1216,9 @@ Page({ | @@ -1181,6 +1216,9 @@ Page({ | ||
| 1181 | } else if (this.data.cardtypeData.selected.indexOf('居住证') > -1 && !reg_18_Number.test(this.data.card_number)) { | 1216 | } else if (this.data.cardtypeData.selected.indexOf('居住证') > -1 && !reg_18_Number.test(this.data.card_number)) { |
| 1182 | this.showtoast('证照号码有误'); | 1217 | this.showtoast('证照号码有误'); |
| 1183 | return | 1218 | return |
| 1219 | + } else if (this.data.cardtypeData.selected.indexOf('永久居留') > -1 && !reg_15_n_a.test(this.data.card_number)) { | ||
| 1220 | + this.showtoast('证照号码有误'); | ||
| 1221 | + return | ||
| 1184 | } else if (this.data.cardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(this.data.card_number)) { | 1222 | } else if (this.data.cardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(this.data.card_number)) { |
| 1185 | this.showtoast('证照号码有误'); | 1223 | this.showtoast('证照号码有误'); |
| 1186 | return | 1224 | return |
| @@ -1216,20 +1254,28 @@ Page({ | @@ -1216,20 +1254,28 @@ Page({ | ||
| 1216 | this.showtoast('请选择预计离境时间'); | 1254 | this.showtoast('请选择预计离境时间'); |
| 1217 | return | 1255 | return |
| 1218 | } | 1256 | } |
| 1219 | - if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected) { | 1257 | + // if (this.data.hasOtherCard && !this.data.taxReasonData.selected) { |
| 1258 | + // this.showtoast('请选择涉税事由'); | ||
| 1259 | + // return | ||
| 1260 | + // } | ||
| 1261 | + let otherTypeSel = this.data.otherCardtypeData.selected | ||
| 1262 | + let otherHasInput = formdata.other_card_number && formdata.other_card_number.length | ||
| 1263 | + | ||
| 1264 | + if (this.data.hasOtherCard && !otherTypeSel && this.data.otherCardtypeData.isrequre) { | ||
| 1220 | this.showtoast('请选择其他证照类型'); | 1265 | this.showtoast('请选择其他证照类型'); |
| 1221 | return | 1266 | return |
| 1222 | } | 1267 | } |
| 1223 | - if (this.data.hasOtherCard && !formdata.other_card_number.length) { | 1268 | + if (this.data.hasOtherCard && !otherHasInput && this.data.otherCardtypeData.isrequre) { |
| 1224 | this.showtoast('请输入其他证照号码'); | 1269 | this.showtoast('请输入其他证照号码'); |
| 1225 | return | 1270 | return |
| 1226 | - } else if (this.data.otherCardtypeData.selected.indexOf('居住证') > -1 && !reg_18_Number.test(formdata.other_card_number)) { | 1271 | + } |
| 1272 | + if (otherTypeSel.indexOf('居住证') > -1 && otherHasInput && !reg_18_Number.test(formdata.other_card_number)) { | ||
| 1227 | this.showtoast('其他证照号码有误'); | 1273 | this.showtoast('其他证照号码有误'); |
| 1228 | return | 1274 | return |
| 1229 | - } else if (this.data.otherCardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(formdata.other_card_number)) { | 1275 | + }else if (otherTypeSel.indexOf('永久居留') > -1 && otherHasInput && !reg_15_n_a.test(formdata.other_card_number)) { |
| 1230 | this.showtoast('其他证照号码有误'); | 1276 | this.showtoast('其他证照号码有误'); |
| 1231 | return | 1277 | return |
| 1232 | - } | 1278 | + } |
| 1233 | if (this.data.hasOtherCard && !this.data.birthCountryData.selected) { | 1279 | if (this.data.hasOtherCard && !this.data.birthCountryData.selected) { |
| 1234 | this.showtoast('请选择出生国家'); | 1280 | this.showtoast('请选择出生国家'); |
| 1235 | return | 1281 | return |
| @@ -1376,11 +1422,12 @@ Page({ | @@ -1376,11 +1422,12 @@ Page({ | ||
| 1376 | "id_card_type": that.data.cardtypeData.selected, //selected_code, | 1422 | "id_card_type": that.data.cardtypeData.selected, //selected_code, |
| 1377 | "id_card_no": that.data.card_number, | 1423 | "id_card_no": that.data.card_number, |
| 1378 | "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code, | 1424 | "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code, |
| 1379 | - "other_id_card_no": that.data.hasOtherCard ? formdata.other_card_number : '', | 1425 | + "other_id_card_no": that.data.hasOtherCard ? (formdata.other_card_number ? formdata.other_card_number : '') : '', |
| 1380 | "gender": that.data.genderData.selected, | 1426 | "gender": that.data.genderData.selected, |
| 1381 | "birth_date": that.data.long_birth_date, | 1427 | "birth_date": that.data.long_birth_date, |
| 1382 | "first_entry_date": that.data.hasOtherCard ? that.data.firstEntryDate.datelong : null, | 1428 | "first_entry_date": that.data.hasOtherCard ? that.data.firstEntryDate.datelong : null, |
| 1383 | "predict_leave_date": that.data.hasOtherCard ? that.data.predictLeaveDate.datelong : null, | 1429 | "predict_leave_date": that.data.hasOtherCard ? that.data.predictLeaveDate.datelong : null, |
| 1430 | + // "tax_reason": that.data.hasOtherCard ? that.data.taxReasonData.selected : null, | ||
| 1384 | "mobile": that.data.mobile, | 1431 | "mobile": that.data.mobile, |
| 1385 | "current_address": request_current_address, | 1432 | "current_address": request_current_address, |
| 1386 | "current_address_detail": formdata.current_address_detail, | 1433 | "current_address_detail": formdata.current_address_detail, |
| @@ -73,20 +73,24 @@ | @@ -73,20 +73,24 @@ | ||
| 73 | <view class="divide_line_30"></view> | 73 | <view class="divide_line_30"></view> |
| 74 | <template is="picker_cell_normal" data="{{...predictLeaveDate}}" /> | 74 | <template is="picker_cell_normal" data="{{...predictLeaveDate}}" /> |
| 75 | <view class="divide_line_30"></view> | 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 | <template is="picker_cell_normal" data="{{...birthCountryData}}" /> | 76 | <template is="picker_cell_normal" data="{{...birthCountryData}}" /> |
| 77 | + <!-- <view class="divide_line_30"></view> | ||
| 78 | + <template is="picker_cell_normal" data="{{...taxReasonData}}" /> --> | ||
| 87 | </view> | 79 | </view> |
| 88 | - <view hidden='{{!isshow01}}'> | ||
| 89 | - <view wx:if='{{hasOtherCard}}'> | 80 | + <view wx:if='{{hasOtherCard}}'> |
| 81 | + <view wx:if='{{isshow01 || otherCardtypeData.isrequre}}'> | ||
| 82 | + <view class="divide_line_30"></view> | ||
| 83 | + <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> | ||
| 84 | + <view class="divide_line_30"></view> | ||
| 85 | + <view class='item_body'> | ||
| 86 | + <text wx:if='{{otherCardtypeData.isrequre}}' class='red_star_right_10'>*</text> | ||
| 87 | + <text class="text_777_30 float_left {{otherCardtypeData.isrequre?'':'head_in'}}"style='line-height: 90rpx'>其他证照号码</text> | ||
| 88 | + <view> | ||
| 89 | + <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_card_number' maxlength='20'></input> | ||
| 90 | + </view> | ||
| 91 | + </view> | ||
| 92 | + </view> | ||
| 93 | + <view wx:if='{{isshow01}}'> | ||
| 90 | <view class="divide_line_30"></view> | 94 | <view class="divide_line_30"></view> |
| 91 | <view class='item_body'> | 95 | <view class='item_body'> |
| 92 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text> | 96 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text> |
请
注册
或
登录
后发表评论