提交 17ccf61d3205364dcb9bffe3cf43d807f27f9ac4

作者 pangy
2 个父辈 c7e1af39 be06c710

merge

@@ -7,9 +7,9 @@ var baseUrl = app.globalData.baseUrl; @@ -7,9 +7,9 @@ var baseUrl = app.globalData.baseUrl;
7 const AddTypeNames = { 7 const AddTypeNames = {
8 'children_education': '子女教育', 8 'children_education': '子女教育',
9 'continuing_education': '继续教育', 9 'continuing_education': '继续教育',
10 - 'support_duty': '赡养老人',  
11 - 'medical_fund': '大病医疗',  
12 - 'house_fund': '住房' 10 + 'support_duty': '被赡养老人',
  11 + 'medical_fund': '大病医疗支出',
  12 + 'house_fund': '住房租金'
13 } 13 }
14 const Deduce_amounts_month = { 14 const Deduce_amounts_month = {
15 'children_education': 1000, 15 'children_education': 1000,
@@ -17,7 +17,7 @@ const Deduce_amounts_month = { @@ -17,7 +17,7 @@ const Deduce_amounts_month = {
17 'support_duty': 2000, 17 'support_duty': 2000,
18 'medical_fund': 0, 18 'medical_fund': 0,
19 'house_fund_rent': 1000, 19 'house_fund_rent': 1000,
20 - "house_fund_loan":1200 20 + "house_fund_loan":1000
21 } 21 }
22 const Deduce_amounts_year = { 22 const Deduce_amounts_year = {
23 'children_education': 12000, 23 'children_education': 12000,
@@ -26,7 +26,7 @@ const Deduce_amounts_year = { @@ -26,7 +26,7 @@ const Deduce_amounts_year = {
26 'support_duty': 24000, 26 'support_duty': 24000,
27 'medical_fund': 0, 27 'medical_fund': 0,
28 'house_fund_rent': 12000, 28 'house_fund_rent': 12000,
29 - "house_fund_loan":14400 29 + "house_fund_loan": 12000
30 } 30 }
31 31
32 Page({ 32 Page({
@@ -82,12 +82,12 @@ Page({ @@ -82,12 +82,12 @@ Page({
82 onChange: 'onPickerSelect', 82 onChange: 'onPickerSelect',
83 }, 83 },
84 older_relativeData: { 84 older_relativeData: {
85 - label: '与纳税人关系', 85 + label: '与纳税人关系',
86 isrequre: true, 86 isrequre: true,
87 bindtype: 'older_relative', 87 bindtype: 'older_relative',
88 selected: '', 88 selected: '',
89 isblack: 'true', 89 isblack: 'true',
90 - placeholder: '请选择与纳税人关系', 90 + placeholder: '请选择与纳税人关系',
91 values: ["父母", "祖父母、外祖父母"], 91 values: ["父母", "祖父母、外祖父母"],
92 onChange: 'onPickerSelect' 92 onChange: 'onPickerSelect'
93 }, 93 },
@@ -268,6 +268,7 @@ Page({ @@ -268,6 +268,7 @@ Page({
268 reducetypeData: { 268 reducetypeData: {
269 label: '扣除方式', 269 label: '扣除方式',
270 isrequre: false, 270 isrequre: false,
  271 + disabled: true,
271 bindtype: 'reduce_type', 272 bindtype: 'reduce_type',
272 selected: '', 273 selected: '',
273 values: ["月度", "年度"], 274 values: ["月度", "年度"],
@@ -475,6 +476,7 @@ Page({ @@ -475,6 +476,7 @@ Page({
475 console.log('---------frontPage', frontPage.data) 476 console.log('---------frontPage', frontPage.data)
476 console.log("options", options); 477 console.log("options", options);
477 const nameKey = options.status 478 const nameKey = options.status
  479 + var title = AddTypeNames[nameKey]
478 480
479 this.legal_entity_id = frontPage.data.legal_entity_id 481 this.legal_entity_id = frontPage.data.legal_entity_id
480 this.legal_entity = frontPage.data.legal_entity 482 this.legal_entity = frontPage.data.legal_entity
@@ -483,10 +485,10 @@ Page({ @@ -483,10 +485,10 @@ Page({
483 var deduction_amount, house_type='' 485 var deduction_amount, house_type=''
484 if (options.reducetype == '月度') { 486 if (options.reducetype == '月度') {
485 reduce_typeData.selected = '月度' 487 reduce_typeData.selected = '月度'
486 - deduction_amount = Deduce_amounts_month[nameKey]? Deduce_amounts_month[nameKey]:0 488 + // deduction_amount = Deduce_amounts_month[nameKey] ? Deduce_amounts_month[nameKey] : 0
487 } else { 489 } else {
488 - deduction_amount = Deduce_amounts_year[nameKey]? Deduce_amounts_year[nameKey]:0  
489 reduce_typeData.selected = '年度' 490 reduce_typeData.selected = '年度'
  491 + // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0
490 } 492 }
491 if ("children_education" == options.status) { 493 if ("children_education" == options.status) {
492 this.loadCountry() 494 this.loadCountry()
@@ -516,20 +518,25 @@ Page({ @@ -516,20 +518,25 @@ Page({
516 this.supporttype = frontPage.data.issinglechildData.selected == '是' ? 'D' : 'S',//是否独生 518 this.supporttype = frontPage.data.issinglechildData.selected == '是' ? 'D' : 'S',//是否独生
517 this.is_single = frontPage.data.issinglechildData.selected == '是' ? 'y' : 'n',//是否独生 519 this.is_single = frontPage.data.issinglechildData.selected == '是' ? 'y' : 'n',//是否独生
518 this.share_method = frontPage.data.shareMethodData.selected 520 this.share_method = frontPage.data.shareMethodData.selected
  521 + this.setData({
  522 + deduction_amount: deduction_amount
  523 + })
519 } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") { 524 } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") {
520 this.getbanklist() 525 this.getbanklist()
521 house_type = "house_fund_rent" 526 house_type = "house_fund_rent"
  527 + title = '住房租金'
522 if (options.reducetype == '月度') { 528 if (options.reducetype == '月度') {
523 reduce_typeData.selected = '月度' 529 reduce_typeData.selected = '月度'
524 - deduction_amount = Deduce_amounts_month["house_fund_rent"] 530 + // deduction_amount = Deduce_amounts_month["house_fund_rent"]
525 } else { 531 } else {
526 - deduction_amount = Deduce_amounts_year["house_fund_rent"] 532 + // deduction_amount = Deduce_amounts_year["house_fund_rent"]
527 reduce_typeData.selected = '年度' 533 reduce_typeData.selected = '年度'
528 } 534 }
529 } else if (frontPage.data.house_type == "house_fund_loan") { 535 } else if (frontPage.data.house_type == "house_fund_loan") {
530 this.getbanklist() 536 this.getbanklist()
531 this.getTaxList() 537 this.getTaxList()
532 house_type = "house_fund_loan" 538 house_type = "house_fund_loan"
  539 + title = '住房贷款利息'
533 if (options.reducetype == '月度') { 540 if (options.reducetype == '月度') {
534 reduce_typeData.selected = '月度' 541 reduce_typeData.selected = '月度'
535 deduction_amount = Deduce_amounts_month["house_fund_loan"] 542 deduction_amount = Deduce_amounts_month["house_fund_loan"]
@@ -537,15 +544,16 @@ Page({ @@ -537,15 +544,16 @@ Page({
537 deduction_amount = Deduce_amounts_year["house_fund_loan"] 544 deduction_amount = Deduce_amounts_year["house_fund_loan"]
538 reduce_typeData.selected = '年度' 545 reduce_typeData.selected = '年度'
539 } 546 }
  547 + this.setData({
  548 + deduction_amount: deduction_amount
  549 + })
540 } 550 }
541 - var title = AddTypeNames[nameKey]  
542 551
543 this.setData({ 552 this.setData({
544 title: title, 553 title: title,
545 cur_index: nameKey, 554 cur_index: nameKey,
546 house_type: house_type, 555 house_type: house_type,
547 reducetypeData: reduce_typeData, 556 reducetypeData: reduce_typeData,
548 - deduction_amount: deduction_amount  
549 }) 557 })
550 wx.setNavigationBarTitle({ 558 wx.setNavigationBarTitle({
551 title: title, 559 title: title,
@@ -1525,8 +1533,17 @@ Page({ @@ -1525,8 +1533,17 @@ Page({
1525 case 'child_percent': 1533 case 'child_percent':
1526 var childrenpercent_data = this.data.childrenpercentData 1534 var childrenpercent_data = this.data.childrenpercentData
1527 childrenpercent_data.selected = childrenpercent_data.values[e.detail.value] 1535 childrenpercent_data.selected = childrenpercent_data.values[e.detail.value]
  1536 + var deduction_amount = 0
  1537 + if (e.detail.value == '0') {
  1538 + deduction_amount = 0
  1539 + } else if (e.detail.value == '1') {
  1540 + deduction_amount = 500
  1541 + }else {
  1542 + deduction_amount = 1000
  1543 + }
1528 this.setData({ 1544 this.setData({
1529 - childrenpercentData: childrenpercent_data 1545 + childrenpercentData: childrenpercent_data,
  1546 + deduction_amount: deduction_amount
1530 }) 1547 })
1531 break; 1548 break;
1532 break; 1549 break;
@@ -1633,10 +1650,10 @@ Page({ @@ -1633,10 +1650,10 @@ Page({
1633 var deduction_amount 1650 var deduction_amount
1634 if (e.detail.value == '1') {//非学历教育 1651 if (e.detail.value == '1') {//非学历教育
1635 reducetypeData.selected = '年度' 1652 reducetypeData.selected = '年度'
1636 - reducetypeData.disabled = true 1653 + // reducetypeData.disabled = true
1637 deduction_amount = Deduce_amounts_year['continuing_education_non'] 1654 deduction_amount = Deduce_amounts_year['continuing_education_non']
1638 }else { 1655 }else {
1639 - reducetypeData.disabled = false 1656 + // reducetypeData.disabled = false
1640 reducetypeData.selected = '月度' 1657 reducetypeData.selected = '月度'
1641 deduction_amount = Deduce_amounts_month['continuing_education'] 1658 deduction_amount = Deduce_amounts_month['continuing_education']
1642 } 1659 }
@@ -1798,6 +1815,14 @@ Page({ @@ -1798,6 +1815,14 @@ Page({
1798 } 1815 }
1799 rent_address.address_value = e.detail.value 1816 rent_address.address_value = e.detail.value
1800 rent_address.address_code = e.detail.code 1817 rent_address.address_code = e.detail.code
  1818 + this.getCityLevel({
  1819 + 'province_code': e.detail.code[0] ,
  1820 + 'province': e.detail.value[0],
  1821 + 'city_code': e.detail.code[1] ,
  1822 + 'city': e.detail.value[1],
  1823 + 'district_code': e.detail.code[2] ,
  1824 + 'district': e.detail.value[2]
  1825 + })
1801 this.setData({ 1826 this.setData({
1802 rentAddress_haschanged: true, 1827 rentAddress_haschanged: true,
1803 rentLocateInfo: rent_address 1828 rentLocateInfo: rent_address
@@ -1809,6 +1834,31 @@ Page({ @@ -1809,6 +1834,31 @@ Page({
1809 // edu_name: educate_name 1834 // edu_name: educate_name
1810 // }) 1835 // })
1811 }, 1836 },
  1837 + getCityLevel:function(loc){
  1838 + var that = this;
  1839 + var Authorization = app.globalData.Authorization;
  1840 + wx.request({
  1841 + url: baseUrl + 'persontax/v1/house-rent-deductions',
  1842 + header: {
  1843 + 'content-type': 'application/json',
  1844 + "Authorization": Authorization
  1845 + },
  1846 + data: { 'address_codes': loc},
  1847 + success(res) {
  1848 + if (res && res.statusCode < 300) {
  1849 + that.setData({
  1850 + deduction_amount: res.data.amount
  1851 + })
  1852 + } else {
  1853 + wx.showToast({
  1854 + title: res.data.message ? res.data.message : '请求出错',
  1855 + icon: 'none'
  1856 + })
  1857 + }
  1858 + }
  1859 + })
  1860 + },
  1861 +
1812 1862
1813 // goupload: function(e) { 1863 // goupload: function(e) {
1814 // console.log(e) 1864 // console.log(e)
@@ -292,7 +292,7 @@ @@ -292,7 +292,7 @@
292 </view> 292 </view>
293 </view> 293 </view>
294 294
295 -<view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund'}}"> 295 +<view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund' && cur_index!='support_duty'}}">
296 <view class='divide_line_30'></view> 296 <view class='divide_line_30'></view>
297 <template is="picker_cell_normal" data="{{...reducetypeData}}" /> 297 <template is="picker_cell_normal" data="{{...reducetypeData}}" />
298 <view class='divide_line_30'></view> 298 <view class='divide_line_30'></view>
@@ -35,6 +35,7 @@ Page({ @@ -35,6 +35,7 @@ Page({
35 }, 35 },
36 cardtypeData: { 36 cardtypeData: {
37 isrequre: true, 37 isrequre: true,
  38 + disabled: true,
38 label: '证照类型', 39 label: '证照类型',
39 bindtype: 'cardtype', 40 bindtype: 'cardtype',
40 selected: '居民身份证', 41 selected: '居民身份证',
@@ -44,6 +44,7 @@ Page({ @@ -44,6 +44,7 @@ Page({
44 }, 44 },
45 cardtypeData: { 45 cardtypeData: {
46 isrequre: true, 46 isrequre: true,
  47 + disabled: true,
47 label: '证照类型', 48 label: '证照类型',
48 bindtype: 'cardtype', 49 bindtype: 'cardtype',
49 placeholder: '居民身份证', 50 placeholder: '居民身份证',
@@ -838,6 +839,13 @@ Page({ @@ -838,6 +839,13 @@ Page({
838 var formdata = e.detail.value; 839 var formdata = e.detail.value;
839 console.log("formdata", formdata) 840 console.log("formdata", formdata)
840 console.log("card_number", this.data.card_number) 841 console.log("card_number", this.data.card_number)
  842 + if (this.data.card_number.length < 1) {
  843 + this.showtoast('请输入身份证号码');
  844 + return
  845 + } else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {
  846 + this.showtoast('证照号码有误');
  847 + return
  848 + }
841 if (this.data.name.length < 1) { 849 if (this.data.name.length < 1) {
842 this.showtoast('请输入姓名'); 850 this.showtoast('请输入姓名');
843 return 851 return
@@ -849,16 +857,10 @@ Page({ @@ -849,16 +857,10 @@ Page({
849 // this.showtoast('有必填项未填写'); 857 // this.showtoast('有必填项未填写');
850 // return 858 // return
851 // } 859 // }
852 - else if (this.data.cardtypeData.selected.length < 1) {  
853 - this.showtoast('有必填项未填写');  
854 - return  
855 - } else if (this.data.card_number.length < 1) {  
856 - this.showtoast('请输入身份证号码');  
857 - return  
858 - } else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {  
859 - this.showtoast('证照号码有误');  
860 - return  
861 - } 860 + // else if (this.data.cardtypeData.selected.length < 1) {
  861 + // this.showtoast('有必填项未填写');
  862 + // return
  863 + // } else
862 // else if (!this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) { 864 // else if (!this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
863 // this.showtoast('有必填项未填写'); 865 // this.showtoast('有必填项未填写');
864 // return 866 // return
1 { 1 {
2 - "navigationBarTitleText": "纳税人基本信息", 2 + "navigationBarTitleText": "自然人基础信息",
3 "navigationBarTextStyle": "black", 3 "navigationBarTextStyle": "black",
4 "navigationBarBackgroundColor": "#FFFFFF" 4 "navigationBarBackgroundColor": "#FFFFFF"
5 } 5 }
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <view class="divide_line"></view> 6 <view class="divide_line"></view>
7 <!-- 基本信息 --> 7 <!-- 基本信息 -->
8 <view class='head_wrap' bindtap='span' id='1'> 8 <view class='head_wrap' bindtap='span' id='1'>
9 - <text class='head_text_wrap1'>基信息</text> 9 + <text class='head_text_wrap1'>基信息</text>
10 <text class='head_text_wrap2' hidden='{{!isshow01}}'>(点击收起非必填选项)</text> 10 <text class='head_text_wrap2' hidden='{{!isshow01}}'>(点击收起非必填选项)</text>
11 <text class='head_text_wrap2' hidden='{{isshow01}}'>(点击展开非必填选项)</text> 11 <text class='head_text_wrap2' hidden='{{isshow01}}'>(点击展开非必填选项)</text>
12 <view style='float:right' wx:if='{{isshow01}}'> 12 <view style='float:right' wx:if='{{isshow01}}'>
@@ -21,6 +21,19 @@ @@ -21,6 +21,19 @@
21 </view> 21 </view>
22 <view class='data_list'> 22 <view class='data_list'>
23 <view class='data_item'> 23 <view class='data_item'>
  24 + <template is="picker_cell_normal" data="{{...cardtypeData}}" />
  25 + <view class="divide_line_30"></view>
  26 +
  27 + <view class='item_body'>
  28 + <text class='red_star_right_10'>*</text>
  29 + <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text>
  30 + <view>
  31 + <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active'}}"></image>
  32 + <input class='input_wrap float_right' disabled="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>
  33 + <!-- <input class='input_wrap float_right' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>
  34 + <input class='input_wrap float_right' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> -->
  35 + </view>
  36 + </view>
24 <view class='item_body' hidden="{{!isself}}"> 37 <view class='item_body' hidden="{{!isself}}">
25 <text class='red_star_right_10'>*</text> 38 <text class='red_star_right_10'>*</text>
26 <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text> 39 <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text>
@@ -32,7 +45,7 @@ @@ -32,7 +45,7 @@
32 45
33 <view class='item_body'> 46 <view class='item_body'>
34 <text class='red_star_right_10'>*</text> 47 <text class='red_star_right_10'>*</text>
35 - <text class='text_777_30 float_left' style='line-height: 90rpx'>国籍(地区)</text> 48 + <text class='text_777_30 float_left' style='line-height: 90rpx'>国籍</text>
36 <text class='text_black_30 float_right' style='line-height: 90rpx'>中国</text> 49 <text class='text_black_30 float_right' style='line-height: 90rpx'>中国</text>
37 </view> 50 </view>
38 <view class="divide_line_30"></view> 51 <view class="divide_line_30"></view>
@@ -48,19 +61,7 @@ @@ -48,19 +61,7 @@
48 <text class='text_black_30 float_right' style='line-height: 90rpx'>否</text> 61 <text class='text_black_30 float_right' style='line-height: 90rpx'>否</text>
49 </view> 62 </view>
50 <view class="divide_line_30"></view> 63 <view class="divide_line_30"></view>
51 - <template is="picker_cell_normal" data="{{...cardtypeData}}" />  
52 - <view class="divide_line_30"></view>  
53 -  
54 - <view class='item_body'>  
55 - <text class='red_star_right_10'>*</text>  
56 - <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text>  
57 - <view>  
58 - <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active'}}"></image>  
59 - <input class='input_wrap float_right' disabled="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>  
60 - <!-- <input class='input_wrap float_right' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>  
61 - <input class='input_wrap float_right' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> -->  
62 - </view>  
63 - </view> 64 +
64 <view hidden='{{!isshow01}}'> 65 <view hidden='{{!isshow01}}'>
65 <view class="divide_line_30"></view> 66 <view class="divide_line_30"></view>
66 <template is="picker_cell_normal" data="{{...genderData}}" /> 67 <template is="picker_cell_normal" data="{{...genderData}}" />
注册登录 后发表评论