正在显示
5 个修改的文件
包含
71 行增加
和
83 行删除
... | ... | @@ -18,7 +18,7 @@ Page({ |
18 | 18 | title: '', |
19 | 19 | isIdCard:true, |
20 | 20 | extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], |
21 | - cur_index: 'children_education', | |
21 | + cur_index: 'support_duty', | |
22 | 22 | lovercardtypeData: { |
23 | 23 | label: '身份证件类型', |
24 | 24 | bindtype: 'lovercardtype', |
... | ... | @@ -45,11 +45,12 @@ Page({ |
45 | 45 | }, |
46 | 46 | taxperson_relativeData: { |
47 | 47 | label: '与纳税人的关系', |
48 | + isrequre: true, | |
48 | 49 | bindtype: 'taxperson_relative', |
49 | 50 | selected: '', |
50 | 51 | isblack: 'true', |
51 | 52 | placeholder: '请选择与纳税人的关系', |
52 | - values: ["父子", "父女", "母子", "母女"], | |
53 | + values: ["本人", "配偶", "子女"], | |
53 | 54 | onChange: 'onPickerSelect' |
54 | 55 | }, |
55 | 56 | childrencardtypeData: { |
... | ... | @@ -129,6 +130,7 @@ Page({ |
129 | 130 | }, |
130 | 131 | supporttypeData: { |
131 | 132 | label: '赡养类型', |
133 | + isrequre: true, | |
132 | 134 | bindtype: 'support_type', |
133 | 135 | selected: '', |
134 | 136 | isblack: 'true', |
... | ... | @@ -138,8 +140,10 @@ Page({ |
138 | 140 | }, |
139 | 141 | oldercardtypeData: { |
140 | 142 | label: '被赡养人证件类型', |
143 | + isrequre: true, | |
144 | + disabled:true, | |
141 | 145 | bindtype: 'oldercardtype', |
142 | - selected: '', | |
146 | + selected: '居民身份证', | |
143 | 147 | isblack: 'true', |
144 | 148 | placeholder: '请选择被赡养人证件类型', |
145 | 149 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
... | ... | @@ -148,9 +152,11 @@ Page({ |
148 | 152 | onChange: 'onPickerSelect' |
149 | 153 | }, |
150 | 154 | cardtypeData: { |
151 | - label: '证件类型', | |
155 | + label: '身份证件类型', | |
156 | + isrequre: true, | |
152 | 157 | bindtype: 'cardtype', |
153 | - selected: '', | |
158 | + selected: '居民身份证', | |
159 | + disabled: true, | |
154 | 160 | isblack: 'true', |
155 | 161 | placeholder: '请选择证件类型', |
156 | 162 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
... | ... | @@ -160,6 +166,7 @@ Page({ |
160 | 166 | }, |
161 | 167 | olderbirthDate: { |
162 | 168 | label: '被赡养人出生日期', |
169 | + isrequre: true, | |
163 | 170 | bindtype: 'olderbirthday', |
164 | 171 | selected: '', |
165 | 172 | isblack: 'true', |
... | ... | @@ -529,8 +536,10 @@ Page({ |
529 | 536 | console.log("formSubmit", e); |
530 | 537 | var formdata = e.detail.value |
531 | 538 | var newdata = formdata; |
539 | + var subUrl = '' | |
532 | 540 | switch (this.data.cur_index + '') { |
533 | 541 | case 'children_education': |
542 | + subUrl = 'persontax/v1/children-educations' | |
534 | 543 | if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { |
535 | 544 | this.showToast('请填写子女证件号码') |
536 | 545 | return |
... | ... | @@ -595,6 +604,7 @@ Page({ |
595 | 604 | newdata.nation = "中国" |
596 | 605 | break; |
597 | 606 | case 'continuing_education': |
607 | + subUrl = 'persontax/v1/continuing-educations' | |
598 | 608 | if (this.data.edutypeData.selected.length < 1) { |
599 | 609 | this.showToast('请选择教育类别') |
600 | 610 | return |
... | ... | @@ -639,6 +649,7 @@ Page({ |
639 | 649 | } |
640 | 650 | break; |
641 | 651 | case 'support_duty': |
652 | + // subUrl = 'persontax/v1/continuing-educations' | |
642 | 653 | if (this.data.supporttypeData.selected.length < 1) { |
643 | 654 | this.showToast('请选择赡养类型') |
644 | 655 | return |
... | ... | @@ -669,29 +680,34 @@ Page({ |
669 | 680 | newdata.older_cardtype = this.data.oldercardtypeData.selected |
670 | 681 | break; |
671 | 682 | case 'medical_fund': |
683 | + subUrl = 'persontax/v1/medical-funds' | |
672 | 684 | if (!formdata.name || formdata.name.length < 1) { |
673 | 685 | this.showToast('请填写姓名') |
674 | 686 | return |
675 | 687 | } else if (this.data.cardtypeData.selected.length < 1) { |
676 | - this.showToast('请选择赡养人证件类型') | |
688 | + this.showToast('请选择证件类型') | |
677 | 689 | return |
678 | - } else if (!formdata.idno || formdata.idno.length < 1) { | |
690 | + } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | |
679 | 691 | this.showToast('请填写证件号码') |
680 | 692 | return |
681 | 693 | } else if (this.data.taxperson_relativeData.selected.length < 1) { |
682 | 694 | this.showToast('请选择与纳税人关系') |
683 | 695 | return |
684 | - } else if (!formdata.total_money || formdata.reduce_money < 0) { | |
696 | + } else if (!formdata.total_amount || formdata.total_amount < 0) { | |
685 | 697 | this.showToast('请填写医疗支出总金额') |
686 | 698 | return |
687 | - } else if (!formdata.personal_money || formdata.personal_money < 0) { | |
699 | + } else if (!formdata.amount_by_person || formdata.amount_by_person < 0) { | |
688 | 700 | this.showToast('请填写个人负担金额') |
689 | 701 | return |
690 | 702 | } |
691 | - newdata.cardtype = this.data.cardtypeData.selected | |
692 | - newdata.taxperson_relative = this.data.taxperson_relativeData.selected | |
703 | + | |
704 | + newdata.total_amount = parseFloat(formdata.total_amount) | |
705 | + newdata.amount_by_person = parseFloat(formdata.amount_by_person) | |
706 | + newdata.id_card_type = this.data.cardtypeData.selected | |
707 | + newdata.relationship = this.data.taxperson_relativeData.selected | |
693 | 708 | break; |
694 | 709 | case 'house_fund': |
710 | + // subUrl = 'persontax/v1/medical-funds' | |
695 | 711 | console.log('TITLE', this.data.title) |
696 | 712 | if (!formdata.lover_name || formdata.lover_name.length < 1) { |
697 | 713 | this.showToast('请填写配偶姓名') |
... | ... | @@ -779,14 +795,16 @@ Page({ |
779 | 795 | // this.showToast('请填写扣除金额') |
780 | 796 | // return |
781 | 797 | // } |
782 | - newdata.deduction_type = this.data.reducetypeData.selected | |
783 | - newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
798 | + if (this.data.cur_index != 'medical_fund'){ | |
799 | + newdata.deduction_type = this.data.reducetypeData.selected | |
800 | + newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
801 | + } | |
784 | 802 | newdata.legal_entity_id = this.legal_entity_id |
785 | 803 | newdata.legal_entity = this.legal_entity |
786 | - this.addDatas(newdata) | |
804 | + this.addDatas(newdata, subUrl) | |
787 | 805 | }, |
788 | 806 | |
789 | - addDatas: function (newdata){ | |
807 | + addDatas: function (newdata,subUrl){ | |
790 | 808 | wx.showModal({ |
791 | 809 | title: '确认要提交申报吗?', |
792 | 810 | content: '确认后将不能修改', |
... | ... | @@ -798,7 +816,7 @@ Page({ |
798 | 816 | var that = this; |
799 | 817 | var Authorization = app.globalData.Authorization; |
800 | 818 | wx.request({ |
801 | - url: baseUrl + 'persontax/v1/children-educations', | |
819 | + url: baseUrl + subUrl, | |
802 | 820 | method: "POST", |
803 | 821 | header: { |
804 | 822 | 'content-type': 'application/json', | ... | ... |
... | ... | @@ -107,6 +107,7 @@ |
107 | 107 | <template is="picker_cell_normal" data="{{...supporttypeData}}" /> |
108 | 108 | <view class='divide_line_f5f5f5'></view> |
109 | 109 | <view style='height:90rpx'> |
110 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
110 | 111 | <text class='text_black_30 float_left'>被赡养人姓名</text> |
111 | 112 | <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入被赡养人姓名' name='older_name'></input> |
112 | 113 | </view> |
... | ... | @@ -114,15 +115,16 @@ |
114 | 115 | <template is="picker_cell_normal" data="{{...oldercardtypeData}}" /> |
115 | 116 | <view class='divide_line_f5f5f5'></view> |
116 | 117 | <view style='height:90rpx'> |
118 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
117 | 119 | <text class='text_black_30 float_left'>被赡养人证件号码</text> |
118 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入证件号码' type='idcard' name='older_idno' value='{{older_idno}}'></input> | |
120 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:420rpx;' placeholder='请输入证件号码' type='idcard' name='older_idno' value='{{older_idno}}'></input> | |
119 | 121 | </view> |
120 | 122 | <view class='divide_line_f5f5f5'></view> |
121 | 123 | <template is="picker_cell_normal" data="{{...olderbirthDate}}" /> |
122 | 124 | <view class='divide_line_f5f5f5'></view> |
123 | 125 | <view style='height:90rpx'> |
124 | 126 | <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> |
125 | - <text class='text_black_30 float_left'>国籍(地区)</text> | |
127 | + <text class='text_black_30 float_left'>被赡养人国籍(地区)</text> | |
126 | 128 | <text class='text_333_30 float_right' style='line-height: 90rpx;text-align:right' name='country'>中国</text> |
127 | 129 | </view> |
128 | 130 | <view class='divide_line_f5f5f5'></view> |
... | ... | @@ -138,28 +140,32 @@ |
138 | 140 | <!-- 大病医疗 --> |
139 | 141 | <view wx:if="{{cur_index=='medical_fund'}}" style='padding:0 30rpx;'> |
140 | 142 | <view style='height:90rpx'> |
143 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
141 | 144 | <text class='text_black_30 float_left'>姓名</text> |
142 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入姓名' name='name'></input> | |
145 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入姓名' name='name' value='{{name}}'></input> | |
143 | 146 | </view> |
144 | 147 | <view class='divide_line_f5f5f5'></view> |
145 | 148 | |
146 | 149 | <template is="picker_cell_normal" data="{{...cardtypeData}}" /> |
147 | 150 | <view class='divide_line_f5f5f5'></view> |
148 | 151 | <view style='height:90rpx'> |
152 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
149 | 153 | <text class='text_black_30 float_left'>身份证件号码</text> |
150 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='idno'></input> | |
154 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='id_card_no' value='{{id_card_no}}'></input> | |
151 | 155 | </view> |
152 | 156 | <view class='divide_line_f5f5f5'></view> |
153 | 157 | <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" /> |
154 | 158 | <view class='divide_line_f5f5f5'></view> |
155 | 159 | <view style='height:90rpx'> |
160 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
156 | 161 | <text class='text_black_30 float_left'>医疗支出总金额</text> |
157 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入总金额' type='digit' name='total_money'></input> | |
162 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入总金额' type='digit' name='total_amount' value='{{total_amount}}'></input> | |
158 | 163 | </view> |
159 | 164 | <view class='divide_line_f5f5f5'></view> |
160 | 165 | <view style='height:90rpx'> |
166 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
161 | 167 | <text class='text_black_30 float_left'>个人负担金额</text> |
162 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入金额' type='digit' name='personal_money'></input> | |
168 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入金额' type='digit' name='amount_by_person' value='{{total_amount}}'></input> | |
163 | 169 | </view> |
164 | 170 | </view> |
165 | 171 | <!-- 住房 --> |
... | ... | @@ -220,7 +226,7 @@ |
220 | 226 | </view> |
221 | 227 | </view> |
222 | 228 | |
223 | - <view style='padding:0 30rpx;'> | |
229 | + <view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund'}}"> | |
224 | 230 | <view class='divide_line_f5f5f5'></view> |
225 | 231 | <template is="picker_cell_normal" data="{{...reducetypeData}}" /> |
226 | 232 | <view class='divide_line_f5f5f5'></view> | ... | ... |
... | ... | @@ -9,36 +9,7 @@ Page({ |
9 | 9 | // tab切换 |
10 | 10 | isshow: false, |
11 | 11 | currentTab: 0, |
12 | - taxDatas: { | |
13 | - "id": "154024896031100928", | |
14 | - "created_at": 1511525284, | |
15 | - "updated_at": 1511525284, | |
16 | - "tenant_id": "122371433052508160", | |
17 | - "taxation_method": "salary", // 个税申报类型:"0101"-工资薪金 "0401"-劳务报酬 | |
18 | - "sub_taxation_method": "salary", // 正常工资薪金子类型:"0101"-正常工资薪金 "0107"-内退一次性补偿 "0108"-解除劳动合同一次性补偿 "0109"-个人股票期权行权收入 "0110"-企业年金 "0111"-提前退休一次性补贴 "0103"-全年一次性奖金收入 | |
19 | - "province": "北京市", | |
20 | - "province_code": "110000", | |
21 | - "city": "市辖区", | |
22 | - "city_code": "110100", | |
23 | - "district": "东城", | |
24 | - "district_code": "110101", | |
25 | - "name": "徐恒堂", //姓名 | |
26 | - "credential_type": "居民身份证", | |
27 | - "credential_number": "110221198301270632", //证件号码 | |
28 | - "option_date": 152135596800, | |
29 | - "personal_income": 475.6, //当期收入额 | |
30 | - "tax_free_income": 475.6, //当期免税收入 | |
31 | - "special_deduction": 475.6, //累计专项扣除(专项扣除合计) | |
32 | - "reduction_cost": 475.6, //累计基本减除(减除费用) | |
33 | - "special_additional_deduction": 475.6, //累计专项附加扣除(专项附加扣除合计) | |
34 | - "other_deduction": 475.6, //累计法定扣除(其他扣除合计) | |
35 | - "accumulated_taxable_income": 475.6, //累计应纳税所得额 | |
36 | - "tax_rate": 0.6, //税率 | |
37 | - "deduction_number": 475.6, //速算扣除数 | |
38 | - "accumulated_withholding_tax": 475.6, //累计应扣缴税额 | |
39 | - "prepay_tax": 475.6, //已预交税额 | |
40 | - "refund_tax": 475.6, //本期应缴税额(应补退税额) | |
41 | - }, | |
12 | + taxDatas: {}, | |
42 | 13 | choosed_date: '', |
43 | 14 | long_date: 0 |
44 | 15 | }, |
... | ... | @@ -63,7 +34,7 @@ Page({ |
63 | 34 | console.log('成功', result) |
64 | 35 | if (result.personal_income){ |
65 | 36 | self.setData({ |
66 | - taxDatas: result | |
37 | + taxDatas: result.data | |
67 | 38 | }) |
68 | 39 | } |
69 | 40 | ... | ... |
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | var format = require('../../../utils/util.js'); |
3 | 3 | var app = getApp(); |
4 | 4 | var baseUrl = app.globalData.baseUrl; |
5 | - | |
5 | +const Sub_taxation_method = {"0101":'正常工资薪金', "0107": "内退一次性补偿" ,"0108": "解除劳动合同一次性补偿", "0109": "个人股票期权行权收入", "0110": "企业年金", "0111": "提前退休一次性补贴", "0103": "全年一次性奖金收入"} | |
6 | 6 | Page({ |
7 | 7 | loadCount:0, |
8 | 8 | timestamp: 0, |
... | ... | @@ -11,29 +11,7 @@ Page({ |
11 | 11 | // tab切换 |
12 | 12 | isshow : false, |
13 | 13 | currentTab: 0, |
14 | - taxDatas: [{ | |
15 | - "id": "154024896031100928", | |
16 | - "created_at": 1511525284, | |
17 | - "updated_at": 1511525284, | |
18 | - "tenant_id": "122371433052508160", | |
19 | - "taxation_method": "salary", // 个税申报类型:"0101"-工资薪金 "0401"-劳务报酬 | |
20 | - "sub_taxation_method": "salary", // 正 | |
21 | - "province": "北京市", | |
22 | - "province_code": "110000", | |
23 | - "city": "市辖区", | |
24 | - "city_code": "110100", | |
25 | - "district": "东城", | |
26 | - "district_code": "110101", | |
27 | - "name": "徐恒堂", //姓名 | |
28 | - "credential_type": "身份证", | |
29 | - "credential_number": "110221198301270632", //证件号码 | |
30 | - "personal_tax": 475.6, //本期应缴税额 | |
31 | - "prepay_tax": 475.6, //已预交税额 | |
32 | - "accumulated_taxable_income": 475.6, //累计应纳税所得额 | |
33 | - "accumulated_withholding_tax": 475.6, //累计应扣缴税额 | |
34 | - "prepay_tax": 475.6, //已预交税额 | |
35 | - "option_date": 152135596800 | |
36 | - }], | |
14 | + taxDatas: [], | |
37 | 15 | salaryDatas: {}, |
38 | 16 | choosed_date: '' |
39 | 17 | }, |
... | ... | @@ -55,9 +33,10 @@ Page({ |
55 | 33 | header: { |
56 | 34 | 'Authorization': this.Authorization |
57 | 35 | }, |
36 | + data: { 'declare_month': timestamp }, | |
58 | 37 | success: function (result) { |
59 | 38 | that.setData({ |
60 | - taxDatas: result.items | |
39 | + taxDatas: that.handleTaxData(result.data.items) | |
61 | 40 | }) |
62 | 41 | |
63 | 42 | }, |
... | ... | @@ -95,7 +74,21 @@ Page({ |
95 | 74 | }) |
96 | 75 | |
97 | 76 | }, |
98 | - | |
77 | + handleTaxData: function (items) { | |
78 | + for (var i = 0; i < items.length; ++i) { | |
79 | + var item = items[i] | |
80 | + var method | |
81 | + if (item.taxation_method == '0101'){ | |
82 | + if (item.sub_taxation_method && Sub_taxation_method[item.sub_taxation_method]){ | |
83 | + method = '工资薪金-' + Sub_taxation_method[item.sub_taxation_method] | |
84 | + } | |
85 | + } else if (item.taxation_method == '0401') { | |
86 | + method = '劳务报酬' | |
87 | + } | |
88 | + item.method | |
89 | + } | |
90 | + return items; | |
91 | + }, | |
99 | 92 | handleSalaryData: function (items) { |
100 | 93 | for (var i = 0; i < items.length; ++i) { |
101 | 94 | var item = items[i] | ... | ... |
... | ... | @@ -17,10 +17,10 @@ |
17 | 17 | <view wx:if="{{currentTab==0}}"> |
18 | 18 | <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'> |
19 | 19 | <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'> |
20 | - <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>所得项目:{{item.taxation_method=='salary'?'工资薪金':'劳务报酬'}}</text> | |
20 | + <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>所得项目:{{item.method}}</text> | |
21 | 21 | <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view> |
22 | - <!-- <text class='text_666_28'>累计收入额:{{item.}}</text> --> | |
23 | - <!-- <text class='text_666_28'>当期收入额:{{item.}}</text> --> | |
22 | + <!-- <text class='text_666_28'>累计收入额:{{item.personal_income}}</text> --> | |
23 | + <text class='text_666_28'>当期收入额:{{item.personal_income}}</text> | |
24 | 24 | <text class='text_666_28'>累计应缴纳所得额:{{item.accumulated_taxable_income}}</text> |
25 | 25 | <text class='text_666_28'>累计应扣缴税额:{{item.accumulated_withholding_tax}}</text> |
26 | 26 | <text class='text_666_28'>已预交税额:{{item.prepay_tax}}</text> | ... | ... |
请
注册
或
登录
后发表评论