提交 a1666685dd8c7fe7f1a665344805be315247ee10

作者 pangy
1 个父辈 9db504ed

预扣预缴。非居民

@@ -11,13 +11,15 @@ Page({ @@ -11,13 +11,15 @@ Page({
11 currentTab: 0, 11 currentTab: 0,
12 taxDatas: {}, 12 taxDatas: {},
13 choosed_date: '', 13 choosed_date: '',
14 - long_date: 0 14 + long_date: 0,
  15 + isForeign:false
15 }, 16 },
16 onLoad: function (options) { 17 onLoad: function (options) {
17 if (options.date){ 18 if (options.date){
18 var mydate = new Date(); 19 var mydate = new Date();
19 this.setData({ 20 this.setData({
20 choosed_date: options.date, 21 choosed_date: options.date,
  22 + isForeign: options.taxpayer_type == 'non-resident'
21 }) 23 })
22 } 24 }
23 if (!options.id) return 25 if (!options.id) return
@@ -33,7 +35,7 @@ Page({ @@ -33,7 +35,7 @@ Page({
33 success: function (result) { 35 success: function (result) {
34 console.log('成功', result) 36 console.log('成功', result)
35 self.setData({ 37 self.setData({
36 - taxDatas: result.data 38 + taxDatas: that.handleTaxData(result.data)
37 }) 39 })
38 }, 40 },
39 fail: function (res) { 41 fail: function (res) {
@@ -46,7 +48,21 @@ Page({ @@ -46,7 +48,21 @@ Page({
46 }) 48 })
47 }, 49 },
48 50
49 - 51 + handleTaxData: function (items) {
  52 + for (var i = 0; i < items.length; ++i) {
  53 + var item = items[i]
  54 + var donation_way
  55 + if (item.donation_way == 'quota') {
  56 + method = '限额扣除'
  57 + } else if (item.donation_way == 'full') {
  58 + method = '全额扣除'
  59 + } else if (item.donation_way == 'mix') {
  60 + method = '混合'
  61 + }
  62 + item.method = method
  63 + }
  64 + return items;
  65 + },
50 66
51 67
52 }) 68 })
1 <!--pages/main/advancepayment/adPayDetails/adPayDetails.wxml--> 1 <!--pages/main/advancepayment/adPayDetails/adPayDetails.wxml-->
2 <view> 2 <view>
3 <scroll-view style='margin-bottom:40rpx'> 3 <scroll-view style='margin-bottom:40rpx'>
4 - <view style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'> 4 + <view wx:if="{{!isForeign}}" style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
5 <view> 5 <view>
6 <text class='text_blue_32'>{{choosed_date}}</text> 6 <text class='text_blue_32'>{{choosed_date}}</text>
7 <view class='float_right'> 7 <view class='float_right'>
@@ -91,28 +91,96 @@ @@ -91,28 +91,96 @@
91 </view> 91 </view>
92 </view> 92 </view>
93 </view> 93 </view>
94 -  
95 - <!-- <view style='padding-left:30rpx;background:#ffffff'>  
96 - <image class='icon_wrap' src="/images/rectangle_icon.png"></image>  
97 - <text style='padding-left:20rpx' class='text_gray_32'>工资明细</text>  
98 - </view>  
99 - <view style='margin-top:2rpx;background:#ffffff;padding-bottom:30rpx'>  
100 - <view style='padding:30rpx'>  
101 - <text class='text_wrap_left'>公司名称</text>  
102 - <text class='text_wrap_right'>北京小爱智能科技</text> 94 + <view wx:else style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
  95 + <view>
  96 + <text class='text_blue_32'>{{choosed_date}}</text>
  97 + <view class='float_right'>
  98 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  99 + </view>
103 </view> 100 </view>
104 - <view style='padding:30rpx'>  
105 - <text class='text_wrap_left'>计薪时间</text>  
106 - <text class='text_wrap_right'>2018/09/09 20:10</text> 101 + <!-- <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
  102 + </picker> -->
  103 + <view class='divide_line_f5f5f5'></view>
  104 + <view style='padding:30rpx 0'>
  105 + <text class='text_666_30 float_left'>收入额</text>
  106 + <text class='text_number float_right'>{{taxDatas.personal_income}}</text>
  107 + </view>
  108 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  109 + <view style='padding:30rpx 0'>
  110 + <text class='text_666_30 float_left'>免税收入</text>
  111 + <text class='text_number float_right'>{{taxDatas.tax_free_income}}</text>
  112 + </view>
  113 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  114 + <view style='padding:30rpx 0'>
  115 + <text class='text_666_30 float_left'>其他扣除</text>
  116 + <text class='text_number float_right'>{{taxDatas.other_deduction}}</text>
  117 + </view>
  118 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  119 + <view style='padding:30rpx 0'>
  120 + <text class='text_666_30 float_left'>实际捐赠额</text>
  121 + <text class='text_number float_right'>{{taxDatas.actual_donation}}</text>
  122 + </view>
  123 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  124 + <view style='padding:30rpx 0'>
  125 + <text class='text_666_30 float_left'>捐赠方式</text>
  126 + <text class='text_number float_right'>{{taxDatas.donation_way}}</text>
  127 + </view>
  128 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  129 + <view style='padding:30rpx 0'>
  130 + <text class='text_666_30 float_left'>减免税额</text>
  131 + <text class='text_number float_right'>{{taxDatas.tax_savings}}</text>
  132 + </view>
  133 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  134 + <view style='padding:30rpx 0'>
  135 + <text class='text_666_30 float_left'>应纳税所得额</text>
  136 + <text class='text_number float_right'>{{taxDatas.accumulated_taxable_income}}</text>
  137 + </view>
  138 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  139 + <view style='padding:30rpx 0'>
  140 + <text class='text_666_30 float_left'>税率</text>
  141 + <text class='text_number float_right'>{{taxDatas.tax_rate}}%</text>
107 </view> 142 </view>
108 - <view style='padding:30rpx'>  
109 - <text class='text_wrap_left'>发薪时间</text>  
110 - <text class='text_wrap_right'>2018/09/10 09:00 </text> 143 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  144 + <view style='padding:30rpx 0'>
  145 + <text class='text_666_30 float_left'>速算扣除数</text>
  146 + <text class='text_number float_right'>{{taxDatas.deduction_number}}</text>
111 </view> 147 </view>
112 - <view style='padding:30rpx'>  
113 - <text class='text_wrap_left'>实发工资</text>  
114 - <text class='text_wrap_right'>13860.00</text> 148 + </view>
  149 + <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
  150 + <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image>
  151 + <view>
  152 + <view class='view_bg_wrap' style='margin-top: 44rpx;'>
  153 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  154 + <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
  155 + <text class='text_text_wrap'>应扣缴税额</text>
  156 + </view>
  157 + <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  158 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  159 + <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
  160 + <text class='text_text_wrap'>已扣缴税额</text>
  161 + </view>
  162 +
  163 + </view>
  164 +
  165 + <view class='view_bg_wrap' style='margin-top: 180rpx;'>
  166 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  167 + <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
  168 + <text class='text_text_wrap'>应补(退)税额</text>
  169 + </view>
  170 +
  171 + <!-- <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  172 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  173 + <text class='text_num_wrap'>30.8%</text>
  174 + <text class='text_text_wrap'>使用税率</text>
  175 + </view>
  176 + <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  177 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  178 + <text class='text_num_wrap'>19106.91</text>
  179 + <text class='text_text_wrap'>速算扣除数</text>
  180 + </view> -->
  181 + </view>
115 </view> 182 </view>
116 - </view> --> 183 + </view>
  184 +
117 </scroll-view> 185 </scroll-view>
118 </view> 186 </view>
@@ -96,7 +96,11 @@ Page({ @@ -96,7 +96,11 @@ Page({
96 } else if (item.taxation_method == '0103') { 96 } else if (item.taxation_method == '0103') {
97 method = '全年一次性奖金' 97 method = '全年一次性奖金'
98 } 98 }
99 - item.method = method 99 + if (item.taxpayer_type == 'non-resident'){//非居民
  100 + item.method = '外籍人' + method
  101 + }else{
  102 + item.method = method
  103 + }
100 } 104 }
101 return items; 105 return items;
102 }, 106 },
@@ -196,8 +200,9 @@ Page({ @@ -196,8 +200,9 @@ Page({
196 }, 200 },
197 201
198 goItemDetails: function (e) { 202 goItemDetails: function (e) {
  203 + var item = this.data.taxDatas[e.currentTarget.id]
199 wx.navigateTo({ 204 wx.navigateTo({
200 - url: "adPayDetails/adPayDetails?id=" + e.currentTarget.id + "&date=" + this.data.choosed_date 205 + url: "adPayDetails/adPayDetails?id=" + item.id + "&date=" + this.data.choosed_date + "&taxpayer_type=" + item.taxpayer_type
201 }) 206 })
202 }, 207 },
203 }) 208 })
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <view style='width:100%; font-family: PingFang-SC-Medium;font-size: 14px;color: #999999;letter-spacing: 0;text-align: center;'>还没有企业为您申报个税哦~</view> 20 <view style='width:100%; font-family: PingFang-SC-Medium;font-size: 14px;color: #999999;letter-spacing: 0;text-align: center;'>还没有企业为您申报个税哦~</view>
21 </view> 21 </view>
22 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'> 22 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
23 - <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'> 23 + <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{index}}' bindtap='goItemDetails'>
24 <text class='text_blue_36'>扣缴义务人: {{item.declaring_unit}}</text> 24 <text class='text_blue_36'>扣缴义务人: {{item.declaring_unit}}</text>
25 <text class='text_blue_36'>所得项目: {{item.method}}</text> 25 <text class='text_blue_36'>所得项目: {{item.method}}</text>
26 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view> 26 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
注册登录 后发表评论