Commit 717fae2a authored by 李智书's avatar 李智书

1.提交更新;

parent a681e933
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
}, { }, {
"path": "pages/IcbcModule/Reflect/Reflect", "path": "pages/IcbcModule/Reflect/Reflect",
"style": { "style": {
"navigationStyle": "custom",
"navigationBarTitleText": "提现", "navigationBarTitleText": "提现",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
......
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
<!-- 支付方式 --> <!-- 支付方式 -->
<view class="payType" @click="queryBindCardList"> <view class="payType" @click="queryBindCardList">
<view>付款方式</view> <view>付款方式</view>
<view>招商银行(5947) <span class="arrow"></span></view> <view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
class="arrow"></span></view>
</view> </view>
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> --> <!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 --> <!-- 充值生活费 -->
...@@ -117,7 +118,7 @@ ...@@ -117,7 +118,7 @@
充值金额:{{Money}} 充值金额:{{Money}}
</view> </view>
<view class=""> <view class="">
付款账户:浦发银行(6926) 付款账户:{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}})
</view> </view>
</view> </view>
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view> <view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
...@@ -133,12 +134,31 @@ ...@@ -133,12 +134,31 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 选择银行卡 -->
<view class="selectCard">
<van-popup v-model="popshow" round position="bottom" :style="{ height: '30%' }">
<!-- 银行卡列表 -->
<view class="accountlist">
<!-- 切换绑定的一类卡列表 -->
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view class="ListItem" @click="ChangeCardPay('bankName','bindCardNo')"
v-for="(item,index) in bindcardList" :key="index">
<span>{{item.bankName}}</span>
<span>{{item.bindCardNo}}</span>
<image class='BankListImg' src='../../../static/img/choiceBank.png'></image>
</view>
</view>
</view>
</van-popup>
</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
Dialog Dialog,
Toast
} from 'vant'; } from 'vant';
import keyboardPackage from "@/components/keyboard-package/keyboard-package.vue" import keyboardPackage from "@/components/keyboard-package/keyboard-package.vue"
import cityData from "@/common/js/city.js" import cityData from "@/common/js/city.js"
...@@ -192,6 +212,7 @@ ...@@ -192,6 +212,7 @@
name: "Recharge", name: "Recharge",
data() { data() {
return { return {
popshow: false,
// 输入其它金额 // 输入其它金额
isOtherMoney: false, isOtherMoney: false,
inputOtherM: '', inputOtherM: '',
...@@ -223,7 +244,9 @@ ...@@ -223,7 +244,9 @@
}), }),
numberList: [], numberList: [],
tempFiles1: '../../static/img/idCardBg1.png', //上传身份证临时选择文件 tempFiles1: '../../static/img/idCardBg1.png', //上传身份证临时选择文件
tempFiles2: '../../static/img/idCardBg0.png' tempFiles2: '../../static/img/idCardBg0.png',
//绑定的一类卡列表
bindcardList: []
} }
}, },
onLoad: function(options) { onLoad: function(options) {
...@@ -321,6 +344,10 @@ ...@@ -321,6 +344,10 @@
}, },
// 充值 // 充值
async ExchangeRecharge() { async ExchangeRecharge() {
Toast({
message: '自定义图片',
icon: 'https://img.yzcdn.cn/vant/logo.png',
});
let amount, let amount,
bindMedium, bindMedium,
summary; summary;
...@@ -344,7 +371,12 @@ ...@@ -344,7 +371,12 @@
amount = this.Money * 1 amount = this.Money * 1
} }
let this_ = this; let this_ = this;
let loading = weui.loading('请稍后'); let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({ $.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/recharge', url: gHost + '/bank-wechat/icbc/account/exchange/recharge',
type: "POST", type: "POST",
...@@ -355,29 +387,35 @@ ...@@ -355,29 +387,35 @@
sessionid: sessionID, sessionid: sessionID,
wechattype: 1, wechattype: 1,
amount: amount, amount: amount,
bindMedium: "6217002920110643831", bindMedium: this.bankInfo_.bindCardNo,
summary: "充值", summary: "充值",
}, },
headers: { headers: {
'sessionid': sessionID, 'sessionid': sessionID,
}, },
success: function(res5) { success: function(res5) {
loading.hide(); loading.clear();
if (res5.code == "10000") { if (res5.code == "10000") {
this_.close();
this_.ExchangeRechargeQuery(res5.results.flowId, res5.results.corpSerno); this_.ExchangeRechargeQuery(res5.results.flowId, res5.results.corpSerno);
} else { } else {
weui.topTips(res5.message) weui.topTips(res5.message)
} }
}, },
error: function(err) { error: function(err) {
loading.hide(); loading.clear();
}, },
}); });
}, },
// 充值结果查询 // 充值结果查询
async ExchangeRechargeQuery(flowId, oriCorpSerno) { async ExchangeRechargeQuery(flowId, oriCorpSerno) {
let this_ = this; let this_ = this;
let loading = weui.loading('请稍后'); let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({ $.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/rechargeQuery', url: gHost + '/bank-wechat/icbc/account/exchange/rechargeQuery',
type: "POST", type: "POST",
...@@ -394,12 +432,13 @@ ...@@ -394,12 +432,13 @@
'sessionid': sessionID, 'sessionid': sessionID,
}, },
success: function(res5) { success: function(res5) {
loading.hide(); loading.clear();
if (res5.code == "10000") { if (res5.code == "10000") {
uni.showModal({ uni.showModal({
title: "系统提示", title: "系统提示",
content: "充值成功!" content: "充值成功!"
}) })
this_.queryBankInfo();
} else { } else {
weui.topTips(res5.message) weui.topTips(res5.message)
uni.showModal({ uni.showModal({
...@@ -409,7 +448,7 @@ ...@@ -409,7 +448,7 @@
} }
}, },
error: function(err) { error: function(err) {
loading.hide(); loading.clear();
}, },
}); });
}, },
...@@ -447,11 +486,13 @@ ...@@ -447,11 +486,13 @@
}, },
//按钮操作 //按钮操作
HideHTML(dom, type) { HideHTML(dom, type) {
this.$nextTick(function() {
if (type == 0) { if (type == 0) {
$('.' + dom).css('display', 'none'); $('.' + dom).css('display', 'none');
} else { } else {
$('.' + dom).css('display', 'block'); $('.' + dom).css('display', 'block');
} }
})
}, },
//返回小程序 跳转指定页面 //返回小程序 跳转指定页面
BackToMini(page) { BackToMini(page) {
...@@ -487,7 +528,6 @@ ...@@ -487,7 +528,6 @@
success: function(res5) { success: function(res5) {
loading.hide(); loading.hide();
if (res5.code == "10000") { if (res5.code == "10000") {
this_.HideHTML('showBindCardList', 0);
this_.queryUserBankInfo(); this_.queryUserBankInfo();
} else { } else {
weui.topTips(res5.message) weui.topTips(res5.message)
...@@ -515,21 +555,8 @@ ...@@ -515,21 +555,8 @@
success: function(res4) { success: function(res4) {
loading.hide(); loading.hide();
if (res4.code == "10000") { if (res4.code == "10000") {
var divList = ''; this_.bindcardList = res4.results.accountList[0].bindcardList
var choiceIndex = 0; this_.popshow = true
for (let i = 0; i < res4.results.accountList[0].bindcardList.length; i++) {
divList += `<div onclick=ChangeCardPay('${res4.results.accountList[0].bindcardList[i].bankName}','${res4.results.accountList[0].bindcardList[i].bindCardNo}')>
<p>${res4.results.accountList[0].bindcardList[i].bankName}</p>
<p>${res4.results.accountList[0].bindcardList[i].bindCardNo.substr(0,4)+" **** **** "+res4.results.accountList[0].bindcardList[i].bindCardNo.substr(-4)}</p>
<img class='myImg${i} BankListImg' src='img/choiceBank.png'>
</div>`
if (res4.results.accountList[0].bindcardList[i].bindCardNo == payCardNumber) {
choiceIndex = i;
}
}
$('.hideListCover').html(divList);
$(`.myImg${choiceIndex}`).css('display', 'block');
$('.showBindCardList').css('display', 'block');
} else { } else {
weui.topTips(res4.message) weui.topTips(res4.message)
} }
...@@ -544,26 +571,29 @@ ...@@ -544,26 +571,29 @@
let this_ = this; let this_ = this;
let loading = weui.loading('请稍后'); let loading = weui.loading('请稍后');
$.ajax({ $.ajax({
url: gHost + '/bank-wechat/query/balance', url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
type: "POST", type: "POST",
timeout: 8000, timeout: 8000,
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
data: bankInfo, data: {
mediumId: bankInfo.accountNo || '',
schoolId: bankInfo.schoolId || '',
userId: bankInfo.userId || '',
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) { success: function(res3) {
loading.hide(); loading.hide();
if (res3.code == "10000") { if (res3.code == "10000") {
if (res3.results.acctInfoList == null) { if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败"); weui.topTips("账户信息为空,余额查询失败");
} else { } else {
this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0] this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(2);
.balance *
1).toFixed(2));
$('.TxClsTx').attr('placeholder', $('.TxClsTx').attr('placeholder',
`可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元` `可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
) )
this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0] this_.RechargeMax = ((2000 - ((res3.results.accountBalance * 1).toFixed(2) *
.hqBalanceDTOList[0] 1)).toFixed(2));
.balance * 1).toFixed(2) * 1)).toFixed(2));
} }
} else { } else {
weui.topTips(res3.message) weui.topTips(res3.message)
...@@ -616,7 +646,12 @@ ...@@ -616,7 +646,12 @@
//查询用户信息 //查询用户信息
QueryUserInfo() { QueryUserInfo() {
let this_ = this; let this_ = this;
let loading = weui.loading('请稍后'); let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({ $.ajax({
url: gHost + '/wechat/svweapp/QueryPersonalInfo', url: gHost + '/wechat/svweapp/QueryPersonalInfo',
type: "POST", type: "POST",
...@@ -627,7 +662,7 @@ ...@@ -627,7 +662,7 @@
wechattype: 1 wechattype: 1
}, },
success: function(res1) { success: function(res1) {
loading.hide(); loading.clear();
if (res1.code == "10000") { if (res1.code == "10000") {
bankInfo.schoolId = res1.results.schoolid; bankInfo.schoolId = res1.results.schoolid;
bankInfo.userId = res1.results.id; bankInfo.userId = res1.results.id;
...@@ -648,7 +683,7 @@ ...@@ -648,7 +683,7 @@
} }
}, },
error: function(err) { error: function(err) {
loading.hide(); loading.clear();
}, },
}); });
}, },
...@@ -1010,13 +1045,14 @@ ...@@ -1010,13 +1045,14 @@
width: 383rpx; width: 383rpx;
height: 159rpx; height: 159rpx;
margin: 0 auto; margin: 0 auto;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #010101; color: #010101;
line-height: 60rpx;
view {
line-height: 75rpx;
}
} }
.BtngGoup { .BtngGoup {
...@@ -1291,4 +1327,29 @@ ...@@ -1291,4 +1327,29 @@
position: relative; position: relative;
top: -29px; top: -29px;
} }
.BgCoverBox {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 10;
background: #000000;
opacity: 0.5;
}
.hideListCover {
max-height: 50vh;
overflow-y: auto;
padding: 0;
}
.bottomDiv {
font-weight: bold;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #e6e6e6;
}
</style> </style>
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
:placeholder="placeholder" placeholder-class="placeholderinputOtherM" type="text" maxlength="6" /> :placeholder="placeholder" placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
<span class="ALL" @click="TxAllFun">全部</span> <span class="ALL" @click="TxAllFun">全部</span>
</view> </view>
<!-- 提现账户 -->
<view class="payType" @click="queryBindCardList">
<view>提现账户</view>
<view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
class="arrow"></span></view>
</view>
<view class="OtherMoney" v-if="false" style="color: #BFBFBF;font-weight: 500;"> <view class="OtherMoney" v-if="false" style="color: #BFBFBF;font-weight: 500;">
每日仅可提现一次,请明日再来。 每日仅可提现一次,请明日再来。
</view> </view>
...@@ -66,7 +72,10 @@ ...@@ -66,7 +72,10 @@
ImgUrl: this.$ImgUrl, ImgUrl: this.$ImgUrl,
ReflectMoney: 3, ReflectMoney: 3,
cardBalanceTx: '', cardBalanceTx: '',
placeholder: "可提现金额3.00元" placeholder: "可提现金额0.00元",
bankInfo_: {
accountNo: '**** **** **** 1234'
},
} }
}, },
onLoad: function(options) { onLoad: function(options) {
...@@ -97,7 +106,35 @@ ...@@ -97,7 +106,35 @@
} }
}) })
}, },
// //查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/account',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
this_.bindcardList = res4.results.accountList[0].bindcardList
this_.popshow = true
} else {
weui.topTips(res4.message)
}
},
error: function(err) {
loading.hide();
},
});
},
// 提现
async toDeposit() { async toDeposit() {
if (!this.inputOtherM) { if (!this.inputOtherM) {
uni.showModal({ uni.showModal({
...@@ -114,7 +151,6 @@ ...@@ -114,7 +151,6 @@
weui.topTips(`提现金额不可大于账户余额`); weui.topTips(`提现金额不可大于账户余额`);
return return
} }
await this.ExchangeWithdraw() await this.ExchangeWithdraw()
}, },
// 提现 // 提现
...@@ -130,8 +166,8 @@ ...@@ -130,8 +166,8 @@
userId: userID, userId: userID,
sessionid: sessionID, sessionid: sessionID,
wechattype: 1, wechattype: 1,
amount: this.inputOtherM * 1, amount: this_.inputOtherM * 1,
bindMedium: "6217002920110643831", bindMedium: this_.bankInfo_.bindCardNo,
summary: "提现", summary: "提现",
}, },
headers: { headers: {
...@@ -176,6 +212,7 @@ ...@@ -176,6 +212,7 @@
title: "系统提示", title: "系统提示",
content: "提现成功!" content: "提现成功!"
}) })
uni.navigateBack({})
} else { } else {
weui.topTips(res5.message) weui.topTips(res5.message)
uni.showModal({ uni.showModal({
...@@ -299,71 +336,36 @@ ...@@ -299,71 +336,36 @@
}, },
}); });
}, },
//查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/account',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
var divList = '';
var choiceIndex = 0;
for (let i = 0; i < res4.results.accountList[0].bindcardList.length; i++) {
divList += `<div onclick=ChangeCardPay('${res4.results.accountList[0].bindcardList[i].bankName}','${res4.results.accountList[0].bindcardList[i].bindCardNo}')>
<p>${res4.results.accountList[0].bindcardList[i].bankName}</p>
<p>${res4.results.accountList[0].bindcardList[i].bindCardNo.substr(0,4)+" **** **** "+res4.results.accountList[0].bindcardList[i].bindCardNo.substr(-4)}</p>
<img class='myImg${i} BankListImg' src='img/choiceBank.png'>
</div>`
if (res4.results.accountList[0].bindcardList[i].bindCardNo == payCardNumber) {
choiceIndex = i;
}
}
$('.hideListCover').html(divList);
$(`.myImg${choiceIndex}`).css('display', 'block');
$('.showBindCardList').css('display', 'block');
} else {
weui.topTips(res4.message)
}
},
error: function(err) {
loading.hide();
},
});
},
//获取银行余额 //获取银行余额
queryBankInfo() { queryBankInfo() {
let this_ = this; let this_ = this;
let loading = weui.loading('请稍后'); let loading = weui.loading('请稍后');
$.ajax({ $.ajax({
url: gHost + '/bank-wechat/query/balance', url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
type: "POST", type: "POST",
timeout: 8000, timeout: 8000,
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
data: bankInfo, data: {
mediumId: bankInfo.accountNo || '',
schoolId: bankInfo.schoolId || '',
userId: bankInfo.userId || '',
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) { success: function(res3) {
loading.hide(); loading.hide();
if (res3.code == "10000") { if (res3.code == "10000") {
if (res3.results.acctInfoList == null) { if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败"); weui.topTips("账户信息为空,余额查询失败");
} else { } else {
this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0] this_.ReflectMoney = res3.results.accountBalance * 1
.balance * this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(2);
1).toFixed(2)); $('.TxClsTx').attr('placeholder',
this_.placeholder = `可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
`可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元` )
this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0] this_.RechargeMax = ((2000 - ((res3.results.accountBalance * 1).toFixed(2) *
.hqBalanceDTOList[0] 1)).toFixed(2));
.balance * 1).toFixed(2) * 1)).toFixed(2)); this_.placeholder = `可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
} }
} else { } else {
weui.topTips(res3.message) weui.topTips(res3.message)
...@@ -397,7 +399,8 @@ ...@@ -397,7 +399,8 @@
success: function(res2) { success: function(res2) {
if (res2.code == "10000") { if (res2.code == "10000") {
bankInfo = res2.results; bankInfo = res2.results;
bankInfo.sessionid = sessionID, bankInfo.sessionid = sessionID;
this_.bankInfo_ = bankInfo
this_.queryBankInfo(); this_.queryBankInfo();
} else { } else {
weui.topTips(res2.message) weui.topTips(res2.message)
...@@ -562,4 +565,43 @@ ...@@ -562,4 +565,43 @@
color: #268EF8; color: #268EF8;
margin-top: 23rpx; margin-top: 23rpx;
} }
.payType {
width: 654rpx;
margin: 0 auto;
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
// width: 120rpx;
height: 42rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
line-height: 45rpx;
}
.arrow {
transform: rotate(-45deg);
top: -3rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment