提交 c9da569b4874adf9153979b789841d885a455b63

作者 wangyu
1 个父辈 21befee9

汇算清缴修复bug

@@ -6,8 +6,8 @@ Page({ @@ -6,8 +6,8 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 h5_url:"", 8 h5_url:"",
9 - url01: "http://dev.workai.com.cn//html/financialFinalSettlement_01.html",  
10 - url02: "http://dev.workai.com.cn//html/financialFinalSettlement_02.html", 9 + url02: "http://dev.workai.com.cn//html/financialFinalSettlement_01.html",
  10 + url01: "http://dev.workai.com.cn//html/financialFinalSettlement_02.html",
11 }, 11 },
12 12
13 /** 13 /**
@@ -23,6 +23,9 @@ Page({ @@ -23,6 +23,9 @@ Page({
23 h5_url: this.data.url02 23 h5_url: this.data.url02
24 }) 24 })
25 } 25 }
  26 + wx.setNavigationBarTitle({
  27 + title: options.type==1?"《公告》":"《公告》解读"
  28 + })
26 }, 29 },
27 30
28 /** 31 /**
@@ -33,7 +33,7 @@ Page({ @@ -33,7 +33,7 @@ Page({
33 if (formdata.total_salary || formdata.total_salary || formdata.remuneration_labor || formdata.author_payment || formdata.special_manage_cost || formdata.other_free_income || formdata.personal_endowment || formdata.personal_medical || formdata.personal_unemployment || formdata.personal_house_fund || formdata.childrens_education || formdata.continuing_education || formdata.housing_loan_interest || formdata.housing_rent || formdata.caring_old_people || formdata.serious_illness_medical || formdata.annuity || formdata.commercial_insurance || formdata.tax_extension || formdata.other_fee || formdata.donation_deducted || formdata.years_bouns || formdata.tax_savings || formdata.accumulated_withholding_tax){ 33 if (formdata.total_salary || formdata.total_salary || formdata.remuneration_labor || formdata.author_payment || formdata.special_manage_cost || formdata.other_free_income || formdata.personal_endowment || formdata.personal_medical || formdata.personal_unemployment || formdata.personal_house_fund || formdata.childrens_education || formdata.continuing_education || formdata.housing_loan_interest || formdata.housing_rent || formdata.caring_old_people || formdata.serious_illness_medical || formdata.annuity || formdata.commercial_insurance || formdata.tax_extension || formdata.other_fee || formdata.donation_deducted || formdata.years_bouns || formdata.tax_savings || formdata.accumulated_withholding_tax){
34 this.submitRequest(formdata) 34 this.submitRequest(formdata)
35 }else{ 35 }else{
36 - this.showToast("请输入内容") 36 + this.showToast("其他收入内容不能为空")
37 return 37 return
38 } 38 }
39 }, 39 },
@@ -138,11 +138,15 @@ @@ -138,11 +138,15 @@
138 <text class="text_gray7_34" style="line-height:104rpx">准予扣除的捐赠额</text> 138 <text class="text_gray7_34" style="line-height:104rpx">准予扣除的捐赠额</text>
139 <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='donation_deducted'></input> 139 <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='donation_deducted'></input>
140 </view> 140 </view>
141 - <view class='divide_line_30'></view>  
142 - <view style="height:104rpx;padding:0 30rpx"> 141 + <view style="height:104rpx;padding:0 30rpx;margin-top:20rpx">
143 <text class="text_gray7_34" style="line-height:104rpx">全年一次性奖金</text> 142 <text class="text_gray7_34" style="line-height:104rpx">全年一次性奖金</text>
144 <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='years_bouns'></input> 143 <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='years_bouns'></input>
145 </view> 144 </view>
  145 + <view class='divide_line_30'></view>
  146 + <view style="height:104rpx;padding:0 30rpx">
  147 + <text class="text_gray7_34" style="line-height:104rpx">准予扣除的捐赠额</text>
  148 + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='donation_deducted'></input>
  149 + </view>
146 </view> 150 </view>
147 <!-- 减免/已缴纳税额 --> 151 <!-- 减免/已缴纳税额 -->
148 <view style="background:#fff;margin-top:20rpx"> 152 <view style="background:#fff;margin-top:20rpx">
@@ -23,6 +23,10 @@ Page({ @@ -23,6 +23,10 @@ Page({
23 new_refund_tax:0, 23 new_refund_tax:0,
24 declare_end_date:"", 24 declare_end_date:"",
25 declare_end_days: 0, 25 declare_end_days: 0,
  26 + other_end_date: "",
  27 + other_end_days: 0,
  28 + refund_end_date: "",
  29 + refund_end_days: 0,
26 show_other_unit_view:false, 30 show_other_unit_view:false,
27 exempt_status:"" 31 exempt_status:""
28 }, 32 },
@@ -67,8 +71,12 @@ Page({ @@ -67,8 +71,12 @@ Page({
67 pay_status: result.data.pay_status, 71 pay_status: result.data.pay_status,
68 declaring_unit_status: result.data.declaring_unit_status, 72 declaring_unit_status: result.data.declaring_unit_status,
69 new_refund_tax: Math.abs(result.data.refund_tax), 73 new_refund_tax: Math.abs(result.data.refund_tax),
70 - declare_end_date: format.yearFormString(result.data.declare_end_time) + "年" + format.monthFormString(result.data.declare_end_time) + "月" + format.dayFormString(result.data.declare_end_time) + "日", 74 + declare_end_date: format.getDateString(result.data.declare_end_time) ,
71 declare_end_days: format.daysTillNow(Date.parse(new Date())/1000,result.data.declare_end_time), 75 declare_end_days: format.daysTillNow(Date.parse(new Date())/1000,result.data.declare_end_time),
  76 + other_end_date: format.getDateString(result.data.other_end_time),
  77 + other_end_days: format.daysTillNow(Date.parse(new Date()) / 1000, result.data.other_end_time),
  78 + refund_end_date: format.getDateString(result.data.refund_end_time),
  79 + refund_end_days: format.daysTillNow(Date.parse(new Date()) / 1000, result.data.refund_end_time),
72 exempt_status: result.data.exempt, 80 exempt_status: result.data.exempt,
73 payinfo: result.data 81 payinfo: result.data
74 }) 82 })
@@ -206,10 +214,24 @@ Page({ @@ -206,10 +214,24 @@ Page({
206 }, 214 },
207 215
208 declareHere: function() { 216 declareHere: function() {
  217 + if(this.data.declaring_unit_status==''){
  218 + wx.showToast({
  219 + icon:"none",
  220 + title: '单位还没有启用汇算清缴申报,请等候单位通知',
  221 + })
  222 + return
  223 + }
209 this.getUnitInfo() 224 this.getUnitInfo()
210 }, 225 },
211 226
212 declareNotHere: function() { 227 declareNotHere: function() {
  228 + if (this.data.declaring_unit_status == '') {
  229 + wx.showToast({
  230 + icon: "none",
  231 + title: '单位还没有启用汇算清缴申报,请等候单位通知',
  232 + })
  233 + return
  234 + }
213 var that = this 235 var that = this
214 wx.showModal({ 236 wx.showModal({
215 title: '', 237 title: '',
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <view style="margin-right:12rpx"> 20 <view style="margin-right:12rpx">
21 <image style="width:28rpx;height:28rpx;margin-top:6rpx" src="/images/warn_yellow.png"></image> 21 <image style="width:28rpx;height:28rpx;margin-top:6rpx" src="/images/warn_yellow.png"></image>
22 </view> 22 </view>
23 - <view wx:if="{{declaring_unit_status=='4'}}"> 23 + <view wx:if="{{declaring_unit_status==''||(declaring_unit_status=='4'&&!show_other_unit_view)}}">
24 <text class="text_gray6_28">请于 </text> 24 <text class="text_gray6_28">请于 </text>
25 <text class="text_yellow_28"> {{declare_end_date}}前 </text> 25 <text class="text_yellow_28"> {{declare_end_date}}前 </text>
26 <text class="text_gray6_28">确认是否在本单位进行汇算清缴,否则默认为您在其他单位申报或自行申报。 </text> 26 <text class="text_gray6_28">确认是否在本单位进行汇算清缴,否则默认为您在其他单位申报或自行申报。 </text>
@@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
33 </view> 33 </view>
34 </view> 34 </view>
35 35
36 - <view wx:if="{{declaring_unit_status!='4'&&declaring_unit_status!='5'&&!show_other_unit_view}}" style="background:#fff;padding:30rpx 30rpx 80rpx 30rpx;">  
37 - <text class="text_black_bold">{{declare_status=='1'?'汇算清缴申报中…':'汇算清缴申报完成!'}}</text> 36 + <view wx:if="{{declaring_unit_status!=''&&declaring_unit_status!='4'&&declaring_unit_status!='5'&&!show_other_unit_view}}" style="background:#fff;padding:30rpx 30rpx 80rpx 30rpx;">
  37 + <text class="text_black_bold">{{declare_status=='2'?'汇算清缴申报中…':'汇算清缴申报完成!'}}</text>
38 <view wx:if="{{declare_text_extra.length>0&&refund_status!='0'}}" style="display: flex;margin:20rpx 0"> 38 <view wx:if="{{declare_text_extra.length>0&&refund_status!='0'}}" style="display: flex;margin:20rpx 0">
39 <image style="width:28rpx;height:28rpx;margin-right:12rpx;margin-top:6rpx" src="/images/warn_yellow.png"></image> 39 <image style="width:28rpx;height:28rpx;margin-right:12rpx;margin-top:6rpx" src="/images/warn_yellow.png"></image>
40 <text class="text_gray6_28">{{declare_text_extra}} </text> 40 <text class="text_gray6_28">{{declare_text_extra}} </text>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 </view> 54 </view>
55 <view class="divide_line_f5f5f5"></view> 55 <view class="divide_line_f5f5f5"></view>
56 <view style="margin:20rpx 0"> 56 <view style="margin:20rpx 0">
57 - <text class="text_gray6_28">已缴费税额:</text> 57 + <text class="text_gray6_28">已预缴税额:</text>
58 <text class="text_gray3_28 float_right" style="line-height:50rpx">¥{{payinfo.accumulated_prepay_tax}}</text> 58 <text class="text_gray3_28 float_right" style="line-height:50rpx">¥{{payinfo.accumulated_prepay_tax}}</text>
59 </view> 59 </view>
60 <view class="divide_line_f5f5f5"></view> 60 <view class="divide_line_f5f5f5"></view>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 <view class=" float_right" style="margin:20rpx 0;font-size: 28rpx;color: #3795ff;" bindtap="finalpay_detail">查看详情</view> 76 <view class=" float_right" style="margin:20rpx 0;font-size: 28rpx;color: #3795ff;" bindtap="finalpay_detail">查看详情</view>
77 </view> 77 </view>
78 </scroll-view> 78 </scroll-view>
79 - <view wx:if="{{declaring_unit_status=='4'&&!show_other_unit_view}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff"> 79 + <view wx:if="{{declaring_unit_status==''||(declaring_unit_status=='4'&&!show_other_unit_view)}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff">
80 <view style="display: flex;justify-content: center;margin-top:20rpx"> 80 <view style="display: flex;justify-content: center;margin-top:20rpx">
81 <text class="text_gray6_28">距离确认是否在本单位进行汇算清缴时间还有 </text> 81 <text class="text_gray6_28">距离确认是否在本单位进行汇算清缴时间还有 </text>
82 <text class="text_yellow_28"> {{declare_end_days}} </text> 82 <text class="text_yellow_28"> {{declare_end_days}} </text>
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 <view wx:elif="{{declaring_unit_status=='4'&&show_other_unit_view}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff"> 102 <view wx:elif="{{declaring_unit_status=='4'&&show_other_unit_view}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff">
103 <view style="display: flex;justify-content: center;margin-top:20rpx"> 103 <view style="display: flex;justify-content: center;margin-top:20rpx">
104 <text class="text_gray6_28">距离确认填报其他单位个税申报明细时间还有 </text> 104 <text class="text_gray6_28">距离确认填报其他单位个税申报明细时间还有 </text>
105 - <text class="text_yellow_28"> {{declare_end_days}} </text> 105 + <text class="text_yellow_28"> {{other_end_days}} </text>
106 <text class="text_gray6_28">天</text> 106 <text class="text_gray6_28">天</text>
107 </view> 107 </view>
108 <view bindtap="noOtherUnitInfo" class="btn_blue_radius" style="margin:20rpx 30rpx "> 108 <view bindtap="noOtherUnitInfo" class="btn_blue_radius" style="margin:20rpx 30rpx ">
@@ -116,7 +116,7 @@ @@ -116,7 +116,7 @@
116 <view wx:elif="{{refund_status=='1'}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff"> 116 <view wx:elif="{{refund_status=='1'}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;background-color:#fff">
117 <view style="display: flex;justify-content: center;margin-top:20rpx"> 117 <view style="display: flex;justify-content: center;margin-top:20rpx">
118 <text class="text_gray6_28">距离确认是否申请退税时间还有 </text> 118 <text class="text_gray6_28">距离确认是否申请退税时间还有 </text>
119 - <text class="text_yellow_28"> {{declare_end_days}} </text> 119 + <text class="text_yellow_28"> {{refund_end_days}} </text>
120 <text class="text_gray6_28">天</text> 120 <text class="text_gray6_28">天</text>
121 </view> 121 </view>
122 <view bindtap="doRefund" class="btn_blue_radius" style="margin:20rpx 30rpx "> 122 <view bindtap="doRefund" class="btn_blue_radius" style="margin:20rpx 30rpx ">
@@ -127,10 +127,14 @@ @@ -127,10 +127,14 @@
127 <text class="text_black6_32">准予扣除的捐赠额</text> 127 <text class="text_black6_32">准予扣除的捐赠额</text>
128 <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text> 128 <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text>
129 </view> 129 </view>
130 - <view> 130 + <view style="margin-top:20rpx">
131 <text class="text_black6_32">全年一次性奖金</text> 131 <text class="text_black6_32">全年一次性奖金</text>
132 <text class="text_black6_32 float_right">{{incomeInfo.years_bouns}}</text> 132 <text class="text_black6_32 float_right">{{incomeInfo.years_bouns}}</text>
133 </view> 133 </view>
  134 + <view>
  135 + <text class="text_black6_32">准予扣除的捐赠额</text>
  136 + <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text>
  137 + </view>
134 </view> 138 </view>
135 <!-- 减免/已缴纳税额 --> 139 <!-- 减免/已缴纳税额 -->
136 <view style="background:#fff;padding:30rpx;margin-top:20rpx"> 140 <view style="background:#fff;padding:30rpx;margin-top:20rpx">
@@ -59,10 +59,14 @@ function dayFormString(dateStr) { @@ -59,10 +59,14 @@ function dayFormString(dateStr) {
59 return day 59 return day
60 } 60 }
61 61
  62 +function getDateString(date_stamp){//时间戳转年月日
  63 + return yearFormString(date_stamp) + "年" + monthFormString(date_stamp) + "月" + dayFormString(date_stamp) + "日"
  64 +}
  65 +
62 // 两个日期间隔天数 66 // 两个日期间隔天数
63 function daysTillNow(startDate, endDate){ 67 function daysTillNow(startDate, endDate){
64 var days = (endDate - startDate) / (24 * 60 * 60 ); 68 var days = (endDate - startDate) / (24 * 60 * 60 );
65 - return Math.floor(days); 69 + return Math.ceil(days);
66 } 70 }
67 71
68 //获取当前时间,格式YYYY-MM-DD 72 //获取当前时间,格式YYYY-MM-DD
@@ -259,5 +263,6 @@ module.exports = { @@ -259,5 +263,6 @@ module.exports = {
259 getAge: getAge, 263 getAge: getAge,
260 banknoCheck: banknoCheck, 264 banknoCheck: banknoCheck,
261 checkEmail: checkEmail, 265 checkEmail: checkEmail,
262 - daysTillNow: daysTillNow 266 + daysTillNow: daysTillNow,
  267 + getDateString: getDateString
263 } 268 }
注册登录 后发表评论