提交 e7f91f9d1b9a6a831785ae45bb49ea4d8547df12

作者 pangy
2 个父辈 3b39c573 54d26033

Merge branch 'dev_py' into dev2.0

@@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
18 title: '', 18 title: '',
19 isIdCard:true, 19 isIdCard:true,
20 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], 20 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"],
21 - cur_index: 'children_education', 21 + cur_index: 'support_duty',
22 lovercardtypeData: { 22 lovercardtypeData: {
23 label: '身份证件类型', 23 label: '身份证件类型',
24 bindtype: 'lovercardtype', 24 bindtype: 'lovercardtype',
@@ -45,11 +45,12 @@ Page({ @@ -45,11 +45,12 @@ Page({
45 }, 45 },
46 taxperson_relativeData: { 46 taxperson_relativeData: {
47 label: '与纳税人的关系', 47 label: '与纳税人的关系',
  48 + isrequre: true,
48 bindtype: 'taxperson_relative', 49 bindtype: 'taxperson_relative',
49 selected: '', 50 selected: '',
50 isblack: 'true', 51 isblack: 'true',
51 placeholder: '请选择与纳税人的关系', 52 placeholder: '请选择与纳税人的关系',
52 - values: ["父子", "父女", "母子", "母女"], 53 + values: ["本人", "配偶", "子女"],
53 onChange: 'onPickerSelect' 54 onChange: 'onPickerSelect'
54 }, 55 },
55 childrencardtypeData: { 56 childrencardtypeData: {
@@ -129,6 +130,7 @@ Page({ @@ -129,6 +130,7 @@ Page({
129 }, 130 },
130 supporttypeData: { 131 supporttypeData: {
131 label: '赡养类型', 132 label: '赡养类型',
  133 + isrequre: true,
132 bindtype: 'support_type', 134 bindtype: 'support_type',
133 selected: '', 135 selected: '',
134 isblack: 'true', 136 isblack: 'true',
@@ -138,8 +140,10 @@ Page({ @@ -138,8 +140,10 @@ Page({
138 }, 140 },
139 oldercardtypeData: { 141 oldercardtypeData: {
140 label: '被赡养人证件类型', 142 label: '被赡养人证件类型',
  143 + isrequre: true,
  144 + disabled:true,
141 bindtype: 'oldercardtype', 145 bindtype: 'oldercardtype',
142 - selected: '', 146 + selected: '居民身份证',
143 isblack: 'true', 147 isblack: 'true',
144 placeholder: '请选择被赡养人证件类型', 148 placeholder: '请选择被赡养人证件类型',
145 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', 149 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
@@ -148,9 +152,11 @@ Page({ @@ -148,9 +152,11 @@ Page({
148 onChange: 'onPickerSelect' 152 onChange: 'onPickerSelect'
149 }, 153 },
150 cardtypeData: { 154 cardtypeData: {
151 - label: '证件类型', 155 + label: '身份证件类型',
  156 + isrequre: true,
152 bindtype: 'cardtype', 157 bindtype: 'cardtype',
153 - selected: '', 158 + selected: '居民身份证',
  159 + disabled: true,
154 isblack: 'true', 160 isblack: 'true',
155 placeholder: '请选择证件类型', 161 placeholder: '请选择证件类型',
156 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', 162 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
@@ -160,6 +166,7 @@ Page({ @@ -160,6 +166,7 @@ Page({
160 }, 166 },
161 olderbirthDate: { 167 olderbirthDate: {
162 label: '被赡养人出生日期', 168 label: '被赡养人出生日期',
  169 + isrequre: true,
163 bindtype: 'olderbirthday', 170 bindtype: 'olderbirthday',
164 selected: '', 171 selected: '',
165 isblack: 'true', 172 isblack: 'true',
@@ -529,8 +536,10 @@ Page({ @@ -529,8 +536,10 @@ Page({
529 console.log("formSubmit", e); 536 console.log("formSubmit", e);
530 var formdata = e.detail.value 537 var formdata = e.detail.value
531 var newdata = formdata; 538 var newdata = formdata;
  539 + var subUrl = ''
532 switch (this.data.cur_index + '') { 540 switch (this.data.cur_index + '') {
533 case 'children_education': 541 case 'children_education':
  542 + subUrl = 'persontax/v1/children-educations'
534 if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { 543 if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) {
535 this.showToast('请填写子女证件号码') 544 this.showToast('请填写子女证件号码')
536 return 545 return
@@ -595,6 +604,7 @@ Page({ @@ -595,6 +604,7 @@ Page({
595 newdata.nation = "中国" 604 newdata.nation = "中国"
596 break; 605 break;
597 case 'continuing_education': 606 case 'continuing_education':
  607 + subUrl = 'persontax/v1/continuing-educations'
598 if (this.data.edutypeData.selected.length < 1) { 608 if (this.data.edutypeData.selected.length < 1) {
599 this.showToast('请选择教育类别') 609 this.showToast('请选择教育类别')
600 return 610 return
@@ -639,6 +649,7 @@ Page({ @@ -639,6 +649,7 @@ Page({
639 } 649 }
640 break; 650 break;
641 case 'support_duty': 651 case 'support_duty':
  652 + // subUrl = 'persontax/v1/continuing-educations'
642 if (this.data.supporttypeData.selected.length < 1) { 653 if (this.data.supporttypeData.selected.length < 1) {
643 this.showToast('请选择赡养类型') 654 this.showToast('请选择赡养类型')
644 return 655 return
@@ -669,29 +680,34 @@ Page({ @@ -669,29 +680,34 @@ Page({
669 newdata.older_cardtype = this.data.oldercardtypeData.selected 680 newdata.older_cardtype = this.data.oldercardtypeData.selected
670 break; 681 break;
671 case 'medical_fund': 682 case 'medical_fund':
  683 + subUrl = 'persontax/v1/medical-funds'
672 if (!formdata.name || formdata.name.length < 1) { 684 if (!formdata.name || formdata.name.length < 1) {
673 this.showToast('请填写姓名') 685 this.showToast('请填写姓名')
674 return 686 return
675 } else if (this.data.cardtypeData.selected.length < 1) { 687 } else if (this.data.cardtypeData.selected.length < 1) {
676 - this.showToast('请选择赡养人证件类型') 688 + this.showToast('请选择证件类型')
677 return 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 this.showToast('请填写证件号码') 691 this.showToast('请填写证件号码')
680 return 692 return
681 } else if (this.data.taxperson_relativeData.selected.length < 1) { 693 } else if (this.data.taxperson_relativeData.selected.length < 1) {
682 this.showToast('请选择与纳税人关系') 694 this.showToast('请选择与纳税人关系')
683 return 695 return
684 - } else if (!formdata.total_money || formdata.reduce_money < 0) { 696 + } else if (!formdata.total_amount || formdata.total_amount < 0) {
685 this.showToast('请填写医疗支出总金额') 697 this.showToast('请填写医疗支出总金额')
686 return 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 this.showToast('请填写个人负担金额') 700 this.showToast('请填写个人负担金额')
689 return 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 break; 708 break;
694 case 'house_fund': 709 case 'house_fund':
  710 + // subUrl = 'persontax/v1/medical-funds'
695 console.log('TITLE', this.data.title) 711 console.log('TITLE', this.data.title)
696 if (!formdata.lover_name || formdata.lover_name.length < 1) { 712 if (!formdata.lover_name || formdata.lover_name.length < 1) {
697 this.showToast('请填写配偶姓名') 713 this.showToast('请填写配偶姓名')
@@ -779,14 +795,16 @@ Page({ @@ -779,14 +795,16 @@ Page({
779 // this.showToast('请填写扣除金额') 795 // this.showToast('请填写扣除金额')
780 // return 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 newdata.legal_entity_id = this.legal_entity_id 802 newdata.legal_entity_id = this.legal_entity_id
785 newdata.legal_entity = this.legal_entity 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 wx.showModal({ 808 wx.showModal({
791 title: '确认要提交申报吗?', 809 title: '确认要提交申报吗?',
792 content: '确认后将不能修改', 810 content: '确认后将不能修改',
@@ -798,7 +816,7 @@ Page({ @@ -798,7 +816,7 @@ Page({
798 var that = this; 816 var that = this;
799 var Authorization = app.globalData.Authorization; 817 var Authorization = app.globalData.Authorization;
800 wx.request({ 818 wx.request({
801 - url: baseUrl + 'persontax/v1/children-educations', 819 + url: baseUrl + subUrl,
802 method: "POST", 820 method: "POST",
803 header: { 821 header: {
804 'content-type': 'application/json', 822 'content-type': 'application/json',
@@ -107,6 +107,7 @@ @@ -107,6 +107,7 @@
107 <template is="picker_cell_normal" data="{{...supporttypeData}}" /> 107 <template is="picker_cell_normal" data="{{...supporttypeData}}" />
108 <view class='divide_line_f5f5f5'></view> 108 <view class='divide_line_f5f5f5'></view>
109 <view style='height:90rpx'> 109 <view style='height:90rpx'>
  110 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
110 <text class='text_black_30 float_left'>被赡养人姓名</text> 111 <text class='text_black_30 float_left'>被赡养人姓名</text>
111 <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 <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 </view> 113 </view>
@@ -114,15 +115,16 @@ @@ -114,15 +115,16 @@
114 <template is="picker_cell_normal" data="{{...oldercardtypeData}}" /> 115 <template is="picker_cell_normal" data="{{...oldercardtypeData}}" />
115 <view class='divide_line_f5f5f5'></view> 116 <view class='divide_line_f5f5f5'></view>
116 <view style='height:90rpx'> 117 <view style='height:90rpx'>
  118 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
117 <text class='text_black_30 float_left'>被赡养人证件号码</text> 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 </view> 121 </view>
120 <view class='divide_line_f5f5f5'></view> 122 <view class='divide_line_f5f5f5'></view>
121 <template is="picker_cell_normal" data="{{...olderbirthDate}}" /> 123 <template is="picker_cell_normal" data="{{...olderbirthDate}}" />
122 <view class='divide_line_f5f5f5'></view> 124 <view class='divide_line_f5f5f5'></view>
123 <view style='height:90rpx'> 125 <view style='height:90rpx'>
124 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 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 <text class='text_333_30 float_right' style='line-height: 90rpx;text-align:right' name='country'>中国</text> 128 <text class='text_333_30 float_right' style='line-height: 90rpx;text-align:right' name='country'>中国</text>
127 </view> 129 </view>
128 <view class='divide_line_f5f5f5'></view> 130 <view class='divide_line_f5f5f5'></view>
@@ -138,28 +140,32 @@ @@ -138,28 +140,32 @@
138 <!-- 大病医疗 --> 140 <!-- 大病医疗 -->
139 <view wx:if="{{cur_index=='medical_fund'}}" style='padding:0 30rpx;'> 141 <view wx:if="{{cur_index=='medical_fund'}}" style='padding:0 30rpx;'>
140 <view style='height:90rpx'> 142 <view style='height:90rpx'>
  143 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
141 <text class='text_black_30 float_left'>姓名</text> 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 </view> 146 </view>
144 <view class='divide_line_f5f5f5'></view> 147 <view class='divide_line_f5f5f5'></view>
145 148
146 <template is="picker_cell_normal" data="{{...cardtypeData}}" /> 149 <template is="picker_cell_normal" data="{{...cardtypeData}}" />
147 <view class='divide_line_f5f5f5'></view> 150 <view class='divide_line_f5f5f5'></view>
148 <view style='height:90rpx'> 151 <view style='height:90rpx'>
  152 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
149 <text class='text_black_30 float_left'>身份证件号码</text> 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 </view> 155 </view>
152 <view class='divide_line_f5f5f5'></view> 156 <view class='divide_line_f5f5f5'></view>
153 <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" /> 157 <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" />
154 <view class='divide_line_f5f5f5'></view> 158 <view class='divide_line_f5f5f5'></view>
155 <view style='height:90rpx'> 159 <view style='height:90rpx'>
  160 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
156 <text class='text_black_30 float_left'>医疗支出总金额</text> 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 </view> 163 </view>
159 <view class='divide_line_f5f5f5'></view> 164 <view class='divide_line_f5f5f5'></view>
160 <view style='height:90rpx'> 165 <view style='height:90rpx'>
  166 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
161 <text class='text_black_30 float_left'>个人负担金额</text> 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 </view> 169 </view>
164 </view> 170 </view>
165 <!-- 住房 --> 171 <!-- 住房 -->
@@ -220,7 +226,7 @@ @@ -220,7 +226,7 @@
220 </view> 226 </view>
221 </view> 227 </view>
222 228
223 - <view style='padding:0 30rpx;'> 229 + <view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund'}}">
224 <view class='divide_line_f5f5f5'></view> 230 <view class='divide_line_f5f5f5'></view>
225 <template is="picker_cell_normal" data="{{...reducetypeData}}" /> 231 <template is="picker_cell_normal" data="{{...reducetypeData}}" />
226 <view class='divide_line_f5f5f5'></view> 232 <view class='divide_line_f5f5f5'></view>
@@ -9,36 +9,7 @@ Page({ @@ -9,36 +9,7 @@ Page({
9 // tab切换 9 // tab切换
10 isshow: false, 10 isshow: false,
11 currentTab: 0, 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 choosed_date: '', 13 choosed_date: '',
43 long_date: 0 14 long_date: 0
44 }, 15 },
@@ -63,7 +34,7 @@ Page({ @@ -63,7 +34,7 @@ Page({
63 console.log('成功', result) 34 console.log('成功', result)
64 if (result.personal_income){ 35 if (result.personal_income){
65 self.setData({ 36 self.setData({
66 - taxDatas: result 37 + taxDatas: result.data
67 }) 38 })
68 } 39 }
69 40
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 var format = require('../../../utils/util.js'); 2 var format = require('../../../utils/util.js');
3 var app = getApp(); 3 var app = getApp();
4 var baseUrl = app.globalData.baseUrl; 4 var baseUrl = app.globalData.baseUrl;
5 - 5 +const Sub_taxation_method = {"0101":'正常工资薪金', "0107": "内退一次性补偿" ,"0108": "解除劳动合同一次性补偿", "0109": "个人股票期权行权收入", "0110": "企业年金", "0111": "提前退休一次性补贴", "0103": "全年一次性奖金收入"}
6 Page({ 6 Page({
7 loadCount:0, 7 loadCount:0,
8 timestamp: 0, 8 timestamp: 0,
@@ -11,29 +11,7 @@ Page({ @@ -11,29 +11,7 @@ Page({
11 // tab切换 11 // tab切换
12 isshow : false, 12 isshow : false,
13 currentTab: 0, 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 salaryDatas: {}, 15 salaryDatas: {},
38 choosed_date: '' 16 choosed_date: ''
39 }, 17 },
@@ -55,9 +33,10 @@ Page({ @@ -55,9 +33,10 @@ Page({
55 header: { 33 header: {
56 'Authorization': this.Authorization 34 'Authorization': this.Authorization
57 }, 35 },
  36 + data: { 'declare_month': timestamp },
58 success: function (result) { 37 success: function (result) {
59 that.setData({ 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,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 handleSalaryData: function (items) { 92 handleSalaryData: function (items) {
100 for (var i = 0; i < items.length; ++i) { 93 for (var i = 0; i < items.length; ++i) {
101 var item = items[i] 94 var item = items[i]
@@ -17,10 +17,10 @@ @@ -17,10 +17,10 @@
17 <view wx:if="{{currentTab==0}}"> 17 <view wx:if="{{currentTab==0}}">
18 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'> 18 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
19 <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'> 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 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view> 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 <text class='text_666_28'>累计应缴纳所得额:{{item.accumulated_taxable_income}}</text> 24 <text class='text_666_28'>累计应缴纳所得额:{{item.accumulated_taxable_income}}</text>
25 <text class='text_666_28'>累计应扣缴税额:{{item.accumulated_withholding_tax}}</text> 25 <text class='text_666_28'>累计应扣缴税额:{{item.accumulated_withholding_tax}}</text>
26 <text class='text_666_28'>已预交税额:{{item.prepay_tax}}</text> 26 <text class='text_666_28'>已预交税额:{{item.prepay_tax}}</text>
注册登录 后发表评论