正在显示
1 个修改的文件
包含
58 行增加
和
10 行删除
... | ... | @@ -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({ |
... | ... | @@ -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: ["月度", "年度"], |
... | ... | @@ -484,10 +485,10 @@ Page({ |
484 | 485 | var deduction_amount, house_type='' |
485 | 486 | if (options.reducetype == '月度') { |
486 | 487 | reduce_typeData.selected = '月度' |
487 | - deduction_amount = Deduce_amounts_month[nameKey]? Deduce_amounts_month[nameKey]:0 | |
488 | + // deduction_amount = Deduce_amounts_month[nameKey] ? Deduce_amounts_month[nameKey] : 0 | |
488 | 489 | } else { |
489 | - deduction_amount = Deduce_amounts_year[nameKey]? Deduce_amounts_year[nameKey]:0 | |
490 | 490 | reduce_typeData.selected = '年度' |
491 | + // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0 | |
491 | 492 | } |
492 | 493 | if ("children_education" == options.status) { |
493 | 494 | this.loadCountry() |
... | ... | @@ -517,15 +518,18 @@ Page({ |
517 | 518 | this.supporttype = frontPage.data.issinglechildData.selected == '是' ? 'D' : 'S',//是否独生 |
518 | 519 | this.is_single = frontPage.data.issinglechildData.selected == '是' ? 'y' : 'n',//是否独生 |
519 | 520 | this.share_method = frontPage.data.shareMethodData.selected |
521 | + this.setData({ | |
522 | + deduction_amount: deduction_amount | |
523 | + }) | |
520 | 524 | } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") { |
521 | 525 | this.getbanklist() |
522 | 526 | house_type = "house_fund_rent" |
523 | 527 | title = '住房租金' |
524 | 528 | if (options.reducetype == '月度') { |
525 | 529 | reduce_typeData.selected = '月度' |
526 | - deduction_amount = Deduce_amounts_month["house_fund_rent"] | |
530 | + // deduction_amount = Deduce_amounts_month["house_fund_rent"] | |
527 | 531 | } else { |
528 | - deduction_amount = Deduce_amounts_year["house_fund_rent"] | |
532 | + // deduction_amount = Deduce_amounts_year["house_fund_rent"] | |
529 | 533 | reduce_typeData.selected = '年度' |
530 | 534 | } |
531 | 535 | } else if (frontPage.data.house_type == "house_fund_loan") { |
... | ... | @@ -540,6 +544,9 @@ Page({ |
540 | 544 | deduction_amount = Deduce_amounts_year["house_fund_loan"] |
541 | 545 | reduce_typeData.selected = '年度' |
542 | 546 | } |
547 | + this.setData({ | |
548 | + deduction_amount: deduction_amount | |
549 | + }) | |
543 | 550 | } |
544 | 551 | |
545 | 552 | this.setData({ |
... | ... | @@ -547,7 +554,6 @@ Page({ |
547 | 554 | cur_index: nameKey, |
548 | 555 | house_type: house_type, |
549 | 556 | reducetypeData: reduce_typeData, |
550 | - deduction_amount: deduction_amount | |
551 | 557 | }) |
552 | 558 | wx.setNavigationBarTitle({ |
553 | 559 | title: title, |
... | ... | @@ -1527,8 +1533,17 @@ Page({ |
1527 | 1533 | case 'child_percent': |
1528 | 1534 | var childrenpercent_data = this.data.childrenpercentData |
1529 | 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 | + } | |
1530 | 1544 | this.setData({ |
1531 | - childrenpercentData: childrenpercent_data | |
1545 | + childrenpercentData: childrenpercent_data, | |
1546 | + deduction_amount: deduction_amount | |
1532 | 1547 | }) |
1533 | 1548 | break; |
1534 | 1549 | break; |
... | ... | @@ -1635,10 +1650,10 @@ Page({ |
1635 | 1650 | var deduction_amount |
1636 | 1651 | if (e.detail.value == '1') {//非学历教育 |
1637 | 1652 | reducetypeData.selected = '年度' |
1638 | - reducetypeData.disabled = true | |
1653 | + // reducetypeData.disabled = true | |
1639 | 1654 | deduction_amount = Deduce_amounts_year['continuing_education_non'] |
1640 | 1655 | }else { |
1641 | - reducetypeData.disabled = false | |
1656 | + // reducetypeData.disabled = false | |
1642 | 1657 | reducetypeData.selected = '月度' |
1643 | 1658 | deduction_amount = Deduce_amounts_month['continuing_education'] |
1644 | 1659 | } |
... | ... | @@ -1800,6 +1815,14 @@ Page({ |
1800 | 1815 | } |
1801 | 1816 | rent_address.address_value = e.detail.value |
1802 | 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 | + }) | |
1803 | 1826 | this.setData({ |
1804 | 1827 | rentAddress_haschanged: true, |
1805 | 1828 | rentLocateInfo: rent_address |
... | ... | @@ -1811,6 +1834,31 @@ Page({ |
1811 | 1834 | // edu_name: educate_name |
1812 | 1835 | // }) |
1813 | 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 | + | |
1814 | 1862 | |
1815 | 1863 | // goupload: function(e) { |
1816 | 1864 | // console.log(e) | ... | ... |
请
注册
或
登录
后发表评论