提交 8c4802cd0dab288ebddcbc2e1860f75efa329572

作者 wangyu
1 个父辈 f2c90ea0

逻辑添加和页面添加

... ... @@ -6,9 +6,9 @@ Page({
6 6
7 7 data: {
8 8 declare_status: "",//申报状态"0" //待申报 "1" //申报成功
9   - refund_status: "",//退税状态
10   - pay_status: "",//补税状态
11   - declaring_unit_status: "4",//1:本单位申报,2:本单位其他申报,3:其他单位申报,4:待确认申报
  9 + refund_status: "",//退税状态 "0" 无需退税; "1" 待退税;"2" 退税中;"3" 退税成功;"4"退税失败;"5"放弃退税
  10 + pay_status: "",//补税状态 "0" 无需补税; "1" 待补税;"2" 补税成功
  11 + declaring_unit_status: "4",//1:本单位申报,2:本单位其他申报,3:其他单位申报,4:待确认申报//用户自行申报
12 12 payinfo:{},
13 13 unitInfo: [],
14 14 showUnit:false,
... ... @@ -231,6 +231,16 @@ Page({
231 231 })
232 232 },
233 233
  234 +// 申请退税
  235 + doRefund:function(){
  236 +
  237 + },
  238 +
  239 +// 放弃退税
  240 + doNotRefund:function(){
  241 +
  242 + },
  243 +
234 244 onHide: function() {
235 245
236 246 },
... ...
... ... @@ -103,6 +103,20 @@
103 103 </view>
104 104 </view>
105 105
  106 + <view wx:if="{{refund_status=='1'}}" style="width:100%;height:300rpx;position: fixed;bottom: 0;">
  107 + <view style="display: flex;justify-content: center;">
  108 + <text class="text_gray6_28">距离确认是否在本单位进行汇算清缴时间还有 </text>
  109 + <text class="text_yellow_28"> 28 </text>
  110 + <text class="text_gray6_28">天</text>
  111 + </view>
  112 + <view bindtap="doRefund" class="btn_blue_radius" style="margin:20rpx 30rpx ">
  113 + <view class="text_white_34">申请退税</view>
  114 + </view>
  115 + <view bindtap="doNotRefund" class="btn_white_radius" style="margin:0rpx 30rpx ">
  116 + <view class="text_blue_34">放弃退税</view>
  117 + </view>
  118 + </view>
  119 +
106 120 <view class="mask" wx:if="{{showModal_selfDeclare}}"></view>
107 121 <view class='modal_lg' style='' wx:if="{{showModal_selfDeclare}}">
108 122 <text class='text_black_bold'>个人如何自行完成汇算清缴申报?</text>
... ...
1 1 // pages/main/finalpay/refundInfo/refundInfo.js
  2 +var app = getApp();
  3 +var baseUrl = app.globalData.baseUrl;
2 4 Page({
3 5
4 6 /**
... ... @@ -11,56 +13,148 @@ Page({
11 13 /**
12 14 * Lifecycle function--Called when page load
13 15 */
14   - onLoad: function (options) {
15   -
  16 + onLoad: function(options) {
  17 + this.initOSS()
16 18 },
17 19
18 20 /**
19 21 * Lifecycle function--Called when page is initially rendered
20 22 */
21   - onReady: function () {
  23 + onReady: function() {
  24 +
  25 + },
22 26
  27 + initOSS: function() {
  28 + var that = this
  29 + var Authorization = getApp().globalData.Authorization;
  30 + //OSS 上传前init
  31 + wx.showLoading()
  32 + wx.request({
  33 + url: baseUrl + "filemeta/v1/inits",
  34 + header: {
  35 + 'Authorization': Authorization
  36 + },
  37 + method: 'POST',
  38 + data: {
  39 + "access_type": "web_upload",
  40 + "action ": "put_object",
  41 + "instance_id": "",
  42 + "object_type": "wx_image"
  43 + },
  44 + success: function(result) {
  45 +
  46 + OSSInit = result.data
  47 + console.log(' OSS init 成功', OSSInit)
  48 + },
  49 + fail: function(res) {
  50 + console.log('OSS init 失败', res)
  51 + },
  52 + complete: function() {
  53 + wx.hideLoading()
  54 + }
  55 + })
23 56 },
24 57
25 58 /**
26 59 * Lifecycle function--Called when page show
27 60 */
28   - onShow: function () {
  61 + onShow: function() {
  62 +
  63 + },
  64 +
  65 + bindbank: function() {
  66 + var that = this
  67 + wx.chooseImage({
  68 + sourceType: ['camera', 'album'],
  69 + // sizeType: ['original'],
  70 + count: 1,
  71 + success: function(res) {
  72 + console.log('success', res)
  73 + that.ocrBankImage(res.tempFilePaths[0])
  74 + }
  75 + })
  76 + },
  77 +
  78 + // 识别银行卡照片
  79 + ocrBankImage: function(path) {
  80 + var that = this
  81 + this.Authorization = getApp().globalData.Authorization;
  82 + wx.request({
  83 + url: baseUrl + "common/v1/ocr/bankcards",
  84 + method: "POST",
  85 + header: {
  86 + 'Authorization': this.Authorization
  87 + },
  88 + data: {
  89 + "image": path
  90 + },
  91 + success: function(result) {
  92 + console.log("payinfo", result)
  93 + if (result.statusCode == 200) {
  94 +
  95 + }
  96 + },
  97 + })
  98 + },
29 99
  100 + formSubmit: function() {
  101 + // 是否放弃退税,(是:"5",否:"")
  102 + var that = this
  103 + this.Authorization = getApp().globalData.Authorization;
  104 + wx.request({
  105 + url: baseUrl + "payroll/v1/settlement-tax/record",
  106 + header: {
  107 + 'Authorization': this.Authorization
  108 + },
  109 + data: {
  110 + 'name': '',
  111 + "bank": '',
  112 + "bank_card_no": '',
  113 + "bank_card_province": ''
  114 + },
  115 + success: function(result) {
  116 + console.log("submit", result)
  117 + if (result.statusCode == 200) {
  118 + that.setData({
  119 +
  120 + })
  121 + }
  122 + },
  123 + })
30 124 },
31 125
32 126 /**
33 127 * Lifecycle function--Called when page hide
34 128 */
35   - onHide: function () {
  129 + onHide: function() {
36 130
37 131 },
38 132
39 133 /**
40 134 * Lifecycle function--Called when page unload
41 135 */
42   - onUnload: function () {
  136 + onUnload: function() {
43 137
44 138 },
45 139
46 140 /**
47 141 * Page event handler function--Called when user drop down
48 142 */
49   - onPullDownRefresh: function () {
  143 + onPullDownRefresh: function() {
50 144
51 145 },
52 146
53 147 /**
54 148 * Called when page reach bottom
55 149 */
56   - onReachBottom: function () {
  150 + onReachBottom: function() {
57 151
58 152 },
59 153
60 154 /**
61 155 * Called when user click on the top right corner to share
62 156 */
63   - onShareAppMessage: function () {
  157 + onShareAppMessage: function() {
64 158
65 159 }
66 160 })
\ No newline at end of file
... ...
1 1 <!--pages/main/finalpay/refundInfo/refundInfo.wxml-->
2 2 <view class="page">
3   - <form style="width:100%;">
  3 + <form style="width:100%;" bindsubmit='formSubmit'>
4 4 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
5 5 <text class="text_gray7_34">开户人姓名</text>
6 6 <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='' value="汪闲僧"></input>
... ... @@ -8,6 +8,7 @@
8 8 <view class='divide_line_30'></view>
9 9 <view style="height:104rpx;padding:0 30rpx;background-color:#fff">
10 10 <text class="text_gray7_34" style="line-height:104rpx">银行卡号</text>
  11 + <image class='image_camera' src='/images/camera.png' bindtap='bindbank'></image>
11 12 <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name=''></input>
12 13 </view>
13 14 <view class='divide_line_30'></view>
... ...
... ... @@ -30,4 +30,12 @@
30 30 text-overflow: ellipsis;
31 31 white-space: nowrap;
32 32 float: right
  33 +}
  34 +
  35 +.image_camera {
  36 + width: 42rpx;
  37 + height: 42rpx;
  38 + margin-left: 10rpx;
  39 + margin-top: 30rpx;
  40 + float: right;
33 41 }
\ No newline at end of file
... ...
注册登录 后发表评论