home.js
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// pages/main/finalpay/home.js
var app = getApp();
var baseUrl = app.globalData.baseUrl;
Page({
data: {
declare_status: "",//申报状态
refund_status: "",//退税状态
pay_status: "",//补税状态
payinfo:{},
unitInfo: [{
"declaring_unit": "申报单位",
"declaring_unit_id": "申报单位id",
},
{
"declaring_unit": "申报单位",
"declaring_unit_id": "申报单位id",
}],
showUnit:false,
},
onLoad: function(options) {
this.getPayInfo();
},
onReady: function() {
},
onShow: function() {
},
yearPick: function() {
},
getPayInfo:function(){
var that = this
this.Authorization = getApp().globalData.Authorization;
wx.request({
url: baseUrl + "payroll/v1/settlement-tax/declare-detail",
header: {
'Authorization': this.Authorization
},
data: { 'years': '2019' },
success: function (result) {
console.log("payinfo",result)
if (result.statusCode==200) {
that.setData({
payinfo: result.data
})
}
},
})
},
getUnitInfo:function(){//获取申报单位
var that = this
this.Authorization = getApp().globalData.Authorization;
that.setData({
showUnit: true
})
wx.request({
url: baseUrl + "payroll/v1/settlement-tax/declaring-unit",
header: {
'Authorization': this.Authorization
},
data: { },
success: function (result) {
console.log("unitInfo", result)
if (result.statusCode == 200) {
that.setData({
unitInfo: result.data
})
}
},
complete:function(e){
that.setData({
showUnit:true
})
}
})
},
// 跳转到H5页面测试
skipH5_01: function() {
wx.navigateTo({
url: '../../common/webview?type=1',
})
},
skipH5_02: function() {
wx.navigateTo({
url: '../../common/webview?type=2',
})
},
finalpay_detail: function() {
wx.navigateTo({
url: 'incomeDetail/incomeDetail',
})
},
declareHere: function() {
this.getUnitInfo()
},
declareNotHere: function() {
wx.showModal({
title: '',
content: '确认不在本单位进行汇算清缴申报吗?',
confirmColor: '#357aeb',
success(res) {
if (res.confirm) {
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
onHide: function() {
},
onUnload: function() {
},
onPullDownRefresh: function() {
},
onReachBottom: function() {
},
onShareAppMessage: function() {
}
})