提交 38f04c9f04070ac92922baecdb0b47bcceccb225

作者 wangyu
1 个父辈 a189f246

优化

@@ -4,29 +4,47 @@ var countryInfo = require('../../../../utils/country.js'); @@ -4,29 +4,47 @@ var countryInfo = require('../../../../utils/country.js');
4 var OSSInit; 4 var OSSInit;
5 var app = getApp(); 5 var app = getApp();
6 var baseUrl = app.globalData.baseUrl; 6 var baseUrl = app.globalData.baseUrl;
7 -const AddTypeNames = { 'children_education': '子女教育', 'continuing_education': '继续教育', 'support_duty': '赡养老人', 'medical_fund': '大病医疗', 'house_fund': '住房' }  
8 -const Deduce_amounts_month = { 'children_education': 1000, 'continuing_education': 400, 'support_duty': 2000, 'medical_fund': 0,'house_fund':0}  
9 -const Deduce_amounts_year = { 'children_education': 12000, 'continuing_education': 4800, 'support_duty': 24000, 'medical_fund': 0, 'house_fund': 0 } 7 +const AddTypeNames = {
  8 + 'children_education': '子女教育',
  9 + 'continuing_education': '继续教育',
  10 + 'support_duty': '赡养老人',
  11 + 'medical_fund': '大病医疗',
  12 + 'house_fund': '住房'
  13 +}
  14 +const Deduce_amounts_month = {
  15 + 'children_education': 1000,
  16 + 'continuing_education': 400,
  17 + 'support_duty': 2000,
  18 + 'medical_fund': 0,
  19 + 'house_fund': 0
  20 +}
  21 +const Deduce_amounts_year = {
  22 + 'children_education': 12000,
  23 + 'continuing_education': 4800,
  24 + 'support_duty': 24000,
  25 + 'medical_fund': 0,
  26 + 'house_fund': 0
  27 +}
10 28
11 Page({ 29 Page({
12 - idcard_belong:null,//照片信息获取返回时判断所属 30 + idcard_belong: null, //照片信息获取返回时判断所属
13 legal_entity_id: "", 31 legal_entity_id: "",
14 - legal_entity:"", 32 + legal_entity: "",
15 data: { 33 data: {
16 - deduction_amount:'', 34 + house_type: "",
  35 + deduction_amount: '',
17 lable: 0, 36 lable: 0,
18 - datas02: [],  
19 title: '', 37 title: '',
20 - isIdCard:true, 38 + isIdCard: true,
21 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], 39 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"],
22 cur_index: 'support_duty', 40 cur_index: 'support_duty',
23 lovercardtypeData: { 41 lovercardtypeData: {
24 - label: '身份证件类型', 42 + label: '配偶证照类型',
25 bindtype: 'lovercardtype', 43 bindtype: 'lovercardtype',
26 selected: '居民身份证', 44 selected: '居民身份证',
27 disabled: true, 45 disabled: true,
28 isblack: 'true', 46 isblack: 'true',
29 - placeholder: '请选择身份证件类型', 47 + placeholder: '请选择证照类型',
30 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', 48 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
31 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证' 49 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
32 ], 50 ],
@@ -51,7 +69,7 @@ Page({ @@ -51,7 +69,7 @@ Page({
51 selected: '', 69 selected: '',
52 isblack: 'true', 70 isblack: 'true',
53 placeholder: '请选择与纳税人的关系', 71 placeholder: '请选择与纳税人的关系',
54 - values: ["父母", "祖父母", "外祖父母"], 72 + values: ["父母", "祖父母外祖父母"],
55 onChange: 'onPickerSelect' 73 onChange: 'onPickerSelect'
56 }, 74 },
57 taxperson_relativeData: { 75 taxperson_relativeData: {
@@ -96,7 +114,7 @@ Page({ @@ -96,7 +114,7 @@ Page({
96 bindtype: 'child_edu_degree', 114 bindtype: 'child_edu_degree',
97 selected: '', 115 selected: '',
98 isblack: 'true', 116 isblack: 'true',
99 - values: ["学前教育(满3岁)", "小学教育", "初中教育", "普通高中教育", "中等职业教育", "大学专科教育", "大学本科教育","硕士研究生教育","博士研究生教育"], 117 + values: ["学前教育(满3岁)", "小学教育", "初中教育", "普通高中教育", "中等职业教育", "大学专科教育", "大学本科教育", "硕士研究生教育", "博士研究生教育"],
100 placeholder: '请选择教育阶段', 118 placeholder: '请选择教育阶段',
101 onChange: 'onPickerSelect' 119 onChange: 'onPickerSelect'
102 }, 120 },
@@ -135,7 +153,7 @@ Page({ @@ -135,7 +153,7 @@ Page({
135 bindtype: 'edu_level', 153 bindtype: 'edu_level',
136 selected: '', 154 selected: '',
137 isblack: 'true', 155 isblack: 'true',
138 - values: ["专科", "本科","硕士研究生","博士研究生","其他"], 156 + values: ["专科", "本科", "硕士研究生", "博士研究生", "其他"],
139 placeholder: '请选择学历教育阶段', 157 placeholder: '请选择学历教育阶段',
140 onChange: 'onPickerSelect' 158 onChange: 'onPickerSelect'
141 }, 159 },
@@ -152,7 +170,7 @@ Page({ @@ -152,7 +170,7 @@ Page({
152 oldercardtypeData: { 170 oldercardtypeData: {
153 label: '被赡养人证件类型', 171 label: '被赡养人证件类型',
154 isrequre: true, 172 isrequre: true,
155 - disabled:true, 173 + disabled: true,
156 bindtype: 'oldercardtype', 174 bindtype: 'oldercardtype',
157 selected: '居民身份证', 175 selected: '居民身份证',
158 isblack: 'true', 176 isblack: 'true',
@@ -218,11 +236,11 @@ Page({ @@ -218,11 +236,11 @@ Page({
218 onChange: 'onPickerSelect', 236 onChange: 'onPickerSelect',
219 mode: "date", 237 mode: "date",
220 fields: "day", 238 fields: "day",
221 - datelong:0, 239 + datelong: 0,
222 start: '1970-01-01', 240 start: '1970-01-01',
223 }, 241 },
224 studyenddate: { 242 studyenddate: {
225 - label: '预计受教育日期止', 243 + label: '教育终止时间',
226 isrequre: true, 244 isrequre: true,
227 bindtype: 'study_end_date', 245 bindtype: 'study_end_date',
228 selected: '', 246 selected: '',
@@ -254,7 +272,7 @@ Page({ @@ -254,7 +272,7 @@ Page({
254 bindtype: 'identify_type', 272 bindtype: 'identify_type',
255 selected: '', 273 selected: '',
256 isblack: 'true', 274 isblack: 'true',
257 - values: ["产权证", "不动产权登记证","出售合同号","预售合同号"], 275 + values: ["产权证", "不动产权登记证", "出售合同号", "预售合同号"],
258 placeholder: '请选择证书类型', 276 placeholder: '请选择证书类型',
259 onChange: 'onPickerSelect' 277 onChange: 'onPickerSelect'
260 }, 278 },
@@ -346,7 +364,7 @@ Page({ @@ -346,7 +364,7 @@ Page({
346 mode: "date", 364 mode: "date",
347 fields: "month", 365 fields: "month",
348 start: '1970-01', 366 start: '1970-01',
349 - datelong:0, 367 + datelong: 0,
350 }, 368 },
351 eduCountryData: { 369 eduCountryData: {
352 label: '就读国家', 370 label: '就读国家',
@@ -379,19 +397,32 @@ Page({ @@ -379,19 +397,32 @@ Page({
379 397
380 var reduce_typeData = this.data.reducetypeData 398 var reduce_typeData = this.data.reducetypeData
381 var deduction_amount 399 var deduction_amount
382 - if (options.reducetype == '月度'){ 400 + if (options.reducetype == '月度') {
383 reduce_typeData.selected = '月度' 401 reduce_typeData.selected = '月度'
384 deduction_amount = Deduce_amounts_month[nameKey] 402 deduction_amount = Deduce_amounts_month[nameKey]
385 - }else { 403 + } else {
386 deduction_amount = Deduce_amounts_year[nameKey] 404 deduction_amount = Deduce_amounts_year[nameKey]
387 reduce_typeData.selected = '年度' 405 reduce_typeData.selected = '年度'
388 } 406 }
  407 + if ("continuing_education" == options.status) {
  408 + var studystart_date = this.data.studystartdate
  409 + studystart_date.label = "入学时间起"
  410 + var studyend_date = this.data.studyenddate
  411 + studyend_date.label = "(预计)毕业时间"
  412 +
  413 + this.setData({
  414 + studystartdate: studystart_date,
  415 + studyenddate: studyend_date
  416 + })
  417 + console.log("studystart_date", this.data.studystartdate);
  418 + }
  419 +
  420 + var title = '添加' + AddTypeNames[nameKey]
389 421
390 - var title = '添加' + (options.title ? options.title : AddTypeNames[nameKey])  
391 -  
392 this.setData({ 422 this.setData({
393 title: title, 423 title: title,
394 cur_index: nameKey, 424 cur_index: nameKey,
  425 + house_type : frontPage.data.house_type,
395 reducetypeData: reduce_typeData, 426 reducetypeData: reduce_typeData,
396 deduction_amount: deduction_amount 427 deduction_amount: deduction_amount
397 }) 428 })
@@ -399,13 +430,13 @@ Page({ @@ -399,13 +430,13 @@ Page({
399 title: title, 430 title: title,
400 }) 431 })
401 this.initOSS() 432 this.initOSS()
402 - if (options.datas && options.datas.length){ 433 + if (options.datas && options.datas.length) {
403 this.handleTransData(JSON.parse(options.datas)) 434 this.handleTransData(JSON.parse(options.datas))
404 } 435 }
405 this.loadCountry() 436 this.loadCountry()
406 }, 437 },
407 438
408 - loadCountry:function(){ 439 + loadCountry: function() {
409 countryInfo.init(this) 440 countryInfo.init(this)
410 var countrylist = this.data.country 441 var countrylist = this.data.country
411 var country_data = this.data.eduCountryData 442 var country_data = this.data.eduCountryData
@@ -416,11 +447,10 @@ Page({ @@ -416,11 +447,10 @@ Page({
416 this.setData({ 447 this.setData({
417 eduCountryData: country_data 448 eduCountryData: country_data
418 }) 449 })
419 -  
420 - },  
421 450
422 - handleTransData: function (data) { 451 + },
423 452
  453 + handleTransData: function(data) {
424 switch (this.data.cur_index + '') { 454 switch (this.data.cur_index + '') {
425 case 'children_education': 455 case 'children_education':
426 var setData = {} 456 var setData = {}
@@ -430,7 +460,7 @@ Page({ @@ -430,7 +460,7 @@ Page({
430 if (data.name && data.name.length) { 460 if (data.name && data.name.length) {
431 setData.children_name = data.name 461 setData.children_name = data.name
432 } 462 }
433 - if (data.birth_date && data.birth_date>0) { 463 + if (data.birth_date && data.birth_date > 0) {
434 var childrenbirthDate = this.data.childrenbirthDate 464 var childrenbirthDate = this.data.childrenbirthDate
435 childrenbirthDate.selected = format.formatTime_date(data.birth_date) 465 childrenbirthDate.selected = format.formatTime_date(data.birth_date)
436 childrenbirthDate.datelong = data.birth_date 466 childrenbirthDate.datelong = data.birth_date
@@ -470,18 +500,10 @@ Page({ @@ -470,18 +500,10 @@ Page({
470 // if (data.relationship && data.relationship.length) { 500 // if (data.relationship && data.relationship.length) {
471 // } 501 // }
472 this.setData(setData) 502 this.setData(setData)
473 - break;  
474 - case 'continuing_education':  
475 - var setData = {}  
476 -  
477 - var studystartdate = this.data.studystartdate  
478 - studystartdate.label = "入学时间起"  
479 - setData.studystartdate = studystartdate  
480 -  
481 - this.setData({  
482 - studystartdate: studystartdate  
483 - })  
484 - break; 503 + break;
  504 + // case '':
  505 + // var setData = {}
  506 + // break;
485 case 'medical_fund': 507 case 'medical_fund':
486 var setData = {} 508 var setData = {}
487 if (data.name && data.name.length) { 509 if (data.name && data.name.length) {
@@ -542,12 +564,12 @@ Page({ @@ -542,12 +564,12 @@ Page({
542 564
543 }, 565 },
544 566
545 - onShow: function () { 567 + onShow: function() {
546 var that = this 568 var that = this
547 var id_error //= this.data.id_error 569 var id_error //= this.data.id_error
548 wx.getStorage({ 570 wx.getStorage({
549 key: 'id_info', 571 key: 'id_info',
550 - success: function (res) { 572 + success: function(res) {
551 console.log('id_info', res.data) 573 console.log('id_info', res.data)
552 if (res.data && res.data.length > 0) { 574 if (res.data && res.data.length > 0) {
553 var id_info = JSON.parse(res.data) 575 var id_info = JSON.parse(res.data)
@@ -560,7 +582,7 @@ Page({ @@ -560,7 +582,7 @@ Page({
560 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-' + id_info.birthday.day; 582 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-' + id_info.birthday.day;
561 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) { 583 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) {
562 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day; 584 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
563 - } 585 + }
564 586
565 if (that.data.name.length > 0 && id_info.name != that.data.name) { 587 if (that.data.name.length > 0 && id_info.name != that.data.name) {
566 that.showtoast("姓名冲突") 588 that.showtoast("姓名冲突")
@@ -575,12 +597,12 @@ Page({ @@ -575,12 +597,12 @@ Page({
575 // children_id_card_no 597 // children_id_card_no
576 // spouse_id_card_no 598 // spouse_id_card_no
577 // older_idno 599 // older_idno
578 - // long_birth_date: Date.parse(new Date(birth_day)) / 1000, 600 + // long_birth_date: Date.parse(new Date(birth_day)) / 1000,
579 // that.data.genderData.selected = id_info.gender 601 // that.data.genderData.selected = id_info.gender
580 // that.data.birthDate.selected = birth_day 602 // that.data.birthDate.selected = birth_day
581 console.log('name***card_number', that.data.name + '***' + that.data.card_number) 603 console.log('name***card_number', that.data.name + '***' + that.data.card_number)
582 604
583 - if (this.idcard_belong == 'children_id_card_no'){ 605 + if (this.idcard_belong == 'children_id_card_no') {
584 this.data.childrenbirthDate.selected = birth_day 606 this.data.childrenbirthDate.selected = birth_day
585 data = { 607 data = {
586 children_id_card_no: id_info.id_card_number, 608 children_id_card_no: id_info.id_card_number,
@@ -603,7 +625,7 @@ Page({ @@ -603,7 +625,7 @@ Page({
603 }) 625 })
604 wx.removeStorage({ 626 wx.removeStorage({
605 key: 'id_info', 627 key: 'id_info',
606 - success: function (res) { 628 + success: function(res) {
607 console.log('remove_idinfo', res) 629 console.log('remove_idinfo', res)
608 }, 630 },
609 }) 631 })
@@ -620,7 +642,7 @@ Page({ @@ -620,7 +642,7 @@ Page({
620 if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { 642 if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) {
621 this.showToast('请填写子女证件号码') 643 this.showToast('请填写子女证件号码')
622 return 644 return
623 - } 645 + }
624 if (!formdata.children_name || formdata.children_name.length < 1) { 646 if (!formdata.children_name || formdata.children_name.length < 1) {
625 this.showToast('请填写子女姓名') 647 this.showToast('请填写子女姓名')
626 return 648 return
@@ -632,7 +654,7 @@ Page({ @@ -632,7 +654,7 @@ Page({
632 if (!formdata.percent || formdata.percent.length < 1) { 654 if (!formdata.percent || formdata.percent.length < 1) {
633 this.showToast('请填写扣除分配比例') 655 this.showToast('请填写扣除分配比例')
634 return 656 return
635 - }else{ 657 + } else {
636 newdata.percent = parseFloat(formdata.percent) 658 newdata.percent = parseFloat(formdata.percent)
637 } 659 }
638 if (!formdata.children_student_no || formdata.children_student_no.length < 1) { 660 if (!formdata.children_student_no || formdata.children_student_no.length < 1) {
@@ -656,7 +678,7 @@ Page({ @@ -656,7 +678,7 @@ Page({
656 return 678 return
657 } 679 }
658 680
659 - if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected){ 681 + if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) {
660 if (!formdata.spouse_name || formdata.spouse_name.length < 1) { 682 if (!formdata.spouse_name || formdata.spouse_name.length < 1) {
661 this.showToast('请填写配偶姓名') 683 this.showToast('请填写配偶姓名')
662 return 684 return
@@ -674,14 +696,14 @@ Page({ @@ -674,14 +696,14 @@ Page({
674 696
675 } 697 }
676 newdata.relationship = this.data.taxperson_relativeData.selected 698 newdata.relationship = this.data.taxperson_relativeData.selected
677 - newdata.children_id_card_type = '1'//this.data.childrencardtypeData.selected 699 + newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected
678 newdata.children_birthday = this.data.childrenbirthDate.datelong 700 newdata.children_birthday = this.data.childrenbirthDate.datelong
679 newdata.education_end = this.data.studystartdate.datelong 701 newdata.education_end = this.data.studystartdate.datelong
680 newdata.education_start = this.data.studyenddate.datelong 702 newdata.education_start = this.data.studyenddate.datelong
681 newdata.education_period = this.data.childedudegreeData.selected 703 newdata.education_period = this.data.childedudegreeData.selected
682 newdata.children_nation = "中国" 704 newdata.children_nation = "中国"
683 - newdata.spouse_id_card_type = '1'//this.data.lovercardtypeData.selected  
684 - newdata.spouse_birthday = this.data.loverbirthDate.datelong > 0 ? this.data.loverbirthDate.datelong: 0 705 + newdata.spouse_id_card_type = '1' //this.data.lovercardtypeData.selected
  706 + newdata.spouse_birthday = this.data.loverbirthDate.datelong > 0 ? this.data.loverbirthDate.datelong : 0
685 newdata.nation = "中国" 707 newdata.nation = "中国"
686 break; 708 break;
687 case 'continuing_education': 709 case 'continuing_education':
@@ -705,7 +727,7 @@ Page({ @@ -705,7 +727,7 @@ Page({
705 } 727 }
706 newdata.education_start = this.data.studystartdate.datelong 728 newdata.education_start = this.data.studystartdate.datelong
707 newdata.education_end = this.data.studyenddate.datelong 729 newdata.education_end = this.data.studyenddate.datelong
708 - newdata.education_type = 'title'//学历 730 + newdata.education_type = 'title' //学历
709 newdata.education_period = this.data.edulevelData.selected 731 newdata.education_period = this.data.edulevelData.selected
710 } else if (this.data.edu_lable == 'tech') { 732 } else if (this.data.edu_lable == 'tech') {
711 if (this.data.edustyleData.selected.length < 1) { 733 if (this.data.edustyleData.selected.length < 1) {
@@ -872,28 +894,28 @@ Page({ @@ -872,28 +894,28 @@ Page({
872 if (this.data.reducetypeData.selected.length < 1) { 894 if (this.data.reducetypeData.selected.length < 1) {
873 this.showToast('请选择扣除方式') 895 this.showToast('请选择扣除方式')
874 return 896 return
875 - } 897 + }
876 // else if (!formdata.reduce_money || formdata.reduce_money.length < 1) { 898 // else if (!formdata.reduce_money || formdata.reduce_money.length < 1) {
877 // this.showToast('请填写扣除金额') 899 // this.showToast('请填写扣除金额')
878 // return 900 // return
879 // } 901 // }
880 - if (this.data.cur_index != 'medical_fund'){  
881 - newdata.deduction_type = this.data.reducetypeData.selected=='月度'?"month":"year"  
882 - newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money 902 + if (this.data.cur_index != 'medical_fund') {
  903 + newdata.deduction_type = this.data.reducetypeData.selected == '月度' ? "month" : "year"
  904 + newdata.deduction_amount = this.data.deduction_amount //formdata.reduce_money
883 } 905 }
884 newdata.legal_entity_id = this.legal_entity_id 906 newdata.legal_entity_id = this.legal_entity_id
885 newdata.legal_entity = this.legal_entity 907 newdata.legal_entity = this.legal_entity
886 this.addDatas(newdata, subUrl) 908 this.addDatas(newdata, subUrl)
887 }, 909 },
888 910
889 - addDatas: function (newdata,subUrl){ 911 + addDatas: function(newdata, subUrl) {
890 wx.showModal({ 912 wx.showModal({
891 title: '确认要提交申报吗?', 913 title: '确认要提交申报吗?',
892 content: '确认后将不能修改', 914 content: '确认后将不能修改',
893 showCancel: true, 915 showCancel: true,
894 - confirmColor:'#357AEB',  
895 - cancelColor:'#999',  
896 - success: function (res) { 916 + confirmColor: '#357AEB',
  917 + cancelColor: '#999',
  918 + success: function(res) {
897 if (res.confirm) { 919 if (res.confirm) {
898 var that = this; 920 var that = this;
899 var Authorization = app.globalData.Authorization; 921 var Authorization = app.globalData.Authorization;
@@ -913,18 +935,17 @@ Page({ @@ -913,18 +935,17 @@ Page({
913 } 935 }
914 } 936 }
915 }) 937 })
916 - } else if (res.cancel) {  
917 - } 938 + } else if (res.cancel) {}
918 } 939 }
919 }) 940 })
920 }, 941 },
921 942
922 - getIdInfo: function (e) { 943 + getIdInfo: function(e) {
923 this.idcard_belong = e.currentTarget.id 944 this.idcard_belong = e.currentTarget.id
924 if (this.data.isIdCard) { 945 if (this.data.isIdCard) {
925 wx.navigateTo({ 946 wx.navigateTo({
926 url: '../../taxperson/idinfo/idinfo', 947 url: '../../taxperson/idinfo/idinfo',
927 - success: function (res) { }, 948 + success: function(res) {},
928 }) 949 })
929 } 950 }
930 }, 951 },
@@ -1000,13 +1021,13 @@ Page({ @@ -1000,13 +1021,13 @@ Page({
1000 childedudegreeData: childedudegreeData 1021 childedudegreeData: childedudegreeData
1001 }) 1022 })
1002 break; 1023 break;
1003 - // case 'edu_degree':  
1004 - // var edudegree_data = this.data.edudegreeData  
1005 - // edudegree_data.selected = edudegree_data.values[e.detail.value]  
1006 - // this.setData({  
1007 - // edudegreeData: edudegree_data  
1008 - // })  
1009 - // break; 1024 + // case 'edu_degree':
  1025 + // var edudegree_data = this.data.edudegreeData
  1026 + // edudegree_data.selected = edudegree_data.values[e.detail.value]
  1027 + // this.setData({
  1028 + // edudegreeData: edudegree_data
  1029 + // })
  1030 + // break;
1010 case 'edu_country': 1031 case 'edu_country':
1011 var eduCountry_data = this.data.eduCountryData 1032 var eduCountry_data = this.data.eduCountryData
1012 eduCountry_data.selected = eduCountry_data.values[e.detail.value] 1033 eduCountry_data.selected = eduCountry_data.values[e.detail.value]
@@ -1033,9 +1054,9 @@ Page({ @@ -1033,9 +1054,9 @@ Page({
1033 var older_birthDate = this.data.olderbirthDate 1054 var older_birthDate = this.data.olderbirthDate
1034 older_birthDate.selected = e.detail.value 1055 older_birthDate.selected = e.detail.value
1035 older_birthDate.datelong = Date.parse(new Date(e.detail.value)) / 1000, 1056 older_birthDate.datelong = Date.parse(new Date(e.detail.value)) / 1000,
1036 - this.setData({  
1037 - olderbirthDate: older_birthDate  
1038 - }) 1057 + this.setData({
  1058 + olderbirthDate: older_birthDate
  1059 + })
1039 break; 1060 break;
1040 case 'reduce_type': 1061 case 'reduce_type':
1041 var reduce_typeData = this.data.reducetypeData 1062 var reduce_typeData = this.data.reducetypeData
@@ -1159,7 +1180,7 @@ Page({ @@ -1159,7 +1180,7 @@ Page({
1159 var reducedate_data = this.data.reducedateData 1180 var reducedate_data = this.data.reducedateData
1160 reducedate_data.selected = e.detail.value 1181 reducedate_data.selected = e.detail.value
1161 reducedate_data.datelong = Date.parse(new Date(e.detail.value)) / 1000, 1182 reducedate_data.datelong = Date.parse(new Date(e.detail.value)) / 1000,
1162 - console.log('reduce_date', Date.parse(new Date(e.detail.value))) 1183 + console.log('reduce_date', Date.parse(new Date(e.detail.value)))
1163 this.setData({ 1184 this.setData({
1164 reducedateData: reducedate_data 1185 reducedateData: reducedate_data
1165 }) 1186 })
@@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@
127 <view class='divide_line_f5f5f5'></view> 127 <view class='divide_line_f5f5f5'></view>
128 <view style='height:90rpx'> 128 <view style='height:90rpx'>
129 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 129 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
130 - <text class='text_black_30 float_left'>被赡养人证号码</text> 130 + <text class='text_black_30 float_left'>被赡养人证号码</text>
131 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:420rpx;' placeholder='请输入证件号码' type='idcard' name='older_idno' value='{{older_idno}}'></input> 131 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:420rpx;' placeholder='请输入证件号码' type='idcard' name='older_idno' value='{{older_idno}}'></input>
132 </view> 132 </view>
133 <view class='divide_line_f5f5f5'></view> 133 <view class='divide_line_f5f5f5'></view>
@@ -142,6 +142,13 @@ @@ -142,6 +142,13 @@
142 142
143 <template is="picker_cell_normal" data="{{...older_relativeData}}" /> 143 <template is="picker_cell_normal" data="{{...older_relativeData}}" />
144 144
  145 +<view class='divide_line_f5f5f5'></view>
  146 +<view style='height:90rpx;'>
  147 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  148 + <text class='text_black_30 float_left'>分摊比例</text>
  149 + <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
  150 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分摊比例' type='number' name='percent' value='{{percent}}'></input>
  151 + </view>
145 <!-- <view class='divide_line_f5f5f5'></view> 152 <!-- <view class='divide_line_f5f5f5'></view>
146 <view style='height:90rpx'> 153 <view style='height:90rpx'>
147 <text class='text_black_30 float_left'>分摊比例</text> 154 <text class='text_black_30 float_left'>分摊比例</text>
@@ -182,7 +189,7 @@ @@ -182,7 +189,7 @@
182 <!-- 住房 --> 189 <!-- 住房 -->
183 <view wx:if="{{cur_index=='house_fund'}}" style='padding:0 30rpx;'> 190 <view wx:if="{{cur_index=='house_fund'}}" style='padding:0 30rpx;'>
184 191
185 - <view wx:if="{{title=='添加住房贷款利息'}}"> 192 + <view wx:if="{{house_type=='house_fund_loan'}}">
186 193
187 <template is="picker_cell_normal" data="{{...houseLocateInfo}}" /> 194 <template is="picker_cell_normal" data="{{...houseLocateInfo}}" />
188 <view class='divide_line_f5f5f5'></view> 195 <view class='divide_line_f5f5f5'></view>
@@ -204,7 +211,7 @@ @@ -204,7 +211,7 @@
204 <view class='divide_line_f5f5f5'></view> 211 <view class='divide_line_f5f5f5'></view>
205 <template is="picker_cell_normal" data="{{...loandatelongData}}" /> 212 <template is="picker_cell_normal" data="{{...loandatelongData}}" />
206 </view> 213 </view>
207 - <view wx:if="{{title=='添加住房租金'}}"> 214 + <view wx:if="{{house_type=='house_fund_rent'}}">
208 <template is="picker_cell_normal" data="{{...contactLocateInfo}}" /> 215 <template is="picker_cell_normal" data="{{...contactLocateInfo}}" />
209 <view class='divide_line_f5f5f5'></view> 216 <view class='divide_line_f5f5f5'></view>
210 <template is="picker_cell_normal" data="{{...leasetypeData}}" /> 217 <template is="picker_cell_normal" data="{{...leasetypeData}}" />
@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 cur_status: "", 11 cur_status: "",
12 legal_entity_id: "", 12 legal_entity_id: "",
13 legal_entity: "", 13 legal_entity: "",
  14 + house_type:"",
14 declareStatus: { 15 declareStatus: {
15 "to_declare": "待申报", 16 "to_declare": "待申报",
16 "declaring": "申报中", 17 "declaring": "申报中",
@@ -125,6 +126,7 @@ Page({ @@ -125,6 +126,7 @@ Page({
125 126
126 handleAddition: function(data) { 127 handleAddition: function(data) {
127 var newdata = data.items 128 var newdata = data.items
  129 + var housetype = ""
128 for (var i = 0; i < newdata.length; i++) { 130 for (var i = 0; i < newdata.length; i++) {
129 if (newdata[i].education_start && newdata[i].education_start > 0) { 131 if (newdata[i].education_start && newdata[i].education_start > 0) {
130 newdata[i].education_start = format.formatTime_date(newdata[i].education_start) 132 newdata[i].education_start = format.formatTime_date(newdata[i].education_start)
@@ -133,7 +135,9 @@ Page({ @@ -133,7 +135,9 @@ Page({
133 newdata[i].education_end = format.formatTime_date(newdata[i].education_end) 135 newdata[i].education_end = format.formatTime_date(newdata[i].education_end)
134 } 136 }
135 } 137 }
  138 +
136 this.setData({ 139 this.setData({
  140 + house_type: "house_fund" == this.data.cur_status ? newdata[0].type:"",
137 additionInfo: newdata 141 additionInfo: newdata
138 }) 142 })
139 }, 143 },
@@ -204,6 +208,7 @@ Page({ @@ -204,6 +208,7 @@ Page({
204 var that = this 208 var that = this
205 var modalinfo, senddata 209 var modalinfo, senddata
206 if (this.data.cur_status == 'continuing_education' || this.data.cur_status == 'house_fund') { 210 if (this.data.cur_status == 'continuing_education' || this.data.cur_status == 'house_fund') {
  211 +
207 wx.navigateTo({ 212 wx.navigateTo({
208 url: '../addextrainfo/addextrainfo?datas=' + '' + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex], 213 url: '../addextrainfo/addextrainfo?datas=' + '' + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex],
209 }) 214 })
@@ -335,7 +340,7 @@ Page({ @@ -335,7 +340,7 @@ Page({
335 }) 340 })
336 }, 341 },
337 342
338 - modalLeft: function() { //modal取消(添加) 343 + modalLeft: function() { //modal(添加)
339 this.setData({ 344 this.setData({
340 showModal_addtype: false 345 showModal_addtype: false
341 }) 346 })
@@ -62,14 +62,18 @@ @@ -62,14 +62,18 @@
62 <view style='padding-right:30rpx'> 62 <view style='padding-right:30rpx'>
63 <view class='divide_line_f5f5f5'></view> 63 <view class='divide_line_f5f5f5'></view>
64 <view style='height:70rpx'> 64 <view style='height:70rpx'>
65 - <text class='text_999_28 ' style='line-height:70rpx'>教育类别:</text> 65 + <text class='text_999_28 ' style='line-height:70rpx'>继续教育情况:</text>
66 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{}}</text> 66 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{}}</text>
67 </view> 67 </view>
68 <view style='height:70rpx'> 68 <view style='height:70rpx'>
69 - <text class='text_999_28 ' style='line-height:70rpx'>教育类型:</text> 69 + <text class='text_999_28 ' style='line-height:70rpx'>继续教育类型:</text>
70 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type}}</text> 70 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type}}</text>
71 </view> 71 </view>
72 <view style='height:70rpx'> 72 <view style='height:70rpx'>
  73 + <text class='text_999_28 ' style='line-height:70rpx'>发证(批准)日期</text>
  74 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{2018-09-09}}</text>
  75 + </view>
  76 + <view style='height:70rpx'>
73 <text class='text_999_28 ' style='line-height:70rpx'>证书名称:</text> 77 <text class='text_999_28 ' style='line-height:70rpx'>证书名称:</text>
74 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.certification_name}}</text> 78 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.certification_name}}</text>
75 </view> 79 </view>
@@ -101,19 +105,19 @@ @@ -101,19 +105,19 @@
101 <view style='padding-right:right'> 105 <view style='padding-right:right'>
102 <view class='divide_line_f5f5f5'></view> 106 <view class='divide_line_f5f5f5'></view>
103 <view style='height:70rpx'> 107 <view style='height:70rpx'>
104 - <text class='text_999_28 ' style='line-height:70rpx'>教育类别:</text> 108 + <text class='text_999_28 ' style='line-height:70rpx'>继续教育情况:</text>
105 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type}}</text> 109 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type}}</text>
106 </view> 110 </view>
107 <view style='height:70rpx'> 111 <view style='height:70rpx'>
108 - <text class='text_999_28 ' style='line-height:70rpx'>教育阶段:</text> 112 + <text class='text_999_28 ' style='line-height:70rpx'>教育阶段:</text>
109 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_period}}</text> 113 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_period}}</text>
110 </view> 114 </view>
111 <view style='height:70rpx'> 115 <view style='height:70rpx'>
112 - <text class='text_999_28 ' style='line-height:70rpx'>受教育日期起:</text> 116 + <text class='text_999_28 ' style='line-height:70rpx'>入学时间起:</text>
113 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>1234</text> 117 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>1234</text>
114 </view> 118 </view>
115 <view style='height:70rpx'> 119 <view style='height:70rpx'>
116 - <text class='text_999_28 ' style='line-height:70rpx'>受教育日期止:</text> 120 + <text class='text_999_28 ' style='line-height:70rpx'>(预计)毕业时间</text>
117 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>123</text> 121 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>123</text>
118 </view> 122 </view>
119 <view style='height:70rpx'> 123 <view style='height:70rpx'>
注册登录 后发表评论