|
@@ -333,8 +333,8 @@ Page({ |
|
@@ -333,8 +333,8 @@ Page({ |
333
|
specificIndustryInfo: this.data.specificIndustryInfo,
|
333
|
specificIndustryInfo: this.data.specificIndustryInfo,
|
334
|
genderData: this.data.genderData,
|
334
|
genderData: this.data.genderData,
|
335
|
bankInfo: this.data.bankInfo,
|
335
|
bankInfo: this.data.bankInfo,
|
336
|
- personal_equity_total:tax_info.personal_equity_total,
|
|
|
337
|
- company_equity_total: tax_info.company_equity_total,
|
336
|
+ personal_equity_total: tax_info.personal_equity_total ? tax_info.personal_equity_total : 0,
|
|
|
337
|
+ company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total: 0,
|
338
|
|
338
|
|
339
|
professionData: this.data.professionData,
|
339
|
professionData: this.data.professionData,
|
340
|
degreeData: this.data.degreeData,
|
340
|
degreeData: this.data.degreeData,
|
|
@@ -349,9 +349,9 @@ Page({ |
|
@@ -349,9 +349,9 @@ Page({ |
349
|
|
349
|
|
350
|
long_birth_date: tax_info.birth_date,
|
350
|
long_birth_date: tax_info.birth_date,
|
351
|
birthDate: this.data.birthDate,
|
351
|
birthDate: this.data.birthDate,
|
352
|
- long_start_date: tax_info.join_date,
|
352
|
+ long_start_date: tax_info.join_date ? tax_info.join_date:0,
|
353
|
startDate: this.data.startDate,
|
353
|
startDate: this.data.startDate,
|
354
|
- long_end_date: tax_info.separate_date,
|
354
|
+ long_end_date: tax_info.separate_date ? tax_info.separate_date : 0,
|
355
|
endDate: this.data.endDate,
|
355
|
endDate: this.data.endDate,
|
356
|
isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
|
356
|
isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
|
357
|
card_number: this.data.card_number
|
357
|
card_number: this.data.card_number
|
|
@@ -458,7 +458,7 @@ Page({ |
|
@@ -458,7 +458,7 @@ Page({ |
458
|
bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
|
458
|
bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
|
459
|
|
459
|
|
460
|
that.setData({
|
460
|
that.setData({
|
461
|
- banklist: res.data.items,
|
461
|
+ // banklist: res.data.items,
|
462
|
bankInfo: bank_info
|
462
|
bankInfo: bank_info
|
463
|
})
|
463
|
})
|
464
|
console.log("bankInfo", that.data.bankInfo)
|
464
|
console.log("bankInfo", that.data.bankInfo)
|
|
@@ -786,6 +786,16 @@ Page({ |
|
@@ -786,6 +786,16 @@ Page({ |
786
|
|
786
|
|
787
|
idcardblur: function (e) {
|
787
|
idcardblur: function (e) {
|
788
|
var idCardNo = e.detail.value
|
788
|
var idCardNo = e.detail.value
|
|
|
789
|
+ this.setData({
|
|
|
790
|
+ card_number: idCardNo
|
|
|
791
|
+ })
|
|
|
792
|
+ if (!idCardNo.length) {
|
|
|
793
|
+ wx.showToast({
|
|
|
794
|
+ image: "../../../../images/warn.png",
|
|
|
795
|
+ title: '请输入身份证号'
|
|
|
796
|
+ })
|
|
|
797
|
+ return;
|
|
|
798
|
+ }
|
789
|
if (!format.isIDCardNum(idCardNo)) {
|
799
|
if (!format.isIDCardNum(idCardNo)) {
|
790
|
wx.showToast({
|
800
|
wx.showToast({
|
791
|
image: "../../../../images/warn.png",
|
801
|
image: "../../../../images/warn.png",
|
|
@@ -793,10 +803,12 @@ Page({ |
|
@@ -793,10 +803,12 @@ Page({ |
793
|
})
|
803
|
})
|
794
|
return;
|
804
|
return;
|
795
|
}
|
805
|
}
|
796
|
- this.dealIdInfo(idCardNo)
|
|
|
797
|
},
|
806
|
},
|
798
|
bindinputcardnum: function(e) {
|
807
|
bindinputcardnum: function(e) {
|
799
|
var idCardNo = e.detail.value
|
808
|
var idCardNo = e.detail.value
|
|
|
809
|
+ this.setData({
|
|
|
810
|
+ card_number: idCardNo
|
|
|
811
|
+ })
|
800
|
if (e.detail.value.length == 18) {
|
812
|
if (e.detail.value.length == 18) {
|
801
|
if (!format.isIDCardNum(idCardNo)) {
|
813
|
if (!format.isIDCardNum(idCardNo)) {
|
802
|
wx.showToast({
|
814
|
wx.showToast({
|
|
@@ -811,9 +823,22 @@ Page({ |
|
@@ -811,9 +823,22 @@ Page({ |
811
|
//根据身份证号码,获取相关信息
|
823
|
//根据身份证号码,获取相关信息
|
812
|
dealIdInfo: function (idCardNum) {
|
824
|
dealIdInfo: function (idCardNum) {
|
813
|
var info = format.analyzeIDCard(idCardNum)
|
825
|
var info = format.analyzeIDCard(idCardNum)
|
814
|
- this.setData({
|
|
|
815
|
- card_number: idCardNum
|
|
|
816
|
- })
|
826
|
+ console.log('info', info.age, info.sex)
|
|
|
827
|
+ if (info.age) {
|
|
|
828
|
+ this.data.birthDate.selected = info.birthDay
|
|
|
829
|
+ this.setData({
|
|
|
830
|
+ age: info.age,
|
|
|
831
|
+ long_birth_date: Date.parse(new Date(info.birthDay)) / 1000,
|
|
|
832
|
+ birthDate: this.data.birthDate
|
|
|
833
|
+ })
|
|
|
834
|
+ }
|
|
|
835
|
+ if (info.sex) {
|
|
|
836
|
+ var gender_data = this.data.genderData
|
|
|
837
|
+ gender_data.selected = info.sex
|
|
|
838
|
+ this.setData({
|
|
|
839
|
+ genderData: gender_data
|
|
|
840
|
+ })
|
|
|
841
|
+ }
|
817
|
},
|
842
|
},
|
818
|
personalmoney:function(e){
|
843
|
personalmoney:function(e){
|
819
|
console.log('personalmoney', e)
|
844
|
console.log('personalmoney', e)
|
|
@@ -838,9 +863,8 @@ Page({ |
|
@@ -838,9 +863,8 @@ Page({ |
838
|
var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
|
863
|
var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
|
839
|
var formdata = e.detail.value;
|
864
|
var formdata = e.detail.value;
|
840
|
console.log("formdata", formdata)
|
865
|
console.log("formdata", formdata)
|
841
|
- console.log("card_number", this.data.card_number)
|
|
|
842
|
if (this.data.card_number.length < 1) {
|
866
|
if (this.data.card_number.length < 1) {
|
843
|
- this.showtoast('请输入身份证号码');
|
867
|
+ this.showtoast('请填写证照号码');
|
844
|
return
|
868
|
return
|
845
|
} else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {
|
869
|
} else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {
|
846
|
this.showtoast('证照号码有误');
|
870
|
this.showtoast('证照号码有误');
|
|
@@ -853,6 +877,14 @@ Page({ |
|
@@ -853,6 +877,14 @@ Page({ |
853
|
this.showtoast('请输入正确姓名');
|
877
|
this.showtoast('请输入正确姓名');
|
854
|
return
|
878
|
return
|
855
|
}
|
879
|
}
|
|
|
880
|
+ if (this.data.mobile.length < 1) {
|
|
|
881
|
+ this.showtoast('请输入手机号码');
|
|
|
882
|
+ return
|
|
|
883
|
+ } else if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) {
|
|
|
884
|
+ this.showtoast('手机号码有误');
|
|
|
885
|
+ return
|
|
|
886
|
+ }
|
|
|
887
|
+ this.goCommit(formdata);
|
856
|
// else if (this.data.personstatusData.selected.length < 1) {
|
888
|
// else if (this.data.personstatusData.selected.length < 1) {
|
857
|
// this.showtoast('有必填项未填写');
|
889
|
// this.showtoast('有必填项未填写');
|
858
|
// return
|
890
|
// return
|
|
@@ -869,13 +901,6 @@ Page({ |
|
@@ -869,13 +901,6 @@ Page({ |
869
|
// this.showtoast('有必填项未填写');
|
901
|
// this.showtoast('有必填项未填写');
|
870
|
// return
|
902
|
// return
|
871
|
// } else
|
903
|
// } else
|
872
|
- if (this.data.mobile.length < 1) {
|
|
|
873
|
- this.showtoast('请输入手机号码');
|
|
|
874
|
- return
|
|
|
875
|
- } else if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) {
|
|
|
876
|
- this.showtoast('手机号码有误');
|
|
|
877
|
- return
|
|
|
878
|
- }
|
|
|
879
|
// if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
|
904
|
// if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
|
880
|
// this.showtoast('请输入正确邮箱');
|
905
|
// this.showtoast('请输入正确邮箱');
|
881
|
// return
|
906
|
// return
|
|
@@ -908,7 +933,6 @@ Page({ |
|
@@ -908,7 +933,6 @@ Page({ |
908
|
// this.setData({
|
933
|
// this.setData({
|
909
|
// card_number: new_ard_num,
|
934
|
// card_number: new_ard_num,
|
910
|
// })
|
935
|
// })
|
911
|
- this.goCommit(formdata);
|
|
|
912
|
},
|
936
|
},
|
913
|
|
937
|
|
914
|
goCommit: function(data) {
|
938
|
goCommit: function(data) {
|
|
@@ -920,8 +944,6 @@ Page({ |
|
@@ -920,8 +944,6 @@ Page({ |
920
|
var request_current_address = that.getCurrentAddressRequest()
|
944
|
var request_current_address = that.getCurrentAddressRequest()
|
921
|
var request_birth_address = that.getBirthAddressRequest()
|
945
|
var request_birth_address = that.getBirthAddressRequest()
|
922
|
var Authorization = app.globalData.Authorization;
|
946
|
var Authorization = app.globalData.Authorization;
|
923
|
- console.log('long_birth_date', that.data.long_birth_date)
|
|
|
924
|
-
|
|
|
925
|
wx.request({
|
947
|
wx.request({
|
926
|
url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id,
|
948
|
url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id,
|
927
|
method: "PUT",
|
949
|
method: "PUT",
|
|
@@ -1079,7 +1101,7 @@ Page({ |
|
@@ -1079,7 +1101,7 @@ Page({ |
1079
|
var gender = this.data.genderData.selected;
|
1101
|
var gender = this.data.genderData.selected;
|
1080
|
var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000;
|
1102
|
var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000;
|
1081
|
console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date)
|
1103
|
console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date)
|
1082
|
- if (this.data.taxInfo.certification_status == 'active'||(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)) {
|
1104
|
+ 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)) {
|
1083
|
return 'active'
|
1105
|
return 'active'
|
1084
|
} else {
|
1106
|
} else {
|
1085
|
return ''
|
1107
|
return ''
|