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