正在显示
5 个修改的文件
包含
117 行增加
和
99 行删除
... | ... | @@ -4,8 +4,8 @@ var OSSInit; |
4 | 4 | var app = getApp(); |
5 | 5 | var baseUrl = app.globalData.baseUrl; |
6 | 6 | const AddTypeNames = { 'children_education': '子女教育', 'continuing_education': '继续教育', 'support_duty': '赡养老人', 'medical_fund': '大病医疗', 'house_fund': '住房' } |
7 | -const Deduce_amounts_month = { 'children_education': 1000, 'continuing_education': 400, 'support_duty': '', 'medical_fund': '','house_fund':''} | |
8 | -const Deduce_amounts_year = { 'children_education': 12000, 'continuing_education': 4800, 'support_duty': '', 'medical_fund': '', 'house_fund': '' } | |
7 | +const Deduce_amounts_month = { 'children_education': 1000, 'continuing_education': 400, 'support_duty': 2000, 'medical_fund': 0,'house_fund':0} | |
8 | +const Deduce_amounts_year = { 'children_education': 12000, 'continuing_education': 4800, 'support_duty': 24000, 'medical_fund': 0, 'house_fund': 0 } | |
9 | 9 | |
10 | 10 | Page({ |
11 | 11 | idcard_belong:null,//照片信息获取返回时判断所属 |
... | ... | @@ -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', |
... | ... | @@ -43,13 +43,24 @@ Page({ |
43 | 43 | end: '2018-01-01', |
44 | 44 | onChange: 'onPickerSelect', |
45 | 45 | }, |
46 | + older_relativeData: { | |
47 | + label: '与纳税人的关系', | |
48 | + isrequre: true, | |
49 | + bindtype: 'older_relative', | |
50 | + selected: '', | |
51 | + isblack: 'true', | |
52 | + placeholder: '请选择与纳税人的关系', | |
53 | + values: ["父母", "祖父母", "外祖父母"], | |
54 | + onChange: 'onPickerSelect' | |
55 | + }, | |
46 | 56 | taxperson_relativeData: { |
47 | 57 | label: '与纳税人的关系', |
58 | + isrequre: true, | |
48 | 59 | bindtype: 'taxperson_relative', |
49 | 60 | selected: '', |
50 | 61 | isblack: 'true', |
51 | 62 | placeholder: '请选择与纳税人的关系', |
52 | - values: ["父子", "父女", "母子", "母女"], | |
63 | + values: ["本人", "配偶", "子女"], | |
53 | 64 | onChange: 'onPickerSelect' |
54 | 65 | }, |
55 | 66 | childrencardtypeData: { |
... | ... | @@ -129,6 +140,7 @@ Page({ |
129 | 140 | }, |
130 | 141 | supporttypeData: { |
131 | 142 | label: '赡养类型', |
143 | + isrequre: true, | |
132 | 144 | bindtype: 'support_type', |
133 | 145 | selected: '', |
134 | 146 | isblack: 'true', |
... | ... | @@ -138,8 +150,10 @@ Page({ |
138 | 150 | }, |
139 | 151 | oldercardtypeData: { |
140 | 152 | label: '被赡养人证件类型', |
153 | + isrequre: true, | |
154 | + disabled:true, | |
141 | 155 | bindtype: 'oldercardtype', |
142 | - selected: '', | |
156 | + selected: '居民身份证', | |
143 | 157 | isblack: 'true', |
144 | 158 | placeholder: '请选择被赡养人证件类型', |
145 | 159 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
... | ... | @@ -148,9 +162,11 @@ Page({ |
148 | 162 | onChange: 'onPickerSelect' |
149 | 163 | }, |
150 | 164 | cardtypeData: { |
151 | - label: '证件类型', | |
165 | + label: '身份证件类型', | |
166 | + isrequre: true, | |
152 | 167 | bindtype: 'cardtype', |
153 | - selected: '', | |
168 | + selected: '居民身份证', | |
169 | + disabled: true, | |
154 | 170 | isblack: 'true', |
155 | 171 | placeholder: '请选择证件类型', |
156 | 172 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
... | ... | @@ -160,6 +176,7 @@ Page({ |
160 | 176 | }, |
161 | 177 | olderbirthDate: { |
162 | 178 | label: '被赡养人出生日期', |
179 | + isrequre: true, | |
163 | 180 | bindtype: 'olderbirthday', |
164 | 181 | selected: '', |
165 | 182 | isblack: 'true', |
... | ... | @@ -413,6 +430,21 @@ Page({ |
413 | 430 | // } |
414 | 431 | this.setData(setData) |
415 | 432 | break; |
433 | + case 'medical_fund': | |
434 | + var setData = {} | |
435 | + if (data.name && data.name.length) { | |
436 | + setData.name = data.name | |
437 | + } | |
438 | + if (data.id_card_no && data.id_card_no.length) { | |
439 | + setData.id_card_no = data.id_card_no | |
440 | + } | |
441 | + if (data.family_ties && data.family_ties.length) { | |
442 | + var taxperson_relativeData = this.data.taxperson_relativeData | |
443 | + taxperson_relativeData.selected = data.family_ties | |
444 | + setData.taxperson_relativeData = taxperson_relativeData | |
445 | + } | |
446 | + this.setData(setData) | |
447 | + break; | |
416 | 448 | } |
417 | 449 | |
418 | 450 | }, |
... | ... | @@ -529,8 +561,10 @@ Page({ |
529 | 561 | console.log("formSubmit", e); |
530 | 562 | var formdata = e.detail.value |
531 | 563 | var newdata = formdata; |
564 | + var subUrl = '' | |
532 | 565 | switch (this.data.cur_index + '') { |
533 | 566 | case 'children_education': |
567 | + subUrl = 'persontax/v1/children-educations' | |
534 | 568 | if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { |
535 | 569 | this.showToast('请填写子女证件号码') |
536 | 570 | return |
... | ... | @@ -595,6 +629,7 @@ Page({ |
595 | 629 | newdata.nation = "中国" |
596 | 630 | break; |
597 | 631 | case 'continuing_education': |
632 | + subUrl = 'persontax/v1/continuing-educations' | |
598 | 633 | if (this.data.edutypeData.selected.length < 1) { |
599 | 634 | this.showToast('请选择教育类别') |
600 | 635 | return |
... | ... | @@ -639,6 +674,7 @@ Page({ |
639 | 674 | } |
640 | 675 | break; |
641 | 676 | case 'support_duty': |
677 | + subUrl = 'persontax/v1/support-duties' | |
642 | 678 | if (this.data.supporttypeData.selected.length < 1) { |
643 | 679 | this.showToast('请选择赡养类型') |
644 | 680 | return |
... | ... | @@ -652,46 +688,48 @@ Page({ |
652 | 688 | this.showToast('请填写赡养人证件号') |
653 | 689 | return |
654 | 690 | } |
655 | - if (this.data.oldersupport_lable == 'single') { | |
656 | - if (this.data.olderbirthDate.selected.length < 1) { | |
657 | - this.showToast('请选择赡养人出生日期') | |
658 | - return | |
659 | - } | |
660 | - if (this.data.taxperson_relativeData.selected.length < 1) { | |
661 | - this.showToast('请选择与纳税人关系') | |
662 | - return | |
663 | - } | |
664 | - newdata.older_birthday = this.data.olderbirthDate.selected | |
665 | - newdata.older_relative = this.data.taxperson_relativeData.selected | |
691 | + if (this.data.olderbirthDate.selected.length < 1) { | |
692 | + this.showToast('请选择赡养人出生日期') | |
693 | + return | |
666 | 694 | } |
667 | - | |
695 | + if (this.data.older_relativeData.selected.length < 1) { | |
696 | + this.showToast('请选择与纳税人关系') | |
697 | + return | |
698 | + } | |
699 | + newdata.older_birthday = this.data.olderbirthDate.datelong | |
700 | + newdata.older_relative = this.data.older_relativeData.selected | |
668 | 701 | newdata.support_type = this.data.supporttypeData.selected |
669 | 702 | newdata.older_cardtype = this.data.oldercardtypeData.selected |
670 | 703 | break; |
671 | 704 | case 'medical_fund': |
705 | + subUrl = 'persontax/v1/medical-funds' | |
672 | 706 | if (!formdata.name || formdata.name.length < 1) { |
673 | 707 | this.showToast('请填写姓名') |
674 | 708 | return |
675 | 709 | } else if (this.data.cardtypeData.selected.length < 1) { |
676 | - this.showToast('请选择赡养人证件类型') | |
710 | + this.showToast('请选择证件类型') | |
677 | 711 | return |
678 | - } else if (!formdata.idno || formdata.idno.length < 1) { | |
712 | + } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | |
679 | 713 | this.showToast('请填写证件号码') |
680 | 714 | return |
681 | 715 | } else if (this.data.taxperson_relativeData.selected.length < 1) { |
682 | 716 | this.showToast('请选择与纳税人关系') |
683 | 717 | return |
684 | - } else if (!formdata.total_money || formdata.reduce_money < 0) { | |
718 | + } else if (!formdata.total_amount || formdata.total_amount < 0) { | |
685 | 719 | this.showToast('请填写医疗支出总金额') |
686 | 720 | return |
687 | - } else if (!formdata.personal_money || formdata.personal_money < 0) { | |
721 | + } else if (!formdata.amount_by_person || formdata.amount_by_person < 0) { | |
688 | 722 | this.showToast('请填写个人负担金额') |
689 | 723 | return |
690 | 724 | } |
691 | - newdata.cardtype = this.data.cardtypeData.selected | |
692 | - newdata.taxperson_relative = this.data.taxperson_relativeData.selected | |
725 | + | |
726 | + newdata.total_amount = parseFloat(formdata.total_amount) | |
727 | + newdata.amount_by_person = parseFloat(formdata.amount_by_person) | |
728 | + newdata.id_card_type = this.data.cardtypeData.selected | |
729 | + newdata.relationship = this.data.taxperson_relativeData.selected | |
693 | 730 | break; |
694 | 731 | case 'house_fund': |
732 | + // subUrl = 'persontax/v1/medical-funds' | |
695 | 733 | console.log('TITLE', this.data.title) |
696 | 734 | if (!formdata.lover_name || formdata.lover_name.length < 1) { |
697 | 735 | this.showToast('请填写配偶姓名') |
... | ... | @@ -779,14 +817,16 @@ Page({ |
779 | 817 | // this.showToast('请填写扣除金额') |
780 | 818 | // return |
781 | 819 | // } |
782 | - newdata.deduction_type = this.data.reducetypeData.selected | |
783 | - newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
820 | + if (this.data.cur_index != 'medical_fund'){ | |
821 | + newdata.deduction_type = this.data.reducetypeData.selected | |
822 | + newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
823 | + } | |
784 | 824 | newdata.legal_entity_id = this.legal_entity_id |
785 | 825 | newdata.legal_entity = this.legal_entity |
786 | - this.addDatas(newdata) | |
826 | + this.addDatas(newdata, subUrl) | |
787 | 827 | }, |
788 | 828 | |
789 | - addDatas: function (newdata){ | |
829 | + addDatas: function (newdata,subUrl){ | |
790 | 830 | wx.showModal({ |
791 | 831 | title: '确认要提交申报吗?', |
792 | 832 | content: '确认后将不能修改', |
... | ... | @@ -798,7 +838,7 @@ Page({ |
798 | 838 | var that = this; |
799 | 839 | var Authorization = app.globalData.Authorization; |
800 | 840 | wx.request({ |
801 | - url: baseUrl + 'persontax/v1/children-educations', | |
841 | + url: baseUrl + subUrl, | |
802 | 842 | method: "POST", |
803 | 843 | header: { |
804 | 844 | 'content-type': 'application/json', |
... | ... | @@ -847,6 +887,13 @@ Page({ |
847 | 887 | loverbirthDate: lover_birthDate |
848 | 888 | }) |
849 | 889 | break; |
890 | + case 'older_relative': | |
891 | + var older_relativeData = this.data.older_relativeData | |
892 | + older_relativeData.selected = older_relativeData.values[e.detail.value] | |
893 | + this.setData({ | |
894 | + older_relativeData: older_relativeData | |
895 | + }) | |
896 | + break; | |
850 | 897 | case 'taxperson_relative': |
851 | 898 | var taxperson_relativedata = this.data.taxperson_relativeData |
852 | 899 | taxperson_relativedata.selected = taxperson_relativedata.values[e.detail.value] |
... | ... | @@ -918,6 +965,7 @@ Page({ |
918 | 965 | case 'olderbirthday': |
919 | 966 | var older_birthDate = this.data.olderbirthDate |
920 | 967 | older_birthDate.selected = e.detail.value |
968 | + older_birthDate.datelong = Date.parse(new Date(e.detail.value)) / 1000, | |
921 | 969 | this.setData({ |
922 | 970 | olderbirthDate: older_birthDate |
923 | 971 | }) | ... | ... |
... | ... | @@ -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,20 +115,21 @@ |
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> | |
126 | - <text class='text_333_30 float_right' style='line-height: 90rpx;text-align:right' name='country'>中国</text> | |
127 | + <text class='text_black_30 float_left'>被赡养人国籍(地区)</text> | |
128 | + <text class='text_777_30 float_right' style='line-height: 90rpx;text-align:right' name='country'>中国</text> | |
127 | 129 | </view> |
128 | 130 | <view class='divide_line_f5f5f5'></view> |
129 | 131 | |
130 | - <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" /> | |
132 | + <template is="picker_cell_normal" data="{{...older_relativeData}}" /> | |
131 | 133 | |
132 | 134 | <!-- <view class='divide_line_f5f5f5'></view> |
133 | 135 | <view style='height:90rpx'> |
... | ... | @@ -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> | ... | ... |
请
注册
或
登录
后发表评论