提交 4cb22f541bde01df370c5ba4774a34a3b26cf3a4

作者 wangyu
1 个父辈 34ada530

完善自然人相关优化

... ... @@ -61,7 +61,7 @@ App({
61 61 } else if (user && user.type == "1") {//注册用户
62 62 if (relaunch) {
63 63 wx.reLaunch({ //重新加载
64   - url: '../home/home'
  64 + url: '../main/home/home'
65 65 // url: '../../getPhone/getPhone'
66 66 })
67 67 }
... ...
1 1 {
2 2 "pages": [
3   - "pages/main/home/home",
4 3 "pages/getPhone/getPhone",
  4 + "pages/main/home/home",
  5 +
5 6 "pages/main/editinfo/editinfo",
6 7 "pages/main/addinfo/addinfo",
7 8 "pages/main/idinfo/idinfo",
... ...
... ... @@ -17,15 +17,16 @@ Page({
17 17 isIdCard: true,
18 18 name: '',
19 19 card_number: '',
20   - birthday:'',
21   - formData:{},
22   - requestBody:{},
  20 + birthday: '',
  21 + requestBody: {},
  22 + disabledName:false,
23 23
24 24 relativeData: {
25 25 isrequre: true,
26 26 label: '关系',
27 27 bindtype: 'relative',
28   - selected:'',
  28 + selected: '',
  29 + disabled: false,
29 30 placeholder: '请选择关系',
30 31 values: ["子女", "配偶"],
31 32 onChange: 'onPickerSelect'
... ... @@ -55,7 +56,7 @@ Page({
55 56 label: '是否境外人员',
56 57 bindtype: 'forigner',
57 58 selected: '否',
58   - disabled:true,
  59 + disabled: true,
59 60 values: ["否", "是"],
60 61 onChange: 'onPickerSelect'
61 62 },
... ... @@ -181,6 +182,8 @@ Page({
181 182 contactaddressInfo: {
182 183 label: '联系地址',
183 184 mode: 'region',
  185 + address_code: ['', '', ''],
  186 + address_value: ['', '', ''],
184 187 selected: '',
185 188 placeholder: '请选择联系地址',
186 189 onChange: 'contactAddressSelect'
... ... @@ -188,6 +191,8 @@ Page({
188 191 currentaddressInfo: {
189 192 label: '居住地',
190 193 mode: 'region',
  194 + address_code:['','',''],
  195 + address_value:['','',''],
191 196 selected: '',
192 197 placeholder: '请选择居住地',
193 198 onChange: 'currentAddressSelect'
... ... @@ -195,6 +200,8 @@ Page({
195 200 birthaddressInfo: {
196 201 label: '户籍所在地',
197 202 mode: 'region',
  203 + address_code: ['', '', ''],
  204 + address_value: ['', '', ''],
198 205 selected: '',
199 206 placeholder: '请选择户籍所在地',
200 207 onChange: 'birthAddressSelect'
... ... @@ -206,7 +213,7 @@ Page({
206 213 /**
207 214 * 生命周期函数--监听页面加载
208 215 */
209   - onLoad: function (options) {
  216 + onLoad: function(options) {
210 217 // console.log('options.id', options.id)
211 218 // if (!options.id || options.id.length < 0) {
212 219 // this.setData({
... ... @@ -219,7 +226,7 @@ Page({
219 226 this.getbanklist()
220 227 },
221 228
222   - getpersonalTax: function (id) {
  229 + getpersonalTax: function(id) {
223 230 var that = this
224 231 var Authorization = app.globalData.Authorization;
225 232 wx.request({
... ... @@ -229,7 +236,7 @@ Page({
229 236 'content-type': 'application/json', // 默认值
230 237 "Authorization": Authorization
231 238 },
232   - success: function (res) {
  239 + success: function(res) {
233 240 console.log(res)
234 241 that.setData({
235 242 taxInfo: res.data,
... ... @@ -242,7 +249,7 @@ Page({
242 249 })
243 250 },
244 251
245   - getproffessiondata: function () {
  252 + getproffessiondata: function() {
246 253 var that = this
247 254 var Authorization = app.globalData.Authorization;
248 255 var proffession_info = that.data.professionData
... ... @@ -253,7 +260,7 @@ Page({
253 260 'content-type': 'application/json', // 默认值
254 261 "Authorization": Authorization
255 262 },
256   - success: function (res) {
  263 + success: function(res) {
257 264 console.log('proffessiondata', res.data)
258 265 proffession_info.values = that.handleProfession(res.data.items)
259 266 that.setData({
... ... @@ -268,12 +275,14 @@ Page({
268 275 console.log('proffessionData--', that.data.professionData)
269 276 },
270 277
271   - handleProfession: function (data) {
  278 + handleProfession: function(data) {
272 279 var newdata = []
273 280 var one = []
274 281 var two = []
275 282 var three = []
276   - var oneObj = {}, twoObj = {}, threeObj = {}
  283 + var oneObj = {},
  284 + twoObj = {},
  285 + threeObj = {}
277 286 if (data && data.length > 0) {
278 287 console.log('one', one)
279 288 data.map((d, i) => {
... ... @@ -320,7 +329,7 @@ Page({
320 329 return newdata
321 330 },
322 331
323   - getbanklist: function () {
  332 + getbanklist: function() {
324 333 var that = this
325 334 var Authorization = app.globalData.Authorization;
326 335 var bank_info = that.data.bankInfo
... ... @@ -331,14 +340,16 @@ Page({
331 340 'content-type': 'application/json', // 默认值
332 341 "Authorization": Authorization
333 342 },
334   - success: function (res) {
  343 + success: function(res) {
335 344 console.log(res)
336   - bank_info.values = that.handleBankinfo(res.data.items)
  345 + if (res.data&&res.data.items&&res.data.items.length>0){
  346 + bank_info.values = that.handleBankinfo(res.data.items)
337 347
338   - that.setData({
339   - banklist: res.data.items,
340   - bankInfo: bank_info
341   - })
  348 + that.setData({
  349 + banklist: res.data.items,
  350 + bankInfo: bank_info
  351 + })
  352 + }
342 353 console.log("bankInfo", that.data.bankInfo)
343 354 },
344 355 fail(res) {
... ... @@ -347,7 +358,7 @@ Page({
347 358 })
348 359 },
349 360
350   - handleBankinfo: function (data) {
  361 + handleBankinfo: function(data) {
351 362 var bank_name = []
352 363 for (var i = 0; i < data.length; i++) {
353 364 bank_name.push(data[i].bank_name)
... ... @@ -358,33 +369,46 @@ Page({
358 369 /**
359 370 * 生命周期函数--监听页面初次渲染完成
360 371 */
361   - onReady: function () {
  372 + onReady: function() {
362 373
363 374 },
364 375
365 376 /**
366 377 * 生命周期函数--监听页面显示
367 378 */
368   - onShow: function () {
  379 + onShow: function() {
369 380 var that = this
370 381 wx.getStorage({
371 382 key: 'id_info',
372   - success: function (res) {
373   - console.log(res.data)
374   - var birth_day = res.data.birthday.year + '-' + res.data.birthday.month + '-' + res.data.birthday.day,
375   - var cardtype_Data = that.data.cardtypeData
376   - cardtype_Data.selected = res.data.id_card_number
377   - that.setData({
378   - name: res.data.name,
379   - birthday: birth_day,
380   - cardtypeData: cardtype_Data,
381   - card_number: res.data.id_card_number
382   - })
  383 + success: function(res) {
  384 + console.log('id_info', res.data)
  385 + if (res.data && res.data.id_card_number){
  386 + var id_info = JSON.parse(res.data)
  387 +
  388 + var birth_day = id_info.birthday.year + '-' + id_info.birthday.month + '-' + id_info.birthday.day;
  389 + var cardtype_Data = that.data.cardtypeData
  390 + cardtype_Data.selected = '居民身份证'
  391 + var gender_Data = that.data.genderData
  392 + gender_Data.selected = id_info.gender
  393 + that.setData({
  394 + name: id_info.name,
  395 + birthday: birth_day,
  396 + cardtypeData: cardtype_Data,
  397 + genderData: gender_Data,
  398 + card_number: id_info.id_card_number
  399 + })
  400 + }
  401 + },
  402 + })
  403 + wx.removeStorage({
  404 + key: 'id_info',
  405 + success: function(res) {
  406 + console.log('remove_idinfo',res)
383 407 },
384 408 })
385 409 },
386 410
387   - span: function (e) {
  411 + span: function(e) {
388 412 console.log(e)
389 413 if ("1" == e.target.id) {
390 414 this.setData({
... ... @@ -401,8 +425,8 @@ Page({
401 425 }
402 426
403 427 },
404   - // =============普通单列picker选中处理==============
405   - onPickerSelect: function (e) {
  428 + // =============普通单列picker选中处理==============
  429 + onPickerSelect: function(e) {
406 430 console.log('picker发送选择改变,携带值为', e)
407 431 switch (e.currentTarget.id) {
408 432 case 'relative':
... ... @@ -514,8 +538,8 @@ Page({
514 538
515 539 },
516 540
517   - // =============日期picker选中处理==============
518   - birthdayChange:function(e){
  541 + // =============日期picker选中处理==============
  542 + birthdayChange: function(e) {
519 543 var birth_date = this.data.birthDate;
520 544 birth_date.selected = e.detail.value
521 545 this.setData({
... ... @@ -524,7 +548,7 @@ Page({
524 548 })
525 549 },
526 550
527   - startChange:function(e){
  551 + startChange: function(e) {
528 552 var start_date = this.data.startDate;
529 553 start_date.selected = e.detail.value
530 554 this.setData({
... ... @@ -532,7 +556,7 @@ Page({
532 556 })
533 557 },
534 558
535   - endChange: function (e) {
  559 + endChange: function(e) {
536 560 var end_date = this.data.endDate;
537 561 end_date.selected = e.detail.value
538 562 this.setData({
... ... @@ -542,8 +566,8 @@ Page({
542 566
543 567 // =============地区picker选中处理==============
544 568
545   - contactAddressSelect:function(e){
546   - console.log('contactAddressSelect',e)
  569 + contactAddressSelect: function(e) {
  570 + console.log('contactAddressSelect', e)
547 571 var contact_address = this.data.contactaddressInfo;
548 572 contact_address.address_value = e.detail.value
549 573 contact_address.address_code = e.detail.code
... ... @@ -552,7 +576,7 @@ Page({
552 576 })
553 577 },
554 578
555   - currentAddressSelect: function (e) {
  579 + currentAddressSelect: function(e) {
556 580 console.log('currentAddressSelect', e)
557 581 var current_address = this.data.currentaddressInfo;
558 582 current_address.address_value = e.detail.value
... ... @@ -562,7 +586,7 @@ Page({
562 586 })
563 587 },
564 588
565   - birthAddressSelect: function (e) {
  589 + birthAddressSelect: function(e) {
566 590 console.log('birthAddressSelect', e)
567 591 var birth_address = this.data.birthaddressInfo;
568 592 birth_address.address_value = e.detail.value
... ... @@ -574,20 +598,19 @@ Page({
574 598
575 599 // =============其他数据选中处理==============
576 600
577   - getIdInfo: function (e) {
578   - if (this.data.isIdCard){
  601 + getIdInfo: function(e) {
  602 + if (this.data.isIdCard) {
579 603 wx.navigateTo({
580 604 url: '../idinfo/idinfo',
581   - success: function (res) { },
  605 + success: function(res) {},
582 606 })
583 607 }
584 608 },
585 609
586   - formSubmit: function (e) {
587   - console.log("date", Date.parse(new Date(this.data.birthday))/1000)
588   -
  610 + formSubmit: function(e) {
  611 + console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
  612 +
589 613 var formdata = e.detail.value;
590   - var toast_title = ''
591 614 console.log("formdata", formdata);
592 615 if (formdata.name.length < 1) {
593 616 this.showtoast('请输入姓名');
... ... @@ -601,60 +624,45 @@ Page({
601 624 } else if (this.data.cardtypeData.selected.length < 1) {
602 625 this.showtoast('请选择证照类型');
603 626 return
604   - } else if (this.data.card_number.length<1||formdata.id_card_no.length < 1) {
  627 + } else if (this.data.isIdCard && this.data.card_number.length < 1 ) {
  628 + this.showtoast('请上传有效证件照片');
  629 + return
  630 + } else if (!this.data.isIdCard&&(!formdata.id_card_no || formdata.id_card_no.length < 1)) {
605 631 this.showtoast('请输入证件号码');
606 632 return
607   - // } else if (formdata.taxpayer_no.length < 1) {
608   - // this.showtoast('请输入纳税人识别号');
609   - // return
610   - // } else if (formdata.disability_no.length < 1) {
611   - // this.showtoast('请输入残疾证号');
612   - // return
613   - // } else if (formdata.martyr_family_no.length < 1) {
614   - // this.showtoast('请输入烈属证号');
615   - // return
616 633 } else if (formdata.mobile.length < 1) {
617 634 this.showtoast('请输入联系电话');
618 635 return
619   - } else if (formdata.investInfo.selected.length < 1) {
620   - this.showtoast('请输入是否股东投资者');
  636 + } else if (this.data.investInfo.selected.length < 1) {
  637 + this.showtoast('请选择是否股东投资者');
621 638 return
622   - } else if (formdata.specificIndustryInfo.selected.length < 1) {
623   - this.showtoast('请输入是否特定行业');
  639 + } else if (this.data.specificIndustryInfo.selected.length < 1) {
  640 + this.showtoast('请选择是否特定行业');
624 641 return
625   - }
  642 + }
  643 + var new_ard_num = ''
  644 + if (this.data.isIdCard && this.data.card_number.length > 0) {
  645 + new_ard_num = this.data.card_number
  646 + }
  647 + if (!this.data.isIdCard && formdata.id_card_no && formdata.id_card_no.length >0) {
  648 + new_ard_num = formdata.id_card_no
  649 + }
626 650 this.setData({
627   - card_number: this.data.card_number.length > 0 ? this.data.card_number : formdata.id_card_no,
628   - formData:formdata
  651 + card_number: new_ard_num,
629 652 })
630   - // else if (formdata.contact_address_detail
631   - // .length < 1) {
632   - // this.showtoast('请输入联系详细地址');
633   - // return
634   - // } else if (formdata.bank_account.length < 1) {
635   - // this.showtoast('请输入银行卡号');
636   - // return
637   - // } else if (formdata.email.length < 1) {
638   - // this.showtoast('请输入邮箱');
639   - // return
640   - // } else if (formdata.current_address_detail.length < 1) {
641   - // this.showtoast('请输入居住详细地址');
642   - // return
643   - // } else if (formdata.huji_address_detail.length < 1) {
644   - // this.showtoast('请输入户籍详细地址');
645   - // return
646   - // }
647   - this.goCommit();
  653 + this.goCommit(formdata);
648 654 },
649 655
650   - goCommit: function () {
  656 + goCommit: function(data) {
651 657 var that = this
  658 + var formdata = data
  659 + console.log("form_data", formdata);
652 660 var Authorization = app.globalData.Authorization;
653 661 wx.request({
654 662 url: baseUrl + 'persontax/v1/personal-taxes',
655   - method: "GET",
  663 + method: "POST",
656 664 data: {
657   - "name": that.data.formdata.name,
  665 + "name": that.data.name.length > 0 ? that.data.name : form_data.name,
658 666 "family_ties": that.data.relativeData.selected,
659 667 "native": "中国",
660 668 "id_card_type": that.data.relativeData.selected,
... ... @@ -670,7 +678,7 @@ Page({
670 678 "three_level_name": "哲学研究人员"
671 679 },
672 680 "education": that.data.degreeData.selected,
673   - "taxpayer_no": formdata.taxpayer_no,
  681 + "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no:'',
674 682 "taxpayer_status": that.data.personstatusData.selected,
675 683 "is_martyr_family": that.data.lieshuInfo.selected,
676 684 "martyr_family_no": formdata.martyr_family_no,
... ... @@ -710,22 +718,25 @@ Page({
710 718 "email": formdata.email,
711 719 "bank": that.data.bankInfo.selected,
712 720 "bank_account": formdata.bank_account,
713   - "join_date": Date.parse(new Date(that.data.startDate.selected)) / 1000,
714   - "separate_date": Date.parse(new Date(that.data.endDate.selected)) / 1000,
  721 + "join_date": that.data.startDate.selected.length>0? Date.parse(new Date(that.data.startDate.selected)) / 1000:0,
  722 + "separate_date": that.data.endDate.selected.length>0?Date.parse(new Date(that.data.endDate.selected)) / 1000:0,
715 723 "is_employee": that.data.employeeInfo.selected,
716 724 "is_specific_profession": that.data.specificIndustryInfo.selected,
717 725 "is_investor": that.data.investInfo.selected,
718 726 "is_business_angel": that.data.investpersonalInfo.selected,
719   - "company_equity_total": formdata.company_equity_total,
720   - "personal_equity_total": formdata.personal_equity_total,
  727 + "company_equity_total": parseFloat(formdata.company_equity_total),
  728 + "personal_equity_total": parseFloat(formdata.personal_equity_total),
721 729 "employee_no": formdata.employee_no
722 730 },
723 731 header: {
724 732 'content-type': 'application/json', // 默认值
725 733 "Authorization": Authorization
726 734 },
727   - success: function (res) {
  735 + success: function(res) {
728 736 console.log(res)
  737 + wx.redirectTo({
  738 + url: '../home/home',
  739 + })
729 740 },
730 741 fail(res) {
731 742 console.log(res)
... ... @@ -733,7 +744,7 @@ Page({
733 744 })
734 745 },
735 746
736   - showtoast: function (title) {
  747 + showtoast: function(title) {
737 748 wx.showToast({
738 749 title: title,
739 750 })
... ... @@ -742,35 +753,35 @@ Page({
742 753 /**
743 754 * 生命周期函数--监听页面隐藏
744 755 */
745   - onHide: function () {
  756 + onHide: function() {
746 757
747 758 },
748 759
749 760 /**
750 761 * 生命周期函数--监听页面卸载
751 762 */
752   - onUnload: function () {
  763 + onUnload: function() {
753 764
754 765 },
755 766
756 767 /**
757 768 * 页面相关事件处理函数--监听用户下拉动作
758 769 */
759   - onPullDownRefresh: function () {
  770 + onPullDownRefresh: function() {
760 771
761 772 },
762 773
763 774 /**
764 775 * 页面上拉触底事件的处理函数
765 776 */
766   - onReachBottom: function () {
  777 + onReachBottom: function() {
767 778
768 779 },
769 780
770 781 /**
771 782 * 用户点击右上角分享
772 783 */
773   - onShareAppMessage: function () {
  784 + onShareAppMessage: function() {
774 785
775 786 }
776 787 })
\ No newline at end of file
... ...
... ... @@ -45,7 +45,7 @@
45 45 <view class='item_body' hidden="{{!isself}}">
46 46 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
47 47 <text class='text_black_28 float_left'>姓名</text>
48   - <input class='input_wrap float_right' placeholder='请填写姓名' value='{{taxInfo.name}}'></input>
  48 + <input class='input_wrap float_right' placeholder='请填写姓名' value='{{taxInfo.name}}' disabled='{{disabledName}}'></input>
49 49 </view>
50 50 <view class="divide_line"></view>
51 51
... ... @@ -79,7 +79,7 @@
79 79 <text class='text_black_28 float_left'>证照号码</text>
80 80 <view wx:if="{{isIdCard}}">
81 81 <image class='image_camera float_right' src='/images/camera.png'></image>
82   - <text class='text_333_28 float_right'>{{id_card_number}}</text>
  82 + <text class='text_333_28 float_right'>{{card_number}}</text>
83 83 </view>
84 84 <view wx:else>
85 85 <input class='input_wrap float_right' placeholder='请输入证件号码' name='id_card_no'></input>
... ...
1 1 // pages/main//editinfo/editinfo.js
  2 +var format = require('../../../utils/util.js');
2 3 var app = getApp();
3 4 var baseUrl = app.globalData.baseUrl;
4 5 Page({
... ... @@ -17,13 +18,17 @@ Page({
17 18 isself: true,
18 19 isIdCard:true,
19 20 name: '',
20   - id_card_number: '',
21   -
  21 + mobile:'',
  22 + card_number: '',
  23 + long_birth_date:0,
  24 + long_start_date: 0,
  25 + long_end_date: 0,
22 26 relativeData: {
23 27 isrequre: true,
24 28 label: '关系',
25 29 bindtype: 'relative',
26 30 placeholder: '请选择关系',
  31 + selected: '',
27 32 values: ["子女", "配偶"],
28 33 onChange: 'onPickerSelect'
29 34 },
... ... @@ -32,6 +37,7 @@ Page({
32 37 label: '纳税人状态',
33 38 bindtype: 'personstatus',
34 39 placeholder: '请选择纳税人状态',
  40 + selected: '',
35 41 values: ["正常(在职)", "非正常"],
36 42 onChange: 'onPickerSelect'
37 43 },
... ... @@ -40,6 +46,7 @@ Page({
40 46 label: '证照类型',
41 47 bindtype: 'cardtype',
42 48 placeholder: '居民身份证',
  49 + selected: '',
43 50 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往大陆通行证', '外交官证', '中国护照',
44 51 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '外国人永久居留证'
45 52 ],
... ... @@ -58,6 +65,7 @@ Page({
58 65 label: '开户银行',
59 66 bindtype: 'bank',
60 67 placeholder: '请选择开户银行',
  68 + selected: '',
61 69 onChange: 'onPickerSelect'
62 70 },
63 71 genderData: {
... ... @@ -65,6 +73,7 @@ Page({
65 73 bindtype: 'gender',
66 74 placeholder: '请选择性别',
67 75 values: ["男", "女"],
  76 + selected: '',
68 77 onChange: 'onPickerSelect'
69 78 },
70 79 professionData: {
... ... @@ -73,12 +82,14 @@ Page({
73 82 bindtype: 'profession',
74 83 multiIndex: [0, 0, 0],
75 84 placeholder: '请选择职业',
  85 + selected: '',
76 86 onChange: 'onPickerSelect'
77 87 },
78 88 degreeData: {
79 89 label: '学历',
80 90 bindtype: 'degree',
81 91 placeholder: '请选择学历',
  92 + selected: '',
82 93 values: ["研究生", "大学本科", '大学本科以下'],
83 94 onChange: 'onPickerSelect'
84 95 },
... ... @@ -86,6 +97,7 @@ Page({
86 97 label: '是否残疾',
87 98 bindtype: 'disable',
88 99 placeholder: '请选择是否残疾',
  100 + selected: '',
89 101 values: ["否", "是"],
90 102 onChange: 'onPickerSelect'
91 103 },
... ... @@ -93,6 +105,7 @@ Page({
93 105 label: '是否烈属',
94 106 bindtype: 'lieshu',
95 107 placeholder: '请选择是否烈属',
  108 + selected: '',
96 109 values: ["否", "是"],
97 110 onChange: 'onPickerSelect'
98 111 },
... ... @@ -100,6 +113,7 @@ Page({
100 113 label: '是否孤老',
101 114 bindtype: 'lonelyolder',
102 115 placeholder: '请选择是否孤老',
  116 + selected: '',
103 117 values: ["否", "是"],
104 118 onChange: 'onPickerSelect'
105 119 },
... ... @@ -108,6 +122,7 @@ Page({
108 122 label: '是否股东、投资者',
109 123 bindtype: 'invest',
110 124 placeholder: '请选择是否股东、投资者',
  125 + selected: '',
111 126 values: ["否", "是"],
112 127 onChange: 'onPickerSelect'
113 128 },
... ... @@ -116,6 +131,7 @@ Page({
116 131 label: '是否特定行业',
117 132 bindtype: 'specificIndustry',
118 133 placeholder: '请选择是否特定行业',
  134 + selected: '',
119 135 values: ["否", "是"],
120 136 onChange: 'onPickerSelect'
121 137 },
... ... @@ -123,6 +139,7 @@ Page({
123 139 label: '是否雇员',
124 140 bindtype: 'employee',
125 141 placeholder: '请选择是否雇员',
  142 + selected: '',
126 143 values: ["否", "是"],
127 144 onChange: 'onPickerSelect'
128 145 },
... ... @@ -130,6 +147,7 @@ Page({
130 147 label: '是否天使投资个人',
131 148 bindtype: 'investpersonal',
132 149 placeholder: '请选择是否天使投资个人',
  150 + selected: '',
133 151 values: ["否", "是"],
134 152 onChange: 'onPickerSelect'
135 153 },
... ... @@ -138,6 +156,7 @@ Page({
138 156 label: '出生年月',
139 157 bindtype: 'birthday',
140 158 placeholder: '请选择出生日期',
  159 + selected: '',
141 160 mode: "date",
142 161 fields: "day",
143 162 onChange: 'birthdayChange',
... ... @@ -146,6 +165,7 @@ Page({
146 165 label: '在职受雇日期',
147 166 bindtype: 'startday',
148 167 placeholder: '请选择受雇日期',
  168 + selected: '',
149 169 mode: "date",
150 170 fields: "day",
151 171 onChange: 'startChange',
... ... @@ -154,6 +174,7 @@ Page({
154 174 label: '离职日期',
155 175 bindtype: 'endday',
156 176 placeholder: '请选择离职日期',
  177 + selected: '',
157 178 mode: "date",
158 179 fields: "day",
159 180 onChange: 'endChange',
... ... @@ -162,20 +183,29 @@ Page({
162 183 contactaddressInfo: {
163 184 label: '联系地址',
164 185 mode: 'region',
  186 + address_code: ['', '', ''],
  187 + address_value: ['', '', ''],
  188 + selected: '',
165 189 placeholder: '请选择联系地址',
166   - onChange: 'onPickerSelect'
  190 + onChange: 'contactAddressSelect'
167 191 },
168 192 currentaddressInfo: {
169 193 label: '居住地',
170 194 mode: 'region',
  195 + address_code: ['', '', ''],
  196 + address_value: ['', '', ''],
  197 + selected: '',
171 198 placeholder: '请选择居住地',
172   - onChange: 'onPickerSelect'
  199 + onChange: 'currentAddressSelect'
173 200 },
174 201 birthaddressInfo: {
175 202 label: '户籍所在地',
176 203 mode: 'region',
  204 + address_code: ['', '', ''],
  205 + address_value: ['', '', ''],
  206 + selected: '',
177 207 placeholder: '请选择户籍所在地',
178   - onChange: 'onPickerSelect'
  208 + onChange: 'birthAddressSelect'
179 209 },
180 210 title:'',
181 211 condition: false
... ... @@ -186,17 +216,12 @@ Page({
186 216 */
187 217 onLoad: function(options) {
188 218 console.log('options.id', options.id)
189   - if (!options.id || options.id.length < 0) {
  219 + if (options.id && options.id.length > 0) {
190 220 this.setData({
191   - isself: false,
192   - cur_id: ''
193   - })
194   - } else {
195   - this.setData({
196   - cur_id: options.id,
  221 + cur_id: options.id
197 222 })
198 223 this.getpersonalTax(options.id)
199   - }
  224 + }
200 225 this.getproffessiondata()
201 226 this.getbanklist()
202 227 },
... ... @@ -212,17 +237,76 @@ Page({
212 237 "Authorization": Authorization
213 238 },
214 239 success: function(res) {
215   - console.log(res)
  240 + console.log('taxInfo',res)
216 241 that.setData({
217 242 taxInfo: res.data,
218 243 isself: res.data.family_ties ? false : true
219 244 })
  245 + that.handleDatas()
220 246 },
221 247 fail(res) {
222 248 console.log(res)
223 249 }
224 250 })
225 251 },
  252 +
  253 + //对各参数初始赋值
  254 + handleDatas:function(){
  255 + var tax_info = this.data.taxInfo
  256 + this.data.name = tax_info.name
  257 + this.data.relativeData.selected = tax_info.family_ties
  258 + this.data.personstatusData.selected = tax_info.taxpayer_status
  259 +
  260 + this.data.cardtypeData.selected = tax_info.id_card_type
  261 + this.data.card_number = tax_info.id_card_no
  262 + this.data.mobile = tax_info.mobile
  263 + this.data.investInfo.selected = tax_info.is_investor
  264 + this.data.specificIndustryInfo.selected = tax_info.is_specific_profession
  265 + //非必填
  266 + this.data.genderData.selected = tax_info.gender
  267 + this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date)
  268 + this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date)
  269 + this.data.endDate.selected = format.yearFormString(tax_info.separate_date) + '-' + format.monthFormString(tax_info.separate_date) + '-' + format.dayFormString(tax_info.separate_date)
  270 + this.data.degreeData.selected = tax_info.education
  271 + this.data.disabilityInfo.selected = tax_info.is_disability
  272 + this.data.lieshuInfo.selected = tax_info.is_martyr_family
  273 + this.data.lonelyolderInfo.selected = tax_info.is_lonely_man
  274 + this.data.bankInfo.selected = tax_info.bank
  275 + this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
  276 + this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district
  277 + this.data.birthaddressInfo.selected = tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district
  278 + this.data.employeeInfo.selected = tax_info.is_employee
  279 + this.data.investpersonalInfo.selected = tax_info.is_business_angel
  280 + this.setData({
  281 + relativeData: this.data.relativeData,
  282 + name:this.data.name,
  283 + personstatusData: this.data.personstatusData,
  284 + cardtypeData: this.data.cardtypeData,
  285 + mobile: this.data.mobile,
  286 + investInfo: this.data.investInfo,
  287 + specificIndustryInfo: this.data.specificIndustryInfo,
  288 + genderData: this.data.genderData,
  289 +
  290 + degreeData: this.data.degreeData,
  291 + disabilityInfo: this.data.disabilityInfo,
  292 + lieshuInfo: this.data.lieshuInfo,
  293 + lonelyolderInfo: this.data.lonelyolderInfo,
  294 + contactaddressInfo: this.data.contactaddressInfo,
  295 + contactaddressInfo: this.data.contactaddressInfo,
  296 + contactaddressInfo: this.data.contactaddressInfo,
  297 + employeeInfo:this.data.employeeInfo,
  298 + investpersonalInfo: this.data.investpersonalInfo,
  299 +
  300 + long_birth_date: tax_info.birth_date,
  301 + birthDate: this.data.birthDate,
  302 + long_start_date: tax_info.join_date,
  303 + startDate: this.data.startDate,
  304 + long_end_date: tax_info.separate_date,
  305 + endDate: this.data.endDate,
  306 + card_number: this.data.card_number
  307 +
  308 + })
  309 + },
226 310
227 311 getproffessiondata: function() {
228 312 var that = this
... ... @@ -355,7 +439,7 @@ Page({
355 439 console.log(res.data)
356 440 that.setData({
357 441 name: res.data.name,
358   - id_card_number: res.data.id_card_number
  442 + card_number: res.data.card_number
359 443 })
360 444 },
361 445 })
... ... @@ -372,6 +456,7 @@ Page({
372 456 isshow02: !this.data.isshow02
373 457 })
374 458 } else if ("3" == e.target.id) {
  459 + console.log('isshow03', this.data.isshow03)
375 460 this.setData({
376 461 isshow03: !this.data.isshow03
377 462 })
... ... @@ -487,10 +572,81 @@ Page({
487 572 employeeInfo: employee_data
488 573 })
489 574 break;
  575 + case 'investpersonal':
  576 + var investpersonal_data = this.data.investpersonalInfo
  577 + investpersonal_data.selected = investpersonal_data.values[e.detail.value]
  578 + this.setData({
  579 + investpersonalInfo: investpersonal_data
  580 + })
  581 + break;
490 582 }
491 583
492 584 },
493 585
  586 + // =============日期picker选中处理==============
  587 + birthdayChange: function (e) {
  588 + var birth_date = this.data.birthDate;
  589 + birth_date.selected = e.detail.value
  590 + console.log('birthdayChange', Date.parse(new Date(e.detail.value)))
  591 + this.setData({
  592 + birthday: e.detail.value,
  593 + long_birth_date: Date.parse(new Date(e.detail.value)) / 1000,
  594 + birthDate: birth_date
  595 + })
  596 + },
  597 +
  598 + startChange: function (e) {
  599 + var start_date = this.data.startDate;
  600 + start_date.selected = e.detail.value
  601 + this.setData({
  602 + startDate: start_date
  603 + })
  604 + },
  605 +
  606 + endChange: function (e) {
  607 + var end_date = this.data.endDate;
  608 + end_date.selected = e.detail.value
  609 + this.setData({
  610 + endDate: end_date
  611 + })
  612 + },
  613 +
  614 + // =============地区picker选中处理==============
  615 +
  616 + contactAddressSelect: function (e) {
  617 + console.log('contactAddressSelect', e)
  618 + var contact_address = this.data.contactaddressInfo;
  619 + contact_address.address_value = e.detail.value
  620 + contact_address.address_code = e.detail.code
  621 + this.setData({
  622 + contactaddressInfo: contact_address
  623 + })
  624 + },
  625 +
  626 + currentAddressSelect: function (e) {
  627 + console.log('currentAddressSelect', e)
  628 + var current_address = this.data.currentaddressInfo;
  629 + current_address.address_value = e.detail.value
  630 + current_address.address_code = e.detail.code
  631 + this.setData({
  632 + currentaddressInfo: current_address
  633 + })
  634 + },
  635 +
  636 + birthAddressSelect: function (e) {
  637 + console.log('birthAddressSelect', e)
  638 + var birth_address = this.data.birthaddressInfo;
  639 + birth_address.address_value = e.detail.value
  640 + birth_address.address_code = e.detail.code
  641 + this.setData({
  642 + birthaddressInfo: birth_address
  643 + })
  644 + console.log('birthaddressInfo', this.data.birthaddressInfo)
  645 + },
  646 +
  647 + // =============其他数据选中处理==============
  648 +
  649 +
494 650 getIdInfo: function(e) {
495 651 wx.navigateTo({
496 652 url: '../idinfo/idinfo',
... ... @@ -498,62 +654,69 @@ Page({
498 654 })
499 655 },
500 656
501   - formSubmit: function(e) {
  657 + formSubmit: function (e) {
  658 + console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
  659 +
502 660 var formdata = e.detail.value;
503   - var toast_title= ''
504   - console.log("formdata", formdata);
505   - if (formdata.name.length<1){
  661 + console.log("formdata", formdata)
  662 + console.log("card_number", this.data.card_number)
  663 + if (formdata.name.length < 1) {
506 664 this.showtoast('请输入姓名');
507 665 return
508   - } else if (formdata.id_card_no.length < 1) {
509   - this.showtoast('请输入证件号码');
  666 + } else if (this.data.relativeData.selected.length < 1) {
  667 + this.showtoast('请选择成员关系');
  668 + return
  669 + } else if (this.data.personstatusData.selected.length < 1) {
  670 + this.showtoast('请选择纳税人状态');
510 671 return
511   - } else if (formdata.taxpayer_no.length < 1) {
512   - this.showtoast('请输入纳税人识别号');
  672 + } else if (this.data.cardtypeData.selected.length < 1) {
  673 + this.showtoast('请选择证照类型');
513 674 return
514   - } else if (formdata.disability_no.length < 1) {
515   - this.showtoast('请输入残疾证号');
  675 + } else if (this.data.isIdCard && this.data.card_number.length < 1) {
  676 + this.showtoast('请上传有效证件照片');
516 677 return
517   - } else if (formdata.martyr_family_no.length < 1) {
518   - this.showtoast('请输入烈属证号');
  678 + } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) {
  679 + this.showtoast('请输入证件号码');
519 680 return
520 681 } else if (formdata.mobile.length < 1) {
521 682 this.showtoast('请输入联系电话');
522 683 return
523   - } else if (formdata.contact_address_detail
524   -.length < 1) {
525   - this.showtoast('请输入联系详细地址');
526   - return
527   - } else if (formdata.bank_account.length < 1) {
528   - this.showtoast('请输入银行卡号');
529   - return
530   - } else if (formdata.email.length < 1) {
531   - this.showtoast('请输入邮箱');
532   - return
533   - } else if (formdata.current_address_detail.length < 1) {
534   - this.showtoast('请输入居住详细地址');
  684 + } else if (this.data.investInfo.selected.length < 1) {
  685 + this.showtoast('请选择是否股东投资者');
535 686 return
536   - } else if (formdata.huji_address_detail.length < 1) {
537   - this.showtoast('请输入户籍详细地址');
  687 + } else if (this.data.specificIndustryInfo.selected.length < 1) {
  688 + this.showtoast('请选择是否特定行业');
538 689 return
539 690 }
540   - // this.goCommit();
  691 + var new_ard_num = ''
  692 + if (this.data.isIdCard && this.data.card_number.length > 0) {
  693 + new_ard_num = this.data.card_number
  694 + }
  695 + if (!this.data.isIdCard && formdata.id_card_no && formdata.id_card_no.length > 0) {
  696 + new_ard_num = formdata.id_card_no
  697 + }
  698 + this.setData({
  699 + card_number: new_ard_num,
  700 + })
  701 + this.goCommit(formdata);
541 702 },
542 703
543   - goCommit: function() {
  704 + goCommit: function (data) {
544 705 var that = this
  706 + var formdata = data
  707 + console.log("form_data", formdata);
545 708 var Authorization = app.globalData.Authorization;
546 709 wx.request({
547   - url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id,
548   - method: "GET",
  710 + url: baseUrl + 'persontax/v1/personal-taxes/'+that.data.cur_id,
  711 + method: "PUT",
549 712 data: {
550   - "name": "张美嘉",
551   - "family_ties": "子女",
  713 + "name": that.data.name.length > 0 ? that.data.name : form_data.name,
  714 + "family_ties": that.data.relativeData.selected,
552 715 "native": "中国",
553   - "id_card_type": "身份证",
554   - "id_card_no": "320302199010220011",
555   - "gender": "男",
556   - "birth_date": "1990_10_22",
  716 + "id_card_type": that.data.cardtypeData.selected,
  717 + "id_card_no": that.data.card_number,
  718 + "gender": that.data.genderData.selected,
  719 + "birth_date": that.data.long_birth_date,
557 720 "profession": {
558 721 "one_level_code": "1",
559 722 "one_level_name": "专业技术人员",
... ... @@ -562,63 +725,66 @@ Page({
562 725 "three_level_code": "111",
563 726 "three_level_name": "哲学研究人员"
564 727 },
565   - "education": "高中",
566   - "taxpayer_no": "3209023812121232",
567   - "taxpayer_status": "正常",
568   - "is_martyr_family": "是",
569   - "martyr_family_no": "无",
570   - "is_disability": "是",
571   - "disability_no": "无",
572   - "is_lonely_man": "是",
  728 + "education": that.data.degreeData.selected,
  729 + "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : '',
  730 + "taxpayer_status": that.data.personstatusData.selected,
  731 + "is_martyr_family": that.data.lieshuInfo.selected,
  732 + "martyr_family_no": formdata.martyr_family_no,
  733 + "is_disability": that.data.disabilityInfo.selected,
  734 + "disability_no": formdata.disability_no,
  735 + "is_lonely_man": that.data.lonelyolderInfo.selected,
573 736 "is_overseas_personnel": "否",
574   - "comment": "",
  737 + "comment": formdata.comment,
575 738 "current_address": {
576   - "province_code": "xxx",
577   - "province": "北京市",
578   - "city_code": "xxx",
579   - "city": "直辖区",
580   - "district_code": "xxx",
581   - "district": "朝阳区"
  739 + "province_code": that.data.currentaddressInfo.address_code[0],
  740 + "province": that.data.currentaddressInfo.address_value[0],
  741 + "city_code": that.data.currentaddressInfo.address_code[1],
  742 + "city": that.data.currentaddressInfo.address_value[1],
  743 + "district_code": that.data.currentaddressInfo.address_code[2],
  744 + "district": that.data.currentaddressInfo.address_value[2]
582 745 },
583   - "current_address_detail": "望京东路8号",
  746 + "current_address_detail": formdata.current_address_detail,
584 747 "huji_address": {
585   - "province_code": "xxx",
586   - "province": "北京市",
587   - "city_code": "xxx",
588   - "city": "直辖区",
589   - "district_code": "xxx",
590   - "district": "朝阳区"
  748 + "province_code": that.data.birthaddressInfo.address_code[0],
  749 + "province": that.data.birthaddressInfo.address_value[0],
  750 + "city_code": that.data.birthaddressInfo.address_code[1],
  751 + "city": that.data.birthaddressInfo.address_value[1],
  752 + "district_code": that.data.birthaddressInfo.address_code[2],
  753 + "district": that.data.birthaddressInfo.address_value[2]
591 754 },
592   - "huji_address_detail": "望京东路8号",
593   - "mobile": "13888888888",
  755 + "huji_address_detail": formdata.huji_address_detail,
  756 + "mobile": formdata.mobile,
594 757 "contact_address": {
595   - "province_code": "xxx",
596   - "province": "浙江省",
597   - "city_code": "xxx",
598   - "city": "杭州市",
599   - "district_code": "xxx",
600   - "district": "滨江区"
  758 + "province_code": that.data.contactaddressInfo.address_code[0],
  759 + "province": that.data.contactaddressInfo.address_value[0],
  760 + "city_code": that.data.contactaddressInfo.address_code[1],
  761 + "city": that.data.contactaddressInfo.address_value[1],
  762 + "district_code": that.data.contactaddressInfo.address_code[2],
  763 + "district": that.data.contactaddressInfo.address_value[2]
601 764 },
602   - "contact_address_detail": "",
603   - "email": "xxxxxx@xx",
604   - "bank": "中国建设银行",
605   - "bank_account": "666222111121122111",
606   - "join_date": "2018年8月1日",
607   - "separate_date": "2018年8月1日",
608   - "is_employee": "是",
609   - "is_specific_profession": "是",
610   - "is_investor": "否",
611   - "is_business_angel": "否",
612   - "company_equity_total": "0.00",
613   - "personal_equity_total": "0.00",
614   - "employee_no": "XA20180801"
  765 + "contact_address_detail": formdata.contact_address_detail,
  766 + "email": formdata.email,
  767 + "bank": that.data.bankInfo.selected,
  768 + "bank_account": formdata.bank_account,
  769 + "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : 0,
  770 + "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : 0,
  771 + "is_employee": that.data.employeeInfo.selected,
  772 + "is_specific_profession": that.data.specificIndustryInfo.selected,
  773 + "is_investor": that.data.investInfo.selected,
  774 + "is_business_angel": that.data.investpersonalInfo.selected,
  775 + "company_equity_total": parseFloat(formdata.company_equity_total),
  776 + "personal_equity_total": parseFloat(formdata.personal_equity_total),
  777 + "employee_no": formdata.employee_no
615 778 },
616 779 header: {
617 780 'content-type': 'application/json', // 默认值
618 781 "Authorization": Authorization
619 782 },
620   - success: function(res) {
  783 + success: function (res) {
621 784 console.log(res)
  785 + wx.redirectTo({
  786 + url: '../home/home',
  787 + })
622 788 },
623 789 fail(res) {
624 790 console.log(res)
... ... @@ -626,7 +792,7 @@ Page({
626 792 })
627 793 },
628 794
629   - showtoast:function(title){
  795 + showtoast: function (title) {
630 796 wx.showToast({
631 797 title: title,
632 798 })
... ...
... ... @@ -79,10 +79,10 @@
79 79 <text class='text_black_28 float_left'>证照号码</text>
80 80 <view wx:if="{{isIdCard}}">
81 81 <image class='image_camera float_right' src='/images/camera.png'></image>
82   - <text class='text_333_28 float_right'>{{id_card_number}}</text>
  82 + <text class='text_333_28 float_right'>{{card_number}}</text>
83 83 </view>
84 84 <view wx:else>
85   - <input class='input_wrap float_right' placeholder='请输入证件号码' value='{{id_card_number}}' name='id_card_no'></input>
  85 + <input class='input_wrap float_right' placeholder='请输入证件号码' value='{{card_number}}' name='id_card_no'></input>
86 86 </view>
87 87 </view>
88 88 <view class="divide_line"></view>
... ... @@ -128,7 +128,7 @@
128 128 <view class="divide_line"></view>
129 129 <view class='item_body'>
130 130 <text class='text_666_28 float_left'>纳税人识别号</text>
131   - <input class='input_wrap float_right' name='taxpayer_no' type='number'></input>
  131 + <input class='input_wrap float_right' name='taxpayer_no' type='number' value='{{taxInfo.taxpayer_no}}'></input>
132 132 </view>
133 133 <view class="divide_line"></view>
134 134 <!-- <view class='item_body'>
... ... @@ -140,7 +140,7 @@
140 140 <view class="divide_line"></view>
141 141 <view class='item_body'>
142 142 <text class='text_666_28 float_left'>残疾证号</text>
143   - <input class='input_wrap float_right' name='disability_no' type='number'></input>
  143 + <input class='input_wrap float_right' name='disability_no' type='number' value='{{taxInfo.disability_no}}'></input>
144 144 </view>
145 145 <view class="divide_line"></view>
146 146 <!-- <view class='item_body'>
... ... @@ -152,7 +152,7 @@
152 152 <view class="divide_line"></view>
153 153 <view class='item_body'>
154 154 <text class='text_666_28 float_left'>烈属证号</text>
155   - <input class='input_wrap float_right' name='martyr_family_no' type='number'></input>
  155 + <input class='input_wrap float_right' name='martyr_family_no' type='number' value='{{taxInfo.martyr_family_no}}'></input>
156 156 </view>
157 157 <view class="divide_line"></view>
158 158 <!-- <view class='item_body'>
... ... @@ -182,7 +182,7 @@
182 182 <view class='item_body'>
183 183 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
184 184 <text class='text_black_28 float_left'>联系电话</text>
185   - <input class='input_wrap float_right' placeholder='请填写电话' value='{{taxInfo.mobile}}' name='mobile' type='number'></input>
  185 + <input class='input_wrap float_right' placeholder='请填写电话' value='{{mobile}}' name='mobile' type='number'></input>
186 186 </view>
187 187 <!-- 非必填部分02 -->
188 188 <view hidden='{{!isshow02}}'>
... ... @@ -196,7 +196,7 @@
196 196 <view class="divide_line"></view>
197 197 <view class='item_body'>
198 198 <text class='text_666_28 float_left'>详细地址</text>
199   - <input class='input_wrap float_right' name='contact_address_detail'></input>
  199 + <input class='input_wrap float_right' name='contact_address_detail' value='{{taxInfo.contact_address_detail}}'></input>
200 200 </view>
201 201 <view class="divide_line"></view>
202 202 <!-- <view class='item_body'>
... ... @@ -208,36 +208,36 @@
208 208 <view class="divide_line"></view>
209 209 <view class='item_body'>
210 210 <text class='text_666_28 float_left'>银行账号</text>
211   - <input class='input_wrap float_right' name='bank_account'></input>
  211 + <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}'></input>
212 212 </view>
213 213 <view class="divide_line"></view>
214 214 <view class='item_body'>
215 215 <text class='text_666_28 float_left'>电子邮箱</text>
216   - <input class='input_wrap float_right' name='email'></input>
  216 + <input class='input_wrap float_right' name='email' value='{{taxInfo.email}}'></input>
217 217 </view>
218 218 <view class="divide_line"></view>
219   - <!-- <view class='item_body'>
220   - <text class='text_666_28 float_left'>居住地</text>
221   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
222   - <text class='text_333_28 float_right'></text>
  219 + <!-- <view class=' item_body '>
  220 + <text class='text_666_28 float_left '>居住地</text>
  221 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  222 + <text class='text_333_28 float_right '></text>
223 223 </view> -->
224 224 <template is="picker_cell_normal" data="{{...currentaddressInfo}}" />
225 225 <view class="divide_line"></view>
226   - <view class='item_body'>
227   - <text class='text_666_28 float_left'>详细地址</text>
228   - <input class='input_wrap float_right' name='current_address_detail'></input>
  226 + <view class='item_body '>
  227 + <text class='text_666_28 float_left '>详细地址</text>
  228 + <input class='input_wrap float_right ' name='current_address_detail ' value='{{taxInfo.current_address_detail}} '></input>
229 229 </view>
230 230 <view class="divide_line"></view>
231   - <!-- <view class='item_body'>
232   - <text class='text_666_28 float_left'>户籍所在地</text>
233   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
234   - <text class='text_333_28 float_right'></text>
  231 + <!-- <view class='item_body '>
  232 + <text class='text_666_28 float_left '>户籍所在地</text>
  233 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  234 + <text class='text_333_28 float_right '></text>
235 235 </view> -->
236 236 <template is="picker_cell_normal" data="{{...birthaddressInfo}}" />
237 237 <view class="divide_line"></view>
238   - <view class='item_body'>
239   - <text class='text_666_28 float_left'>详细地址</text>
240   - <input class='input_wrap float_right' name='huji_address_detail'></input>
  238 + <view class='item_body '>
  239 + <text class='text_666_28 float_left '>详细地址</text>
  240 + <input class='input_wrap float_right ' name='huji_address_detail ' value='{{taxInfo.huji_address_detail}} '></input>
241 241 </view>
242 242 <view class="divide_line"></view>
243 243 </view>
... ... @@ -246,92 +246,94 @@
246 246 </view>
247 247
248 248 <!-- 任职雇佣信息 -->
249   - <view class='head_wrap' style='margin-top:20rpx' bindtap='span' id='3'>
250   - <text class='head_text_wrap1'>任职雇佣信息</text>
251   - <text class='head_text_wrap2'>(点击收起非必填选项)</text>
252   - <view style='float:right' wx:if='{{isshow03}}'>
253   - <image class='head_image_wrap_up' src='/images/arrow_up.png'></image>
  249 + <view class='head_wrap ' style='margin-top:20rpx ' bindtap='span' id='3'>
  250 + <text class='head_text_wrap1 '>任职雇佣信息</text>
  251 + <text class='head_text_wrap2 '>(点击收起非必填选项)</text>
  252 + <view style='float:right ' hidden='{{!isshow03}}'>
  253 + <image class='head_image_wrap_up ' src='/images/arrow_up.png '></image>
254 254 </view>
255   - <view wx:else style='float:right'>
256   - <image class='head_image_wrap_down' src='/images/arrow_down.png'></image>
  255 + <view hidden='{{isshow03}}' style='float:right '>
  256 + <image class='head_image_wrap_down ' src='/images/arrow_down.png '></image>
257 257 </view>
258 258 </view>
259 259
260   - <view class='data_list'>
261   - <view class='data_item'>
262   - <!-- <view class='item_body'>
263   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
264   - <text class='text_black_28 float_left'>是否股东、投资者</text>
265   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
266   - <text class='text_333_28 float_right'>是</text>
  260 + <view class='data_list '>
  261 + <view class='data_item '>
  262 + <!-- <view class='item_body '>
  263 + <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left '>*</text>
  264 + <text class='text_black_28 float_left '>是否股东、投资者</text>
  265 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  266 + <text class='text_333_28 float_right '>是</text>
267 267 </view> -->
268 268 <template is="picker_cell_normal" data="{{...investInfo}}" />
269 269 <view class="divide_line"></view>
270   - <!-- <view class='item_body'>
271   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
272   - <text class='text_black_28 float_left'>是否特定行业</text>
273   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
274   - <text class='text_333_28 float_right'></text>
  270 + <!-- <view class='item_body '>
  271 + <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left '>*</text>
  272 + <text class='text_black_28 float_left '>是否特定行业</text>
  273 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  274 + <text class='text_333_28 float_right '></text>
275 275 </view> -->
276 276 <template is="picker_cell_normal" data="{{...specificIndustryInfo}}" />
  277 + <view class="divide_line"></view>
277 278 <view hidden='{{!isshow03}}'>
278 279 <view class="divide_line"></view>
279   - <!-- <view class='item_body'>
280   - <text class='text_666_28 float_left'>是否雇员</text>
281   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
282   - <text class='text_333_28 float_right'></text>
  280 + <!-- <view class='item_body '>
  281 + <text class='text_666_28 float_left '>是否雇员</text>
  282 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  283 + <text class='text_333_28 float_right '></text>
283 284 </view> -->
284 285 <template is="picker_cell_normal" data="{{...employeeInfo}}" />
285 286 <view class="divide_line"></view>
286   - <view class='item_body'>
  287 + <view class='item_body '>
287 288 <text class='text_666_28 float_left'>公司股本总额</text>
288   - <input class='input_wrap float_right' name='company_equity_total' type='digit'></input>
  289 + <input class='input_wrap float_right ' name='company_equity_total' type='digit' value='{{taxInfo.company_equity_total}}'></input>
289 290 </view>
290 291 <view class="divide_line"></view>
291   - <!-- <view class='item_body'>
292   - <text class='text_666_28 float_left'>在职受雇日期</text>
293   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
294   - <text class='text_333_28 float_right'></text>
  292 + <!-- <view class='item_body '>
  293 + <text class='text_666_28 float_left '>在职受雇日期</text>
  294 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  295 + <text class='text_333_28 float_right '></text>
295 296 </view> -->
296 297 <template is="picker_cell_normal" data="{{...startDate}}" />
297 298
298 299 <view class="divide_line"></view>
299   - <!-- <view class='item_body'>
300   - <text class='text_666_28 float_left'>离职日期</text>
301   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
302   - <text class='text_333_28 float_right'></text>
  300 + <!-- <view class='item_body '>
  301 + <text class='text_666_28 float_left '>离职日期</text>
  302 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  303 + <text class='text_333_28 float_right '></text>
303 304 </view> -->
304 305 <template is="picker_cell_normal" data="{{...endDate}}" />
  306 +
305 307 <view class="divide_line"></view>
306   - <view class='item_body'>
307   - <text class='text_666_28 float_left'>工号</text>
308   - <input class='input_wrap float_right' name='employee_no' type='number'></input>
  308 + <view class='item_body '>
  309 + <text class='text_666_28 float_left '>工号</text>
  310 + <input class='input_wrap float_right ' name='employee_no' type='number' value='{{taxInfo.employee_no}}'></input>
309 311 </view>
310 312 <view class="divide_line"></view>
311   - <!-- <view class='item_body'>
312   - <text class='text_666_28 float_left'>是否天使投资个人</text>
313   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
314   - <text class='text_333_28 float_right'></text>
  313 + <!-- <view class='item_body '>
  314 + <text class='text_666_28 float_left '>是否天使投资个人</text>
  315 + <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
  316 + <text class='text_333_28 float_right '></text>
315 317 </view> -->
316 318 <template is="picker_cell_normal" data="{{...investpersonalInfo}}" />
317 319 <view class="divide_line"></view>
318   - <view class='item_body'>
319   - <text class='text_666_28 float_left'>个人投资总额</text>
320   - <input class='input_wrap float_right' name='personal_equity_total' type='digit'></input>
  320 + <view class='item_body '>
  321 + <text class='text_666_28 float_left '>个人投资总额</text>
  322 + <input class='input_wrap float_right ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}'></input>
321 323 </view>
322 324 <view class="divide_line"></view>
323 325 </view>
324 326
325 327
326   - <view style='width:100%'>
327   - <text class='text_666_28 float_left'>备注</text>
328   - <input class='extra_input' value='' name='comment'></input>
  328 + <view style='width:100% '>
  329 + <text class='text_666_28 float_left '>备注</text>
  330 + <input class='extra_input ' value='{{taxInfo.comment}}' name='comment '></input>
329 331 </view>
330 332 </view>
331 333
332 334 </view>
333 335
334   - <view style='background:#e8e8e8;height:150rpx'></view>
  336 + <view style='background:#e8e8e8;height:150rpx '></view>
335 337
336 338 <button class="btn_bottom" formType="submit"> 保存</button>
337 339 </form>
... ...
... ... @@ -41,6 +41,9 @@ Page({
41 41 'content-type': 'application/json', // 默认值
42 42 "Authorization": Authorization
43 43 },
  44 + data:{
  45 + 'all':true
  46 + },
44 47 success: function (res) {
45 48 console.log(res.data)
46 49 that.setData({
... ...
... ... @@ -187,7 +187,7 @@ Page({
187 187 wx.showToast({
188 188 image: "/images/warn.png",
189 189 duration: 1000,
190   - title: res.data.message?res.data.message:"数据错误"
  190 + title: res.data.message ? res.data.message : "数据错误"
191 191 });
192 192 }
193 193 wx.hideLoading()
... ... @@ -199,14 +199,14 @@ Page({
199 199 })
200 200 },
201 201
202   - savedata:function(){
  202 + savedata: function() {
203 203 wx.setStorage({
204 204 key: 'id_info',
205 205 data: JSON.stringify(this.data.idInfo),
206 206 })
207   - wx.navigateBack({
208   - delta:1
209   - })
  207 + wx.navigateBack({
  208 + delta: 1
  209 + })
210 210 },
211 211
212 212 /**
... ... @@ -220,10 +220,10 @@ Page({
220 220 * 生命周期函数--监听页面卸载
221 221 */
222 222 onUnload: function() {
223   - wx.showModal({
224   - title: '',
225   - content: '\n您的信息还未保存是否确认返回?\n',
226   - })
  223 + // wx.showModal({
  224 + // title: '',
  225 + // content: '\n您的信息还未保存是否确认返回?\n',
  226 + // })
227 227 },
228 228
229 229 /**
... ...
... ... @@ -74,6 +74,5 @@ module.exports = {
74 74 yearFormString: yearFormString,
75 75 monthFormString: monthFormString,
76 76 dayFormString: dayFormString,
77   - udekapi: udekapi,
78 77 isIDCardNum: isIDCardNum
79 78 }
... ...
注册登录 后发表评论