|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="container cashier" @touchmove.stop.prevent="discard" @tap="hideKeyboard" v-show="isRepuest">
|
|
|
+ <view class="container cashier" v-show="isRepuest">
|
|
|
<cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
|
|
|
<view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
|
|
|
<view class="container-wrapper">
|
|
@@ -7,16 +7,16 @@
|
|
|
<view class="pay-top">
|
|
|
<view class="pay-paid">
|
|
|
<text class="txt-m">待付金额</text>
|
|
|
- <text class="txt-b"><text class="small">¥</text>{{payableAmount|NumFormat}}</text>
|
|
|
+ <text class="txt-b"><text class="small">¥</text>{{payableAmount | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="pay-payd">
|
|
|
<view class="pay-paids">
|
|
|
<text class="txt-m">应付总额</text>
|
|
|
- <text class="txt-b">¥{{payTotalFee|NumFormat}}</text>
|
|
|
+ <text class="txt-b">¥{{payableAmount | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="pay-paids">
|
|
|
<text class="txt-m">已支付金额</text>
|
|
|
- <text class="txt-b">¥{{receiptAmount|NumFormat}}</text>
|
|
|
+ <text class="txt-b">¥{{receiptAmount | NumFormat}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -41,7 +41,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="pay-record">
|
|
|
+ <view class="pay-record" :style="{paddingBottom:isIphoneX ? '156rpx' : '112rpx'}">
|
|
|
<view class="record-title"><text>支付记录</text></view>
|
|
|
<view class="record-list">
|
|
|
<view class="list-main" v-if="discernReceipt.length>0">
|
|
@@ -55,7 +55,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="pay-button">
|
|
|
+ <view class="pay-button" :style="{paddingBottom:isIphoneX ? '68rpx' : '24rpx'}">
|
|
|
<view class="btn" @click.stop="buttonSubMit" :style="{'background':btnColor}">{{buttonText}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -98,6 +98,7 @@
|
|
|
return{
|
|
|
orderID:'',
|
|
|
payType:'',
|
|
|
+ payWay:'',
|
|
|
isRepuest:false,
|
|
|
payableAmount:0,
|
|
|
receiptAmount:0,
|
|
@@ -155,10 +156,12 @@
|
|
|
this.orderID = e.orderID
|
|
|
switch(this.payType){
|
|
|
case '0':
|
|
|
+ this.payWay = 'WEIXIN'
|
|
|
this.btnColor="#09BB07"
|
|
|
this.buttonText = '去支付'
|
|
|
break;
|
|
|
case '1':
|
|
|
+ this.payWay = 'UNIONPAY'
|
|
|
this.btnColor="#034582"
|
|
|
this.buttonText = '生成支付链接'
|
|
|
break;
|
|
@@ -169,11 +172,11 @@
|
|
|
this.PayService.PayOrderCheckoutCounter({orderId:this.orderID}).then(response =>{
|
|
|
this.isRepuest = true
|
|
|
this.discernReceipt = response.data.discernReceipt //支付记录
|
|
|
- this.payTotalFee = response.data.order.payTotalFee //已付金额
|
|
|
+ this.payTotalFee = response.data.order.payTotalFee //订单总额
|
|
|
this.receiptAmount = response.data.order.receiptAmount //已付金额
|
|
|
- this.payableAmount = (response.data.order.payableAmount - this.receiptAmount).toFixed(2)//待付金额
|
|
|
- this.payAmount = this.payableAmount //自定义金额
|
|
|
- this.balanceAmount = (this.payableAmount - this.payAmount).toFixed(2)// 计算剩余支付金额
|
|
|
+ this.payableAmount = response.data.order.payableAmount - this.receiptAmount//已付金额
|
|
|
+ this.payAmount = this.toFixedFn(this.payableAmount) //自定义金额
|
|
|
+ this.balanceAmount = this.payableAmount - this.payAmount// 计算剩余支付金额
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
})
|
|
@@ -189,6 +192,10 @@
|
|
|
}
|
|
|
},
|
|
|
BuildCatenate(){
|
|
|
+ if(this.payAmount == 0){
|
|
|
+ this.$util.msg("请输入本次支付的金额",2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.payAmount <=10){
|
|
|
this.$util.msg("企业网银支付的金额必须大于¥10.00",2000)
|
|
|
return
|
|
@@ -200,6 +207,10 @@
|
|
|
},
|
|
|
MiniWxPayFor(){
|
|
|
authorize.getCode('weixin').then(wechatcode =>{
|
|
|
+ if(this.payAmount > 50000){
|
|
|
+ this.$util.modal('','本次支付金额已超出微信支付限额,请输入小于5万的金额进行支付','知道了','',false,() =>{})
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.payAmount == 0){
|
|
|
this.$util.msg("请输入本次支付的金额",2000)
|
|
|
return
|
|
@@ -262,12 +273,12 @@
|
|
|
if(value == "" || value <0 ){
|
|
|
this.payAmount = '';
|
|
|
this.balanceAmount = this.payableAmount;
|
|
|
- }else if( value >this.payableAmount){
|
|
|
- this.payAmount = this.payableAmount.toFixed(2)
|
|
|
- this.balanceAmount = (this.payableAmount - this.payAmount).toFixed(2)
|
|
|
+ }else if( value > this.payableAmount){
|
|
|
+ this.payAmount = this.toFixedFn(this.payableAmount)
|
|
|
+ this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
|
|
|
}else{
|
|
|
- this.payAmount =Number(value).toFixed(2)
|
|
|
- this.balanceAmount = this.payableAmount - this.payAmount
|
|
|
+ this.payAmount = this.toFixedFn(value)
|
|
|
+ this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
|
|
|
}
|
|
|
},
|
|
|
hanldNavigateBack(){//页面返回
|
|
@@ -502,8 +513,11 @@
|
|
|
}
|
|
|
.pay-button{
|
|
|
width: 100%;
|
|
|
+ background-color: #FFFFFF;
|
|
|
position: fixed;
|
|
|
- bottom: 80rpx;
|
|
|
+ height: 88rpx;
|
|
|
+ padding-top: 24rpx;
|
|
|
+ bottom: 0;
|
|
|
.btn{
|
|
|
width: 702rpx;
|
|
|
height: 88rpx;
|