...
|
...
|
@@ -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)
|
...
|
...
|
|