提交 4cb22f541bde01df370c5ba4774a34a3b26cf3a4

作者 wangyu
1 个父辈 34ada530

完善自然人相关优化

@@ -61,7 +61,7 @@ App({ @@ -61,7 +61,7 @@ App({
61 } else if (user && user.type == "1") {//注册用户 61 } else if (user && user.type == "1") {//注册用户
62 if (relaunch) { 62 if (relaunch) {
63 wx.reLaunch({ //重新加载 63 wx.reLaunch({ //重新加载
64 - url: '../home/home' 64 + url: '../main/home/home'
65 // url: '../../getPhone/getPhone' 65 // url: '../../getPhone/getPhone'
66 }) 66 })
67 } 67 }
1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/main/home/home",  
4 "pages/getPhone/getPhone", 3 "pages/getPhone/getPhone",
  4 + "pages/main/home/home",
  5 +
5 "pages/main/editinfo/editinfo", 6 "pages/main/editinfo/editinfo",
6 "pages/main/addinfo/addinfo", 7 "pages/main/addinfo/addinfo",
7 "pages/main/idinfo/idinfo", 8 "pages/main/idinfo/idinfo",
@@ -17,15 +17,16 @@ Page({ @@ -17,15 +17,16 @@ Page({
17 isIdCard: true, 17 isIdCard: true,
18 name: '', 18 name: '',
19 card_number: '', 19 card_number: '',
20 - birthday:'',  
21 - formData:{},  
22 - requestBody:{}, 20 + birthday: '',
  21 + requestBody: {},
  22 + disabledName:false,
23 23
24 relativeData: { 24 relativeData: {
25 isrequre: true, 25 isrequre: true,
26 label: '关系', 26 label: '关系',
27 bindtype: 'relative', 27 bindtype: 'relative',
28 - selected:'', 28 + selected: '',
  29 + disabled: false,
29 placeholder: '请选择关系', 30 placeholder: '请选择关系',
30 values: ["子女", "配偶"], 31 values: ["子女", "配偶"],
31 onChange: 'onPickerSelect' 32 onChange: 'onPickerSelect'
@@ -55,7 +56,7 @@ Page({ @@ -55,7 +56,7 @@ Page({
55 label: '是否境外人员', 56 label: '是否境外人员',
56 bindtype: 'forigner', 57 bindtype: 'forigner',
57 selected: '否', 58 selected: '否',
58 - disabled:true, 59 + disabled: true,
59 values: ["否", "是"], 60 values: ["否", "是"],
60 onChange: 'onPickerSelect' 61 onChange: 'onPickerSelect'
61 }, 62 },
@@ -181,6 +182,8 @@ Page({ @@ -181,6 +182,8 @@ Page({
181 contactaddressInfo: { 182 contactaddressInfo: {
182 label: '联系地址', 183 label: '联系地址',
183 mode: 'region', 184 mode: 'region',
  185 + address_code: ['', '', ''],
  186 + address_value: ['', '', ''],
184 selected: '', 187 selected: '',
185 placeholder: '请选择联系地址', 188 placeholder: '请选择联系地址',
186 onChange: 'contactAddressSelect' 189 onChange: 'contactAddressSelect'
@@ -188,6 +191,8 @@ Page({ @@ -188,6 +191,8 @@ Page({
188 currentaddressInfo: { 191 currentaddressInfo: {
189 label: '居住地', 192 label: '居住地',
190 mode: 'region', 193 mode: 'region',
  194 + address_code:['','',''],
  195 + address_value:['','',''],
191 selected: '', 196 selected: '',
192 placeholder: '请选择居住地', 197 placeholder: '请选择居住地',
193 onChange: 'currentAddressSelect' 198 onChange: 'currentAddressSelect'
@@ -195,6 +200,8 @@ Page({ @@ -195,6 +200,8 @@ Page({
195 birthaddressInfo: { 200 birthaddressInfo: {
196 label: '户籍所在地', 201 label: '户籍所在地',
197 mode: 'region', 202 mode: 'region',
  203 + address_code: ['', '', ''],
  204 + address_value: ['', '', ''],
198 selected: '', 205 selected: '',
199 placeholder: '请选择户籍所在地', 206 placeholder: '请选择户籍所在地',
200 onChange: 'birthAddressSelect' 207 onChange: 'birthAddressSelect'
@@ -206,7 +213,7 @@ Page({ @@ -206,7 +213,7 @@ Page({
206 /** 213 /**
207 * 生命周期函数--监听页面加载 214 * 生命周期函数--监听页面加载
208 */ 215 */
209 - onLoad: function (options) { 216 + onLoad: function(options) {
210 // console.log('options.id', options.id) 217 // console.log('options.id', options.id)
211 // if (!options.id || options.id.length < 0) { 218 // if (!options.id || options.id.length < 0) {
212 // this.setData({ 219 // this.setData({
@@ -219,7 +226,7 @@ Page({ @@ -219,7 +226,7 @@ Page({
219 this.getbanklist() 226 this.getbanklist()
220 }, 227 },
221 228
222 - getpersonalTax: function (id) { 229 + getpersonalTax: function(id) {
223 var that = this 230 var that = this
224 var Authorization = app.globalData.Authorization; 231 var Authorization = app.globalData.Authorization;
225 wx.request({ 232 wx.request({
@@ -229,7 +236,7 @@ Page({ @@ -229,7 +236,7 @@ Page({
229 'content-type': 'application/json', // 默认值 236 'content-type': 'application/json', // 默认值
230 "Authorization": Authorization 237 "Authorization": Authorization
231 }, 238 },
232 - success: function (res) { 239 + success: function(res) {
233 console.log(res) 240 console.log(res)
234 that.setData({ 241 that.setData({
235 taxInfo: res.data, 242 taxInfo: res.data,
@@ -242,7 +249,7 @@ Page({ @@ -242,7 +249,7 @@ Page({
242 }) 249 })
243 }, 250 },
244 251
245 - getproffessiondata: function () { 252 + getproffessiondata: function() {
246 var that = this 253 var that = this
247 var Authorization = app.globalData.Authorization; 254 var Authorization = app.globalData.Authorization;
248 var proffession_info = that.data.professionData 255 var proffession_info = that.data.professionData
@@ -253,7 +260,7 @@ Page({ @@ -253,7 +260,7 @@ Page({
253 'content-type': 'application/json', // 默认值 260 'content-type': 'application/json', // 默认值
254 "Authorization": Authorization 261 "Authorization": Authorization
255 }, 262 },
256 - success: function (res) { 263 + success: function(res) {
257 console.log('proffessiondata', res.data) 264 console.log('proffessiondata', res.data)
258 proffession_info.values = that.handleProfession(res.data.items) 265 proffession_info.values = that.handleProfession(res.data.items)
259 that.setData({ 266 that.setData({
@@ -268,12 +275,14 @@ Page({ @@ -268,12 +275,14 @@ Page({
268 console.log('proffessionData--', that.data.professionData) 275 console.log('proffessionData--', that.data.professionData)
269 }, 276 },
270 277
271 - handleProfession: function (data) { 278 + handleProfession: function(data) {
272 var newdata = [] 279 var newdata = []
273 var one = [] 280 var one = []
274 var two = [] 281 var two = []
275 var three = [] 282 var three = []
276 - var oneObj = {}, twoObj = {}, threeObj = {} 283 + var oneObj = {},
  284 + twoObj = {},
  285 + threeObj = {}
277 if (data && data.length > 0) { 286 if (data && data.length > 0) {
278 console.log('one', one) 287 console.log('one', one)
279 data.map((d, i) => { 288 data.map((d, i) => {
@@ -320,7 +329,7 @@ Page({ @@ -320,7 +329,7 @@ Page({
320 return newdata 329 return newdata
321 }, 330 },
322 331
323 - getbanklist: function () { 332 + getbanklist: function() {
324 var that = this 333 var that = this
325 var Authorization = app.globalData.Authorization; 334 var Authorization = app.globalData.Authorization;
326 var bank_info = that.data.bankInfo 335 var bank_info = that.data.bankInfo
@@ -331,14 +340,16 @@ Page({ @@ -331,14 +340,16 @@ Page({
331 'content-type': 'application/json', // 默认值 340 'content-type': 'application/json', // 默认值
332 "Authorization": Authorization 341 "Authorization": Authorization
333 }, 342 },
334 - success: function (res) { 343 + success: function(res) {
335 console.log(res) 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 console.log("bankInfo", that.data.bankInfo) 353 console.log("bankInfo", that.data.bankInfo)
343 }, 354 },
344 fail(res) { 355 fail(res) {
@@ -347,7 +358,7 @@ Page({ @@ -347,7 +358,7 @@ Page({
347 }) 358 })
348 }, 359 },
349 360
350 - handleBankinfo: function (data) { 361 + handleBankinfo: function(data) {
351 var bank_name = [] 362 var bank_name = []
352 for (var i = 0; i < data.length; i++) { 363 for (var i = 0; i < data.length; i++) {
353 bank_name.push(data[i].bank_name) 364 bank_name.push(data[i].bank_name)
@@ -358,33 +369,46 @@ Page({ @@ -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 var that = this 380 var that = this
370 wx.getStorage({ 381 wx.getStorage({
371 key: 'id_info', 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 console.log(e) 412 console.log(e)
389 if ("1" == e.target.id) { 413 if ("1" == e.target.id) {
390 this.setData({ 414 this.setData({
@@ -401,8 +425,8 @@ Page({ @@ -401,8 +425,8 @@ Page({
401 } 425 }
402 426
403 }, 427 },
404 - // =============普通单列picker选中处理==============  
405 - onPickerSelect: function (e) { 428 + // =============普通单列picker选中处理==============
  429 + onPickerSelect: function(e) {
406 console.log('picker发送选择改变,携带值为', e) 430 console.log('picker发送选择改变,携带值为', e)
407 switch (e.currentTarget.id) { 431 switch (e.currentTarget.id) {
408 case 'relative': 432 case 'relative':
@@ -514,8 +538,8 @@ Page({ @@ -514,8 +538,8 @@ Page({
514 538
515 }, 539 },
516 540
517 - // =============日期picker选中处理==============  
518 - birthdayChange:function(e){ 541 + // =============日期picker选中处理==============
  542 + birthdayChange: function(e) {
519 var birth_date = this.data.birthDate; 543 var birth_date = this.data.birthDate;
520 birth_date.selected = e.detail.value 544 birth_date.selected = e.detail.value
521 this.setData({ 545 this.setData({
@@ -524,7 +548,7 @@ Page({ @@ -524,7 +548,7 @@ Page({
524 }) 548 })
525 }, 549 },
526 550
527 - startChange:function(e){ 551 + startChange: function(e) {
528 var start_date = this.data.startDate; 552 var start_date = this.data.startDate;
529 start_date.selected = e.detail.value 553 start_date.selected = e.detail.value
530 this.setData({ 554 this.setData({
@@ -532,7 +556,7 @@ Page({ @@ -532,7 +556,7 @@ Page({
532 }) 556 })
533 }, 557 },
534 558
535 - endChange: function (e) { 559 + endChange: function(e) {
536 var end_date = this.data.endDate; 560 var end_date = this.data.endDate;
537 end_date.selected = e.detail.value 561 end_date.selected = e.detail.value
538 this.setData({ 562 this.setData({
@@ -542,8 +566,8 @@ Page({ @@ -542,8 +566,8 @@ Page({
542 566
543 // =============地区picker选中处理============== 567 // =============地区picker选中处理==============
544 568
545 - contactAddressSelect:function(e){  
546 - console.log('contactAddressSelect',e) 569 + contactAddressSelect: function(e) {
  570 + console.log('contactAddressSelect', e)
547 var contact_address = this.data.contactaddressInfo; 571 var contact_address = this.data.contactaddressInfo;
548 contact_address.address_value = e.detail.value 572 contact_address.address_value = e.detail.value
549 contact_address.address_code = e.detail.code 573 contact_address.address_code = e.detail.code
@@ -552,7 +576,7 @@ Page({ @@ -552,7 +576,7 @@ Page({
552 }) 576 })
553 }, 577 },
554 578
555 - currentAddressSelect: function (e) { 579 + currentAddressSelect: function(e) {
556 console.log('currentAddressSelect', e) 580 console.log('currentAddressSelect', e)
557 var current_address = this.data.currentaddressInfo; 581 var current_address = this.data.currentaddressInfo;
558 current_address.address_value = e.detail.value 582 current_address.address_value = e.detail.value
@@ -562,7 +586,7 @@ Page({ @@ -562,7 +586,7 @@ Page({
562 }) 586 })
563 }, 587 },
564 588
565 - birthAddressSelect: function (e) { 589 + birthAddressSelect: function(e) {
566 console.log('birthAddressSelect', e) 590 console.log('birthAddressSelect', e)
567 var birth_address = this.data.birthaddressInfo; 591 var birth_address = this.data.birthaddressInfo;
568 birth_address.address_value = e.detail.value 592 birth_address.address_value = e.detail.value
@@ -574,20 +598,19 @@ Page({ @@ -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 wx.navigateTo({ 603 wx.navigateTo({
580 url: '../idinfo/idinfo', 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 var formdata = e.detail.value; 613 var formdata = e.detail.value;
590 - var toast_title = ''  
591 console.log("formdata", formdata); 614 console.log("formdata", formdata);
592 if (formdata.name.length < 1) { 615 if (formdata.name.length < 1) {
593 this.showtoast('请输入姓名'); 616 this.showtoast('请输入姓名');
@@ -601,60 +624,45 @@ Page({ @@ -601,60 +624,45 @@ Page({
601 } else if (this.data.cardtypeData.selected.length < 1) { 624 } else if (this.data.cardtypeData.selected.length < 1) {
602 this.showtoast('请选择证照类型'); 625 this.showtoast('请选择证照类型');
603 return 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 this.showtoast('请输入证件号码'); 631 this.showtoast('请输入证件号码');
606 return 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 } else if (formdata.mobile.length < 1) { 633 } else if (formdata.mobile.length < 1) {
617 this.showtoast('请输入联系电话'); 634 this.showtoast('请输入联系电话');
618 return 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 return 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 return 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 this.setData({ 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 var that = this 657 var that = this
  658 + var formdata = data
  659 + console.log("form_data", formdata);
652 var Authorization = app.globalData.Authorization; 660 var Authorization = app.globalData.Authorization;
653 wx.request({ 661 wx.request({
654 url: baseUrl + 'persontax/v1/personal-taxes', 662 url: baseUrl + 'persontax/v1/personal-taxes',
655 - method: "GET", 663 + method: "POST",
656 data: { 664 data: {
657 - "name": that.data.formdata.name, 665 + "name": that.data.name.length > 0 ? that.data.name : form_data.name,
658 "family_ties": that.data.relativeData.selected, 666 "family_ties": that.data.relativeData.selected,
659 "native": "中国", 667 "native": "中国",
660 "id_card_type": that.data.relativeData.selected, 668 "id_card_type": that.data.relativeData.selected,
@@ -670,7 +678,7 @@ Page({ @@ -670,7 +678,7 @@ Page({
670 "three_level_name": "哲学研究人员" 678 "three_level_name": "哲学研究人员"
671 }, 679 },
672 "education": that.data.degreeData.selected, 680 "education": that.data.degreeData.selected,
673 - "taxpayer_no": formdata.taxpayer_no, 681 + "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no:'',
674 "taxpayer_status": that.data.personstatusData.selected, 682 "taxpayer_status": that.data.personstatusData.selected,
675 "is_martyr_family": that.data.lieshuInfo.selected, 683 "is_martyr_family": that.data.lieshuInfo.selected,
676 "martyr_family_no": formdata.martyr_family_no, 684 "martyr_family_no": formdata.martyr_family_no,
@@ -710,22 +718,25 @@ Page({ @@ -710,22 +718,25 @@ Page({
710 "email": formdata.email, 718 "email": formdata.email,
711 "bank": that.data.bankInfo.selected, 719 "bank": that.data.bankInfo.selected,
712 "bank_account": formdata.bank_account, 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 "is_employee": that.data.employeeInfo.selected, 723 "is_employee": that.data.employeeInfo.selected,
716 "is_specific_profession": that.data.specificIndustryInfo.selected, 724 "is_specific_profession": that.data.specificIndustryInfo.selected,
717 "is_investor": that.data.investInfo.selected, 725 "is_investor": that.data.investInfo.selected,
718 "is_business_angel": that.data.investpersonalInfo.selected, 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 "employee_no": formdata.employee_no 729 "employee_no": formdata.employee_no
722 }, 730 },
723 header: { 731 header: {
724 'content-type': 'application/json', // 默认值 732 'content-type': 'application/json', // 默认值
725 "Authorization": Authorization 733 "Authorization": Authorization
726 }, 734 },
727 - success: function (res) { 735 + success: function(res) {
728 console.log(res) 736 console.log(res)
  737 + wx.redirectTo({
  738 + url: '../home/home',
  739 + })
729 }, 740 },
730 fail(res) { 741 fail(res) {
731 console.log(res) 742 console.log(res)
@@ -733,7 +744,7 @@ Page({ @@ -733,7 +744,7 @@ Page({
733 }) 744 })
734 }, 745 },
735 746
736 - showtoast: function (title) { 747 + showtoast: function(title) {
737 wx.showToast({ 748 wx.showToast({
738 title: title, 749 title: title,
739 }) 750 })
@@ -742,35 +753,35 @@ Page({ @@ -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 })
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <view class='item_body' hidden="{{!isself}}"> 45 <view class='item_body' hidden="{{!isself}}">
46 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> 46 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
47 <text class='text_black_28 float_left'>姓名</text> 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 </view> 49 </view>
50 <view class="divide_line"></view> 50 <view class="divide_line"></view>
51 51
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 <text class='text_black_28 float_left'>证照号码</text> 79 <text class='text_black_28 float_left'>证照号码</text>
80 <view wx:if="{{isIdCard}}"> 80 <view wx:if="{{isIdCard}}">
81 <image class='image_camera float_right' src='/images/camera.png'></image> 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 </view> 83 </view>
84 <view wx:else> 84 <view wx:else>
85 <input class='input_wrap float_right' placeholder='请输入证件号码' name='id_card_no'></input> 85 <input class='input_wrap float_right' placeholder='请输入证件号码' name='id_card_no'></input>
1 // pages/main//editinfo/editinfo.js 1 // pages/main//editinfo/editinfo.js
  2 +var format = require('../../../utils/util.js');
2 var app = getApp(); 3 var app = getApp();
3 var baseUrl = app.globalData.baseUrl; 4 var baseUrl = app.globalData.baseUrl;
4 Page({ 5 Page({
@@ -17,13 +18,17 @@ Page({ @@ -17,13 +18,17 @@ Page({
17 isself: true, 18 isself: true,
18 isIdCard:true, 19 isIdCard:true,
19 name: '', 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 relativeData: { 26 relativeData: {
23 isrequre: true, 27 isrequre: true,
24 label: '关系', 28 label: '关系',
25 bindtype: 'relative', 29 bindtype: 'relative',
26 placeholder: '请选择关系', 30 placeholder: '请选择关系',
  31 + selected: '',
27 values: ["子女", "配偶"], 32 values: ["子女", "配偶"],
28 onChange: 'onPickerSelect' 33 onChange: 'onPickerSelect'
29 }, 34 },
@@ -32,6 +37,7 @@ Page({ @@ -32,6 +37,7 @@ Page({
32 label: '纳税人状态', 37 label: '纳税人状态',
33 bindtype: 'personstatus', 38 bindtype: 'personstatus',
34 placeholder: '请选择纳税人状态', 39 placeholder: '请选择纳税人状态',
  40 + selected: '',
35 values: ["正常(在职)", "非正常"], 41 values: ["正常(在职)", "非正常"],
36 onChange: 'onPickerSelect' 42 onChange: 'onPickerSelect'
37 }, 43 },
@@ -40,6 +46,7 @@ Page({ @@ -40,6 +46,7 @@ Page({
40 label: '证照类型', 46 label: '证照类型',
41 bindtype: 'cardtype', 47 bindtype: 'cardtype',
42 placeholder: '居民身份证', 48 placeholder: '居民身份证',
  49 + selected: '',
43 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往大陆通行证', '外交官证', '中国护照', 50 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往大陆通行证', '外交官证', '中国护照',
44 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '外国人永久居留证' 51 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '外国人永久居留证'
45 ], 52 ],
@@ -58,6 +65,7 @@ Page({ @@ -58,6 +65,7 @@ Page({
58 label: '开户银行', 65 label: '开户银行',
59 bindtype: 'bank', 66 bindtype: 'bank',
60 placeholder: '请选择开户银行', 67 placeholder: '请选择开户银行',
  68 + selected: '',
61 onChange: 'onPickerSelect' 69 onChange: 'onPickerSelect'
62 }, 70 },
63 genderData: { 71 genderData: {
@@ -65,6 +73,7 @@ Page({ @@ -65,6 +73,7 @@ Page({
65 bindtype: 'gender', 73 bindtype: 'gender',
66 placeholder: '请选择性别', 74 placeholder: '请选择性别',
67 values: ["男", "女"], 75 values: ["男", "女"],
  76 + selected: '',
68 onChange: 'onPickerSelect' 77 onChange: 'onPickerSelect'
69 }, 78 },
70 professionData: { 79 professionData: {
@@ -73,12 +82,14 @@ Page({ @@ -73,12 +82,14 @@ Page({
73 bindtype: 'profession', 82 bindtype: 'profession',
74 multiIndex: [0, 0, 0], 83 multiIndex: [0, 0, 0],
75 placeholder: '请选择职业', 84 placeholder: '请选择职业',
  85 + selected: '',
76 onChange: 'onPickerSelect' 86 onChange: 'onPickerSelect'
77 }, 87 },
78 degreeData: { 88 degreeData: {
79 label: '学历', 89 label: '学历',
80 bindtype: 'degree', 90 bindtype: 'degree',
81 placeholder: '请选择学历', 91 placeholder: '请选择学历',
  92 + selected: '',
82 values: ["研究生", "大学本科", '大学本科以下'], 93 values: ["研究生", "大学本科", '大学本科以下'],
83 onChange: 'onPickerSelect' 94 onChange: 'onPickerSelect'
84 }, 95 },
@@ -86,6 +97,7 @@ Page({ @@ -86,6 +97,7 @@ Page({
86 label: '是否残疾', 97 label: '是否残疾',
87 bindtype: 'disable', 98 bindtype: 'disable',
88 placeholder: '请选择是否残疾', 99 placeholder: '请选择是否残疾',
  100 + selected: '',
89 values: ["否", "是"], 101 values: ["否", "是"],
90 onChange: 'onPickerSelect' 102 onChange: 'onPickerSelect'
91 }, 103 },
@@ -93,6 +105,7 @@ Page({ @@ -93,6 +105,7 @@ Page({
93 label: '是否烈属', 105 label: '是否烈属',
94 bindtype: 'lieshu', 106 bindtype: 'lieshu',
95 placeholder: '请选择是否烈属', 107 placeholder: '请选择是否烈属',
  108 + selected: '',
96 values: ["否", "是"], 109 values: ["否", "是"],
97 onChange: 'onPickerSelect' 110 onChange: 'onPickerSelect'
98 }, 111 },
@@ -100,6 +113,7 @@ Page({ @@ -100,6 +113,7 @@ Page({
100 label: '是否孤老', 113 label: '是否孤老',
101 bindtype: 'lonelyolder', 114 bindtype: 'lonelyolder',
102 placeholder: '请选择是否孤老', 115 placeholder: '请选择是否孤老',
  116 + selected: '',
103 values: ["否", "是"], 117 values: ["否", "是"],
104 onChange: 'onPickerSelect' 118 onChange: 'onPickerSelect'
105 }, 119 },
@@ -108,6 +122,7 @@ Page({ @@ -108,6 +122,7 @@ Page({
108 label: '是否股东、投资者', 122 label: '是否股东、投资者',
109 bindtype: 'invest', 123 bindtype: 'invest',
110 placeholder: '请选择是否股东、投资者', 124 placeholder: '请选择是否股东、投资者',
  125 + selected: '',
111 values: ["否", "是"], 126 values: ["否", "是"],
112 onChange: 'onPickerSelect' 127 onChange: 'onPickerSelect'
113 }, 128 },
@@ -116,6 +131,7 @@ Page({ @@ -116,6 +131,7 @@ Page({
116 label: '是否特定行业', 131 label: '是否特定行业',
117 bindtype: 'specificIndustry', 132 bindtype: 'specificIndustry',
118 placeholder: '请选择是否特定行业', 133 placeholder: '请选择是否特定行业',
  134 + selected: '',
119 values: ["否", "是"], 135 values: ["否", "是"],
120 onChange: 'onPickerSelect' 136 onChange: 'onPickerSelect'
121 }, 137 },
@@ -123,6 +139,7 @@ Page({ @@ -123,6 +139,7 @@ Page({
123 label: '是否雇员', 139 label: '是否雇员',
124 bindtype: 'employee', 140 bindtype: 'employee',
125 placeholder: '请选择是否雇员', 141 placeholder: '请选择是否雇员',
  142 + selected: '',
126 values: ["否", "是"], 143 values: ["否", "是"],
127 onChange: 'onPickerSelect' 144 onChange: 'onPickerSelect'
128 }, 145 },
@@ -130,6 +147,7 @@ Page({ @@ -130,6 +147,7 @@ Page({
130 label: '是否天使投资个人', 147 label: '是否天使投资个人',
131 bindtype: 'investpersonal', 148 bindtype: 'investpersonal',
132 placeholder: '请选择是否天使投资个人', 149 placeholder: '请选择是否天使投资个人',
  150 + selected: '',
133 values: ["否", "是"], 151 values: ["否", "是"],
134 onChange: 'onPickerSelect' 152 onChange: 'onPickerSelect'
135 }, 153 },
@@ -138,6 +156,7 @@ Page({ @@ -138,6 +156,7 @@ Page({
138 label: '出生年月', 156 label: '出生年月',
139 bindtype: 'birthday', 157 bindtype: 'birthday',
140 placeholder: '请选择出生日期', 158 placeholder: '请选择出生日期',
  159 + selected: '',
141 mode: "date", 160 mode: "date",
142 fields: "day", 161 fields: "day",
143 onChange: 'birthdayChange', 162 onChange: 'birthdayChange',
@@ -146,6 +165,7 @@ Page({ @@ -146,6 +165,7 @@ Page({
146 label: '在职受雇日期', 165 label: '在职受雇日期',
147 bindtype: 'startday', 166 bindtype: 'startday',
148 placeholder: '请选择受雇日期', 167 placeholder: '请选择受雇日期',
  168 + selected: '',
149 mode: "date", 169 mode: "date",
150 fields: "day", 170 fields: "day",
151 onChange: 'startChange', 171 onChange: 'startChange',
@@ -154,6 +174,7 @@ Page({ @@ -154,6 +174,7 @@ Page({
154 label: '离职日期', 174 label: '离职日期',
155 bindtype: 'endday', 175 bindtype: 'endday',
156 placeholder: '请选择离职日期', 176 placeholder: '请选择离职日期',
  177 + selected: '',
157 mode: "date", 178 mode: "date",
158 fields: "day", 179 fields: "day",
159 onChange: 'endChange', 180 onChange: 'endChange',
@@ -162,20 +183,29 @@ Page({ @@ -162,20 +183,29 @@ Page({
162 contactaddressInfo: { 183 contactaddressInfo: {
163 label: '联系地址', 184 label: '联系地址',
164 mode: 'region', 185 mode: 'region',
  186 + address_code: ['', '', ''],
  187 + address_value: ['', '', ''],
  188 + selected: '',
165 placeholder: '请选择联系地址', 189 placeholder: '请选择联系地址',
166 - onChange: 'onPickerSelect' 190 + onChange: 'contactAddressSelect'
167 }, 191 },
168 currentaddressInfo: { 192 currentaddressInfo: {
169 label: '居住地', 193 label: '居住地',
170 mode: 'region', 194 mode: 'region',
  195 + address_code: ['', '', ''],
  196 + address_value: ['', '', ''],
  197 + selected: '',
171 placeholder: '请选择居住地', 198 placeholder: '请选择居住地',
172 - onChange: 'onPickerSelect' 199 + onChange: 'currentAddressSelect'
173 }, 200 },
174 birthaddressInfo: { 201 birthaddressInfo: {
175 label: '户籍所在地', 202 label: '户籍所在地',
176 mode: 'region', 203 mode: 'region',
  204 + address_code: ['', '', ''],
  205 + address_value: ['', '', ''],
  206 + selected: '',
177 placeholder: '请选择户籍所在地', 207 placeholder: '请选择户籍所在地',
178 - onChange: 'onPickerSelect' 208 + onChange: 'birthAddressSelect'
179 }, 209 },
180 title:'', 210 title:'',
181 condition: false 211 condition: false
@@ -186,17 +216,12 @@ Page({ @@ -186,17 +216,12 @@ Page({
186 */ 216 */
187 onLoad: function(options) { 217 onLoad: function(options) {
188 console.log('options.id', options.id) 218 console.log('options.id', options.id)
189 - if (!options.id || options.id.length < 0) { 219 + if (options.id && options.id.length > 0) {
190 this.setData({ 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 this.getpersonalTax(options.id) 223 this.getpersonalTax(options.id)
199 - } 224 + }
200 this.getproffessiondata() 225 this.getproffessiondata()
201 this.getbanklist() 226 this.getbanklist()
202 }, 227 },
@@ -212,17 +237,76 @@ Page({ @@ -212,17 +237,76 @@ Page({
212 "Authorization": Authorization 237 "Authorization": Authorization
213 }, 238 },
214 success: function(res) { 239 success: function(res) {
215 - console.log(res) 240 + console.log('taxInfo',res)
216 that.setData({ 241 that.setData({
217 taxInfo: res.data, 242 taxInfo: res.data,
218 isself: res.data.family_ties ? false : true 243 isself: res.data.family_ties ? false : true
219 }) 244 })
  245 + that.handleDatas()
220 }, 246 },
221 fail(res) { 247 fail(res) {
222 console.log(res) 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 getproffessiondata: function() { 311 getproffessiondata: function() {
228 var that = this 312 var that = this
@@ -355,7 +439,7 @@ Page({ @@ -355,7 +439,7 @@ Page({
355 console.log(res.data) 439 console.log(res.data)
356 that.setData({ 440 that.setData({
357 name: res.data.name, 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,6 +456,7 @@ Page({
372 isshow02: !this.data.isshow02 456 isshow02: !this.data.isshow02
373 }) 457 })
374 } else if ("3" == e.target.id) { 458 } else if ("3" == e.target.id) {
  459 + console.log('isshow03', this.data.isshow03)
375 this.setData({ 460 this.setData({
376 isshow03: !this.data.isshow03 461 isshow03: !this.data.isshow03
377 }) 462 })
@@ -487,10 +572,81 @@ Page({ @@ -487,10 +572,81 @@ Page({
487 employeeInfo: employee_data 572 employeeInfo: employee_data
488 }) 573 })
489 break; 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 getIdInfo: function(e) { 650 getIdInfo: function(e) {
495 wx.navigateTo({ 651 wx.navigateTo({
496 url: '../idinfo/idinfo', 652 url: '../idinfo/idinfo',
@@ -498,62 +654,69 @@ Page({ @@ -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 var formdata = e.detail.value; 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 this.showtoast('请输入姓名'); 664 this.showtoast('请输入姓名');
507 return 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 return 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 return 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 return 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 return 680 return
520 } else if (formdata.mobile.length < 1) { 681 } else if (formdata.mobile.length < 1) {
521 this.showtoast('请输入联系电话'); 682 this.showtoast('请输入联系电话');
522 return 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 return 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 return 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 var that = this 705 var that = this
  706 + var formdata = data
  707 + console.log("form_data", formdata);
545 var Authorization = app.globalData.Authorization; 708 var Authorization = app.globalData.Authorization;
546 wx.request({ 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 data: { 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 "native": "中国", 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 "profession": { 720 "profession": {
558 "one_level_code": "1", 721 "one_level_code": "1",
559 "one_level_name": "专业技术人员", 722 "one_level_name": "专业技术人员",
@@ -562,63 +725,66 @@ Page({ @@ -562,63 +725,66 @@ Page({
562 "three_level_code": "111", 725 "three_level_code": "111",
563 "three_level_name": "哲学研究人员" 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 "is_overseas_personnel": "否", 736 "is_overseas_personnel": "否",
574 - "comment": "", 737 + "comment": formdata.comment,
575 "current_address": { 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 "huji_address": { 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 "contact_address": { 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 header: { 779 header: {
617 'content-type': 'application/json', // 默认值 780 'content-type': 'application/json', // 默认值
618 "Authorization": Authorization 781 "Authorization": Authorization
619 }, 782 },
620 - success: function(res) { 783 + success: function (res) {
621 console.log(res) 784 console.log(res)
  785 + wx.redirectTo({
  786 + url: '../home/home',
  787 + })
622 }, 788 },
623 fail(res) { 789 fail(res) {
624 console.log(res) 790 console.log(res)
@@ -626,7 +792,7 @@ Page({ @@ -626,7 +792,7 @@ Page({
626 }) 792 })
627 }, 793 },
628 794
629 - showtoast:function(title){ 795 + showtoast: function (title) {
630 wx.showToast({ 796 wx.showToast({
631 title: title, 797 title: title,
632 }) 798 })
@@ -79,10 +79,10 @@ @@ -79,10 +79,10 @@
79 <text class='text_black_28 float_left'>证照号码</text> 79 <text class='text_black_28 float_left'>证照号码</text>
80 <view wx:if="{{isIdCard}}"> 80 <view wx:if="{{isIdCard}}">
81 <image class='image_camera float_right' src='/images/camera.png'></image> 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 </view> 83 </view>
84 <view wx:else> 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 </view> 86 </view>
87 </view> 87 </view>
88 <view class="divide_line"></view> 88 <view class="divide_line"></view>
@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 <view class="divide_line"></view> 128 <view class="divide_line"></view>
129 <view class='item_body'> 129 <view class='item_body'>
130 <text class='text_666_28 float_left'>纳税人识别号</text> 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 </view> 132 </view>
133 <view class="divide_line"></view> 133 <view class="divide_line"></view>
134 <!-- <view class='item_body'> 134 <!-- <view class='item_body'>
@@ -140,7 +140,7 @@ @@ -140,7 +140,7 @@
140 <view class="divide_line"></view> 140 <view class="divide_line"></view>
141 <view class='item_body'> 141 <view class='item_body'>
142 <text class='text_666_28 float_left'>残疾证号</text> 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 </view> 144 </view>
145 <view class="divide_line"></view> 145 <view class="divide_line"></view>
146 <!-- <view class='item_body'> 146 <!-- <view class='item_body'>
@@ -152,7 +152,7 @@ @@ -152,7 +152,7 @@
152 <view class="divide_line"></view> 152 <view class="divide_line"></view>
153 <view class='item_body'> 153 <view class='item_body'>
154 <text class='text_666_28 float_left'>烈属证号</text> 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 </view> 156 </view>
157 <view class="divide_line"></view> 157 <view class="divide_line"></view>
158 <!-- <view class='item_body'> 158 <!-- <view class='item_body'>
@@ -182,7 +182,7 @@ @@ -182,7 +182,7 @@
182 <view class='item_body'> 182 <view class='item_body'>
183 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> 183 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
184 <text class='text_black_28 float_left'>联系电话</text> 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 </view> 186 </view>
187 <!-- 非必填部分02 --> 187 <!-- 非必填部分02 -->
188 <view hidden='{{!isshow02}}'> 188 <view hidden='{{!isshow02}}'>
@@ -196,7 +196,7 @@ @@ -196,7 +196,7 @@
196 <view class="divide_line"></view> 196 <view class="divide_line"></view>
197 <view class='item_body'> 197 <view class='item_body'>
198 <text class='text_666_28 float_left'>详细地址</text> 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 </view> 200 </view>
201 <view class="divide_line"></view> 201 <view class="divide_line"></view>
202 <!-- <view class='item_body'> 202 <!-- <view class='item_body'>
@@ -208,36 +208,36 @@ @@ -208,36 +208,36 @@
208 <view class="divide_line"></view> 208 <view class="divide_line"></view>
209 <view class='item_body'> 209 <view class='item_body'>
210 <text class='text_666_28 float_left'>银行账号</text> 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 </view> 212 </view>
213 <view class="divide_line"></view> 213 <view class="divide_line"></view>
214 <view class='item_body'> 214 <view class='item_body'>
215 <text class='text_666_28 float_left'>电子邮箱</text> 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 </view> 217 </view>
218 <view class="divide_line"></view> 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 </view> --> 223 </view> -->
224 <template is="picker_cell_normal" data="{{...currentaddressInfo}}" /> 224 <template is="picker_cell_normal" data="{{...currentaddressInfo}}" />
225 <view class="divide_line"></view> 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 </view> 229 </view>
230 <view class="divide_line"></view> 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 </view> --> 235 </view> -->
236 <template is="picker_cell_normal" data="{{...birthaddressInfo}}" /> 236 <template is="picker_cell_normal" data="{{...birthaddressInfo}}" />
237 <view class="divide_line"></view> 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 </view> 241 </view>
242 <view class="divide_line"></view> 242 <view class="divide_line"></view>
243 </view> 243 </view>
@@ -246,92 +246,94 @@ @@ -246,92 +246,94 @@
246 </view> 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 </view> 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 </view> 257 </view>
258 </view> 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 </view> --> 267 </view> -->
268 <template is="picker_cell_normal" data="{{...investInfo}}" /> 268 <template is="picker_cell_normal" data="{{...investInfo}}" />
269 <view class="divide_line"></view> 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 </view> --> 275 </view> -->
276 <template is="picker_cell_normal" data="{{...specificIndustryInfo}}" /> 276 <template is="picker_cell_normal" data="{{...specificIndustryInfo}}" />
  277 + <view class="divide_line"></view>
277 <view hidden='{{!isshow03}}'> 278 <view hidden='{{!isshow03}}'>
278 <view class="divide_line"></view> 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 </view> --> 284 </view> -->
284 <template is="picker_cell_normal" data="{{...employeeInfo}}" /> 285 <template is="picker_cell_normal" data="{{...employeeInfo}}" />
285 <view class="divide_line"></view> 286 <view class="divide_line"></view>
286 - <view class='item_body'> 287 + <view class='item_body '>
287 <text class='text_666_28 float_left'>公司股本总额</text> 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 </view> 290 </view>
290 <view class="divide_line"></view> 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 </view> --> 296 </view> -->
296 <template is="picker_cell_normal" data="{{...startDate}}" /> 297 <template is="picker_cell_normal" data="{{...startDate}}" />
297 298
298 <view class="divide_line"></view> 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 </view> --> 304 </view> -->
304 <template is="picker_cell_normal" data="{{...endDate}}" /> 305 <template is="picker_cell_normal" data="{{...endDate}}" />
  306 +
305 <view class="divide_line"></view> 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 </view> 311 </view>
310 <view class="divide_line"></view> 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 </view> --> 317 </view> -->
316 <template is="picker_cell_normal" data="{{...investpersonalInfo}}" /> 318 <template is="picker_cell_normal" data="{{...investpersonalInfo}}" />
317 <view class="divide_line"></view> 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 </view> 323 </view>
322 <view class="divide_line"></view> 324 <view class="divide_line"></view>
323 </view> 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 </view> 331 </view>
330 </view> 332 </view>
331 333
332 </view> 334 </view>
333 335
334 - <view style='background:#e8e8e8;height:150rpx'></view> 336 + <view style='background:#e8e8e8;height:150rpx '></view>
335 337
336 <button class="btn_bottom" formType="submit"> 保存</button> 338 <button class="btn_bottom" formType="submit"> 保存</button>
337 </form> 339 </form>
@@ -41,6 +41,9 @@ Page({ @@ -41,6 +41,9 @@ Page({
41 'content-type': 'application/json', // 默认值 41 'content-type': 'application/json', // 默认值
42 "Authorization": Authorization 42 "Authorization": Authorization
43 }, 43 },
  44 + data:{
  45 + 'all':true
  46 + },
44 success: function (res) { 47 success: function (res) {
45 console.log(res.data) 48 console.log(res.data)
46 that.setData({ 49 that.setData({
@@ -187,7 +187,7 @@ Page({ @@ -187,7 +187,7 @@ Page({
187 wx.showToast({ 187 wx.showToast({
188 image: "/images/warn.png", 188 image: "/images/warn.png",
189 duration: 1000, 189 duration: 1000,
190 - title: res.data.message?res.data.message:"数据错误" 190 + title: res.data.message ? res.data.message : "数据错误"
191 }); 191 });
192 } 192 }
193 wx.hideLoading() 193 wx.hideLoading()
@@ -199,14 +199,14 @@ Page({ @@ -199,14 +199,14 @@ Page({
199 }) 199 })
200 }, 200 },
201 201
202 - savedata:function(){ 202 + savedata: function() {
203 wx.setStorage({ 203 wx.setStorage({
204 key: 'id_info', 204 key: 'id_info',
205 data: JSON.stringify(this.data.idInfo), 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,10 +220,10 @@ Page({
220 * 生命周期函数--监听页面卸载 220 * 生命周期函数--监听页面卸载
221 */ 221 */
222 onUnload: function() { 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,6 +74,5 @@ module.exports = {
74 yearFormString: yearFormString, 74 yearFormString: yearFormString,
75 monthFormString: monthFormString, 75 monthFormString: monthFormString,
76 dayFormString: dayFormString, 76 dayFormString: dayFormString,
77 - udekapi: udekapi,  
78 isIDCardNum: isIDCardNum 77 isIDCardNum: isIDCardNum
79 } 78 }
注册登录 后发表评论