提交 e7d55c0143843c6f1770159a88f907fd92d75b76

作者 wangyu
1 个父辈 d36d748e

申请退税 逻辑优化

@@ -17,7 +17,6 @@ Page({ @@ -17,7 +17,6 @@ Page({
17 bank: '', 17 bank: '',
18 bank_card_no: '', 18 bank_card_no: '',
19 bank_province: '', 19 bank_province: '',
20 - refundInfo:{},  
21 show_modal: false 20 show_modal: false
22 }, 21 },
23 22
@@ -29,6 +28,7 @@ Page({ @@ -29,6 +28,7 @@ Page({
29 var userinfo = app.globalData.userInfo 28 var userinfo = app.globalData.userInfo
30 console.log("userinfo", userinfo) 29 console.log("userinfo", userinfo)
31 this.getRefundDetail() 30 this.getRefundDetail()
  31 + this.getbanklist()
32 this.loadProvince() 32 this.loadProvince()
33 this.setData({ 33 this.setData({
34 name: userinfo ? userinfo.name : "" 34 name: userinfo ? userinfo.name : ""
@@ -48,9 +48,8 @@ Page({ @@ -48,9 +48,8 @@ Page({
48 success: function (res) { 48 success: function (res) {
49 console.log(res) 49 console.log(res)
50 that.setData({ 50 that.setData({
51 - bankList: res.data.items, 51 + bankList: res.data.banks,
52 }) 52 })
53 - console.log("bankInfo", that.data.bankList)  
54 }, 53 },
55 fail(res) { 54 fail(res) {
56 console.log(res) 55 console.log(res)
@@ -78,7 +77,7 @@ Page({ @@ -78,7 +77,7 @@ Page({
78 that.setData({ 77 that.setData({
79 bank: result.data.item.bank, 78 bank: result.data.item.bank,
80 bank_card_no: result.data.item.bank_card_no, 79 bank_card_no: result.data.item.bank_card_no,
81 - refundInfo: result.data.item 80 + bank_province: result.data.item.bank_province
82 }) 81 })
83 } 82 }
84 }, 83 },
@@ -93,7 +92,6 @@ Page({ @@ -93,7 +92,6 @@ Page({
93 for (var i = 0; i < provincelist.length; i++) { 92 for (var i = 0; i < provincelist.length; i++) {
94 province_data.push(provincelist[i].name) 93 province_data.push(provincelist[i].name)
95 } 94 }
96 - console.log("provincedata", province_data)  
97 this.setData({ 95 this.setData({
98 province: province_data, 96 province: province_data,
99 }) 97 })
@@ -213,6 +211,13 @@ Page({ @@ -213,6 +211,13 @@ Page({
213 }) 211 })
214 }, 212 },
215 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 +
216 formSubmit: function(e) { 221 formSubmit: function(e) {
217 var formdata = e.detail.value 222 var formdata = e.detail.value
218 console.log("formdata", formdata); 223 console.log("formdata", formdata);
@@ -228,7 +233,7 @@ Page({ @@ -228,7 +233,7 @@ Page({
228 this.showToast('银行卡号格式有误') 233 this.showToast('银行卡号格式有误')
229 return 234 return
230 } 235 }
231 - if (formdata.bank.length < 1) { 236 + if (this.data.bank.length < 1) {
232 this.showToast("请输入银行名称") 237 this.showToast("请输入银行名称")
233 return 238 return
234 } 239 }
@@ -237,7 +242,6 @@ Page({ @@ -237,7 +242,6 @@ Page({
237 return 242 return
238 } 243 }
239 this.setData({ 244 this.setData({
240 - bank:formdata.bank,  
241 bank_card_no: formdata.bank_card_no, 245 bank_card_no: formdata.bank_card_no,
242 show_modal: true 246 show_modal: true
243 }) 247 })
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <text class="text_gray7_34" style="line-height:104rpx">开户银行名称</text> 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> 17 <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='bank' value="{{bank}}"></input>
18 </view> --> 18 </view> -->
19 - <picker style="height:104rpx;padding-left:30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{bankList}}" > 19 + <picker style="height:104rpx;padding-left:30rpx;background-color:#fff" mode="selector" bindchange="bindbankChange" range="{{bankList}}" >
20 <text class="text_gray7_34">开户银行名称</text> 20 <text class="text_gray7_34">开户银行名称</text>
21 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 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"> 22 <view wx:if="{{bank.length>0}}" class="input_wrap rigion_choosed">
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 .input_wrap { 29 .input_wrap {
30 max-width: 600rpx; 30 max-width: 600rpx;
31 height: 104rpx; 31 height: 104rpx;
32 - font-size: 34rpx; 32 + font-size: 32rpx;
33 color: #fff; 33 color: #fff;
34 text-align: right; 34 text-align: right;
35 overflow: hidden; 35 overflow: hidden;
注册登录 后发表评论