|
@@ -7,7 +7,7 @@
|
|
|
<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>{{obligation | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="pay-payd">
|
|
|
<view class="pay-paids">
|
|
@@ -76,41 +76,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!--大额转账弹窗 -->
|
|
|
- <tui-modal :show="modal" :padding="'30rpx 30rpx'" @cancel="hideMobel(0)" :custom="true" fadeIn >
|
|
|
- <view class="tui-modal-custom">
|
|
|
- <view class="tui-prompt-title">大额银联转账信息</view>
|
|
|
- <view class="tui-prompt-text">
|
|
|
- <view class="tui-prompt-tips">请使用银行手机app或者网银输入以下信息进行转账。每次发起支付请求,收款账号都会变化,请使用最新的收款账号进行转账。</view>
|
|
|
- <view class="tui-prompt-item">
|
|
|
- <text class="text">户名:</text>
|
|
|
- {{ bigPayInfo.receiveName }}
|
|
|
- <view class="copy" @click.stop="copyClipboard(bigPayInfo.receiveName)"><text class="iconfont icon-fuzhi_o"></text></view>
|
|
|
- </view>
|
|
|
- <view class="tui-prompt-item">
|
|
|
- <text class="text">收款账号:</text>
|
|
|
- {{ bigPayInfo.receiveAccountNo }}
|
|
|
- <view class="copy" @click.stop="copyClipboard(bigPayInfo.receiveAccountNo)"><text class="iconfont icon-fuzhi_o"></text></view>
|
|
|
- </view>
|
|
|
- <view class="tui-prompt-item">
|
|
|
- <text class="text">银行:</text>
|
|
|
- {{ bigPayInfo.accountName }}
|
|
|
- </view>
|
|
|
- <view class="tui-prompt-item">
|
|
|
- <text class="text">收款方开户地:</text>
|
|
|
- {{ bigPayInfo.areaInfo }}
|
|
|
- </view>
|
|
|
- <view class="tui-prompt-item">
|
|
|
- <text class="text">收款网点:</text>
|
|
|
- {{ bigPayInfo.accountName }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="tui-prompt-flex">
|
|
|
- <view class="btn btn-confirm" @click="handleClick">已完成转账,请点击</view>
|
|
|
- <view class="btn btn-cancel" @click="hideMobel">关闭</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </tui-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -122,14 +87,15 @@
|
|
|
mixins: [wechatPay],
|
|
|
data(){
|
|
|
return{
|
|
|
- orderId:'',
|
|
|
+ orderId:0,
|
|
|
+ shopOrderId:0,
|
|
|
payType:'',
|
|
|
payWay:'',
|
|
|
isRepuest:false,
|
|
|
- payableAmount:0,
|
|
|
- receiptAmount:0,
|
|
|
+ realPay:0,//应付金额
|
|
|
+ receiptAmount:0,// 已付金额
|
|
|
+ obligation:0,//待付金额
|
|
|
balanceAmount:0,
|
|
|
- payTotalFee:0,
|
|
|
payAmount:0,
|
|
|
nvabarData: { //顶部自定义导航
|
|
|
showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
|
|
@@ -148,7 +114,6 @@
|
|
|
discernReceipt:[],
|
|
|
showDigitKeyboard:false,
|
|
|
payHttpUrl:'',
|
|
|
- bigPayInfo:{},// 大额网银转账
|
|
|
mbOrderId:0, // 支付记录订单Id
|
|
|
modal:false,
|
|
|
}
|
|
@@ -182,7 +147,7 @@
|
|
|
initData(e){
|
|
|
this.payType = e.type
|
|
|
console.log(this.payType)
|
|
|
- this.orderId = e.orderId
|
|
|
+ this.shopOrderId = e.shopOrderId
|
|
|
switch(this.payType){
|
|
|
case '0':
|
|
|
this.payWay = 'WEIXIN'
|
|
@@ -199,24 +164,19 @@
|
|
|
this.btnColor='#034582'
|
|
|
this.buttonText = '生成个人网银支付链接'
|
|
|
break
|
|
|
- case '3':
|
|
|
- this.payWay = 'UNIONPAY'
|
|
|
- this.btnColor='#034582'
|
|
|
- this.buttonText = '去转账'
|
|
|
- break
|
|
|
}
|
|
|
this.GetPayOrderInfo()
|
|
|
},
|
|
|
GetPayOrderInfo(){//初始化支付信息
|
|
|
- this.PayService.PayOrderCheckoutCounter({orderId:this.orderId}).then(response =>{
|
|
|
- this.isRepuest = true
|
|
|
- this.discernReceipt = response.data.discernReceipt // 支付记录
|
|
|
- this.payTotalFee = response.data.order.payTotalFee // 订单总额
|
|
|
- this.receiptAmount = response.data.order.receiptAmount // 已付金额
|
|
|
- this.payableAmount = (response.data.order.payableAmount*100 - this.receiptAmount*100)/100// 已付金额
|
|
|
+ this.PayService.PayOrderCheckoutShoporders({shopOrderId:this.shopOrderId}).then(response =>{
|
|
|
+ let data = response.data
|
|
|
+ this.discernReceipt = data.discernReceipt // 支付记录
|
|
|
+ this.obligation = data.shopOrder.obligation // 待付金额
|
|
|
+ this.receiptAmount = data.shopOrder.receiptAmount // 已付金额
|
|
|
+ this.payableAmount = data.shopOrder.realPay // 应付金额
|
|
|
this.payAmount = this.toFixedFn(this.payableAmount) // 自定义金额
|
|
|
- console.log('this.payAmount',this.payAmount)
|
|
|
- this.balanceAmount = this.payableAmount - this.payAmount // 计算剩余支付金额
|
|
|
+ this.balanceAmount = this.obligation - this.payAmount // 计算剩余支付金额
|
|
|
+ this.isRepuest = true
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
})
|
|
@@ -230,7 +190,7 @@
|
|
|
Um_Key_PageName: '微信支付',
|
|
|
Um_Key_SourcePage: '线上支付',
|
|
|
Um_Key_PayName:`${this.buttonText}`,
|
|
|
- Um_Key_PayOrderID:`${this.orderId}`
|
|
|
+ Um_Key_PayOrderID:`${this.shopOrderId}`
|
|
|
})
|
|
|
}
|
|
|
this.MiniWxPayFor()
|
|
@@ -242,7 +202,7 @@
|
|
|
Um_Key_PageName: '企业网银',
|
|
|
Um_Key_SourcePage: '线上支付',
|
|
|
Um_Key_PayName:`${this.buttonText}`,
|
|
|
- Um_Key_PayOrderID:`${this.orderId}`
|
|
|
+ Um_Key_PayOrderID:`${this.shopOrderId}`
|
|
|
})
|
|
|
}
|
|
|
this.BuildCatenate()
|
|
@@ -254,58 +214,12 @@
|
|
|
Um_Key_PageName: '个人网银',
|
|
|
Um_Key_SourcePage: '线上支付',
|
|
|
Um_Key_PayName:`${this.buttonText}`,
|
|
|
- Um_Key_PayOrderID:`${this.orderId}`
|
|
|
+ Um_Key_PayOrderID:`${this.shopOrderId}`
|
|
|
})
|
|
|
}
|
|
|
this.BuildCatenate()
|
|
|
break
|
|
|
- case '3':// 大额支付
|
|
|
- // 友盟埋点收集大额支付
|
|
|
- if(process.env.NODE_ENV != 'development'){
|
|
|
- this.$uma.trackEvent('Um_Event_ConfirmBigbankPay', {
|
|
|
- Um_Key_PageName: '大额支付',
|
|
|
- Um_Key_SourcePage: '线上支付',
|
|
|
- Um_Key_PayName:`${this.buttonText}`,
|
|
|
- Um_Key_PayOrderID:`${this.orderId}`
|
|
|
- })
|
|
|
- }
|
|
|
- this.LargePayment()
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
- LargePayment(){// 大额银联
|
|
|
- if(this.payAmount == 0){
|
|
|
- this.$util.msg('请输入本次支付的金额',2000)
|
|
|
- return
|
|
|
}
|
|
|
- if(this.payAmount <=12){
|
|
|
- this.$util.msg('网银支付的金额必须大于¥12.00',2000)
|
|
|
- return
|
|
|
- }
|
|
|
- this.PayService.PayOrderTransferUnion({payAmount:this.accMul(this.payAmount,100),orderId:this.orderId}).then(response =>{
|
|
|
- this.bigPayInfo = JSON.parse(response.data.data.payInfo)
|
|
|
- this.mbOrderId = response.data.data.mbOrderId
|
|
|
- this.modal = true
|
|
|
- console.log('PayInfo',this.bigPayInfo)
|
|
|
- })
|
|
|
- },
|
|
|
- handleClick(){// 查询是否支付成功
|
|
|
- this.PayService.PayOrderFindOrderStatus({mbOrderId:this.mbOrderId}).then(response =>{
|
|
|
- const data = response.data.data
|
|
|
- const linkData = {
|
|
|
- payAmount:this.payAmount,
|
|
|
- orderId:this.orderId,
|
|
|
- type:data.status === '1' ? 'success' : 'error'
|
|
|
- }
|
|
|
- if(data.status === '1'){
|
|
|
- this.$api.navigateTo(`/pages/user/order/order-success?data=${JSON.stringify({ data: linkData })}`)
|
|
|
- }else{
|
|
|
- this.$api.navigateTo(`/pages/user/order/order-success-tips?data=${JSON.stringify({ data: linkData })}`)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- hideMobel(){
|
|
|
- this.modal = false
|
|
|
},
|
|
|
BuildCatenate(){// 企业网银 个人网银
|
|
|
if(this.payAmount == 0){
|
|
@@ -316,7 +230,7 @@
|
|
|
this.$util.msg('网银支付的金额必须大于¥10.00',2000)
|
|
|
return
|
|
|
}
|
|
|
- this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderId,payType:this.payType}).then(response =>{
|
|
|
+ this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,shopOrderId:this.shopOrderId,payType:this.payType}).then(response =>{
|
|
|
this.payHttpUrl = response.data
|
|
|
this.isShowTip = true
|
|
|
})
|
|
@@ -340,7 +254,7 @@
|
|
|
payAmount:this.payAmount,
|
|
|
payType:'XCX',
|
|
|
code:wechatCode,
|
|
|
- orderId:this.orderId
|
|
|
+ shopOrderId:this.shopOrderId
|
|
|
}
|
|
|
this.weChatMiniOrderWxPay(params)
|
|
|
},
|
|
@@ -364,13 +278,13 @@
|
|
|
}
|
|
|
if(value == '' || value <0 ){
|
|
|
this.payAmount = ''
|
|
|
- this.balanceAmount = this.payableAmount
|
|
|
- }else if( value > this.payableAmount){
|
|
|
- this.payAmount = this.toFixedFn(this.payableAmount)
|
|
|
- this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
|
|
|
+ this.balanceAmount = this.obligation
|
|
|
+ }else if( value > this.obligation){
|
|
|
+ this.payAmount = this.toFixedFn(this.obligation)
|
|
|
+ this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
|
|
|
}else{
|
|
|
this.payAmount = this.toFixedFn(value)
|
|
|
- this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
|
|
|
+ this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
|
|
|
}
|
|
|
},
|
|
|
hanldNavigateBack(){//页面返回
|
|
@@ -422,7 +336,7 @@
|
|
|
Um_Key_PageName: '网银支付',
|
|
|
Um_Key_SourcePage: '线上支付',
|
|
|
Um_Key_PayName:`${this.buttonText}`,
|
|
|
- Um_Key_PayOrderID:`${this.orderId}`
|
|
|
+ Um_Key_PayOrderID:`${this.shopOrderId}`
|
|
|
})
|
|
|
}
|
|
|
} else {
|