正在显示
12 个修改的文件
包含
222 行增加
和
84 行删除
images/error.png
0 → 100644
2.7 KB
... | ... | @@ -21,7 +21,7 @@ Page({ |
21 | 21 | const iv = e.detail.iv; |
22 | 22 | const encryptedData = e.detail.encryptedData; |
23 | 23 | console.log('getPhoneNumber' ,e) |
24 | - if (e.detail.errMsg == 'getPhoneNumber:fail user deny') { | |
24 | + if (!iv || iv.length < 1 || !encryptedData || encryptedData.length<1) { | |
25 | 25 | wx.showModal({ |
26 | 26 | title: '提示', |
27 | 27 | showCancel: false, |
... | ... | @@ -40,12 +40,13 @@ Page({ |
40 | 40 | wx.request({ |
41 | 41 | url: baseUrl + "uaa/v1/users/op/bind-mobile", |
42 | 42 | data: { |
43 | - "mobile": '13691224349',//必传,随便写一个 | |
43 | + "mobile": '15071421900',//必传,随便写一个 | |
44 | 44 | "sms_code": '1234',//必传,随便写一个 |
45 | 45 | "wx_open_id": app.globalData.wx_open_id, //可选,如果传了,绑定到对应的微信号 |
46 | 46 | "tenant_id": app.globalData.tenant_id, |
47 | 47 | "source": "wx_app::" + phone + ":" + iv, |
48 | - "scope": "expert" | |
48 | + "scope": "end_user", | |
49 | + "app_id": app.globalData.appId | |
49 | 50 | }, |
50 | 51 | method: "POST", |
51 | 52 | header: { |
... | ... | @@ -71,6 +72,7 @@ Page({ |
71 | 72 | } else { |
72 | 73 | wx.showToast({ |
73 | 74 | title: '登录失败,请重新登录', |
75 | + image: "/images/error.png" | |
74 | 76 | }) |
75 | 77 | } |
76 | 78 | }, | ... | ... |
... | ... | @@ -36,6 +36,7 @@ Page({ |
36 | 36 | console.log("mobile---", mobile); |
37 | 37 | if (!regMobile.test(mobile)) { |
38 | 38 | wx.showToast({ |
39 | + image: "/images/error.png", | |
39 | 40 | title: '手机号有误!' |
40 | 41 | }) |
41 | 42 | return; |
... | ... | @@ -98,7 +99,8 @@ Page({ |
98 | 99 | "wx_open_id": that.data.wx_open_id, //可选,如果传了,绑定到对应的微信号 |
99 | 100 | "tenant_id": that.data.tenant_id, |
100 | 101 | "source": "wx_app", |
101 | - "scope": "end_user" | |
102 | + "scope": "end_user", | |
103 | + "app_id": app.globalData.appId | |
102 | 104 | }, |
103 | 105 | method: "POST", |
104 | 106 | header: { |
... | ... | @@ -121,6 +123,7 @@ Page({ |
121 | 123 | }) |
122 | 124 | } else { |
123 | 125 | wx.showToast({ |
126 | + image: "/images/error.png", | |
124 | 127 | title: '请重新登录', |
125 | 128 | }) |
126 | 129 | } | ... | ... |
... | ... | @@ -158,6 +158,7 @@ Page({ |
158 | 158 | placeholder: '请选择出生日期', |
159 | 159 | mode: "date", |
160 | 160 | fields: "day", |
161 | + start: '1949-01-01', | |
161 | 162 | onChange: 'birthdayChange', |
162 | 163 | }, |
163 | 164 | startDate: { |
... | ... | @@ -167,6 +168,7 @@ Page({ |
167 | 168 | placeholder: '请选择受雇日期', |
168 | 169 | mode: "date", |
169 | 170 | fields: "day", |
171 | + start: '1990-01-01', | |
170 | 172 | onChange: 'startChange', |
171 | 173 | }, |
172 | 174 | endDate: { |
... | ... | @@ -176,6 +178,7 @@ Page({ |
176 | 178 | placeholder: '请选择离职日期', |
177 | 179 | mode: "date", |
178 | 180 | fields: "day", |
181 | + start: '2010-01-01', | |
179 | 182 | onChange: 'endChange', |
180 | 183 | }, |
181 | 184 | // 地址选择器 |
... | ... | @@ -214,10 +217,19 @@ Page({ |
214 | 217 | * 生命周期函数--监听页面加载 |
215 | 218 | */ |
216 | 219 | onLoad: function(options) { |
220 | + this.handleData() | |
217 | 221 | this.getproffessiondata() |
218 | 222 | this.getbanklist() |
219 | 223 | }, |
220 | 224 | |
225 | + handleData:function(){ | |
226 | + var curdate = format.curDateTime() | |
227 | + console.log('curdate', curdate) | |
228 | + this.data.birthDate.end = curdate | |
229 | + this.data.startDate.end = curdate | |
230 | + this.data.endDate.end = curdate | |
231 | + }, | |
232 | + | |
221 | 233 | getproffessiondata: function() { |
222 | 234 | var that = this |
223 | 235 | var Authorization = app.globalData.Authorization; |
... | ... | @@ -362,11 +374,11 @@ Page({ |
362 | 374 | that.data.birthDate.selected = birth_day |
363 | 375 | |
364 | 376 | if (that.data.name.length > 0 && id_info.name != that.data.name){ |
365 | - that.showtoast("证照与所填姓名冲突") | |
377 | + that.showtoast("姓名冲突") | |
366 | 378 | return |
367 | 379 | } |
368 | 380 | if (that.data.card_number.length > 0 && id_info.card_number != that.data.id_card_no) { |
369 | - that.showtoast("证照与所填证照号码冲突") | |
381 | + that.showtoast("证照号码冲突") | |
370 | 382 | return |
371 | 383 | } |
372 | 384 | that.setData({ |
... | ... | @@ -603,6 +615,8 @@ Page({ |
603 | 615 | // var pro_index = this.data.profession_index |
604 | 616 | // var profession_datas = this.data.professionData.values[pro_index[pro_index[0]]][0] |
605 | 617 | // console.log('profession_datas', profession_datas) |
618 | + // var regMoney = /^[0-9]*(/.[0-9]{1,2})?$/; | |
619 | + var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/; | |
606 | 620 | var regMobile = /^1[3|4|5|7|8][0-9]{9}$/; |
607 | 621 | var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/; |
608 | 622 | var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); |
... | ... | @@ -610,46 +624,61 @@ Page({ |
610 | 624 | console.log("formdata", formdata); |
611 | 625 | console.log('idnum', this.data.card_number.length < 1&&!format.isIDCardNum(formdata.id_card_no)) |
612 | 626 | if (formdata.name.length < 1) { |
613 | - this.showtoast('请输入姓名'); | |
627 | + this.showtoast('有必填项未填写'); | |
614 | 628 | return |
615 | 629 | } else if (!regname.test(formdata.name)) { |
616 | 630 | this.showtoast('请输入正确姓名'); |
617 | 631 | return |
618 | 632 | } else if (this.data.relativeData.selected.length < 1) { |
619 | - this.showtoast('请选择成员关系'); | |
633 | + this.showtoast('有必填项未填写'); | |
620 | 634 | return |
621 | 635 | } else if (this.data.personstatusData.selected.length < 1) { |
622 | - this.showtoast('请选择纳税人状态'); | |
636 | + this.showtoast('有必填项未填写'); | |
623 | 637 | return |
624 | 638 | } else if (this.data.cardtypeData.selected.length < 1) { |
625 | - this.showtoast('请选择证照类型'); | |
639 | + this.showtoast('有必填项未填写'); | |
626 | 640 | return |
627 | - } else if (this.data.isIdCard && (this.data.card_number.length < 1 && !format.isIDCardNum(formdata.id_card_no))) { | |
628 | - this.showtoast('请填写有效证件号'); | |
641 | + } else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) { | |
642 | + this.showtoast('有必填项未填写'); | |
629 | 643 | return |
630 | - } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) { | |
631 | - this.showtoast('请输入证件号码'); | |
644 | + } else if (this.data.isIdCard &&!format.isIDCardNum(formdata.id_card_no)) { | |
645 | + this.showtoast('证件号码有误'); | |
646 | + return | |
647 | + }else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) { | |
648 | + this.showtoast('有必填项未填写'); | |
632 | 649 | return |
633 | 650 | } else if (formdata.mobile.length < 1) { |
634 | - this.showtoast('请输入手机号'); | |
651 | + this.showtoast('有必填项未填写'); | |
635 | 652 | return |
636 | 653 | } else if (!regMobile.test(formdata.mobile)){ |
637 | 654 | this.showtoast('请输入正确手机号'); |
638 | 655 | return |
639 | 656 | } else if (this.data.investInfo.selected.length < 1) { |
640 | - this.showtoast('请选择是否股东投资者'); | |
657 | + this.showtoast('有必填项未填写'); | |
641 | 658 | return |
642 | 659 | } else if (this.data.specificIndustryInfo.selected.length < 1) { |
643 | - this.showtoast('请选择是否特定行业'); | |
660 | + this.showtoast('有必填项未填写'); | |
644 | 661 | return |
645 | 662 | } else if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)){ |
646 | - this.showtoast('请输入正确的邮箱'); | |
663 | + this.showtoast('请输入正确邮箱'); | |
664 | + return | |
665 | + } else if (formdata.company_equity_total && formdata.company_equity_total.length > 0 && !regMoney.test(formdata.company_equity_total)) { | |
666 | + this.showtoast('请输入正确金额'); | |
667 | + return | |
668 | + } else if (formdata.personal_equity_total && formdata.personal_equity_total.length > 0 && !regMoney.test(formdata.personal_equity_total)) { | |
669 | + this.showtoast('请输入正确金额'); | |
647 | 670 | return |
648 | 671 | } |
649 | 672 | var new_card_num = '' |
650 | - if (this.data.isIdCard && this.data.card_number.length > 0) { | |
651 | - new_card_num = this.data.card_number | |
673 | + if (this.data.isIdCard) { | |
674 | + if (this.data.card_number.length > 0) { | |
675 | + new_card_num = this.data.card_number | |
676 | + } | |
677 | + if (formdata.id_card_no.length > 0) { | |
678 | + new_card_num = formdata.id_card_no | |
679 | + } | |
652 | 680 | } |
681 | + | |
653 | 682 | if (!this.data.isIdCard && formdata.id_card_no && formdata.id_card_no.length > 0) { |
654 | 683 | new_card_num = formdata.id_card_no |
655 | 684 | } |
... | ... | @@ -727,8 +756,8 @@ Page({ |
727 | 756 | "email": formdata.email, |
728 | 757 | "bank": that.data.bankInfo.selected, |
729 | 758 | "bank_account": formdata.bank_account, |
730 | - "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : 0, | |
731 | - "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : 0, | |
759 | + "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : null, | |
760 | + "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : null, | |
732 | 761 | "is_employee": that.data.employeeInfo.selected, |
733 | 762 | "is_specific_profession": that.data.specificIndustryInfo.selected, |
734 | 763 | "is_investor": that.data.investInfo.selected, |
... | ... | @@ -743,9 +772,17 @@ Page({ |
743 | 772 | }, |
744 | 773 | success: function(res) { |
745 | 774 | console.log(res) |
746 | - wx.redirectTo({ | |
747 | - url: '../home/home', | |
748 | - }) | |
775 | + if(res.statusCode==200){ | |
776 | + wx.redirectTo({ | |
777 | + url: '../home/home', | |
778 | + }) | |
779 | + } else { | |
780 | + wx.showModal({ | |
781 | + title: res.data.message, | |
782 | + content: '', | |
783 | + }) | |
784 | + } | |
785 | + | |
749 | 786 | }, |
750 | 787 | fail(res) { |
751 | 788 | console.log(res) |
... | ... | @@ -756,6 +793,8 @@ Page({ |
756 | 793 | showtoast: function(title) { |
757 | 794 | wx.showToast({ |
758 | 795 | title: title, |
796 | + duration:2000, | |
797 | + image: '/images/error.png' | |
759 | 798 | }) |
760 | 799 | }, |
761 | 800 | ... | ... |
... | ... | @@ -323,8 +323,8 @@ |
323 | 323 | <text class='text_333_28 float_right'></text> |
324 | 324 | </view> --> |
325 | 325 | <template is="picker_cell_normal" data="{{...investpersonalInfo}}" /> |
326 | - <view class="divide_line" hidden="{{investpersonalInfo.selected=='否'}}"></view> | |
327 | - <view class='item_body' hidden="{{investpersonalInfo.selected=='否'}}"> | |
326 | + <view class="divide_line" ></view> | |
327 | + <view class='item_body' > | |
328 | 328 | <text class='text_666_28 float_left'>个人投资总额</text> |
329 | 329 | <input class='input_wrap float_right' name='personal_equity_total' type='digit' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='20'></input> |
330 | 330 | </view> | ... | ... |
... | ... | @@ -33,9 +33,8 @@ Page({ |
33 | 33 | isrequre: true, |
34 | 34 | label: '关系', |
35 | 35 | bindtype: 'relative', |
36 | - placeholder: '', | |
36 | + placeholder: '请选择亲属关系', | |
37 | 37 | selected: '', |
38 | - disabled: true, | |
39 | 38 | values: ["子女", "配偶"], |
40 | 39 | onChange: 'onPickerSelect' |
41 | 40 | }, |
... | ... | @@ -255,6 +254,7 @@ Page({ |
255 | 254 | console.log('taxInfo', res) |
256 | 255 | that.setData({ |
257 | 256 | taxInfo: res.data, |
257 | + // isself: '魏先森' != res.data.name ? false : true | |
258 | 258 | isself: res.data.family_ties ? false : true |
259 | 259 | }) |
260 | 260 | that.handleDatas() |
... | ... | @@ -277,7 +277,14 @@ Page({ |
277 | 277 | |
278 | 278 | var tax_info = this.data.taxInfo |
279 | 279 | this.data.name = tax_info.name |
280 | - this.data.relativeData.placeholder = tax_info.family_ties | |
280 | + if(this.data.isself){ | |
281 | + this.data.relativeData.disabled = true | |
282 | + this.data.relativeData.placeholder = tax_info.family_ties | |
283 | + }else{ | |
284 | + this.data.relativeData.disabled = false | |
285 | + this.data.relativeData.selected = tax_info.family_ties | |
286 | + } | |
287 | + | |
281 | 288 | this.data.personstatusData.selected = tax_info.taxpayer_status |
282 | 289 | |
283 | 290 | this.data.cardtypeData.selected = tax_info.id_card_type |
... | ... | @@ -287,11 +294,20 @@ Page({ |
287 | 294 | this.data.specificIndustryInfo.selected = tax_info.is_specific_profession |
288 | 295 | //非必填 |
289 | 296 | this.data.genderData.selected = tax_info.gender |
290 | - this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date) | |
297 | + if (tax_info.birth_date>1000){ | |
298 | + this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date) | |
299 | + } | |
300 | + if (tax_info.join_date > 1000) { | |
301 | + this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date) | |
302 | + } | |
303 | + if (tax_info.separate_date > 1000) { | |
304 | + this.data.endDate.selected = format.yearFormString(tax_info.separate_date) + '-' + format.monthFormString(tax_info.separate_date) + '-' + format.dayFormString(tax_info.separate_date) | |
305 | + } | |
306 | + | |
291 | 307 | this.data.professionData.selected = tax_info.profession.three_level_name |
292 | - this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date) | |
308 | + | |
309 | + this.data.birthDate.end = curdate | |
293 | 310 | this.data.startDate.end = curdate |
294 | - this.data.endDate.selected = format.yearFormString(tax_info.separate_date) + '-' + format.monthFormString(tax_info.separate_date) + '-' + format.dayFormString(tax_info.separate_date) | |
295 | 311 | this.data.endDate.end = curdate |
296 | 312 | this.data.degreeData.selected = tax_info.education |
297 | 313 | this.data.disabilityInfo.selected = tax_info.is_disability |
... | ... | @@ -487,12 +503,12 @@ Page({ |
487 | 503 | that.data.birthDate.selected = birth_day |
488 | 504 | |
489 | 505 | if (that.data.name.length > 0 && id_info.name != that.data.name) { |
490 | - that.showtoast("证照与所填姓名冲突") | |
506 | + that.showtoast("姓名冲突") | |
491 | 507 | id_error = true |
492 | 508 | return |
493 | 509 | } |
494 | 510 | if (that.data.card_number.length > 0 && id_info.card_number != that.data.id_card_no) { |
495 | - that.showtoast("证照与所填证照号码冲突") | |
511 | + that.showtoast("证照号码冲突") | |
496 | 512 | id_error = true |
497 | 513 | return |
498 | 514 | } |
... | ... | @@ -528,7 +544,6 @@ Page({ |
528 | 544 | isshow02: !this.data.isshow02 |
529 | 545 | }) |
530 | 546 | } else if ("3" == e.target.id) { |
531 | - console.log('isshow03', this.data.isshow03) | |
532 | 547 | this.setData({ |
533 | 548 | isshow03: !this.data.isshow03 |
534 | 549 | }) |
... | ... | @@ -742,40 +757,54 @@ Page({ |
742 | 757 | formSubmit: function(e) { |
743 | 758 | console.log("date", Date.parse(new Date(this.data.birthday)) / 1000) |
744 | 759 | var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); |
760 | + var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/; | |
761 | + var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/; | |
745 | 762 | var formdata = e.detail.value; |
746 | 763 | console.log("formdata", formdata) |
747 | 764 | console.log("card_number", this.data.card_number) |
748 | 765 | if (this.data.name && this.data.name.length < 1 && formdata.name.length < 1) { |
749 | - this.showtoast('请输入姓名'); | |
766 | + this.showtoast('有必填项未填写'); | |
767 | + return | |
768 | + } else if (!regname.test(formdata.name)) { | |
769 | + this.showtoast('请输入正确姓名'); | |
750 | 770 | return |
751 | 771 | } |
752 | - // else if (!this.data.isself && this.data.relativeData.placeholder.length < 1) { | |
753 | - // this.showtoast('请选择成员关系'); | |
754 | - // return | |
755 | - // } | |
772 | + else if (!this.data.isself && this.data.relativeData.placeholder.length < 1) { | |
773 | + this.showtoast('有必填项未填写'); | |
774 | + return | |
775 | + } | |
756 | 776 | else if (this.data.personstatusData.selected.length < 1) { |
757 | - this.showtoast('请选择纳税人状态'); | |
777 | + this.showtoast('有必填项未填写'); | |
758 | 778 | return |
759 | 779 | } else if (this.data.cardtypeData.selected.length < 1) { |
760 | - this.showtoast('请选择证照类型'); | |
780 | + this.showtoast('有必填项未填写'); | |
761 | 781 | return |
762 | - } else if (this.data.isIdCard && this.data.card_number.length < 1) { | |
763 | - this.showtoast('请上传有效证件照片'); | |
782 | + } else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) { | |
783 | + this.showtoast('有必填项未填写'); | |
784 | + return | |
785 | + } else if (this.data.isIdCard && !format.isIDCardNum(formdata.id_card_no)) { | |
786 | + this.showtoast('证件号码有误'); | |
764 | 787 | return |
765 | 788 | } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) { |
766 | - this.showtoast('请输入证件号码'); | |
789 | + this.showtoast('有必填项未填写'); | |
767 | 790 | return |
768 | - } else if (formdata.mobile.length < 1) { | |
769 | - this.showtoast('请输入联系电话'); | |
791 | + } else if (formdata.mobile.length < 1) { | |
792 | + this.showtoast('有必填项未填写'); | |
770 | 793 | return |
771 | 794 | } else if (this.data.investInfo.selected.length < 1) { |
772 | - this.showtoast('请选择是否股东投资者'); | |
795 | + this.showtoast('有必填项未填写'); | |
773 | 796 | return |
774 | 797 | } else if (this.data.specificIndustryInfo.selected.length < 1) { |
775 | - this.showtoast('请选择是否特定行业'); | |
798 | + this.showtoast('有必填项未填写'); | |
776 | 799 | return |
777 | 800 | } else if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) { |
778 | - this.showtoast('请输入正确的邮箱'); | |
801 | + this.showtoast('请输入正确邮箱'); | |
802 | + return | |
803 | + } else if (formdata.company_equity_total && formdata.company_equity_total.length > 0 && !regMoney.test(formdata.company_equity_total)) { | |
804 | + this.showtoast('请输入正确金额'); | |
805 | + return | |
806 | + } else if (formdata.personal_equity_total && formdata.personal_equity_total.length > 0 && !regMoney.test(formdata.personal_equity_total)) { | |
807 | + this.showtoast('请输入正确金额'); | |
779 | 808 | return |
780 | 809 | } |
781 | 810 | var new_ard_num = '' |
... | ... | @@ -804,7 +833,7 @@ Page({ |
804 | 833 | url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id, |
805 | 834 | method: "PUT", |
806 | 835 | data: { |
807 | - "name": that.data.name.length > 0 ? that.data.name : form_data.name, | |
836 | + "name": formdata.name.length > 0 ? formdata.name:that.data.name , | |
808 | 837 | "family_ties": that.data.relativeData.selected, |
809 | 838 | "native": "中国", |
810 | 839 | "id_card_type": that.data.cardtypeData.selected, |
... | ... | @@ -848,9 +877,16 @@ Page({ |
848 | 877 | }, |
849 | 878 | success: function(res) { |
850 | 879 | console.log(res) |
851 | - wx.reLaunch({ | |
852 | - url: '../home/home', | |
853 | - }) | |
880 | + if (res.statusCode == 200) { | |
881 | + wx.reLaunch({ | |
882 | + url: '../home/home', | |
883 | + }) | |
884 | + } else { | |
885 | + wx.showModal({ | |
886 | + title: res.data.message, | |
887 | + content: '', | |
888 | + }) | |
889 | + } | |
854 | 890 | }, |
855 | 891 | fail(res) { |
856 | 892 | console.log(res) |
... | ... | @@ -928,6 +964,8 @@ Page({ |
928 | 964 | showtoast: function(str) { |
929 | 965 | wx.showToast({ |
930 | 966 | title: str, |
967 | + duration: 2000, | |
968 | + image:'/images/error.png' | |
931 | 969 | }) |
932 | 970 | }, |
933 | 971 | ... | ... |
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <view class='item_body'> |
14 | 14 | <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> |
15 | 15 | <text class='text_black_28 float_left'>姓名</text> |
16 | - <input class='input_wrap float_right' placeholder="{{name?name:'请填写姓名'}}" name='name' disabled='true'></input> | |
16 | + <input class='input_wrap float_right' placeholder='请填写姓名' name='name' disabled='{{isself}}' value='{{name}}'></input> | |
17 | 17 | </view> |
18 | 18 | <view class="divide_line"></view> |
19 | 19 | <!-- <view class='item_body' bindtap='openpicker'> |
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | <view class='item_body' hidden="{{!isself}}"> |
47 | 47 | <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> |
48 | 48 | <text class='text_black_28 float_left'>姓名</text> |
49 | - <input class='input_wrap float_right' placeholder="{{name?name:'请填写姓名'}}"disabled='true'></input> | |
49 | + <input class='input_wrap float_right' placeholder-class='text_999_28' placeholder="{{name?name:'请填写姓名'}}" disabled='true' ></input> | |
50 | 50 | </view> |
51 | 51 | <view class="divide_line"></view> |
52 | 52 | |
... | ... | @@ -75,15 +75,16 @@ |
75 | 75 | <template is="picker_cell_normal" data="{{...cardtypeData}}" /> |
76 | 76 | <view class="divide_line"></view> |
77 | 77 | |
78 | - <view class='item_body' bindtap='getIdInfo'> | |
78 | + <view class='item_body'> | |
79 | 79 | <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> |
80 | 80 | <text class='text_black_28 float_left'>证照号码</text> |
81 | - <view wx:if="{{isIdCard}}"> | |
82 | - <image class='image_camera float_right' src='/images/camera.png'></image> | |
83 | - <text class='text_333_28 float_right'>{{card_number}}</text> | |
81 | + <view wx:if="{{isIdCard}}" > | |
82 | + <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo'></image> | |
83 | + <!-- <text class='text_333_28 float_right'>{{card_number}}</text> --> | |
84 | + <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_999_28' name='id_card_no' maxlength='24' value='{{card_number}}'></input> | |
84 | 85 | </view> |
85 | 86 | <view wx:else> |
86 | - <input class='input_wrap float_right' placeholder='请输入证件号码' value='{{card_number}}' name='id_card_no' maxlength='24'></input> | |
87 | + <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_999_28' name='id_card_no' maxlength='24' value='{{card_number}}'></input> | |
87 | 88 | </view> |
88 | 89 | </view> |
89 | 90 | <view class="divide_line"></view> |
... | ... | @@ -323,8 +324,8 @@ |
323 | 324 | <text class='text_333_28 float_right '></text> |
324 | 325 | </view> --> |
325 | 326 | <template is="picker_cell_normal" data="{{...investpersonalInfo}}" /> |
326 | - <view class="divide_line" hidden="{{investpersonalInfo.selected=='否'}}"></view> | |
327 | - <view class='item_body ' hidden="{{investpersonalInfo.selected=='否'}}"> | |
327 | + <view class="divide_line" ></view> | |
328 | + <view class='item_body' > | |
328 | 329 | <text class='text_666_28 float_left '>个人投资总额</text> |
329 | 330 | <input class='input_wrap float_right ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='20'></input> |
330 | 331 | </view> | ... | ... |
... | ... | @@ -7,7 +7,7 @@ Page({ |
7 | 7 | * 页面的初始数据 |
8 | 8 | */ |
9 | 9 | data: { |
10 | - load_finish:false, | |
10 | + load_finish: false, | |
11 | 11 | text_tip: "去完善", |
12 | 12 | taxlist: [''] |
13 | 13 | }, |
... | ... | @@ -17,7 +17,7 @@ Page({ |
17 | 17 | */ |
18 | 18 | onLoad: function(options) { |
19 | 19 | console.log('onLoad') |
20 | - | |
20 | + | |
21 | 21 | }, |
22 | 22 | |
23 | 23 | /** |
... | ... | @@ -31,7 +31,7 @@ Page({ |
31 | 31 | * 生命周期函数--监听页面显示 |
32 | 32 | */ |
33 | 33 | onShow: function() { |
34 | - | |
34 | + | |
35 | 35 | console.log('onShow') |
36 | 36 | this.getTaxList() |
37 | 37 | }, |
... | ... | @@ -57,35 +57,83 @@ Page({ |
57 | 57 | 'all': true |
58 | 58 | }, |
59 | 59 | success: function(res) { |
60 | - console.log(res.data) | |
61 | - that.setData({ | |
62 | - taxlist: res.data.items | |
63 | - }) | |
64 | - if (res.data.items && res.data.items.length > 0) { | |
65 | - that.getStatus(res.data.items) | |
60 | + console.log('succ',res) | |
61 | + if(res.statusCode ==200){ | |
62 | + that.handleData(res.data); | |
63 | + }else{ | |
64 | + wx.showModal({ | |
65 | + title: res.data.message, | |
66 | + content: '', | |
67 | + showCancel:false, | |
68 | + success: function (res) { | |
69 | + if (res.confirm) { | |
70 | + console.log('用户点击确定') | |
71 | + wx.redirectTo({ | |
72 | + url: '../../getPhone/getPhone', | |
73 | + }) | |
74 | + } else if (res.cancel) { | |
75 | + console.log('用户点击取消') | |
76 | + } | |
77 | + } | |
78 | + }) | |
66 | 79 | } |
67 | 80 | }, |
68 | 81 | fail(res) { |
69 | 82 | console.log(res.data) |
70 | 83 | }, |
71 | - complete(){ | |
84 | + complete() { | |
72 | 85 | wx.hideLoading() |
73 | 86 | that.setData({ |
74 | - load_finish:true | |
87 | + load_finish: true | |
75 | 88 | }) |
76 | 89 | } |
77 | 90 | }) |
78 | 91 | }, |
79 | 92 | |
93 | + handleData: function(data) { | |
94 | + if (data.items && data.items.length > 0) { | |
95 | + var datalist = [] | |
96 | + | |
97 | + for (var i = 0; i < data.items.length; i++) { | |
98 | + data.items[i].newmobile = this.formatMobile(data.items[i].mobile) | |
99 | + data.items[i].newidnum = this.formatIdNum(data.items[i].id_card_no) | |
100 | + datalist.push(data.items[i]) | |
101 | + } | |
102 | + this.setData({ | |
103 | + taxlist: datalist | |
104 | + }) | |
105 | + this.getStatus(datalist) | |
106 | + } | |
107 | + console.log('handleData', this.data.taxlist) | |
108 | + }, | |
109 | + | |
110 | + formatMobile: function(mobile) { | |
111 | + if (mobile && mobile > 7) { | |
112 | + return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); | |
113 | + } else { | |
114 | + return mobile | |
115 | + } | |
116 | + }, | |
117 | + | |
118 | + formatIdNum: function(idnum) { | |
119 | + if (idnum && idnum.length >= 6 && idnum.length < 10) { | |
120 | + return idnum.substring(0, 2) + '****' + idnum.substring(idnum.length - 2, idnum.length); | |
121 | + } else if (idnum.length >= 10) { | |
122 | + return idnum.substring(0, 4) + '****' + idnum.substring(idnum.length - 4, idnum.length); | |
123 | + } else { | |
124 | + return idnum | |
125 | + } | |
126 | + }, | |
127 | + | |
80 | 128 | getStatus: function(data) { |
81 | - console.log('data', data ) | |
129 | + console.log('data', data) | |
82 | 130 | if (data[0].family_ties.length < 1 && data[0].name.length > 0 && data[0].taxpayer_status.length > 0 && data[0].id_card_type.length > 0 && data[0].id_card_no.length > 0 && data[0].mobile.length > 0 && data[0].is_investor.length > 0 && data[0].is_specific_profession.length > 0) { |
83 | 131 | this.setData({ |
84 | 132 | text_tip: '去查看' |
85 | 133 | }) |
86 | 134 | } else { |
87 | 135 | this.setData({ |
88 | - text_tip: '去完善' | |
136 | + text_tip: ' 尚未录入个人信息,立即完善' | |
89 | 137 | }) |
90 | 138 | } |
91 | 139 | }, | ... | ... |
... | ... | @@ -25,10 +25,10 @@ |
25 | 25 | </view> |
26 | 26 | <view style='padding:0 15px'> |
27 | 27 | <image class='phone_image_wrap' src='/images/phone.png'></image> |
28 | - <text class='text_white_22'>{{item.mobile}}</text> | |
28 | + <text class='text_white_22'>{{item.newmobile&&item.newmobile.length>0?item.newmobile:"未录入手机号码"}}</text> | |
29 | 29 | <text style='margin:0rpx 20rpx;color:#fff;font-size: 20rpx;'>|</text> |
30 | 30 | <image class='id_image_wrap' src='/images/id.png'></image> |
31 | - <text class='text_white_22'>{{item.id_card_no}}</text> | |
31 | + <text class='text_white_22'>{{item.newidnum&&item.newidnum.length>0?item.newidnum:"未录入证件号码 "}}</text> | |
32 | 32 | </view> |
33 | 33 | </view> |
34 | 34 | <view class='rectangle_solid_bg' bindtap='goedit' id='{{item.id}}'> | ... | ... |
... | ... | @@ -110,6 +110,7 @@ Page({ |
110 | 110 | 'success_action_status': '200', |
111 | 111 | }, |
112 | 112 | success: function(res) { |
113 | + console.log('uploadFile',res.data) | |
113 | 114 | if (res.statusCode == 200) { |
114 | 115 | var data = JSON.parse(res.data) |
115 | 116 | console.log('上传成功', res) |
... | ... | @@ -136,17 +137,20 @@ Page({ |
136 | 137 | confirmColor: '#4E8FE7' |
137 | 138 | }) |
138 | 139 | } |
140 | + wx.hideLoading() | |
139 | 141 | }, |
140 | 142 | fail: function(err) { |
143 | + console.log('fail', err) | |
141 | 144 | wx.showModal({ |
142 | 145 | title: '上传失败', |
143 | 146 | content: '图片上传失败,请重新上传', |
144 | 147 | showCancel: false, |
145 | 148 | confirmColor: '#4E8FE7' |
146 | 149 | }) |
150 | + wx.hideLoading() | |
147 | 151 | }, |
148 | 152 | complete(res){ |
149 | - console.log('complete', res.data) | |
153 | + console.log('complete', res) | |
150 | 154 | wx.hideLoading() |
151 | 155 | } |
152 | 156 | }) |
... | ... | @@ -188,8 +192,8 @@ Page({ |
188 | 192 | console.log('suc', that.data.idInfo) |
189 | 193 | } else { |
190 | 194 | wx.showToast({ |
191 | - image: "/images/warn.png", | |
192 | - duration: 1000, | |
195 | + image: "/images/error.png", | |
196 | + duration: 2000, | |
193 | 197 | title: res.data.message ? res.data.message : "数据错误" |
194 | 198 | }); |
195 | 199 | } | ... | ... |
... | ... | @@ -24,8 +24,8 @@ |
24 | 24 | <text class='text_666_28 float_left'>身份证号码</text> |
25 | 25 | <text class='text_333_28 float_right'>{{idInfo.id_card_number}}</text> |
26 | 26 | </view> |
27 | - <view class="divide_line"></view> | |
28 | - <view class='item_body'> | |
27 | + <view class="divide_line" hidden='true'></view> | |
28 | + <view class='item_body' hidden='true'> | |
29 | 29 | <text class='text_666_28 float_left'>户籍所在地</text> |
30 | 30 | <text class='text_333_28 float_right'>{{idInfo.address}}</text> |
31 | 31 | </view> | ... | ... |
请
注册
或
登录
后发表评论