Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李智书
xzf_uniapp-wechat-web
Commits
75f4a2e4
Commit
75f4a2e4
authored
Apr 14, 2022
by
李智书
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
f567487f
ff4fc2f1
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
3806 additions
and
1828 deletions
+3806
-1828
src/pages.json
src/pages.json
+40
-2
src/pages/BankModule/Recharge/Recharge.vue
src/pages/BankModule/Recharge/Recharge.vue
+1775
-1797
src/pages/IcbcModule/Recharge/Recharge.vue
src/pages/IcbcModule/Recharge/Recharge.vue
+14
-14
src/pages/ReceiveMoney/ReceiveMoney.vue
src/pages/ReceiveMoney/ReceiveMoney.vue
+206
-0
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
+7
-1
src/pages/StudentPayment/PayProgress/PayProgress.vue
src/pages/StudentPayment/PayProgress/PayProgress.vue
+585
-0
src/pages/StudentPayment/PayProgressDetails/PayProgressDetails.vue
.../StudentPayment/PayProgressDetails/PayProgressDetails.vue
+512
-0
src/pages/StudentPayment/PayProject/PayProject.vue
src/pages/StudentPayment/PayProject/PayProject.vue
+125
-14
src/pages/StudentPayment/PayProjectHistoryDetails/PayProjectHistoryDetails.vue
...ent/PayProjectHistoryDetails/PayProjectHistoryDetails.vue
+542
-0
src/static/ReceiveMoney.png
src/static/ReceiveMoney.png
+0
-0
No files found.
src/pages.json
View file @
75f4a2e4
...
...
@@ -341,9 +341,47 @@
"navigationBarBackgroundColor"
:
"#01CB88"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/ReceiveMoney/ReceiveMoney"
,
"style"
:
{
"navigationBarTitleText"
:
"领取红包"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}
}
],
,{
"path"
:
"pages/StudentPayment/PayProjectHistoryDetails/PayProjectHistoryDetails"
,
"style"
:
{
"navigationBarTitleText"
:
"缴费详情单"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/StudentPayment/PayProgress/PayProgress"
,
"style"
:
{
"navigationBarTitleText"
:
"缴费进度"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/StudentPayment/PayProgressDetails/PayProgressDetails"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"缴费进度"
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"校智付"
,
...
...
src/pages/BankModule/Recharge/Recharge.vue
View file @
75f4a2e4
<
template
>
<view
class=
"container"
>
<view
class=
"contentBox"
v-if=
"!depotMoneyother"
>
<!--
<image
mode=
'widthFix'
src=
"https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"
></image>
-->
<view
class=
"contentDiv"
>
<view
class=
"headview"
>
<view
class=
"schoolname"
>
{{
PersonalInfo
.
schoolname
}}
</view>
<view
class=
"IconCls"
>
电子校园卡
</view>
</view>
<!-- 卡号显示 -->
<view
class=
"cardNum"
>
<view
class=
"cardNumleft"
><span>
账户:
</span>
**** **** ****
{{
bankInfo_
.
accountNo
.
slice
(
bankInfo_
.
accountNo
.
length
-
4
)
}}
<span>
(
{{
accountEnum
[
bankInfo_
.
accountType
+
""
]
}}
)
</span>
</view>
<view
class=
"cardNumright"
id=
"cardNumright"
@
click=
"CopyCardNumber"
>
复制
</view
>
</view>
<view
class=
"HidenText"
>
<view
class=
"userName"
style=
"
<view
class=
"container"
>
<view
class=
"contentBox"
v-if=
"!depotMoneyother"
>
<!--
<image
mode=
'widthFix'
src=
"https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"
></image>
-->
<view
class=
"contentDiv"
>
<view
class=
"headview"
>
<view
class=
"schoolname"
>
{{
PersonalInfo
.
schoolname
}}
</view>
<view
class=
"IconCls"
>
电子校园卡
</view>
</view>
<!-- 卡号显示 -->
<view
class=
"cardNum"
>
<view
class=
"cardNumleft"
><span>
账户:
</span>
**** **** ****
{{
bankInfo_
.
accountNo
.
slice
(
bankInfo_
.
accountNo
.
length
-
4
)
}}
<span>
(
{{
accountEnum
[
bankInfo_
.
accountType
+
""
]
}}
)
</span>
</view>
<view
class=
"cardNumright"
id=
"cardNumright"
@
click=
"CopyCardNumber"
>
复制
</view>
</view>
<view
class=
"HidenText"
>
<view
class=
"userName"
style=
"
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
"
>
姓名:
<span>
{{
PersonalInfo
.
name
}}
</span></view
>
<view
class=
"StudentCls"
style=
"
"
>
姓名:
<span>
{{
PersonalInfo
.
name
}}
</span></view>
<view
class=
"StudentCls"
style=
"
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
"
v-if=
"PersonalInfo.usertype == '1'"
>
班级:
{{
PersonalInfo
.
gradename
}}
(
{{
"
v-if=
"PersonalInfo.usertype == '1'"
>
班级:
{{
PersonalInfo
.
gradename
}}
(
{{
PersonalInfo
.
classname
}}
)
</view
>
<view
class=
"TeacherCls"
style=
"
}}
)
</view>
<view
class=
"TeacherCls"
style=
"
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
"
v-else
>
教职工
</view
>
</view>
<view
class=
"Balance"
>
<view
class=
"cardBalanceTx"
>
余额:¥
<span>
{{
cardBalanceTx
}}
</span></view
>
<view
@
click=
"ToWalletTx"
>
<span
style=
"display: inline-block; padding-right: 10rpx"
>
余额提现
</span
>
<image
style=
"position: relative; width: 13rpx; height: 20rpx"
class=
"ImgIcon1"
mode=
"widthFix"
:src=
"ImgUrl + 'images/xiaopaycard (17).png'"
alt=
""
></image>
</view>
</view>
</view>
<!-- 充值明细 -->
<view
class=
"RechargeDetailed"
@
click=
"BackToMini('purchaseDetail')"
>
账户明细
</view>
<!-- 充值账户 -->
<view
class=
"Recharge"
>
<span></span>
<span>
账户充值
</span>
</view>
<!-- 充值的金额 -->
<view
class=
"MoneyBox"
>
<view
class=
"depotMoney"
@
click=
"depotMoney(item.value, index)"
v-bind:class=
"MoneyIndex == index ? 'choiceClass' : ''"
:data-money=
"item.value || 0"
v-for=
"(item, index) in MoneyList"
:key=
"index"
>
<span
class=
"value"
>
{{
item
.
value
}}
</span>
<span
style=
"font-size: 28rpx; font-weight: 600; margin-left: 7rpx"
>
{{
"
v-else
>
教职工
</view>
</view>
<view
class=
"Balance"
>
<view
class=
"cardBalanceTx"
>
余额:¥
<span>
{{
cardBalanceTx
}}
</span></view>
<view
@
click=
"ToWalletTx"
>
<span
style=
"display: inline-block; padding-right: 10rpx"
>
余额提现
</span>
<image
style=
"position: relative; width: 13rpx; height: 20rpx"
class=
"ImgIcon1"
mode=
"widthFix"
:src=
"ImgUrl + 'images/xiaopaycard (17).png'"
alt=
""
></image>
</view>
</view>
</view>
<!-- 充值明细 -->
<view
class=
"RechargeDetailed"
@
click=
"BackToMini('purchaseDetail')"
>
账户明细
</view>
<!-- 充值账户 -->
<view
class=
"Recharge"
>
<span></span>
<span>
账户充值
</span>
</view>
<!-- 充值的金额 -->
<view
class=
"MoneyBox"
>
<view
class=
"depotMoney"
@
click=
"depotMoney(item.value, index)"
v-bind:class=
"MoneyIndex == index ? 'choiceClass' : ''"
:data-money=
"item.value || 0"
v-for=
"(item, index) in MoneyList"
:key=
"index"
>
<span
class=
"value"
>
{{
item
.
value
}}
</span>
<span
style=
"font-size: 28rpx; font-weight: 600; margin-left: 7rpx"
>
{{
item
.
lable
}}
</span>
<!--
<span
class=
"tips"
v-show=
"item.tips"
>
<!--
<span
class=
"tips"
v-show=
"item.tips"
>
{{
item
.
tips
}}
</span>
-->
</view>
</view>
<!-- 充值限额提示 -->
<view
class=
"depositbox"
>
<image
mode=
"widthFix"
class=
"depositImg"
src=
"../../../static/img/depositIcon.png"
></image>
<span
style=
"
vertical-align: middle;
font-size: 28rpx;
color: #333333;
font-weight: 500;
"
>
最大可充值金额:
<span
style=
"color: red"
>
¥
<span
class=
"canDepositTx"
>
{{
RechargeMax
}}
</span></span
></span
>
</view>
<!-- 充值其它金额 -->
<view
class=
"OtherMoney"
v-if=
"isOtherMoney"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
@
blur=
"ReturnToTop"
placeholder=
"请输入其他金额,最低3元"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
</view>
<!-- 支付方式 -->
<view
class=
"payType"
@
click=
"queryBindCardList"
>
<view>
付款方式
</view>
<view>
{{
bankInfo_
.
bindCardName
}}
{{
bankInfo_
.
bindCardNo
.
slice
(
bankInfo_
.
bindCardNo
.
length
-
4
)
}}
<span
class=
"arrow"
></span
></view>
<!--
<view>
{{
bankInfo_
.
accountName
}}
(
{{
bankInfo_
.
accountNo
.
slice
(
bankInfo_
.
accountNo
.
length
-
4
)
}}
)
<span
</view>
<!--
<view
class=
"depotMoney"
@
click=
"depotOtherMoney"
>
<span
class=
"value"
>
</span>
<span
style=
"font-size: 28rpx; font-weight: 600; margin-left: 7rpx"
>
其他金额
</span>
</view>
-->
<!--
<view
class=
"depotMoney"
>
<input
v-model=
"inputOtherM"
class=
"otherMoneyInput"
@
input=
"inputControl"
@
blur=
"ReturnToTop"
placeholder=
"最低3元"
type=
"text"
maxlength=
"6"
/>
</view>
-->
</view>
<!-- 充值其它金额 -->
<!--
<view
class=
"OtherMoney"
v-if=
"isOtherMoney"
>
-->
<view
class=
"OtherMoney"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
@
blur=
"ReturnToTop"
placeholder=
"请输入其他金额,最低3元"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
</view>
<!-- 充值限额提示 -->
<view
class=
"depositbox"
>
<image
mode=
"widthFix"
class=
"depositImg"
src=
"../../../static/img/depositIcon.png"
></image>
<span
style=
"
vertical-align: middle;
font-size: 28rpx;
color: #333333;
font-weight: 500;
"
>
最大可充值金额:
<span
style=
"color: red"
>
¥
<span
class=
"canDepositTx"
>
{{
RechargeMax
}}
</span></span></span>
</view>
<!-- 支付方式 -->
<view
class=
"payType"
@
click=
"queryBindCardList"
>
<view>
付款方式
</view>
<view>
{{
bankInfo_
.
bindCardName
}}
{{
bankInfo_
.
bindCardNo
.
slice
(
bankInfo_
.
bindCardNo
.
length
-
4
)
}}
<span
class=
"arrow"
></span>
</view>
<!--
<view>
{{
bankInfo_
.
accountName
}}
(
{{
bankInfo_
.
accountNo
.
slice
(
bankInfo_
.
accountNo
.
length
-
4
)
}}
)
<span
class=
"arrow"
></span></view>
-->
</view>
<!--
<view
class=
""
style=
"height: 1rpx;background-color: #DFDFDF;"
></view>
-->
<!-- 充值生活费 -->
<view
class=
"bottomdiv"
>
<view
class=
"DepositID"
@
click=
"toDeposit"
v-bind:style=
"Money != '' ? '' : 'background: #e6e6e6 !important;'"
>
<span>
充值生活费
</span>
</view>
<!-- -->
<view
class=
"switchbankCard"
@
click=
"ChangeBankPay"
>
我要换银行卡支付
</view
>
</view>
</view>
<!-- 其他充值金额 -->
<view
class=
"contentBox"
v-if=
"depotMoneyother"
>
<view
class=
"OtherTitle"
>
充值金额
</view>
<view
class=
"inputOtherM"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
</view>
<view
class=
"OtherLine"
></view>
<!-- 充值范围 -->
<view
class=
"Recharge_"
>
<!--
<image
mode=
"widthFix"
class=
"depositImg"
src=
"../../static/img/depositIcon.png"
></image>
-->
<span>
最大可充值金额:
</span>
<span
>
¥
<span>
3.00 ~
{{
RechargeMax
}}
</span></span
>
</view>
</view>
<!-- 弹出层 -->
<uni-popup
ref=
"popup"
:mask-click=
"false"
>
<!-- 充值确认 -->
<view
class=
"RechargeConfirmationBox"
>
<view
class=
"RechargeInfo"
>
<view
class=
"closePhoneBox"
@
click=
"close()"
>
<image
src=
"../../../static/img/close.png"
mode=
"aspectFit"
></image>
</view>
<view
class=
"RechargeInfo1"
>
验证校园卡开卡手机号
</view>
<van-field
label-class=
"openCardPhonTxt"
label=
"手机号:"
maxlength=
"11"
v-model=
"openCardPhon"
placeholder=
"校园卡开卡手机号"
center
:border=
"false"
>
<view
slot=
"right-icon"
v-if=
"bankInfo_.accountType == 4"
>
<view
class=
"changPhone"
style=
"display: flex; justify-content: center"
@
click=
"changePhone"
>
变更手机号
<van-icon
name=
"arrow"
/>
</view>
</view>
</van-field>
<view
style=
"width: 520rpx; height: 1rpx; background: #eeeeee"
></view>
<van-field
v-model=
"openCardPhonSms"
label-class=
"openCardPhonSmsTxt"
maxlength=
"6"
label=
"验证码:"
placeholder=
"输入短信验证码"
center
clearable
:border=
"false"
>
<van-button
slot=
"button"
size=
"small"
type=
"primary"
@
click=
"SendSms"
>
<div
style=
"font-size: 28rpx"
>
{{
CodeMsg
}}
</div>
</van-button>
</van-field>
<view
style=
"width: 520rpx; height: 1rpx; background: #eeeeee"
></view>
<!-- 取消 确认充值按钮 -->
<view
class=
"BtngGoup"
>
<view
class=
""
@
click=
"ExchangeRecharge"
>
充值
</view>
</view>
</view>
</view>
</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(item)"
v-for=
"(item, index) in bindcardList"
:key=
"index"
>
<span
style=
"padding-right: 10px"
>
{{
item
.
bindCardName
}}
</span>
<span
>
尾号:
{{
</view>
<!--
<view
class=
""
style=
"height: 1rpx;background-color: #DFDFDF;"
></view>
-->
<!-- 充值生活费 -->
<view
class=
"bottomdiv"
>
<view
class=
"DepositID"
@
click=
"toDeposit"
v-bind:style=
"Money != '' ? '' : 'background: #e6e6e6 !important;'"
>
<span>
充值生活费
</span>
</view>
<!-- -->
<view
class=
"switchbankCard"
@
click=
"ChangeBankPay"
>
我要换银行卡支付
</view>
</view>
</view>
<!-- 其他充值金额 -->
<view
class=
"contentBox"
v-if=
"depotMoneyother"
>
<view
class=
"OtherTitle"
>
充值金额
</view>
<view
class=
"inputOtherM"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
</view>
<view
class=
"OtherLine"
></view>
<!-- 充值范围 -->
<view
class=
"Recharge_"
>
<!--
<image
mode=
"widthFix"
class=
"depositImg"
src=
"../../static/img/depositIcon.png"
></image>
-->
<span>
最大可充值金额:
</span>
<span>
¥
<span>
3.00 ~
{{
RechargeMax
}}
</span></span>
</view>
</view>
<!-- 弹出层 -->
<uni-popup
ref=
"popup"
:mask-click=
"false"
>
<!-- 充值确认 -->
<view
class=
"RechargeConfirmationBox"
>
<view
class=
"RechargeInfo"
>
<view
class=
"closePhoneBox"
@
click=
"close()"
>
<image
src=
"../../../static/img/close.png"
mode=
"aspectFit"
></image>
</view>
<view
class=
"RechargeInfo1"
>
验证校园卡开卡手机号
</view>
<van-field
label-class=
"openCardPhonTxt"
label=
"手机号:"
maxlength=
"11"
v-model=
"openCardPhon"
placeholder=
"校园卡开卡手机号"
center
:border=
"false"
>
<view
slot=
"right-icon"
v-if=
"bankInfo_.accountType == 4"
>
<view
class=
"changPhone"
style=
"display: flex; justify-content: center"
@
click=
"changePhone"
>
变更手机号
<van-icon
name=
"arrow"
/>
</view>
</view>
</van-field>
<view
style=
"width: 520rpx; height: 1rpx; background: #eeeeee"
></view>
<van-field
v-model=
"openCardPhonSms"
label-class=
"openCardPhonSmsTxt"
maxlength=
"6"
label=
"验证码:"
placeholder=
"输入短信验证码"
center
clearable
:border=
"false"
>
<van-button
slot=
"button"
size=
"small"
type=
"primary"
@
click=
"SendSms"
>
<div
style=
"font-size: 28rpx"
>
{{
CodeMsg
}}
</div>
</van-button>
</van-field>
<view
style=
"width: 520rpx; height: 1rpx; background: #eeeeee"
></view>
<!-- 取消 确认充值按钮 -->
<view
class=
"BtngGoup"
>
<view
class=
""
@
click=
"ExchangeRecharge"
>
充值
</view>
</view>
</view>
</view>
</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(item)"
v-for=
"(item, index) in bindcardList"
:key=
"index"
>
<span
style=
"padding-right: 10px"
>
{{
item
.
bindCardName
}}
</span>
<span>
尾号:
{{
item
.
bindCardNo
.
slice
(
item
.
bindCardNo
.
length
-
4
)
}}
</span
>
<!--
<image
class=
'BankListImg'
src=
'../../../static/img/choiceBank.png'
></image>
-->
</view>
</view>
</view>
</van-popup>
</view>
</view>
}}
</span>
<!--
<image
class=
'BankListImg'
src=
'../../../static/img/choiceBank.png'
></image>
-->
</view>
</view>
</view>
</van-popup>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
,
Toast
}
from
"
vant
"
;
import
keyboardPackage
from
"
@/components/keyboard-package/keyboard-package.vue
"
;
import
cityData
from
"
@/common/js/city.js
"
;
var
gHost
=
"
https://
"
+
window
.
location
.
host
;
if
(
window
.
location
.
protocol
!=
"
https:
"
)
{
gHost
=
"
https://fpdev.xiaopay.net
"
;
// gHost = "/api";
}
let
times
=
0
;
var
limitClick
=
false
;
//禁止重复点击
var
sessionID
=
""
,
userID
=
""
;
var
payCardNumber
=
""
;
//一类卡号
var
orderSerialNo
=
""
;
//提现结果查询 指令号
var
businessNo
=
""
,
otpOrderNo
=
""
,
mobileNo
=
""
;
var
MyTimer
=
null
;
var
fromType
=
0
;
//0转账 1提现
var
opeType
=
0
;
//0充值 1提现 手机号验证
var
bankInfo
=
{
acctNoArray
:
""
,
idNo
:
""
,
schoolId
:
""
,
trueName
:
""
,
userId
:
""
,
sessionid
:
""
,
wechattype
:
1
,
};
/**
* 对象转拼接字符串
* @param {*} res Object 需要转换的数据对象
*/
function
OforS
(
res
)
{
var
resL
=
0
;
var
outS
=
""
;
for
(
var
i
in
res
)
{
if
(
resL
==
0
)
{
outS
+=
""
+
i
+
"
=
"
+
res
[
i
];
}
else
{
outS
+=
"
&
"
+
i
+
"
=
"
+
res
[
i
];
}
resL
++
;
}
return
outS
;
}
export
default
{
components
:
{
keyboardPackage
,
},
name
:
"
Recharge
"
,
data
()
{
return
{
popshow
:
false
,
// 输入其它金额
isOtherMoney
:
false
,
inputOtherM
:
""
,
RechargeException
:
false
,
depotMoneyother
:
false
,
//其他充值
Money
:
""
,
//选择金额
MoneyIndex
:
-
1
,
RechargeMax
:
"
2000
"
,
//最大充值限制
ReflectMoney
:
""
,
//提现金额
VerifyCode
:
""
,
//验证码
cardBalanceTx
:
"
0
"
,
//余额
CodeMsg
:
"
获取验证码
"
,
type
:
"
number
"
,
PersonalInfo
:
{
schoolname
:
""
,
name
:
""
,
usertype
:
"
1
"
,
},
bankInfo_
:
{
accountNo
:
"
**** **** **** 1234
"
,
bindCardName
:
""
,
bindCardNo
:
""
,
},
ImgUrl
:
this
.
$ImgUrl
,
MoneyList
:
[
{
lable
:
"
元
"
,
value
:
100
,
},
{
lable
:
"
元
"
,
value
:
200
,
},
{
lable
:
"
元
"
,
value
:
500
,
},
{
lable
:
"
元
"
,
value
:
1000
,
},
{
lable
:
"
其他金额
"
,
value
:
""
,
},
],
numberList
:
[],
tempFiles1
:
"
../../static/img/idCardBg1.png
"
,
//上传身份证临时选择文件
tempFiles2
:
"
../../static/img/idCardBg0.png
"
,
//绑定的一类卡列表
bindcardList
:
[],
// 20211126 银行账户类型
accountType
:
"
2
"
,
// 银行账户类型名称枚举
accountEnum
:
{
1
:
"
平安银行III类户
"
,
2
:
"
工商银行III类户
"
,
3
:
"
交通银行III类户
"
,
4
:
"
渤海银行II类户
"
,
},
/**
* 20211129新增
*/
// 充值手机号码
openCardPhon
:
""
,
openCardPhonSms
:
""
,
msCount
:
60
,
//定时器
RechargeSmsorderNoInfo
:
{},
//第三方合作交易标识
};
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
// 初始化
userID
=
options
[
"
userID
"
]
||
""
;
sessionID
=
options
[
"
seesionID
"
]
||
""
;
fromType
=
options
[
"
fromType
"
]
||
""
;
bankInfo
.
sessionid
=
sessionID
||
""
;
this
.
QueryUserInfo
();
},
created
:
function
()
{},
mounted
:
function
()
{},
onShow
:
function
()
{
if
(
bankInfo
.
userId
)
{
this
.
queryBankInfo
();
}
},
methods
:
{
// 更换银行卡
async
ChangeBankPay
()
{
// uni.showModal({
// title: "系统提示",
// content: "功能开发中!"
// })
// return
uni
.
showLoading
({
mask
:
true
,
title
:
"
请稍后....
"
,
});
if
(
bankInfo
.
accountType
==
4
)
{
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages_subpack/pages/changeBindCard/main`
,
});
uni
.
hideLoading
();
return
;
}
this
.
BackToMini
(
"
AssignAddCard
"
);
uni
.
hideLoading
();
},
// 验证码弹出框开启
toDeposit
()
{
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
,
});
return
;
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
"
充值金额必须大于3元
"
);
return
;
}
}
else
{
if
(
this
.
Money
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
,
});
return
;
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
"
充值金额必须大于3元
"
);
return
;
}
}
if
(
MyTimer
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
this
.
openCardPhonSms
=
""
;
}
this
.
$refs
.
popup
.
open
(
"
top
"
);
},
// 验证码弹出框关闭
close
()
{
this
.
$refs
.
popup
.
close
();
},
//切换到提现
ToWalletTx
()
{
$
(
"
#DepositBox
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
#TxWalletBox
"
).
css
(
"
display
"
,
"
block
"
);
// $('.TitleHeader').html('电子账户提现');
$
(
"
.doBtnTx
"
).
html
(
"
提现
"
);
opeType
=
1
;
uni
.
navigateTo
({
url
:
"
../Reflect/Reflect?
"
+
OforS
({
sessionID
:
sessionID
,
userID
:
userID
,
}),
});
},
//全部提现
TxAllFun
()
{
this
.
ReflectMoney
=
this
.
cardBalanceTx
*
1
;
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
;
let
obj
=
e
.
detail
;
this
.
$nextTick
(
function
()
{
obj
.
value
=
obj
.
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除"数字"和"."以外的字符
obj
.
value
=
obj
.
value
.
replace
(
/^
\.
/g
,
""
);
//验证第一个字符是数字而不是.
obj
.
value
=
obj
.
value
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
//只保留第一个. 清除多余的.
obj
.
value
=
obj
.
value
.
replace
(
"
.
"
,
"
$#$
"
)
.
replace
(
/
\.
/g
,
""
)
.
replace
(
"
$#$
"
,
"
.
"
);
//只允许输入一个小数点
obj
.
value
=
obj
.
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
"
$1$2.$3
"
);
//只能输入两个小数
obj
.
value
=
obj
.
value
*
1
>
this_
.
RechargeMax
?
this_
.
RechargeMax
:
obj
.
value
;
if
(
obj
.
value
==
""
||
obj
.
value
*
1
<
3
)
{
$
(
"
.DepositID
"
).
attr
(
"
style
"
,
"
background: rgb(230, 230, 230) !important;
"
);
}
else
{
$
(
"
.DepositID
"
).
removeAttr
(
"
style
"
);
}
this_
.
inputOtherM
=
obj
.
value
;
});
},
//input键盘弹起不会弹
ReturnToTop
()
{
// 若最后一位为小数点则去掉
let
str
=
this
.
inputOtherM
+
""
;
if
(
str
.
lastIndexOf
(
"
.
"
)
==
str
.
length
-
1
)
{
this
.
inputOtherM
=
str
.
substring
(
0
,
str
.
length
-
1
);
}
this
.
$nextTick
(
function
()
{
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
});
},
//定时器
IntervalFun
()
{
if
(
this
.
msCount
==
1
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
}
else
{
this
.
msCount
--
;
this
.
CodeMsg
=
this
.
msCount
+
"
s后获取
"
;
}
},
// 充值验证获取验证码
async
SendSms
()
{
if
(
MyTimer
)
{
return
;
}
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/rechargeSms
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/comprehensive/otpSms
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
((
this
.
Money
||
this
.
inputOtherM
)
*
1
).
toFixed
(
2
),
//充值金额,单位元
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 20211230渤海
mobilePhone
:
this
.
openCardPhon
,
msg
:
"
充值
"
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
clear
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
IntervalFun
();
MyTimer
=
window
.
setInterval
(
this_
.
IntervalFun
,
1000
);
this_
.
RechargeSmsorderNoInfo
=
res5
.
results
?
res5
.
results
:
{};
}
else
{
weui
.
topTips
(
res5
.
message
);
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
,
});
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
// 充值
async
ExchangeRecharge
()
{
let
amount
,
bindMedium
,
summary
;
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
,
});
return
;
}
amount
=
this
.
inputOtherM
*
1
;
}
else
{
if
(
this
.
Money
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
,
});
return
;
}
amount
=
this
.
Money
*
1
;
}
let
this_
=
this
;
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
if
(
bankInfo
.
accountType
!=
4
)
{
if
(
!
this
.
RechargeSmsorderNoInfo
.
orderNo
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请获取验证码!
"
,
});
return
;
}
}
if
(
!
this
.
openCardPhonSms
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入验证码!
"
,
});
return
;
}
uni
.
showLoading
({
mask
:
true
,
title
:
"
处理中......
"
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/recharge
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/exchange/recharge
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
(
amount
*
1
).
toFixed
(
2
),
//充值金额,单位元
mobileCode
:
this
.
openCardPhonSms
,
//短信验证码
orderNo
:
this_
.
RechargeSmsorderNoInfo
.
orderNo
,
//第三方合作交易标识,取充值短信返回的orderNo值
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 21211230渤海银行
transAmount
:
(
amount
*
1
).
toFixed
(
2
),
verifyNo
:
this
.
openCardPhonSms
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
uni
.
hideLoading
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
close
();
setTimeout
(()
=>
{
this_
.
queryBankInfo
();
},
3000
);
let
thiTime
=
new
Date
();
let
str
=
""
;
let
accountNo
=
this_
.
bankInfo_
.
bindCardNo
;
accountNo
=
accountNo
.
slice
(
accountNo
.
length
-
4
,
accountNo
.
length
);
let
minutes_
=
thiTime
.
getMinutes
().
toString
().
length
<
2
?
thiTime
.
getMinutes
().
toString
().
padStart
(
2
,
"
0
"
)
:
thiTime
.
getMinutes
().
toString
();
switch
(
bankInfo
.
accountType
)
{
case
3
:
if
(
thiTime
.
getMinutes
()
+
20
>=
60
)
{
str
=
thiTime
.
getHours
()
+
1
+
"
:
"
+
(
60
-
thiTime
.
getMinutes
());
}
else
{
str
=
thiTime
.
getHours
()
+
"
:
"
+
(
thiTime
.
getMinutes
()
+
20
);
}
wx
.
showModal
({
title
:
"
充值申请已提交
"
,
content
:
"
银行处理需要1-20分钟时间,充值结果以余额查询为准。
"
,
showCancel
:
false
,
success
:
function
()
{
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
import
{
Dialog
,
Toast
}
from
"
vant
"
;
import
keyboardPackage
from
"
@/components/keyboard-package/keyboard-package.vue
"
;
import
cityData
from
"
@/common/js/city.js
"
;
var
gHost
=
"
https://
"
+
window
.
location
.
host
;
if
(
window
.
location
.
protocol
!=
"
https:
"
)
{
gHost
=
"
https://fpdev.xiaopay.net
"
;
// gHost = "/api";
}
let
times
=
0
;
var
limitClick
=
false
;
//禁止重复点击
var
sessionID
=
""
,
userID
=
""
;
var
payCardNumber
=
""
;
//一类卡号
var
orderSerialNo
=
""
;
//提现结果查询 指令号
var
businessNo
=
""
,
otpOrderNo
=
""
,
mobileNo
=
""
;
var
MyTimer
=
null
;
var
fromType
=
0
;
//0转账 1提现
var
opeType
=
0
;
//0充值 1提现 手机号验证
var
bankInfo
=
{
acctNoArray
:
""
,
idNo
:
""
,
schoolId
:
""
,
trueName
:
""
,
userId
:
""
,
sessionid
:
""
,
wechattype
:
1
,
};
let
orderApi
=
window
.
location
.
origin
;
/**
* 对象转拼接字符串
* @param {*} res Object 需要转换的数据对象
*/
function
OforS
(
res
)
{
var
resL
=
0
;
var
outS
=
""
;
for
(
var
i
in
res
)
{
if
(
resL
==
0
)
{
outS
+=
""
+
i
+
"
=
"
+
res
[
i
];
}
else
{
outS
+=
"
&
"
+
i
+
"
=
"
+
res
[
i
];
}
resL
++
;
}
return
outS
;
}
export
default
{
components
:
{
keyboardPackage
,
},
name
:
"
Recharge
"
,
data
()
{
return
{
popshow
:
false
,
// 输入其它金额
isOtherMoney
:
false
,
inputOtherM
:
""
,
RechargeException
:
false
,
depotMoneyother
:
false
,
//其他充值
Money
:
""
,
//选择金额
MoneyIndex
:
-
1
,
RechargeMax
:
"
2000
"
,
//最大充值限制
ReflectMoney
:
""
,
//提现金额
VerifyCode
:
""
,
//验证码
cardBalanceTx
:
"
0
"
,
//余额
CodeMsg
:
"
获取验证码
"
,
type
:
"
number
"
,
PersonalInfo
:
{
schoolname
:
""
,
name
:
""
,
usertype
:
"
1
"
,
},
bankInfo_
:
{
accountNo
:
"
**** **** **** 1234
"
,
bindCardName
:
""
,
bindCardNo
:
""
,
},
ImgUrl
:
this
.
$ImgUrl
,
MoneyList
:
[{
lable
:
"
元
"
,
value
:
100
,
},
{
lable
:
"
元
"
,
value
:
200
,
},
{
lable
:
"
元
"
,
value
:
500
,
},
{
lable
:
"
元
"
,
value
:
1000
,
},
// {
// lable: "其他金额",
// value: "",
// },
],
numberList
:
[],
tempFiles1
:
"
../../static/img/idCardBg1.png
"
,
//上传身份证临时选择文件
tempFiles2
:
"
../../static/img/idCardBg0.png
"
,
//绑定的一类卡列表
bindcardList
:
[],
// 20211126 银行账户类型
accountType
:
"
2
"
,
// 银行账户类型名称枚举
accountEnum
:
{
1
:
"
平安银行III类户
"
,
2
:
"
工商银行III类户
"
,
3
:
"
交通银行III类户
"
,
4
:
"
渤海银行II类户
"
,
},
/**
* 20211129新增
*/
// 充值手机号码
openCardPhon
:
""
,
openCardPhonSms
:
""
,
msCount
:
60
,
//定时器
RechargeSmsorderNoInfo
:
{},
//第三方合作交易标识
};
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
// 初始化
userID
=
options
[
"
userID
"
]
||
""
;
sessionID
=
options
[
"
seesionID
"
]
||
""
;
fromType
=
options
[
"
fromType
"
]
||
""
;
bankInfo
.
sessionid
=
sessionID
||
""
;
this
.
QueryUserInfo
();
},
created
:
function
()
{},
mounted
:
function
()
{},
onShow
:
function
()
{
if
(
bankInfo
.
accountType
==
4
)
{
// 渤海银行要判断是否有代扣签约
this
.
signStatusQuery
();
}
if
(
bankInfo
.
userId
)
{
this
.
queryBankInfo
();
}
},
methods
:
{
// 更换银行卡
async
ChangeBankPay
()
{
// uni.showModal({
// title: "系统提示",
// content: "功能开发中!"
// })
// return
uni
.
showLoading
({
mask
:
true
,
title
:
"
请稍后....
"
,
});
if
(
bankInfo
.
accountType
==
4
)
{
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages_subpack/pages/changeBindCard/main`
,
});
uni
.
hideLoading
();
return
;
}
this
.
BackToMini
(
"
AssignAddCard
"
);
uni
.
hideLoading
();
},
// 验证码弹出框开启
toDeposit
()
{
console
.
log
(
this
.
isOtherMoney
,
'
isOtherMoney
'
)
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
,
});
return
;
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
"
充值金额必须大于3元
"
);
return
;
}
}
else
{
if
(
this
.
Money
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
,
});
return
;
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
"
充值金额必须大于3元
"
);
return
;
}
}
if
(
MyTimer
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
this
.
openCardPhonSms
=
""
;
}
this
.
$refs
.
popup
.
open
(
"
top
"
);
},
// 验证码弹出框关闭
close
()
{
this
.
$refs
.
popup
.
close
();
},
//切换到提现
ToWalletTx
()
{
$
(
"
#DepositBox
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
#TxWalletBox
"
).
css
(
"
display
"
,
"
block
"
);
// $('.TitleHeader').html('电子账户提现');
$
(
"
.doBtnTx
"
).
html
(
"
提现
"
);
opeType
=
1
;
uni
.
navigateTo
({
url
:
"
../Reflect/Reflect?
"
+
OforS
({
sessionID
:
sessionID
,
userID
:
userID
,
}),
});
},
//全部提现
TxAllFun
()
{
this
.
ReflectMoney
=
this
.
cardBalanceTx
*
1
;
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
;
this_
.
MoneyIndex
=
-
1
;
this_
.
isOtherMoney
=
true
;
let
obj
=
e
.
detail
;
this
.
$nextTick
(
function
()
{
obj
.
value
=
obj
.
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除"数字"和"."以外的字符
obj
.
value
=
obj
.
value
.
replace
(
/^
\.
/g
,
""
);
//验证第一个字符是数字而不是.
obj
.
value
=
obj
.
value
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
//只保留第一个. 清除多余的.
obj
.
value
=
obj
.
value
.
replace
(
"
.
"
,
"
$#$
"
)
.
replace
(
/
\.
/g
,
""
)
.
replace
(
"
$#$
"
,
"
.
"
);
//只允许输入一个小数点
obj
.
value
=
obj
.
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
"
$1$2.$3
"
);
//只能输入两个小数
obj
.
value
=
obj
.
value
*
1
>
this_
.
RechargeMax
?
this_
.
RechargeMax
:
obj
.
value
;
if
(
obj
.
value
==
""
||
obj
.
value
*
1
<
3
)
{
$
(
"
.DepositID
"
).
attr
(
"
style
"
,
"
background: rgb(230, 230, 230) !important;
"
);
}
else
{
$
(
"
.DepositID
"
).
removeAttr
(
"
style
"
);
}
this_
.
inputOtherM
=
obj
.
value
;
});
},
//input键盘弹起不会弹
ReturnToTop
()
{
// 若最后一位为小数点则去掉
let
str
=
this
.
inputOtherM
+
""
;
if
(
str
.
lastIndexOf
(
"
.
"
)
==
str
.
length
-
1
)
{
this
.
inputOtherM
=
str
.
substring
(
0
,
str
.
length
-
1
);
}
this
.
$nextTick
(
function
()
{
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
});
},
//定时器
IntervalFun
()
{
if
(
this
.
msCount
==
1
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
}
else
{
this
.
msCount
--
;
this
.
CodeMsg
=
this
.
msCount
+
"
s后获取
"
;
}
},
// 代扣状态查询
async
signStatusQuery
()
{
let
respes
=
await
this
.
$http
.
post
({
// url: "http://159.75.47.27:8091/bank-wechat/bohai/comprehensive/signStatusQuery",
url
:
orderApi
+
"
/bank-wechat/bohai/comprehensive/signStatusQuery
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
},
});
if
(
respes
.
code
==
"
10000
"
)
{
console
.
log
(
respes
,
"
respes
"
);
if
(
respes
.
results
.
dkstatus
!=
1
)
{
// 1已签约
Dialog
.
alert
({
title
:
'
使用说明
'
,
message
:
'
您暂未进行银行代扣签约,将影响电子校园卡的正常使用,请尽快前往签约
'
,
theme
:
'
round-button
'
,
confirmButtonText
:
'
确认签约
'
,
confirmButtonColor
:
'
#2ddbb6
'
,
className
:
'
signAlert
'
}).
then
(()
=>
{
// on confirm
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages/SignProxyPay/main`
,
});
})
.
catch
(()
=>
{
// on cancel
});
}
}
else
{
Toast
(
respes
.
message
||
"
代扣状态查询,请重试!
"
);
throw
new
Error
(
"
代扣状态查询,请重试!
"
);
}
},
// 充值验证获取验证码
async
SendSms
()
{
if
(
MyTimer
)
{
return
;
}
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/rechargeSms
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/comprehensive/otpSms
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
((
this
.
Money
||
this
.
inputOtherM
)
*
1
).
toFixed
(
2
),
//充值金额,单位元
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 20211230渤海
mobilePhone
:
this
.
openCardPhon
,
msg
:
"
充值
"
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
clear
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
IntervalFun
();
MyTimer
=
window
.
setInterval
(
this_
.
IntervalFun
,
1000
);
this_
.
RechargeSmsorderNoInfo
=
res5
.
results
?
res5
.
results
:
{};
}
else
{
weui
.
topTips
(
res5
.
message
);
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
,
});
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
// 充值
async
ExchangeRecharge
()
{
let
amount
,
bindMedium
,
summary
;
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
,
});
return
;
}
amount
=
this
.
inputOtherM
*
1
;
}
else
{
if
(
this
.
Money
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
,
});
return
;
}
amount
=
this
.
Money
*
1
;
}
let
this_
=
this
;
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
if
(
bankInfo
.
accountType
!=
4
)
{
if
(
!
this
.
RechargeSmsorderNoInfo
.
orderNo
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请获取验证码!
"
,
});
return
;
}
}
if
(
!
this
.
openCardPhonSms
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入验证码!
"
,
});
return
;
}
uni
.
showLoading
({
mask
:
true
,
title
:
"
处理中......
"
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/recharge
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/exchange/recharge
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
(
amount
*
1
).
toFixed
(
2
),
//充值金额,单位元
mobileCode
:
this
.
openCardPhonSms
,
//短信验证码
orderNo
:
this_
.
RechargeSmsorderNoInfo
.
orderNo
,
//第三方合作交易标识,取充值短信返回的orderNo值
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 21211230渤海银行
transAmount
:
(
amount
*
1
).
toFixed
(
2
),
verifyNo
:
this
.
openCardPhonSms
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
uni
.
hideLoading
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
close
();
setTimeout
(()
=>
{
this_
.
queryBankInfo
();
},
3000
);
let
thiTime
=
new
Date
();
let
str
=
""
;
let
accountNo
=
this_
.
bankInfo_
.
bindCardNo
;
accountNo
=
accountNo
.
slice
(
accountNo
.
length
-
4
,
accountNo
.
length
);
let
minutes_
=
thiTime
.
getMinutes
().
toString
().
length
<
2
?
thiTime
.
getMinutes
().
toString
().
padStart
(
2
,
"
0
"
)
:
thiTime
.
getMinutes
().
toString
();
switch
(
bankInfo
.
accountType
)
{
case
3
:
if
(
thiTime
.
getMinutes
()
+
20
>=
60
)
{
str
=
thiTime
.
getHours
()
+
1
+
"
:
"
+
(
60
-
thiTime
.
getMinutes
());
}
else
{
str
=
thiTime
.
getHours
()
+
"
:
"
+
(
thiTime
.
getMinutes
()
+
20
);
}
wx
.
showModal
({
title
:
"
充值申请已提交
"
,
content
:
"
银行处理需要1-20分钟时间,充值结果以余额查询为准。
"
,
showCancel
:
false
,
success
:
function
()
{
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
this_
.
bankInfo_
.
bindCardName
}
&bankNumber=
${
accountNo
}
&time=
${
str
}
&money=
${(
amount
*
1
).
toFixed
(
2
)}
`
,
});
},
});
break
;
case
4
:
str
=
thiTime
.
getHours
()
+
2
+
"
:
"
+
minutes_
;
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
});
},
});
break
;
case
4
:
str
=
thiTime
.
getHours
()
+
2
+
"
:
"
+
minutes_
;
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
this_
.
bankInfo_
.
bindCardName
}
&bankNumber=
${
accountNo
}
&time=
${
str
}
&money=
${(
amount
*
1
).
toFixed
(
2
)}
`
,
});
break
;
default
:
break
;
}
// 20211129
this_
.
RechargeSmsorderNoInfo
=
{};
}
else
{
weui
.
topTips
(
res5
.
message
);
}
},
error
:
function
(
err
)
{
uni
.
hideLoading
();
},
});
},
// 充值结果查询
async
ExchangeRechargeQuery
(
flowId
,
oriCorpSerno
)
{
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/icbc/account/exchange/rechargeQuery
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
flowId
:
flowId
,
oriCorpSerno
:
oriCorpSerno
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
clear
();
if
(
res5
.
code
==
"
10000
"
)
{
let
appStatus
=
res5
.
results
.
appStatus
;
if
(
appStatus
==
"
4
"
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
充值成功!
"
,
});
this_
.
queryBankInfo
();
}
else
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
appStatus
==
"
1
"
?
"
申请已受理
"
:
res5
.
message
,
});
}
}
else
{
weui
.
topTips
(
res5
.
message
);
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
,
});
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
// 复制我卡号
async
CopyCardNumber
()
{
let
value
=
this
.
bankInfo_
.
accountNo
;
Dialog
({
title
:
"
系统提示
"
,
message
:
"
复制成功!
"
,
});
this
.
$nextTick
(
function
()
{
let
clipboard
=
new
ClipboardJS
(
"
#cardNumright
"
,
{
text
:
function
()
{
return
value
;
},
});
});
},
//选择输入其他金额
OtherMoney
()
{
this
.
depotMoneyother
=
true
;
},
// 快捷选择金额
async
depotMoney
(
value
,
MoneyIndex
)
{
console
.
log
(
value
);
if
(
!
value
)
{
this
.
isOtherMoney
=
true
;
this
.
Money
=
""
;
this
.
MoneyIndex
=
MoneyIndex
;
return
;
}
this
.
isOtherMoney
=
false
;
this
.
Money
=
parseInt
(
value
);
this
.
MoneyIndex
=
MoneyIndex
;
},
//按钮操作
HideHTML
(
dom
,
type
)
{
this
.
$nextTick
(
function
()
{
if
(
type
==
0
)
{
$
(
"
.
"
+
dom
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
"
.
"
+
dom
).
css
(
"
display
"
,
"
block
"
);
}
});
},
// 更换手机号码
changePhone
()
{
uni
.
showLoading
({
mask
:
true
,
title
:
"
请稍后....
"
,
});
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages_subpack/pages/changePhone/main`
,
});
uni
.
hideLoading
();
},
//返回小程序 跳转指定页面
BackToMini
(
page
)
{
if
(
page
==
"
UserMain
"
||
page
==
"
personalCenter
"
)
{
jWeixin
.
miniProgram
.
switchTab
({
url
:
`/pages/
${
page
}
/main`
,
});
}
else
{
jWeixin
.
miniProgram
.
redirectTo
({
url
:
`/pages/
${
page
}
/main`
,
});
}
},
//换绑卡
ChangeCardPay
(
item
)
{
let
this_
=
this
;
if
(
bankInfo
.
bindCardNo
==
item
.
bindCardNo
)
{
return
;
}
var
loading
=
weui
.
loading
(
"
请稍后
"
);
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/icbc/account/bindcard/changeDefaultBinding
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
bindMedium
:
item
.
bindCardNo
,
bindMediumName
:
item
.
bindCardName
,
},
success
:
function
(
res5
)
{
loading
.
hide
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
queryUserBankInfo
();
this_
.
close
();
}
else
{
weui
.
topTips
(
res5
.
message
);
}
this_
.
popshow
=
false
;
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//查询一类卡绑定列表
queryBindCardList
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
"
请稍后
"
);
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/user/bank/bindingList
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
cardNo
:
bankInfo
.
accountNo
,
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res4
)
{
loading
.
hide
();
if
(
res4
.
code
==
"
10000
"
)
{
this_
.
bindcardList
=
res4
.
results
;
this_
.
popshow
=
true
;
}
else
{
weui
.
topTips
(
res4
.
message
);
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//获取银行余额
queryBankInfo
()
{
let
this_
=
this
;
let
queryBankInfoUrl
=
gHost
;
// 20211230
switch
(
bankInfo
.
accountType
)
{
case
3
:
queryBankInfoUrl
=
queryBankInfoUrl
+
"
/bank-wechat/bocom/balance/getBankBlanceAndSyncLocal
"
;
break
;
case
4
:
queryBankInfoUrl
=
queryBankInfoUrl
+
"
/bank-wechat/bohai/exchange/balanceQuery
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
// let loading = weui.loading('请稍后');
$
.
ajax
({
url
:
queryBankInfoUrl
,
type
:
"
POST
"
,
timeout
:
8000
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
mediumId
:
bankInfo
.
accountNo
||
""
,
schoolId
:
bankInfo
.
schoolId
||
""
,
userId
:
bankInfo
.
userId
||
""
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res3
)
{
// loading.hide();
if
(
res3
.
code
==
"
10000
"
)
{
if
(
bankInfo
.
accountType
==
4
)
{
if
(
res3
.
results
.
eacTotalAmt
==
null
)
{
weui
.
topTips
(
"
账户信息为空,余额查询失败
"
);
}
else
{
this_
.
cardBalanceTx
=
(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
);
$
(
"
.TxClsTx
"
).
attr
(
"
placeholder
"
,
`可提现金额
${(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
)}
元`
);
this_
.
RechargeMax
=
(
2000
-
(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
)
*
1
).
toFixed
(
2
);
}
return
;
}
if
(
res3
.
results
.
accountBalance
==
null
)
{
weui
.
topTips
(
"
账户信息为空,余额查询失败
"
);
}
else
{
this_
.
cardBalanceTx
=
(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
);
$
(
"
.TxClsTx
"
).
attr
(
"
placeholder
"
,
`可提现金额
${(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
)}
元`
);
this_
.
RechargeMax
=
(
2000
-
(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
)
*
1
).
toFixed
(
2
);
}
}
else
{
weui
.
topTips
(
res3
.
message
);
}
},
error
:
function
(
err
)
{
// loading.hide();
},
complete
:
function
(
XMLHttpRequest
,
status
)
{
// loading.hide();
if
(
status
==
"
timeout
"
)
{
weui
.
topTips
(
"
请求超时,余额查询失败
"
);
}
},
});
},
//获取用户已填写银行信息
queryUserBankInfo
()
{
let
this_
=
this
;
// let loading = weui.loading('请稍后');
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/user/bank/get
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res2
)
{
if
(
res2
.
code
==
"
10000
"
)
{
if
(
!
res2
.
results
)
{
weui
.
topTips
(
"
获取用户银行信息失败!
"
);
// loading.hide();
return
;
}
bankInfo
=
res2
.
results
;
bankInfo
.
sessionid
=
sessionID
;
this_
.
queryBankInfo
();
//查余额
this_
.
bankInfo_
=
bankInfo
;
// 20211129
this_
.
openCardPhon
=
bankInfo
.
mobileNo
;
}
else
{
weui
.
topTips
(
res2
.
message
);
}
},
error
:
function
(
err
)
{
// loading.hide();
},
});
},
//查询用户信息
QueryUserInfo
()
{
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
$
.
ajax
({
url
:
gHost
+
"
/wechat/svweapp/QueryPersonalInfo
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
userid
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res1
)
{
loading
.
clear
();
if
(
res1
.
code
==
"
10000
"
)
{
bankInfo
.
schoolId
=
res1
.
results
.
schoolid
;
bankInfo
.
userId
=
res1
.
results
.
id
;
this_
.
PersonalInfo
=
res1
.
results
;
if
(
res1
.
results
.
usertype
==
1
)
{
$
(
"
.StudentCls
"
).
css
(
"
display
"
,
"
block
"
);
$
(
"
.TeacherCls
"
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
"
.StudentCls
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
.TeacherCls
"
).
css
(
"
display
"
,
"
block
"
);
}
this_
.
queryUserBankInfo
();
}
else
{
weui
.
topTips
(
res1
.
message
);
setTimeout
(()
=>
{
this_
.
BackToMini
(
"
UserMain
"
);
},
1500
);
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
},
};
});
break
;
default
:
break
;
}
// 20211129
this_
.
RechargeSmsorderNoInfo
=
{};
}
else
{
weui
.
topTips
(
res5
.
message
);
}
},
error
:
function
(
err
)
{
uni
.
hideLoading
();
},
});
},
// 充值结果查询
async
ExchangeRechargeQuery
(
flowId
,
oriCorpSerno
)
{
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/icbc/account/exchange/rechargeQuery
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
flowId
:
flowId
,
oriCorpSerno
:
oriCorpSerno
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
clear
();
if
(
res5
.
code
==
"
10000
"
)
{
let
appStatus
=
res5
.
results
.
appStatus
;
if
(
appStatus
==
"
4
"
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
充值成功!
"
,
});
this_
.
queryBankInfo
();
}
else
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
appStatus
==
"
1
"
?
"
申请已受理
"
:
res5
.
message
,
});
}
}
else
{
weui
.
topTips
(
res5
.
message
);
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
,
});
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
// 复制我卡号
async
CopyCardNumber
()
{
let
value
=
this
.
bankInfo_
.
accountNo
;
Dialog
({
title
:
"
系统提示
"
,
message
:
"
复制成功!
"
,
});
this
.
$nextTick
(
function
()
{
let
clipboard
=
new
ClipboardJS
(
"
#cardNumright
"
,
{
text
:
function
()
{
return
value
;
},
});
});
},
//选择输入其他金额
OtherMoney
()
{
this
.
depotMoneyother
=
true
;
},
// 选择其它金额
async
depotOtherMoney
()
{
console
.
log
(
'
其它金额
'
)
},
// 快捷选择金额
async
depotMoney
(
value
,
MoneyIndex
)
{
this
.
isOtherMoney
=
false
;
this
.
inputOtherM
=
""
;
this
.
Money
=
parseInt
(
value
);
this
.
MoneyIndex
=
MoneyIndex
;
},
//按钮操作
HideHTML
(
dom
,
type
)
{
this
.
$nextTick
(
function
()
{
if
(
type
==
0
)
{
$
(
"
.
"
+
dom
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
"
.
"
+
dom
).
css
(
"
display
"
,
"
block
"
);
}
});
},
// 更换手机号码
changePhone
()
{
uni
.
showLoading
({
mask
:
true
,
title
:
"
请稍后....
"
,
});
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages_subpack/pages/changePhone/main`
,
});
uni
.
hideLoading
();
},
//返回小程序 跳转指定页面
BackToMini
(
page
)
{
if
(
page
==
"
UserMain
"
||
page
==
"
personalCenter
"
)
{
jWeixin
.
miniProgram
.
switchTab
({
url
:
`/pages/
${
page
}
/main`
,
});
}
else
{
jWeixin
.
miniProgram
.
redirectTo
({
url
:
`/pages/
${
page
}
/main`
,
});
}
},
//换绑卡
ChangeCardPay
(
item
)
{
let
this_
=
this
;
if
(
bankInfo
.
bindCardNo
==
item
.
bindCardNo
)
{
return
;
}
var
loading
=
weui
.
loading
(
"
请稍后
"
);
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/icbc/account/bindcard/changeDefaultBinding
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
bindMedium
:
item
.
bindCardNo
,
bindMediumName
:
item
.
bindCardName
,
},
success
:
function
(
res5
)
{
loading
.
hide
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
queryUserBankInfo
();
this_
.
close
();
}
else
{
weui
.
topTips
(
res5
.
message
);
}
this_
.
popshow
=
false
;
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//查询一类卡绑定列表
queryBindCardList
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
"
请稍后
"
);
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/user/bank/bindingList
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
cardNo
:
bankInfo
.
accountNo
,
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res4
)
{
loading
.
hide
();
if
(
res4
.
code
==
"
10000
"
)
{
this_
.
bindcardList
=
res4
.
results
;
this_
.
popshow
=
true
;
}
else
{
weui
.
topTips
(
res4
.
message
);
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//获取银行余额
queryBankInfo
()
{
let
this_
=
this
;
let
queryBankInfoUrl
=
gHost
;
// 20211230
switch
(
bankInfo
.
accountType
)
{
case
3
:
queryBankInfoUrl
=
queryBankInfoUrl
+
"
/bank-wechat/bocom/balance/getBankBlanceAndSyncLocal
"
;
break
;
case
4
:
queryBankInfoUrl
=
queryBankInfoUrl
+
"
/bank-wechat/bohai/exchange/balanceQuery
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
// let loading = weui.loading('请稍后');
$
.
ajax
({
url
:
queryBankInfoUrl
,
type
:
"
POST
"
,
timeout
:
8000
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
mediumId
:
bankInfo
.
accountNo
||
""
,
schoolId
:
bankInfo
.
schoolId
||
""
,
userId
:
bankInfo
.
userId
||
""
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res3
)
{
// loading.hide();
if
(
res3
.
code
==
"
10000
"
)
{
if
(
bankInfo
.
accountType
==
4
)
{
if
(
res3
.
results
.
eacTotalAmt
==
null
)
{
weui
.
topTips
(
"
账户信息为空,余额查询失败
"
);
}
else
{
this_
.
cardBalanceTx
=
(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
);
$
(
"
.TxClsTx
"
).
attr
(
"
placeholder
"
,
`可提现金额
${(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
)}
元`
);
this_
.
RechargeMax
=
(
2000
-
(
res3
.
results
.
eacTotalAmt
*
1
).
toFixed
(
2
)
*
1
).
toFixed
(
2
);
}
return
;
}
if
(
res3
.
results
.
accountBalance
==
null
)
{
weui
.
topTips
(
"
账户信息为空,余额查询失败
"
);
}
else
{
this_
.
cardBalanceTx
=
(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
);
$
(
"
.TxClsTx
"
).
attr
(
"
placeholder
"
,
`可提现金额
${(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
)}
元`
);
this_
.
RechargeMax
=
(
2000
-
(
res3
.
results
.
accountBalance
*
1
).
toFixed
(
2
)
*
1
).
toFixed
(
2
);
}
}
else
{
weui
.
topTips
(
res3
.
message
);
}
},
error
:
function
(
err
)
{
// loading.hide();
},
complete
:
function
(
XMLHttpRequest
,
status
)
{
// loading.hide();
if
(
status
==
"
timeout
"
)
{
weui
.
topTips
(
"
请求超时,余额查询失败
"
);
}
},
});
},
//获取用户已填写银行信息
queryUserBankInfo
()
{
let
this_
=
this
;
// let loading = weui.loading('请稍后');
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/user/bank/get
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res2
)
{
if
(
res2
.
code
==
"
10000
"
)
{
if
(
!
res2
.
results
)
{
weui
.
topTips
(
"
获取用户银行信息失败!
"
);
// loading.hide();
return
;
}
bankInfo
=
res2
.
results
;
bankInfo
.
sessionid
=
sessionID
;
this_
.
queryBankInfo
();
//查余额
this_
.
bankInfo_
=
bankInfo
;
// 20211129
this_
.
openCardPhon
=
bankInfo
.
mobileNo
;
}
else
{
weui
.
topTips
(
res2
.
message
);
}
},
error
:
function
(
err
)
{
// loading.hide();
},
});
},
//查询用户信息
QueryUserInfo
()
{
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
$
.
ajax
({
url
:
gHost
+
"
/wechat/svweapp/QueryPersonalInfo
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
userid
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
},
success
:
function
(
res1
)
{
loading
.
clear
();
if
(
res1
.
code
==
"
10000
"
)
{
bankInfo
.
schoolId
=
res1
.
results
.
schoolid
;
bankInfo
.
userId
=
res1
.
results
.
id
;
this_
.
PersonalInfo
=
res1
.
results
;
if
(
res1
.
results
.
usertype
==
1
)
{
$
(
"
.StudentCls
"
).
css
(
"
display
"
,
"
block
"
);
$
(
"
.TeacherCls
"
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
"
.StudentCls
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
.TeacherCls
"
).
css
(
"
display
"
,
"
block
"
);
}
this_
.
queryUserBankInfo
();
}
else
{
weui
.
topTips
(
res1
.
message
);
setTimeout
(()
=>
{
this_
.
BackToMini
(
"
UserMain
"
);
},
1500
);
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
},
};
</
script
>
<
style
lang=
"scss"
>
html
,
body
,
page
{
width
:
750rpx
;
background
:
linear-gradient
(
180deg
,
#ffffff
0%
,
#fafafa
100%
);
}
.changPhone
{
font-size
:
14px
;
color
:
#39f
;
text-align
:
right
;
}
.showBindCardList
{
.choiceBox
{
text-align
:
center
;
font-weight
:
bold
;
height
:
50px
;
line-height
:
50px
;
padding
:
0
;
border-bottom
:
0
.5px
solid
#e6e6e6
;
}
.ListItem
{
border-bottom
:
1rpx
solid
#e6e6e6
;
font-size
:
30rpx
;
padding
:
25rpx
0
;
background
:
#fff
;
position
:
relative
;
text-align
:
center
;
}
}
.SubmittedSuccessfully
{
width
:
400rpx
!
important
;
height
:
200rpx
!
important
;
margin
:
0
auto
!
important
;
background
:
#000000
;
opacity
:
0
.8
;
border-radius
:
8rpx
;
}
.cardNum
{
width
:
574rpx
;
margin
:
0
auto
;
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
36rpx
;
font-size
:
24rpx
;
.cardNumleft
{
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#ffffff
;
}
.cardNumright
{
font-family
:
PingFang
SC
;
font-weight
:
500
;
text-decoration
:
underline
;
color
:
#ffffff
;
}
}
.RechargeDetailed
{
text-align
:
center
;
// width: 118rpx;
height
:
32rpx
;
margin
:
0
auto
;
font-size
:
30rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
text-decoration
:
underline
;
color
:
#36a8ff
;
margin-top
:
50rpx
;
}
.contentBox
{
width
:
670rpx
;
height
:
376rpx
;
margin
:
0
auto
;
}
.contentDiv
{
height
:
100%
;
// margin-top: 36rpx;
border-radius
:
15rpx
;
background-image
:
url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31)
.
png
");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
width: 574rpx;
margin: 0 auto;
padding-top: 88rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
width: 574rpx;
margin: 0 auto;
margin-top: 20rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.Recharge {
// height: 30rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin-top: 58rpx;
span:nth-child(1) {
width: 4rpx;
height: 30rpx;
background: #23d6a3;
border-radius: 2rpx;
display: inline-block;
position: relative;
top: 5rpx;
}
span:nth-child(2) {
display: inline-block;
margin-left: 16rpx;
}
}
.headview {
display: flex;
justify-content: space-between;
// padding-left: 40rpx;
// padding-right: 40rpx;
padding-top: 36rpx;
width: 574rpx;
margin: 0 auto;
}
.headview .schoolname {
// width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.MoneyBox {
flex-wrap: wrap;
height: auto;
color: #888888;
width: 686rpx;
margin: 0 auto;
overflow: hidden;
}
.choiceClass {
background: rgba(39, 266, 148, 0.1) !important;
color: #28d79c;
}
.MoneyBox view {
width: 220rpx;
height: 120rpx;
background: #ffffff;
border-radius: 8rpx;
border: 1rpx solid #eeeeee;
margin-top: 16rpx;
text-align: center;
position: relative;
box-shadow: 0px 9rpx 23rpx 0rpx rgba(25, 26, 88, 0.07);
margin-right: 2px;
float: left;
}
.depotMoney .value {
font-size: 45rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 120rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
// height: 33rpx;
// background: linear-gradient(180deg, #FA6400 0%, #FD9D00 100%);
// border-radius: 4rpx;
// font-size: 18rpx;
// font-weight: 500;
// padding: 4rpx;
// text-align: center;
// float: right;
// position: absolute;
// right: 0rpx;
// line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: flex-start;
// color: #999999;
// font-size: 28rpx;
// font-family: PingFangSC-Regular, PingFang SC;
// font-weight: 400;
// color: #999999;
// line-height: 40rpx;
width: 686rpx;
height: 100rpx;
background: #f7f6fb;
border-radius: 10rpx;
margin: 0 auto;
line-height: 100rpx;
margin-top: 32rpx;
span {
display: inline-block;
font-size: 40rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding-left: 26rpx;
}
input {
height: 100%;
}
}
.OtherMoney view:nth-child(2) {
// width: 30rpx;
// height: 30rpx;
// background: #F0F0F0;
// border-radius: 50%;
// text-align: center;
// line-height: 30rpx;
// margin-top: 7rpx;
// margin-left: 5rpx;
}
.payType {
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;
}
@media (min-height: 650px) {
.bottomdiv {
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
}
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
margin: 0 auto;
text-align: center;
bottom: 30rpx;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.switchbankCard {
text-align: center;
/* width: 205px; */
// height: 28rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #268ef8;
margin-top: 23rpx;
}
.RechargeConfirmationBox {
position: fixed;
left: 0;
right: 0;
top: 400rpx;
width: 618rpx;
height: 520rpx;
background: #ffffff;
border-radius: 8rpx;
margin: 0 auto;
.RechargeInfo {
width: 560rpx;
height: 100%;
margin: 0 auto;
/deep/ .openCardPhonTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .openCardPhonSmsTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .van-cell {
padding-left: 0;
padding-right: 0;
height: 100rpx;
}
/deep/ .van-button {
background: #1cc48b;
border-radius: 8rpx;
font-size: 10rpx;
}
.RechargeInfo1 {
height: 120rpx;
line-height: 88rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
}
.ContenInfo {
text-align: center;
// width: 383rpx;
height: 159rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #010101;
view {
line-height: 75rpx;
}
}
.BtngGoup {
justify-content: space-between;
display: flex;
margin-top: 40rpx;
view {
width: 100%;
height: 68rpx;
border-radius: 8rpx;
text-align: center;
line-height: 68rpx;
}
view:nth-child(1) {
background: #1cc48b;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ebebeb;
}
view:nth-child(2) {
background: #1cc48b;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
}
}
}
.closePhoneBox {
// width: 35rpx;
height: 35rpx;
position: relative;
right: -20rpx;
top: 20rpx;
text-align: right;
image {
width: 35rpx;
height: 35rpx;
position: relative;
right: 10rpx;
}
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 32rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 42rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositbox {
margin-top: 31rpx;
height: 30rpx;
line-height: 30rpx;
}
.depositImg {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
margin-right: 8rpx;
position: relative;
top: -2rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 50rpx;
// font-family: PingFangSC-Semibold, PingFang SC;
// font-weight: 600;
// color: #010101;
line-height: 50rpx;
width: 323rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
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;
}
html
,
body
,
page
{
width
:
750rpx
;
background
:
linear-gradient
(
180deg
,
#ffffff
0%
,
#fafafa
100%
);
}
.changPhone
{
font-size
:
14px
;
color
:
#39f
;
text-align
:
right
;
}
.showBindCardList
{
.choiceBox
{
text-align
:
center
;
font-weight
:
bold
;
height
:
50px
;
line-height
:
50px
;
padding
:
0
;
border-bottom
:
0
.5px
solid
#e6e6e6
;
}
.ListItem
{
border-bottom
:
1rpx
solid
#e6e6e6
;
font-size
:
30rpx
;
padding
:
25rpx
0
;
background
:
#fff
;
position
:
relative
;
text-align
:
center
;
}
}
.SubmittedSuccessfully
{
width
:
400rpx
!
important
;
height
:
200rpx
!
important
;
margin
:
0
auto
!
important
;
background
:
#000000
;
opacity
:
0
.8
;
border-radius
:
8rpx
;
}
.cardNum
{
width
:
574rpx
;
margin
:
0
auto
;
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
36rpx
;
font-size
:
24rpx
;
.cardNumleft
{
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#ffffff
;
}
.cardNumright
{
font-family
:
PingFang
SC
;
font-weight
:
500
;
text-decoration
:
underline
;
color
:
#ffffff
;
}
}
.RechargeDetailed
{
text-align
:
center
;
// width: 118rpx;
height
:
32rpx
;
margin
:
0
auto
;
font-size
:
30rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
text-decoration
:
underline
;
color
:
#36a8ff
;
margin-top
:
50rpx
;
}
.contentBox
{
width
:
670rpx
;
height
:
376rpx
;
margin
:
0
auto
;
}
.contentDiv
{
height
:
100%
;
// margin-top: 36rpx;
border-radius
:
15rpx
;
background-image
:
url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31)
.
png
");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
width: 574rpx;
margin: 0 auto;
padding-top: 88rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
width: 574rpx;
margin: 0 auto;
margin-top: 20rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.Recharge {
// height: 30rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin-top: 58rpx;
span:nth-child(1) {
width: 4rpx;
height: 30rpx;
background: #23d6a3;
border-radius: 2rpx;
display: inline-block;
position: relative;
top: 5rpx;
}
span:nth-child(2) {
display: inline-block;
margin-left: 16rpx;
}
}
.headview {
display: flex;
justify-content: space-between;
// padding-left: 40rpx;
// padding-right: 40rpx;
padding-top: 36rpx;
width: 574rpx;
margin: 0 auto;
}
.headview .schoolname {
// width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.MoneyBox {
flex-wrap: wrap;
height: auto;
color: #888888;
width: 686rpx;
margin: 0 auto;
overflow: hidden;
}
.choiceClass {
background: rgba(39, 266, 148, 0.1) !important;
color: #28d79c;
}
.MoneyBox view {
width: 220rpx;
height: 120rpx;
background: #ffffff;
border-radius: 8rpx;
border: 1rpx solid #eeeeee;
margin-top: 16rpx;
text-align: center;
position: relative;
box-shadow: 0px 9rpx 23rpx 0rpx rgba(25, 26, 88, 0.07);
margin-right: 2px;
float: left;
}
.depotMoney .value {
font-size: 45rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 120rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
// height: 33rpx;
// background: linear-gradient(180deg, #FA6400 0%, #FD9D00 100%);
// border-radius: 4rpx;
// font-size: 18rpx;
// font-weight: 500;
// padding: 4rpx;
// text-align: center;
// float: right;
// position: absolute;
// right: 0rpx;
// line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: flex-start;
// color: #999999;
// font-size: 28rpx;
// font-family: PingFangSC-Regular, PingFang SC;
// font-weight: 400;
// color: #999999;
// line-height: 40rpx;
width: 686rpx;
height: 100rpx;
background: #f7f6fb;
border-radius: 10rpx;
margin: 0 auto;
line-height: 100rpx;
margin-top: 32rpx;
span {
display: inline-block;
font-size: 40rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding-left: 26rpx;
}
input {
height: 100%;
}
}
.OtherMoney view:nth-child(2) {
// width: 30rpx;
// height: 30rpx;
// background: #F0F0F0;
// border-radius: 50%;
// text-align: center;
// line-height: 30rpx;
// margin-top: 7rpx;
// margin-left: 5rpx;
}
.payType {
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;
}
@media (min-height: 650px) {
.bottomdiv {
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
}
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
margin: 0 auto;
text-align: center;
bottom: 30rpx;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.switchbankCard {
text-align: center;
/* width: 205px; */
// height: 28rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #268ef8;
margin-top: 23rpx;
}
.RechargeConfirmationBox {
position: fixed;
left: 0;
right: 0;
top: 400rpx;
width: 618rpx;
height: 520rpx;
background: #ffffff;
border-radius: 8rpx;
margin: 0 auto;
.RechargeInfo {
width: 560rpx;
height: 100%;
margin: 0 auto;
/deep/ .openCardPhonTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .openCardPhonSmsTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .van-cell {
padding-left: 0;
padding-right: 0;
height: 100rpx;
}
/deep/ .van-button {
background: #1cc48b;
border-radius: 8rpx;
font-size: 10rpx;
}
.RechargeInfo1 {
height: 120rpx;
line-height: 88rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
}
.ContenInfo {
text-align: center;
// width: 383rpx;
height: 159rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #010101;
view {
line-height: 75rpx;
}
}
.BtngGoup {
justify-content: space-between;
display: flex;
margin-top: 40rpx;
view {
width: 100%;
height: 68rpx;
border-radius: 8rpx;
text-align: center;
line-height: 68rpx;
}
view:nth-child(1) {
background: #1cc48b;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ebebeb;
}
view:nth-child(2) {
background: #1cc48b;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
}
}
}
.closePhoneBox {
// width: 35rpx;
height: 35rpx;
position: relative;
right: -20rpx;
top: 20rpx;
text-align: right;
image {
width: 35rpx;
height: 35rpx;
position: relative;
right: 10rpx;
}
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 32rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 42rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositbox {
margin-top: 31rpx;
height: 30rpx;
line-height: 30rpx;
}
.depositImg {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
margin-right: 8rpx;
position: relative;
top: -2rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 50rpx;
// font-family: PingFangSC-Semibold, PingFang SC;
// font-weight: 600;
// color: #010101;
line-height: 50rpx;
width: 323rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
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;
}
/deep/ .signAlert {
/deep/ .van-dialog__message {
line-height: 60rpx;
}
/deep/ .signAlert .van-dialog__confirm {
width: 200rpx !important;
flex: none !important;
margin: 0 auto;
}
}
/deep/ uni-input.otherMoneyInput {
height: 120rpx;
line-height: 120rpx;
font-weight: 600;
}
</
style
>
src/pages/IcbcModule/Recharge/Recharge.vue
View file @
75f4a2e4
...
...
@@ -97,7 +97,8 @@
>
</view>
<!-- 充值其它金额 -->
<view
class=
"OtherMoney"
v-if=
"isOtherMoney"
>
<!--
<view
class=
"OtherMoney"
v-if=
"isOtherMoney"
>
-->
<view
class=
"OtherMoney"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
...
...
@@ -321,10 +322,6 @@ export default {
lable
:
"
元
"
,
value
:
1000
,
},
{
lable
:
"
其他金额
"
,
value
:
""
,
},
],
numberList
:
[],
tempFiles1
:
"
../../static/img/idCardBg1.png
"
,
//上传身份证临时选择文件
...
...
@@ -453,6 +450,8 @@ export default {
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
;
this_
.
MoneyIndex
=
-
1
;
this_
.
isOtherMoney
=
true
;
let
obj
=
e
.
detail
;
this
.
$nextTick
(
function
()
{
obj
.
value
=
obj
.
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除"数字"和"."以外的字符
...
...
@@ -636,16 +635,17 @@ export default {
},
// 快捷选择金额
async
depotMoney
(
value
,
MoneyIndex
)
{
console
.
log
(
value
);
if
(
!
value
)
{
this
.
isOtherMoney
=
true
;
this
.
Money
=
""
;
this
.
MoneyIndex
=
MoneyIndex
;
return
;
}
//
console.log(value);
//
if (!value) {
//
this.isOtherMoney = true;
//
this.Money = "";
//
this.MoneyIndex = MoneyIndex;
//
return;
//
}
this
.
isOtherMoney
=
false
;
this
.
Money
=
parseInt
(
value
);
this
.
MoneyIndex
=
MoneyIndex
;
this
.
inputOtherM
=
""
;
this
.
Money
=
parseInt
(
value
);
this
.
MoneyIndex
=
MoneyIndex
;
},
//按钮操作
HideHTML
(
dom
,
type
)
{
...
...
src/pages/ReceiveMoney/ReceiveMoney.vue
0 → 100644
View file @
75f4a2e4
<
template
>
<view
class=
"contaner"
>
<view
class=
"headerbox"
>
<image
src=
"../../static/ReceiveMoney.png"
mode=
"aspectFit"
></image>
</view>
<view
class=
"LoginBox"
>
<view
class=
"phon"
>
<input
type=
"number"
class=
"phonNumber"
:adjust-position=
"true"
maxlength=
"11"
v-model=
"phonNumber"
value=
""
placeholder=
"请输入手机号"
placeholder-class=
"placeholder"
/>
</view>
<view
class=
"phon"
style=
"margin-top: 50rpx;"
>
<input
type=
"text"
class=
"phonNumber"
:adjust-position=
"true"
v-model=
"studentName"
value=
""
placeholder=
"请输入学生姓名"
placeholder-class=
"placeholder"
/>
</view>
<view
class=
"VerificationCode"
>
<input
type=
"number"
class=
"code"
value=
""
:adjust-position=
"true"
maxlength=
"6"
v-model=
"VerificationCode"
placeholder=
"请输入验证码"
placeholder-class=
"placeholder"
/>
<view
class=
"sendBtn"
@
click=
"getVerificationCode"
>
{{
timer
?
second
+
'
s后获取
'
:
'
获取验证码
'
}}
</view>
</view>
<view
class=
"ReceiveMoney"
@
tap=
"ReceiveMoney"
>
领取红包
</view>
</view>
<!-- 温馨提示 -->
<view
class=
"activity"
>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
ReceiveMoney
"
,
data
()
{
return
{
phonNumber
:
""
,
VerificationCode
:
""
,
studentName
:
""
,
timer
:
null
,
second
:
3
}
},
methods
:
{
// 获取验证码
async
getVerificationCode
()
{
try
{
if
(
!
this
.
phonNumber
)
{
this
.
$toast
(
"
请输入手机号码!
"
);
return
}
if
(
this
.
timer
)
{
return
}
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'
请稍后...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
this
.
timer
=
setInterval
(()
=>
{
this
.
second
--
;
if
(
!
this
.
second
)
{
clearInterval
(
this
.
timer
);
// 手动清除 Toast
this
.
$toast
.
clear
();
this
.
second
=
60
this
.
timer
=
null
}
},
1000
);
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
// 验证手机号码领取红包
async
ReceiveMoney
()
{
try
{
if
(
!
this
.
phonNumber
)
{
this
.
$toast
(
"
请输入手机号码!
"
);
return
}
if
(
!
this
.
VerificationCode
)
{
this
.
$toast
(
"
请输入验证码!
"
);
return
}
this
.
$toast
.
loading
({
duration
:
3000
,
message
:
'
请稍后...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
3000
)
})
await
this
.
$dialog
.
alert
({
title
:
'
系统提示
'
,
message
:
'
领取成功!
'
,
theme
:
'
round-button
'
,
});
if
(
typeof
WeixinJSBridge
!==
'
undefined
'
)
{
WeixinJSBridge
.
call
(
'
closeWindow
'
);
}
else
{
window
.
opener
=
null
;
window
.
close
()
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
warn
(
"
----
"
,
e
);
}
}
}
}
</
script
>
<
style
>
page
{
width
:
750
pxr
;
height
:
100vh
;
background
:
linear-gradient
(
0deg
,
#790003
0%
,
#BD000B
100%
);
position
:
relative
;
}
.headerbox
{
width
:
750
rpx
;
height
:
268
rpx
;
}
.headerbox
image
{
width
:
100%
;
height
:
100%
;
position
:
relative
;
}
.LoginBox
{
width
:
570
rpx
;
height
:
450
rpx
;
margin
:
0
auto
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
404
rpx
;
}
.placeholder
{
/* width: 310rpx; */
font-size
:
30
rpx
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
400
;
color
:
#999999
;
/* padding-left: 31rpx; */
}
.phonNumber
{
/* width: 570rpx; */
height
:
100
rpx
;
background
:
#FFFFFF
;
border-radius
:
8
rpx
;
padding-left
:
31
rpx
;
}
.VerificationCode
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
50
rpx
;
}
.code
{
width
:
350
rpx
;
height
:
100
rpx
;
background
:
#FFFFFF
;
border-radius
:
8
rpx
;
padding-left
:
31
rpx
;
}
.sendBtn
{
width
:
170
rpx
;
height
:
100
rpx
;
background
:
#FFE49C
;
border-radius
:
8
rpx
;
line-height
:
100
rpx
;
text-align
:
center
;
font-size
:
28
rpx
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
400
;
color
:
#222222
;
}
.ReceiveMoney
{
width
:
570
rpx
;
height
:
100
rpx
;
background
:
#FFC948
;
border-radius
:
8
rpx
;
line-height
:
100
rpx
;
text-align
:
center
;
font-size
:
36
rpx
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
500
;
color
:
#222222
;
margin-top
:
100
rpx
;
}
</
style
>
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
View file @
75f4a2e4
...
...
@@ -36,7 +36,7 @@
<text
class=
"name"
>
年级班级:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
userGrade
||
""
}}
{{
ChargeProDetail
.
userClass
||
""
}}
班
</text>
</view>
<view
class=
"rowInfo"
>
<view
class=
"rowInfo"
v-if=
"false"
>
<text
class=
"name"
>
订单编号:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
tradeId
||
""
}}
</text>
</view>
...
...
@@ -164,6 +164,12 @@
if
(
options
.
PaymentRsults
)
{
this_
.
dialogShow
=
true
this
.
PaymentRsults
=
parseInt
(
options
.
PaymentRsults
);
if
(
this
.
PaymentRsults
==
1
)
{
// 支付成功返回交费项目列表
setTimeout
(()
=>
{
this_
.
dialogClosed
()
},
3000
)
}
// 上报支付结果
this
.
returnPaymentResult
(
uni
.
getStorageSync
(
"
prepayId
"
).
tradeId
,
this
.
PaymentRsults
)
}
...
...
src/pages/StudentPayment/PayProgress/PayProgress.vue
0 → 100644
View file @
75f4a2e4
<
template
>
<view
class=
"tainer"
>
<van-dialog
v-model=
"dialogShow"
:show-confirm-button=
"false"
:show-cancel-button=
"false"
:closeOnClickOverlay=
"true"
>
<view
class=
"OneExpeditingBox"
>
<image
style=
"width: 88rpx;height: 88rpx;"
mode=
'widthFix'
:src=
"ImgUrl+'StudentPayment/Tips.png'"
>
</image>
<view
class=
"title1"
>
是否发送信息
</view>
<view
class=
"title2"
>
给未交纳费用的家长发送信息,提醒其
交纳费用?
</view>
<view
class=
""
style=
"background: #E6E6E6;height: 1rpx; margin-top: 30rpx;"
>
</view>
<view
class=
"dialogBtnGrou"
>
<view
class=
"cancelBtn"
@
click=
"dialogShow=false"
>
取消
</view>
<view
class=
""
style=
"background: #E6E6E6;width: 1rpx;"
>
</view>
<view
class=
"confirmBtn"
@
click=
"OneExpediting(OneExpeditingData)"
>
确认
</view>
</view>
</view>
</van-dialog>
<van-tabs
ref=
"tabs"
title-inactive-color=
"#999999"
title-active-color=
"#333333"
sticky
animated
v-model:active=
"active"
swipeable
color=
"#01CB88"
background=
"#FFFFFF"
line-width=
"30px"
line-height=
"4px"
@
change=
"PayProjectTab"
>
<van-tab
:title=
"vanTab[0]"
title-class=
"PayProjectTab PayProjectList"
>
<!-- 收费项目 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"ChargePaymentPageList.length>0"
>
<view
class=
"container ProjectList"
v-for=
"(item,index) in ChargePaymentPageList"
:key=
"index"
>
<view
class=
"listitem top"
@
tap=
"PayProgressDetails(item)"
>
<view
class=
"title"
>
{{
item
.
chargeName
}}
</view>
</view>
<view
class=
"hairline"
style=
"width: 620rpx;height: 1rpx;background-color: #E6E6E6;margin: 0 auto;margin-top: 28rpx;"
>
</view>
<view
class=
"contentTxt"
@
tap=
"PayProgressDetails(item)"
>
<view
class=
"left"
>
<text>
未交纳人数:
</text>
<text>
{{
item
.
nopayNum
}}
</text>
</view>
<view
class=
"right"
>
<text>
已交纳人数:
</text>
<text>
{{
item
.
paiedNum
}}
</text>
</view>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
<van-icon
name=
"clock-o"
/>
<text
class=
"Tips"
@
tap=
"PayProgressDetails(item)"
>
{{
item
.
diffTime
}}
收费结束
</text>
<view
class=
"OneExpediting"
v-if=
"item.nopayNum>0"
@
click=
"OneExpeditingPop(item)"
>
一键催交
</view>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width: 301rpx;height: 258rpx;"
:src=
"ImgUrl+'StudentPayment/NoRecord.png'"
mode=
'widthFix'
></image>
<view>
暂无数据
</view>
</view>
</view>
</van-tab>
<van-tab
:title=
"vanTab[1]"
title-class=
"PayProjectTab PayProjectHistory"
>
<!-- 缴费历史 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"ChargeEndPageList.length>0"
>
<view
class=
"container ProjectHistory"
v-for=
"(item,index) in ChargeEndPageList"
:key=
"index"
@
tap=
"PayProgressDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
{{
item
.
chargeName
}}
</view>
</view>
<view
class=
"hairline"
style=
"width: 620rpx;height: 1rpx;background-color: #E6E6E6;margin: 0 auto;margin-top: 28rpx;"
>
</view>
<view
class=
"contentTxt"
>
<view
class=
"left"
>
<text>
未交纳人数:
</text>
<text>
{{
item
.
nopayNum
}}
</text>
</view>
<view
class=
"right"
>
<text>
已交纳人数:
</text>
<text>
{{
item
.
paiedNum
}}
</text>
</view>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width: 290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命加载
</view>
<view
class=
"bottomtxt"
>
暂无数据
</view>
</view>
</view>
</van-tab>
</van-tabs>
</view>
</
template
>
<
script
>
// 时间处理模块
import
dayjs
from
'
dayjs
'
let
orderApi
=
window
.
location
.
origin
export
default
{
name
:
"
PayProgress
"
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
active
:
0
,
vanTab
:
[
'
交费中
'
,
'
已结束
'
],
ChargePaymentPageList
:
[],
ChargeEndPageList
:
[],
pageCurrent
:
1
,
pageSize
:
10
,
total
:
0
,
allData
:
{},
// 弹框
dialogShow
:
false
,
// 一键催缴的数据
OneExpeditingData
:
{}
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
"
PayProject
"
,
options
);
if
(
options
.
seesionID
&&
options
.
userID
&&
options
.
schoolId
)
{
uni
.
setStorageSync
(
"
personalInfo
"
,
{
userId
:
options
.
userID
||
''
,
seesionID
:
options
.
seesionID
||
''
,
schoolId
:
options
.
schoolId
||
''
,
openId
:
options
.
openId
})
this
.
allData
=
options
}
else
{
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
)
this
.
allData
=
Object
.
assign
(
options
,
personalInfo
)
}
this
.
queryChargePaymentPage
()
},
onPullDownRefresh
:
function
(
e
)
{
console
.
log
(
"
onPullDownRefresh
"
,
e
);
},
onReachBottom
:
function
(
e
)
{
console
.
log
(
"
onReachBottom
"
,
e
);
this
.
pageCurrent
=
this
.
pageCurrent
+
1
if
(
this
.
active
==
0
)
{
this
.
queryChargePaymentPage
()
return
}
this
.
queryChargeEndPage
()
},
methods
:
{
// 一键催缴弹框
async
OneExpeditingPop
(
ItemData
)
{
try
{
this
.
dialogShow
=
true
;
this
.
OneExpeditingData
=
ItemData
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 一键催缴
async
OneExpediting
()
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/paymentNoticeAll
'
},
{
"
chargeId
"
:
this
.
OneExpeditingData
?
this
.
OneExpeditingData
.
id
:
''
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
})
if
(
data
.
code
!=
200
)
{
this
.
dialogShow
=
false
;
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
this
.
dialogShow
=
false
;
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 切换tab
async
PayProjectTab
(
index
)
{
try
{
this
.
pageCurrent
=
1
if
(
index
>
0
)
{
this
.
queryChargeEndPage
(
index
)
return
}
this
.
queryChargePaymentPage
(
index
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
// 交费中项目信息分页查询
async
queryChargePaymentPage
(
index
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/queryChargePaymentPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
ChargePaymentPageList
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
let
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
hour
'
);
if
(
diffTime
>
24
)
{
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
day
'
);
s
.
diffTime
=
diffTime
+
'
天后
'
}
else
{
s
.
diffTime
=
1
+
'
天后
'
}
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
ChargePaymentPageList
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
ChargePaymentPageList
.
push
(...
newArr
)
return
}
}
else
{
this
.
ChargePaymentPageList
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 交费项目已结束信息分页查询
async
queryChargeEndPage
(
index
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/queryChargeEndPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
ChargeEndPageList
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
ChargeEndPageList
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
ChargeEndPageList
.
push
(...
newArr
)
return
}
}
else
{
this
.
ChargeEndPageList
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 收费项目详情
async
PayProgressDetails
(
data
)
{
try
{
console
.
log
(
data
);
uni
.
setStorageSync
(
"
PayProgressDetails
"
,
data
)
uni
.
navigateTo
({
url
:
`../PayProgressDetails/PayProgressDetails?active=
${
this
.
active
}
&chargeId=
${
data
.
id
||
''
}
`
})
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
background
:
#F3F5F6
;
}
.noData
{
text-align
:
center
;
margin-top
:
316rpx
;
image
{
position
:
relative
;
}
}
.tainer
{
.OneExpeditingBox
{
text-align
:
center
;
margin-top
:
50rpx
;
}
.title1
{
font-size
:
36rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#666666
;
}
.title2
{
width
:
440rpx
;
font-size
:
26rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#666666
;
margin
:
0
auto
;
margin-top
:
30rpx
;
}
.dialogBtnGrou
{
height
:
88rpx
;
line-height
:
88rpx
;
display
:
flex
;
justify-content
:
space-around
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
.cancelBtn
{
width
:
100%
;
color
:
#999999
;
}
.confirmBtn
{
width
:
100%
;
color
:
#01CB88
;
}
}
}
.ListBox
{
width
:
750rpx
;
min-height
:
100%
;
background
:
#F3F5F6
;
padding-top
:
12rpx
;
padding-bottom
:
100rpx
;
.container
{
width
:
686rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
margin-top
:
20rpx
;
}
.container
{
font-family
:
PingFang
SC
;
.top
{
.title
{
width
:
266rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36rpx
;
padding-left
:
31rpx
;
padding-top
:
30rpx
;
word-break
:
break-all
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.money
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
bold
;
color
:
#01CB88
;
line-height
:
36rpx
;
padding-left
:
230rpx
;
padding-top
:
30rpx
;
}
.
money
:
:
before
{
content
:
"¥"
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#01CB88
;
}
}
.center
{
.describe
{
width
:
614rpx
;
height
:
63rpx
;
font-size
:
28rpx
;
font-weight
:
500
;
color
:
#666666
;
line-height
:
36rpx
;
padding-top
:
38rpx
;
padding-left
:
32rpx
;
overflow-y
:
auto
;
}
}
.botto
{
// padding-top: 30rpx;
padding-left
:
32rpx
;
font-size
:
24rpx
;
font-weight
:
500
;
color
:
#BABABA
;
height
:
95rpx
;
.Tips
{
padding-left
:
10rpx
;
}
}
.contentTxt
{
width
:
620rpx
;
margin
:
0
auto
;
display
:
flex
;
flex-direction
:
row
;
height
:
100rpx
;
line-height
:
100rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
.left
,
.right
{
display
:
flex
;
align-items
:
center
;
}
.left
text
:nth-child
(
2
)
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
500
;
color
:
#FF3B00
;
}
.right
{
padding-left
:
79rpx
;
}
.right
text
:nth-child
(
2
)
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
500
;
color
:
#333333
;
}
}
.OneExpediting
{
width
:
176rpx
;
height
:
60rpx
;
background
:
#01CB88
;
border-radius
:
30rpx
;
text-align
:
center
;
line-height
:
60rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#FFFFFF
;
position
:
relative
;
left
:
250rpx
;
}
}
.ProjectHistory
{}
.listitem
{
display
:
flex
;
align-items
:
center
;
}
.bottomtxt
{
height
:
21rpx
;
font-size
:
22rpx
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
90rpx
;
text-align
:
center
;
}
}
.van-tabs__content
{
width
:
100%
;
height
:
100%
;
position
:
fixed
;
left
:
0
;
z-index
:
999
;
overflow
:
scroll
}
.van-tabs
{
.PayProjectTab
{
height
:
200rpx
;
}
}
</
style
>
src/pages/StudentPayment/PayProgressDetails/PayProgressDetails.vue
0 → 100644
View file @
75f4a2e4
<
template
>
<view
class=
"contaner"
>
<view
class=
"queryBox"
>
<view
class=
"search"
>
<van-search
class=
"inputSearch"
v-model=
"searchValue"
show-action
placeholder=
"请输入姓名查询"
@
search=
"onSearch"
>
<template
#action
>
<div
class=
"SearchBtn"
@
click=
"onSearch"
>
查询
</div>
</
template
>
</van-search>
</view>
<van-dropdown-menu
class=
"dropdownMenu"
active-color=
"#01CB88"
>
<van-dropdown-item
v-model=
"classId"
:title=
"dropTitle"
@
change=
"dropItemChange1"
>
<van-tree-select
main-active-class=
"tree_father"
content-active-class=
"tree_father"
:items=
"items"
@
click-item=
"treeSelect "
:active-id.sync=
"activeIds"
:main-active-index.sync=
"activeIndex"
max=
"1"
/>
</van-dropdown-item>
<van-dropdown-item
v-model=
"payStatus"
@
change=
"dropItemChange2"
:options=
"option2"
/>
</van-dropdown-menu>
</view>
<!-- 数据列表 -->
<view
class=
"ChargeUserPageListBox"
v-if=
"ChargeUserPageList.length>0"
>
<view
class=
"PageItemList"
v-for=
"(item,index) in ChargeUserPageList"
:key=
"index"
>
<view
class=
"hrow"
>
<view
class=
"left "
>
<text
class=
"name"
>
{{item.userName||''}}
</text>
<text
class=
"payStatus"
v-if=
"item.payStatus==2"
:style=
"{'background':'#FFECE6','color': '#FF3B00'}"
>
未交纳
</text>
<text
class=
"payStatus"
v-if=
"item.payStatus==1"
:style=
"{'background':'#E4FBF3','color': '#01CB88'}"
>
已交纳
</text>
</view>
<view
class=
"right"
v-if=
"item.payStatus==1"
>
<text>
实交纳:
</text>
<text
class=
"money"
>
{{item.amount/100||""}}
</text>
</view>
</view>
<view
class=
"paymentNotice"
@
tap=
"paymentNotice(item)"
v-if=
"item.payStatus==2&&allData.active==0"
>
催交
</view>
<view
class=
"class_name"
>
<text>
{{(item.userClass||'')+'/'+(item.userGrade||'')}}
</text>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
<!-- -->
<view
class=
"noData"
v-else
>
<image
style=
"width: 301rpx;height: 258rpx;"
:src=
"ImgUrl+'StudentPayment/NoRecord.png'"
mode=
'widthFix'
>
</image>
<view>
暂无更多数据
</view>
</view>
</view>
</template>
<
script
>
// 时间处理模块
import
dayjs
from
'
dayjs
'
let
orderApi
=
window
.
location
.
origin
import
{
Dialog
}
from
'
vant
'
;
export
default
{
name
:
"
PayProgressDetails
"
,
data
()
{
return
{
searchValue
:
""
,
classId
:
''
,
payStatus
:
''
,
option1
:
[{
text
:
'
请选择年级
'
,
value
:
0
},
{
text
:
'
当前教职工管理年级
'
,
value
:
1
},
{
text
:
'
当前选择年级下的班级
'
,
value
:
2
},
],
option2
:
[{
text
:
'
请选择状态
'
,
value
:
''
},
{
text
:
'
已交费
'
,
value
:
1
},
{
text
:
'
未交费
'
,
value
:
2
},
],
ImgUrl
:
this
.
$ImgUrl
,
pageCurrent
:
1
,
pageSize
:
10
,
total
:
0
,
// 交费项目用户分页查询
ChargeUserPageList
:
[],
items
:
[],
activeIds
:
[],
activeIndex
:
0
,
dropTitle
:
"
请选择年级
"
}
},
onLoad
:
function
(
options
)
{
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
)
this
.
allData
=
Object
.
assign
(
options
,
personalInfo
)
this
.
queryChargeUserPage
(
options
.
chargeId
)
this
.
queryTeacherClassList
()
},
onReachBottom
:
function
(
e
)
{
console
.
log
(
"
onReachBottom
"
,
e
);
this
.
pageCurrent
=
this
.
pageCurrent
+
1
this
.
queryChargeUserPage
(
this
.
allData
.
chargeId
,
this
.
searchValue
)
},
methods
:
{
// 查询教职工管理的年级班级列表
async
queryTeacherClassList
()
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/charge/group/queryTeacherClassList
'
},
{
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
this
.
dialogShow
=
false
;
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
if
(
data
.
data
&&
Array
.
isArray
(
data
.
data
))
{
let
tmp
=
data
.
data
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
s
.
text
=
s
.
groupname
;
// 导航节点额外类名
s
.
className
=
'
my-class
'
;
let
tmp2
=
[]
for
(
let
i
=
0
;
i
<
s
.
classes
.
length
;
i
++
)
{
let
s2
=
s
.
classes
[
i
]
s2
.
text
=
s2
.
groupname
;
tmp2
.
push
(
s2
)
}
s
.
children
=
tmp2
newArr
.
push
(
s
)
}
this
.
items
=
newArr
}
else
{
this
.
items
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 一键催缴
async
paymentNotice
(
item
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/paymentNotice
'
},
{
"
chargeId
"
:
item
.
chargeId
||
''
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
item
.
userId
})
if
(
data
.
code
!=
200
)
{
this
.
dialogShow
=
false
;
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
await
Dialog
.
alert
({
confirmButtonColor
:
"
#01CB88
"
,
title
:
'
系统提示
'
,
message
:
'
催缴成功!
'
,
})
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 下拉选择年纪班级
async
treeSelect
(
value
)
{
try
{
this
.
classId
=
value
.
id
let
children
=
this
.
items
[
this
.
activeIndex
].
children
children
=
children
.
filter
(
v
=>
{
return
this
.
activeIds
[
0
]
==
v
.
id
}).
map
(
v
=>
{
return
v
.
text
}).
join
()
this
.
dropTitle
=
this
.
items
[
this
.
activeIndex
].
groupname
+
"
/
"
+
children
this
.
pageCurrent
=
1
this
.
queryChargeUserPage
(
this
.
allData
.
chargeId
,
this
.
searchValue
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 下拉选择
async
dropItemChange1
(
value
)
{
try
{
console
.
warn
(
value
)
this
.
pageCurrent
=
1
this
.
queryChargeUserPage
(
this
.
allData
.
chargeId
,
this
.
searchValue
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
async
dropItemChange2
(
value
)
{
try
{
console
.
warn
(
value
)
this
.
pageCurrent
=
1
this
.
queryChargeUserPage
(
this
.
allData
.
chargeId
,
this
.
searchValue
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 搜索框
async
onSearch
(
value
)
{
try
{
console
.
warn
(
value
)
this
.
pageCurrent
=
1
this
.
queryChargeUserPage
(
this
.
allData
.
chargeId
,
this
.
searchValue
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 交费项目用户分页查询
async
queryChargeUserPage
(
chargeId
,
userName
)
{
try
{
this
.
activeIds
=
[];
this
.
activeIndex
=
-
1
;
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/queryChargeUserPage
'
},
{
userName
,
chargeId
,
"
classId
"
:
this
.
classId
,
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
payStatus
"
:
this
.
payStatus
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
ChargeUserPageList
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
// [1, 2, 3, 4, 5, 6].map(v => {
// return {
// payStatus: parseInt(Math.random() * 2) + 1,
// amount: "100",
// id: 1
// }
// })
for
(
let
s
of
tmp
)
{
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
ChargeUserPageList
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
ChargeUserPageList
.
push
(...
newArr
)
return
}
}
else
{
this
.
ChargeUserPageList
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
background
:
#F3F5F6
;
}
.bottomtxt
{
// height: 21rpx;
font-size
:
22rpx
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
90rpx
;
text-align
:
center
;
}
.noData
{
text-align
:
center
;
margin-top
:
316rpx
;
image
{
position
:
relative
;
}
}
.queryBox
{
background
:
#FFFFFF
;
padding-top
:
12rpx
;
.search
{
width
:
686rpx
;
height
:
70rpx
;
background
:
#FFFFFF
;
border
:
2rpx
solid
#01CB88
;
border-radius
:
35rpx
;
margin
:
0
auto
;
.SearchBtn
{
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#01CB88
;
}
.inputSearch
{
height
:
100%
;
width
:
92%
;
margin
:
0
auto
;
padding
:
0
!
important
;
.van-search__content
{
background
:
#FFFFFF
;
height
:
90%
;
}
}
}
}
.
my-class
:
:
before
{
background-color
:
#01CB88
;
}
.van-tree-select__item--active
{
color
:
#01CB88
;
}
.ChargeUserPageListBox
{
padding-top
:
10rpx
;
width
:
686rpx
;
height
:
170rpx
;
margin
:
0
auto
;
.PageItemList
{
width
:
686rpx
;
height
:
170rpx
;
background
:
#FFFFFF
;
border-radius
:
24rpx
;
margin
:
0
auto
;
margin-top
:
20rpx
;
// padding-left: 32rpx;
// padding-right: 32rpx;
position
:
relative
;
}
.paymentNotice
{
width
:
118rpx
;
height
:
60rpx
;
background
:
#01CB88
;
border-radius
:
30rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
60rpx
;
position
:
absolute
;
right
:
32rpx
;
bottom
:
55rpx
;
}
.hrow
{
padding-left
:
32rpx
;
padding-right
:
32rpx
;
display
:
flex
;
justify-content
:
space-between
;
.left
{
display
:
flex
;
align-items
:
center
;
height
:
100rpx
;
.name
{
font-size
:
42rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#333333
;
}
}
.payStatus
{
width
:
94rpx
;
height
:
34rpx
;
border-radius
:
8rpx
;
line-height
:
34rpx
;
font-size
:
24rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
text-align
:
center
;
margin-left
:
20rpx
;
}
.right
{
height
:
100rpx
;
line-height
:
100rpx
;
display
:
flex
;
align-items
:
center
;
}
.right
text
:nth-child
(
1
)
{
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#999999
;
}
.right
text
:nth-child
(
2
)
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
500
;
color
:
#333333
;
}
}
.class_name
{
padding-right
:
32rpx
;
padding-left
:
32rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#999999
;
}
}
</
style
>
src/pages/StudentPayment/PayProject/PayProject.vue
View file @
75f4a2e4
...
...
@@ -44,21 +44,30 @@
@
tap=
"PayOrderDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
2022高一春季收费
{{
item
.
chargeName
}}
</view>
<view
class=
"money"
>
100.00
<view
class=
"money"
v-if=
"false"
>
{{
item
.
amountMust
}}
</view>
</view>
<view
class=
"hairline"
style=
"width: 686rpx;height: 1rpx; background-color:#E6E6E6;margin-top: 28rpx;"
>
</view>
<view
class=
"History"
>
<view
class=
"Historyitem"
>
<span>
实交金额:
</span>
<span
class=
"money"
>
{{
item
.
realAmount
/
100
||
""
}}
</span>
</view>
<view
class=
"Historyitem"
>
<span>
交费时间:
</span>
<span>
{{
item
.
payTime
||
""
}}
</span>
</view>
</view>
<view
class=
"listitem center"
>
<text
class=
"describe"
>
本次收费需要收取高一春季开学相关费用,并根据
备注输入相关信息。
{{
item
.
descInfo
||
""
}}
</text>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
<van-icon
name=
"clock-o"
/>
<text
class=
"Tips"
>
5天后收费结束
</text>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
...
...
@@ -66,8 +75,8 @@
<view
class=
"noData"
v-else
>
<image
style=
"width: 290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命开发
</view>
<view
class=
"bottomtxt"
>
详情请联系客服
</view>
<view>
正在玩命加载
</view>
<view
class=
"bottomtxt"
>
暂无历交费项目
</view>
</view>
</view>
</van-tab>
...
...
@@ -116,13 +125,19 @@
onReachBottom
:
function
(
e
)
{
console
.
log
(
"
onReachBottom
"
,
e
);
this
.
pageCurrent
=
this
.
pageCurrent
+
1
this
.
getPayProject
()
if
(
this
.
active
==
0
)
{
this
.
getPayProject
()
return
}
this
.
queryChargeHistoryPage
()
},
methods
:
{
// 切换tab
async
PayProjectTab
(
index
)
{
try
{
this
.
pageCurrent
=
1
if
(
index
>
0
)
{
this
.
queryChargeHistoryPage
(
index
)
return
}
this
.
getPayProject
(
index
)
...
...
@@ -131,6 +146,56 @@
console
.
log
(
e
);
}
},
// 交费历史记录分页查询
async
queryChargeHistoryPage
()
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/app/charge/project/queryChargeHistoryPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
PayProjectHistory
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
s
.
payTime
=
dayjs
(
s
.
payTime
).
format
(
"
YYYY-MM-DD HH:mm:ss
"
);
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
PayProjectHistory
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
PayProjectHistory
.
push
(...
newArr
)
return
}
}
else
{
this
.
PayProjectHistory
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 交费项目信息分页查询
async
getPayProject
(
index
)
{
try
{
...
...
@@ -188,13 +253,19 @@
})
}
},
// 收费项目详情
// 收费项目详情
/历史详情
async
PayOrderDetails
(
data
)
{
try
{
console
.
log
(
data
);
uni
.
setStorageSync
(
"
PayOrderDetails
"
,
data
)
let
url
=
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
if
(
this
.
active
==
0
)
{
url
=
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
}
else
{
url
=
"
../PayProjectHistoryDetails/PayProjectHistoryDetails?chargeId=
"
+
data
.
id
||
''
}
uni
.
navigateTo
({
url
:
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
url
})
}
catch
(
e
)
{
//TODO handle the exception
...
...
@@ -299,10 +370,50 @@
.Tips
{
padding-left
:
10rpx
;
}
span
{
color
:
#333333
;
font-size
:
30rpx
;
}
}
}
.ProjectHistory
{}
.ProjectHistory
{
height
:
330rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
.money
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
bold
;
color
:
#01CB88
;
}
.
money
:
:
before
{
content
:
"¥"
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#01CB88
;
}
.describe
{
padding-top
:
20rpx
!
important
;
}
.History
{
width
:
630rpx
;
margin
:
0
auto
;
.Historyitem
{
height
:
60rpx
;
line-height
:
60rpx
;
display
:
flex
;
justify-content
:
space-between
;
}
}
}
.listitem
{
display
:
flex
;
...
...
src/pages/StudentPayment/PayProjectHistoryDetails/PayProjectHistoryDetails.vue
0 → 100644
View file @
75f4a2e4
<
template
>
<view
class=
"tainer"
>
<view
class=
"headerImg"
>
<view
style=
"width: 686rpx;height: 60rpx;margin: 0 auto;padding-top: 44rpx;"
>
<image
style=
"width: 686rpx;height: 60rpx;"
:src=
"ImgUrl+'StudentPayment/bg3.png'"
mode=
'widthFix'
>
</image>
</view>
<view
class=
"cardInfo"
>
<view
class=
"title"
>
交费详情单
</view>
<!--
<view
class=
"title2"
>
<van-notice-bar
:scrollable=
"ChargeProDetail.descInfo.length>20?true:false"
background=
"#ffffff"
color=
"#333333"
style=
"padding: 0;"
:text=
"ChargeProDetail.descInfo||''"
/>
</view>
-->
<view
style=
"position: relative;"
>
<image
style=
"width: 124rpx;height: 106rpx;position: absolute;top: -110rpx;right: 0;"
:src=
"ImgUrl+'StudentPayment/yijiaona.png'"
mode=
'widthFix'
>
</image>
</view>
<van-divider
dashed
/>
<view
class=
"botto"
>
<view
class=
"rowInfo"
>
<text
class=
"name"
>
订单编号:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
tradeId
||
""
}}
</text>
</view>
<view
class=
"rowInfo"
>
<text
class=
"name"
>
交纳时间:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
payTime
||
""
}}
</text>
</view>
<view
class=
"rowInfo"
>
<text
class=
"name"
>
学生姓名:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
userName
||
""
}}
</text>
</view>
<view
class=
"rowInfo"
>
<text
class=
"name"
>
年级班级:
</text>
<text
class=
"value"
>
{{
ChargeProDetail
.
userGrade
||
""
}}
{{
ChargeProDetail
.
userClass
||
""
}}
班
</text>
</view>
</view>
</view>
</view>
<!-- 收费项目 -->
<view
class=
"PayProject"
>
<view
style=
"padding-top: 20rpx;padding-left: 30rpx;"
>
<view
style=
"font-size: 32rpx;font-family: PingFang SC;font-weight: 500;color: #333333;"
>
{{
ChargeProDetail
.
chargeName
||
""
}}
</view>
<van-notice-bar
:scrollable=
"ChargeProDetail.descInfo.length>20?true:false"
background=
"#ffffff"
color=
"#333333"
style=
"padding: 0; font-family: PingFang SC;font-weight: 500;color: #999999;"
:text=
"ChargeProDetail.descInfo||''"
/>
</view>
<!-- 备注 -->
<view
class=
"remarks"
style=
"height: auto;"
>
<text
class=
"remarksTxt"
style=
"font-size: 32rpx;"
>
交费信息
</text>
</view>
<view
class=
"tabNames"
style=
"background: #F8F8F8;"
>
<view>
收费子项
</view>
<view>
收费类型
</view>
<view>
金额(元)
</view>
</view>
<!-- Project -->
<view
class=
"ProjectBox"
>
<view
class=
"ProjectItem"
style=
"border: none;"
v-for=
"(item,index) in ChargeProDetail.items"
:key=
"index"
v-if=
"!(item.itemAmount==0&&item.mustFlag==0)"
>
<view
class=
"tabNames"
>
<view
class=
"ProjectName"
>
<image
v-if=
"SPayProject(index)"
style=
"width: 32rpx;height: 32rpx;"
:src=
"ImgUrl+'StudentPayment/gx.png'"
mode=
'widthFix'
></image>
<image
v-else
style=
"width: 32rpx;height: 32rpx;"
:src=
"ImgUrl+'StudentPayment/wgx.png'"
mode=
'widthFix'
></image>
<text>
{{
item
.
itemName
}}
</text>
</view>
<view
class=
"ProjectType"
>
{{
[
'
选交项目
'
,
'
必交项目
'
][
item
.
mustFlag
]
}}
</view>
<view
class=
"money"
>
{{
itemAmount
(
item
.
itemAmount
)
}}
</view>
</view>
</view>
</view>
<!-- .......................... -->
<!-- 备注 -->
<view
class=
"remarks"
style=
"height: auto;"
>
<text
class=
"remarksTxt"
style=
"font-size: 32rpx;"
>
支付信息
</text>
</view>
<view
class=
"tabNames"
style=
"background: #F8F8F8;"
>
<view>
支付方式
</view>
<view>
支付单号
</view>
<view>
支付金额
</view>
</view>
<!-- Project -->
<view
class=
"ProjectBox"
style=
"border: none;"
>
<view
class=
"ProjectItem"
style=
"border: none;background-color: white;"
v-for=
"(item,index) in ChargeProDetail.payInfos"
:key=
"index"
>
<view
class=
"tabNames"
>
<view
class=
"ProjectName"
>
<text>
微信
</text>
</view>
<view
class=
"ProjectType"
style=
" overflow: hidden;word-break: break-all; white-space: nowrap;text-overflow: ellipsis;"
>
{{
item
.
transactionId
}}
</view>
<view
class=
"money"
>
{{
itemAmount
(
item
.
amount
)
}}
</view>
</view>
</view>
<!-- 备注 -->
<view
class=
"remarks"
>
<text
class=
"remarksTxt"
>
备注
</text>
<view
class=
"remarksTextarea"
>
{{
ChargeProDetail
.
remarks
||
''
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
/**
* 对象转拼接字符串
* @param {*} res Object 需要转换的数据对象
*/
function
OforS
(
res
)
{
var
resL
=
0
;
var
outS
=
""
;
for
(
var
i
in
res
)
{
if
(
resL
==
0
)
{
outS
+=
""
+
i
+
"
=
"
+
res
[
i
];
}
else
{
outS
+=
"
&
"
+
i
+
"
=
"
+
res
[
i
];
}
resL
++
;
}
return
outS
;
}
let
orderApi
=
window
.
location
.
origin
// 时间处理模块
import
dayjs
from
'
dayjs
'
export
default
{
name
:
"
PayProjectHistoryDetails
"
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
payMoney
:
"
0.00
"
,
// 选择收费子项目
selectPayProject
:
[],
// 选择收费子项目
selectPayProjectObj
:
{},
selectCount
:
0
,
dialogShow
:
false
,
PaymentRsults
:
-
1
,
allData
:
{},
// 交费项目详情信息
ChargeProDetail
:
{
descInfo
:
''
},
// 备注信息
remarks
:
""
,
remarksType
:
[
"
备注
"
,
"
邮箱
"
,
"
手机号码
"
,
"
身份证
"
],
// 费用id
chargeItemIds
:
[]
}
},
onLoad
:
function
(
options
)
{
let
this_
=
this
;
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
)
let
PayOrderDetails
=
uni
.
getStorageSync
(
"
PayOrderDetails
"
)
this
.
allData
=
Object
.
assign
(
options
,
personalInfo
,
{
chargeId
:
PayOrderDetails
.
id
})
this
.
queryChargeHistoryDetail
()
},
onShow
:
function
()
{
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
SPayProject
()
{
return
function
(
index
)
{
if
(
index
==
0
||
index
>
0
)
{
return
this
.
selectPayProject
.
includes
(
index
)
}
else
{
return
false
}
}
}
},
methods
:
{
// 查询交费订单明细信息
async
queryChargeHistoryDetail
()
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/app/charge/project/queryChargeHistoryDetail
'
},
{
"
chargeId
"
:
this
.
allData
.
chargeId
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
})
if
(
data
.
code
!=
200
||
!
data
.
data
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
this
.
ChargeProDetail
=
data
.
data
;
this
.
ChargeProDetail
.
payTime
=
dayjs
(
data
.
data
.
payTime
).
format
(
"
YYYY-MM-DD HH:mm:ss
"
);
// 收费类型必缴项目默认选择
for
(
let
i
=
0
;
i
<
data
.
data
.
items
.
length
;
i
++
)
{
if
(
data
.
data
.
items
[
i
].
mustFlag
==
1
)
{
this
.
selectProject
(
data
.
data
.
items
[
i
],
i
)
}
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 选择支付的项目
async
selectProject
(
data
,
index
)
{
try
{
if
(
!
this
.
selectPayProject
.
includes
(
index
))
{
this
.
selectPayProject
.
push
(
index
)
this
.
selectPayProjectObj
[
index
+
''
]
=
data
}
else
{
let
indexOf
=
this
.
selectPayProject
.
indexOf
(
index
)
this
.
selectPayProject
.
splice
(
indexOf
,
1
)
delete
this
.
selectPayProjectObj
[
index
+
''
]
}
// 计算金额
let
payMoney
=
0
,
// 选择的项目数
selectCount
=
0
,
// 费用id
chargeItemIds
=
[];
for
(
let
key
in
this
.
selectPayProjectObj
)
{
selectCount
++
payMoney
+=
this
.
selectPayProjectObj
[
key
].
itemAmount
;
chargeItemIds
.
push
(
this
.
selectPayProjectObj
[
key
].
id
)
}
this
.
selectCount
=
selectCount
;
this
.
payMoney
=
(
payMoney
/
100
).
toFixed
(
2
);
this
.
chargeItemIds
=
chargeItemIds
;
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
page
,
.tainer
{
background
:
#F3F5F6
;
height
:
100vh
;
}
.PaymentRsults
{
width
:
580rpx
;
height
:
480rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
text-align
:
center
;
text-align
:
center
;
margin
:
0
auto
;
font-family
:
PingFang
SC
;
image
{
top
:
115rpx
;
}
.PaymentRsultsTxt
{
height
:
34rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#333333
;
text-align
:
center
;
margin
:
0
auto
;
margin-top
:
115rpx
;
}
}
.PayProject
,
.remarks
{
width
:
646rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
}
.PayProject
{
height
:
auto
;
margin-top
:
20rpx
;
.ProjectBox
{
height
:
auto
;
// overflow: auto;
.tabNames
{
justify-content
:
flex-start
;
height
:
100%
;
}
.ProjectItem
{
// width: 628rpx;
height
:
100rpx
;
margin
:
0
auto
;
border
:
2rpx
solid
#E6E6E6
;
border-radius
:
16rpx
;
// margin-top: 19rpx;
}
.selectProjectItem
{
border
:
2rpx
solid
#01CB88
!
important
;
background-color
:
rgba
(
1
,
203
,
136
,
0
.1
);
}
.ProjectName
{
margin-left
:
25rpx
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
image
{
display
:
inline-block
;
}
text
{
display
:
inline-block
;
width
:
176rpx
;
overflow
:
hidden
;
word-break
:
break-all
;
margin-left
:
16rpx
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
}
.ProjectName
,
.ProjectType
{
font-size
:
30rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
}
.ProjectType
{
width
:
120rpx
;
// margin-left: 40rpx;
}
.money
{
font-size
:
32rpx
;
font-family
:
DIN
;
font-weight
:
bold
;
color
:
#01CB88
;
width
:
32%
;
text-align
:
right
;
}
.
money
:
:
before
{
content
:
"¥"
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#01CB88
;
}
}
.tabNames
{
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#999999
;
justify-content
:
space-around
;
display
:
flex
;
align-items
:
center
;
height
:
87rpx
;
line-height
:
87rpx
;
}
}
.remarks
{
height
:
220rpx
;
// margin-top: 20rpx;
textarea
{
width
:
100%
;
height
:
100%
;
padding-left
:
30rpx
;
}
.remarksTxt
{
height
:
80rpx
;
line-height
:
80rpx
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#333333
;
margin-left
:
66rpx
;
position
:
relative
;
}
.remarksTxt
:before
{
content
:
" "
;
width
:
25rpx
;
height
:
25rpx
;
background
:
#01CB88
;
border-radius
:
50%
;
position
:
absolute
;
z-index
:
100
;
top
:
10rpx
;
left
:
-40rpx
;
}
.remarksTxt
:after
{
content
:
" "
;
width
:
25rpx
;
height
:
25rpx
;
background
:
#FFB62D
;
border-radius
:
50%
;
position
:
absolute
;
z-index
:
99
;
left
:
-32rpx
;
top
:
10rpx
;
}
.remarksTextarea
{
width
:
576rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
margin
:
0
auto
;
}
}
.headerImg
{
width
:
750rpx
;
height
:
480rpx
;
background-image
:
url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/StudentPayment/bg.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
}
.cardInfo
{
width
:
646rpx
;
height
:
444rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
position
:
relative
;
margin
:
0
auto
;
top
:
-32rpx
;
overflow
:
hidden
;
font-family
:
PingFang
SC
;
background
:
linear-gradient
(
180deg
,
#E2FBF1
1%
,
#FFFFFF
20%
);
.title
{
width
:
370rpx
;
// height: 34rpx;
font-size
:
36rpx
;
font-weight
:
800
;
color
:
#333333
;
margin
:
0
auto
;
margin-top
:
60rpx
;
text-align
:
center
;
}
.title2
{
width
:
599rpx
;
height
:
55rpx
;
font-size
:
24rpx
;
font-weight
:
500
;
color
:
#999999
;
margin
:
0
auto
;
text-align
:
center
;
margin-top
:
24rpx
;
}
.botto
{
.rowInfo
{
font-size
:
30rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
margin-left
:
30rpx
;
line-height
:
60rpx
;
}
.name
{
width
:
128rpx
;
color
:
#999999
;
}
.value
{
width
:
58rpx
;
color
:
#333333
;
}
}
}
</
style
>
src/static/ReceiveMoney.png
0 → 100644
View file @
75f4a2e4
332 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment