提交 c66ad02a6c6b99774b1ca375d52011137aa12f11

作者 wangyu
1 个父辈 31a90dfe

优化

@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 lable: 0, 11 lable: 0,
12 datas02: [], 12 datas02: [],
13 title: '', 13 title: '',
  14 + isIdCard:true,
14 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], 15 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"],
15 cur_index: 0, 16 cur_index: 0,
16 lovercardtypeData: { 17 lovercardtypeData: {
@@ -46,9 +47,9 @@ Page({ @@ -46,9 +47,9 @@ Page({
46 onChange: 'onPickerSelect' 47 onChange: 'onPickerSelect'
47 }, 48 },
48 childrencardtypeData: { 49 childrencardtypeData: {
49 - label: '身份证件类型', 50 + label: '子女身份证件类型',
50 bindtype: 'childrencardtype', 51 bindtype: 'childrencardtype',
51 - selected: '', 52 + selected: '居民身份证',
52 isblack: 'true', 53 isblack: 'true',
53 placeholder: '请选择身份证件类型', 54 placeholder: '请选择身份证件类型',
54 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', 55 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
@@ -68,6 +69,15 @@ Page({ @@ -68,6 +69,15 @@ Page({
68 end: '2018-01-01', 69 end: '2018-01-01',
69 onChange: 'onPickerSelect', 70 onChange: 'onPickerSelect',
70 }, 71 },
  72 + childedudegreeData: {
  73 + label: '子女受教育阶段',
  74 + bindtype: 'edu_degree',
  75 + selected: '',
  76 + isblack: 'true',
  77 + values: ["学前教育(满3岁)", "小学教育", "初中教育", "普通高中教育", "中等职业教育", "大学专科教育", "大学本科教育","硕士研究生教育","博士研究生教育"],
  78 + placeholder: '请选择教育阶段',
  79 + onChange: 'onPickerSelect'
  80 + },
71 edudegreeData: { 81 edudegreeData: {
72 label: '教育阶段', 82 label: '教育阶段',
73 bindtype: 'edu_degree', 83 bindtype: 'edu_degree',
@@ -78,11 +88,20 @@ Page({ @@ -78,11 +88,20 @@ Page({
78 onChange: 'onPickerSelect' 88 onChange: 'onPickerSelect'
79 }, 89 },
80 edutypeData: { 90 edutypeData: {
  91 + label: '教育类别',
  92 + bindtype: 'edu_style',
  93 + selected: '',
  94 + isblack: 'true',
  95 + values: ["职业能力", "专业能力"],
  96 + placeholder: '请选择教育类别',
  97 + onChange: 'onPickerSelect'
  98 + },
  99 + edutypeData: {
81 label: '教育类型', 100 label: '教育类型',
82 bindtype: 'edu_type', 101 bindtype: 'edu_type',
83 selected: '', 102 selected: '',
84 isblack: 'true', 103 isblack: 'true',
85 - values: ["学历教育", "技能职业资格", "专业职业资格"], 104 + values: ["学历教育", "非学历教育"],
86 placeholder: '请选择教育类型', 105 placeholder: '请选择教育类型',
87 onChange: 'onPickerSelect' 106 onChange: 'onPickerSelect'
88 }, 107 },
@@ -91,7 +110,7 @@ Page({ @@ -91,7 +110,7 @@ Page({
91 bindtype: 'support_type', 110 bindtype: 'support_type',
92 selected: '', 111 selected: '',
93 isblack: 'true', 112 isblack: 'true',
94 - values: ["独立赡养", "共同赡养"], 113 + values: ["独生子女", "非独生子女"],
95 placeholder: '请选择赡养类型', 114 placeholder: '请选择赡养类型',
96 onChange: 'onPickerSelect' 115 onChange: 'onPickerSelect'
97 }, 116 },
@@ -141,7 +160,7 @@ Page({ @@ -141,7 +160,7 @@ Page({
141 reducetypeData: { 160 reducetypeData: {
142 label: '扣除方式', 161 label: '扣除方式',
143 bindtype: 'reduce_type', 162 bindtype: 'reduce_type',
144 - selected: '', 163 + selected: '月度扣除',
145 isblack: 'true', 164 isblack: 'true',
146 values: ["月度扣除", "年度扣除"], 165 values: ["月度扣除", "年度扣除"],
147 placeholder: '请选择扣除方式', 166 placeholder: '请选择扣除方式',
@@ -157,6 +176,7 @@ Page({ @@ -157,6 +176,7 @@ Page({
157 onChange: 'onPickerSelect', 176 onChange: 'onPickerSelect',
158 mode: "date", 177 mode: "date",
159 fields: "day", 178 fields: "day",
  179 + datelong:0,
160 start: '1970-01-01', 180 start: '1970-01-01',
161 }, 181 },
162 studyenddate: { 182 studyenddate: {
@@ -170,13 +190,14 @@ Page({ @@ -170,13 +190,14 @@ Page({
170 mode: "date", 190 mode: "date",
171 fields: "day", 191 fields: "day",
172 start: '1970-01-01', 192 start: '1970-01-01',
  193 + datelong: 0,
173 }, 194 },
174 identifytypeData: { 195 identifytypeData: {
175 label: '证书类型', 196 label: '证书类型',
176 bindtype: 'identify_type', 197 bindtype: 'identify_type',
177 selected: '', 198 selected: '',
178 isblack: 'true', 199 isblack: 'true',
179 - values: ["产权证", "不动产权登记证"], 200 + values: ["产权证", "不动产权登记证","出售合同号","预售合同号"],
180 placeholder: '请选择证书类型', 201 placeholder: '请选择证书类型',
181 onChange: 'onPickerSelect' 202 onChange: 'onPickerSelect'
182 }, 203 },
@@ -220,6 +241,7 @@ Page({ @@ -220,6 +241,7 @@ Page({
220 mode: "date", 241 mode: "date",
221 fields: "day", 242 fields: "day",
222 start: '2018-01-01', 243 start: '2018-01-01',
  244 + datelong: 0,
223 }, 245 },
224 leasestartDate: { 246 leasestartDate: {
225 label: '租赁期起', 247 label: '租赁期起',
@@ -232,6 +254,7 @@ Page({ @@ -232,6 +254,7 @@ Page({
232 mode: "date", 254 mode: "date",
233 fields: "day", 255 fields: "day",
234 start: '2000-01-01', 256 start: '2000-01-01',
  257 + datelong: 0,
235 }, 258 },
236 leaseendDate: { 259 leaseendDate: {
237 label: '租赁期止', 260 label: '租赁期止',
@@ -244,6 +267,7 @@ Page({ @@ -244,6 +267,7 @@ Page({
244 mode: "date", 267 mode: "date",
245 fields: "day", 268 fields: "day",
246 start: '2000-01-01', 269 start: '2000-01-01',
  270 + datelong: 0,
247 }, 271 },
248 loandatelongData: { 272 loandatelongData: {
249 label: '贷款期限(月数)', 273 label: '贷款期限(月数)',
@@ -265,10 +289,10 @@ Page({ @@ -265,10 +289,10 @@ Page({
265 mode: "date", 289 mode: "date",
266 fields: "month", 290 fields: "month",
267 start: '1970-01', 291 start: '1970-01',
  292 + datelong:0,
268 }, 293 },
269 edu_lable: "", 294 edu_lable: "",
270 oldersupport_lable: "", 295 oldersupport_lable: "",
271 - long_reduce_date: 0,  
272 img_path: "/images/upload_img.png" 296 img_path: "/images/upload_img.png"
273 }, 297 },
274 298
@@ -278,16 +302,6 @@ Page({ @@ -278,16 +302,6 @@ Page({
278 onLoad: function(options) { 302 onLoad: function(options) {
279 var that = this 303 var that = this
280 console.log("options", options); 304 console.log("options", options);
281 - wx.getStorage({  
282 - key: 'selectitems',  
283 - success: function(res) {  
284 - console.log("selectitems", res.data)  
285 - that.setData({  
286 - datas02: res.data  
287 - })  
288 - },  
289 -  
290 - })  
291 this.setData({ 305 this.setData({
292 title: '添加' + options.title, 306 title: '添加' + options.title,
293 cur_index: options.index 307 cur_index: options.index
@@ -352,27 +366,23 @@ Page({ @@ -352,27 +366,23 @@ Page({
352 var newdata = formdata; 366 var newdata = formdata;
353 switch (this.data.cur_index + '') { 367 switch (this.data.cur_index + '') {
354 case '0': 368 case '0':
355 - if (!formdata.lover_name || formdata.lover_name.length < 1) { 369 + if (!formdata.spouse_name || formdata.spouse_name.length < 1) {
356 this.showToast('请填写配偶姓名') 370 this.showToast('请填写配偶姓名')
357 return 371 return
358 - } else if (!formdata.lover_idno || formdata.lover_idno.length < 1) { 372 + } else if (!formdata.spouse_id_card_no || formdata.spouse_id_card_no.length < 1) {
359 this.showToast('请填写配偶证件号码') 373 this.showToast('请填写配偶证件号码')
360 return 374 return
361 } else if (!formdata.children_name || formdata.children_name.length < 1) { 375 } else if (!formdata.children_name || formdata.children_name.length < 1) {
362 this.showToast('请填写子女姓名') 376 this.showToast('请填写子女姓名')
363 return 377 return
364 - } else if (!formdata.children_idno || formdata.children_idno.length < 1) {  
365 - this.showToast('请填写子女身份证号') 378 + } else if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) {
  379 + this.showToast('请填写子女证件号码')
366 return 380 return
367 - } else if (!formdata.children_schoolno || formdata.children_schoolno.length < 1) { 381 + } else if (!formdata.children_student_no || formdata.children_student_no.length < 1) {
368 this.showToast('请填写学籍号') 382 this.showToast('请填写学籍号')
369 return 383 return
370 } 384 }
371 - // else if (!formdata.reduce_money || formdata.reduce_money< 0) {  
372 - // this.showToast('请填写扣除金额')  
373 - // return  
374 - // }  
375 - else if (!formdata.reduce_ratio || formdata.reduce_ratio.length < 1) { 385 + else if (!formdata.percent || formdata.percent.length < 1) {
376 this.showToast('请填写扣除比例') 386 this.showToast('请填写扣除比例')
377 return 387 return
378 } 388 }
@@ -404,18 +414,20 @@ Page({ @@ -404,18 +414,20 @@ Page({
404 this.showToast('请选择受教育日期') 414 this.showToast('请选择受教育日期')
405 return 415 return
406 } 416 }
407 - if (this.data.edudegreeData.selected.length < 1) { 417 + if (this.data.childedudegreeData.selected.length < 1) {
408 this.showToast('请选择教育阶段') 418 this.showToast('请选择教育阶段')
409 return 419 return
410 } 420 }
411 - newdata.lover_cardtype = this.data.lovercardtypeData.selected  
412 - newdata.lover_birthdate = this.data.loverbirthDate.selected  
413 - newdata.taxperson_relative = this.data.taxperson_relativeData.selected  
414 - newdata.children_cardtype = this.data.childrencardtypeData.selected  
415 - newdata.children_birthDate = this.data.childrenbirthDate.selected  
416 - newdata.study_startdate = this.data.studystartdate.selected  
417 - newdata.study_enddate = this.data.studyenddate.selected  
418 - newdata.edu_degree = this.data.edudegreeData.selected 421 + newdata.spouse_id_card_type = this.data.lovercardtypeData.selected
  422 + newdata.spouse_birthday = this.data.loverbirthDate.selected
  423 + newdata.relationship = this.data.taxperson_relativeData.selected
  424 + newdata.children_id_card_type = this.data.childrencardtypeData.selected
  425 + newdata.children_birthday = this.data.childrenbirthDate.selected
  426 + newdata.education_end = this.data.studystartdate.datelong
  427 + newdata.education_start = this.data.studyenddate.datelong
  428 + newdata.education_period = this.data.childedudegreeData.selected
  429 + newdata.children_nation = "中国"
  430 + newdata.nation = "中国"
419 break; 431 break;
420 case '1': 432 case '1':
421 if (this.data.edutypeData.selected.length < 1) { 433 if (this.data.edutypeData.selected.length < 1) {
@@ -596,22 +608,41 @@ Page({ @@ -596,22 +608,41 @@ Page({
596 this.showToast('请填写扣除金额') 608 this.showToast('请填写扣除金额')
597 return 609 return
598 } 610 }
599 - newdata.reduce_type = this.data.reducetypeData.selected  
600 - this.gosave(newdata) 611 + newdata.deduction_type = this.data.reducetypeData.selected
  612 + newdata.deduction_amount = formdata.reduce_money
  613 + newdata.legal_entity = ""
  614 + newdata.legal_entity_id = ""
  615 + this.addDatas(newdata)
601 }, 616 },
602 617
603 - gosave: function(data) {  
604 - var selectitems = this.data.datas02;  
605 - selectitems[this.data.cur_index].path = this.data.img_path  
606 - selectitems[this.data.cur_index].data = data  
607 - wx.setStorage({  
608 - key: 'selectitems',  
609 - data: selectitems, 618 + addDatas: function (newdata){
  619 + var that = this;
  620 + var Authorization = app.globalData.Authorization;
  621 + wx.request({
  622 + url: baseUrl + 'persontax/v1/children-educations',
  623 + method: "POST",
  624 + header: {
  625 + 'content-type': 'application/json',
  626 + "Authorization": Authorization
  627 + },
  628 + data: newdata,
  629 + success(res){
  630 + if (res&&res.statusCode==200){
  631 + wx.navigateBack({
  632 + delta: 1
  633 + })
  634 + }
  635 + }
610 }) 636 })
  637 + },
611 638
612 - wx.navigateBack({  
613 - delta: 1  
614 - }) 639 + getIdInfo: function (e) {
  640 + if (this.data.isIdCard) {
  641 + wx.navigateTo({
  642 + url: '../../taxperson/idinfo/idinfo',
  643 + success: function (res) { },
  644 + })
  645 + }
615 }, 646 },
616 647
617 onPickerSelect: function(e) { 648 onPickerSelect: function(e) {
@@ -656,6 +687,7 @@ Page({ @@ -656,6 +687,7 @@ Page({
656 case 'study_start_date': 687 case 'study_start_date':
657 var study_startdate = this.data.studystartdate 688 var study_startdate = this.data.studystartdate
658 study_startdate.selected = e.detail.value 689 study_startdate.selected = e.detail.value
  690 + study_startdate.datelong = (Date.parse(new Date(e.detail.value)) / 1000)
659 this.setData({ 691 this.setData({
660 studystartdate: study_startdate 692 studystartdate: study_startdate
661 }) 693 })
@@ -663,6 +695,7 @@ Page({ @@ -663,6 +695,7 @@ Page({
663 case 'study_end_date': 695 case 'study_end_date':
664 var study_enddate = this.data.studyenddate 696 var study_enddate = this.data.studyenddate
665 study_enddate.selected = e.detail.value 697 study_enddate.selected = e.detail.value
  698 + study_enddate.datelong = (Date.parse(new Date(e.detail.value)) / 1000)
666 this.setData({ 699 this.setData({
667 studyenddate: study_enddate 700 studyenddate: study_enddate
668 }) 701 })
@@ -787,9 +820,9 @@ Page({ @@ -787,9 +820,9 @@ Page({
787 case 'reduce_date': 820 case 'reduce_date':
788 var reducedate_data = this.data.reducedateData 821 var reducedate_data = this.data.reducedateData
789 reducedate_data.selected = e.detail.value 822 reducedate_data.selected = e.detail.value
  823 + reducedate_data.datelong = Date.parse(new Date(e.detail.value)) / 1000,
790 console.log('reduce_date', Date.parse(new Date(e.detail.value))) 824 console.log('reduce_date', Date.parse(new Date(e.detail.value)))
791 this.setData({ 825 this.setData({
792 - long_reduce_date: Date.parse(new Date(e.detail.value)) / 1000,  
793 reducedateData: reducedate_data 826 reducedateData: reducedate_data
794 }) 827 })
795 break; 828 break;
@@ -800,79 +833,79 @@ Page({ @@ -800,79 +833,79 @@ Page({
800 // }) 833 // })
801 }, 834 },
802 835
803 - goupload: function(e) {  
804 - console.log(e)  
805 - var that = this  
806 - wx.chooseImage({  
807 - sourceType: ['camera', 'album'],  
808 - // sizeType: ['original'],  
809 - count: 1,  
810 - success: function(res) {  
811 - console.log('success', res)  
812 - that.setData({  
813 - img_path: res.tempFilePaths[0]  
814 - })  
815 - that.uploadImage(that.data.img_path)  
816 - }  
817 - })  
818 - },  
819 -  
820 - uploadImage: function(path) {  
821 - var that = this  
822 - wx.showLoading({  
823 - title: '上传图片中...',  
824 - })  
825 - console.log('key', 'imagepath_' + path.substring(path.length - 10, path.length))  
826 - wx.uploadFile({  
827 - url: getApp().globalData.OSSUrl,  
828 - filePath: path,  
829 - name: 'file',  
830 - formData: {  
831 - 'key': 'imagepath_' + path.substring(path.length - 15, path.length),  
832 - 'OSSAccessKeyId': OSSInit.access_key_id,  
833 - 'policy': OSSInit.policy,  
834 - 'signature': OSSInit.signature,  
835 - 'callback': OSSInit.callback_body,  
836 - 'x:access_token': OSSInit.callback_token,  
837 - 'success_action_status': '200',  
838 - },  
839 - success: function(res) {  
840 - console.log('uploadFile', res.data)  
841 - if (res.statusCode == 200) {  
842 - var data = JSON.parse(res.data)  
843 - console.log('上传成功', res)  
844 - that.oss_bucket = data.bucket  
845 -  
846 - } else {  
847 - var title = '图片上传失败,请重新上传'  
848 - if (res.statusCode == 413) {  
849 - title = '图片体积过大,请选择较小图片上传'  
850 - }  
851 - wx.showModal({  
852 - title: '上传失败',  
853 - content: title,  
854 - showCancel: false,  
855 - confirmColor: '#4E8FE7'  
856 - })  
857 - }  
858 - wx.hideLoading()  
859 - },  
860 - fail: function(err) {  
861 - console.log('fail', err)  
862 - wx.showModal({  
863 - title: '上传失败',  
864 - content: '图片上传失败,请重新上传',  
865 - showCancel: false,  
866 - confirmColor: '#4E8FE7'  
867 - })  
868 - wx.hideLoading()  
869 - },  
870 - complete(res) {  
871 - console.log('complete', res)  
872 - wx.hideLoading()  
873 - }  
874 - })  
875 - }, 836 + // goupload: function(e) {
  837 + // console.log(e)
  838 + // var that = this
  839 + // wx.chooseImage({
  840 + // sourceType: ['camera', 'album'],
  841 + // // sizeType: ['original'],
  842 + // count: 1,
  843 + // success: function(res) {
  844 + // console.log('success', res)
  845 + // that.setData({
  846 + // img_path: res.tempFilePaths[0]
  847 + // })
  848 + // that.uploadImage(that.data.img_path)
  849 + // }
  850 + // })
  851 + // },
  852 +
  853 + // uploadImage: function(path) {
  854 + // var that = this
  855 + // wx.showLoading({
  856 + // title: '上传图片中...',
  857 + // })
  858 + // console.log('key', 'imagepath_' + path.substring(path.length - 10, path.length))
  859 + // wx.uploadFile({
  860 + // url: getApp().globalData.OSSUrl,
  861 + // filePath: path,
  862 + // name: 'file',
  863 + // formData: {
  864 + // 'key': 'imagepath_' + path.substring(path.length - 15, path.length),
  865 + // 'OSSAccessKeyId': OSSInit.access_key_id,
  866 + // 'policy': OSSInit.policy,
  867 + // 'signature': OSSInit.signature,
  868 + // 'callback': OSSInit.callback_body,
  869 + // 'x:access_token': OSSInit.callback_token,
  870 + // 'success_action_status': '200',
  871 + // },
  872 + // success: function(res) {
  873 + // console.log('uploadFile', res.data)
  874 + // if (res.statusCode == 200) {
  875 + // var data = JSON.parse(res.data)
  876 + // console.log('上传成功', res)
  877 + // that.oss_bucket = data.bucket
  878 +
  879 + // } else {
  880 + // var title = '图片上传失败,请重新上传'
  881 + // if (res.statusCode == 413) {
  882 + // title = '图片体积过大,请选择较小图片上传'
  883 + // }
  884 + // wx.showModal({
  885 + // title: '上传失败',
  886 + // content: title,
  887 + // showCancel: false,
  888 + // confirmColor: '#4E8FE7'
  889 + // })
  890 + // }
  891 + // wx.hideLoading()
  892 + // },
  893 + // fail: function(err) {
  894 + // console.log('fail', err)
  895 + // wx.showModal({
  896 + // title: '上传失败',
  897 + // content: '图片上传失败,请重新上传',
  898 + // showCancel: false,
  899 + // confirmColor: '#4E8FE7'
  900 + // })
  901 + // wx.hideLoading()
  902 + // },
  903 + // complete(res) {
  904 + // console.log('complete', res)
  905 + // wx.hideLoading()
  906 + // }
  907 + // })
  908 + // },
876 909
877 showToast: function(data) { 910 showToast: function(data) {
878 if (data && data.length > 0) { 911 if (data && data.length > 0) {
@@ -3,47 +3,27 @@ @@ -3,47 +3,27 @@
3 3
4 <view class='page'> 4 <view class='page'>
5 <form bindsubmit='formSubmit'> 5 <form bindsubmit='formSubmit'>
6 - <view style='padding:0 30rpx'> 6 + <view style='padding:0 30rpx;'>
7 <!-- 添加子女 --> 7 <!-- 添加子女 -->
8 <view wx:if="{{cur_index==0}}"> 8 <view wx:if="{{cur_index==0}}">
9 - <view style='height:90rpx'>  
10 - <text class='text_black_30 float_left'>配偶姓名</text>  
11 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入配偶姓名' name='lover_name'></input>  
12 - </view>  
13 - <view class='divide_line_f5f5f5'></view>  
14 -  
15 - <template is="picker_cell_normal" data="{{...lovercardtypeData}}" />  
16 - <view class='divide_line_f5f5f5'></view>  
17 - <view style='height:90rpx'>  
18 - <text class='text_black_30 float_left'>配偶证件号码</text>  
19 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='lover_idno'></input>  
20 - </view>  
21 - <view class='divide_line_f5f5f5'></view>  
22 - <template is="picker_cell_normal" data="{{...loverbirthDate}}" /> 9 + <template is="picker_cell_normal" data="{{...childrencardtypeData}}" />
23 <view class='divide_line_f5f5f5'></view> 10 <view class='divide_line_f5f5f5'></view>
24 <view style='height:90rpx'> 11 <view style='height:90rpx'>
25 - <text class='text_black_30 float_left'>国籍</text>  
26 - <image class='arrow_wrap' src='/images/arrow_right.png'></image>  
27 - <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='lover_country'>中国</text> 12 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  13 + <text class='text_black_30 float_left' style='line-height: 90rpx'>子女证件号码</text>
  14 + <view wx:if="{{isIdCard}}">
  15 + <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo'></image>
  16 + <input class='input_wrap01 float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='19' type='idcard'></input>
  17 + </view>
  18 + <view wx:else>
  19 + <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='children_idno' maxlength='24' value='{{card_number}}'></input>
  20 + </view>
28 </view> 21 </view>
29 - <view style='width:100%;height:20rpx;background:#f5f5f5'></view>  
30 -  
31 - <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" />  
32 <view class='divide_line_f5f5f5'></view> 22 <view class='divide_line_f5f5f5'></view>
33 <view style='height:90rpx'> 23 <view style='height:90rpx'>
34 <text class='text_black_30 float_left'>子女姓名</text> 24 <text class='text_black_30 float_left'>子女姓名</text>
35 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女姓名' name='children_name'></input> 25 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女姓名' name='children_name'></input>
36 </view> 26 </view>
37 - <view class='divide_line_f5f5f5'></view>  
38 -  
39 - <template is="picker_cell_normal" data="{{...childrencardtypeData}}" />  
40 - <view class='divide_line_f5f5f5'></view>  
41 - <view style='height:90rpx'>  
42 - <text class='text_black_30 float_left'>身份证件号码</text>  
43 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女证件号码' type='idcard' name='children_idno'></input>  
44 - </view>  
45 - <view class='divide_line_f5f5f5'></view>  
46 -  
47 <template is="picker_cell_normal" data="{{...childrenbirthDate}}" /> 27 <template is="picker_cell_normal" data="{{...childrenbirthDate}}" />
48 <view class='divide_line_f5f5f5'></view> 28 <view class='divide_line_f5f5f5'></view>
49 <view style='height:90rpx'> 29 <view style='height:90rpx'>
@@ -52,13 +32,22 @@ @@ -52,13 +32,22 @@
52 <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='children_country'>中国</text> 32 <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='children_country'>中国</text>
53 </view> 33 </view>
54 <view class='divide_line_f5f5f5'></view> 34 <view class='divide_line_f5f5f5'></view>
  35 +
  36 + <view class='divide_line_f5f5f5'></view>
  37 + <view style='height:90rpx;'>
  38 + <text class='text_black_30 float_left'>分配比例</text>
  39 + <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
  40 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分配比例' name='reduce_ratio'></input>
  41 + </view>
  42 +
  43 + <view class='divide_line_f5f5f5'></view>
55 <view style='height:90rpx'> 44 <view style='height:90rpx'>
56 <text class='text_black_30 float_left'>子女学籍号</text> 45 <text class='text_black_30 float_left'>子女学籍号</text>
57 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女学籍号' name='children_schoolno'></input> 46 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女学籍号' name='children_schoolno'></input>
58 </view> 47 </view>
59 <view class='divide_line_f5f5f5'></view> 48 <view class='divide_line_f5f5f5'></view>
60 49
61 - <template is="picker_cell_normal" data="{{...edudegreeData}}" /> 50 + <template is="picker_cell_normal" data="{{...childedudegreeData}}" />
62 <view class='divide_line_f5f5f5'></view> 51 <view class='divide_line_f5f5f5'></view>
63 52
64 <template is="picker_cell_normal" data="{{...studystartdate}}" /> 53 <template is="picker_cell_normal" data="{{...studystartdate}}" />
@@ -66,13 +55,6 @@ @@ -66,13 +55,6 @@
66 55
67 <template is="picker_cell_normal" data="{{...studyenddate}}" /> 56 <template is="picker_cell_normal" data="{{...studyenddate}}" />
68 <view class='divide_line_f5f5f5'></view> 57 <view class='divide_line_f5f5f5'></view>
69 - <template is="picker_cell_normal" data="{{...edudegreeData}}" />  
70 - <view class='divide_line_f5f5f5'></view>  
71 -  
72 - <view style='height:90rpx;'>  
73 - <text class='text_black_30 float_left'>分配比例</text>  
74 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分配比例' name='reduce_ratio'></input>  
75 - </view>  
76 </view> 58 </view>
77 <!-- 继续教育 --> 59 <!-- 继续教育 -->
78 <view wx:if="{{cur_index==1}}"> 60 <view wx:if="{{cur_index==1}}">
@@ -128,7 +110,7 @@ @@ -128,7 +110,7 @@
128 <template is="picker_cell_normal" data="{{...olderbirthDate}}" /> 110 <template is="picker_cell_normal" data="{{...olderbirthDate}}" />
129 <view class='divide_line_f5f5f5'></view> 111 <view class='divide_line_f5f5f5'></view>
130 <view style='height:90rpx'> 112 <view style='height:90rpx'>
131 - <text class='text_black_30 float_left'>国籍</text> 113 + <text class='text_black_30 float_left'>国籍(地区)</text>
132 <image class='arrow_wrap' src='/images/arrow_right.png'></image> 114 <image class='arrow_wrap' src='/images/arrow_right.png'></image>
133 <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='older_country'>中国</text> 115 <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='older_country'>中国</text>
134 </view> 116 </view>
@@ -172,27 +154,7 @@ @@ -172,27 +154,7 @@
172 </view> 154 </view>
173 <!-- 住房 --> 155 <!-- 住房 -->
174 <view wx:if="{{cur_index==4}}"> 156 <view wx:if="{{cur_index==4}}">
175 - <view style='height:90rpx'>  
176 - <text class='text_black_30 float_left'>配偶姓名</text>  
177 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入配偶姓名' name='lover_name'></input>  
178 - </view>  
179 - <view class='divide_line_f5f5f5'></view>  
180 157
181 - <template is="picker_cell_normal" data="{{...lovercardtypeData}}" />  
182 - <view class='divide_line_f5f5f5'></view>  
183 - <view style='height:90rpx'>  
184 - <text class='text_black_30 float_left'>配偶证件号码</text>  
185 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='lover_idno'></input>  
186 - </view>  
187 - <view class='divide_line_f5f5f5'></view>  
188 - <template is="picker_cell_normal" data="{{...loverbirthDate}}" />  
189 - <view class='divide_line_f5f5f5'></view>  
190 - <view style='height:90rpx'>  
191 - <text class='text_black_30 float_left'>国籍</text>  
192 - <image class='arrow_wrap' src='/images/arrow_right.png'></image>  
193 - <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='lover_country'>中国</text>  
194 - </view>  
195 - <view style='width:100%;height:20rpx;background:#f5f5f5'></view>  
196 <view wx:if="{{title=='添加住房贷款利息'}}"> 158 <view wx:if="{{title=='添加住房贷款利息'}}">
197 159
198 <template is="picker_cell_normal" data="{{...houseLocateInfo}}" /> 160 <template is="picker_cell_normal" data="{{...houseLocateInfo}}" />
@@ -241,28 +203,53 @@ @@ -241,28 +203,53 @@
241 <text class='text_black_30 float_left'>租赁合同编号</text> 203 <text class='text_black_30 float_left'>租赁合同编号</text>
242 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输合同编号' name='contract_no'></input> 204 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输合同编号' name='contract_no'></input>
243 </view> 205 </view>
244 -<view class='divide_line_f5f5f5'></view> 206 + <view class='divide_line_f5f5f5'></view>
245 <template is="picker_cell_normal" data="{{...leasestartDate}}" /> 207 <template is="picker_cell_normal" data="{{...leasestartDate}}" />
246 <view class='divide_line_f5f5f5'></view> 208 <view class='divide_line_f5f5f5'></view>
247 <template is="picker_cell_normal" data="{{...leaseendDate}}" /> 209 <template is="picker_cell_normal" data="{{...leaseendDate}}" />
248 </view> 210 </view>
249 -  
250 </view> 211 </view>
251 <view class='divide_line_f5f5f5'></view> 212 <view class='divide_line_f5f5f5'></view>
252 - <template is="picker_cell_normal" data="{{...reducetypeData}}" />  
253 - <view class='divide_line_f5f5f5'></view> 213 + <template is="picker_cell_normal" data="{{...reducetypeData}}" />
  214 + <view class='divide_line_f5f5f5'></view>
  215 + <view style='height:90rpx'>
  216 + <text class='text_black_30 float_left'>扣除金额</text>
  217 + <text wx:if="{{reducetypeData.selected=='月度扣除'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>/月</text>
  218 + <text wx:if="{{reducetypeData.selected=='年度扣除'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>/年</text>
  219 + <input class='input_wrap01 float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入扣除金额' type='digit' name='reduce_money'></input>
  220 + </view>
  221 + <view class='divide_line_f5f5f5'></view>
  222 + <view wx:if="{{cur_index==0||cur_index==4}}">
254 <view style='height:90rpx'> 223 <view style='height:90rpx'>
255 - <text class='text_black_30 float_left'>扣除金额</text>  
256 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入扣除金额' type='digit' name='reduce_money'></input> 224 + <text class='text_black_30 float_left'>配偶姓名</text>
  225 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入配偶姓名' name='lover_name'></input>
257 </view> 226 </view>
  227 + <view class='divide_line_f5f5f5'></view>
258 228
259 - <view class='divide_line_f5f5f5'></view>  
260 - <view class='text_black_30 float_left'>上传材料</view> 229 + <template is="picker_cell_normal" data="{{...lovercardtypeData}}" />
  230 + <view class='divide_line_f5f5f5'></view>
  231 + <view style='height:90rpx'>
  232 + <text class='text_black_30 float_left'>配偶证件号码</text>
  233 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='lover_idno'></input>
  234 + </view>
  235 + <view class='divide_line_f5f5f5'></view>
  236 + <template is="picker_cell_normal" data="{{...loverbirthDate}}" />
  237 + <view class='divide_line_f5f5f5'></view>
  238 + <view style='height:90rpx'>
  239 + <text class='text_black_30 float_left'>国籍</text>
  240 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  241 + <text class='text_999_30 float_right' style='line-height: 90rpx;text-align:right' name='lover_country'>中国</text>
  242 + </view>
  243 + </view>
  244 +
  245 + <!-- <view class='divide_line_f5f5f5'></view>
  246 + <view class='text_black_30 float_left'>上传材料</view> -->
261 </view> 247 </view>
262 - <view style='margin-bottom:140rpx'> 248 + <view style='width:100%;height:180rpx;background:#f8f8f8'></view>
  249 + <!-- <view style='margin-bottom:140rpx'>
263 <image src='{{img_path}}' style='width:100%;height:380rpx' bindtap='goupload'></image> 250 <image src='{{img_path}}' style='width:100%;height:380rpx' bindtap='goupload'></image>
264 <view class='text_999_30' style='text-align:center;margin:20rpx 30rpx'>{{extrainfo_arr[cur_index]}}</view> 251 <view class='text_999_30' style='text-align:center;margin:20rpx 30rpx'>{{extrainfo_arr[cur_index]}}</view>
265 - </view> 252 + </view> -->
266 <view class="btn_bottom"> 253 <view class="btn_bottom">
267 <button class="btn_bottom" formType="submit"> 保存</button> 254 <button class="btn_bottom" formType="submit"> 保存</button>
268 </view> 255 </view>
@@ -18,6 +18,17 @@ @@ -18,6 +18,17 @@
18 white-space: nowrap; 18 white-space: nowrap;
19 } 19 }
20 20
  21 +.input_wrap01 {
  22 + width: 420rpx;
  23 + height: 90rpx;
  24 + font-size: 30rpx;
  25 + color: #333;
  26 + text-align: right;
  27 + overflow: hidden;
  28 + text-overflow: ellipsis;
  29 + white-space: nowrap;
  30 +}
  31 +
21 .arrow_wrap { 32 .arrow_wrap {
22 width: 40rpx; 33 width: 40rpx;
23 height: 40rpx; 34 height: 40rpx;
@@ -26,6 +37,13 @@ @@ -26,6 +37,13 @@
26 37
27 } 38 }
28 39
  40 +.image_camera {
  41 + width: 42rpx;
  42 + height: 42rpx;
  43 + margin-left: 10rpx;
  44 + margin-top: 22rpx;
  45 +}
  46 +
29 /* .text_666_28 { 47 /* .text_666_28 {
30 font-family: PingFangSC-Regular; 48 font-family: PingFangSC-Regular;
31 font-size: 28rpx; 49 font-size: 28rpx;
@@ -63,6 +63,7 @@ Page({ @@ -63,6 +63,7 @@ Page({
63 }) 63 })
64 }, 64 },
65 }) 65 })
  66 + this.getTaxList()
66 }, 67 },
67 68
68 lookimg: function() { //查看材料 69 lookimg: function() { //查看材料
@@ -87,6 +88,60 @@ Page({ @@ -87,6 +88,60 @@ Page({
87 88
88 }, 89 },
89 90
  91 + getTaxList: function() {
  92 + var that = this;
  93 + wx.showLoading({
  94 + title: '加载中',
  95 + })
  96 + var Authorization = app.globalData.Authorization;
  97 + console.log('Authorization', Authorization)
  98 + if (!Authorization || Authorization.length < 10) {
  99 + return
  100 + }
  101 + wx.request({
  102 + url: baseUrl + 'persontax/v1/personal-taxes',
  103 + method: "GET",
  104 + header: {
  105 + 'content-type': 'application/json', // 默认值
  106 + "Authorization": Authorization
  107 + },
  108 + data: {
  109 + 'all': true
  110 + },
  111 + success: function(res) {
  112 + console.log('succ', res)
  113 + if (res.statusCode == 200) {
  114 + that.handleData(res.data);
  115 + } else {
  116 + wx.showModal({
  117 + title: res.data.message,
  118 + content: '',
  119 + })
  120 + }
  121 + },
  122 + fail(res) {
  123 + console.log(res.data)
  124 + },
  125 + complete() {
  126 + wx.hideLoading()
  127 + that.setData({
  128 + load_finish: true
  129 + })
  130 + }
  131 + })
  132 + },
  133 +
  134 + handleData: function(data) {
  135 + if (data.items && data.items.length > 0) {
  136 + var taxlist = []
  137 + for (var i = 0; i < data.items.length; i++) {
  138 + if (data.items[i].family_ties == 'family_ties') {
  139 + taxlist.push(data.items[i])
  140 + }
  141 + }
  142 + }
  143 + },
  144 +
90 showdeclare: function(e) { 145 showdeclare: function(e) {
91 console.log("showdeclare", e) 146 console.log("showdeclare", e)
92 this.setData({ 147 this.setData({
注册登录 后发表评论