提交 75f064347ce16a51d0fa7b35968d4957a35186f6

作者 wangyu
1 个父辈 77df475f

自然人基础信息增加开户银行省份字段

1 1 var format = require('../../../../utils/util.js');
  2 +var province = require('../../../../utils/province.js');
2 3 var app = getApp();
3 4 var baseUrl = app.globalData.baseUrl;
4 5 const reg_18_Number = /^[0-9]{18}$/;
... ... @@ -16,10 +17,11 @@ Page({
16 17 * 页面的初始数据
17 18 */
18 19 data: {
  20 + province: [],
19 21 isshow01: false,
20 22 isshow02: false,
21 23 isshow03: false,
22   - hasOtherCard:false,
  24 + hasOtherCard: false,
23 25 taxInfo: {},
24 26 proffessionlist: {},
25 27 banklist: {},
... ... @@ -32,7 +34,7 @@ Page({
32 34 birthday: '',
33 35 idInfoData: '',
34 36 id_error: false,
35   - has_certify:false,
  37 + has_certify: false,
36 38 curAddress_haschanged: false,
37 39 birthAddress_haschanged: false,
38 40 contactAddress_haschanged: false,
... ... @@ -40,8 +42,8 @@ Page({
40 42 long_birth_date: 0,
41 43 long_start_date: 0,
42 44 long_end_date: 0,
43   - personal_equity_total:0,
44   - company_equity_total:0,
  45 + personal_equity_total: 0,
  46 + company_equity_total: 0,
45 47 huji_address_detail: '',
46 48 personstatusData: {
47 49 isrequre: true,
... ... @@ -104,7 +106,7 @@ Page({
104 106 label: '纳税人类型',
105 107 bindtype: 'taxpayerType',
106 108 placeholder: '请选择纳税人类型',
107   - selected:"居民",
  109 + selected: "居民",
108 110 values: ["居民", "非居民"],
109 111 onChange: 'onPickerSelect'
110 112 },
... ... @@ -114,18 +116,26 @@ Page({
114 116 bindtype: 'forigner',
115 117 placeholder: '请选择',
116 118 disabled: true,
117   - selected:"否",
  119 + selected: "否",
118 120 values: ["否", "是"],
119 121 onChange: 'onPickerSelect'
120 122 },
121 123 bankInfo: {
122 124 label: '开户银行',
123 125 bindtype: 'bank',
124   - maxWidth:490,
  126 + maxWidth: 490,
125 127 placeholder: '请选择开户银行',
126 128 selected: '',
127 129 onChange: 'onPickerSelect'
128 130 },
  131 + bankProvinceInfo: {
  132 + label: '开户银行省份',
  133 + bindtype: 'bank_province',
  134 + maxWidth: 490,
  135 + placeholder: '请选择开户银行省份',
  136 + selected: '',
  137 + onChange: 'onPickerSelect'
  138 + },
129 139 genderData: {
130 140 label: '性别',
131 141 isrequre: true,
... ... @@ -216,7 +226,7 @@ Page({
216 226 // 时间picker
217 227 birthDate: {
218 228 label: '出生日期',
219   - isrequre:true,
  229 + isrequre: true,
220 230 bindtype: 'birthday',
221 231 placeholder: '出生日期',
222 232 selected: '',
... ... @@ -306,7 +316,7 @@ Page({
306 316 * 生命周期函数--监听页面加载
307 317 */
308 318 onLoad: function(options) {
309   -
  319 +
310 320 console.log('options.id', options.id)
311 321 if (options.id && options.id.length > 0) {
312 322 this.setData({
... ... @@ -317,9 +327,28 @@ Page({
317 327 this.getproffessiondata()
318 328 this.getbanklist()
319 329 this.getCountry()
  330 + this.loadProvince()
320 331 },
321   -//****************获取国籍数据************/
322   - getCountry: function () {
  332 +
  333 +//****************获取开户行省份************/
  334 + loadProvince: function () {
  335 + province.init(this)
  336 + var provincelist = this.data.province
  337 + var province_data = []
  338 + var bankprovince_info = this.data.bankProvinceInfo
  339 + for (var i = 0; i < provincelist.length; i++) {
  340 + province_data.push(provincelist[i].name)
  341 + }
  342 +
  343 + bankprovince_info.values = province_data
  344 + this.setData({
  345 + bankProvinceInfo: bankprovince_info
  346 + })
  347 + console.log("bankProvinceInfo", this.data.bankProvinceInfo)
  348 + },
  349 +
  350 + //****************获取国籍数据************/
  351 + getCountry: function() {
323 352 var that = this
324 353 wx.showLoading({
325 354 title: '',
... ... @@ -332,7 +361,7 @@ Page({
332 361 'content-type': 'application/json', // 默认值
333 362 "Authorization": Authorization
334 363 },
335   - success: function (res) {
  364 + success: function(res) {
336 365 var countrys = res.data.concat()
337 366 that.data.birthCountryData.values = res.data
338 367 if (countrys.indexOf('中国') > -1) {
... ... @@ -364,7 +393,7 @@ Page({
364 393 },
365 394
366 395
367   -//****************获取自然人数据************/
  396 + //****************获取自然人数据************/
368 397 getpersonalTax: function(id) {
369 398 var that = this
370 399 wx.showLoading({
... ... @@ -383,7 +412,7 @@ Page({
383 412 that.setData({
384 413 taxInfo: res.data,
385 414 // isself: '魏先森' != res.data.name ? false : true
386   - isself: res.data.family_ties=="本人" ? true : false
  415 + isself: res.data.family_ties == "本人" ? true : false
387 416 })
388 417 that.handleDatas(res.data)
389 418 },
... ... @@ -398,16 +427,16 @@ Page({
398 427 },
399 428
400 429 //对各参数初始赋值
401   - handleDatas: function (tax_info) {
  430 + handleDatas: function(tax_info) {
402 431 //todo
403 432 console.log('tax_info', tax_info)
404 433 var curdate = format.curDateTime()
405   - this.dealCardType(tax_info.id_card_type)//为防止干扰其他字段,需要先执行
  434 + this.dealCardType(tax_info.id_card_type) //为防止干扰其他字段,需要先执行
406 435
407 436 this.data.name = tax_info.name
408 437 this.data.other_name = tax_info.other_name
409   - if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) {//已通过拍摄身份证认证过,不能修改
410   - if (tax_info.id_card_type=='居民身份证'){
  438 + if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) { //已通过拍摄身份证认证过,不能修改
  439 + if (tax_info.id_card_type == '居民身份证') {
411 440 this.data.genderData.disabled = true
412 441 this.data.birthDate.disabled = true
413 442 }
... ... @@ -424,7 +453,7 @@ Page({
424 453
425 454 this.data.other_card_number = tax_info.other_id_card_no
426 455 this.data.overseas = tax_info.is_overseas_personnel
427   - if (tax_info.native){
  456 + if (tax_info.native) {
428 457 this.data.countryData.selected = tax_info.native
429 458 }
430 459 this.data.birthCountryData.selected = tax_info.birth_native
... ... @@ -436,7 +465,7 @@ Page({
436 465 this.data.mobile = tax_info.mobile
437 466 this.data.investInfo.selected = tax_info.is_investor
438 467 this.data.specificIndustryInfo.selected = tax_info.is_specific_profession
439   -
  468 +
440 469 this.data.genderData.selected = tax_info.gender
441 470 if (tax_info.birth_date == -62135596800 || tax_info.birth_date == 0) {
442 471 this.data.birthDate.selected = ''
... ... @@ -444,17 +473,17 @@ Page({
444 473 // this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date)
445 474 this.data.birthDate.selected = tax_info.birth_date_str //format.formatTime_date(tax_info.birth_date)
446 475 }
447   -//非必填
  476 + //非必填
448 477 if (tax_info.join_date > 1000) {
449 478 // this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date)
450   - this.data.startDate.selected = format.formatTime_date(tax_info.join_date)
  479 + this.data.startDate.selected = format.formatTime_date(tax_info.join_date)
451 480 }
452 481 if (tax_info.separate_date > 1000) {
453   - this.data.endDate.selected = format.formatTime_date(tax_info.separate_date)
  482 + this.data.endDate.selected = format.formatTime_date(tax_info.separate_date)
454 483 }
455 484 const firstEntryDate = format.formatTime_date(tax_info.first_entry_date)
456 485 const predictLeaveDate = format.formatTime_date(tax_info.predict_leave_date)
457   - this.data.firstEntryDate.selected = (firstEntryDate.indexOf("01-01-01") == -1) ? firstEntryDate:''
  486 + this.data.firstEntryDate.selected = (firstEntryDate.indexOf("01-01-01") == -1) ? firstEntryDate : ''
458 487 this.data.firstEntryDate.datelong = tax_info.first_entry_date
459 488 this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : ''
460 489 this.data.predictLeaveDate.datelong = tax_info.predict_leave_date
... ... @@ -468,6 +497,7 @@ Page({
468 497 this.data.lieshuInfo.selected = tax_info.is_martyr_family
469 498 this.data.lonelyolderInfo.selected = tax_info.is_lonely_man
470 499 this.data.bankInfo.selected = tax_info.bank
  500 + this.data.bankProvinceInfo.selected = tax_info.bank_province
471 501 this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
472 502 this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district
473 503 this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "")
... ... @@ -485,8 +515,9 @@ Page({
485 515 specificIndustryInfo: this.data.specificIndustryInfo,
486 516 genderData: this.data.genderData,
487 517 bankInfo: this.data.bankInfo,
  518 + bankProvinceInfo: this.data.bankProvinceInfo,
488 519 personal_equity_total: tax_info.personal_equity_total ? tax_info.personal_equity_total : 0,
489   - company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total: 0,
  520 + company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total : 0,
490 521
491 522 professionData: this.data.professionData,
492 523 degreeData: this.data.degreeData,
... ... @@ -501,7 +532,7 @@ Page({
501 532
502 533 long_birth_date: tax_info.birth_date,
503 534 birthDate: this.data.birthDate,
504   - long_start_date: tax_info.join_date ? tax_info.join_date:0,
  535 + long_start_date: tax_info.join_date ? tax_info.join_date : 0,
505 536 startDate: this.data.startDate,
506 537 long_end_date: tax_info.separate_date ? tax_info.separate_date : 0,
507 538 endDate: this.data.endDate,
... ... @@ -531,7 +562,7 @@ Page({
531 562 "Authorization": Authorization
532 563 },
533 564 success: function(res) {
534   - if (res.data.items.length<1){
  565 + if (res.data.items.length < 1) {
535 566 return
536 567 }
537 568 proffession_info.values = that.handleProfession(res.data.items)
... ... @@ -617,7 +648,7 @@ Page({
617 648 },
618 649 success: function(res) {
619 650 console.log(res)
620   - bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
  651 + bank_info.values = res.data.banks //that.handleBankinfo(res.data.items)
621 652
622 653 that.setData({
623 654 // banklist: res.data.items,
... ... @@ -692,7 +723,7 @@ Page({
692 723 // return
693 724 // }
694 725 that.setData({
695   - has_certify:true,
  726 + has_certify: true,
696 727 idInfoData: id_info,
697 728 name: id_info.name,
698 729 birthday: birth_day,
... ... @@ -716,7 +747,7 @@ Page({
716 747 },
717 748
718 749 span: function(e) {
719   - console.log(e,'9808909')
  750 + console.log(e, '9808909')
720 751 if ("1" == e.currentTarget.id) {
721 752 this.setData({
722 753 isshow01: !this.data.isshow01
... ... @@ -733,7 +764,7 @@ Page({
733 764
734 765 },
735 766
736   - dealCardType: function (new_type){
  767 + dealCardType: function(new_type) {
737 768 // console.log('cardtype_code', new_type_code)
738 769 console.log('cardtype', new_type)
739 770 var is_idcard = this.data.isIdCard
... ... @@ -767,12 +798,12 @@ Page({
767 798 this.data.countryData.selected = ''
768 799 this.data.countryData.disabled = false
769 800 this.data.nameText = '英文名'
770   - if (new_type.indexOf('通行证') != -1){
771   - this.data.otherCardtypeData.values = ['港澳居民居住证'];// [{ 'code': '4', 'name': '港澳居民居住证'}];
  801 + if (new_type.indexOf('通行证') != -1) {
  802 + this.data.otherCardtypeData.values = ['港澳居民居住证']; // [{ 'code': '4', 'name': '港澳居民居住证'}];
772 803 this.data.otherCardtypeData.isrequre = false
773   - }else{
774   - this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}];
775   - this.data.otherCardtypeData.selected = '港澳居民来往内地通行证';
  804 + } else {
  805 + this.data.otherCardtypeData.values = ['港澳居民来往内地通行证']; // [{ 'code': '3', 'name': '港澳居民来往内地通行证'}];
  806 + this.data.otherCardtypeData.selected = '港澳居民来往内地通行证';
776 807 this.data.otherCardtypeData.isrequre = true
777 808 }
778 809 } else if (new_type.indexOf("台湾") != -1) {
... ... @@ -780,11 +811,11 @@ Page({
780 811 this.data.countryData.disabled = true
781 812 this.data.nameText = '英文名'
782 813 if (new_type.indexOf('通行证') != -1) {
783   - this.data.otherCardtypeData.values = ['台湾居民居住证'];//[{ 'code': '6', 'name': '台湾居民居住证' }];
  814 + this.data.otherCardtypeData.values = ['台湾居民居住证']; //[{ 'code': '6', 'name': '台湾居民居住证' }];
784 815 this.data.otherCardtypeData.isrequre = false
785 816 } else {
786 817 this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }];
787   - this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证';
  818 + this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证';
788 819 this.data.otherCardtypeData.isrequre = true
789 820 }
790 821
... ... @@ -794,12 +825,12 @@ Page({
794 825 this.data.countryData.disabled = false
795 826 this.data.nameText = '中文名'
796 827 if (new_type.indexOf("外国护照") != -1) {
797   - // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }];
798   - this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)','外国人工作许可证(C类)'];
  828 + // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }];
  829 + this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)'];
799 830 this.data.otherCardtypeData.isrequre = false
800 831 } else {
801 832 this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }];
802   - this.data.otherCardtypeData.selected = '外国护照';
  833 + this.data.otherCardtypeData.selected = '外国护照';
803 834 this.data.otherCardtypeData.isrequre = true
804 835 }
805 836 }
... ... @@ -815,8 +846,8 @@ Page({
815 846 overseas: this.data.overseas,
816 847 taxpayerTypeData: this.data.taxpayerTypeData
817 848 })
818   -
819   -
  849 +
  850 +
820 851 },
821 852
822 853
... ... @@ -837,10 +868,12 @@ Page({
837 868 var selected = cardtypeData.selected
838 869 if (new_type != selected) {
839 870 this.dealCardType(new_type)
840   - var setData = { card_number: ''}
  871 + var setData = {
  872 + card_number: ''
  873 + }
841 874 if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) {
842 875 console.log('外国人', new_type, selected)
843   - }else {
  876 + } else {
844 877 setData.other_card_number = ''
845 878 }
846 879 this.setData(setData)
... ... @@ -880,19 +913,19 @@ Page({
880 913 })
881 914 }
882 915 break;
883   - // case 'tax_reason':
884   - // var taxReasonData = this.data.taxReasonData
885   - // var reason = taxReasonData.values[e.detail.value]
886   - // if (reason != taxReasonData.selected) {
887   - // taxReasonData.selected = reason
888   - // this.setData({
889   - // taxReasonData: taxReasonData
890   - // })
891   - // }
892   - // break;
  916 + // case 'tax_reason':
  917 + // var taxReasonData = this.data.taxReasonData
  918 + // var reason = taxReasonData.values[e.detail.value]
  919 + // if (reason != taxReasonData.selected) {
  920 + // taxReasonData.selected = reason
  921 + // this.setData({
  922 + // taxReasonData: taxReasonData
  923 + // })
  924 + // }
  925 + // break;
893 926 case 'taxpayerType':
894 927 var taxpayerTypeData = this.data.taxpayerTypeData
895   - taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value]
  928 + taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value]
896 929 this.setData({
897 930 taxpayerTypeData: taxpayerTypeData
898 931 })
... ... @@ -911,6 +944,13 @@ Page({
911 944 bankInfo: bank_data
912 945 })
913 946 break;
  947 + case 'bank_province':
  948 + var bankprovince_data = this.data.bankProvinceInfo
  949 + bankprovince_data.selected = bankprovince_data.values[e.detail.value]
  950 + this.setData({
  951 + bankProvinceInfo: bankprovince_data
  952 + })
  953 + break;
914 954 case 'gender':
915 955 var gender_data = this.data.genderData
916 956 gender_data.selected = gender_data.values[e.detail.value]
... ... @@ -989,7 +1029,7 @@ Page({
989 1029 this.data.firstEntryDate.selected = e.detail.value
990 1030 this.data.firstEntryDate.datelong = Date.parse(new Date(e.detail.value)) / 1000
991 1031 this.data.predictLeaveDate.start = e.detail.value
992   - if (this.data.firstEntryDate.datelong>this.data.predictLeaveDate.datelong){
  1032 + if (this.data.firstEntryDate.datelong > this.data.predictLeaveDate.datelong) {
993 1033 this.data.predictLeaveDate.selected = ''
994 1034 }
995 1035 this.setData({
... ... @@ -1106,7 +1146,7 @@ Page({
1106 1146 other_name: e.detail.value
1107 1147 })
1108 1148 },
1109   - idcardblur: function (e) {
  1149 + idcardblur: function(e) {
1110 1150 var idCardNo = e.detail.value
1111 1151 this.setData({
1112 1152 card_number: idCardNo
... ... @@ -1141,8 +1181,8 @@ Page({
1141 1181 if (this.data.isIdCard && !format.isIDCardNum(idCardNo)) {
1142 1182 this.showtoast('证照号码有误');
1143 1183 return;
1144   - }
1145   - if (this.data.isIdCard){
  1184 + }
  1185 + if (this.data.isIdCard) {
1146 1186 this.dealIdInfo(idCardNo)
1147 1187 return;
1148 1188 }
... ... @@ -1151,7 +1191,7 @@ Page({
1151 1191 return
1152 1192 }
1153 1193 }
1154   - if (e.detail.value.length == 9){
  1194 + if (e.detail.value.length == 9) {
1155 1195 if (this.data.cardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(idCardNo)) {
1156 1196 this.showtoast('证照号码有误');
1157 1197 return
... ... @@ -1165,7 +1205,7 @@ Page({
1165 1205 }
1166 1206 },
1167 1207 //根据身份证号码,获取相关信息
1168   - dealIdInfo: function (idCardNum) {
  1208 + dealIdInfo: function(idCardNum) {
1169 1209 var info = format.analyzeIDCard(idCardNum)
1170 1210 console.log('info', info.age, info.sex)
1171 1211 if (info.age) {
... ... @@ -1184,14 +1224,14 @@ Page({
1184 1224 })
1185 1225 }
1186 1226 },
1187   - personalmoney:function(e){
  1227 + personalmoney: function(e) {
1188 1228 console.log('personalmoney', e)
1189 1229 this.setData({
1190 1230 personal_equity_total: e.detail.value
1191 1231 })
1192 1232 },
1193 1233
1194   - companymoney:function(e){
  1234 + companymoney: function(e) {
1195 1235 console.log('companymoney', e)
1196 1236 this.setData({
1197 1237 company_equity_total: e.detail.value
... ... @@ -1202,8 +1242,8 @@ Page({
1202 1242 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$");
1203 1243 var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
1204 1244 // var regname = /^[\u4E00-\u9FA5A-Za-z·s]{2,20}$/;
1205   - var regname_c = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,30}$/; //中文
1206   - var regname_e = /^[A-Za-z][A-Za-z\s]*[A-Za-z]$/; //英文
  1245 + var regname_c = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,30}$/; //中文
  1246 + var regname_e = /^[A-Za-z][A-Za-z\s]*[A-Za-z]$/; //英文
1207 1247 // var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
1208 1248 // var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/;
1209 1249 var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
... ... @@ -1212,7 +1252,7 @@ Page({
1212 1252 if (this.data.cardtypeData.selected.length < 1) {
1213 1253 this.showtoast('请选择证照类型');
1214 1254 return
1215   - }
  1255 + }
1216 1256 if (this.data.card_number.length < 1) {
1217 1257 this.showtoast('请填写证照号码');
1218 1258 return
... ... @@ -1235,7 +1275,7 @@ Page({
1235 1275 } else if (this.data.name.length > 0 && !regname_c.test(this.data.name)) {
1236 1276 // this.showtoast('请输入正确姓名');
1237 1277 // return
1238   - }
  1278 + }
1239 1279 if (this.data.genderData.selected.length < 1) {
1240 1280 this.showtoast('请选择性别');
1241 1281 return
... ... @@ -1243,7 +1283,7 @@ Page({
1243 1283 if (this.data.birthDate.selected.length < 1) {
1244 1284 this.showtoast('请选择出生日期');
1245 1285 return
1246   - }
  1286 + }
1247 1287 if (this.data.countryData.selected.length < 1) {
1248 1288 this.showtoast('请选择国籍');
1249 1289 return
... ... @@ -1251,11 +1291,11 @@ Page({
1251 1291 if (this.data.taxpayerTypeData.selected.length < 1) {
1252 1292 this.showtoast('请选择纳税人类型');
1253 1293 return
1254   - }
  1294 + }
1255 1295 if (this.data.hasOtherCard && !this.data.firstEntryDate.selected) {
1256 1296 this.showtoast('请选择首次入境时间');
1257 1297 return
1258   - }
  1298 + }
1259 1299 if (this.data.hasOtherCard && !this.data.predictLeaveDate.selected) {
1260 1300 this.showtoast('请选择预计离境时间');
1261 1301 return
... ... @@ -1270,24 +1310,24 @@ Page({
1270 1310 if (this.data.hasOtherCard && !otherTypeSel && this.data.otherCardtypeData.isrequre) {
1271 1311 this.showtoast('请选择其他证照类型');
1272 1312 return
1273   - }
  1313 + }
1274 1314 if (this.data.hasOtherCard && !otherHasInput && this.data.otherCardtypeData.isrequre) {
1275 1315 this.showtoast('请输入其他证照号码');
1276 1316 return
1277 1317 }
1278   - if (otherTypeSel.indexOf('居住证') > -1 && otherHasInput && !reg_18_Number.test(formdata.other_card_number)) {
  1318 + if (otherTypeSel.indexOf('居住证') > -1 && otherHasInput && !reg_18_Number.test(formdata.other_card_number)) {
1279 1319 this.showtoast('其他证照号码有误');
1280 1320 return
1281   - }else if (otherTypeSel.indexOf('永久居留') > -1 && otherHasInput && !reg_15_n_a.test(formdata.other_card_number)) {
  1321 + } else if (otherTypeSel.indexOf('永久居留') > -1 && otherHasInput && !reg_15_n_a.test(formdata.other_card_number)) {
1282 1322 this.showtoast('其他证照号码有误');
1283 1323 return
1284   - }
  1324 + }
1285 1325 if (this.data.hasOtherCard && !this.data.birthCountryData.selected) {
1286 1326 this.showtoast('请选择出生国家');
1287 1327 return
1288   - }
  1328 + }
1289 1329 if (this.data.other_name.length > 0) {
1290   - if (this.data.cardtypeData.selected != '居民身份证' && this.data.cardtypeData.selected != '中国护照'){
  1330 + if (this.data.cardtypeData.selected != '居民身份证' && this.data.cardtypeData.selected != '中国护照') {
1291 1331 var regname = (this.data.nameText == '中文名') ? regname_c : regname_e
1292 1332 this.data.other_name = this.data.other_name.replace(/(^\s*)|(\s*$)/g, "");
1293 1333 if (!regname.test(this.data.other_name)) {
... ... @@ -1295,7 +1335,7 @@ Page({
1295 1335 return
1296 1336 }
1297 1337 }
1298   - }
  1338 + }
1299 1339 if (this.data.mobile.length < 1) {
1300 1340 this.showtoast('请输入手机号码');
1301 1341 return
... ... @@ -1343,12 +1383,36 @@ Page({
1343 1383 // this.showtoast('邮箱格式有误');
1344 1384 // return
1345 1385 // }
1346   - if (this.data.bankInfo.selected.length > 0 && formdata.bank_account.length < 1) {
1347   - this.showtoast('请输入银行卡号')
1348   - return
  1386 + if (this.data.bankInfo.selected && this.data.bankInfo.selected.length > 0) {
  1387 + if (this.data.bankProvinceInfo && this.data.bankProvinceInfo.selected.length < 1) {
  1388 + this.showtoast('请选择开户银行省份')
  1389 + return
  1390 + }
  1391 + if (!formdata.bank_account || formdata.bank_account.length < 1) {
  1392 + this.showtoast('请输入银行账户')
  1393 + return
  1394 + } else if (!format.banknoCheck(formdata.bank_account)) {
  1395 + this.showtoast('银行卡号格式有误')
  1396 + return
  1397 + }
  1398 + }
  1399 +
  1400 + if (this.data.bankProvinceInfo && this.data.bankProvinceInfo.selected.length > 0) {
  1401 + if (this.data.bankInfo && this.data.bankInfo.selected.length < 1) {
  1402 + this.showtoast('请选择开户银行')
  1403 + return
  1404 + }
  1405 + if (!formdata.bank_account || formdata.bank_account.length < 1) {
  1406 + this.showtoast('请输入银行账户')
  1407 + return
  1408 + } else if (!format.banknoCheck(formdata.bank_account)) {
  1409 + this.showtoast('银行卡号格式有误')
  1410 + return
  1411 + }
1349 1412 }
  1413 +
1350 1414 if (formdata.bank_account && formdata.bank_account.length > 0) {
1351   - if (!format.banknoCheck(formdata.bank_account)){
  1415 + if (!format.banknoCheck(formdata.bank_account)) {
1352 1416 this.showtoast('银行卡号格式有误')
1353 1417 return
1354 1418 }
... ... @@ -1356,6 +1420,10 @@ Page({
1356 1420 this.showtoast('请选择开户银行')
1357 1421 return
1358 1422 }
  1423 + if (!this.data.bankProvinceInfo.selected) {
  1424 + this.showtoast('请选择开户银行省份')
  1425 + return
  1426 + }
1359 1427 }
1360 1428 this.goCommit(formdata);
1361 1429 // else if (this.data.personstatusData.selected.length < 1) {
... ... @@ -1384,7 +1452,7 @@ Page({
1384 1452 // this.showtoast('有必填项未填写');
1385 1453 // return
1386 1454 // } else
1387   -
  1455 +
1388 1456 // else if (this.data.company_equity_total && this.data.company_equity_total.length > 0 && !regMoney.test(this.data.company_equity_total)) {
1389 1457 // this.showtoast('请输入正确金额');
1390 1458 // return
... ... @@ -1420,14 +1488,14 @@ Page({
1420 1488 'certification_status': that.getCertifyStatus(formdata),
1421 1489 "name": that.data.name,
1422 1490 "other_name": that.data.hasOtherCard ? that.data.other_name : '',
1423   - "family_ties": '本人',//that.data.relativeData.selected,
  1491 + "family_ties": '本人', //that.data.relativeData.selected,
1424 1492 "native": that.data.countryData.selected,
1425   - "taxpayer_type": that.data.taxpayerTypeData.selected == '非居民' ? 'non-resident' :'resident',
  1493 + "taxpayer_type": that.data.taxpayerTypeData.selected == '非居民' ? 'non-resident' : 'resident',
1426 1494 "is_overseas_personnel": that.data.overseas,
1427 1495 'birth_native': that.data.hasOtherCard ? that.data.birthCountryData.selected : '',
1428 1496 "id_card_type": that.data.cardtypeData.selected, //selected_code,
1429 1497 "id_card_no": that.data.card_number,
1430   - "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code,
  1498 + "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code,
1431 1499 "other_id_card_no": that.data.hasOtherCard ? (formdata.other_card_number ? formdata.other_card_number : '') : '',
1432 1500 "gender": that.data.genderData.selected,
1433 1501 "birth_date": that.data.long_birth_date,
... ... @@ -1444,6 +1512,7 @@ Page({
1444 1512 "profession": request_profession,
1445 1513 "education": that.data.degreeData.selected,
1446 1514 "bank": that.data.bankInfo.selected,
  1515 + "bank_province": that.data.bankProvinceInfo.selected,
1447 1516 "bank_account": formdata.bank_account,
1448 1517 // "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : that.data.taxInfo.taxpayer_no,
1449 1518 // "taxpayer_status": that.data.personstatusData.selected,
... ... @@ -1453,10 +1522,10 @@ Page({
1453 1522 "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : formdata.martyr_family_no,
1454 1523 "is_lonely_man": that.data.lonelyolderInfo.selected,
1455 1524 "comment": formdata.comment,
1456   -
  1525 +
1457 1526 "contact_address": that.data.hasOtherCard ? request_contact_address : {},
1458   - "contact_address_detail": that.data.hasOtherCard ? formdata.contact_address_detail: '',
1459   -
  1527 + "contact_address_detail": that.data.hasOtherCard ? formdata.contact_address_detail : '',
  1528 +
1460 1529 // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date,
1461 1530 // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date,
1462 1531 // "is_employee": that.data.employeeInfo.selected,
... ... @@ -1475,9 +1544,9 @@ Page({
1475 1544 console.log(res)
1476 1545 if (res.statusCode < 300) {
1477 1546 wx.navigateBack({
1478   - delta:1
  1547 + delta: 1
1479 1548 })
1480   - } else if (res.data.code == 400 && res.data.errors.email){
  1549 + } else if (res.data.code == 400 && res.data.errors.email) {
1481 1550 that.showtoast('邮箱格式有误')
1482 1551 } else {
1483 1552 that.showtoast(res.data.message ? res.data.message : '请求出错')
... ... @@ -1560,7 +1629,7 @@ Page({
1560 1629 wx.showToast({
1561 1630 title: str,
1562 1631 duration: 2000,
1563   - icon:'none'
  1632 + icon: 'none'
1564 1633 // image: '/images/error.png'
1565 1634 })
1566 1635 },
... ... @@ -1573,7 +1642,7 @@ Page({
1573 1642 var gender = this.data.genderData.selected;
1574 1643 var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000;
1575 1644 console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date)
1576   - if ((this.data.has_certify&&name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) {
  1645 + if ((this.data.has_certify && name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) {
1577 1646 return 'active'
1578 1647 } else {
1579 1648 return ''
... ...
... ... @@ -186,6 +186,8 @@
186 186 <view class="divide_line_30"></view>
187 187 <template is="picker_cell_normal" data="{{...bankInfo}}" />
188 188 <view class="divide_line_30"></view>
  189 + <template is="picker_cell_normal" data="{{...bankProvinceInfo}}" />
  190 + <view class="divide_line_30"></view>
189 191 <view class='item_body'>
190 192 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>银行账号</text>
191 193 <input class='input_wrap' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='19' type='number'></input>
... ...
注册登录 后发表评论