正在显示
82 个修改的文件
包含
4665 行增加
和
120 行删除
@@ -81,7 +81,7 @@ App({ | @@ -81,7 +81,7 @@ App({ | ||
81 | that.configOssUrl() | 81 | that.configOssUrl() |
82 | if (relaunch) { | 82 | if (relaunch) { |
83 | wx.reLaunch({ | 83 | wx.reLaunch({ |
84 | - url: '../guide/guide' | 84 | + url: '../guide/guide', |
85 | }) | 85 | }) |
86 | } | 86 | } |
87 | } | 87 | } |
@@ -149,6 +149,7 @@ App({ | @@ -149,6 +149,7 @@ App({ | ||
149 | // baseUrl: "https://api.workai.com.cn/", | 149 | // baseUrl: "https://api.workai.com.cn/", |
150 | baseUrl: "https://api.fjhxrl.com/", | 150 | baseUrl: "https://api.fjhxrl.com/", |
151 | OSSUrl: "", //"https://oss.workai.com.cn/", | 151 | OSSUrl: "", //"https://oss.workai.com.cn/", |
152 | + OSSImgHeader:"https://hropublic.oss-cn-beijing.aliyuncs.com/weixin/", | ||
152 | userInfo: null, | 153 | userInfo: null, |
153 | hostInfo: null, | 154 | hostInfo: null, |
154 | hasLogin: false, | 155 | hasLogin: false, |
1 | { | 1 | { |
2 | - "pages": [ | 2 | + "pages": [ |
3 | "pages/main/guide/guide", | 3 | "pages/main/guide/guide", |
4 | "pages/getPhone/getPhone", | 4 | "pages/getPhone/getPhone", |
5 | "pages/main/smartchat/chat", | 5 | "pages/main/smartchat/chat", |
6 | + | ||
6 | "pages/main/taxperson/home", | 7 | "pages/main/taxperson/home", |
7 | "pages/main/taxperson/editinfo/editinfo", | 8 | "pages/main/taxperson/editinfo/editinfo", |
8 | "pages/main/taxperson/addinfo/addinfo", | 9 | "pages/main/taxperson/addinfo/addinfo", |
9 | "pages/main/taxperson/idinfo/idinfo", | 10 | "pages/main/taxperson/idinfo/idinfo", |
11 | + | ||
10 | "pages/main/addtionalreduce/home", | 12 | "pages/main/addtionalreduce/home", |
11 | "pages/main/addtionalreduce/godeclare/godeclare", | 13 | "pages/main/addtionalreduce/godeclare/godeclare", |
12 | "pages/main/addtionalreduce/godetail/godetail", | 14 | "pages/main/addtionalreduce/godetail/godetail", |
@@ -14,16 +16,32 @@ | @@ -14,16 +16,32 @@ | ||
14 | "pages/main/addtionalreduce/addextrainfo/addextrainfo", | 16 | "pages/main/addtionalreduce/addextrainfo/addextrainfo", |
15 | "pages/main/addtionalreduce/adddupporters/adddupporters", | 17 | "pages/main/addtionalreduce/adddupporters/adddupporters", |
16 | "pages/main/addtionalreduce/additiondetail/additiondetail", | 18 | "pages/main/addtionalreduce/additiondetail/additiondetail", |
19 | + | ||
17 | "pages/main/advancepayment/adPayHome", | 20 | "pages/main/advancepayment/adPayHome", |
21 | + | ||
18 | "pages/main/finalpayment/home", | 22 | "pages/main/finalpayment/home", |
19 | "pages/main/finalpayment/inputinfo/inputinfo", | 23 | "pages/main/finalpayment/inputinfo/inputinfo", |
20 | "pages/main/finalpayment/historylist/historylist", | 24 | "pages/main/finalpayment/historylist/historylist", |
21 | "pages/main/finalpayment/historydetail/historydetail", | 25 | "pages/main/finalpayment/historydetail/historydetail", |
26 | + | ||
27 | + "pages/main/finalpay/home", | ||
28 | + "pages/main/finalpay/incomeDetail/incomeDetail", | ||
29 | + "pages/main/finalpay/addUnitInfo/addUnitInfo", | ||
30 | + "pages/main/finalpay/refundInfo/refundInfo", | ||
31 | + "pages/main/finalpay/refundDetail/refundDetail", | ||
32 | + "pages/main/finalpay/freeIncomeDetail/freeIncomeDetail", | ||
33 | + "pages/main/finalpay/otherDeductDetail/healthInsurDetail", | ||
34 | + "pages/main/finalpay/otherDeductDetail/endowmentInsurDetail", | ||
35 | + "pages/main/finalpay/otherDeductDetail/otherDeductDetail", | ||
36 | + "pages/main/finalpay/donationDetail/donationDetail", | ||
37 | + "pages/main/finalpay/deductOrPayedDetail/deductOrPayedDetail", | ||
38 | + | ||
22 | "pages/login/login", | 39 | "pages/login/login", |
23 | "pages/main/advancepayment/adPayDetails/adPayDetails", | 40 | "pages/main/advancepayment/adPayDetails/adPayDetails", |
24 | "pages/main/verify/verify_info", | 41 | "pages/main/verify/verify_info", |
25 | "pages/main/verify/verify_result/verify_result", | 42 | "pages/main/verify/verify_result/verify_result", |
26 | - "pages/main/verify/verify_idcard/verify_idcard" | 43 | + "pages/main/verify/verify_idcard/verify_idcard", |
44 | + "pages/common/webview" | ||
27 | ], | 45 | ], |
28 | "window": { | 46 | "window": { |
29 | "backgroundTextStyle": "light", | 47 | "backgroundTextStyle": "light", |
images/add_extra.png
0 → 100644
2.5 KB
images/bg.png
已删除
100644 → 0
55.1 KB
images/childedu_declare.png
已删除
100644 → 0
110.5 KB
images/continueedu_declare.png
已删除
100644 → 0
118.5 KB
images/extra_img_bg.png
已删除
100644 → 0
92.2 KB
images/guide_bg.png
已删除
100644 → 0
108.4 KB
images/health_declare.png
已删除
100644 → 0
116.1 KB
images/house_declare_loan.png
已删除
100755 → 0
115.3 KB
images/house_declare_rent.png
已删除
100644 → 0
148.7 KB
images/openmodal_img.png
已删除
100644 → 0
57.5 KB
images/payment_bg.png
已删除
100644 → 0
53.2 KB
images/support_older_declare.png
已删除
100644 → 0
122.3 KB
images/verify_dialog.png
已删除
100644 → 0
67.3 KB
pages/common/webview.js
0 → 100644
1 | +// pages/common/webview.js | ||
2 | +var baseUrl = getApp().globalData.baseUrl; | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * Page initial data | ||
7 | + */ | ||
8 | + data: { | ||
9 | + h5_url:"", | ||
10 | + url02: "http://dev.workai.com.cn//html/financialFinalSettlement_01.html", | ||
11 | + url01: "http://dev.workai.com.cn//html/financialFinalSettlement_02.html", | ||
12 | + }, | ||
13 | + | ||
14 | + /** | ||
15 | + * Lifecycle function--Called when page load | ||
16 | + */ | ||
17 | + onLoad: function (options) { | ||
18 | + if(options.type == 1){ | ||
19 | + this.setData({ | ||
20 | + h5_url: this.updateUrl(this.data.url01) | ||
21 | + }) | ||
22 | + }else{ | ||
23 | + this.setData({ | ||
24 | + h5_url: this.updateUrl(this.data.url02) | ||
25 | + }) | ||
26 | + } | ||
27 | + console.log("url",this.data.h5_url) | ||
28 | + wx.setNavigationBarTitle({ | ||
29 | + title: options.type==1?"《公告》":"《公告》解读" | ||
30 | + }) | ||
31 | + }, | ||
32 | + | ||
33 | + updateUrl(s){ | ||
34 | + if (baseUrl.indexOf("https")>-1 || baseUrl.indexOf("com")>-1){//正式环境 | ||
35 | + // return "https://emp.workai.com.cn//html/financialFinalSettlement_01.html" | ||
36 | + return s.replace("dev", "emp").replace("http","https") | ||
37 | + }else{ | ||
38 | + return s | ||
39 | + } | ||
40 | + }, | ||
41 | + | ||
42 | + /** | ||
43 | + * Lifecycle function--Called when page is initially rendered | ||
44 | + */ | ||
45 | + onReady: function () { | ||
46 | + | ||
47 | + }, | ||
48 | + | ||
49 | + /** | ||
50 | + * Lifecycle function--Called when page show | ||
51 | + */ | ||
52 | + onShow: function () { | ||
53 | + | ||
54 | + }, | ||
55 | + | ||
56 | + /** | ||
57 | + * Lifecycle function--Called when page hide | ||
58 | + */ | ||
59 | + onHide: function () { | ||
60 | + | ||
61 | + }, | ||
62 | + | ||
63 | + /** | ||
64 | + * Lifecycle function--Called when page unload | ||
65 | + */ | ||
66 | + onUnload: function () { | ||
67 | + | ||
68 | + }, | ||
69 | + | ||
70 | + /** | ||
71 | + * Page event handler function--Called when user drop down | ||
72 | + */ | ||
73 | + onPullDownRefresh: function () { | ||
74 | + | ||
75 | + }, | ||
76 | + | ||
77 | + /** | ||
78 | + * Called when page reach bottom | ||
79 | + */ | ||
80 | + onReachBottom: function () { | ||
81 | + | ||
82 | + }, | ||
83 | + | ||
84 | + /** | ||
85 | + * Called when user click on the top right corner to share | ||
86 | + */ | ||
87 | + onShareAppMessage: function () { | ||
88 | + | ||
89 | + } | ||
90 | +}) |
pages/common/webview.json
0 → 100644
pages/common/webview.wxml
0 → 100644
pages/common/webview.wxss
0 → 100644
1 | +/* pages/common/webview.wxss */ |
1 | 1 | ||
2 | <!-- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">获取用户手机号</button> --> | 2 | <!-- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">获取用户手机号</button> --> |
3 | <view class='page'> | 3 | <view class='page'> |
4 | - <image src='/images/bg.png' class='back-img' mode="bottom aspectFill"></image> | 4 | + <image src='{{bg}}' class='back-img' mode="bottom aspectFill"></image> |
5 | <view class='content-wrap'> | 5 | <view class='content-wrap'> |
6 | <image style="width:160rpx;height:36rpx;margin:0 60rpx" src="/images/login_tip.png"></image> | 6 | <image style="width:160rpx;height:36rpx;margin:0 60rpx" src="/images/login_tip.png"></image> |
7 | <view style="font-size:28rpx;font-family:PingFang-SC-Medium,PingFang-SC;color:#828699;margin:15rpx 60rpx 150rpx 60rpx">您需要登录后才能进行个人信息采集、专项附加扣除填报、查看个人工资条和扣税明细。</view> | 7 | <view style="font-size:28rpx;font-family:PingFang-SC-Medium,PingFang-SC;color:#828699;margin:15rpx 60rpx 150rpx 60rpx">您需要登录后才能进行个人信息采集、专项附加扣除填报、查看个人工资条和扣税明细。</view> |
@@ -7,6 +7,7 @@ var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0- | @@ -7,6 +7,7 @@ var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0- | ||
7 | 7 | ||
8 | Page({ | 8 | Page({ |
9 | data: { | 9 | data: { |
10 | + bg: getApp().globalData.OSSImgHeader + "bg.png", | ||
10 | mobile: '', | 11 | mobile: '', |
11 | verifyCode: "", | 12 | verifyCode: "", |
12 | tenant_id: "", | 13 | tenant_id: "", |
1 | <!--pages/login/login.wxml--> | 1 | <!--pages/login/login.wxml--> |
2 | <view class="page"> | 2 | <view class="page"> |
3 | 3 | ||
4 | - <image src='/images/bg.png' class='back-img' mode="bottom aspectFill"></image> | 4 | + <image src='{{bg}}' class='back-img' mode="bottom aspectFill"></image> |
5 | 5 | ||
6 | <view class='data_wrap'> | 6 | <view class='data_wrap'> |
7 | <view style='margin-left:126rpx;margin-right:126rpx'> | 7 | <view style='margin-left:126rpx;margin-right:126rpx'> |
@@ -119,7 +119,7 @@ Page({ | @@ -119,7 +119,7 @@ Page({ | ||
119 | "Authorization": Authorization | 119 | "Authorization": Authorization |
120 | }, | 120 | }, |
121 | success: function (res) { | 121 | success: function (res) { |
122 | - if (res && res.data) { | 122 | + if (res.statusCode==200 && res.data) { |
123 | console.log("show_modal", !res.data.new_addition_status) | 123 | console.log("show_modal", !res.data.new_addition_status) |
124 | that.setData({ | 124 | that.setData({ |
125 | addition_data_last_year: res.data.last_addition_status, | 125 | addition_data_last_year: res.data.last_addition_status, |
@@ -204,7 +204,7 @@ Page({ | @@ -204,7 +204,7 @@ Page({ | ||
204 | "Authorization": Authorization | 204 | "Authorization": Authorization |
205 | }, | 205 | }, |
206 | success: function (res) { | 206 | success: function (res) { |
207 | - if (res && res.data) { | 207 | + if (res.statusCode==200 && res.data) { |
208 | console.log("res", res) | 208 | console.log("res", res) |
209 | that.setData({ | 209 | that.setData({ |
210 | choosed_date: "2020" | 210 | choosed_date: "2020" |
@@ -35,12 +35,14 @@ Page({ | @@ -35,12 +35,14 @@ Page({ | ||
35 | imgpath: '', | 35 | imgpath: '', |
36 | new_data: null, | 36 | new_data: null, |
37 | modal_images: { | 37 | modal_images: { |
38 | - "children_education": "/images/childedu_declare.png", | ||
39 | - "continuing_education": "/images/continueedu_declare.png", | ||
40 | - "support_duty": "/images/support_older_declare.png", | ||
41 | - "medical_fund": "/images/health_declare.png", | ||
42 | - // "house_fund": "/images/house_declare_loan.png" | 38 | + "children_education": getApp().globalData.OSSImgHeader + "childedu_declare.png", |
39 | + "continuing_education": getApp().globalData.OSSImgHeader +"continueedu_declare.png", | ||
40 | + "support_duty": getApp().globalData.OSSImgHeader +"support_older_declare.png", | ||
41 | + "medical_fund": getApp().globalData.OSSImgHeader +"health_declare.png", | ||
43 | }, | 42 | }, |
43 | + house_fund_loan: getApp().globalData.OSSImgHeader + "house_declare_loan.png", | ||
44 | + house_fund_rent: getApp().globalData.OSSImgHeader + "house_declare_rent.png", | ||
45 | + openmodal_img: getApp().globalData.OSSImgHeader + "openmodal_img.png", | ||
44 | showModal_img: false, | 46 | showModal_img: false, |
45 | showModal_reducetype: false, | 47 | showModal_reducetype: false, |
46 | showModal_addtype: false, | 48 | showModal_addtype: false, |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | 3 | ||
4 | <view style='width:100%;height:100%;'> | 4 | <view style='width:100%;height:100%;'> |
5 | <view style='display:flex;flex-direction:column;margin-bottom:140rpx;'> | 5 | <view style='display:flex;flex-direction:column;margin-bottom:140rpx;'> |
6 | - <image class='openmodal_img' src="/images/openmodal_img.png" bindtap='showModalImg'></image> | 6 | + <image class='openmodal_img' src="{{openmodal_img}}" bindtap='showModalImg'></image> |
7 | 7 | ||
8 | <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='children_education'||cur_status=='house_fund'}}"> | 8 | <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='children_education'||cur_status=='house_fund'}}"> |
9 | <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text> | 9 | <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text> |
@@ -396,8 +396,8 @@ | @@ -396,8 +396,8 @@ | ||
396 | <!-- 申报说明 --> | 396 | <!-- 申报说明 --> |
397 | <view style='top:200rpx;position:absolute;z-index:10;width:325px;right:0;left:0;margin:auto' hidden="{{!showModal_img}}"> | 397 | <view style='top:200rpx;position:absolute;z-index:10;width:325px;right:0;left:0;margin:auto' hidden="{{!showModal_img}}"> |
398 | <image wx:if="{{cur_status!='house_fund'}}" class='modal_img' src="{{modal_images[cur_status]}}"></image> | 398 | <image wx:if="{{cur_status!='house_fund'}}" class='modal_img' src="{{modal_images[cur_status]}}"></image> |
399 | - <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_rent'}}" class='modal_img02' src="/images/house_declare_rent.png"></image> | ||
400 | - <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_loan'}}" class='modal_img' src="/images/house_declare_loan.png"></image> | 399 | + <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_rent'}}" class='modal_img02' src="{{house_declare_rent}}"></image> |
400 | + <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_loan'}}" class='modal_img' src="{{house_declare_loan}}"></image> | ||
401 | <!-- <text style='position:absolute;font-size:20px;color:#fff;float:right;top:0;right:100rpx' bindtap='closeModalImg'>x</text> --> | 401 | <!-- <text style='position:absolute;font-size:20px;color:#fff;float:right;top:0;right:100rpx' bindtap='closeModalImg'>x</text> --> |
402 | <view style='width:80rpx;height:80rpx;position:absolute;float:right;top:0;right:0;display:flex;align-items:center;justify-content:center;' bindtap='closeModalImg'> | 402 | <view style='width:80rpx;height:80rpx;position:absolute;float:right;top:0;right:0;display:flex;align-items:center;justify-content:center;' bindtap='closeModalImg'> |
403 | <image style='width:30rpx;height:30rpx;' src='/images/close.png'></image> | 403 | <image style='width:30rpx;height:30rpx;' src='/images/close.png'></image> |
@@ -6,6 +6,7 @@ var baseUrl = app.globalData.baseUrl; | @@ -6,6 +6,7 @@ var baseUrl = app.globalData.baseUrl; | ||
6 | Page({ | 6 | Page({ |
7 | 7 | ||
8 | data: { | 8 | data: { |
9 | + payment_bg: getApp().globalData.OSSImgHeader + "payment_bg.png", | ||
9 | // tab切换 | 10 | // tab切换 |
10 | isshow: false, | 11 | isshow: false, |
11 | currentTab: 0, | 12 | currentTab: 0, |
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | </view> | 58 | </view> |
59 | </view> | 59 | </view> |
60 | <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'> | 60 | <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'> |
61 | - <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image> | 61 | + <image class=' payment_img_bg ' src='{{payment_bg}}' style='position:absolute;z-index: 1;'></image> |
62 | <view> | 62 | <view> |
63 | <view class='view_bg_wrap' style='margin-top: 44rpx;'> | 63 | <view class='view_bg_wrap' style='margin-top: 44rpx;'> |
64 | <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'> | 64 | <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'> |
@@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
140 | </view> | 140 | </view> |
141 | </view> | 141 | </view> |
142 | <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'> | 142 | <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'> |
143 | - <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image> | 143 | + <image class=' payment_img_bg ' src='{{payment_bg}}' style='position:absolute;z-index: 1;'></image> |
144 | <view> | 144 | <view> |
145 | <view class='view_bg_wrap' style='margin-top: 44rpx;'> | 145 | <view class='view_bg_wrap' style='margin-top: 44rpx;'> |
146 | <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'> | 146 | <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'> |
1 | +// pages/main/finalpay/addUnitInfo/addUnitInfo.js | ||
2 | + | ||
3 | +var app = getApp(); | ||
4 | +var baseUrl = app.globalData.baseUrl; | ||
5 | +Page({ | ||
6 | + | ||
7 | + | ||
8 | + data: { | ||
9 | + year: "2019", | ||
10 | + unit_id:"", | ||
11 | + }, | ||
12 | + | ||
13 | + | ||
14 | + onLoad: function(options) { | ||
15 | + this.setData({ | ||
16 | + unit_id:options.unit_id | ||
17 | + }) | ||
18 | + }, | ||
19 | + | ||
20 | + | ||
21 | + onReady: function() { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + | ||
26 | + onShow: function() { | ||
27 | + | ||
28 | + }, | ||
29 | + | ||
30 | + formSubmit: function(e) { //提交 | ||
31 | + console.log("formSubmit", e); | ||
32 | + var formdata = e.detail.value | ||
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.year_donation_deducted || formdata.years_bouns || formdata.tax_savings || formdata.accumulated_withholding_tax){ | ||
34 | + this.submitRequest(formdata) | ||
35 | + }else{ | ||
36 | + this.showToast("其他收入内容不能为空") | ||
37 | + return | ||
38 | + } | ||
39 | + }, | ||
40 | + | ||
41 | + submitRequest: function(request_data) { | ||
42 | + var that = this | ||
43 | + this.Authorization = getApp().globalData.Authorization; | ||
44 | + wx.request({ | ||
45 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
46 | + header: { | ||
47 | + 'Authorization': this.Authorization | ||
48 | + }, | ||
49 | + method: "POST", | ||
50 | + data: { | ||
51 | + "declaring_unit_id":that.data.unit_id, | ||
52 | + "item": { | ||
53 | + "total_salary": that.parseToFloat(request_data.total_salary), //工资薪金, | ||
54 | + "remuneration_labor": that.parseToFloat(request_data.remuneration_labor), //劳务报酬, | ||
55 | + "author_payment": that.parseToFloat(request_data.author_payment), //稿酬, | ||
56 | + "special_manage_cost": that.parseToFloat(request_data.special_manage_cost), //特许经营权使用费, | ||
57 | + "other_free_income": that.parseToFloat(request_data.other_free_income), //其他免税收入, | ||
58 | + | ||
59 | + "personal_endowment": that.parseToFloat(request_data.personal_endowment), //基本养老保险, | ||
60 | + "personal_medical": that.parseToFloat(request_data.personal_medical), //基本医疗保险, | ||
61 | + "personal_unemployment": that.parseToFloat(request_data.personal_unemployment), //失业险, | ||
62 | + "personal_house_fund": that.parseToFloat(request_data.personal_house_fund), //住房公积金, | ||
63 | + "childrens_education": that.parseToFloat(request_data.childrens_education), //子女教育支出, | ||
64 | + "caring_old_people": that.parseToFloat(request_data.caring_old_people), //赡养老人 | ||
65 | + "housing_loan_interest": that.parseToFloat(request_data.housing_loan_interest), //住房贷款利息支出 | ||
66 | + "housing_rent": that.parseToFloat(request_data.housing_rent), //住房租金支出 | ||
67 | + "serious_illness_medical": that.parseToFloat(request_data.serious_illness_medical),//大病医疗支出 | ||
68 | + "continuing_education": that.parseToFloat(request_data.continuing_education), //继续教育支出 | ||
69 | + | ||
70 | + "annuity": that.parseToFloat(request_data.annuity), //年金 | ||
71 | + "commercial_insurance": that.parseToFloat(request_data.commercial_insurance), //商业健康保险 | ||
72 | + "tax_extension": that.parseToFloat(request_data.tax_extension), //税延养老保险 | ||
73 | + "other_fee": that.parseToFloat(request_data.other_fee),//其他税前扣除额 | ||
74 | + "year_donation_deducted": that.parseToFloat(request_data.year_donation_deducted), //准予扣除的捐赠 | ||
75 | + "years_bouns": that.parseToFloat(request_data.years_bouns), //全年一次性奖金 | ||
76 | + "donation_deducted": that.parseToFloat(request_data.donation_deducted), //准予扣除的捐赠 | ||
77 | + "tax_savings": that.parseToFloat(request_data.tax_savings), //减免税额 | ||
78 | + "accumulated_withholding_tax": that.parseToFloat(request_data.accumulated_withholding_tax), //应扣缴税额 | ||
79 | + }, | ||
80 | + "years": that.data.year | ||
81 | + }, | ||
82 | + success: function(result) { | ||
83 | + console.log("refund", result) | ||
84 | + if (result.statusCode == 200) { | ||
85 | + that.showToast("提交成功!") | ||
86 | + wx.navigateBack({ | ||
87 | + delta:1 | ||
88 | + }) | ||
89 | + }else{ | ||
90 | + that.showToast(result.data.message) | ||
91 | + } | ||
92 | + }, | ||
93 | + }) | ||
94 | + }, | ||
95 | + | ||
96 | + parseToFloat(s){ | ||
97 | + if(s&&s.length>0){ | ||
98 | + var num = parseFloat(s) | ||
99 | + return Math.round(num*100)/100 | ||
100 | + }else{ | ||
101 | + return 0 | ||
102 | + } | ||
103 | + | ||
104 | + }, | ||
105 | + | ||
106 | + showToast: function(data) { | ||
107 | + if (data && data.length > 0) { | ||
108 | + wx.showToast({ | ||
109 | + title: data, | ||
110 | + icon: "none", | ||
111 | + duration: 2000 | ||
112 | + }) | ||
113 | + } | ||
114 | + }, | ||
115 | + | ||
116 | + onHide: function() { | ||
117 | + | ||
118 | + }, | ||
119 | + | ||
120 | + | ||
121 | + onUnload: function() { | ||
122 | + | ||
123 | + }, | ||
124 | + | ||
125 | + | ||
126 | + onPullDownRefresh: function() { | ||
127 | + | ||
128 | + }, | ||
129 | + | ||
130 | + | ||
131 | + onReachBottom: function() { | ||
132 | + | ||
133 | + }, | ||
134 | + | ||
135 | + | ||
136 | + onShareAppMessage: function() { | ||
137 | + | ||
138 | + } | ||
139 | +}) |
1 | +<!--pages/main/finalpay/addUnitInfo/addUnitInfo.wxml--> | ||
2 | + | ||
3 | +<view class="page"> | ||
4 | + <form bindsubmit='formSubmit'> | ||
5 | + <view class="swiper-box page" style="height:100%;" bindchange="bindChange"> | ||
6 | + <!-- 境内收入 --> | ||
7 | + <view style="background:#fff;margin-top:20rpx"> | ||
8 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
9 | + <text class="text_black3_34">境内收入</text> | ||
10 | + </view> | ||
11 | + <view class='divide_line_30'></view> | ||
12 | + <view style="height:104rpx;padding:0 30rpx"> | ||
13 | + <text class="text_gray7_34" style="line-height:104rpx">工资薪金收入</text> | ||
14 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='total_salary'></input> | ||
15 | + </view> | ||
16 | + <view class='divide_line_30'></view> | ||
17 | + <view style="height:104rpx;padding:0 30rpx"> | ||
18 | + <text class="text_gray7_34" style="line-height:104rpx">劳务报酬收入</text> | ||
19 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='remuneration_labor'></input> | ||
20 | + </view> | ||
21 | + <view class='divide_line_30'></view> | ||
22 | + <view style="height:104rpx;padding:0 30rpx"> | ||
23 | + <text class="text_gray7_34" style="line-height:104rpx">稿酬收入</text> | ||
24 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='author_payment'></input> | ||
25 | + </view> | ||
26 | + <view class='divide_line_30'></view> | ||
27 | + <view style="height:104rpx;padding:0 30rpx"> | ||
28 | + <text class="text_gray7_34" style="line-height:104rpx">特许经营权</text> | ||
29 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='special_manage_cost'></input> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + <!-- 免税收入 --> | ||
33 | + <view style="background:#fff;margin-top:20rpx"> | ||
34 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
35 | + <text class="text_black3_34">免税收入</text> | ||
36 | + </view> | ||
37 | + <view class='divide_line_30'></view> | ||
38 | + <view style="height:104rpx;padding:0 30rpx"> | ||
39 | + <text class="text_gray7_34" style="line-height:104rpx">其他免税收入</text> | ||
40 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='other_free_income'></input> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + <!-- 专项扣除 --> | ||
44 | + <view style="background:#fff;margin-top:20rpx"> | ||
45 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
46 | + <text class="text_black3_34">专项扣除</text> | ||
47 | + </view> | ||
48 | + <view class='divide_line_30'></view> | ||
49 | + <view style="height:104rpx;padding:0 30rpx"> | ||
50 | + <text class="text_gray7_34" style="line-height:104rpx">养老保险</text> | ||
51 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='personal_endowment'></input> | ||
52 | + </view> | ||
53 | + <view class='divide_line_30'></view> | ||
54 | + <view style="height:104rpx;padding:0 30rpx"> | ||
55 | + <text class="text_gray7_34" style="line-height:104rpx">医疗保险</text> | ||
56 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='personal_medical'></input> | ||
57 | + </view> | ||
58 | + <view class='divide_line_30'></view> | ||
59 | + <view style="height:104rpx;padding:0 30rpx"> | ||
60 | + <text class="text_gray7_34" style="line-height:104rpx">失业保险</text> | ||
61 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='personal_unemployment'></input> | ||
62 | + </view> | ||
63 | + <view class='divide_line_30'></view> | ||
64 | + <view style="height:104rpx;padding:0 30rpx"> | ||
65 | + <text class="text_gray7_34" style="line-height:104rpx">住房公积金</text> | ||
66 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='personal_house_fund'></input> | ||
67 | + </view> | ||
68 | + </view> | ||
69 | + <!-- 专项附加扣除 --> | ||
70 | + <view style="background:#fff;margin-top:20rpx"> | ||
71 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
72 | + <text class="text_black3_34">专项附加扣除</text> | ||
73 | + </view> | ||
74 | + <view class='divide_line_30'></view> | ||
75 | + <view style="height:104rpx;padding:0 30rpx"> | ||
76 | + <text class="text_gray7_34" style="line-height:104rpx">子女教育</text> | ||
77 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='childrens_education'></input> | ||
78 | + </view> | ||
79 | + <view class='divide_line_30'></view> | ||
80 | + <view style="height:104rpx;padding:0 30rpx"> | ||
81 | + <text class="text_gray7_34" style="line-height:104rpx">继续教育</text> | ||
82 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='continuing_education'></input> | ||
83 | + </view> | ||
84 | + <view class='divide_line_30'></view> | ||
85 | + <view style="height:104rpx;padding:0 30rpx"> | ||
86 | + <text class="text_gray7_34" style="line-height:104rpx">住房贷款利息</text> | ||
87 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='housing_loan_interest'></input> | ||
88 | + </view> | ||
89 | + <view class='divide_line_30'></view> | ||
90 | + <view style="height:104rpx;padding:0 30rpx"> | ||
91 | + <text class="text_gray7_34" style="line-height:104rpx">住房租金</text> | ||
92 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='housing_rent'></input> | ||
93 | + </view> | ||
94 | + <view class='divide_line_30'></view> | ||
95 | + <view style="height:104rpx;padding:0 30rpx"> | ||
96 | + <text class="text_gray7_34" style="line-height:104rpx">赡养老人</text> | ||
97 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='caring_old_people'></input> | ||
98 | + </view> | ||
99 | + <view class='divide_line_30'></view> | ||
100 | + <view style="height:104rpx;padding:0 30rpx"> | ||
101 | + <text class="text_gray7_34" style="line-height:104rpx">大病医疗</text> | ||
102 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='serious_illness_medical'></input> | ||
103 | + </view> | ||
104 | + </view> | ||
105 | + <!-- 其他扣除 --> | ||
106 | + <view style="background:#fff;margin-top:20rpx"> | ||
107 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
108 | + <text class="text_black3_34">其他扣除</text> | ||
109 | + </view> | ||
110 | + <view class='divide_line_30'></view> | ||
111 | + <view style="height:104rpx;padding:0 30rpx"> | ||
112 | + <text class="text_gray7_34" style="line-height:104rpx">年金</text> | ||
113 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='annuity'></input> | ||
114 | + </view> | ||
115 | + <view class='divide_line_30'></view> | ||
116 | + <view style="height:104rpx;padding:0 30rpx"> | ||
117 | + <text class="text_gray7_34" style="line-height:104rpx">商业健康保险</text> | ||
118 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='commercial_insurance'></input> | ||
119 | + </view> | ||
120 | + <view class='divide_line_30'></view> | ||
121 | + <view style="height:104rpx;padding:0 30rpx"> | ||
122 | + <text class="text_gray7_34" style="line-height:104rpx">税延养老保险</text> | ||
123 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='tax_extension'></input> | ||
124 | + </view> | ||
125 | + <view class='divide_line_30'></view> | ||
126 | + <view style="height:104rpx;padding:0 30rpx"> | ||
127 | + <text class="text_gray7_34" style="line-height:104rpx">其他</text> | ||
128 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='other_fee'></input> | ||
129 | + </view> | ||
130 | + </view> | ||
131 | + <!-- 捐赠扣除 --> | ||
132 | + <view style="background:#fff;margin-top:20rpx"> | ||
133 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
134 | + <text class="text_black3_34">捐赠扣除</text> | ||
135 | + </view> | ||
136 | + <view class='divide_line_30'></view> | ||
137 | + <view style="height:104rpx;padding:0 30rpx"> | ||
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='year_donation_deducted'></input> | ||
140 | + </view> | ||
141 | + <view style="height:104rpx;padding:0 30rpx;margin-top:20rpx"> | ||
142 | + <text class="text_gray7_34" style="line-height:104rpx">全年一次性奖金</text> | ||
143 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='years_bouns'></input> | ||
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> | ||
150 | + </view> | ||
151 | + <!-- 减免/已缴纳税额 --> | ||
152 | + <view style="background:#fff;margin-top:20rpx"> | ||
153 | + <view style="margin-bottom:20rpx;margin-left:30rpx"> | ||
154 | + <text class="text_black3_34">减免/已缴纳税额</text> | ||
155 | + </view> | ||
156 | + <view class='divide_line_30'></view> | ||
157 | + <view style="height:104rpx;padding:0 30rpx"> | ||
158 | + <text class="text_gray7_34" style="line-height:104rpx">减免税额</text> | ||
159 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='tax_savings'></input> | ||
160 | + </view> | ||
161 | + <view class='divide_line_30'></view> | ||
162 | + <view style="height:104rpx;padding:0 30rpx"> | ||
163 | + <text class="text_gray7_34" style="line-height:104rpx">已缴税额</text> | ||
164 | + <input class='input_wrap' style='text-align: right;color:#000;' type="digit" placeholder='请输入' name='accumulated_withholding_tax'></input> | ||
165 | + </view> | ||
166 | + </view> | ||
167 | + </view> | ||
168 | + <view style='width:100%;height:180rpx;background:#f5f5f5'></view> | ||
169 | + <view class="btn_bottom" > | ||
170 | + <button class="btn_bottom" formType="submit">提交</button> | ||
171 | + </view> | ||
172 | + </form> | ||
173 | +</view> |
1 | +/* pages/main/finalpay/addUnitInfo/addUnitInfo.wxss */ | ||
2 | +.page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.text_translate_34 { | ||
7 | + font-family:PingFangSC-Regular,PingFang SC; | ||
8 | + font-size: 34rpx; | ||
9 | + color: #80000000; | ||
10 | + line-height: 24px; | ||
11 | +} | ||
12 | + | ||
13 | +.text_black6_32 { | ||
14 | + font-family:PingFangSC-Regular,PingFang SC; | ||
15 | + font-size: 32rpx; | ||
16 | + color: #666666; | ||
17 | + text-align: center; | ||
18 | + line-height: 32px; | ||
19 | +} | ||
20 | + | ||
21 | +.text_black3_34 { | ||
22 | + font-family:PingFangSC-Medium,PingFang SC; | ||
23 | + font-size: 34rpx; | ||
24 | + color: #333333; | ||
25 | + text-align: center; | ||
26 | + line-height: 24px; | ||
27 | +} | ||
28 | + | ||
29 | +.text_gray7_34 { | ||
30 | + font-family:PingFangSC-Regular,PingFang SC; | ||
31 | + font-size: 34rpx; | ||
32 | + color:rgba(119,119,119,1); | ||
33 | + line-height: 24px; | ||
34 | +} | ||
35 | + | ||
36 | +.input_wrap { | ||
37 | + max-width: 500rpx; | ||
38 | + height: 104rpx; | ||
39 | + font-size: 34rpx; | ||
40 | + color: #333; | ||
41 | + text-align: right; | ||
42 | + overflow: hidden; | ||
43 | + text-overflow: ellipsis; | ||
44 | + white-space: nowrap; | ||
45 | + float: right | ||
46 | +} |
1 | +var app = getApp(); | ||
2 | +var baseUrl = app.globalData.baseUrl; | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * Page initial data | ||
7 | + */ | ||
8 | + data: { | ||
9 | + settlement_record_id: "", | ||
10 | + year: "2019", | ||
11 | + showAddView: false, | ||
12 | + infoList: [{}], | ||
13 | + total_account:0, | ||
14 | + project: ["正常工资薪金", "劳务报酬", "稿酬", "特许经营权使用费"], | ||
15 | + deductcontent: ["高级专家延长离退休期间工薪免征个人所得税", "解除劳动合同当地工资3倍以内免税", "符合条件的津补贴免征个人所得税", "生育津贴和生育医疗费免税", "工伤保险免税", "符合条件的外交人员免征个人所得税", "外籍个人出差补贴免税", "外籍个人探亲费、语言训练费、子女教育费免税", "外籍个人生活费用免税", "符合条件的外籍来华专家工资薪金所得免征个人所得税", "薪金所得免征个人所得数", "横琴、香港、澳门居民免税", "平潭台湾居民免税", "安家费、退职费、退休工资、离休工资、离休生活补助费免税"], | ||
16 | + deductproperty: ["其他"], | ||
17 | + income_item: "", | ||
18 | + reduction_item: "", | ||
19 | + reduction_nature: "", | ||
20 | + reduction_tax: "", | ||
21 | + }, | ||
22 | + | ||
23 | + /** | ||
24 | + * Lifecycle function--Called when page load | ||
25 | + */ | ||
26 | + onLoad: function (options) { | ||
27 | + this.setData({ | ||
28 | + settlement_record_id: options.id | ||
29 | + }) | ||
30 | + this.getInfoList() | ||
31 | + }, | ||
32 | + | ||
33 | + /** | ||
34 | + * Lifecycle function--Called when page is initially rendered | ||
35 | + */ | ||
36 | + onReady: function () { | ||
37 | + | ||
38 | + }, | ||
39 | + | ||
40 | + getInfoList: function () { | ||
41 | + var that = this | ||
42 | + this.Authorization = getApp().globalData.Authorization; | ||
43 | + wx.request({ | ||
44 | + url: baseUrl + "payroll/v1/settlement-tax/reduction-tax", | ||
45 | + header: { | ||
46 | + 'Authorization': this.Authorization | ||
47 | + }, | ||
48 | + data: { | ||
49 | + "years": that.data.year, | ||
50 | + "settlement_record_id": that.data.settlement_record_id | ||
51 | + }, | ||
52 | + success: function (result) { | ||
53 | + console.log("infoList", result) | ||
54 | + if (result.statusCode == 200) { | ||
55 | + that.setData({ | ||
56 | + total_account: result.data.total_account, | ||
57 | + infoList: result.data.items, | ||
58 | + income_item: "", | ||
59 | + reduction_item: "", | ||
60 | + reduction_nature: "", | ||
61 | + reduction_tax: "", | ||
62 | + }) | ||
63 | + } | ||
64 | + }, | ||
65 | + }) | ||
66 | + }, | ||
67 | + | ||
68 | + /** | ||
69 | + * Lifecycle function--Called when page show | ||
70 | + */ | ||
71 | + onShow: function () { | ||
72 | + | ||
73 | + }, | ||
74 | + | ||
75 | + // 所得项目 | ||
76 | + bindProjectChange: function (e) { | ||
77 | + console.log('picker,携带值为', e.detail.value) | ||
78 | + this.setData({ | ||
79 | + income_item: this.data.project[e.detail.value] | ||
80 | + }) | ||
81 | + }, | ||
82 | + | ||
83 | + // 减免事项名称 | ||
84 | + bindDeductContent: function (e) { | ||
85 | + console.log('picker,携带值为', e.detail.value) | ||
86 | + this.setData({ | ||
87 | + reduction_item: this.data.deductcontent[e.detail.value] | ||
88 | + }) | ||
89 | + }, | ||
90 | + | ||
91 | + // 减免性质名称 | ||
92 | + bindDeductProperty: function (e) { | ||
93 | + console.log('picker,携带值为', e.detail.value) | ||
94 | + this.setData({ | ||
95 | + reduction_nature: this.data.deductproperty[e.detail.value] | ||
96 | + }) | ||
97 | + }, | ||
98 | + | ||
99 | + // 减免税额 | ||
100 | + bindIncome: function (e) { | ||
101 | + console.log('输入框', e.detail.value) | ||
102 | + this.setData({ | ||
103 | + reduction_tax: e.detail.value | ||
104 | + }) | ||
105 | + }, | ||
106 | + | ||
107 | + addItem: function () { //继续添加 | ||
108 | + if (!this.data.showAddView) {//是否新增了view | ||
109 | + this.setData({ | ||
110 | + showAddView: true | ||
111 | + }) | ||
112 | + return | ||
113 | + } | ||
114 | + if (!this.data.income_item || this.data.income_item.length < 1) { | ||
115 | + this.showToast("请选择所得项目") | ||
116 | + return | ||
117 | + } | ||
118 | + if (!this.data.reduction_item || this.data.reduction_item.length < 1) { | ||
119 | + this.showToast("请选择减免事项名称") | ||
120 | + return | ||
121 | + } | ||
122 | + if (!this.data.reduction_nature || this.data.reduction_nature.length < 1) { | ||
123 | + this.showToast("请选择减免性质名称") | ||
124 | + return | ||
125 | + } | ||
126 | + if (!this.data.reduction_tax || this.data.reduction_tax.length < 1) { | ||
127 | + this.showToast("请填写减免税额") | ||
128 | + return | ||
129 | + } | ||
130 | + this.goSubmit("1") | ||
131 | + }, | ||
132 | + | ||
133 | + goSubmit: function (type) { | ||
134 | + if (!this.data.income_item || this.data.income_item.length < 1) { | ||
135 | + this.showToast("请选择所得项目") | ||
136 | + return | ||
137 | + } | ||
138 | + if (!this.data.reduction_item || this.data.reduction_item.length < 1) { | ||
139 | + this.showToast("请选择减免事项名称") | ||
140 | + return | ||
141 | + } | ||
142 | + if (!this.data.reduction_nature || this.data.reduction_nature.length < 1) { | ||
143 | + this.showToast("请选择减免性质名称") | ||
144 | + return | ||
145 | + } | ||
146 | + if (!this.data.reduction_tax || this.data.reduction_tax.length < 1) { | ||
147 | + this.showToast("请填写减免税额") | ||
148 | + return | ||
149 | + } | ||
150 | + var that = this | ||
151 | + this.Authorization = app.globalData.Authorization; | ||
152 | + wx.request({ | ||
153 | + url: baseUrl + "payroll/v1/settlement-tax/reduction-tax", | ||
154 | + header: { | ||
155 | + 'Authorization': this.Authorization | ||
156 | + }, | ||
157 | + method: "POST", | ||
158 | + data: { | ||
159 | + "years": that.data.year, | ||
160 | + "settlement_record_id": that.data.settlement_record_id, | ||
161 | + "income_item": that.data.income_item, | ||
162 | + "reduction_item": that.data.reduction_item, | ||
163 | + "reduction_nature": that.data.reduction_nature, | ||
164 | + "reduction_tax": parseFloat(that.data.reduction_tax), | ||
165 | + }, | ||
166 | + success: function (result) { | ||
167 | + console.log("infoList", result) | ||
168 | + if (result.statusCode == 200) { | ||
169 | + if (type == '1') { | ||
170 | + that.getInfoList() | ||
171 | + that.setData({ | ||
172 | + showAddView: true | ||
173 | + }) | ||
174 | + } else { | ||
175 | + wx.navigateBack({ | ||
176 | + delat: 1 | ||
177 | + }) | ||
178 | + } | ||
179 | + } | ||
180 | + }, | ||
181 | + }) | ||
182 | + }, | ||
183 | + | ||
184 | + /** | ||
185 | + * Lifecycle function--Called when page hide | ||
186 | + */ | ||
187 | + onHide: function () { | ||
188 | + | ||
189 | + }, | ||
190 | + | ||
191 | + /** | ||
192 | + * Lifecycle function--Called when page unload | ||
193 | + */ | ||
194 | + onUnload: function () { | ||
195 | + | ||
196 | + }, | ||
197 | + | ||
198 | + showToast: function (data) { | ||
199 | + if (data && data.length > 0) { | ||
200 | + wx.showToast({ | ||
201 | + title: data, | ||
202 | + icon: "none", | ||
203 | + duration: 2000 | ||
204 | + }) | ||
205 | + } | ||
206 | + }, | ||
207 | + | ||
208 | + /** | ||
209 | + * Page event handler function--Called when user drop down | ||
210 | + */ | ||
211 | + onPullDownRefresh: function () { | ||
212 | + | ||
213 | + }, | ||
214 | + | ||
215 | + /** | ||
216 | + * Called when page reach bottom | ||
217 | + */ | ||
218 | + onReachBottom: function () { | ||
219 | + | ||
220 | + }, | ||
221 | + | ||
222 | + /** | ||
223 | + * Called when user click on the top right corner to share | ||
224 | + */ | ||
225 | + onShareAppMessage: function () { | ||
226 | + | ||
227 | + } | ||
228 | +}) |
1 | +<view > | ||
2 | + <view style="background:#fff;padding:0 30rpx;"> | ||
3 | + <text class="text_gray7_34">减免税额合计</text> | ||
4 | + <text class="text_black3_34 float_right">{{total_account}}</text> | ||
5 | + </view> | ||
6 | + | ||
7 | + <!-- 列表数据,不可修改 --> | ||
8 | + <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> | ||
9 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff"> | ||
10 | + <text class="text_gray7_34">所得项目</text> | ||
11 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
12 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.income_item}}"></input> | ||
13 | + </view> | ||
14 | + <view class="divide_line_30"></view> | ||
15 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" > | ||
16 | + <text class="text_gray7_34">减免事项名称</text> | ||
17 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
18 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.reduction_item}}"></input> | ||
19 | + </view> | ||
20 | + <view class="divide_line_30"></view> | ||
21 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff"> | ||
22 | + <text class="text_gray7_34">减免性质名称</text> | ||
23 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
24 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.reduction_nature}}"></input> | ||
25 | + </view> | ||
26 | + <view class="divide_line_30"></view> | ||
27 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
28 | + <text class="text_gray7_34">减免税额</text> | ||
29 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" bindblur="bindIncome" value="{{item.reduction_tax}}"></input> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + | ||
33 | + <!-- 添加项,可编辑 --> | ||
34 | + <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> | ||
35 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}"> | ||
36 | + <text class="text_gray7_34">所得项目</text> | ||
37 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
38 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}" disabled="true"></input> | ||
39 | + </picker> | ||
40 | + <view class="divide_line_30"></view> | ||
41 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}"> | ||
42 | + <text class="text_gray7_34">减免事项名称</text> | ||
43 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
44 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}" disabled="true"></input> | ||
45 | + </picker> | ||
46 | + <view class="divide_line_30"></view> | ||
47 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}"> | ||
48 | + <text class="text_gray7_34">减免性质名称</text> | ||
49 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
50 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}" disabled="true"></input> | ||
51 | + </picker> | ||
52 | + <view class="divide_line_30"></view> | ||
53 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
54 | + <text class="text_gray7_34">减免税额</text> | ||
55 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" bindblur="bindIncome" value="{{reduction_tax}}"></input> | ||
56 | + </view> | ||
57 | + </view> | ||
58 | + | ||
59 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:84rpx" bindtap="addItem"> | ||
60 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | ||
61 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | ||
62 | + </view> | ||
63 | + <view class="btn_bottom" bindtap="goSubmit"> | ||
64 | + <button class="btn_bottom" >保存</button> | ||
65 | + </view> | ||
66 | +</view> |
1 | +/* pages/main/finalpay/deductOrPayedDetail/deductOrPayedDetail.wxss */ | ||
2 | +page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.text_gray7_34 { | ||
7 | + font-family:PingFangSC-Regular,PingFang SC; | ||
8 | + font-size: 34rpx; | ||
9 | + color: #777777; | ||
10 | + text-align: center; | ||
11 | + line-height: 104rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.text_black3_34 { | ||
15 | + font-family:PingFangSC-Regular,PingFang SC; | ||
16 | + font-size: 34rpx; | ||
17 | + color: #333333; | ||
18 | + text-align: center; | ||
19 | + line-height: 104rpx; | ||
20 | +} | ||
21 | + | ||
22 | +.input_wrap { | ||
23 | + width: 448rpx; | ||
24 | + height: 104rpx; | ||
25 | + font-size: 32rpx; | ||
26 | + color: #fff; | ||
27 | + text-align: right; | ||
28 | + overflow: hidden; | ||
29 | + float: right; | ||
30 | + text-overflow: ellipsis; | ||
31 | +white-space: nowrap; | ||
32 | + | ||
33 | +} | ||
34 | + | ||
35 | +.arrow_wrap { | ||
36 | + width: 50rpx; | ||
37 | + height: 50rpx; | ||
38 | + margin-top: 26rpx | ||
39 | +} |
1 | +// pages/main/finalpay/donationDetail/donationDetail.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +const regex = /^[0-9a-zA-Z]{1,}$/ | ||
5 | +Page({ | ||
6 | + | ||
7 | + /** | ||
8 | + * Page initial data | ||
9 | + */ | ||
10 | + data: { | ||
11 | + settlement_record_id:"", | ||
12 | + year: "2019", | ||
13 | + showAddView: false, | ||
14 | + infoList: [{}], | ||
15 | + total_account: 0, | ||
16 | + deductPick: ["30%", "100%"], | ||
17 | + "donated_unit_code": "", | ||
18 | + "donated_unit_name": "", | ||
19 | + "donation_code": "", | ||
20 | + "donation_year": "", | ||
21 | + "donation_account": "", | ||
22 | + "deduction_ratio": "", //扣除比例 | ||
23 | + "comment": "", | ||
24 | + }, | ||
25 | + | ||
26 | + /** | ||
27 | + * Lifecycle function--Called when page load | ||
28 | + */ | ||
29 | + onLoad: function(options) { | ||
30 | + this.setData({ | ||
31 | + settlement_record_id: options.id | ||
32 | + }) | ||
33 | + this.getInfoList() | ||
34 | + }, | ||
35 | + | ||
36 | + /** | ||
37 | + * Lifecycle function--Called when page is initially rendered | ||
38 | + */ | ||
39 | + onReady: function() { | ||
40 | + | ||
41 | + }, | ||
42 | + | ||
43 | + getInfoList: function() { | ||
44 | + var that = this | ||
45 | + this.Authorization = getApp().globalData.Authorization; | ||
46 | + wx.request({ | ||
47 | + url: baseUrl + "payroll/v1/settlement-tax/donation-deduction", | ||
48 | + header: { | ||
49 | + 'Authorization': this.Authorization | ||
50 | + }, | ||
51 | + data: { | ||
52 | + "years": that.data.year, | ||
53 | + "settlement_record_id": that.data.settlement_record_id | ||
54 | + }, | ||
55 | + success: function(result) { | ||
56 | + console.log("infoList", result) | ||
57 | + if (result.statusCode == 200) { | ||
58 | + that.setData({ | ||
59 | + total_account: result.data.total_account, | ||
60 | + infoList: result.data.items, | ||
61 | + "donated_unit_code": "", | ||
62 | + "donated_unit_name": "", | ||
63 | + "donation_code": "", | ||
64 | + "donation_year": "", | ||
65 | + "donation_account": "", | ||
66 | + "deduction_ratio": "", //扣除比例 | ||
67 | + "comment": "", | ||
68 | + }) | ||
69 | + } | ||
70 | + }, | ||
71 | + }) | ||
72 | + }, | ||
73 | + | ||
74 | + | ||
75 | + /** | ||
76 | + * Lifecycle function--Called when page show | ||
77 | + */ | ||
78 | + onShow: function() { | ||
79 | + | ||
80 | + }, | ||
81 | + | ||
82 | + getInputInfo:function(e){// | ||
83 | + console.log("输入框", e.currentTarget.id,e.detail.value) | ||
84 | + var key = e.currentTarget.id+"" | ||
85 | + if ("donated_unit_code"==key){ | ||
86 | + this.setData({"donated_unit_code": e.detail.value,}) | ||
87 | + } | ||
88 | + if ("donated_unit_name" == key) { | ||
89 | + this.setData({ "donated_unit_name": e.detail.value, }) | ||
90 | + } | ||
91 | + if ("donation_code" == key) { | ||
92 | + this.setData({ "donation_code": e.detail.value, }) | ||
93 | + } | ||
94 | + if ("donation_year" == key) { | ||
95 | + this.setData({ "donation_year": e.detail.value, }) | ||
96 | + } | ||
97 | + if ("donation_account" == key) { | ||
98 | + this.setData({ "donation_account": e.detail.value, }) | ||
99 | + } | ||
100 | + if ("comment" == key) { | ||
101 | + this.setData({ "comment": e.detail.value, }) | ||
102 | + } | ||
103 | + }, | ||
104 | + | ||
105 | + deductRatioPicker:function(e){//捐赠比例 | ||
106 | + console.log('picker,携带值为', e.detail.value) | ||
107 | + var new_data = this.data.deductPick[e.detail.value] | ||
108 | + this.setData({ | ||
109 | + deduction_ratio: new_data ? new_data.replace("%",""):"" | ||
110 | + }) | ||
111 | + }, | ||
112 | + | ||
113 | + addItem: function() { //继续添加 | ||
114 | + if (!this.data.showAddView) {//是否新增了view | ||
115 | + this.setData({ | ||
116 | + showAddView: true | ||
117 | + }) | ||
118 | + return | ||
119 | + } | ||
120 | + if (this.data.donated_unit_code.length > 0 && !regex.test(this.data.donated_unit_code)) { | ||
121 | + this.showToast("受赠单位纳税人识别号格式有误") | ||
122 | + return | ||
123 | + } | ||
124 | + if (!this.data.donated_unit_name || this.data.donated_unit_name.length < 1) { | ||
125 | + this.showToast("请填写受赠单位名称") | ||
126 | + return | ||
127 | + } | ||
128 | + if (this.data.donation_code.length > 0 && !regex.test(this.data.donation_code)) { | ||
129 | + this.showToast("捐赠凭证码格式有误") | ||
130 | + return | ||
131 | + } | ||
132 | + if (!this.data.donation_year || this.data.donation_year.length < 1) { | ||
133 | + this.showToast("请填写捐赠年度") | ||
134 | + return | ||
135 | + } | ||
136 | + if (!this.data.donation_account || this.data.donation_account.length < 1) { | ||
137 | + this.showToast("请填写扣除金额") | ||
138 | + return | ||
139 | + } | ||
140 | + if (!this.data.deduction_ratio || this.data.deduction_ratio.length < 1) { | ||
141 | + this.showToast("请选择扣除比例") | ||
142 | + return | ||
143 | + } | ||
144 | + this.goSubmit("1") | ||
145 | + }, | ||
146 | + | ||
147 | + goSubmit: function(type) {//type=“1”,继续添加(当前页面),type=2保存,返回列表 | ||
148 | + if (!this.data.donated_unit_code || this.data.donated_unit_code.length < 1) { | ||
149 | + this.showToast("请填写受赠单位纳税人识别号") | ||
150 | + return | ||
151 | + } | ||
152 | + if (!this.data.donated_unit_name || this.data.donated_unit_name.length < 1) { | ||
153 | + this.showToast("请填写受赠单位名称") | ||
154 | + return | ||
155 | + } | ||
156 | + if (!this.data.donation_code || this.data.donation_code.length < 1) { | ||
157 | + this.showToast("请填写捐赠凭证码") | ||
158 | + return | ||
159 | + } | ||
160 | + if (!this.data.donation_year || this.data.donation_year.length < 1) { | ||
161 | + this.showToast("请填写捐赠年度") | ||
162 | + return | ||
163 | + } | ||
164 | + if (!this.data.donation_account || this.data.donation_account.length < 1) { | ||
165 | + this.showToast("请填写扣除金额") | ||
166 | + return | ||
167 | + } | ||
168 | + if (!this.data.deduction_ratio || this.data.deduction_ratio.length < 1) { | ||
169 | + this.showToast("请选择扣除比例") | ||
170 | + return | ||
171 | + } | ||
172 | + var that = this | ||
173 | + this.Authorization = app.globalData.Authorization; | ||
174 | + wx.request({ | ||
175 | + url: baseUrl + "payroll/v1/settlement-tax/donation-deduction", | ||
176 | + header: { | ||
177 | + 'Authorization': this.Authorization | ||
178 | + }, | ||
179 | + method: "POST", | ||
180 | + data: { | ||
181 | + "years": that.data.year, | ||
182 | + "settlement_record_id": that.data.settlement_record_id, | ||
183 | + "donated_unit_code": that.data.donated_unit_code, | ||
184 | + "donated_unit_name": that.data.donated_unit_name, | ||
185 | + "donation_code": that.data.donation_code, | ||
186 | + "donation_year": that.data.donation_year, | ||
187 | + "donation_account": parseFloat(that.data.donation_account), | ||
188 | + "deduction_ratio": parseFloat(that.data.deduction_ratio), | ||
189 | + "comment":that.data.comment | ||
190 | + }, | ||
191 | + success: function (result) { | ||
192 | + console.log("infoList", result) | ||
193 | + if (result.statusCode == 200) { | ||
194 | + if (type == '1') { | ||
195 | + that.getInfoList() | ||
196 | + that.setData({ | ||
197 | + showAddView: true | ||
198 | + }) | ||
199 | + } else { | ||
200 | + wx.navigateBack({ | ||
201 | + delat: 1 | ||
202 | + }) | ||
203 | + } | ||
204 | + } | ||
205 | + }, | ||
206 | + }) | ||
207 | + }, | ||
208 | + | ||
209 | + /** | ||
210 | + * Lifecycle function--Called when page hide | ||
211 | + */ | ||
212 | + onHide: function () { | ||
213 | + | ||
214 | + }, | ||
215 | + | ||
216 | + /** | ||
217 | + * Lifecycle function--Called when page unload | ||
218 | + */ | ||
219 | + onUnload: function () { | ||
220 | + | ||
221 | + }, | ||
222 | + | ||
223 | + showToast: function (data) { | ||
224 | + if (data && data.length > 0) { | ||
225 | + wx.showToast({ | ||
226 | + title: data, | ||
227 | + icon: "none", | ||
228 | + duration: 2000 | ||
229 | + }) | ||
230 | + } | ||
231 | + }, | ||
232 | + | ||
233 | + /** | ||
234 | + * Page event handler function--Called when user drop down | ||
235 | + */ | ||
236 | + onPullDownRefresh: function() { | ||
237 | + | ||
238 | + }, | ||
239 | + | ||
240 | + /** | ||
241 | + * Called when page reach bottom | ||
242 | + */ | ||
243 | + onReachBottom: function() { | ||
244 | + | ||
245 | + }, | ||
246 | + | ||
247 | + /** | ||
248 | + * Called when user click on the top right corner to share | ||
249 | + */ | ||
250 | + onShareAppMessage: function() { | ||
251 | + | ||
252 | + } | ||
253 | +}) |
1 | +<view> | ||
2 | + <view style="background:#fff;padding:0 30rpx;"> | ||
3 | + <text class="text_gray7_34">准予扣除的捐赠额合计</text> | ||
4 | + <text class="text_black3_34 float_right">{{total_account}}</text> | ||
5 | + </view> | ||
6 | + | ||
7 | + <!-- 列表数据,不可修改 --> | ||
8 | + <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> | ||
9 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx;display: flex;"> | ||
10 | + <view style="font-size: 32rpx;color: #777777;text-align: center;width:320rpx;display:flex;align-items: center;">受赠单位纳税人识别号(统一社会信用代码)</view> | ||
11 | + <input style='text-align:right;color:#000;font-size: 30rpx;height:104rpx;width:366rpx' disabled="true" value="{{item.donated_unit_code}}"></input> | ||
12 | + </view> | ||
13 | + <view class="divide_line_30"></view> | ||
14 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
15 | + <text class='red_star_right_10'>*</text> | ||
16 | + <text class="text_gray7_34">受赠单位名称</text> | ||
17 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.donated_unit_name}}"></input> | ||
18 | + </view> | ||
19 | + <view class="divide_line_30"></view> | ||
20 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
21 | + <text class="text_gray7_34">报捐赠凭证号</text> | ||
22 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.donation_code}}"></input> | ||
23 | + </view> | ||
24 | + <view class="divide_line_30"></view> | ||
25 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
26 | + <text class='red_star_right_10'>*</text> | ||
27 | + <text class="text_gray7_34">捐赠年度</text> | ||
28 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.donation_year}}"></input> | ||
29 | + </view> | ||
30 | + <view class="divide_line_30"></view> | ||
31 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
32 | + <text class='red_star_right_10'>*</text> | ||
33 | + <text class="text_gray7_34">捐赠金额</text> | ||
34 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.donation_account}}"></input> | ||
35 | + </view> | ||
36 | + <view class="divide_line_30"></view> | ||
37 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="" range="{{deductPick}}"> | ||
38 | + <text class='red_star_right_10'>*</text> | ||
39 | + <text class="text_gray7_34">扣除比例</text> | ||
40 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
41 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.deduction_ratio}}%"></input> | ||
42 | + </view> | ||
43 | + <view class="divide_line_30"></view> | ||
44 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
45 | + <text class="text_gray7_34">备注</text> | ||
46 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.comment}}"></input> | ||
47 | + </view> | ||
48 | + </view> | ||
49 | + | ||
50 | + <!-- 添加项,可编辑 --> | ||
51 | + <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> | ||
52 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx;display: flex;"> | ||
53 | + <view style="font-size: 32rpx;color: #777777;text-align: center;width:320rpx;display:flex;align-items: center;">受赠单位纳税人识别号(统一社会信用代码)</view> | ||
54 | + <input style='text-align:right;color:#000;font-size: 30rpx;height:104rpx;width:366rpx' placeholder='请输入' id="donated_unit_code" maxlength="20" bindblur="getInputInfo" value="{{donated_unit_code}}"></input> | ||
55 | + </view> | ||
56 | + <view class="divide_line_30"></view> | ||
57 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
58 | + <text class='red_star_right_10'>*</text> | ||
59 | + <text class="text_gray7_34">受赠单位名称</text> | ||
60 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="donated_unit_name" bindblur="getInputInfo" value="{{donated_unit_name}}"></input> | ||
61 | + </view> | ||
62 | + <view class="divide_line_30"></view> | ||
63 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
64 | + <text class="text_gray7_34">报捐赠凭证号</text> | ||
65 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="donation_code" bindblur="getInputInfo" maxlength="20" value="{{donation_code}}"></input> | ||
66 | + </view> | ||
67 | + <view class="divide_line_30"></view> | ||
68 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
69 | + <text class='red_star_right_10'>*</text> | ||
70 | + <text class="text_gray7_34">捐赠年度</text> | ||
71 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="donation_year" type="number" bindblur="getInputInfo" maxlength="4" value="{{donation_year}}"></input> | ||
72 | + </view> | ||
73 | + <view class="divide_line_30"></view> | ||
74 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
75 | + <text class='red_star_right_10'>*</text> | ||
76 | + <text class="text_gray7_34">捐赠金额</text> | ||
77 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" maxlength="20" id="donation_account" bindblur="getInputInfo" value="{{donation_account}}"></input> | ||
78 | + </view> | ||
79 | + <view class="divide_line_30"></view> | ||
80 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="deductRatioPicker" range="{{deductPick}}"> | ||
81 | + <text class='red_star_right_10'>*</text> | ||
82 | + <text class="text_gray7_34">扣除比例</text> | ||
83 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
84 | + <input class='input_wrap' disabled="true" style='text-align: right;color:#000;' placeholder='请选择' name='' value="{{deduction_ratio}}%"></input> | ||
85 | + </picker> | ||
86 | + <view class="divide_line_30"></view> | ||
87 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
88 | + <text class="text_gray7_34">备注</text> | ||
89 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="comment" bindblur="getInputInfo" value="{{comment}}"></input> | ||
90 | + </view> | ||
91 | + </view> | ||
92 | + | ||
93 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:168rpx" bindtap="addItem"> | ||
94 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | ||
95 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | ||
96 | + </view> | ||
97 | + <view class="btn_bottom" bindtap="goSubmit"> | ||
98 | + <button class="btn_bottom">保存</button> | ||
99 | + </view> | ||
100 | +</view> |
1 | +/* pages/main/finalpay/donationDetail/donationDetail.wxss */ | ||
2 | +page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.text_gray7_34 { | ||
7 | + font-family:PingFangSC-Regular,PingFang SC; | ||
8 | + font-size: 34rpx; | ||
9 | + color: #777777; | ||
10 | + text-align: center; | ||
11 | + line-height: 104rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.text_black3_34 { | ||
15 | + font-family:PingFangSC-Regular,PingFang SC; | ||
16 | + font-size: 34rpx; | ||
17 | + color: #333333; | ||
18 | + text-align: center; | ||
19 | + line-height: 104rpx; | ||
20 | +} | ||
21 | + | ||
22 | +.input_wrap { | ||
23 | + max-width: 600rpx; | ||
24 | + height: 104rpx; | ||
25 | + font-size: 32rpx; | ||
26 | + color: #fff; | ||
27 | + text-align: right; | ||
28 | + overflow: hidden; | ||
29 | + float: right; | ||
30 | +} | ||
31 | + | ||
32 | +.arrow_wrap { | ||
33 | + width: 50rpx; | ||
34 | + height: 50rpx; | ||
35 | + margin-top: 26rpx | ||
36 | +} | ||
37 | + | ||
38 | +.red_star_right_10{ | ||
39 | + color:red; | ||
40 | + font-size: 30rpx; | ||
41 | + line-height: 104rpx; | ||
42 | + float:left; | ||
43 | + margin-right: 10rpx; | ||
44 | +} |
1 | +var app = getApp(); | ||
2 | +var baseUrl = app.globalData.baseUrl; | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * Page initial data | ||
7 | + */ | ||
8 | + data: { | ||
9 | + settlement_record_id: "", | ||
10 | + year: "2019", | ||
11 | + showAddView:false, | ||
12 | + infoList: [{}], | ||
13 | + total_account: 0, | ||
14 | + project: ["正常工资薪金", "劳务报酬", "稿酬", "特许经营权使用费"], | ||
15 | + deductcontent: ["高级专家延长离退休期间工薪免征个人所得税", "解除劳动合同当地工资3倍以内免税", "符合条件的津补贴免征个人所得税", "生育津贴和生育医疗费免税", "工伤保险免税", "符合条件的外交人员免征个人所得税", "外籍个人出差补贴免税", "外籍个人探亲费、语言训练费、子女教育费免税", "外籍个人生活费用免税", "符合条件的外籍来华专家工资薪金所得免征个人所得税", "薪金所得免征个人所得数", "横琴、香港、澳门居民免税", "平潭台湾居民免税", "安家费、退职费、退休工资、离休工资、离休生活补助费免税"], | ||
16 | + deductproperty: ["其他"], | ||
17 | + income_item: "", | ||
18 | + reduction_item: "", | ||
19 | + reduction_nature: "", | ||
20 | + exempt_income: "", | ||
21 | + }, | ||
22 | + | ||
23 | + /** | ||
24 | + * Lifecycle function--Called when page load | ||
25 | + */ | ||
26 | + onLoad: function(options) { | ||
27 | + this.setData({ | ||
28 | + settlement_record_id: options.id | ||
29 | + }) | ||
30 | + this.getInfoList() | ||
31 | + }, | ||
32 | + | ||
33 | + /** | ||
34 | + * Lifecycle function--Called when page is initially rendered | ||
35 | + */ | ||
36 | + onReady: function() { | ||
37 | + | ||
38 | + }, | ||
39 | + | ||
40 | + getInfoList: function() { | ||
41 | + var that = this | ||
42 | + this.Authorization = getApp().globalData.Authorization; | ||
43 | + wx.request({ | ||
44 | + url: baseUrl + "payroll/v1/settlement-tax/exempt-income", | ||
45 | + header: { | ||
46 | + 'Authorization': this.Authorization | ||
47 | + }, | ||
48 | + data: { | ||
49 | + "years": that.data.year, | ||
50 | + "settlement_record_id": that.data.settlement_record_id | ||
51 | + }, | ||
52 | + success: function(result) { | ||
53 | + console.log("infoList", result) | ||
54 | + if (result.statusCode == 200) { | ||
55 | + that.setData({ | ||
56 | + total_account: result.data.total_account, | ||
57 | + infoList: result.data.items, | ||
58 | + income_item: "", | ||
59 | + reduction_item: "", | ||
60 | + reduction_nature: "", | ||
61 | + exempt_income: "", | ||
62 | + }) | ||
63 | + } | ||
64 | + }, | ||
65 | + }) | ||
66 | + }, | ||
67 | + | ||
68 | + /** | ||
69 | + * Lifecycle function--Called when page show | ||
70 | + */ | ||
71 | + onShow: function() { | ||
72 | + | ||
73 | + }, | ||
74 | + | ||
75 | + // 所得项目 | ||
76 | + bindProjectChange: function(e) { | ||
77 | + console.log('picker,携带值为', e.detail.value) | ||
78 | + this.setData({ | ||
79 | + income_item: this.data.project[e.detail.value] | ||
80 | + }) | ||
81 | + }, | ||
82 | + | ||
83 | + // 减免事项名称 | ||
84 | + bindDeductContent: function(e) { | ||
85 | + console.log('picker,携带值为', e.detail.value) | ||
86 | + this.setData({ | ||
87 | + reduction_item: this.data.deductcontent[e.detail.value] | ||
88 | + }) | ||
89 | + }, | ||
90 | + | ||
91 | + // 减免性质名称 | ||
92 | + bindDeductProperty: function(e) { | ||
93 | + console.log('picker,携带值为', e.detail.value) | ||
94 | + this.setData({ | ||
95 | + reduction_nature: this.data.deductproperty[e.detail.value] | ||
96 | + }) | ||
97 | + }, | ||
98 | + | ||
99 | + // 免税收入金额 | ||
100 | + bindIncome: function(e) { | ||
101 | + console.log('输入框', e.detail.value) | ||
102 | + this.setData({ | ||
103 | + exempt_income: e.detail.value | ||
104 | + }) | ||
105 | + }, | ||
106 | + | ||
107 | + addItem: function() { //继续添加 | ||
108 | + if (!this.data.showAddView){//是否新增了view | ||
109 | + this.setData({ | ||
110 | + showAddView:true | ||
111 | + }) | ||
112 | + return | ||
113 | + } | ||
114 | + if (!this.data.income_item || this.data.income_item.length < 1) { | ||
115 | + this.showToast("请选择所得项目") | ||
116 | + return | ||
117 | + } | ||
118 | + if (!this.data.reduction_item || this.data.reduction_item.length < 1) { | ||
119 | + this.showToast("请选择减免事项名称") | ||
120 | + return | ||
121 | + } | ||
122 | + if (!this.data.reduction_nature || this.data.reduction_nature.length < 1) { | ||
123 | + this.showToast("请选择减免性质名称") | ||
124 | + return | ||
125 | + } | ||
126 | + if (!this.data.exempt_income || this.data.exempt_income.length < 1) { | ||
127 | + this.showToast("请填写免税收入金额") | ||
128 | + return | ||
129 | + } | ||
130 | + this.goSubmit("1") | ||
131 | + }, | ||
132 | + | ||
133 | + goSubmit: function(type) {//type=“1”,继续添加(当前页面),type=2保存,返回列表 | ||
134 | + if (!this.data.income_item || this.data.income_item.length < 1) { | ||
135 | + this.showToast("请选择所得项目") | ||
136 | + return | ||
137 | + } | ||
138 | + if (!this.data.reduction_item || this.data.reduction_item.length < 1) { | ||
139 | + this.showToast("请选择减免事项名称") | ||
140 | + return | ||
141 | + } | ||
142 | + if (!this.data.reduction_nature || this.data.reduction_nature.length < 1) { | ||
143 | + this.showToast("请选择减免性质名称") | ||
144 | + return | ||
145 | + } | ||
146 | + if (!this.data.exempt_income || this.data.exempt_income.length < 1) { | ||
147 | + this.showToast("请填写免税收入金额") | ||
148 | + return | ||
149 | + } | ||
150 | + var that = this | ||
151 | + this.Authorization = app.globalData.Authorization; | ||
152 | + wx.request({ | ||
153 | + url: baseUrl + "payroll/v1/settlement-tax/exempt-income", | ||
154 | + header: { | ||
155 | + 'Authorization': this.Authorization | ||
156 | + }, | ||
157 | + method: "POST", | ||
158 | + data: { | ||
159 | + "years": that.data.year, | ||
160 | + "settlement_record_id": that.data.settlement_record_id, | ||
161 | + "income_item": that.data.income_item, | ||
162 | + "reduction_item": that.data.reduction_item, | ||
163 | + "reduction_nature": that.data.reduction_nature, | ||
164 | + "exempt_income": parseFloat(that.data.exempt_income), | ||
165 | + }, | ||
166 | + success: function(result) { | ||
167 | + console.log("infoList", result) | ||
168 | + if (result.statusCode == 200) { | ||
169 | + if(type=='1'){ | ||
170 | + that.getInfoList() | ||
171 | + that.setData({ | ||
172 | + showAddView:true | ||
173 | + }) | ||
174 | + }else { | ||
175 | + wx.navigateBack({ | ||
176 | + delat:1 | ||
177 | + }) | ||
178 | + } | ||
179 | + } | ||
180 | + }, | ||
181 | + }) | ||
182 | + }, | ||
183 | + | ||
184 | + /** | ||
185 | + * Lifecycle function--Called when page hide | ||
186 | + */ | ||
187 | + onHide: function() { | ||
188 | + | ||
189 | + }, | ||
190 | + | ||
191 | + /** | ||
192 | + * Lifecycle function--Called when page unload | ||
193 | + */ | ||
194 | + onUnload: function() { | ||
195 | + | ||
196 | + }, | ||
197 | + | ||
198 | + showToast: function (data) { | ||
199 | + if (data && data.length > 0) { | ||
200 | + wx.showToast({ | ||
201 | + title: data, | ||
202 | + icon: "none", | ||
203 | + duration: 2000 | ||
204 | + }) | ||
205 | + } | ||
206 | + }, | ||
207 | + | ||
208 | + /** | ||
209 | + * Page event handler function--Called when user drop down | ||
210 | + */ | ||
211 | + onPullDownRefresh: function() { | ||
212 | + | ||
213 | + }, | ||
214 | + | ||
215 | + /** | ||
216 | + * Called when page reach bottom | ||
217 | + */ | ||
218 | + onReachBottom: function() { | ||
219 | + | ||
220 | + }, | ||
221 | + | ||
222 | + /** | ||
223 | + * Called when user click on the top right corner to share | ||
224 | + */ | ||
225 | + onShareAppMessage: function() { | ||
226 | + | ||
227 | + } | ||
228 | +}) |
1 | +<view> | ||
2 | + <view style="background:#fff;padding:0 30rpx;"> | ||
3 | + <text class="text_gray7_34">免税收入合计</text> | ||
4 | + <text class="text_black3_34 float_right">{{total_account}}</text> | ||
5 | + </view> | ||
6 | + | ||
7 | + <!-- 列表数据,不可修改 --> | ||
8 | + <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> | ||
9 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff"> | ||
10 | + <text class="text_gray7_34">所得项目</text> | ||
11 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
12 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.income_item}}"></input> | ||
13 | + </view> | ||
14 | + <view class="divide_line_30"></view> | ||
15 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" > | ||
16 | + <text class="text_gray7_34">减免事项名称</text> | ||
17 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
18 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.reduction_item}}"></input> | ||
19 | + </view> | ||
20 | + <view class="divide_line_30"></view> | ||
21 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff"> | ||
22 | + <text class="text_gray7_34">减免性质名称</text> | ||
23 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
24 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.reduction_nature}}"></input> | ||
25 | + </view> | ||
26 | + <view class="divide_line_30"></view> | ||
27 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
28 | + <text class="text_gray7_34">免税收入金额</text> | ||
29 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" bindblur="bindIncome" value="{{item.exempt_income}}"></input> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + | ||
33 | + <!-- 添加项,可编辑 --> | ||
34 | + <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> | ||
35 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}"> | ||
36 | + <text class="text_gray7_34">所得项目</text> | ||
37 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
38 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}" disabled="true"></input> | ||
39 | + </picker> | ||
40 | + <view class="divide_line_30"></view> | ||
41 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}"> | ||
42 | + <text class="text_gray7_34">减免事项名称</text> | ||
43 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
44 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}" disabled="true"></input> | ||
45 | + </picker> | ||
46 | + <view class="divide_line_30"></view> | ||
47 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}"> | ||
48 | + <text class="text_gray7_34">减免性质名称</text> | ||
49 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
50 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}" disabled="true"></input> | ||
51 | + </picker> | ||
52 | + <view class="divide_line_30"></view> | ||
53 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
54 | + <text class="text_gray7_34">免税收入金额</text> | ||
55 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" bindblur="bindIncome" value="{{exempt_income}}"></input> | ||
56 | + </view> | ||
57 | + </view> | ||
58 | + | ||
59 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:84rpx" bindtap="addItem"> | ||
60 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | ||
61 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | ||
62 | + </view> | ||
63 | + <view class="btn_bottom" bindtap="goSubmit"> | ||
64 | + <button class="btn_bottom">保存</button> | ||
65 | + </view> | ||
66 | +</view> |
1 | +/* pages/main/finalpay/freeIncomeDetail/freeIncomeDetail.wxss */ | ||
2 | +page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.text_gray7_34 { | ||
7 | + font-family:PingFangSC-Regular,PingFang SC; | ||
8 | + font-size: 34rpx; | ||
9 | + color: #777777; | ||
10 | + text-align: center; | ||
11 | + line-height: 104rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.text_black3_34 { | ||
15 | + font-family:PingFangSC-Regular,PingFang SC; | ||
16 | + font-size: 34rpx; | ||
17 | + color: #333333; | ||
18 | + text-align: center; | ||
19 | + line-height: 104rpx; | ||
20 | +} | ||
21 | + | ||
22 | +.input_wrap { | ||
23 | + width: 448rpx; | ||
24 | + height: 104rpx; | ||
25 | + font-size: 32rpx; | ||
26 | + color: #fff; | ||
27 | + text-align: right; | ||
28 | + overflow: hidden; | ||
29 | + float: right; | ||
30 | + text-overflow: ellipsis; | ||
31 | +white-space: nowrap; | ||
32 | + | ||
33 | +} | ||
34 | + | ||
35 | +.arrow_wrap { | ||
36 | + width: 50rpx; | ||
37 | + height: 50rpx; | ||
38 | + margin-top: 26rpx | ||
39 | +} |
pages/main/finalpay/home.js
0 → 100644
1 | +// pages/main/finalpay/home.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +var format = require('../../../utils/util.js'); | ||
5 | +Page({ | ||
6 | + | ||
7 | + | ||
8 | + data: { | ||
9 | + year: "2019", | ||
10 | + declare_status: "", //申报状态"0" //待申报 "1" //申报成功 “2” 申报中 | ||
11 | + refund_status: "", //退税状态 "0" 无需退税; "1" 待退税;"2" 退税中"3" 退税成功;"4"退税失败;"5"放弃退税; | ||
12 | + pay_status: "", //补税状态 "0" 豁免; "1" 待补税;"2" 补税成功 | ||
13 | + declaring_unit_status: "", //1:本单位申报,2:本单位其他申报,3:其他单位申报,4:待确认申报//5用户自行申报 | ||
14 | + payinfo: {}, | ||
15 | + unitInfo: [], | ||
16 | + showUnit: false, | ||
17 | + declaring_unit_id: "", | ||
18 | + declaring_unit:"", | ||
19 | + showModal_selfDeclare: false, | ||
20 | + uniqual_title01:"", | ||
21 | + uniqual_content01: "", | ||
22 | + declare_text_extra: "",//请等候申报结果 | ||
23 | + new_refund_tax:0, | ||
24 | + declare_end_date:"", | ||
25 | + declare_end_days: 0, | ||
26 | + other_end_date: "", | ||
27 | + other_end_days: 0, | ||
28 | + refund_end_date: "", | ||
29 | + refund_end_days: 0, | ||
30 | + show_other_unit_view:false, | ||
31 | + exempt_status:"" | ||
32 | + }, | ||
33 | + | ||
34 | + | ||
35 | + onLoad: function(options) { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + | ||
40 | + onReady: function() { | ||
41 | + | ||
42 | + }, | ||
43 | + | ||
44 | + | ||
45 | + onShow: function() { | ||
46 | + this.getPayInfo(); | ||
47 | + }, | ||
48 | + | ||
49 | + yearPick: function() { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + getPayInfo: function() { | ||
54 | + var that = this | ||
55 | + this.Authorization = getApp().globalData.Authorization; | ||
56 | + wx.request({ | ||
57 | + url: baseUrl + "payroll/v1/settlement-tax/declare-detail", | ||
58 | + header: { | ||
59 | + 'Authorization': this.Authorization | ||
60 | + }, | ||
61 | + data: { | ||
62 | + 'years': that.data.year | ||
63 | + }, | ||
64 | + success: function(result) { | ||
65 | + console.log("payinfo", result) | ||
66 | + if (result.statusCode == 200) { | ||
67 | + that.updateText(result.data) | ||
68 | + that.setData({ | ||
69 | + declare_status: result.data.declare_status, | ||
70 | + refund_status: result.data.refund_status, | ||
71 | + pay_status: result.data.pay_status, | ||
72 | + declaring_unit: result.data.declaring_unit, | ||
73 | + declaring_unit_status: result.data.declaring_unit_status, | ||
74 | + new_refund_tax: Math.abs(result.data.refund_tax), | ||
75 | + declare_end_date: format.getDateString(result.data.declare_end_time) , | ||
76 | + declare_end_days: format.daysTillNow(Date.parse(new Date())/1000,result.data.declare_end_time), | ||
77 | + other_end_date: format.getDateString(result.data.other_end_time), | ||
78 | + other_end_days: format.daysTillNow(Date.parse(new Date()) / 1000, result.data.other_end_time), | ||
79 | + refund_end_date: format.getDateString(result.data.refund_end_time), | ||
80 | + refund_end_days: format.daysTillNow(Date.parse(new Date()) / 1000, result.data.refund_end_time), | ||
81 | + exempt_status: result.data.exempt, | ||
82 | + payinfo: result.data | ||
83 | + }) | ||
84 | + } | ||
85 | + }, | ||
86 | + }) | ||
87 | + }, | ||
88 | + | ||
89 | + getUnitInfo: function() { //获取申报单位 | ||
90 | + var that = this | ||
91 | + this.Authorization = getApp().globalData.Authorization; | ||
92 | + that.setData({ | ||
93 | + showUnit: true | ||
94 | + }) | ||
95 | + wx.request({ | ||
96 | + url: baseUrl + "payroll/v1/settlement-tax/declare-unit", | ||
97 | + header: { | ||
98 | + 'Authorization': this.Authorization | ||
99 | + }, | ||
100 | + data: {}, | ||
101 | + success: function(result) { | ||
102 | + console.log("unitInfo", result.data) | ||
103 | + if (result.statusCode == 200) { | ||
104 | + that.setData({ | ||
105 | + unitInfo: result.data.items | ||
106 | + }) | ||
107 | + } | ||
108 | + }, | ||
109 | + complete: function(e) { | ||
110 | + that.setData({ | ||
111 | + showUnit: true | ||
112 | + }) | ||
113 | + } | ||
114 | + }) | ||
115 | + }, | ||
116 | + | ||
117 | + updateDeclareState: function(id) { //是否在本单位申报 | ||
118 | + var that = this | ||
119 | + this.Authorization = getApp().globalData.Authorization; | ||
120 | + wx.request({ | ||
121 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
122 | + header: { | ||
123 | + 'Authorization': this.Authorization | ||
124 | + }, | ||
125 | + method: "PUT", | ||
126 | + data: { | ||
127 | + "years":that.data.year, | ||
128 | + 'declaring_unit_id': id, | ||
129 | + "declaring_unit_status": id?'':'5', | ||
130 | + }, | ||
131 | + success: function(result) { | ||
132 | + console.log("declareinfo", result) | ||
133 | + if (result.statusCode == 200) { | ||
134 | + that.setData({ | ||
135 | + | ||
136 | + }) | ||
137 | + that.getPayInfo(); | ||
138 | + } | ||
139 | + }, | ||
140 | + }) | ||
141 | + }, | ||
142 | + | ||
143 | + // 是否放弃退税,(是:"5",否:"") | ||
144 | + forgiveRefund: function(s) { | ||
145 | + var that = this | ||
146 | + this.Authorization = getApp().globalData.Authorization; | ||
147 | + wx.request({ | ||
148 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
149 | + header: { | ||
150 | + 'Authorization': this.Authorization | ||
151 | + }, | ||
152 | + method: "PUT", | ||
153 | + data: { | ||
154 | + "years": that.data.year, | ||
155 | + 'refund_status': s | ||
156 | + }, | ||
157 | + success: function(result) { | ||
158 | + console.log("refund", result) | ||
159 | + if (result.statusCode == 200) { | ||
160 | + that.getPayInfo(); | ||
161 | + that.setData({ | ||
162 | + | ||
163 | + }) | ||
164 | + } | ||
165 | + }, | ||
166 | + }) | ||
167 | + }, | ||
168 | + | ||
169 | + // 确认提交申请退税 | ||
170 | + commitRefund: function() { | ||
171 | + var that = this | ||
172 | + this.Authorization = getApp().globalData.Authorization; | ||
173 | + wx.request({ | ||
174 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
175 | + header: { | ||
176 | + 'Authorization': this.Authorization | ||
177 | + }, | ||
178 | + method: "PUT", | ||
179 | + data: { | ||
180 | + "years": that.data.year, | ||
181 | + "name": "xxxx", //姓名, | ||
182 | + "bank": "xxxx", //开户行, | ||
183 | + "bank_card_no": "xxxx", //银行卡号, | ||
184 | + "bank_province": "xxxx", //银行省份, | ||
185 | + }, | ||
186 | + success: function(result) { | ||
187 | + console.log("refund", result) | ||
188 | + if (result.statusCode == 200) { | ||
189 | + that.setData({ | ||
190 | + | ||
191 | + }) | ||
192 | + } | ||
193 | + }, | ||
194 | + }) | ||
195 | + }, | ||
196 | + | ||
197 | + | ||
198 | + // 跳转到H5页面测试 | ||
199 | + skipH5_01: function() { | ||
200 | + wx.navigateTo({ | ||
201 | + url: '../../common/webview?type=1', | ||
202 | + }) | ||
203 | + }, | ||
204 | + | ||
205 | + skipH5_02: function() { | ||
206 | + wx.navigateTo({ | ||
207 | + url: '../../common/webview?type=2', | ||
208 | + }) | ||
209 | + }, | ||
210 | + | ||
211 | + finalpay_detail: function() {// | ||
212 | + wx.navigateTo({ | ||
213 | + url: 'incomeDetail/incomeDetail', | ||
214 | + }) | ||
215 | + }, | ||
216 | + | ||
217 | + declareHere: function() { | ||
218 | + if(this.data.declaring_unit_status==''){ | ||
219 | + wx.showToast({ | ||
220 | + icon:"none", | ||
221 | + title: '单位还没有启用汇算清缴申报,请等候单位通知', | ||
222 | + }) | ||
223 | + return | ||
224 | + } | ||
225 | + this.getUnitInfo() | ||
226 | + }, | ||
227 | + | ||
228 | + declareNotHere: function() { | ||
229 | + if (this.data.declaring_unit_status == '') { | ||
230 | + wx.showToast({ | ||
231 | + icon: "none", | ||
232 | + title: '单位还没有启用汇算清缴申报,请等候单位通知', | ||
233 | + }) | ||
234 | + return | ||
235 | + } | ||
236 | + var that = this | ||
237 | + wx.showModal({ | ||
238 | + title: '', | ||
239 | + content: '确认不在本单位进行汇算清缴申报吗?', | ||
240 | + confirmColor: '#357aeb', | ||
241 | + success(res) { | ||
242 | + if (res.confirm) { | ||
243 | + console.log('用户点击确定') | ||
244 | + that.updateDeclareState("") | ||
245 | + } else if (res.cancel) { | ||
246 | + console.log('用户点击取消') | ||
247 | + } | ||
248 | + } | ||
249 | + }) | ||
250 | + }, | ||
251 | + | ||
252 | + unitPick: function(e) { //选择申报单位 | ||
253 | + console.log("unitPick", e) | ||
254 | + var info_arr = e.currentTarget.id.split("~") | ||
255 | + this.setData({ | ||
256 | + declaring_unit_id: info_arr[1] , | ||
257 | + declaring_unit: info_arr[0], | ||
258 | + showUnit: false, | ||
259 | + show_other_unit_view:true, | ||
260 | + }) | ||
261 | + }, | ||
262 | + | ||
263 | + selfdeclare_close() { //关闭自行申报弹窗 | ||
264 | + this.setData({ | ||
265 | + showModal_selfDeclare: false | ||
266 | + }) | ||
267 | + }, | ||
268 | + | ||
269 | + declareBySelf: function() { //查看自行申报方式 | ||
270 | + this.setData({ | ||
271 | + showModal_selfDeclare: true | ||
272 | + }) | ||
273 | + }, | ||
274 | + | ||
275 | + godeclareHistory: function() { | ||
276 | + wx.redirectTo({ | ||
277 | + url: '../advancepayment/adPayHome', | ||
278 | + }) | ||
279 | + }, | ||
280 | + | ||
281 | + noOtherUnitInfo: function() { //没有其他单位个税申报 | ||
282 | + this.updateDeclareState(this.data.declaring_unit_id) | ||
283 | + this.setData({ | ||
284 | + show_other_unit_view:false | ||
285 | + }) | ||
286 | + }, | ||
287 | + | ||
288 | + otherUnitInfo: function() { //有其他单位个税申报 | ||
289 | + wx.navigateTo({ | ||
290 | + url: 'addUnitInfo/addUnitInfo?unit_id='+this.data.declaring_unit_id, | ||
291 | + }) | ||
292 | + this.setData({ | ||
293 | + show_other_unit_view: false | ||
294 | + }) | ||
295 | + }, | ||
296 | + | ||
297 | + // 申请退税 | ||
298 | + doRefund: function() { | ||
299 | + wx.navigateTo({ | ||
300 | + url: 'refundInfo/refundInfo', | ||
301 | + }) | ||
302 | + }, | ||
303 | + | ||
304 | + // 放弃退税 | ||
305 | + doNotRefund: function() { | ||
306 | + var that = this | ||
307 | + wx.showModal({ | ||
308 | + title: '确认放弃退税吗?', | ||
309 | + content: '', | ||
310 | + confirmColor: '#357aeb', | ||
311 | + success(res) { | ||
312 | + if (res.confirm) { | ||
313 | + console.log('用户点击确定') | ||
314 | + that.forgiveRefund("5") | ||
315 | + } else if (res.cancel) { | ||
316 | + console.log('用户点击取消') | ||
317 | + } | ||
318 | + } | ||
319 | + }) | ||
320 | + }, | ||
321 | + | ||
322 | + refundDetail:function(){//退税详情 | ||
323 | + wx.navigateTo({ | ||
324 | + url: 'refundDetail/refundDetail?status=' + this.data.refund_status, | ||
325 | + }) | ||
326 | + }, | ||
327 | + | ||
328 | + updateText:function(data){ | ||
329 | + var text = "" | ||
330 | + var text_status = "" | ||
331 | + var text_title = "应补退税额" | ||
332 | + if (data.declare_status=='2'){//申报中 | ||
333 | + text = "请等候申报结果" | ||
334 | + } else {//申报成功 | ||
335 | + if (data.declare_result=='0') {//申报结果0:退税,1:补税,2:无需补退税 | ||
336 | + text_title = "应退税额" | ||
337 | + if (data.refund_status == "1") { | ||
338 | + text = "请确认是否申请退款?" | ||
339 | + } else if (data.refund_status == '2') { | ||
340 | + text = "申请退税中" | ||
341 | + text_status = "退税中" | ||
342 | + } else if (data.refund_status == '4') { | ||
343 | + text = "退税失败,请确认您的银行卡信息是否正确?" | ||
344 | + text_status = "退税失败" | ||
345 | + } else if (data.refund_status == '5') { | ||
346 | + text = "您已放弃退税" | ||
347 | + text_status = "已放弃" | ||
348 | + } | ||
349 | + } else if (data.declare_result == '1'){//补税 | ||
350 | + text_title = "应补税额" | ||
351 | + if (data.exempt == 'yes') { | ||
352 | + text = "您已享受豁免" | ||
353 | + text_status = "豁免" | ||
354 | + } else if (data.pay_status == '1') { | ||
355 | + text = "请等待企业为您代缴税款" | ||
356 | + text_status = "待缴款" | ||
357 | + } else if (data.pay_status == '2') { | ||
358 | + text = "单位已为您代缴税款" | ||
359 | + text_status = "已缴款" | ||
360 | + } | ||
361 | + } | ||
362 | + | ||
363 | + // if (data.refund_tax > 0 || data.refund_tax == 0) { | ||
364 | + // text_title = "应补税额" | ||
365 | + // } else { | ||
366 | + // text_title = "应退税额" | ||
367 | + // } | ||
368 | + } | ||
369 | + this.setData({ | ||
370 | + declare_text_extra:text, | ||
371 | + uniqual_content01:text_status, | ||
372 | + uniqual_title01: text_title, | ||
373 | + }) | ||
374 | + }, | ||
375 | + | ||
376 | + onHide: function() { | ||
377 | + | ||
378 | + }, | ||
379 | + | ||
380 | + | ||
381 | + onUnload: function() { | ||
382 | + | ||
383 | + }, | ||
384 | + | ||
385 | + | ||
386 | + onPullDownRefresh: function() { | ||
387 | + | ||
388 | + }, | ||
389 | + | ||
390 | + | ||
391 | + onReachBottom: function() { | ||
392 | + | ||
393 | + }, | ||
394 | + | ||
395 | + | ||
396 | + onShareAppMessage: function() { | ||
397 | + | ||
398 | + } | ||
399 | +}) |
pages/main/finalpay/home.json
0 → 100644
pages/main/finalpay/home.wxml
0 → 100644
1 | +<!--pages/main/finalpay/home.wxml--> | ||
2 | + | ||
3 | +<view class="page"> | ||
4 | + <view wx:if="{{!showUnit}}"> | ||
5 | + <view style="background:#fff;padding:28rpx" bindtap="yearPick"> | ||
6 | + <text class="text_black_bold">2019年度个人综合所得汇算清缴</text> | ||
7 | + <view wx:if="{{year>2020}}" class="float_right"> | ||
8 | + <image class="arrow_wrap" src="/images/arrow_down.png"></image> | ||
9 | + </view> | ||
10 | + </view> | ||
11 | + <scroll-view style="padding-bottom: 360rpx;"> | ||
12 | + <view style="background:#fff;padding:30rpx 30rpx 50rpx 30rpx;margin-top:20rpx"> | ||
13 | + <text class="text_gray3_26">了解汇算清缴具体内容,请阅读 </text> | ||
14 | + <text class="text_blue_26" bindtap="skipH5_01"> 《2019年度汇算清缴事项公告》 </text> | ||
15 | + <text class="text_blue_26" bindtap="skipH5_02"> 《国家税务总局办理2019年度个人所得税综合所得汇算清缴事项的公告 》</text> | ||
16 | + <text class="text_blue_26"> 的解读 </text> | ||
17 | + </view> | ||
18 | + | ||
19 | + <view style="background:#fff9f0;padding:24rpx;display: flex;"> | ||
20 | + <view style="margin-right:12rpx"> | ||
21 | + <image style="width:28rpx;height:28rpx;margin-top:6rpx" src="/images/warn_yellow.png"></image> | ||
22 | + </view> | ||
23 | + <view wx:if="{{declaring_unit_status==''||(declaring_unit_status=='4'&&!show_other_unit_view)}}"> | ||
24 | + <text class="text_gray6_28">请于 </text> | ||
25 | + <text class="text_yellow_28"> {{declare_end_date}}前 </text> | ||
26 | + <text class="text_gray6_28">确认是否在本单位进行汇算清缴,否则默认为您在其他单位申报或自行申报。 </text> | ||
27 | + </view> | ||
28 | + <view wx:elif="{{declaring_unit_status=='5'}}"> | ||
29 | + <text class="text_gray6_28">您已选择自行申报,可继续查看在本单位的个税申报记录 </text> | ||
30 | + </view> | ||
31 | + <view wx:else> | ||
32 | + <text class="text_gray6_28">您选择在 {{declaring_unit}} 完成2019年度的个人综合所得汇算清缴。 </text> | ||
33 | + </view> | ||
34 | + </view> | ||
35 | + | ||
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"> | ||
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> | ||
41 | + </view> | ||
42 | + <view class="divide_line_f5f5f5" style="margin:20rpx 0"></view> | ||
43 | + <view > | ||
44 | + <text class="text_gray6_28">收入总额:</text> | ||
45 | + <text class="text_gray3_28 float_right" style="line-height:50rpx">¥{{payinfo.total_salary}}</text> | ||
46 | + </view> | ||
47 | + <view class="view_gray_bg" style="padding:16rpx 20rpx;flex-direction: column"> | ||
48 | + <view class="text_gray7_26">其中本单位收入额:{{payinfo.total_salary_on}}</view> | ||
49 | + <text class="text_gray7_26">其中其他单位收入额:{{payinfo.total_salary_else}}</text> | ||
50 | + </view> | ||
51 | + <view style="margin:20rpx 0"> | ||
52 | + <text class="text_gray6_28">累计应纳税额:</text> | ||
53 | + <text class="text_gray3_28 float_right" style="line-height:50rpx">¥{{payinfo.accumulated_payable_tax}}</text> | ||
54 | + </view> | ||
55 | + <view class="divide_line_f5f5f5"></view> | ||
56 | + <view style="margin:20rpx 0"> | ||
57 | + <text class="text_gray6_28">已预缴税额:</text> | ||
58 | + <text class="text_gray3_28 float_right" style="line-height:50rpx">¥{{payinfo.accumulated_prepay_tax}}</text> | ||
59 | + </view> | ||
60 | + <view class="divide_line_f5f5f5"></view> | ||
61 | + <view style="margin:20rpx 0"> | ||
62 | + <text class="text_black_bold">{{uniqual_title01}}:</text> | ||
63 | + <text wx:if="{{declare_status=='2'}}" class="text_orange_28 float_right" style="line-height:50rpx">计算中</text> | ||
64 | + <text wx:else class="text_orange_28 float_right" style="line-height:50rpx">¥{{new_refund_tax}}</text> | ||
65 | + <view wx:if="{{uniqual_content01=='已放弃'}}" class="light_gray_bg"> | ||
66 | + <text style="font-size:11px;color:rgba(0,0,0,0.35);margin: 0 auto">{{uniqual_content01}}</text> | ||
67 | + </view> | ||
68 | + <view wx:elif="{{uniqual_content01=='退税失败'}}" class="light_red_bg"> | ||
69 | + <text style="font-size:11px;color:#fff;margin: 0 auto">{{uniqual_content01}}</text> | ||
70 | + </view> | ||
71 | + <view wx:else class="light_yellow_bg"> | ||
72 | + <text style="font-size:11px;color:#fff;margin: 0 auto">{{uniqual_content01}}</text> | ||
73 | + </view> | ||
74 | + </view> | ||
75 | + <view class="divide_line_f5f5f5"></view> | ||
76 | + <view class=" float_right" style="margin:20rpx 0;font-size: 28rpx;color: #3795ff;" bindtap="finalpay_detail">查看详情</view> | ||
77 | + </view> | ||
78 | + </scroll-view> | ||
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"> | ||
81 | + <text class="text_gray6_28">距离确认是否在本单位进行汇算清缴时间还有 </text> | ||
82 | + <text class="text_yellow_28"> {{declare_end_days}} </text> | ||
83 | + <text class="text_gray6_28">天</text> | ||
84 | + </view> | ||
85 | + <view bindtap="declareNotHere" class="btn_blue_radius" style="margin:20rpx 30rpx "> | ||
86 | + <view class="text_white_34">不在本单位申报</view> | ||
87 | + </view> | ||
88 | + <view bindtap="declareHere" class="btn_white_radius" style="margin:0rpx 30rpx "> | ||
89 | + <view class="text_blue_34">在本单位申报</view> | ||
90 | + </view> | ||
91 | + </view> | ||
92 | + | ||
93 | + <view wx:elif="{{declaring_unit_status=='5'}}" style="width:100%;height:260rpx;position: fixed;bottom: 0;background-color:#fff"> | ||
94 | + <view bindtap="declareBySelf" class="btn_blue_radius" style="margin:20rpx 30rpx "> | ||
95 | + <view class="text_white_34">查看自行申报方式</view> | ||
96 | + </view> | ||
97 | + <view bindtap="godeclareHistory" class="btn_white_radius" style="margin:0rpx 30rpx "> | ||
98 | + <view class="text_blue_34">查看个税申报记录</view> | ||
99 | + </view> | ||
100 | + </view> | ||
101 | + | ||
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"> | ||
104 | + <text class="text_gray6_28">距离确认填报其他单位个税申报明细时间还有 </text> | ||
105 | + <text class="text_yellow_28"> {{other_end_days}} </text> | ||
106 | + <text class="text_gray6_28">天</text> | ||
107 | + </view> | ||
108 | + <view bindtap="noOtherUnitInfo" class="btn_blue_radius" style="margin:20rpx 30rpx "> | ||
109 | + <view class="text_white_34">没有其他单位的收入个税</view> | ||
110 | + </view> | ||
111 | + <view bindtap="otherUnitInfo" class="btn_white_radius" style="margin:0rpx 30rpx "> | ||
112 | + <view class="text_blue_34">有其他单位的收入个税</view> | ||
113 | + </view> | ||
114 | + </view> | ||
115 | + | ||
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"> | ||
118 | + <text class="text_gray6_28">距离确认是否申请退税时间还有 </text> | ||
119 | + <text class="text_yellow_28"> {{refund_end_days}} </text> | ||
120 | + <text class="text_gray6_28">天</text> | ||
121 | + </view> | ||
122 | + <view bindtap="doRefund" class="btn_blue_radius" style="margin:20rpx 30rpx "> | ||
123 | + <view class="text_white_34">申请退税</view> | ||
124 | + </view> | ||
125 | + <view bindtap="doNotRefund" class="btn_white_radius" style="margin:0rpx 30rpx "> | ||
126 | + <view class="text_blue_34">放弃退税</view> | ||
127 | + </view> | ||
128 | + </view> | ||
129 | + | ||
130 | + <view wx:elif="{{declaring_unit_status!='5'&&(refund_status=='2'||refund_status=='3'||refund_status=='4')}}" style="width:100%;height:144rpx;position: fixed;bottom: 0;background-color:#fff"> | ||
131 | + <view bindtap="refundDetail" class="btn_white_radius" style="margin:30rpx "> | ||
132 | + <view class="text_blue_34">查看退税详情</view> | ||
133 | + </view> | ||
134 | + </view> | ||
135 | + | ||
136 | + <view class="mask" wx:if="{{showModal_selfDeclare}}"></view> | ||
137 | + <view class='modal_lg' style='' wx:if="{{showModal_selfDeclare}}"> | ||
138 | + <text class='text_black_bold'>个人如何自行完成汇算清缴申报?</text> | ||
139 | + <text class='text_gray6_28' style="margin-top:30rpx">为便利纳税人,税务机关为纳税人提供高效、快捷的网络办税渠道。纳税人可优先通过网上税务局(包括手机个人所得税app)办理年度汇算,税务机关将按规定为纳税人提供申报表预填服务;不方便通过上述方式办理的,也可以通过邮寄方式或到办税服务厅办理。</text> | ||
140 | + <text class='text_gray6_28' style="margin-top:30rpx">选择邮寄申报的,纳税人需将申报表寄送至任职受雇单位(没有任职受雇单位的,为户籍或者经常居住地)所在省、自治区、直辖区、计划单列市税务局公告指定的税务机关。</text> | ||
141 | + <view style="margin-top:30rpx"> | ||
142 | + <text class='text_gray6_28'> 更详细内容请查看</text> | ||
143 | + <text class='text_blue_28' bindtap="skipH5_02">《国家税务局关于办理2019年度个人所得税综合所得汇算清缴事项的公告》</text> | ||
144 | + </view> | ||
145 | + <view class="btn_blue_radius" style="width:100%;margin-top:40rpx;text-align: center;" bindtap="selfdeclare_close"> | ||
146 | + <text class="text_white_34" style="text-align: center;">我知道了</text> | ||
147 | + </view> | ||
148 | + | ||
149 | + </view> | ||
150 | + </view> | ||
151 | + | ||
152 | + <view wx:if="{{showUnit&&unitInfo.length>0}}" style="background-color:#fff"> | ||
153 | + <view class="text_gray3_34" style="padding:30rpx">选择申报单位</view> | ||
154 | + <view class="divide_line"></view> | ||
155 | + <view wx:for="{{unitInfo}}" style="height:104rpx;margin-left:50rpx;margin-right:30rpx" bindtap="unitPick" id="{{item.declaring_unit}}~{{item.declaring_unit_id}}"> | ||
156 | + <text class="text_gray3_32" style="line-height:104rpx">{{item.declaring_unit}}</text> | ||
157 | + <image class="icon_choosed" hidden="true" src="/images/icon_chat_choosed.png"></image> | ||
158 | + <view class="divide_line"></view> | ||
159 | + </view> | ||
160 | + </view> | ||
161 | +</view> |
pages/main/finalpay/home.wxss
0 → 100644
1 | +/* pages/main/finalpay/home.wxss */ | ||
2 | + | ||
3 | +.page { | ||
4 | + width: 100%; | ||
5 | + height: 100%; | ||
6 | + background-color: #f5f5f5; | ||
7 | +} | ||
8 | + | ||
9 | +.text_black_bold { | ||
10 | + font-size: 36rpx; | ||
11 | + color: #000; | ||
12 | + font-family: PingFangSC-Medium, PingFang SC; | ||
13 | + line-height: 50rpx; | ||
14 | + font-weight:bold; | ||
15 | +} | ||
16 | + | ||
17 | +.arrow_wrap { | ||
18 | + position: relative; | ||
19 | + width: 28rpx; | ||
20 | + height: 16rpx; | ||
21 | + margin-top: 16rpx; | ||
22 | + align-self: center; | ||
23 | +} | ||
24 | + | ||
25 | +.text_gray3_26 { | ||
26 | + font-size: 26rpx; | ||
27 | + color: #333; | ||
28 | + font-family: PingFangSC-Regular, PingFang SC; | ||
29 | + line-height: 36rpx; | ||
30 | +} | ||
31 | + | ||
32 | +.text_gray6_28 { | ||
33 | + font-size: 28rpx; | ||
34 | + color: #666; | ||
35 | + font-family: PingFangSC-Regular, PingFang SC; | ||
36 | + line-height: 40rpx; | ||
37 | +} | ||
38 | + | ||
39 | +.text_yellow_28 { | ||
40 | + font-size: 28rpx; | ||
41 | + color: #fa0; | ||
42 | + font-family: PingFangSC-Regular, PingFang SC; | ||
43 | + line-height: 40rpx; | ||
44 | +} | ||
45 | + | ||
46 | +.text_blue_26 { | ||
47 | + font-size: 26rpx; | ||
48 | + color: #3795ff; | ||
49 | + font-family: PingFangSC-Regular, PingFang SC; | ||
50 | + line-height: 36rpx; | ||
51 | +} | ||
52 | + | ||
53 | +.text_blue_28 { | ||
54 | + font-size: 28rpx; | ||
55 | + color: #3795ff; | ||
56 | + font-family: PingFangSC-Regular, PingFang SC; | ||
57 | + line-height: 36rpx; | ||
58 | +} | ||
59 | + | ||
60 | +.btn_blue_radius { | ||
61 | + margin: 26rpx 30rx; | ||
62 | + background: #357aeb; | ||
63 | + border-radius: 5px; | ||
64 | + height: 84rpx; | ||
65 | +} | ||
66 | + | ||
67 | +.btn_white_radius { | ||
68 | + margin: 26rpx 30rx; | ||
69 | + background: #fff; | ||
70 | + border-radius: 5px; | ||
71 | + border: 1px solid rgba(228, 231, 240, 1); | ||
72 | + height: 84rpx; | ||
73 | +} | ||
74 | + | ||
75 | +.text_white_34 { | ||
76 | + font-family: PingFangSC-Regular; | ||
77 | + font-size: 34rpx; | ||
78 | + color: #fff; | ||
79 | + text-align: center; | ||
80 | + line-height: 42px; | ||
81 | +} | ||
82 | + | ||
83 | +.text_blue_34 { | ||
84 | + font-family: PingFangSC-Regular; | ||
85 | + font-size: 34rpx; | ||
86 | + color: #357aeb; | ||
87 | + text-align: center; | ||
88 | + line-height: 42px; | ||
89 | +} | ||
90 | + | ||
91 | +.text_gray3_34 { | ||
92 | + font-family: PingFangSC-Regular; | ||
93 | + font-size: 34rpx; | ||
94 | + color: #333; | ||
95 | +} | ||
96 | + | ||
97 | +.text_gray3_32 { | ||
98 | + font-family: PingFangSC-Regular; | ||
99 | + font-size: 32rpx; | ||
100 | + color: #333; | ||
101 | +} | ||
102 | + | ||
103 | +.text_gray3_28 { | ||
104 | + font-family: PingFangSC-Regular; | ||
105 | + font-size: 28rpx; | ||
106 | + color: #333; | ||
107 | +} | ||
108 | + | ||
109 | +.icon_choosed { | ||
110 | + width: 24rpx; | ||
111 | + height: 26rpx; | ||
112 | + margin-top: 10rpx; | ||
113 | + margin-right: 20rpx; | ||
114 | + float: right; | ||
115 | +} | ||
116 | + | ||
117 | +.view_gray_bg { | ||
118 | + margin: 20rpx 0; | ||
119 | + width: 100%; | ||
120 | + background: rgba(247, 245, 246, 1); | ||
121 | + opacity: 0.5; | ||
122 | +} | ||
123 | + | ||
124 | +.text_gray9_26 { | ||
125 | + font-size: 26rpx; | ||
126 | + color:rgba(153,153,153,1); | ||
127 | + font-family: PingFangSC-Regular, PingFang SC; | ||
128 | + line-height: 40rpx; | ||
129 | +} | ||
130 | + | ||
131 | +.text_gray7_26 { | ||
132 | + font-size: 26rpx; | ||
133 | + color:#777; | ||
134 | + font-family: PingFangSC-Regular, PingFang SC; | ||
135 | + line-height: 40rpx; | ||
136 | +} | ||
137 | + | ||
138 | +.light_gray_bg { | ||
139 | + float: right; | ||
140 | + width: 50px; | ||
141 | + margin:10rpx ; | ||
142 | + background: rgba(228, 231, 240, 1); | ||
143 | + border-radius: 2px; | ||
144 | + display: flex; | ||
145 | +} | ||
146 | + | ||
147 | +.light_yellow_bg { | ||
148 | + float: right; | ||
149 | + width: 40px; | ||
150 | + margin:10rpx ; | ||
151 | + background: rgba(255, 143, 31, 1); | ||
152 | + border-radius: 2px; | ||
153 | + display: flex; | ||
154 | +} | ||
155 | + | ||
156 | +.light_red_bg { | ||
157 | + float: right; | ||
158 | + width: 40px; | ||
159 | + margin:10rpx ; | ||
160 | + background: rgba(255, 96, 16, 1); | ||
161 | + border-radius: 2px; | ||
162 | + display: flex; | ||
163 | +} | ||
164 | + | ||
165 | +.text_orange_28 { | ||
166 | + font-size: 17px; | ||
167 | + font-family: PingFangSC-Medium, PingFang SC; | ||
168 | + font-weight: 500; | ||
169 | + color: rgba(255, 143, 31, 1); | ||
170 | + line-height: 52px; | ||
171 | +} | ||
172 | + | ||
173 | +/* 遮罩层 */ | ||
174 | + | ||
175 | +.mask { | ||
176 | + width: 100%; | ||
177 | + height: 100%; | ||
178 | + position: fixed; | ||
179 | + top: 0; | ||
180 | + left: 0; | ||
181 | + background: #000; | ||
182 | + opacity: 0.7; | ||
183 | + z-index: 10; | ||
184 | +} | ||
185 | + | ||
186 | +.modal_lg { | ||
187 | + width: 80%; | ||
188 | + position: fixed; | ||
189 | + left: 0; | ||
190 | + right: 0; | ||
191 | + margin: 0 auto; | ||
192 | + background-color: #fff; | ||
193 | + border-radius: 7px; | ||
194 | + display: flex; | ||
195 | + flex-direction: column; | ||
196 | + align-items: center; | ||
197 | + top: 160rpx; | ||
198 | + z-index: 10; | ||
199 | + padding: 40rpx; | ||
200 | +} |
1 | +// pages/main/finalpay/incomeDetail/incomeDetail.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +Page({ | ||
5 | + | ||
6 | + /** | ||
7 | + * Page initial data | ||
8 | + */ | ||
9 | + data: { | ||
10 | + settlement_record_id:"", | ||
11 | + currentTab:1, | ||
12 | + year:"2019", | ||
13 | + incomeInfo:{}, | ||
14 | + showExtraInfo:false | ||
15 | + }, | ||
16 | + | ||
17 | + /** | ||
18 | + * Lifecycle function--Called when page load | ||
19 | + */ | ||
20 | + onLoad: function (options) { | ||
21 | + this.getIncomeDetail() | ||
22 | + }, | ||
23 | + | ||
24 | + /** | ||
25 | + * Lifecycle function--Called when page is initially rendered | ||
26 | + */ | ||
27 | + onReady: function () { | ||
28 | + | ||
29 | + }, | ||
30 | + | ||
31 | + onShow: function () { | ||
32 | + | ||
33 | + }, | ||
34 | + | ||
35 | + /** | ||
36 | + * 点击tab切换 | ||
37 | + */ | ||
38 | + swichNav: function (e) { | ||
39 | + var that = this; | ||
40 | + if (e.target.dataset.current==3){ | ||
41 | + that.setData({ | ||
42 | + showExtraInfo: true | ||
43 | + }) | ||
44 | + }else{ | ||
45 | + that.setData({ | ||
46 | + showExtraInfo: false | ||
47 | + }) | ||
48 | + } | ||
49 | + if (this.data.currentTab === e.target.dataset.current) { | ||
50 | + return false; | ||
51 | + } else { | ||
52 | + that.setData({ | ||
53 | + currentTab: e.target.dataset.current | ||
54 | + }) | ||
55 | + this.getIncomeDetail() | ||
56 | + } | ||
57 | + }, | ||
58 | + | ||
59 | + //获取收入明细 | ||
60 | + getIncomeDetail:function(){ | ||
61 | + var that = this | ||
62 | + this.Authorization = getApp().globalData.Authorization; | ||
63 | + wx.request({ | ||
64 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
65 | + header: { | ||
66 | + 'Authorization': this.Authorization | ||
67 | + }, | ||
68 | + data: { | ||
69 | + "years":that.data.year, | ||
70 | + "declaring_unit_status": that.data.currentTab | ||
71 | + }, | ||
72 | + success: function (result) { | ||
73 | + console.log("incomeInfo", result) | ||
74 | + if (result.statusCode == 200) { | ||
75 | + that.setData({ | ||
76 | + settlement_record_id:result.data.id, | ||
77 | + incomeInfo:result.data.item | ||
78 | + }) | ||
79 | + } | ||
80 | + }, | ||
81 | + }) | ||
82 | + }, | ||
83 | + | ||
84 | +// 免税收入附表 | ||
85 | + freeIncomeDetail: function () { | ||
86 | + wx.navigateTo({ | ||
87 | + url: '../freeIncomeDetail/freeIncomeDetail?id=' + this.data.settlement_record_id, | ||
88 | + }) | ||
89 | + }, | ||
90 | + | ||
91 | +// 其他扣除附表 | ||
92 | + otherDeductDetail:function(){ | ||
93 | + wx.navigateTo({ | ||
94 | + url: '../otherDeductDetail/otherDeductDetail?id=' + this.data.settlement_record_id + "&health_account=" + this.data.incomeInfo.commercial_insurance + "&endowment_account=" + this.data.incomeInfo.tax_extension, | ||
95 | + }) | ||
96 | + }, | ||
97 | + | ||
98 | + // 捐赠明细 | ||
99 | + donationDetail:function(){ | ||
100 | + wx.navigateTo({ | ||
101 | + url: '../donationDetail/donationDetail?id=' + this.data.settlement_record_id, | ||
102 | + }) | ||
103 | + }, | ||
104 | + | ||
105 | +// 减免/已缴纳税额明细 | ||
106 | + deductOrPayedDetail:function(){ | ||
107 | + wx.navigateTo({ | ||
108 | + url: '../deductOrPayedDetail/deductOrPayedDetail?id=' + this.data.settlement_record_id, | ||
109 | + }) | ||
110 | + }, | ||
111 | + | ||
112 | + /** | ||
113 | + * Lifecycle function--Called when page hide | ||
114 | + */ | ||
115 | + onHide: function () { | ||
116 | + | ||
117 | + }, | ||
118 | + | ||
119 | + /** | ||
120 | + * Lifecycle function--Called when page unload | ||
121 | + */ | ||
122 | + onUnload: function () { | ||
123 | + | ||
124 | + }, | ||
125 | + | ||
126 | + /** | ||
127 | + * Page event handler function--Called when user drop down | ||
128 | + */ | ||
129 | + onPullDownRefresh: function () { | ||
130 | + | ||
131 | + }, | ||
132 | + | ||
133 | + /** | ||
134 | + * Called when page reach bottom | ||
135 | + */ | ||
136 | + onReachBottom: function () { | ||
137 | + | ||
138 | + }, | ||
139 | + | ||
140 | + /** | ||
141 | + * Called when user click on the top right corner to share | ||
142 | + */ | ||
143 | + onShareAppMessage: function () { | ||
144 | + | ||
145 | + } | ||
146 | +}) |
1 | +<!--pages/main/finalpay/incomeDetail/incomeDetail.wxml--> | ||
2 | +<view class="page"> | ||
3 | + | ||
4 | + <view class="swiper-tab" style='display:flex'> | ||
5 | + <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" style="margin:0 10rpx" data-current="1" bindtap="swichNav">本单位收入</view> | ||
6 | + <view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" style="margin:0 10rpx" data-current="2" bindtap="swichNav">本单位其他收入</view> | ||
7 | + <view class="swiper-tab-list {{currentTab==3 ? 'on' : ''}}" style="margin:0 10rpx" data-current="3" bindtap="swichNav">其他单位收入</view> | ||
8 | + </view> | ||
9 | + | ||
10 | + <scroll-view class="swiper-box page" style="height:100%;" bindchange="bindChange"> | ||
11 | + <!-- 境内收入 --> | ||
12 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
13 | + <view style="margin-bottom:20rpx"> | ||
14 | + <text class="text_black3_34;">境内收入</text> | ||
15 | + </view> | ||
16 | + <view> | ||
17 | + <text class="text_black6_32">工资薪金收入</text> | ||
18 | + <text class="text_black6_32 float_right">{{incomeInfo.total_salary}}</text> | ||
19 | + </view> | ||
20 | + <view> | ||
21 | + <text class="text_black6_32">劳务报酬收入</text> | ||
22 | + <text class="text_black6_32 float_right">{{incomeInfo.remuneration_labor}}</text> | ||
23 | + </view> | ||
24 | + <view> | ||
25 | + <text class="text_black6_32">稿酬收入</text> | ||
26 | + <text class="text_black6_32 float_right">{{incomeInfo.author_payment}}</text> | ||
27 | + </view> | ||
28 | + <view> | ||
29 | + <text class="text_black6_32">特许经营权</text> | ||
30 | + <text class="text_black6_32 float_right">{{incomeInfo.special_manage_cost}}</text> | ||
31 | + </view> | ||
32 | + </view> | ||
33 | + <!-- 免税收入 --> | ||
34 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
35 | + <view style="margin-bottom:20rpx"> | ||
36 | + <text class="text_black3_34">免税收入</text> | ||
37 | + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="freeIncomeDetail">查看附表</text> | ||
38 | + </view> | ||
39 | + <view> | ||
40 | + <text class="text_black6_32">其他免税收入</text> | ||
41 | + <text class="text_black6_32 float_right">{{incomeInfo.other_free_income}}</text> | ||
42 | + </view> | ||
43 | + </view> | ||
44 | +<!-- 专项扣除 --> | ||
45 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
46 | + <view style="margin-bottom:20rpx"> | ||
47 | + <text class="text_black3_34">专项扣除</text> | ||
48 | + </view> | ||
49 | + <view> | ||
50 | + <text class="text_black6_32">养老保险</text> | ||
51 | + <text class="text_black6_32 float_right">{{incomeInfo.personal_endowment}}</text> | ||
52 | + </view> | ||
53 | + <view> | ||
54 | + <text class="text_black6_32">医疗保险</text> | ||
55 | + <text class="text_black6_32 float_right">{{incomeInfo.personal_medical}}</text> | ||
56 | + </view> | ||
57 | + <view> | ||
58 | + <text class="text_black6_32">失业保险</text> | ||
59 | + <text class="text_black6_32 float_right">{{incomeInfo.personal_unemployment}}</text> | ||
60 | + </view> | ||
61 | + <view> | ||
62 | + <text class="text_black6_32">住房公积金</text> | ||
63 | + <text class="text_black6_32 float_right">{{incomeInfo.personal_house_fund}}</text> | ||
64 | + </view> | ||
65 | + </view> | ||
66 | + <!-- 专项附加扣除 --> | ||
67 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
68 | + <view style="margin-bottom:20rpx"> | ||
69 | + <text class="text_black3_34">专项附加扣除</text> | ||
70 | + </view> | ||
71 | + <view> | ||
72 | + <text class="text_black6_32">子女教育</text> | ||
73 | + <text class="text_black6_32 float_right">{{incomeInfo.childrens_education}}</text> | ||
74 | + </view> | ||
75 | + <view> | ||
76 | + <text class="text_black6_32">继续教育</text> | ||
77 | + <text class="text_black6_32 float_right">{{incomeInfo.continuing_education}}</text> | ||
78 | + </view> | ||
79 | + <view> | ||
80 | + <text class="text_black6_32">住房贷款利息</text> | ||
81 | + <text class="text_black6_32 float_right">{{incomeInfo.housing_loan_interest}}</text> | ||
82 | + </view> | ||
83 | + <view> | ||
84 | + <text class="text_black6_32">住房租金</text> | ||
85 | + <text class="text_black6_32 float_right">{{incomeInfo.housing_rent}}</text> | ||
86 | + </view> | ||
87 | + <view> | ||
88 | + <text class="text_black6_32">赡养老人</text> | ||
89 | + <text class="text_black6_32 float_right">{{incomeInfo.caring_old_people}}</text> | ||
90 | + </view> | ||
91 | + <view> | ||
92 | + <text class="text_black6_32">大病医疗</text> | ||
93 | + <text class="text_black6_32 float_right">{{incomeInfo.serious_illness_medical}}</text> | ||
94 | + </view> | ||
95 | + </view> | ||
96 | + <!-- 其他扣除 --> | ||
97 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
98 | + <view style="margin-bottom:20rpx"> | ||
99 | + <text class="text_black3_34">其他扣除</text> | ||
100 | + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="otherDeductDetail">查看附表</text> | ||
101 | + </view> | ||
102 | + <view> | ||
103 | + <text class="text_black6_32">年金</text> | ||
104 | + <text class="text_black6_32 float_right">{{incomeInfo.annuity}}</text> | ||
105 | + </view> | ||
106 | + <view> | ||
107 | + <text class="text_black6_32">商业健康保险</text> | ||
108 | + <text class="text_black6_32 float_right">{{incomeInfo.commercial_insurance}}</text> | ||
109 | + </view> | ||
110 | + <view> | ||
111 | + <text class="text_black6_32">税延养老保险</text> | ||
112 | + <text class="text_black6_32 float_right">{{incomeInfo.tax_extension}}</text> | ||
113 | + </view> | ||
114 | + <view> | ||
115 | + <text class="text_black6_32">其他</text> | ||
116 | + <text class="text_black6_32 float_right">{{incomeInfo.other_fee}}</text> | ||
117 | + </view> | ||
118 | + </view> | ||
119 | + <!-- 捐赠扣除 --> | ||
120 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
121 | + <view style="margin-bottom:20rpx"> | ||
122 | + <text class="text_black3_34">捐赠扣除</text> | ||
123 | + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="donationDetail">查看明细</text> | ||
124 | + </view> | ||
125 | + <view> | ||
126 | + <text class="text_black6_32">准予扣除的捐赠额</text> | ||
127 | + <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text> | ||
128 | + </view> | ||
129 | + <view style="margin-top:20rpx"> | ||
130 | + <text class="text_black6_32">全年一次性奖金</text> | ||
131 | + <text class="text_black6_32 float_right">{{incomeInfo.years_bouns}}</text> | ||
132 | + </view> | ||
133 | + <view> | ||
134 | + <text class="text_black6_32">准予扣除的捐赠额</text> | ||
135 | + <text class="text_black6_32 float_right">{{incomeInfo.year_donation_deducted}}</text> | ||
136 | + </view> | ||
137 | + </view> | ||
138 | + <!-- 减免/已缴纳税额 --> | ||
139 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
140 | + <view style="margin-bottom:20rpx"> | ||
141 | + <text class="text_black3_34">减免/已缴纳税额</text> | ||
142 | + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="deductOrPayedDetail">查看明细</text> | ||
143 | + </view> | ||
144 | + <view> | ||
145 | + <text class="text_black6_32">减免税额</text> | ||
146 | + <text class="text_black6_32 float_right">{{incomeInfo.tax_savings}}</text> | ||
147 | + </view> | ||
148 | + <view> | ||
149 | + <text class="text_black6_32">已缴税额</text> | ||
150 | + <text class="text_black6_32 float_right">{{incomeInfo.accumulated_withholding_tax}}</text> | ||
151 | + </view> | ||
152 | + </view> | ||
153 | + </scroll-view> | ||
154 | +</view> |
1 | +/* pages/main/finalpay/incomeDetail/incomeDetail.wxss */ | ||
2 | +.page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.swiper-tab { | ||
7 | + width: 100%; | ||
8 | + text-align: center; | ||
9 | + line-height: 88rpx; | ||
10 | + background: #fff; | ||
11 | + box-sizing: border-box; | ||
12 | +} | ||
13 | + | ||
14 | +.swiper-tab-list { | ||
15 | + font-size: 30rpx; | ||
16 | + display: inline-block; | ||
17 | + color: #333; | ||
18 | + flex: 1 | ||
19 | +} | ||
20 | + | ||
21 | +.on { | ||
22 | + color: #4e8fe7; | ||
23 | + border-bottom: 6rpx solid #4e8fe7; | ||
24 | +} | ||
25 | + | ||
26 | +.text_black3_34 { | ||
27 | + font-family:PingFangSC-Medium,PingFang SC; | ||
28 | + font-size: 34rpx; | ||
29 | + color: #333333; | ||
30 | + text-align: center; | ||
31 | + line-height: 24px; | ||
32 | +} | ||
33 | + | ||
34 | +.text_black6_32 { | ||
35 | + font-family:PingFangSC-Regular,PingFang SC; | ||
36 | + font-size: 32rpx; | ||
37 | + color: #666666; | ||
38 | + text-align: center; | ||
39 | + line-height: 32px; | ||
40 | +} |
1 | +// pages/main/finalpay/otherDeductDetail/endowmentInsurDetail.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +var format = require('../../../../utils/util.js'); | ||
5 | +const regex = /^[0-9a-zA-Z]{1,}$/ | ||
6 | +Page({ | ||
7 | + | ||
8 | + /** | ||
9 | + * Page initial data | ||
10 | + */ | ||
11 | + data: { | ||
12 | + settlement_record_id: "", | ||
13 | + year: "2019", | ||
14 | + infoList: [{}], | ||
15 | + total_account:0, | ||
16 | + showAddView: false, | ||
17 | + option_start_date: "", | ||
18 | + option_end_date: "", | ||
19 | + | ||
20 | + "tax_extension_account": "", | ||
21 | + "option_start_time": "", //申报扣除月份起, | ||
22 | + "option_end_time": "", //申报扣除月份止, | ||
23 | + "tax_check_code": "", | ||
24 | + "year_premium": "", //年度保费, | ||
25 | + "month_premium": "", //月度保费 | ||
26 | + "year_deduction": "", //本年扣除金额 | ||
27 | + }, | ||
28 | + | ||
29 | + /** | ||
30 | + * Lifecycle function--Called when page load | ||
31 | + */ | ||
32 | + onLoad: function(options) { | ||
33 | + this.setData({ | ||
34 | + settlement_record_id: options.id | ||
35 | + }) | ||
36 | + this.getInfoList() | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * Lifecycle function--Called when page is initially rendered | ||
41 | + */ | ||
42 | + onReady: function() { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + getInfoList: function() { | ||
47 | + var that = this | ||
48 | + this.Authorization = getApp().globalData.Authorization; | ||
49 | + wx.request({ | ||
50 | + url: baseUrl + "payroll/v1/settlement-tax/tax-extension", | ||
51 | + header: { | ||
52 | + 'Authorization': this.Authorization | ||
53 | + }, | ||
54 | + data: { | ||
55 | + "years": that.data.year, | ||
56 | + "settlement_record_id": that.data.settlement_record_id | ||
57 | + }, | ||
58 | + success: function(result) { | ||
59 | + console.log("infoList", result) | ||
60 | + if (result.statusCode == 200) { | ||
61 | + that.setData({ | ||
62 | + total_account: result.data.total_account, | ||
63 | + infoList: that.handleData(result.data.items), | ||
64 | + | ||
65 | + option_start_date: "", | ||
66 | + option_end_date: "", | ||
67 | + "tax_extension_account": "", | ||
68 | + "option_start_time": "", //申报扣除月份起, | ||
69 | + "option_end_time": "", //申报扣除月份止, | ||
70 | + "tax_check_code": "", | ||
71 | + "year_premium": "", //年度保费, | ||
72 | + "month_premium": "", //月度保费 | ||
73 | + "year_deduction": "", //本年扣除金额 | ||
74 | + }) | ||
75 | + } | ||
76 | + }, | ||
77 | + }) | ||
78 | + }, | ||
79 | + | ||
80 | + handleData: function(items) { //解析列表数据时间戳 | ||
81 | + for (var i = 0; i < items.length; i++) { | ||
82 | + if (items[i].option_start_time && items[i].option_start_time > 1000) { | ||
83 | + items[i].option_start_time = format.formatTime_date(items[i].option_start_time) | ||
84 | + } else { | ||
85 | + items[i].option_start_time = "" | ||
86 | + } | ||
87 | + if (items[i].option_end_time && items[i].option_end_time > 1000) { | ||
88 | + items[i].option_end_time = format.formatTime_date(items[i].option_end_time) | ||
89 | + } else { | ||
90 | + items[i].option_end_time = "" | ||
91 | + } | ||
92 | + } | ||
93 | + return items | ||
94 | + }, | ||
95 | + | ||
96 | + bindDatePicker: function(e) { //时间选择 | ||
97 | + var datelong = Date.parse(new Date(e.detail.value)) / 1000 | ||
98 | + console.log("picker", e) | ||
99 | + if ("option_start_time" == e.currentTarget.id) { | ||
100 | + this.setData({ | ||
101 | + option_start_date: e.detail.value, | ||
102 | + option_start_time: datelong | ||
103 | + }) | ||
104 | + } else if ("option_end_time" == e.currentTarget.id) { | ||
105 | + this.setData({ | ||
106 | + option_end_date: e.detail.value, | ||
107 | + option_end_time: datelong | ||
108 | + }) | ||
109 | + } | ||
110 | + | ||
111 | + }, | ||
112 | + | ||
113 | + getInputInfo: function(e) { // | ||
114 | + console.log("输入框", e.currentTarget.id, e.detail.value) | ||
115 | + var key = e.currentTarget.id + "" | ||
116 | + if ("tax_extension_account" == key) { | ||
117 | + this.setData({ | ||
118 | + "tax_extension_account": e.detail.value, | ||
119 | + }) | ||
120 | + } | ||
121 | + if ("tax_check_code" == key) { | ||
122 | + this.setData({ | ||
123 | + "tax_check_code": e.detail.value, | ||
124 | + }) | ||
125 | + } | ||
126 | + if ("year_premium" == key) { | ||
127 | + this.setData({ | ||
128 | + "year_premium": e.detail.value, | ||
129 | + }) | ||
130 | + } | ||
131 | + if ("month_premium" == key) { | ||
132 | + this.setData({ | ||
133 | + "month_premium": e.detail.value, | ||
134 | + }) | ||
135 | + } | ||
136 | + if ("year_deduction" == key) { | ||
137 | + this.setData({ | ||
138 | + "year_deduction": e.detail.value, | ||
139 | + }) | ||
140 | + } | ||
141 | + }, | ||
142 | + | ||
143 | + /** | ||
144 | + * Lifecycle function--Called when page show | ||
145 | + */ | ||
146 | + onShow: function() { | ||
147 | + | ||
148 | + }, | ||
149 | + | ||
150 | + addItem: function() { //继续添加 | ||
151 | + if (!this.data.showAddView) { //是否新增了view | ||
152 | + this.setData({ | ||
153 | + showAddView: true | ||
154 | + }) | ||
155 | + return | ||
156 | + } | ||
157 | + if (!this.data.tax_extension_account || this.data.tax_extension_account.length < 1) { | ||
158 | + this.showToast("请填写税延养老账号编号") | ||
159 | + return | ||
160 | + } | ||
161 | + if (!regex.test(this.data.tax_extension_account)) { | ||
162 | + this.showToast("税延养老账户编号格式有误") | ||
163 | + return | ||
164 | + } | ||
165 | + if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) { | ||
166 | + this.showToast("请选择申报扣除起止月") | ||
167 | + return | ||
168 | + } | ||
169 | + if (!this.data.tax_check_code || this.data.tax_check_code.length < 1) { | ||
170 | + this.showToast("请填写报税校验码") | ||
171 | + return | ||
172 | + } | ||
173 | + if (!regex.test(this.data.tax_check_code)) { | ||
174 | + this.showToast("报税校验码格式有误") | ||
175 | + return | ||
176 | + } | ||
177 | + if (!this.data.year_deduction || this.data.year_deduction.length < 1) { | ||
178 | + this.showToast("请填写本年扣除金额") | ||
179 | + return | ||
180 | + } | ||
181 | + this.goSubmit("1") | ||
182 | + }, | ||
183 | + | ||
184 | + goSubmit: function(type) { | ||
185 | + if (!this.data.tax_extension_account || this.data.tax_extension_account.length < 1) { | ||
186 | + this.showToast("请填写税延养老账户编号") | ||
187 | + return | ||
188 | + } | ||
189 | + if (!regex.test(this.data.tax_extension_account)) { | ||
190 | + this.showToast("税延养老账号编号格式有误") | ||
191 | + return | ||
192 | + } | ||
193 | + if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) { | ||
194 | + this.showToast("请选择申报扣除起止月") | ||
195 | + return | ||
196 | + } | ||
197 | + if (!this.data.tax_check_code || this.data.tax_check_code.length < 1) { | ||
198 | + this.showToast("请填写报税校验码") | ||
199 | + return | ||
200 | + } | ||
201 | + if (!regex.test(this.data.tax_check_code)) { | ||
202 | + this.showToast("报税校验码格式有误") | ||
203 | + return | ||
204 | + } | ||
205 | + if (!this.data.year_deduction || this.data.year_deduction.length < 1) { | ||
206 | + this.showToast("请填写本年扣除金额") | ||
207 | + return | ||
208 | + } | ||
209 | + | ||
210 | + var that = this | ||
211 | + this.Authorization = app.globalData.Authorization; | ||
212 | + wx.request({ | ||
213 | + url: baseUrl + "payroll/v1/settlement-tax/tax-extension", | ||
214 | + header: { | ||
215 | + 'Authorization': this.Authorization | ||
216 | + }, | ||
217 | + method: "POST", | ||
218 | + data: { | ||
219 | + "years": that.data.year, | ||
220 | + "settlement_record_id": that.data.settlement_record_id, | ||
221 | + "tax_extension_account": that.data.tax_extension_account, | ||
222 | + "option_start_time": that.data.option_start_time, //申报扣除月份起, | ||
223 | + "option_end_time": that.data.option_end_time, //申报扣除月份止, | ||
224 | + "tax_check_code": that.data.tax_check_code, | ||
225 | + "year_premium": parseFloat(that.data.year_premium), //年度保费, | ||
226 | + "month_premium": parseFloat(that.data.month_premium), //月度保费 | ||
227 | + "year_deduction": parseFloat(that.data.year_deduction), //本年扣除金额 | ||
228 | + }, | ||
229 | + success: function(result) { | ||
230 | + console.log("infoList", result) | ||
231 | + if (result.statusCode == 200) { | ||
232 | + if (type == '1') { | ||
233 | + that.getInfoList() | ||
234 | + that.setData({ | ||
235 | + showAddView: true | ||
236 | + }) | ||
237 | + } else { | ||
238 | + wx.navigateBack({ | ||
239 | + delta: 2 | ||
240 | + }) | ||
241 | + } | ||
242 | + } | ||
243 | + } | ||
244 | + }) | ||
245 | + }, | ||
246 | + | ||
247 | + /** | ||
248 | + * Lifecycle function--Called when page hide | ||
249 | + */ | ||
250 | + onHide: function() { | ||
251 | + | ||
252 | + }, | ||
253 | + | ||
254 | + /** | ||
255 | + * Lifecycle function--Called when page unload | ||
256 | + */ | ||
257 | + onUnload: function() { | ||
258 | + | ||
259 | + }, | ||
260 | + | ||
261 | + showToast: function(data) { | ||
262 | + if (data && data.length > 0) { | ||
263 | + wx.showToast({ | ||
264 | + title: data, | ||
265 | + icon: "none", | ||
266 | + duration: 2000 | ||
267 | + }) | ||
268 | + } | ||
269 | + }, | ||
270 | + | ||
271 | + | ||
272 | + /** | ||
273 | + * Page event handler function--Called when user drop down | ||
274 | + */ | ||
275 | + onPullDownRefresh: function() { | ||
276 | + | ||
277 | + }, | ||
278 | + | ||
279 | + /** | ||
280 | + * Called when page reach bottom | ||
281 | + */ | ||
282 | + onReachBottom: function() { | ||
283 | + | ||
284 | + }, | ||
285 | + | ||
286 | + /** | ||
287 | + * Called when user click on the top right corner to share | ||
288 | + */ | ||
289 | + onShareAppMessage: function() { | ||
290 | + | ||
291 | + } | ||
292 | +}) |
1 | +<!--pages/main/finalpay/otherDeductDetail/endowmentInsurDetail.wxml--> | ||
2 | +<view> | ||
3 | + <view style="background:#fff;padding:0 30rpx;"> | ||
4 | + <text class="text_gray7_34">税延养老保险合计</text> | ||
5 | + <text class="text_black3_34 float_right">{{total_account}}</text> | ||
6 | + </view> | ||
7 | + | ||
8 | + <!-- 列表数据,不可修改 --> | ||
9 | + <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> | ||
10 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
11 | + <text class='red_star_right_10'>*</text> | ||
12 | + <text class="text_gray7_34">税延养老账户编号</text> | ||
13 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.tax_extension_account}}"></input> | ||
14 | + </view> | ||
15 | + <view class="divide_line_30"></view> | ||
16 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDeductContent"> | ||
17 | + <text class='red_star_right_10'>*</text> | ||
18 | + <text class="text_gray7_34">申报扣除期起</text> | ||
19 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
20 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.option_start_time}}"></input> | ||
21 | + </view> | ||
22 | + <view class="divide_line_30"></view> | ||
23 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDeductContent"> | ||
24 | + <text class='red_star_right_10'>*</text> | ||
25 | + <text class="text_gray7_34">申报扣除期止</text> | ||
26 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
27 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.option_end_time}}"></input> | ||
28 | + </view> | ||
29 | + <view class="divide_line_30"></view> | ||
30 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
31 | + <text class='red_star_right_10'>*</text> | ||
32 | + <text class="text_gray7_34">报税校验码</text> | ||
33 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.tax_check_code}}"></input> | ||
34 | + </view> | ||
35 | + <view class="divide_line_30"></view> | ||
36 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
37 | + <text class="text_gray7_34">年度保费</text> | ||
38 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.year_premium}}"></input> | ||
39 | + </view> | ||
40 | + <view class="divide_line_30"></view> | ||
41 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
42 | + <text class="text_gray7_34">月度保费</text> | ||
43 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.month_premium}}"></input> | ||
44 | + </view> | ||
45 | + <view class="divide_line_30"></view> | ||
46 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
47 | + <text class='red_star_right_10'>*</text> | ||
48 | + <text class="text_gray7_34">本年扣除金额</text> | ||
49 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.year_deduction}}"></input> | ||
50 | + </view> | ||
51 | + </view> | ||
52 | + | ||
53 | + <!-- 添加项,可编辑 --> | ||
54 | + <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> | ||
55 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
56 | + <text class='red_star_right_10'>*</text> | ||
57 | + <text class="text_gray7_34">税延养老账户编号</text> | ||
58 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_extension_account" bindblur="getInputInfo" maxlength="20" value="{{tax_extension_account}}"></input> | ||
59 | + </view> | ||
60 | + <view class="divide_line_30"></view> | ||
61 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_start_time"> | ||
62 | + <text class='red_star_right_10'>*</text> | ||
63 | + <text class="text_gray7_34">申报扣除期起</text> | ||
64 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
65 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_start_date}}" disabled="true"></input> | ||
66 | + </picker> | ||
67 | + <view class="divide_line_30"></view> | ||
68 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_end_time"> | ||
69 | + <text class='red_star_right_10'>*</text> | ||
70 | + <text class="text_gray7_34">申报扣除期止</text> | ||
71 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
72 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_end_date}}" disabled="true"></input> | ||
73 | + </picker> | ||
74 | + <view class="divide_line_30"></view> | ||
75 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
76 | + <text class='red_star_right_10'>*</text> | ||
77 | + <text class="text_gray7_34">报税校验码</text> | ||
78 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_check_code" bindblur="getInputInfo" maxlength="20" value="{{tax_check_code}}"></input> | ||
79 | + </view> | ||
80 | + <view class="divide_line_30"></view> | ||
81 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
82 | + <text class="text_gray7_34">年度保费</text> | ||
83 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="year_premium" bindblur="getInputInfo" value="{{year_premium}}"></input> | ||
84 | + </view> | ||
85 | + <view class="divide_line_30"></view> | ||
86 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
87 | + <text class="text_gray7_34">月度保费</text> | ||
88 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="month_premium" bindblur="getInputInfo" value="{{month_premium}}"></input> | ||
89 | + </view> | ||
90 | + <view class="divide_line_30"></view> | ||
91 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
92 | + <text class='red_star_right_10'>*</text> | ||
93 | + <text class="text_gray7_34">本年扣除金额</text> | ||
94 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="year_deduction" bindblur="getInputInfo" value="{{year_deduction}}"></input> | ||
95 | + </view> | ||
96 | + </view> | ||
97 | + | ||
98 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:84rpx" bindtap="addItem"> | ||
99 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | ||
100 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | ||
101 | + </view> | ||
102 | + <view class="btn_bottom" bindtap="goSubmit"> | ||
103 | + <button class="btn_bottom">保存</button> | ||
104 | + </view> | ||
105 | +</view> |
1 | +/* pages/main/finalpay/otherDeductDetail/endowmentInsurDetail.wxss */ | ||
2 | + | ||
3 | +page { | ||
4 | + background-color: #f5f5f5; | ||
5 | +} | ||
6 | + | ||
7 | +.text_gray7_34 { | ||
8 | + font-family: PingFangSC-Regular, PingFang SC; | ||
9 | + font-size: 34rpx; | ||
10 | + color: #777; | ||
11 | + text-align: center; | ||
12 | + line-height: 104rpx; | ||
13 | +} | ||
14 | + | ||
15 | +.text_black3_34 { | ||
16 | + font-family: PingFangSC-Regular, PingFang SC; | ||
17 | + font-size: 34rpx; | ||
18 | + color: #333; | ||
19 | + text-align: center; | ||
20 | + line-height: 104rpx; | ||
21 | +} | ||
22 | + | ||
23 | +.input_wrap { | ||
24 | + max-width: 600rpx; | ||
25 | + height: 104rpx; | ||
26 | + font-size: 32rpx; | ||
27 | + color: #fff; | ||
28 | + text-align: right; | ||
29 | + overflow: hidden; | ||
30 | + float: right; | ||
31 | +} | ||
32 | + | ||
33 | +.arrow_wrap { | ||
34 | + width: 50rpx; | ||
35 | + height: 50rpx; | ||
36 | + margin-top: 26rpx | ||
37 | +} | ||
38 | + | ||
39 | +.red_star_right_10 { | ||
40 | + color: red; | ||
41 | + font-size: 30rpx; | ||
42 | + line-height: 104rpx; | ||
43 | + float: left; | ||
44 | + margin-right: 10rpx; | ||
45 | +} |
1 | +// pages/main/finalpay/otherDeductDetail/healthInsurDetail.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +var format = require('../../../../utils/util.js'); | ||
5 | +const regex = /^[0-9a-zA-Z]{1,}$/ | ||
6 | +Page({ | ||
7 | + | ||
8 | + /** | ||
9 | + * Page initial data | ||
10 | + */ | ||
11 | + data: { | ||
12 | + settlement_record_id:"", | ||
13 | + year: "2019", | ||
14 | + showAddView: false, | ||
15 | + infoList: [{}], | ||
16 | + total_account:0, | ||
17 | + effect_date:"", | ||
18 | + | ||
19 | + "tax_code": "", | ||
20 | + "date_policy": "", //保单生效日期, | ||
21 | + "year_premium": "", //年度保费 | ||
22 | + "month_premium": "", //月度保费 | ||
23 | + "year_deduction": "", //本年扣除金额 | ||
24 | + }, | ||
25 | + | ||
26 | + /** | ||
27 | + * Lifecycle function--Called when page load | ||
28 | + */ | ||
29 | + onLoad: function(options) { | ||
30 | + this.setData({ | ||
31 | + settlement_record_id: options.id | ||
32 | + }) | ||
33 | + this.getInfoList() | ||
34 | + }, | ||
35 | + | ||
36 | + /** | ||
37 | + * Lifecycle function--Called when page is initially rendered | ||
38 | + */ | ||
39 | + onReady: function() { | ||
40 | + | ||
41 | + }, | ||
42 | + | ||
43 | + getInfoList: function() { | ||
44 | + var that = this | ||
45 | + this.Authorization = getApp().globalData.Authorization; | ||
46 | + wx.request({ | ||
47 | + url: baseUrl + "payroll/v1/settlement-tax/commercial-insurance-tax", | ||
48 | + header: { | ||
49 | + 'Authorization': this.Authorization | ||
50 | + }, | ||
51 | + data: { | ||
52 | + "years": that.data.year, | ||
53 | + "settlement_record_id": that.data.settlement_record_id | ||
54 | + }, | ||
55 | + success: function(result) { | ||
56 | + console.log("infoList", result) | ||
57 | + if (result.statusCode == 200) { | ||
58 | + that.setData({ | ||
59 | + total_account: result.data.total_account, | ||
60 | + infoList: that.handleData(result.data.items) , | ||
61 | + "tax_code": "", | ||
62 | + "date_policy": "", | ||
63 | + "year_premium": "", | ||
64 | + "month_premium": "", | ||
65 | + "year_deduction": "", | ||
66 | + }) | ||
67 | + } | ||
68 | + }, | ||
69 | + }) | ||
70 | + }, | ||
71 | + | ||
72 | + handleData: function (items){ | ||
73 | + for (var i = 0; i < items.length; i++) { | ||
74 | + if (items[i].date_policy && items[i].date_policy>1000){ | ||
75 | + items[i].date_policy = format.formatTime_date(items[i].date_policy) | ||
76 | + }else{ | ||
77 | + items[i].date_policy = "" | ||
78 | + } | ||
79 | + } | ||
80 | + return items | ||
81 | + }, | ||
82 | + | ||
83 | + /** | ||
84 | + * Lifecycle function--Called when page show | ||
85 | + */ | ||
86 | + onShow: function() { | ||
87 | + | ||
88 | + }, | ||
89 | + | ||
90 | + getInputInfo: function(e) { // | ||
91 | + console.log("输入框", e.currentTarget.id, e.detail.value) | ||
92 | + var key = e.currentTarget.id + "" | ||
93 | + if ("tax_code" == key) { | ||
94 | + this.setData({ | ||
95 | + "tax_code": e.detail.value, | ||
96 | + }) | ||
97 | + } | ||
98 | + if ("year_premium" == key) { | ||
99 | + this.setData({ | ||
100 | + "year_premium": e.detail.value, | ||
101 | + }) | ||
102 | + } | ||
103 | + if ("month_premium" == key) { | ||
104 | + this.setData({ | ||
105 | + "month_premium": e.detail.value, | ||
106 | + }) | ||
107 | + } | ||
108 | + if ("year_deduction" == key) { | ||
109 | + this.setData({ | ||
110 | + "year_deduction": e.detail.value, | ||
111 | + }) | ||
112 | + } | ||
113 | + }, | ||
114 | + | ||
115 | + datePolicyPicker: function(e) { | ||
116 | + var datelong = Date.parse(new Date(e.detail.value)) / 1000 | ||
117 | + console.log("日期", e.detail.value, datelong) | ||
118 | + this.setData({ | ||
119 | + effect_date: e.detail.value, | ||
120 | + date_policy: datelong | ||
121 | + }) | ||
122 | + }, | ||
123 | + | ||
124 | + addItem: function() { //继续添加 | ||
125 | + if (!this.data.showAddView) {//是否新增了view | ||
126 | + this.setData({ | ||
127 | + showAddView: true | ||
128 | + }) | ||
129 | + return | ||
130 | + } | ||
131 | + if (!this.data.tax_code || this.data.tax_code.length < 1) { | ||
132 | + this.showToast("请填写税优识别码") | ||
133 | + return | ||
134 | + } | ||
135 | + if (!regex.test(this.data.tax_code)) { | ||
136 | + this.showToast("税优识别码格式有误") | ||
137 | + return | ||
138 | + } | ||
139 | + if (!this.data.date_policy || this.data.date_policy.length < 1000) { | ||
140 | + this.showToast("请选择保单生效日期") | ||
141 | + return | ||
142 | + } | ||
143 | + if (!this.data.year_deduction || this.data.year_deduction.length < 1) { | ||
144 | + this.showToast("请填写本年扣除金额") | ||
145 | + return | ||
146 | + } | ||
147 | + this.goSubmit("1") | ||
148 | + }, | ||
149 | + | ||
150 | + goSubmit: function (type) {//type=“1”,继续添加(当前页面),type=2保存,返回列表 | ||
151 | + if (!this.data.tax_code || this.data.tax_code.length < 1) { | ||
152 | + this.showToast("请填写税优识别码") | ||
153 | + return | ||
154 | + } | ||
155 | + if (!regex.test(this.data.tax_code)) { | ||
156 | + this.showToast("税优识别码格式有误") | ||
157 | + return | ||
158 | + } | ||
159 | + if (!this.data.date_policy || this.data.date_policy.length < 1000) { | ||
160 | + this.showToast("请选择保单生效日期") | ||
161 | + return | ||
162 | + } | ||
163 | + if (!this.data.year_deduction || this.data.year_deduction.length < 1) { | ||
164 | + this.showToast("请填写本年扣除金额") | ||
165 | + return | ||
166 | + } | ||
167 | + var that = this | ||
168 | + this.Authorization = app.globalData.Authorization; | ||
169 | + wx.request({ | ||
170 | + url: baseUrl + "payroll/v1/settlement-tax/commercial-insurance-tax", | ||
171 | + header: { | ||
172 | + 'Authorization': this.Authorization | ||
173 | + }, | ||
174 | + method: "POST", | ||
175 | + data: { | ||
176 | + "years": that.data.year, | ||
177 | + "settlement_record_id": that.data.settlement_record_id, | ||
178 | + "tax_code": that.data.tax_code, | ||
179 | + "date_policy": that.data.date_policy , //保单生效日期, | ||
180 | + "year_premium": parseFloat(that.data.year_premium) ,//年度保费, | ||
181 | + "month_premium": parseFloat(that.data.month_premium), //月度保费 | ||
182 | + "year_deduction": parseFloat(that.data.year_deduction), //本年扣除金额 | ||
183 | + }, | ||
184 | + success: function (result) { | ||
185 | + console.log("infoList", result) | ||
186 | + if (result.statusCode == 200) { | ||
187 | + if (type == '1') { | ||
188 | + that.getInfoList() | ||
189 | + that.setData({ | ||
190 | + showAddView: true | ||
191 | + }) | ||
192 | + } else { | ||
193 | + wx.navigateBack({ | ||
194 | + delta: 2 | ||
195 | + }) | ||
196 | + } | ||
197 | + } | ||
198 | + }, | ||
199 | + }) | ||
200 | + }, | ||
201 | + | ||
202 | + /** | ||
203 | + * Lifecycle function--Called when page hide | ||
204 | + */ | ||
205 | + onHide: function() { | ||
206 | + | ||
207 | + }, | ||
208 | + | ||
209 | + /** | ||
210 | + * Lifecycle function--Called when page unload | ||
211 | + */ | ||
212 | + onUnload: function() { | ||
213 | + | ||
214 | + }, | ||
215 | + | ||
216 | + showToast: function (data) { | ||
217 | + if (data && data.length > 0) { | ||
218 | + wx.showToast({ | ||
219 | + title: data, | ||
220 | + icon: "none", | ||
221 | + duration: 2000 | ||
222 | + }) | ||
223 | + } | ||
224 | + }, | ||
225 | + | ||
226 | + /** | ||
227 | + * Page event handler function--Called when user drop down | ||
228 | + */ | ||
229 | + onPullDownRefresh: function() { | ||
230 | + | ||
231 | + }, | ||
232 | + | ||
233 | + /** | ||
234 | + * Called when page reach bottom | ||
235 | + */ | ||
236 | + onReachBottom: function() { | ||
237 | + | ||
238 | + }, | ||
239 | + | ||
240 | + /** | ||
241 | + * Called when user click on the top right corner to share | ||
242 | + */ | ||
243 | + onShareAppMessage: function() { | ||
244 | + | ||
245 | + } | ||
246 | +}) |
1 | +<view> | ||
2 | + <view style="background:#fff;padding:0 30rpx;"> | ||
3 | + <text class="text_gray7_34">商业健康保险合计</text> | ||
4 | + <text class="text_black3_34 float_right">{{total_account}}</text> | ||
5 | + </view> | ||
6 | + | ||
7 | + <!-- 列表数据,不可修改 --> | ||
8 | + <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> | ||
9 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
10 | + <text class='red_star_right_10'>*</text> | ||
11 | + <text class="text_gray7_34">税优识别码</text> | ||
12 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" maxlength="20" value="{{item.tax_code}}"></input> | ||
13 | + </view> | ||
14 | + <view class="divide_line_30"></view> | ||
15 | + <view class="divide_line_30"></view> | ||
16 | + <view style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDeductContent"> | ||
17 | + <text class='red_star_right_10'>*</text> | ||
18 | + <text class="text_gray7_34">保单生效日期</text> | ||
19 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
20 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.date_policy}}"></input> | ||
21 | + </view> | ||
22 | + <view class="divide_line_30"></view> | ||
23 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
24 | + <text class="text_gray7_34">年度保费</text> | ||
25 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.year_premium}}"></input> | ||
26 | + </view> | ||
27 | + <view class="divide_line_30"></view> | ||
28 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
29 | + <text class="text_gray7_34">月度保费</text> | ||
30 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.month_premium}}"></input> | ||
31 | + </view> | ||
32 | + <view class="divide_line_30"></view> | ||
33 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
34 | + <text class='red_star_right_10'>*</text> | ||
35 | + <text class="text_gray7_34">本年扣除金额</text> | ||
36 | + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true"value="{{item.year_deduction}}"></input> | ||
37 | + </view> | ||
38 | + </view> | ||
39 | + | ||
40 | + <!-- 添加项,可编辑 --> | ||
41 | + <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> | ||
42 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
43 | + <text class='red_star_right_10'>*</text> | ||
44 | + <text class="text_gray7_34">税优识别码</text> | ||
45 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_code" bindblur="getInputInfo" value="{{tax_code}}"></input> | ||
46 | + </view> | ||
47 | + <view class="divide_line_30"></view> | ||
48 | + <view class="divide_line_30"></view> | ||
49 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="datePolicyPicker"> | ||
50 | + <text class='red_star_right_10'>*</text> | ||
51 | + <text class="text_gray7_34">保单生效日期</text> | ||
52 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
53 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{effect_date}}" disabled="true"></input> | ||
54 | + </picker> | ||
55 | + <view class="divide_line_30"></view> | ||
56 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
57 | + <text class="text_gray7_34">年度保费</text> | ||
58 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="year_premium" bindblur="getInputInfo" value="{{year_premium}}"></input> | ||
59 | + </view> | ||
60 | + <view class="divide_line_30"></view> | ||
61 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
62 | + <text class="text_gray7_34">月度保费</text> | ||
63 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="month_premium" bindblur="getInputInfo" value="{{month_premium}}"></input> | ||
64 | + </view> | ||
65 | + <view class="divide_line_30"></view> | ||
66 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
67 | + <text class='red_star_right_10'>*</text> | ||
68 | + <text class="text_gray7_34">本年扣除金额</text> | ||
69 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="year_deduction" bindblur="getInputInfo" value="{{year_deduction}}"></input> | ||
70 | + </view> | ||
71 | + </view> | ||
72 | + | ||
73 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:84rpx" bindtap="addItem"> | ||
74 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | ||
75 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | ||
76 | + </view> | ||
77 | + <view class="btn_bottom" bindtap="goSubmit"> | ||
78 | + <button class="btn_bottom">保存</button> | ||
79 | + </view> | ||
80 | +</view> |
1 | +/* pages/main/finalpay/otherDeductDetail/healthInsurDetail.wxss */ | ||
2 | + | ||
3 | +page { | ||
4 | + background-color: #f5f5f5; | ||
5 | +} | ||
6 | + | ||
7 | +.text_gray7_34 { | ||
8 | + font-family: PingFangSC-Regular, PingFang SC; | ||
9 | + font-size: 34rpx; | ||
10 | + color: #777; | ||
11 | + text-align: center; | ||
12 | + line-height: 104rpx; | ||
13 | +} | ||
14 | + | ||
15 | +.text_black3_34 { | ||
16 | + font-family: PingFangSC-Regular, PingFang SC; | ||
17 | + font-size: 34rpx; | ||
18 | + color: #333; | ||
19 | + text-align: center; | ||
20 | + line-height: 104rpx; | ||
21 | +} | ||
22 | + | ||
23 | +.input_wrap { | ||
24 | + max-width: 600rpx; | ||
25 | + height: 104rpx; | ||
26 | + font-size: 32rpx; | ||
27 | + color: #fff; | ||
28 | + text-align: right; | ||
29 | + overflow: hidden; | ||
30 | + float: right; | ||
31 | +} | ||
32 | + | ||
33 | +.arrow_wrap { | ||
34 | + width: 50rpx; | ||
35 | + height: 50rpx; | ||
36 | + margin-top: 26rpx | ||
37 | +} | ||
38 | + | ||
39 | +.red_star_right_10 { | ||
40 | + color: red; | ||
41 | + font-size: 30rpx; | ||
42 | + line-height: 104rpx; | ||
43 | + float: left; | ||
44 | + margin-right: 10rpx; | ||
45 | +} |
1 | +// pages/main/finalpay/otherDeductDetail/otherDeductDetail.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * Page initial data | ||
6 | + */ | ||
7 | + data: { | ||
8 | + settlement_record_id: "", | ||
9 | + endowment_account: "0", | ||
10 | + health_account: "0" | ||
11 | + }, | ||
12 | + | ||
13 | + /** | ||
14 | + * Lifecycle function--Called when page load | ||
15 | + */ | ||
16 | + onLoad: function(options) { | ||
17 | + console.log("id", options) | ||
18 | + this.setData({ | ||
19 | + settlement_record_id: options.id, | ||
20 | + endowment_account: options.endowment_account, | ||
21 | + health_account: options.health_account | ||
22 | + }) | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * Lifecycle function--Called when page is initially rendered | ||
27 | + */ | ||
28 | + onReady: function() { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * Lifecycle function--Called when page show | ||
34 | + */ | ||
35 | + onShow: function() { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + // 商业健康保险 | ||
40 | + healthInsurDetail: function() { | ||
41 | + wx.navigateTo({ | ||
42 | + url: 'healthInsurDetail?id=' + this.data.settlement_record_id, | ||
43 | + }) | ||
44 | + }, | ||
45 | + | ||
46 | + // 税延养老保险 | ||
47 | + endowmentInsurDetail: function() { | ||
48 | + wx.navigateTo({ | ||
49 | + url: 'endowmentInsurDetail?id=' + this.data.settlement_record_id, | ||
50 | + }) | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * Lifecycle function--Called when page hide | ||
55 | + */ | ||
56 | + onHide: function() { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * Lifecycle function--Called when page unload | ||
62 | + */ | ||
63 | + onUnload: function() { | ||
64 | + | ||
65 | + }, | ||
66 | + | ||
67 | + /** | ||
68 | + * Page event handler function--Called when user drop down | ||
69 | + */ | ||
70 | + onPullDownRefresh: function() { | ||
71 | + | ||
72 | + }, | ||
73 | + | ||
74 | + /** | ||
75 | + * Called when page reach bottom | ||
76 | + */ | ||
77 | + onReachBottom: function() { | ||
78 | + | ||
79 | + }, | ||
80 | + | ||
81 | + /** | ||
82 | + * Called when user click on the top right corner to share | ||
83 | + */ | ||
84 | + onShareAppMessage: function() { | ||
85 | + | ||
86 | + } | ||
87 | +}) |
1 | +<view> | ||
2 | + <view style="background:#fff;padding:0 30rpx;" bindtap="healthInsurDetail"> | ||
3 | + <text class="text_gray7_34">商业健康保险合计</text> | ||
4 | + <image class='arrow_wrap' style='margin-top: 32rpx' src='/images/arrow_right.png'></image> | ||
5 | + <text class="text_black3_34 float_right">{{health_account}}</text> | ||
6 | + </view> | ||
7 | + <view class="divide_line_30"></view> | ||
8 | + <view style="background:#fff;padding:0 30rpx;" bindtap="endowmentInsurDetail"> | ||
9 | + <text class="text_gray7_34">税延养老保险合计</text> | ||
10 | + <image class='arrow_wrap' style='margin-top: 32rpx' src='/images/arrow_right.png'></image> | ||
11 | + <text class="text_black3_34 float_right">{{endowment_account}}</text> | ||
12 | + </view> | ||
13 | +</view> |
1 | +/* pages/main/finalpay/otherDeductDetail/otherDeductDetail.wxss */ | ||
2 | +page { | ||
3 | + background-color: #f5f5f5; | ||
4 | +} | ||
5 | + | ||
6 | +.text_gray7_34 { | ||
7 | + font-family:PingFangSC-Regular,PingFang SC; | ||
8 | + font-size: 34rpx; | ||
9 | + color: #777777; | ||
10 | + text-align: center; | ||
11 | + line-height: 104rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.text_black3_34 { | ||
15 | + font-family:PingFangSC-Regular,PingFang SC; | ||
16 | + font-size: 34rpx; | ||
17 | + color: #333333; | ||
18 | + text-align: center; | ||
19 | + line-height: 104rpx; | ||
20 | +} |
1 | +; // pages/main/finalpay/refundDetail/refundDetail.js | ||
2 | +var app = getApp(); | ||
3 | +var baseUrl = app.globalData.baseUrl; | ||
4 | +Page({ | ||
5 | + | ||
6 | + /** | ||
7 | + * Page initial data | ||
8 | + */ | ||
9 | + data: { | ||
10 | + year: "2019", | ||
11 | + refund_status: "", //退税状态 "0" 无需退税; "1" 待退税;"2" 退税中"3" 退税成功;"4"退税失败;"5"放弃退税; | ||
12 | + status_arr: ["", "", "退税中", "退税成功", "退税失败","放弃退税"], | ||
13 | + refundInfo: {}, | ||
14 | + refund_tax: 0 | ||
15 | + }, | ||
16 | + | ||
17 | + /** | ||
18 | + * Lifecycle function--Called when page load | ||
19 | + */ | ||
20 | + onLoad: function(options) { | ||
21 | + console.log(options) | ||
22 | + this.getRefundDetail() | ||
23 | + this.setData({ | ||
24 | + refund_status: options.status, | ||
25 | + }) | ||
26 | + }, | ||
27 | + | ||
28 | + /** | ||
29 | + * Lifecycle function--Called when page is initially rendered | ||
30 | + */ | ||
31 | + onReady: function() { | ||
32 | + | ||
33 | + }, | ||
34 | + | ||
35 | + /** | ||
36 | + * Lifecycle function--Called when page show | ||
37 | + */ | ||
38 | + onShow: function() { | ||
39 | + | ||
40 | + }, | ||
41 | + | ||
42 | + getRefundDetail: function() { //退税明细 | ||
43 | + var that = this | ||
44 | + this.Authorization = getApp().globalData.Authorization; | ||
45 | + wx.request({ | ||
46 | + url: baseUrl + "payroll/v1/settlement-tax/refund-detail", | ||
47 | + header: { | ||
48 | + 'Authorization': this.Authorization | ||
49 | + }, | ||
50 | + data: { | ||
51 | + years: that.data.year, | ||
52 | + }, | ||
53 | + success: function(result) { | ||
54 | + console.log("declareinfo", result) | ||
55 | + if (result.statusCode == 200) { | ||
56 | + that.setData({ | ||
57 | + refund_tax: Math.abs(result.data.item.accumulated_refund_tax), | ||
58 | + refundInfo: result.data.item | ||
59 | + }) | ||
60 | + } | ||
61 | + }, | ||
62 | + }) | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * Lifecycle function--Called when page hide | ||
67 | + */ | ||
68 | + onHide: function() { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * Lifecycle function--Called when page unload | ||
74 | + */ | ||
75 | + onUnload: function() { | ||
76 | + | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * Page event handler function--Called when user drop down | ||
81 | + */ | ||
82 | + onPullDownRefresh: function() { | ||
83 | + | ||
84 | + }, | ||
85 | + | ||
86 | + /** | ||
87 | + * Called when page reach bottom | ||
88 | + */ | ||
89 | + onReachBottom: function() { | ||
90 | + | ||
91 | + }, | ||
92 | + | ||
93 | + /** | ||
94 | + * Called when user click on the top right corner to share | ||
95 | + */ | ||
96 | + onShareAppMessage: function() { | ||
97 | + | ||
98 | + } | ||
99 | +}) |
1 | +<view> | ||
2 | + | ||
3 | + <view style="background:#fff;padding:30rpx;margin-top:20rpx"> | ||
4 | + <view wx:if="{{refund_status=='3'}}" style="margin-bottom:20rpx"> | ||
5 | + <text class="text_black3_34">退税详情</text> | ||
6 | + <view class="light_blue_bg" style="display:flex"> | ||
7 | + <text style="font-size:14px;color:#54B4F5;margin: 0 auto">退款成功</text> | ||
8 | + </view> | ||
9 | + </view> | ||
10 | + <view wx:elif="{{refund_status!=0&&refund_status!=1}}" style="margin-bottom:20rpx"> | ||
11 | + <text class="text_black3_34">退税详情</text> | ||
12 | + <view class="light_yellow_bg" style="display:flex"> | ||
13 | + <text style="font-size:14px;color:#FF8F1F;margin: 0 auto">{{status_arr[refund_status]}}</text> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <view class="divide_line" style="margin-bottom:20rpx"></view> | ||
17 | + <view> | ||
18 | + <text class="text_black6_32">开户人姓名</text> | ||
19 | + <text class="text_black6_32 float_right">{{refundInfo.name}}</text> | ||
20 | + </view> | ||
21 | + <view> | ||
22 | + <text class="text_black6_32">申请退税金额</text> | ||
23 | + <text class="text_black6_32 float_right">{{refund_tax}}</text> | ||
24 | + </view> | ||
25 | + <view> | ||
26 | + <text class="text_black6_32">银行卡号</text> | ||
27 | + <text class="text_black6_32 float_right">{{refundInfo.bank_card_no}}</text> | ||
28 | + </view> | ||
29 | + <view> | ||
30 | + <text class="text_black6_32">开户银行名称</text> | ||
31 | + <text class="text_black6_32 float_right">{{refundInfo.bank}}</text> | ||
32 | + </view> | ||
33 | + <view> | ||
34 | + <text class="text_black6_32">开户银行省份</text> | ||
35 | + <text class="text_black6_32 float_right">{{refundInfo.bank_province}}</text> | ||
36 | + </view> | ||
37 | + </view> | ||
38 | +</view> |
1 | +/* pages/main/finalpay/refundDetail/refundDetail.wxss */ | ||
2 | + | ||
3 | +.page { | ||
4 | + width: 100%; | ||
5 | + height: 100%; | ||
6 | + background-color: #f5f5f5; | ||
7 | +} | ||
8 | + | ||
9 | +.text_black3_34 { | ||
10 | + font-family: PingFangSC-Medium, PingFang SC; | ||
11 | + font-size: 34rpx; | ||
12 | + color: #333; | ||
13 | + text-align: center; | ||
14 | + line-height: 24px; | ||
15 | +} | ||
16 | + | ||
17 | +.text_black6_32 { | ||
18 | + font-family: PingFangSC-Regular, PingFang SC; | ||
19 | + font-size: 32rpx; | ||
20 | + color: #666; | ||
21 | + text-align: center; | ||
22 | + line-height: 32px; | ||
23 | +} | ||
24 | + | ||
25 | +.light_blue_bg { | ||
26 | + float: right; | ||
27 | + width: 64px; | ||
28 | + height: 20px; | ||
29 | + background: rgba(221, 240, 253, 1); | ||
30 | + border-radius: 2px; | ||
31 | +} | ||
32 | + | ||
33 | +.light_yellow_bg { | ||
34 | + float: right; | ||
35 | + width: 64px; | ||
36 | + height: 20px; | ||
37 | + background:rgba(255,233,211,1); | ||
38 | + border-radius: 2px; | ||
39 | +} |
pages/main/finalpay/refundInfo/refundInfo.js
0 → 100644
1 | +// pages/main/finalpay/refundInfo/refundInfo.js | ||
2 | +var OSSInit; | ||
3 | +var app = getApp(); | ||
4 | +var baseUrl = app.globalData.baseUrl; | ||
5 | +var format = require('../../../../utils/util.js'); | ||
6 | +var province = require('../../../../utils/province.js'); | ||
7 | +Page({ | ||
8 | + | ||
9 | + /** | ||
10 | + * Page initial data | ||
11 | + */ | ||
12 | + data: { | ||
13 | + year:"2019", | ||
14 | + province: [], | ||
15 | + bankList:[], | ||
16 | + name: '', | ||
17 | + bank: '', | ||
18 | + bank_card_no: '', | ||
19 | + bank_province: '', | ||
20 | + show_modal: false | ||
21 | + }, | ||
22 | + | ||
23 | + /** | ||
24 | + * Lifecycle function--Called when page load | ||
25 | + */ | ||
26 | + onLoad: function(options) { | ||
27 | + this.initOSS() | ||
28 | + var userinfo = app.globalData.userInfo | ||
29 | + console.log("userinfo", userinfo) | ||
30 | + this.getRefundDetail() | ||
31 | + this.getbanklist() | ||
32 | + this.loadProvince() | ||
33 | + this.setData({ | ||
34 | + name: userinfo ? userinfo.name : "" | ||
35 | + }) | ||
36 | + }, | ||
37 | + | ||
38 | + getbanklist: function () { | ||
39 | + var that = this | ||
40 | + var Authorization = app.globalData.Authorization; | ||
41 | + wx.request({ | ||
42 | + url: baseUrl + 'persontax/v1/bank-list', | ||
43 | + method: "GET", | ||
44 | + header: { | ||
45 | + 'content-type': 'application/json', // 默认值 | ||
46 | + "Authorization": Authorization | ||
47 | + }, | ||
48 | + success: function (res) { | ||
49 | + console.log(res) | ||
50 | + that.setData({ | ||
51 | + bankList: res.data.banks, | ||
52 | + }) | ||
53 | + }, | ||
54 | + fail(res) { | ||
55 | + console.log(res) | ||
56 | + }, | ||
57 | + complete() { | ||
58 | + wx.hideLoading() | ||
59 | + } | ||
60 | + }) | ||
61 | + }, | ||
62 | + | ||
63 | + getRefundDetail: function () { //退税明细 | ||
64 | + var that = this | ||
65 | + this.Authorization = getApp().globalData.Authorization; | ||
66 | + wx.request({ | ||
67 | + url: baseUrl + "payroll/v1/settlement-tax/refund-detail", | ||
68 | + header: { | ||
69 | + 'Authorization': this.Authorization | ||
70 | + }, | ||
71 | + data: { | ||
72 | + years: that.data.year, | ||
73 | + }, | ||
74 | + success: function (result) { | ||
75 | + console.log("refundinfo", result.data) | ||
76 | + if (result.statusCode == 200) { | ||
77 | + that.setData({ | ||
78 | + bank: result.data.item.bank, | ||
79 | + bank_card_no: result.data.item.bank_card_no, | ||
80 | + bank_province: result.data.item.bank_province | ||
81 | + }) | ||
82 | + } | ||
83 | + }, | ||
84 | + }) | ||
85 | + }, | ||
86 | + | ||
87 | + | ||
88 | + loadProvince: function() { | ||
89 | + province.init(this) | ||
90 | + var provincelist = this.data.province | ||
91 | + var province_data = [] | ||
92 | + for (var i = 0; i < provincelist.length; i++) { | ||
93 | + province_data.push(provincelist[i].name) | ||
94 | + } | ||
95 | + this.setData({ | ||
96 | + province: province_data, | ||
97 | + }) | ||
98 | + }, | ||
99 | + | ||
100 | + /** | ||
101 | + * Lifecycle function--Called when page is initially rendered | ||
102 | + */ | ||
103 | + onReady: function() { | ||
104 | + | ||
105 | + }, | ||
106 | + | ||
107 | + initOSS: function() { | ||
108 | + var that = this | ||
109 | + var Authorization = getApp().globalData.Authorization; | ||
110 | + //OSS 上传前init | ||
111 | + wx.showLoading() | ||
112 | + wx.request({ | ||
113 | + url: baseUrl + "filemeta/v1/inits", | ||
114 | + header: { | ||
115 | + 'Authorization': Authorization | ||
116 | + }, | ||
117 | + method: 'POST', | ||
118 | + data: { | ||
119 | + "access_type": "web_upload", | ||
120 | + "action ": "put_object", | ||
121 | + "instance_id": "", | ||
122 | + "object_type": "wx_image" | ||
123 | + }, | ||
124 | + success: function(result) { | ||
125 | + | ||
126 | + OSSInit = result.data | ||
127 | + console.log(' OSS init 成功', OSSInit) | ||
128 | + }, | ||
129 | + fail: function(res) { | ||
130 | + console.log('OSS init 失败', res) | ||
131 | + }, | ||
132 | + complete: function() { | ||
133 | + wx.hideLoading() | ||
134 | + } | ||
135 | + }) | ||
136 | + }, | ||
137 | + | ||
138 | + /** | ||
139 | + * Lifecycle function--Called when page show | ||
140 | + */ | ||
141 | + onShow: function() { | ||
142 | + | ||
143 | + }, | ||
144 | + | ||
145 | + bindbank: function() { | ||
146 | + var that = this | ||
147 | + wx.chooseImage({ | ||
148 | + sourceType: ['camera', 'album'], | ||
149 | + // sizeType: ['original'], | ||
150 | + count: 1, | ||
151 | + success: function(res) { | ||
152 | + console.log('success', res) | ||
153 | + wx.getFileSystemManager().readFile({ | ||
154 | + filePath: res.tempFilePaths[0], // 选择图片返回的相对路径 | ||
155 | + encoding: 'base64', // 编码格式 | ||
156 | + success: res => { // 成功的回调 | ||
157 | + that.ocrBankImage(res.data) | ||
158 | + } | ||
159 | + }) | ||
160 | + } | ||
161 | + }) | ||
162 | + }, | ||
163 | + | ||
164 | + // 识别银行卡照片 | ||
165 | + ocrBankImage: function(imginfo) { | ||
166 | + var that = this | ||
167 | + this.Authorization = getApp().globalData.Authorization; | ||
168 | + setTimeout(function() { | ||
169 | + wx.showLoading({ | ||
170 | + title: "识别银行卡中", | ||
171 | + mask: true | ||
172 | + }) | ||
173 | + }, 1000) | ||
174 | + | ||
175 | + wx.request({ | ||
176 | + url: baseUrl + "common/v1/ocr/bankcards", | ||
177 | + method: "POST", | ||
178 | + header: { | ||
179 | + 'Authorization': this.Authorization | ||
180 | + }, | ||
181 | + data: { | ||
182 | + "image": imginfo | ||
183 | + }, | ||
184 | + success: function(result) { | ||
185 | + console.log("bankinfo", result) | ||
186 | + | ||
187 | + if (result.statusCode == 200) { | ||
188 | + var result_new = result.data.bank.split("银行") | ||
189 | + that.setData({ | ||
190 | + bank: result_new[0] + "银行", | ||
191 | + bank_card_no: result.data.bank_card_no, | ||
192 | + hideLoading: true, | ||
193 | + }) | ||
194 | + wx.hideLoading() | ||
195 | + } else { | ||
196 | + wx.hideLoading() | ||
197 | + that.showToast("照片无法识别,请重试") | ||
198 | + } | ||
199 | + }, | ||
200 | + fail: function() { | ||
201 | + wx.hideLoading() | ||
202 | + that.showToast("照片无法识别,请重试") | ||
203 | + } | ||
204 | + }) | ||
205 | + }, | ||
206 | + | ||
207 | + bindRegionChange: function(e) { | ||
208 | + console.log('picker,携带值为', e.detail.value) | ||
209 | + this.setData({ | ||
210 | + bank_province: this.data.province[e.detail.value] | ||
211 | + }) | ||
212 | + }, | ||
213 | + | ||
214 | + bindbankChange: function (e) { | ||
215 | + console.log('picker,携带值为', e.detail.value) | ||
216 | + this.setData({ | ||
217 | + bank: this.data.bankList[e.detail.value] | ||
218 | + }) | ||
219 | + }, | ||
220 | + | ||
221 | + formSubmit: function(e) { | ||
222 | + var formdata = e.detail.value | ||
223 | + console.log("formdata", formdata); | ||
224 | + if (formdata.name.length < 1) { | ||
225 | + this.showToast("请输入姓名") | ||
226 | + return | ||
227 | + } | ||
228 | + if (formdata.bank_card_no.length < 1) { | ||
229 | + this.showToast("请输入银行卡号") | ||
230 | + return | ||
231 | + } | ||
232 | + if (!format.banknoCheck(formdata.bank_card_no)) { | ||
233 | + this.showToast('银行卡号格式有误') | ||
234 | + return | ||
235 | + } | ||
236 | + if (this.data.bank.length < 1) { | ||
237 | + this.showToast("请输入银行名称") | ||
238 | + return | ||
239 | + } | ||
240 | + if (this.data.bank_province.length < 1) { | ||
241 | + this.showToast("请选择开户银行省份") | ||
242 | + return | ||
243 | + } | ||
244 | + this.setData({ | ||
245 | + bank_card_no: formdata.bank_card_no, | ||
246 | + show_modal: true | ||
247 | + }) | ||
248 | + }, | ||
249 | + | ||
250 | + commitCancel: function() { | ||
251 | + this.setData({ | ||
252 | + show_modal: false | ||
253 | + }) | ||
254 | + }, | ||
255 | + | ||
256 | + | ||
257 | + commitConfirm: function() { | ||
258 | + this.setData({ | ||
259 | + show_modal: false | ||
260 | + }) | ||
261 | + // 是否放弃退税,(是:"5",否:"") | ||
262 | + var that = this | ||
263 | + this.Authorization = getApp().globalData.Authorization; | ||
264 | + wx.request({ | ||
265 | + url: baseUrl + "payroll/v1/settlement-tax/record", | ||
266 | + header: { | ||
267 | + 'Authorization': this.Authorization | ||
268 | + }, | ||
269 | + method: "PUT", | ||
270 | + data: { | ||
271 | + 'name': that.data.name, | ||
272 | + "bank": that.data.bank, | ||
273 | + "bank_card_no": that.data.bank_card_no, | ||
274 | + "bank_province": that.data.bank_province, | ||
275 | + "refund_status": "", | ||
276 | + "years": "2019", | ||
277 | + | ||
278 | + }, | ||
279 | + success: function(result) { | ||
280 | + console.log("submit", result) | ||
281 | + if (result.statusCode == 200) { | ||
282 | + wx.navigateBack({ | ||
283 | + delta: 1 | ||
284 | + }) | ||
285 | + } | ||
286 | + }, | ||
287 | + }) | ||
288 | + }, | ||
289 | + | ||
290 | + showToast: function(data) { | ||
291 | + if (data && data.length > 0) { | ||
292 | + wx.showToast({ | ||
293 | + title: data, | ||
294 | + icon: "none", | ||
295 | + duration: 2000 | ||
296 | + }) | ||
297 | + } | ||
298 | + }, | ||
299 | + | ||
300 | + | ||
301 | + /** | ||
302 | + * Lifecycle function--Called when page hide | ||
303 | + */ | ||
304 | + onHide: function() { | ||
305 | + | ||
306 | + }, | ||
307 | + | ||
308 | + /** | ||
309 | + * Lifecycle function--Called when page unload | ||
310 | + */ | ||
311 | + onUnload: function() { | ||
312 | + | ||
313 | + }, | ||
314 | + | ||
315 | + /** | ||
316 | + * Page event handler function--Called when user drop down | ||
317 | + */ | ||
318 | + onPullDownRefresh: function() { | ||
319 | + | ||
320 | + }, | ||
321 | + | ||
322 | + /** | ||
323 | + * Called when page reach bottom | ||
324 | + */ | ||
325 | + onReachBottom: function() { | ||
326 | + | ||
327 | + }, | ||
328 | + | ||
329 | + /** | ||
330 | + * Called when user click on the top right corner to share | ||
331 | + */ | ||
332 | + onShareAppMessage: function() { | ||
333 | + | ||
334 | + } | ||
335 | +}) |
1 | +<!--pages/main/finalpay/refundInfo/refundInfo.wxml--> | ||
2 | +<view class="page"> | ||
3 | + <form style="width:100%;" bindsubmit='formSubmit'> | ||
4 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | ||
5 | + <text class="text_gray7_34">开户人姓名</text> | ||
6 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='name' value="{{name}}" disabled="true"></input> | ||
7 | + </view> | ||
8 | + <view class='divide_line_30'></view> | ||
9 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff"> | ||
10 | + <text class="text_gray7_34" style="line-height:104rpx">银行卡号</text> | ||
11 | + <image class='image_camera' src='/images/camera.png' bindtap='bindbank'></image> | ||
12 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='bank_card_no' value="{{bank_card_no}}" maxlength='19' type='number'></input> | ||
13 | + </view> | ||
14 | + <view class='divide_line_30'></view> | ||
15 | + <!-- <view style="height:104rpx;padding:0 30rpx;background-color:#fff"> | ||
16 | + <text class="text_gray7_34" style="line-height:104rpx">开户银行名称</text> | ||
17 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='bank' value="{{bank}}"></input> | ||
18 | + </view> --> | ||
19 | + <picker style="height:104rpx;padding-left:30rpx;background-color:#fff" mode="selector" bindchange="bindbankChange" range="{{bankList}}" > | ||
20 | + <text class="text_gray7_34">开户银行名称</text> | ||
21 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
22 | + <view wx:if="{{bank.length>0}}" class="input_wrap rigion_choosed"> | ||
23 | + {{bank}} | ||
24 | + </view> | ||
25 | + <view wx:else class="input_wrap rigion_notchoosed}}"> | ||
26 | + 请选择开户银行 </view> | ||
27 | + </picker> | ||
28 | + <view class='divide_line_30'></view> | ||
29 | + <!-- <view style="height:104rpx;padding:0 30rpx;background-color:#fff"> | ||
30 | + <text class="text_gray7_34" style="line-height:104rpx">开户银行省份</text> | ||
31 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='bank_card_province' value="{{bank_card_province}}"></input> | ||
32 | + </view> --> | ||
33 | + | ||
34 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{province}}" > | ||
35 | + <text class="text_gray7_34">开户银行省份</text> | ||
36 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | ||
37 | + <view wx:if="{{bank_province.length>0}}" class="input_wrap rigion_choosed"> | ||
38 | + {{bank_province}} | ||
39 | + </view> | ||
40 | + <view wx:else class="input_wrap rigion_notchoosed}}"> | ||
41 | + 请选择开户银行省份 </view> | ||
42 | + </picker> | ||
43 | + | ||
44 | + <view class="btn_bottom"> | ||
45 | + <button class="btn_bottom" formType="submit">保存</button> | ||
46 | + </view> | ||
47 | + </form> | ||
48 | + <view class="mask" wx:if="{{show_modal}}"></view> | ||
49 | + <view class='modal_lg' style='' wx:if="{{show_modal}}"> | ||
50 | + <!-- <view style='width:100%;display:flex;flex-direction:column;max-height:560rpx;overflow-y: scroll;'></view> --> | ||
51 | + <view class="text_title"> 确认提交吗?</view> | ||
52 | + <view style="margin:2rpx 40rpx"> | ||
53 | + <text class="text_gray6_28">姓名:</text> | ||
54 | + <text class="text_gray6_28 float_right">{{name}}</text> | ||
55 | + </view> | ||
56 | + <view style="margin:2rpx 40rpx"> | ||
57 | + <text class="text_gray6_28">银行卡号:</text> | ||
58 | + <text class="text_gray6_28 float_right">{{bank_card_no}}</text> | ||
59 | + </view> | ||
60 | + <view style="margin:2rpx 40rpx"> | ||
61 | + <text class="text_gray6_28">开户行名称:</text> | ||
62 | + <text class="text_gray6_28 float_right">{{bank}}</text> | ||
63 | + </view> | ||
64 | + <view style="margin:2rpx 40rpx"> | ||
65 | + <text class="text_gray6_28">开户行省份:</text> | ||
66 | + <text class="text_gray6_28 float_right">{{bank_province}}</text> | ||
67 | + </view> | ||
68 | + <view class='divide_line_f5f5f5' style="margin-top:30rpx"></view> | ||
69 | + | ||
70 | + <view style='width:100%;display: flex;'> | ||
71 | + <text class='text_cancel' bindtap='commitCancel'>取消</text> | ||
72 | + <view style='width:1px;background:#F5F5F5;'></view> | ||
73 | + <text class='text_confirm' bindtap='commitConfirm'>确认</text> | ||
74 | + </view> | ||
75 | + | ||
76 | + </view> | ||
77 | +</view> |
1 | +/* pages/main/finalpay/refundInfo/refundInfo.wxss */ | ||
2 | + | ||
3 | +.page { | ||
4 | + width: 100%; | ||
5 | + height: 100%; | ||
6 | + background-color: #f5f5f5; | ||
7 | +} | ||
8 | + | ||
9 | +.text_black3_34 { | ||
10 | + font-family: PingFangSC-Regular, PingFang SC; | ||
11 | + font-size: 34rpx; | ||
12 | + color: #333; | ||
13 | + line-height: 104rpx; | ||
14 | +} | ||
15 | + | ||
16 | +.text_gray7_34 { | ||
17 | + font-family: PingFangSC-Regular, PingFang SC; | ||
18 | + font-size: 34rpx; | ||
19 | + color: #777; | ||
20 | + line-height: 104rpx; | ||
21 | +} | ||
22 | + | ||
23 | +.text_gray6_28 { | ||
24 | + font-family: PingFangSC-Regular, PingFang SC; | ||
25 | + font-size: 28rpx; | ||
26 | + color: #666; | ||
27 | +} | ||
28 | + | ||
29 | +.input_wrap { | ||
30 | + max-width: 600rpx; | ||
31 | + height: 104rpx; | ||
32 | + font-size: 32rpx; | ||
33 | + color: #fff; | ||
34 | + text-align: right; | ||
35 | + overflow: hidden; | ||
36 | + float: right; | ||
37 | +} | ||
38 | + | ||
39 | +.rigion_choosed{ | ||
40 | + color:#000; | ||
41 | + line-height:104rpx | ||
42 | +} | ||
43 | + | ||
44 | +.rigion_notchoosed{ | ||
45 | + color:#777; | ||
46 | + line-height:104rpx | ||
47 | +} | ||
48 | + | ||
49 | +.image_camera { | ||
50 | + width: 42rpx; | ||
51 | + height: 42rpx; | ||
52 | + margin-left: 10rpx; | ||
53 | + margin-top: 30rpx; | ||
54 | + float: right; | ||
55 | +} | ||
56 | + | ||
57 | +.arrow_wrap { | ||
58 | + width: 60rpx; | ||
59 | + height: 60rpx; | ||
60 | + margin-top: 20rpx | ||
61 | +} | ||
62 | + | ||
63 | +/* 遮罩层 */ | ||
64 | + | ||
65 | +.mask { | ||
66 | + width: 100%; | ||
67 | + height: 100%; | ||
68 | + position: fixed; | ||
69 | + top: 0; | ||
70 | + left: 0; | ||
71 | + background: #000; | ||
72 | + opacity: 0.7; | ||
73 | + z-index: 10; | ||
74 | +} | ||
75 | + | ||
76 | +.modal_lg { | ||
77 | + width: 72%; | ||
78 | + position: fixed; | ||
79 | + left: 0; | ||
80 | + right: 0; | ||
81 | + margin: 0 auto; | ||
82 | + background-color: #fff; | ||
83 | + border-radius: 7px; | ||
84 | + display: flex; | ||
85 | + flex-direction: column; | ||
86 | + top: 260rpx; | ||
87 | + z-index: 10; | ||
88 | +} | ||
89 | + | ||
90 | +.text_cancel { | ||
91 | + font-family: PingFangSC-Regular; | ||
92 | + font-size: 36rpx; | ||
93 | + color: #999; | ||
94 | + letter-spacing: 0; | ||
95 | + text-align: center; | ||
96 | + flex: 1; | ||
97 | + padding: 30rpx; | ||
98 | +} | ||
99 | + | ||
100 | +.text_confirm { | ||
101 | + font-family: PingFangSC-Medium, PingFang SC; | ||
102 | + font-size: 36rpx; | ||
103 | + color: #357aeb; | ||
104 | + letter-spacing: 0; | ||
105 | + text-align: center; | ||
106 | + flex: 1; | ||
107 | + padding: 30rpx; | ||
108 | +} | ||
109 | + | ||
110 | +.text_title { | ||
111 | + font-size: 18px; | ||
112 | + font-family: PingFangSC-Medium, PingFang SC; | ||
113 | + color: rgba(51, 51, 51, 1); | ||
114 | + padding: 40rpx; | ||
115 | + text-align: center; | ||
116 | +} |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | </picker> | 13 | </picker> |
14 | <view class='divide_line_f5f5f5'></view> | 14 | <view class='divide_line_f5f5f5'></view> |
15 | <view style='margin: 30rpx;positive:relative;width:92%;height:454rpx'> | 15 | <view style='margin: 30rpx;positive:relative;width:92%;height:454rpx'> |
16 | - <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image> | 16 | + <image class=' payment_img_bg ' src='{{payment_bg}}' style='position:absolute;z-index: 1;'></image> |
17 | <view> | 17 | <view> |
18 | <view class='view_bg_wrap' style='margin-top: 48rpx;'> | 18 | <view class='view_bg_wrap' style='margin-top: 48rpx;'> |
19 | <view style='flex: 1;text-align:center;display: flex;flex-direction: column;'> | 19 | <view style='flex: 1;text-align:center;display: flex;flex-direction: column;'> |
@@ -7,9 +7,11 @@ Page({ | @@ -7,9 +7,11 @@ Page({ | ||
7 | * 页面的初始数据 | 7 | * 页面的初始数据 |
8 | */ | 8 | */ |
9 | data: { | 9 | data: { |
10 | + verify_dialog: getApp().globalData.OSSImgHeader + "verify_dialog.png", | ||
10 | isshow: false, | 11 | isshow: false, |
11 | onresume: false, | 12 | onresume: false, |
12 | - has_verify: true | 13 | + has_verify: true, |
14 | + guide_bg: getApp().globalData.OSSImgHeader+"guide_bg.png" | ||
13 | }, | 15 | }, |
14 | 16 | ||
15 | /** | 17 | /** |
@@ -94,7 +96,9 @@ Page({ | @@ -94,7 +96,9 @@ Page({ | ||
94 | }) | 96 | }) |
95 | } else if (skip_type == "4") { | 97 | } else if (skip_type == "4") { |
96 | wx.navigateTo({ | 98 | wx.navigateTo({ |
97 | - url: '../finalpayment/home', | 99 | + //第一版本的跳转路径 |
100 | + // url: '../finalpayment/home', | ||
101 | + url:'../finalpay/home', | ||
98 | }) | 102 | }) |
99 | } | 103 | } |
100 | } | 104 | } |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <scroll-view> | 6 | <scroll-view> |
7 | <view class="bg_wrap"> | 7 | <view class="bg_wrap"> |
8 | 8 | ||
9 | - <image class='bgimg' src='/images/guide_bg.png'></image> | 9 | + <image class='bgimg' src='{{guide_bg}}'></image> |
10 | 10 | ||
11 | <view class='card_rectangle_bg_row' style='margin-top:310rpx;padding:30rpx' bindtap='gotaxPerson'> | 11 | <view class='card_rectangle_bg_row' style='margin-top:310rpx;padding:30rpx' bindtap='gotaxPerson'> |
12 | <image class="icon_wrap" src="/images/tax_person.png"></image> | 12 | <image class="icon_wrap" src="/images/tax_person.png"></image> |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | 38 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> |
39 | </view> | 39 | </view> |
40 | 40 | ||
41 | - <!-- <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='goFinalPayment'> | 41 | + <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='goFinalPayment'> |
42 | <image class="icon_wrap" src="/images/final_payment.png"></image> | 42 | <image class="icon_wrap" src="/images/final_payment.png"></image> |
43 | <view style='width:1px;height:140rpx;background-color:#e5e5e5;margin-left:40rpx'></view> | 43 | <view style='width:1px;height:140rpx;background-color:#e5e5e5;margin-left:40rpx'></view> |
44 | <view style='display:flex;flex-direction: column;width:440rpx;margin-left:30rpx;align-self:center;'> | 44 | <view style='display:flex;flex-direction: column;width:440rpx;margin-left:30rpx;align-self:center;'> |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | <text style='font-size:28rpx;color: #999;margin-top:6rpx'>查看个人年度税收信息,年度汇算清缴</text> | 46 | <text style='font-size:28rpx;color: #999;margin-top:6rpx'>查看个人年度税收信息,年度汇算清缴</text> |
47 | </view> | 47 | </view> |
48 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | 48 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> |
49 | - </view> --> | 49 | + </view> |
50 | 50 | ||
51 | <!-- <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='gotaxCalculate'> | 51 | <!-- <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='gotaxCalculate'> |
52 | <image class="icon_wrap" src="/images/tax_calculate.png"></image> | 52 | <image class="icon_wrap" src="/images/tax_calculate.png"></image> |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | <view class="mask" wx:if="{{!has_verify&&onresume}}"></view> | 69 | <view class="mask" wx:if="{{!has_verify&&onresume}}"></view> |
70 | 70 | ||
71 | <view style='top:180rpx;position:absolute;z-index:10;right:0;left:0;margin:auto;text-align:center;' wx:if="{{!has_verify&&onresume}}"> | 71 | <view style='top:180rpx;position:absolute;z-index:10;right:0;left:0;margin:auto;text-align:center;' wx:if="{{!has_verify&&onresume}}"> |
72 | - <image style='height:860rpx' src='/images/verify_dialog.png'> | 72 | + <image style='height:860rpx' src='{{verify_dialog}}'> |
73 | </image> | 73 | </image> |
74 | <view style='position:absolute;top:660rpx;right:0;left:0;display:flex;flex-direction:column'> | 74 | <view style='position:absolute;top:660rpx;right:0;left:0;display:flex;flex-direction:column'> |
75 | <view class='btn_blue_radius' bindtap="go_verify_idcard"> | 75 | <view class='btn_blue_radius' bindtap="go_verify_idcard"> |
1 | var format = require('../../../../utils/util.js'); | 1 | var format = require('../../../../utils/util.js'); |
2 | +var province = require('../../../../utils/province.js'); | ||
2 | var app = getApp(); | 3 | var app = getApp(); |
3 | var baseUrl = app.globalData.baseUrl; | 4 | var baseUrl = app.globalData.baseUrl; |
4 | const reg_18_Number = /^[0-9]{18}$/; | 5 | const reg_18_Number = /^[0-9]{18}$/; |
@@ -16,10 +17,11 @@ Page({ | @@ -16,10 +17,11 @@ Page({ | ||
16 | * 页面的初始数据 | 17 | * 页面的初始数据 |
17 | */ | 18 | */ |
18 | data: { | 19 | data: { |
20 | + province: [], | ||
19 | isshow01: false, | 21 | isshow01: false, |
20 | isshow02: false, | 22 | isshow02: false, |
21 | isshow03: false, | 23 | isshow03: false, |
22 | - hasOtherCard:false, | 24 | + hasOtherCard: false, |
23 | taxInfo: {}, | 25 | taxInfo: {}, |
24 | proffessionlist: {}, | 26 | proffessionlist: {}, |
25 | banklist: {}, | 27 | banklist: {}, |
@@ -32,7 +34,7 @@ Page({ | @@ -32,7 +34,7 @@ Page({ | ||
32 | birthday: '', | 34 | birthday: '', |
33 | idInfoData: '', | 35 | idInfoData: '', |
34 | id_error: false, | 36 | id_error: false, |
35 | - has_certify:false, | 37 | + has_certify: false, |
36 | curAddress_haschanged: false, | 38 | curAddress_haschanged: false, |
37 | birthAddress_haschanged: false, | 39 | birthAddress_haschanged: false, |
38 | contactAddress_haschanged: false, | 40 | contactAddress_haschanged: false, |
@@ -40,8 +42,8 @@ Page({ | @@ -40,8 +42,8 @@ Page({ | ||
40 | long_birth_date: 0, | 42 | long_birth_date: 0, |
41 | long_start_date: 0, | 43 | long_start_date: 0, |
42 | long_end_date: 0, | 44 | long_end_date: 0, |
43 | - personal_equity_total:0, | ||
44 | - company_equity_total:0, | 45 | + personal_equity_total: 0, |
46 | + company_equity_total: 0, | ||
45 | huji_address_detail: '', | 47 | huji_address_detail: '', |
46 | personstatusData: { | 48 | personstatusData: { |
47 | isrequre: true, | 49 | isrequre: true, |
@@ -104,7 +106,7 @@ Page({ | @@ -104,7 +106,7 @@ Page({ | ||
104 | label: '纳税人类型', | 106 | label: '纳税人类型', |
105 | bindtype: 'taxpayerType', | 107 | bindtype: 'taxpayerType', |
106 | placeholder: '请选择纳税人类型', | 108 | placeholder: '请选择纳税人类型', |
107 | - selected:"居民", | 109 | + selected: "居民", |
108 | values: ["居民", "非居民"], | 110 | values: ["居民", "非居民"], |
109 | onChange: 'onPickerSelect' | 111 | onChange: 'onPickerSelect' |
110 | }, | 112 | }, |
@@ -114,18 +116,26 @@ Page({ | @@ -114,18 +116,26 @@ Page({ | ||
114 | bindtype: 'forigner', | 116 | bindtype: 'forigner', |
115 | placeholder: '请选择', | 117 | placeholder: '请选择', |
116 | disabled: true, | 118 | disabled: true, |
117 | - selected:"否", | 119 | + selected: "否", |
118 | values: ["否", "是"], | 120 | values: ["否", "是"], |
119 | onChange: 'onPickerSelect' | 121 | onChange: 'onPickerSelect' |
120 | }, | 122 | }, |
121 | bankInfo: { | 123 | bankInfo: { |
122 | label: '开户银行', | 124 | label: '开户银行', |
123 | bindtype: 'bank', | 125 | bindtype: 'bank', |
124 | - maxWidth:490, | 126 | + maxWidth: 490, |
125 | placeholder: '请选择开户银行', | 127 | placeholder: '请选择开户银行', |
126 | selected: '', | 128 | selected: '', |
127 | onChange: 'onPickerSelect' | 129 | onChange: 'onPickerSelect' |
128 | }, | 130 | }, |
131 | + bankProvinceInfo: { | ||
132 | + label: '开户银行省份', | ||
133 | + bindtype: 'bank_province', | ||
134 | + maxWidth: 490, | ||
135 | + placeholder: '请选择开户银行省份', | ||
136 | + selected: '', | ||
137 | + onChange: 'onPickerSelect' | ||
138 | + }, | ||
129 | genderData: { | 139 | genderData: { |
130 | label: '性别', | 140 | label: '性别', |
131 | isrequre: true, | 141 | isrequre: true, |
@@ -216,7 +226,7 @@ Page({ | @@ -216,7 +226,7 @@ Page({ | ||
216 | // 时间picker | 226 | // 时间picker |
217 | birthDate: { | 227 | birthDate: { |
218 | label: '出生日期', | 228 | label: '出生日期', |
219 | - isrequre:true, | 229 | + isrequre: true, |
220 | bindtype: 'birthday', | 230 | bindtype: 'birthday', |
221 | placeholder: '出生日期', | 231 | placeholder: '出生日期', |
222 | selected: '', | 232 | selected: '', |
@@ -306,7 +316,7 @@ Page({ | @@ -306,7 +316,7 @@ Page({ | ||
306 | * 生命周期函数--监听页面加载 | 316 | * 生命周期函数--监听页面加载 |
307 | */ | 317 | */ |
308 | onLoad: function(options) { | 318 | onLoad: function(options) { |
309 | - | 319 | + |
310 | console.log('options.id', options.id) | 320 | console.log('options.id', options.id) |
311 | if (options.id && options.id.length > 0) { | 321 | if (options.id && options.id.length > 0) { |
312 | this.setData({ | 322 | this.setData({ |
@@ -317,9 +327,28 @@ Page({ | @@ -317,9 +327,28 @@ Page({ | ||
317 | this.getproffessiondata() | 327 | this.getproffessiondata() |
318 | this.getbanklist() | 328 | this.getbanklist() |
319 | this.getCountry() | 329 | this.getCountry() |
330 | + this.loadProvince() | ||
320 | }, | 331 | }, |
321 | -//****************获取国籍数据************/ | ||
322 | - getCountry: function () { | 332 | + |
333 | +//****************获取开户行省份************/ | ||
334 | + loadProvince: function () { | ||
335 | + province.init(this) | ||
336 | + var provincelist = this.data.province | ||
337 | + var province_data = [] | ||
338 | + var bankprovince_info = this.data.bankProvinceInfo | ||
339 | + for (var i = 0; i < provincelist.length; i++) { | ||
340 | + province_data.push(provincelist[i].name) | ||
341 | + } | ||
342 | + | ||
343 | + bankprovince_info.values = province_data | ||
344 | + this.setData({ | ||
345 | + bankProvinceInfo: bankprovince_info | ||
346 | + }) | ||
347 | + console.log("bankProvinceInfo", this.data.bankProvinceInfo) | ||
348 | + }, | ||
349 | + | ||
350 | + //****************获取国籍数据************/ | ||
351 | + getCountry: function() { | ||
323 | var that = this | 352 | var that = this |
324 | wx.showLoading({ | 353 | wx.showLoading({ |
325 | title: '', | 354 | title: '', |
@@ -332,7 +361,7 @@ Page({ | @@ -332,7 +361,7 @@ Page({ | ||
332 | 'content-type': 'application/json', // 默认值 | 361 | 'content-type': 'application/json', // 默认值 |
333 | "Authorization": Authorization | 362 | "Authorization": Authorization |
334 | }, | 363 | }, |
335 | - success: function (res) { | 364 | + success: function(res) { |
336 | var countrys = res.data.concat() | 365 | var countrys = res.data.concat() |
337 | that.data.birthCountryData.values = res.data | 366 | that.data.birthCountryData.values = res.data |
338 | if (countrys.indexOf('中国') > -1) { | 367 | if (countrys.indexOf('中国') > -1) { |
@@ -364,7 +393,7 @@ Page({ | @@ -364,7 +393,7 @@ Page({ | ||
364 | }, | 393 | }, |
365 | 394 | ||
366 | 395 | ||
367 | -//****************获取自然人数据************/ | 396 | + //****************获取自然人数据************/ |
368 | getpersonalTax: function(id) { | 397 | getpersonalTax: function(id) { |
369 | var that = this | 398 | var that = this |
370 | wx.showLoading({ | 399 | wx.showLoading({ |
@@ -383,7 +412,7 @@ Page({ | @@ -383,7 +412,7 @@ Page({ | ||
383 | that.setData({ | 412 | that.setData({ |
384 | taxInfo: res.data, | 413 | taxInfo: res.data, |
385 | // isself: '魏先森' != res.data.name ? false : true | 414 | // isself: '魏先森' != res.data.name ? false : true |
386 | - isself: res.data.family_ties=="本人" ? true : false | 415 | + isself: res.data.family_ties == "本人" ? true : false |
387 | }) | 416 | }) |
388 | that.handleDatas(res.data) | 417 | that.handleDatas(res.data) |
389 | }, | 418 | }, |
@@ -398,16 +427,16 @@ Page({ | @@ -398,16 +427,16 @@ Page({ | ||
398 | }, | 427 | }, |
399 | 428 | ||
400 | //对各参数初始赋值 | 429 | //对各参数初始赋值 |
401 | - handleDatas: function (tax_info) { | 430 | + handleDatas: function(tax_info) { |
402 | //todo | 431 | //todo |
403 | console.log('tax_info', tax_info) | 432 | console.log('tax_info', tax_info) |
404 | var curdate = format.curDateTime() | 433 | var curdate = format.curDateTime() |
405 | - this.dealCardType(tax_info.id_card_type)//为防止干扰其他字段,需要先执行 | 434 | + this.dealCardType(tax_info.id_card_type) //为防止干扰其他字段,需要先执行 |
406 | 435 | ||
407 | this.data.name = tax_info.name | 436 | this.data.name = tax_info.name |
408 | this.data.other_name = tax_info.other_name | 437 | this.data.other_name = tax_info.other_name |
409 | - if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) {//已通过拍摄身份证认证过,不能修改 | ||
410 | - if (tax_info.id_card_type=='居民身份证'){ | 438 | + if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) { //已通过拍摄身份证认证过,不能修改 |
439 | + if (tax_info.id_card_type == '居民身份证') { | ||
411 | this.data.genderData.disabled = true | 440 | this.data.genderData.disabled = true |
412 | this.data.birthDate.disabled = true | 441 | this.data.birthDate.disabled = true |
413 | } | 442 | } |
@@ -424,7 +453,7 @@ Page({ | @@ -424,7 +453,7 @@ Page({ | ||
424 | 453 | ||
425 | this.data.other_card_number = tax_info.other_id_card_no | 454 | this.data.other_card_number = tax_info.other_id_card_no |
426 | this.data.overseas = tax_info.is_overseas_personnel | 455 | this.data.overseas = tax_info.is_overseas_personnel |
427 | - if (tax_info.native){ | 456 | + if (tax_info.native) { |
428 | this.data.countryData.selected = tax_info.native | 457 | this.data.countryData.selected = tax_info.native |
429 | } | 458 | } |
430 | this.data.birthCountryData.selected = tax_info.birth_native | 459 | this.data.birthCountryData.selected = tax_info.birth_native |
@@ -436,7 +465,7 @@ Page({ | @@ -436,7 +465,7 @@ Page({ | ||
436 | this.data.mobile = tax_info.mobile | 465 | this.data.mobile = tax_info.mobile |
437 | this.data.investInfo.selected = tax_info.is_investor | 466 | this.data.investInfo.selected = tax_info.is_investor |
438 | this.data.specificIndustryInfo.selected = tax_info.is_specific_profession | 467 | this.data.specificIndustryInfo.selected = tax_info.is_specific_profession |
439 | - | 468 | + |
440 | this.data.genderData.selected = tax_info.gender | 469 | this.data.genderData.selected = tax_info.gender |
441 | if (tax_info.birth_date == -62135596800 || tax_info.birth_date == 0) { | 470 | if (tax_info.birth_date == -62135596800 || tax_info.birth_date == 0) { |
442 | this.data.birthDate.selected = '' | 471 | this.data.birthDate.selected = '' |
@@ -444,17 +473,17 @@ Page({ | @@ -444,17 +473,17 @@ Page({ | ||
444 | // this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date) | 473 | // this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date) |
445 | this.data.birthDate.selected = tax_info.birth_date_str //format.formatTime_date(tax_info.birth_date) | 474 | this.data.birthDate.selected = tax_info.birth_date_str //format.formatTime_date(tax_info.birth_date) |
446 | } | 475 | } |
447 | -//非必填 | 476 | + //非必填 |
448 | if (tax_info.join_date > 1000) { | 477 | if (tax_info.join_date > 1000) { |
449 | // this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date) | 478 | // this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date) |
450 | - this.data.startDate.selected = format.formatTime_date(tax_info.join_date) | 479 | + this.data.startDate.selected = format.formatTime_date(tax_info.join_date) |
451 | } | 480 | } |
452 | if (tax_info.separate_date > 1000) { | 481 | if (tax_info.separate_date > 1000) { |
453 | - this.data.endDate.selected = format.formatTime_date(tax_info.separate_date) | 482 | + this.data.endDate.selected = format.formatTime_date(tax_info.separate_date) |
454 | } | 483 | } |
455 | const firstEntryDate = format.formatTime_date(tax_info.first_entry_date) | 484 | const firstEntryDate = format.formatTime_date(tax_info.first_entry_date) |
456 | const predictLeaveDate = format.formatTime_date(tax_info.predict_leave_date) | 485 | const predictLeaveDate = format.formatTime_date(tax_info.predict_leave_date) |
457 | - this.data.firstEntryDate.selected = (firstEntryDate.indexOf("01-01-01") == -1) ? firstEntryDate:'' | 486 | + this.data.firstEntryDate.selected = (firstEntryDate.indexOf("01-01-01") == -1) ? firstEntryDate : '' |
458 | this.data.firstEntryDate.datelong = tax_info.first_entry_date | 487 | this.data.firstEntryDate.datelong = tax_info.first_entry_date |
459 | this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : '' | 488 | this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : '' |
460 | this.data.predictLeaveDate.datelong = tax_info.predict_leave_date | 489 | this.data.predictLeaveDate.datelong = tax_info.predict_leave_date |
@@ -468,6 +497,7 @@ Page({ | @@ -468,6 +497,7 @@ Page({ | ||
468 | this.data.lieshuInfo.selected = tax_info.is_martyr_family | 497 | this.data.lieshuInfo.selected = tax_info.is_martyr_family |
469 | this.data.lonelyolderInfo.selected = tax_info.is_lonely_man | 498 | this.data.lonelyolderInfo.selected = tax_info.is_lonely_man |
470 | this.data.bankInfo.selected = tax_info.bank | 499 | this.data.bankInfo.selected = tax_info.bank |
500 | + this.data.bankProvinceInfo.selected = tax_info.bank_province | ||
471 | this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district | 501 | this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district |
472 | this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district | 502 | this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district |
473 | this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "") | 503 | this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "") |
@@ -485,8 +515,9 @@ Page({ | @@ -485,8 +515,9 @@ Page({ | ||
485 | specificIndustryInfo: this.data.specificIndustryInfo, | 515 | specificIndustryInfo: this.data.specificIndustryInfo, |
486 | genderData: this.data.genderData, | 516 | genderData: this.data.genderData, |
487 | bankInfo: this.data.bankInfo, | 517 | bankInfo: this.data.bankInfo, |
518 | + bankProvinceInfo: this.data.bankProvinceInfo, | ||
488 | personal_equity_total: tax_info.personal_equity_total ? tax_info.personal_equity_total : 0, | 519 | personal_equity_total: tax_info.personal_equity_total ? tax_info.personal_equity_total : 0, |
489 | - company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total: 0, | 520 | + company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total : 0, |
490 | 521 | ||
491 | professionData: this.data.professionData, | 522 | professionData: this.data.professionData, |
492 | degreeData: this.data.degreeData, | 523 | degreeData: this.data.degreeData, |
@@ -501,7 +532,7 @@ Page({ | @@ -501,7 +532,7 @@ Page({ | ||
501 | 532 | ||
502 | long_birth_date: tax_info.birth_date, | 533 | long_birth_date: tax_info.birth_date, |
503 | birthDate: this.data.birthDate, | 534 | birthDate: this.data.birthDate, |
504 | - long_start_date: tax_info.join_date ? tax_info.join_date:0, | 535 | + long_start_date: tax_info.join_date ? tax_info.join_date : 0, |
505 | startDate: this.data.startDate, | 536 | startDate: this.data.startDate, |
506 | long_end_date: tax_info.separate_date ? tax_info.separate_date : 0, | 537 | long_end_date: tax_info.separate_date ? tax_info.separate_date : 0, |
507 | endDate: this.data.endDate, | 538 | endDate: this.data.endDate, |
@@ -531,7 +562,7 @@ Page({ | @@ -531,7 +562,7 @@ Page({ | ||
531 | "Authorization": Authorization | 562 | "Authorization": Authorization |
532 | }, | 563 | }, |
533 | success: function(res) { | 564 | success: function(res) { |
534 | - if (res.data.items.length<1){ | 565 | + if (res.data.items.length < 1) { |
535 | return | 566 | return |
536 | } | 567 | } |
537 | proffession_info.values = that.handleProfession(res.data.items) | 568 | proffession_info.values = that.handleProfession(res.data.items) |
@@ -617,7 +648,7 @@ Page({ | @@ -617,7 +648,7 @@ Page({ | ||
617 | }, | 648 | }, |
618 | success: function(res) { | 649 | success: function(res) { |
619 | console.log(res) | 650 | console.log(res) |
620 | - bank_info.values = res.data.banks//that.handleBankinfo(res.data.items) | 651 | + bank_info.values = res.data.banks //that.handleBankinfo(res.data.items) |
621 | 652 | ||
622 | that.setData({ | 653 | that.setData({ |
623 | // banklist: res.data.items, | 654 | // banklist: res.data.items, |
@@ -692,7 +723,7 @@ Page({ | @@ -692,7 +723,7 @@ Page({ | ||
692 | // return | 723 | // return |
693 | // } | 724 | // } |
694 | that.setData({ | 725 | that.setData({ |
695 | - has_certify:true, | 726 | + has_certify: true, |
696 | idInfoData: id_info, | 727 | idInfoData: id_info, |
697 | name: id_info.name, | 728 | name: id_info.name, |
698 | birthday: birth_day, | 729 | birthday: birth_day, |
@@ -716,7 +747,7 @@ Page({ | @@ -716,7 +747,7 @@ Page({ | ||
716 | }, | 747 | }, |
717 | 748 | ||
718 | span: function(e) { | 749 | span: function(e) { |
719 | - console.log(e,'9808909') | 750 | + console.log(e, '9808909') |
720 | if ("1" == e.currentTarget.id) { | 751 | if ("1" == e.currentTarget.id) { |
721 | this.setData({ | 752 | this.setData({ |
722 | isshow01: !this.data.isshow01 | 753 | isshow01: !this.data.isshow01 |
@@ -733,7 +764,7 @@ Page({ | @@ -733,7 +764,7 @@ Page({ | ||
733 | 764 | ||
734 | }, | 765 | }, |
735 | 766 | ||
736 | - dealCardType: function (new_type){ | 767 | + dealCardType: function(new_type) { |
737 | // console.log('cardtype_code', new_type_code) | 768 | // console.log('cardtype_code', new_type_code) |
738 | console.log('cardtype', new_type) | 769 | console.log('cardtype', new_type) |
739 | var is_idcard = this.data.isIdCard | 770 | var is_idcard = this.data.isIdCard |
@@ -767,12 +798,12 @@ Page({ | @@ -767,12 +798,12 @@ Page({ | ||
767 | this.data.countryData.selected = '' | 798 | this.data.countryData.selected = '' |
768 | this.data.countryData.disabled = false | 799 | this.data.countryData.disabled = false |
769 | this.data.nameText = '英文名' | 800 | this.data.nameText = '英文名' |
770 | - if (new_type.indexOf('通行证') != -1){ | ||
771 | - this.data.otherCardtypeData.values = ['港澳居民居住证'];// [{ 'code': '4', 'name': '港澳居民居住证'}]; | 801 | + if (new_type.indexOf('通行证') != -1) { |
802 | + this.data.otherCardtypeData.values = ['港澳居民居住证']; // [{ 'code': '4', 'name': '港澳居民居住证'}]; | ||
772 | this.data.otherCardtypeData.isrequre = false | 803 | this.data.otherCardtypeData.isrequre = false |
773 | - }else{ | ||
774 | - this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | ||
775 | - this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | 804 | + } else { |
805 | + this.data.otherCardtypeData.values = ['港澳居民来往内地通行证']; // [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; | ||
806 | + this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | ||
776 | this.data.otherCardtypeData.isrequre = true | 807 | this.data.otherCardtypeData.isrequre = true |
777 | } | 808 | } |
778 | } else if (new_type.indexOf("台湾") != -1) { | 809 | } else if (new_type.indexOf("台湾") != -1) { |
@@ -780,11 +811,11 @@ Page({ | @@ -780,11 +811,11 @@ Page({ | ||
780 | this.data.countryData.disabled = true | 811 | this.data.countryData.disabled = true |
781 | this.data.nameText = '英文名' | 812 | this.data.nameText = '英文名' |
782 | if (new_type.indexOf('通行证') != -1) { | 813 | if (new_type.indexOf('通行证') != -1) { |
783 | - this.data.otherCardtypeData.values = ['台湾居民居住证'];//[{ 'code': '6', 'name': '台湾居民居住证' }]; | 814 | + this.data.otherCardtypeData.values = ['台湾居民居住证']; //[{ 'code': '6', 'name': '台湾居民居住证' }]; |
784 | this.data.otherCardtypeData.isrequre = false | 815 | this.data.otherCardtypeData.isrequre = false |
785 | } else { | 816 | } else { |
786 | this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; | 817 | this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; |
787 | - this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | 818 | + this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; |
788 | this.data.otherCardtypeData.isrequre = true | 819 | this.data.otherCardtypeData.isrequre = true |
789 | } | 820 | } |
790 | 821 | ||
@@ -794,12 +825,12 @@ Page({ | @@ -794,12 +825,12 @@ Page({ | ||
794 | this.data.countryData.disabled = false | 825 | this.data.countryData.disabled = false |
795 | this.data.nameText = '中文名' | 826 | this.data.nameText = '中文名' |
796 | if (new_type.indexOf("外国护照") != -1) { | 827 | if (new_type.indexOf("外国护照") != -1) { |
797 | - // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; | ||
798 | - this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)','外国人工作许可证(C类)']; | 828 | + // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; |
829 | + this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)']; | ||
799 | this.data.otherCardtypeData.isrequre = false | 830 | this.data.otherCardtypeData.isrequre = false |
800 | } else { | 831 | } else { |
801 | this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; | 832 | this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; |
802 | - this.data.otherCardtypeData.selected = '外国护照'; | 833 | + this.data.otherCardtypeData.selected = '外国护照'; |
803 | this.data.otherCardtypeData.isrequre = true | 834 | this.data.otherCardtypeData.isrequre = true |
804 | } | 835 | } |
805 | } | 836 | } |
@@ -815,8 +846,8 @@ Page({ | @@ -815,8 +846,8 @@ Page({ | ||
815 | overseas: this.data.overseas, | 846 | overseas: this.data.overseas, |
816 | taxpayerTypeData: this.data.taxpayerTypeData | 847 | taxpayerTypeData: this.data.taxpayerTypeData |
817 | }) | 848 | }) |
818 | - | ||
819 | - | 849 | + |
850 | + | ||
820 | }, | 851 | }, |
821 | 852 | ||
822 | 853 | ||
@@ -837,10 +868,12 @@ Page({ | @@ -837,10 +868,12 @@ Page({ | ||
837 | var selected = cardtypeData.selected | 868 | var selected = cardtypeData.selected |
838 | if (new_type != selected) { | 869 | if (new_type != selected) { |
839 | this.dealCardType(new_type) | 870 | this.dealCardType(new_type) |
840 | - var setData = { card_number: ''} | 871 | + var setData = { |
872 | + card_number: '' | ||
873 | + } | ||
841 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { | 874 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { |
842 | console.log('外国人', new_type, selected) | 875 | console.log('外国人', new_type, selected) |
843 | - }else { | 876 | + } else { |
844 | setData.other_card_number = '' | 877 | setData.other_card_number = '' |
845 | } | 878 | } |
846 | this.setData(setData) | 879 | this.setData(setData) |
@@ -880,19 +913,19 @@ Page({ | @@ -880,19 +913,19 @@ Page({ | ||
880 | }) | 913 | }) |
881 | } | 914 | } |
882 | break; | 915 | break; |
883 | - // case 'tax_reason': | ||
884 | - // var taxReasonData = this.data.taxReasonData | ||
885 | - // var reason = taxReasonData.values[e.detail.value] | ||
886 | - // if (reason != taxReasonData.selected) { | ||
887 | - // taxReasonData.selected = reason | ||
888 | - // this.setData({ | ||
889 | - // taxReasonData: taxReasonData | ||
890 | - // }) | ||
891 | - // } | ||
892 | - // break; | 916 | + // case 'tax_reason': |
917 | + // var taxReasonData = this.data.taxReasonData | ||
918 | + // var reason = taxReasonData.values[e.detail.value] | ||
919 | + // if (reason != taxReasonData.selected) { | ||
920 | + // taxReasonData.selected = reason | ||
921 | + // this.setData({ | ||
922 | + // taxReasonData: taxReasonData | ||
923 | + // }) | ||
924 | + // } | ||
925 | + // break; | ||
893 | case 'taxpayerType': | 926 | case 'taxpayerType': |
894 | var taxpayerTypeData = this.data.taxpayerTypeData | 927 | var taxpayerTypeData = this.data.taxpayerTypeData |
895 | - taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value] | 928 | + taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value] |
896 | this.setData({ | 929 | this.setData({ |
897 | taxpayerTypeData: taxpayerTypeData | 930 | taxpayerTypeData: taxpayerTypeData |
898 | }) | 931 | }) |
@@ -911,6 +944,13 @@ Page({ | @@ -911,6 +944,13 @@ Page({ | ||
911 | bankInfo: bank_data | 944 | bankInfo: bank_data |
912 | }) | 945 | }) |
913 | break; | 946 | break; |
947 | + case 'bank_province': | ||
948 | + var bankprovince_data = this.data.bankProvinceInfo | ||
949 | + bankprovince_data.selected = bankprovince_data.values[e.detail.value] | ||
950 | + this.setData({ | ||
951 | + bankProvinceInfo: bankprovince_data | ||
952 | + }) | ||
953 | + break; | ||
914 | case 'gender': | 954 | case 'gender': |
915 | var gender_data = this.data.genderData | 955 | var gender_data = this.data.genderData |
916 | gender_data.selected = gender_data.values[e.detail.value] | 956 | gender_data.selected = gender_data.values[e.detail.value] |
@@ -989,7 +1029,7 @@ Page({ | @@ -989,7 +1029,7 @@ Page({ | ||
989 | this.data.firstEntryDate.selected = e.detail.value | 1029 | this.data.firstEntryDate.selected = e.detail.value |
990 | this.data.firstEntryDate.datelong = Date.parse(new Date(e.detail.value)) / 1000 | 1030 | this.data.firstEntryDate.datelong = Date.parse(new Date(e.detail.value)) / 1000 |
991 | this.data.predictLeaveDate.start = e.detail.value | 1031 | this.data.predictLeaveDate.start = e.detail.value |
992 | - if (this.data.firstEntryDate.datelong>this.data.predictLeaveDate.datelong){ | 1032 | + if (this.data.firstEntryDate.datelong > this.data.predictLeaveDate.datelong) { |
993 | this.data.predictLeaveDate.selected = '' | 1033 | this.data.predictLeaveDate.selected = '' |
994 | } | 1034 | } |
995 | this.setData({ | 1035 | this.setData({ |
@@ -1106,7 +1146,7 @@ Page({ | @@ -1106,7 +1146,7 @@ Page({ | ||
1106 | other_name: e.detail.value | 1146 | other_name: e.detail.value |
1107 | }) | 1147 | }) |
1108 | }, | 1148 | }, |
1109 | - idcardblur: function (e) { | 1149 | + idcardblur: function(e) { |
1110 | var idCardNo = e.detail.value | 1150 | var idCardNo = e.detail.value |
1111 | this.setData({ | 1151 | this.setData({ |
1112 | card_number: idCardNo | 1152 | card_number: idCardNo |
@@ -1141,8 +1181,8 @@ Page({ | @@ -1141,8 +1181,8 @@ Page({ | ||
1141 | if (this.data.isIdCard && !format.isIDCardNum(idCardNo)) { | 1181 | if (this.data.isIdCard && !format.isIDCardNum(idCardNo)) { |
1142 | this.showtoast('证照号码有误'); | 1182 | this.showtoast('证照号码有误'); |
1143 | return; | 1183 | return; |
1144 | - } | ||
1145 | - if (this.data.isIdCard){ | 1184 | + } |
1185 | + if (this.data.isIdCard) { | ||
1146 | this.dealIdInfo(idCardNo) | 1186 | this.dealIdInfo(idCardNo) |
1147 | return; | 1187 | return; |
1148 | } | 1188 | } |
@@ -1151,7 +1191,7 @@ Page({ | @@ -1151,7 +1191,7 @@ Page({ | ||
1151 | return | 1191 | return |
1152 | } | 1192 | } |
1153 | } | 1193 | } |
1154 | - if (e.detail.value.length == 9){ | 1194 | + if (e.detail.value.length == 9) { |
1155 | if (this.data.cardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(idCardNo)) { | 1195 | if (this.data.cardtypeData.selected.indexOf('中国护照') > -1 && !reg_9_n_a.test(idCardNo)) { |
1156 | this.showtoast('证照号码有误'); | 1196 | this.showtoast('证照号码有误'); |
1157 | return | 1197 | return |
@@ -1165,7 +1205,7 @@ Page({ | @@ -1165,7 +1205,7 @@ Page({ | ||
1165 | } | 1205 | } |
1166 | }, | 1206 | }, |
1167 | //根据身份证号码,获取相关信息 | 1207 | //根据身份证号码,获取相关信息 |
1168 | - dealIdInfo: function (idCardNum) { | 1208 | + dealIdInfo: function(idCardNum) { |
1169 | var info = format.analyzeIDCard(idCardNum) | 1209 | var info = format.analyzeIDCard(idCardNum) |
1170 | console.log('info', info.age, info.sex) | 1210 | console.log('info', info.age, info.sex) |
1171 | if (info.age) { | 1211 | if (info.age) { |
@@ -1184,14 +1224,14 @@ Page({ | @@ -1184,14 +1224,14 @@ Page({ | ||
1184 | }) | 1224 | }) |
1185 | } | 1225 | } |
1186 | }, | 1226 | }, |
1187 | - personalmoney:function(e){ | 1227 | + personalmoney: function(e) { |
1188 | console.log('personalmoney', e) | 1228 | console.log('personalmoney', e) |
1189 | this.setData({ | 1229 | this.setData({ |
1190 | personal_equity_total: e.detail.value | 1230 | personal_equity_total: e.detail.value |
1191 | }) | 1231 | }) |
1192 | }, | 1232 | }, |
1193 | 1233 | ||
1194 | - companymoney:function(e){ | 1234 | + companymoney: function(e) { |
1195 | console.log('companymoney', e) | 1235 | console.log('companymoney', e) |
1196 | this.setData({ | 1236 | this.setData({ |
1197 | company_equity_total: e.detail.value | 1237 | company_equity_total: e.detail.value |
@@ -1202,8 +1242,8 @@ Page({ | @@ -1202,8 +1242,8 @@ Page({ | ||
1202 | var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$"); | 1242 | var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$"); |
1203 | var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/; | 1243 | var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/; |
1204 | // var regname = /^[\u4E00-\u9FA5A-Za-z·s]{2,20}$/; | 1244 | // var regname = /^[\u4E00-\u9FA5A-Za-z·s]{2,20}$/; |
1205 | - var regname_c = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,30}$/; //中文 | ||
1206 | - var regname_e = /^[A-Za-z][A-Za-z\s]*[A-Za-z]$/; //英文 | 1245 | + var regname_c = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,30}$/; //中文 |
1246 | + var regname_e = /^[A-Za-z][A-Za-z\s]*[A-Za-z]$/; //英文 | ||
1207 | // var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/; | 1247 | // var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/; |
1208 | // var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/; | 1248 | // var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/; |
1209 | var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/ | 1249 | var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/ |
@@ -1212,7 +1252,7 @@ Page({ | @@ -1212,7 +1252,7 @@ Page({ | ||
1212 | if (this.data.cardtypeData.selected.length < 1) { | 1252 | if (this.data.cardtypeData.selected.length < 1) { |
1213 | this.showtoast('请选择证照类型'); | 1253 | this.showtoast('请选择证照类型'); |
1214 | return | 1254 | return |
1215 | - } | 1255 | + } |
1216 | if (this.data.card_number.length < 1) { | 1256 | if (this.data.card_number.length < 1) { |
1217 | this.showtoast('请填写证照号码'); | 1257 | this.showtoast('请填写证照号码'); |
1218 | return | 1258 | return |
@@ -1235,7 +1275,7 @@ Page({ | @@ -1235,7 +1275,7 @@ Page({ | ||
1235 | } else if (this.data.name.length > 0 && !regname_c.test(this.data.name)) { | 1275 | } else if (this.data.name.length > 0 && !regname_c.test(this.data.name)) { |
1236 | // this.showtoast('请输入正确姓名'); | 1276 | // this.showtoast('请输入正确姓名'); |
1237 | // return | 1277 | // return |
1238 | - } | 1278 | + } |
1239 | if (this.data.genderData.selected.length < 1) { | 1279 | if (this.data.genderData.selected.length < 1) { |
1240 | this.showtoast('请选择性别'); | 1280 | this.showtoast('请选择性别'); |
1241 | return | 1281 | return |
@@ -1243,7 +1283,7 @@ Page({ | @@ -1243,7 +1283,7 @@ Page({ | ||
1243 | if (this.data.birthDate.selected.length < 1) { | 1283 | if (this.data.birthDate.selected.length < 1) { |
1244 | this.showtoast('请选择出生日期'); | 1284 | this.showtoast('请选择出生日期'); |
1245 | return | 1285 | return |
1246 | - } | 1286 | + } |
1247 | if (this.data.countryData.selected.length < 1) { | 1287 | if (this.data.countryData.selected.length < 1) { |
1248 | this.showtoast('请选择国籍'); | 1288 | this.showtoast('请选择国籍'); |
1249 | return | 1289 | return |
@@ -1251,11 +1291,11 @@ Page({ | @@ -1251,11 +1291,11 @@ Page({ | ||
1251 | if (this.data.taxpayerTypeData.selected.length < 1) { | 1291 | if (this.data.taxpayerTypeData.selected.length < 1) { |
1252 | this.showtoast('请选择纳税人类型'); | 1292 | this.showtoast('请选择纳税人类型'); |
1253 | return | 1293 | return |
1254 | - } | 1294 | + } |
1255 | if (this.data.hasOtherCard && !this.data.firstEntryDate.selected) { | 1295 | if (this.data.hasOtherCard && !this.data.firstEntryDate.selected) { |
1256 | this.showtoast('请选择首次入境时间'); | 1296 | this.showtoast('请选择首次入境时间'); |
1257 | return | 1297 | return |
1258 | - } | 1298 | + } |
1259 | if (this.data.hasOtherCard && !this.data.predictLeaveDate.selected) { | 1299 | if (this.data.hasOtherCard && !this.data.predictLeaveDate.selected) { |
1260 | this.showtoast('请选择预计离境时间'); | 1300 | this.showtoast('请选择预计离境时间'); |
1261 | return | 1301 | return |
@@ -1270,24 +1310,24 @@ Page({ | @@ -1270,24 +1310,24 @@ Page({ | ||
1270 | if (this.data.hasOtherCard && !otherTypeSel && this.data.otherCardtypeData.isrequre) { | 1310 | if (this.data.hasOtherCard && !otherTypeSel && this.data.otherCardtypeData.isrequre) { |
1271 | this.showtoast('请选择其他证照类型'); | 1311 | this.showtoast('请选择其他证照类型'); |
1272 | return | 1312 | return |
1273 | - } | 1313 | + } |
1274 | if (this.data.hasOtherCard && !otherHasInput && this.data.otherCardtypeData.isrequre) { | 1314 | if (this.data.hasOtherCard && !otherHasInput && this.data.otherCardtypeData.isrequre) { |
1275 | this.showtoast('请输入其他证照号码'); | 1315 | this.showtoast('请输入其他证照号码'); |
1276 | return | 1316 | return |
1277 | } | 1317 | } |
1278 | - if (otherTypeSel.indexOf('居住证') > -1 && otherHasInput && !reg_18_Number.test(formdata.other_card_number)) { | 1318 | + if (otherTypeSel.indexOf('居住证') > -1 && otherHasInput && !reg_18_Number.test(formdata.other_card_number)) { |
1279 | this.showtoast('其他证照号码有误'); | 1319 | this.showtoast('其他证照号码有误'); |
1280 | return | 1320 | return |
1281 | - }else if (otherTypeSel.indexOf('永久居留') > -1 && otherHasInput && !reg_15_n_a.test(formdata.other_card_number)) { | 1321 | + } else if (otherTypeSel.indexOf('永久居留') > -1 && otherHasInput && !reg_15_n_a.test(formdata.other_card_number)) { |
1282 | this.showtoast('其他证照号码有误'); | 1322 | this.showtoast('其他证照号码有误'); |
1283 | return | 1323 | return |
1284 | - } | 1324 | + } |
1285 | if (this.data.hasOtherCard && !this.data.birthCountryData.selected) { | 1325 | if (this.data.hasOtherCard && !this.data.birthCountryData.selected) { |
1286 | this.showtoast('请选择出生国家'); | 1326 | this.showtoast('请选择出生国家'); |
1287 | return | 1327 | return |
1288 | - } | 1328 | + } |
1289 | if (this.data.other_name.length > 0) { | 1329 | if (this.data.other_name.length > 0) { |
1290 | - if (this.data.cardtypeData.selected != '居民身份证' && this.data.cardtypeData.selected != '中国护照'){ | 1330 | + if (this.data.cardtypeData.selected != '居民身份证' && this.data.cardtypeData.selected != '中国护照') { |
1291 | var regname = (this.data.nameText == '中文名') ? regname_c : regname_e | 1331 | var regname = (this.data.nameText == '中文名') ? regname_c : regname_e |
1292 | this.data.other_name = this.data.other_name.replace(/(^\s*)|(\s*$)/g, ""); | 1332 | this.data.other_name = this.data.other_name.replace(/(^\s*)|(\s*$)/g, ""); |
1293 | if (!regname.test(this.data.other_name)) { | 1333 | if (!regname.test(this.data.other_name)) { |
@@ -1295,7 +1335,7 @@ Page({ | @@ -1295,7 +1335,7 @@ Page({ | ||
1295 | return | 1335 | return |
1296 | } | 1336 | } |
1297 | } | 1337 | } |
1298 | - } | 1338 | + } |
1299 | if (this.data.mobile.length < 1) { | 1339 | if (this.data.mobile.length < 1) { |
1300 | this.showtoast('请输入手机号码'); | 1340 | this.showtoast('请输入手机号码'); |
1301 | return | 1341 | return |
@@ -1343,19 +1383,47 @@ Page({ | @@ -1343,19 +1383,47 @@ Page({ | ||
1343 | // this.showtoast('邮箱格式有误'); | 1383 | // this.showtoast('邮箱格式有误'); |
1344 | // return | 1384 | // return |
1345 | // } | 1385 | // } |
1346 | - if (this.data.bankInfo.selected.length > 0 && formdata.bank_account.length < 1) { | ||
1347 | - this.showtoast('请输入银行卡号') | ||
1348 | - return | 1386 | + if (this.data.bankInfo.selected && this.data.bankInfo.selected.length > 0) { |
1387 | + if (!this.data.bankProvinceInfo.selected || this.data.bankProvinceInfo.selected.length < 1) { | ||
1388 | + this.showtoast('请选择开户银行省份') | ||
1389 | + return | ||
1390 | + } | ||
1391 | + if (!formdata.bank_account || formdata.bank_account.length < 1) { | ||
1392 | + this.showtoast('请输入银行账户') | ||
1393 | + return | ||
1394 | + } else if (!format.banknoCheck(formdata.bank_account)) { | ||
1395 | + this.showtoast('银行卡号格式有误') | ||
1396 | + return | ||
1397 | + } | ||
1398 | + } | ||
1399 | + | ||
1400 | + if (this.data.bankProvinceInfo.selected && this.data.bankProvinceInfo.selected.length > 0) { | ||
1401 | + if (!this.data.bankInfo.selected || this.data.bankInfo.selected.length < 1) { | ||
1402 | + this.showtoast('请选择开户银行') | ||
1403 | + return | ||
1404 | + } | ||
1405 | + if (!formdata.bank_account || formdata.bank_account.length < 1) { | ||
1406 | + this.showtoast('请输入银行账户') | ||
1407 | + return | ||
1408 | + } else if (!format.banknoCheck(formdata.bank_account)) { | ||
1409 | + this.showtoast('银行卡号格式有误') | ||
1410 | + return | ||
1411 | + } | ||
1349 | } | 1412 | } |
1413 | + | ||
1350 | if (formdata.bank_account && formdata.bank_account.length > 0) { | 1414 | if (formdata.bank_account && formdata.bank_account.length > 0) { |
1351 | - if (!format.banknoCheck(formdata.bank_account)){ | 1415 | + if (!format.banknoCheck(formdata.bank_account)) { |
1352 | this.showtoast('银行卡号格式有误') | 1416 | this.showtoast('银行卡号格式有误') |
1353 | return | 1417 | return |
1354 | } | 1418 | } |
1355 | - if (!this.data.bankInfo.selected) { | 1419 | + if (!this.data.bankInfo.selected || this.data.bankInfo.selected.length<1) { |
1356 | this.showtoast('请选择开户银行') | 1420 | this.showtoast('请选择开户银行') |
1357 | return | 1421 | return |
1358 | } | 1422 | } |
1423 | + if (!this.data.bankProvinceInfo.selected || this.data.bankProvinceInfo.selected.length<1) { | ||
1424 | + this.showtoast('请选择开户银行省份') | ||
1425 | + return | ||
1426 | + } | ||
1359 | } | 1427 | } |
1360 | this.goCommit(formdata); | 1428 | this.goCommit(formdata); |
1361 | // else if (this.data.personstatusData.selected.length < 1) { | 1429 | // else if (this.data.personstatusData.selected.length < 1) { |
@@ -1384,7 +1452,7 @@ Page({ | @@ -1384,7 +1452,7 @@ Page({ | ||
1384 | // this.showtoast('有必填项未填写'); | 1452 | // this.showtoast('有必填项未填写'); |
1385 | // return | 1453 | // return |
1386 | // } else | 1454 | // } else |
1387 | - | 1455 | + |
1388 | // else if (this.data.company_equity_total && this.data.company_equity_total.length > 0 && !regMoney.test(this.data.company_equity_total)) { | 1456 | // else if (this.data.company_equity_total && this.data.company_equity_total.length > 0 && !regMoney.test(this.data.company_equity_total)) { |
1389 | // this.showtoast('请输入正确金额'); | 1457 | // this.showtoast('请输入正确金额'); |
1390 | // return | 1458 | // return |
@@ -1420,14 +1488,14 @@ Page({ | @@ -1420,14 +1488,14 @@ Page({ | ||
1420 | 'certification_status': that.getCertifyStatus(formdata), | 1488 | 'certification_status': that.getCertifyStatus(formdata), |
1421 | "name": that.data.name, | 1489 | "name": that.data.name, |
1422 | "other_name": that.data.hasOtherCard ? that.data.other_name : '', | 1490 | "other_name": that.data.hasOtherCard ? that.data.other_name : '', |
1423 | - "family_ties": '本人',//that.data.relativeData.selected, | 1491 | + "family_ties": '本人', //that.data.relativeData.selected, |
1424 | "native": that.data.countryData.selected, | 1492 | "native": that.data.countryData.selected, |
1425 | - "taxpayer_type": that.data.taxpayerTypeData.selected == '非居民' ? 'non-resident' :'resident', | 1493 | + "taxpayer_type": that.data.taxpayerTypeData.selected == '非居民' ? 'non-resident' : 'resident', |
1426 | "is_overseas_personnel": that.data.overseas, | 1494 | "is_overseas_personnel": that.data.overseas, |
1427 | 'birth_native': that.data.hasOtherCard ? that.data.birthCountryData.selected : '', | 1495 | 'birth_native': that.data.hasOtherCard ? that.data.birthCountryData.selected : '', |
1428 | "id_card_type": that.data.cardtypeData.selected, //selected_code, | 1496 | "id_card_type": that.data.cardtypeData.selected, //selected_code, |
1429 | "id_card_no": that.data.card_number, | 1497 | "id_card_no": that.data.card_number, |
1430 | - "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code, | 1498 | + "other_id_card_type": that.data.hasOtherCard ? that.data.otherCardtypeData.selected : '', //selected_code, |
1431 | "other_id_card_no": that.data.hasOtherCard ? (formdata.other_card_number ? formdata.other_card_number : '') : '', | 1499 | "other_id_card_no": that.data.hasOtherCard ? (formdata.other_card_number ? formdata.other_card_number : '') : '', |
1432 | "gender": that.data.genderData.selected, | 1500 | "gender": that.data.genderData.selected, |
1433 | "birth_date": that.data.long_birth_date, | 1501 | "birth_date": that.data.long_birth_date, |
@@ -1444,6 +1512,7 @@ Page({ | @@ -1444,6 +1512,7 @@ Page({ | ||
1444 | "profession": request_profession, | 1512 | "profession": request_profession, |
1445 | "education": that.data.degreeData.selected, | 1513 | "education": that.data.degreeData.selected, |
1446 | "bank": that.data.bankInfo.selected, | 1514 | "bank": that.data.bankInfo.selected, |
1515 | + "bank_province": that.data.bankProvinceInfo.selected, | ||
1447 | "bank_account": formdata.bank_account, | 1516 | "bank_account": formdata.bank_account, |
1448 | // "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : that.data.taxInfo.taxpayer_no, | 1517 | // "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : that.data.taxInfo.taxpayer_no, |
1449 | // "taxpayer_status": that.data.personstatusData.selected, | 1518 | // "taxpayer_status": that.data.personstatusData.selected, |
@@ -1453,10 +1522,10 @@ Page({ | @@ -1453,10 +1522,10 @@ Page({ | ||
1453 | "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : formdata.martyr_family_no, | 1522 | "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : formdata.martyr_family_no, |
1454 | "is_lonely_man": that.data.lonelyolderInfo.selected, | 1523 | "is_lonely_man": that.data.lonelyolderInfo.selected, |
1455 | "comment": formdata.comment, | 1524 | "comment": formdata.comment, |
1456 | - | 1525 | + |
1457 | "contact_address": that.data.hasOtherCard ? request_contact_address : {}, | 1526 | "contact_address": that.data.hasOtherCard ? request_contact_address : {}, |
1458 | - "contact_address_detail": that.data.hasOtherCard ? formdata.contact_address_detail: '', | ||
1459 | - | 1527 | + "contact_address_detail": that.data.hasOtherCard ? formdata.contact_address_detail : '', |
1528 | + | ||
1460 | // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date, | 1529 | // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date, |
1461 | // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date, | 1530 | // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date, |
1462 | // "is_employee": that.data.employeeInfo.selected, | 1531 | // "is_employee": that.data.employeeInfo.selected, |
@@ -1475,9 +1544,9 @@ Page({ | @@ -1475,9 +1544,9 @@ Page({ | ||
1475 | console.log(res) | 1544 | console.log(res) |
1476 | if (res.statusCode < 300) { | 1545 | if (res.statusCode < 300) { |
1477 | wx.navigateBack({ | 1546 | wx.navigateBack({ |
1478 | - delta:1 | 1547 | + delta: 1 |
1479 | }) | 1548 | }) |
1480 | - } else if (res.data.code == 400 && res.data.errors.email){ | 1549 | + } else if (res.data.code == 400 && res.data.errors.email) { |
1481 | that.showtoast('邮箱格式有误') | 1550 | that.showtoast('邮箱格式有误') |
1482 | } else { | 1551 | } else { |
1483 | that.showtoast(res.data.message ? res.data.message : '请求出错') | 1552 | that.showtoast(res.data.message ? res.data.message : '请求出错') |
@@ -1560,7 +1629,7 @@ Page({ | @@ -1560,7 +1629,7 @@ Page({ | ||
1560 | wx.showToast({ | 1629 | wx.showToast({ |
1561 | title: str, | 1630 | title: str, |
1562 | duration: 2000, | 1631 | duration: 2000, |
1563 | - icon:'none' | 1632 | + icon: 'none' |
1564 | // image: '/images/error.png' | 1633 | // image: '/images/error.png' |
1565 | }) | 1634 | }) |
1566 | }, | 1635 | }, |
@@ -1573,7 +1642,7 @@ Page({ | @@ -1573,7 +1642,7 @@ Page({ | ||
1573 | var gender = this.data.genderData.selected; | 1642 | var gender = this.data.genderData.selected; |
1574 | var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000; | 1643 | var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000; |
1575 | console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date) | 1644 | console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date) |
1576 | - if ((this.data.has_certify&&name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) { | 1645 | + if ((this.data.has_certify && name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) { |
1577 | return 'active' | 1646 | return 'active' |
1578 | } else { | 1647 | } else { |
1579 | return '' | 1648 | return '' |
@@ -186,6 +186,8 @@ | @@ -186,6 +186,8 @@ | ||
186 | <view class="divide_line_30"></view> | 186 | <view class="divide_line_30"></view> |
187 | <template is="picker_cell_normal" data="{{...bankInfo}}" /> | 187 | <template is="picker_cell_normal" data="{{...bankInfo}}" /> |
188 | <view class="divide_line_30"></view> | 188 | <view class="divide_line_30"></view> |
189 | + <template is="picker_cell_normal" data="{{...bankProvinceInfo}}" /> | ||
190 | + <view class="divide_line_30"></view> | ||
189 | <view class='item_body'> | 191 | <view class='item_body'> |
190 | <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>银行账号</text> | 192 | <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>银行账号</text> |
191 | <input class='input_wrap' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='19' type='number'></input> | 193 | <input class='input_wrap' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='19' type='number'></input> |
utils/province.js
0 → 100644
1 | +var province = [{ | ||
2 | + "name": "北京市", | ||
3 | + "code": "110000", | ||
4 | +}, | ||
5 | +{ | ||
6 | + "name": "天津市", | ||
7 | + "code": "120000", | ||
8 | +}, | ||
9 | +{ | ||
10 | + "name": "河北省", | ||
11 | + "code": "130000", | ||
12 | +}, | ||
13 | +{ | ||
14 | + "name": "山西省", | ||
15 | + "code": "140000", | ||
16 | +}, | ||
17 | +{ | ||
18 | + "name": "内蒙古自治区", | ||
19 | + "code": "150000", | ||
20 | +}, | ||
21 | +{ | ||
22 | + "name": "辽宁省", | ||
23 | + "code": "210000", | ||
24 | +}, | ||
25 | +{ | ||
26 | + "name": "吉林省", | ||
27 | + "code": "220000", | ||
28 | +}, | ||
29 | +{ | ||
30 | + "name": "黑龙江省", | ||
31 | + "code": "230000", | ||
32 | +}, | ||
33 | +{ | ||
34 | + "name": "上海市", | ||
35 | + "code": "310000", | ||
36 | +}, | ||
37 | +{ | ||
38 | + "name": "江苏省", | ||
39 | + "code": "320000", | ||
40 | +}, | ||
41 | +{ | ||
42 | + "name": "浙江省", | ||
43 | + "code": "330000", | ||
44 | +}, | ||
45 | +{ | ||
46 | + "name": "安徽省", | ||
47 | + "code": "340000", | ||
48 | +}, | ||
49 | +{ | ||
50 | + "name": "福建省", | ||
51 | + "code": "350000", | ||
52 | +}, | ||
53 | +{ | ||
54 | + "name": "江西省", | ||
55 | + "code": "360000", | ||
56 | +}, | ||
57 | +{ | ||
58 | + "name": "山东省", | ||
59 | + "code": "370000", | ||
60 | +}, | ||
61 | +{ | ||
62 | + "name": "河南省", | ||
63 | + "code": "410000", | ||
64 | +}, | ||
65 | +{ | ||
66 | + "name": "湖北省", | ||
67 | + "code": "420000", | ||
68 | +}, | ||
69 | +{ | ||
70 | + "name": "湖南省", | ||
71 | + "code": "430000", | ||
72 | +}, | ||
73 | +{ | ||
74 | + "name": "广东省", | ||
75 | + "code": "440000", | ||
76 | +}, | ||
77 | +{ | ||
78 | + "name": "广西壮族自治区", | ||
79 | + "code": "450000", | ||
80 | +}, | ||
81 | +{ | ||
82 | + "name": "海南省", | ||
83 | + "code": "460000", | ||
84 | +}, | ||
85 | +{ | ||
86 | + "name": "重庆市", | ||
87 | + "code": "500000", | ||
88 | +}, | ||
89 | +{ | ||
90 | + "name": "四川省", | ||
91 | + "code": "510000", | ||
92 | +}, | ||
93 | +{ | ||
94 | + "name": "贵州省", | ||
95 | + "code": "520000", | ||
96 | +}, | ||
97 | +{ | ||
98 | + "name": "云南省", | ||
99 | + "code": "530000", | ||
100 | +}, | ||
101 | +{ | ||
102 | + "name": "西藏自治区", | ||
103 | + "code": "540000", | ||
104 | +}, | ||
105 | +{ | ||
106 | + "name": "陕西省", | ||
107 | + "code": "610000", | ||
108 | +}, | ||
109 | +{ | ||
110 | + "name": "甘肃省", | ||
111 | + "code": "620000", | ||
112 | +}, | ||
113 | +{ | ||
114 | + "name": "青海省", | ||
115 | + "code": "630000", | ||
116 | +}, | ||
117 | +{ | ||
118 | + "name": "宁夏回族自治区", | ||
119 | + "code": "640000", | ||
120 | +}, | ||
121 | +{ | ||
122 | + "name": "新疆维吾尔自治区", | ||
123 | + "code": "650000", | ||
124 | +}, | ||
125 | +{ | ||
126 | + "name": "台湾省", | ||
127 | + "code": "710000" | ||
128 | +}, | ||
129 | +{ | ||
130 | + "name": "香港特别行政区", | ||
131 | + "code": "810000" | ||
132 | +}, | ||
133 | +{ | ||
134 | + "name": "澳门特别行政区", | ||
135 | + "code": "820000" | ||
136 | +}] | ||
137 | + | ||
138 | +function init(that) { | ||
139 | + that.setData({ | ||
140 | + 'province': province | ||
141 | + }); | ||
142 | +} | ||
143 | + | ||
144 | +module.exports = { | ||
145 | + init: init | ||
146 | +} |
@@ -59,6 +59,16 @@ function dayFormString(dateStr) { | @@ -59,6 +59,16 @@ 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 | + | ||
66 | +// 两个日期间隔天数 | ||
67 | +function daysTillNow(startDate, endDate){ | ||
68 | + var days = (endDate - startDate) / (24 * 60 * 60 ); | ||
69 | + return Math.ceil(days); | ||
70 | +} | ||
71 | + | ||
62 | //获取当前时间,格式YYYY-MM-DD | 72 | //获取当前时间,格式YYYY-MM-DD |
63 | function curDateTime() { | 73 | function curDateTime() { |
64 | var d = new Date(); | 74 | var d = new Date(); |
@@ -252,5 +262,7 @@ module.exports = { | @@ -252,5 +262,7 @@ module.exports = { | ||
252 | isMobile: isMobile, | 262 | isMobile: isMobile, |
253 | getAge: getAge, | 263 | getAge: getAge, |
254 | banknoCheck: banknoCheck, | 264 | banknoCheck: banknoCheck, |
255 | - checkEmail: checkEmail | 265 | + checkEmail: checkEmail, |
266 | + daysTillNow: daysTillNow, | ||
267 | + getDateString: getDateString | ||
256 | } | 268 | } |
请
注册
或
登录
后发表评论