提交 17ccf61d3205364dcb9bffe3cf43d807f27f9ac4

作者 pangy
2 个父辈 c7e1af39 be06c710

merge

... ... @@ -7,9 +7,9 @@ var baseUrl = app.globalData.baseUrl;
7 7 const AddTypeNames = {
8 8 'children_education': '子女教育',
9 9 'continuing_education': '继续教育',
10   - 'support_duty': '赡养老人',
11   - 'medical_fund': '大病医疗',
12   - 'house_fund': '住房'
  10 + 'support_duty': '被赡养老人',
  11 + 'medical_fund': '大病医疗支出',
  12 + 'house_fund': '住房租金'
13 13 }
14 14 const Deduce_amounts_month = {
15 15 'children_education': 1000,
... ... @@ -17,7 +17,7 @@ const Deduce_amounts_month = {
17 17 'support_duty': 2000,
18 18 'medical_fund': 0,
19 19 'house_fund_rent': 1000,
20   - "house_fund_loan":1200
  20 + "house_fund_loan":1000
21 21 }
22 22 const Deduce_amounts_year = {
23 23 'children_education': 12000,
... ... @@ -26,7 +26,7 @@ const Deduce_amounts_year = {
26 26 'support_duty': 24000,
27 27 'medical_fund': 0,
28 28 'house_fund_rent': 12000,
29   - "house_fund_loan":14400
  29 + "house_fund_loan": 12000
30 30 }
31 31
32 32 Page({
... ... @@ -82,12 +82,12 @@ Page({
82 82 onChange: 'onPickerSelect',
83 83 },
84 84 older_relativeData: {
85   - label: '与纳税人关系',
  85 + label: '与纳税人关系',
86 86 isrequre: true,
87 87 bindtype: 'older_relative',
88 88 selected: '',
89 89 isblack: 'true',
90   - placeholder: '请选择与纳税人关系',
  90 + placeholder: '请选择与纳税人关系',
91 91 values: ["父母", "祖父母、外祖父母"],
92 92 onChange: 'onPickerSelect'
93 93 },
... ... @@ -268,6 +268,7 @@ Page({
268 268 reducetypeData: {
269 269 label: '扣除方式',
270 270 isrequre: false,
  271 + disabled: true,
271 272 bindtype: 'reduce_type',
272 273 selected: '',
273 274 values: ["月度", "年度"],
... ... @@ -475,6 +476,7 @@ Page({
475 476 console.log('---------frontPage', frontPage.data)
476 477 console.log("options", options);
477 478 const nameKey = options.status
  479 + var title = AddTypeNames[nameKey]
478 480
479 481 this.legal_entity_id = frontPage.data.legal_entity_id
480 482 this.legal_entity = frontPage.data.legal_entity
... ... @@ -483,10 +485,10 @@ Page({
483 485 var deduction_amount, house_type=''
484 486 if (options.reducetype == '月度') {
485 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 489 } else {
488   - deduction_amount = Deduce_amounts_year[nameKey]? Deduce_amounts_year[nameKey]:0
489 490 reduce_typeData.selected = '年度'
  491 + // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0
490 492 }
491 493 if ("children_education" == options.status) {
492 494 this.loadCountry()
... ... @@ -516,20 +518,25 @@ Page({
516 518 this.supporttype = frontPage.data.issinglechildData.selected == '是' ? 'D' : 'S',//是否独生
517 519 this.is_single = frontPage.data.issinglechildData.selected == '是' ? 'y' : 'n',//是否独生
518 520 this.share_method = frontPage.data.shareMethodData.selected
  521 + this.setData({
  522 + deduction_amount: deduction_amount
  523 + })
519 524 } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") {
520 525 this.getbanklist()
521 526 house_type = "house_fund_rent"
  527 + title = '住房租金'
522 528 if (options.reducetype == '月度') {
523 529 reduce_typeData.selected = '月度'
524   - deduction_amount = Deduce_amounts_month["house_fund_rent"]
  530 + // deduction_amount = Deduce_amounts_month["house_fund_rent"]
525 531 } else {
526   - deduction_amount = Deduce_amounts_year["house_fund_rent"]
  532 + // deduction_amount = Deduce_amounts_year["house_fund_rent"]
527 533 reduce_typeData.selected = '年度'
528 534 }
529 535 } else if (frontPage.data.house_type == "house_fund_loan") {
530 536 this.getbanklist()
531 537 this.getTaxList()
532 538 house_type = "house_fund_loan"
  539 + title = '住房贷款利息'
533 540 if (options.reducetype == '月度') {
534 541 reduce_typeData.selected = '月度'
535 542 deduction_amount = Deduce_amounts_month["house_fund_loan"]
... ... @@ -537,15 +544,16 @@ Page({
537 544 deduction_amount = Deduce_amounts_year["house_fund_loan"]
538 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 552 this.setData({
544 553 title: title,
545 554 cur_index: nameKey,
546 555 house_type: house_type,
547 556 reducetypeData: reduce_typeData,
548   - deduction_amount: deduction_amount
549 557 })
550 558 wx.setNavigationBarTitle({
551 559 title: title,
... ... @@ -1525,8 +1533,17 @@ Page({
1525 1533 case 'child_percent':
1526 1534 var childrenpercent_data = this.data.childrenpercentData
1527 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 1544 this.setData({
1529   - childrenpercentData: childrenpercent_data
  1545 + childrenpercentData: childrenpercent_data,
  1546 + deduction_amount: deduction_amount
1530 1547 })
1531 1548 break;
1532 1549 break;
... ... @@ -1633,10 +1650,10 @@ Page({
1633 1650 var deduction_amount
1634 1651 if (e.detail.value == '1') {//非学历教育
1635 1652 reducetypeData.selected = '年度'
1636   - reducetypeData.disabled = true
  1653 + // reducetypeData.disabled = true
1637 1654 deduction_amount = Deduce_amounts_year['continuing_education_non']
1638 1655 }else {
1639   - reducetypeData.disabled = false
  1656 + // reducetypeData.disabled = false
1640 1657 reducetypeData.selected = '月度'
1641 1658 deduction_amount = Deduce_amounts_month['continuing_education']
1642 1659 }
... ... @@ -1798,6 +1815,14 @@ Page({
1798 1815 }
1799 1816 rent_address.address_value = e.detail.value
1800 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 1826 this.setData({
1802 1827 rentAddress_haschanged: true,
1803 1828 rentLocateInfo: rent_address
... ... @@ -1809,6 +1834,31 @@ Page({
1809 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 1863 // goupload: function(e) {
1814 1864 // console.log(e)
... ...
... ... @@ -292,7 +292,7 @@
292 292 </view>
293 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 296 <view class='divide_line_30'></view>
297 297 <template is="picker_cell_normal" data="{{...reducetypeData}}" />
298 298 <view class='divide_line_30'></view>
... ...
... ... @@ -35,6 +35,7 @@ Page({
35 35 },
36 36 cardtypeData: {
37 37 isrequre: true,
  38 + disabled: true,
38 39 label: '证照类型',
39 40 bindtype: 'cardtype',
40 41 selected: '居民身份证',
... ...
... ... @@ -44,6 +44,7 @@ Page({
44 44 },
45 45 cardtypeData: {
46 46 isrequre: true,
  47 + disabled: true,
47 48 label: '证照类型',
48 49 bindtype: 'cardtype',
49 50 placeholder: '居民身份证',
... ... @@ -838,6 +839,13 @@ Page({
838 839 var formdata = e.detail.value;
839 840 console.log("formdata", formdata)
840 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 849 if (this.data.name.length < 1) {
842 850 this.showtoast('请输入姓名');
843 851 return
... ... @@ -849,16 +857,10 @@ Page({
849 857 // this.showtoast('有必填项未填写');
850 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 864 // else if (!this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
863 865 // this.showtoast('有必填项未填写');
864 866 // return
... ...
1 1 {
2   - "navigationBarTitleText": "纳税人基本信息",
  2 + "navigationBarTitleText": "自然人基础信息",
3 3 "navigationBarTextStyle": "black",
4 4 "navigationBarBackgroundColor": "#FFFFFF"
5 5 }
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@
6 6 <view class="divide_line"></view>
7 7 <!-- 基本信息 -->
8 8 <view class='head_wrap' bindtap='span' id='1'>
9   - <text class='head_text_wrap1'>基信息</text>
  9 + <text class='head_text_wrap1'>基信息</text>
10 10 <text class='head_text_wrap2' hidden='{{!isshow01}}'>(点击收起非必填选项)</text>
11 11 <text class='head_text_wrap2' hidden='{{isshow01}}'>(点击展开非必填选项)</text>
12 12 <view style='float:right' wx:if='{{isshow01}}'>
... ... @@ -21,6 +21,19 @@
21 21 </view>
22 22 <view class='data_list'>
23 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 37 <view class='item_body' hidden="{{!isself}}">
25 38 <text class='red_star_right_10'>*</text>
26 39 <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text>
... ... @@ -32,7 +45,7 @@
32 45
33 46 <view class='item_body'>
34 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 49 <text class='text_black_30 float_right' style='line-height: 90rpx'>中国</text>
37 50 </view>
38 51 <view class="divide_line_30"></view>
... ... @@ -48,19 +61,7 @@
48 61 <text class='text_black_30 float_right' style='line-height: 90rpx'>否</text>
49 62 </view>
50 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 65 <view hidden='{{!isshow01}}'>
65 66 <view class="divide_line_30"></view>
66 67 <template is="picker_cell_normal" data="{{...genderData}}" />
... ...
注册登录 后发表评论