|
@@ -23,8 +23,7 @@
|
|
|
v-model="manualAuthCode"
|
|
v-model="manualAuthCode"
|
|
|
type="number"
|
|
type="number"
|
|
|
maxlength="32"
|
|
maxlength="32"
|
|
|
- placeholder="请输入或扫描付款码"
|
|
|
|
|
- :focus="manualInputFocus"
|
|
|
|
|
|
|
+ placeholder="请出示付款码"
|
|
|
@confirm="submitManualCode"
|
|
@confirm="submitManualCode"
|
|
|
/>
|
|
/>
|
|
|
<view class="manual-code-actions">
|
|
<view class="manual-code-actions">
|
|
@@ -44,8 +43,11 @@
|
|
|
<view v-if="goPay == 1">
|
|
<view v-if="goPay == 1">
|
|
|
<image style="width:25upx;height:25upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" mode="scaleToFill" />
|
|
<image style="width:25upx;height:25upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" mode="scaleToFill" />
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="margin-top:10upx;">
|
|
|
|
|
- <view @click="cancelPayFn" class="btn-default">取消</view>
|
|
|
|
|
|
|
+ <view style="margin-top:10upx;display:flex;justify-content:center;">
|
|
|
|
|
+ <view style="position:relative;">
|
|
|
|
|
+ <view @click="cancelPayFn(0)" class="btn-default">取消</view>
|
|
|
|
|
+ <view @click="cancelPayFn(1)" style="position:absolute;left:100%;bottom:0;margin-left:10upx;font-size:13upx;color:black;white-space:nowrap;text-decoration: underline;">强制取消</view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -104,7 +106,8 @@ export default {
|
|
|
pollingCount:0, // 轮询计数器
|
|
pollingCount:0, // 轮询计数器
|
|
|
showManualInput:false, // 是否展示手动输入付款码
|
|
showManualInput:false, // 是否展示手动输入付款码
|
|
|
manualAuthCode:'', // 手动输入的付款码
|
|
manualAuthCode:'', // 手动输入的付款码
|
|
|
- manualInputFocus:false // 控制输入框自动聚焦
|
|
|
|
|
|
|
+ manualInputFocus:false, // 控制输入框自动聚焦
|
|
|
|
|
+ isForceCancel: 0 // 0: 普通取消,1: 强制取消
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
@@ -372,10 +375,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$emit('closePay')
|
|
this.$emit('closePay')
|
|
|
},
|
|
},
|
|
|
- cancelPayFn(){
|
|
|
|
|
|
|
+ cancelPayFn(force = 0){
|
|
|
|
|
+ this.isForceCancel = force
|
|
|
this.isCancelDialogOpen = true
|
|
this.isCancelDialogOpen = true
|
|
|
if(this.returnCode=='BBS11105' || this.returnCode=='BBS10000'){
|
|
if(this.returnCode=='BBS11105' || this.returnCode=='BBS10000'){
|
|
|
- this.cancelText = '确认取消?'
|
|
|
|
|
|
|
+ this.cancelText = this.isForceCancel ? '确认要强制取消?' : '确认取消?'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.cancelText = this.isForceCancel ? '确认要强制取消?' : '确认要取消?'
|
|
|
}
|
|
}
|
|
|
this.$refs.cancelPaymentRef.open('center')
|
|
this.$refs.cancelPaymentRef.open('center')
|
|
|
},
|
|
},
|
|
@@ -394,7 +400,7 @@ export default {
|
|
|
this.isCancelDialogOpen = false
|
|
this.isCancelDialogOpen = false
|
|
|
this.clearPolling() // 取消时,必须清除定时器
|
|
this.clearPolling() // 取消时,必须清除定时器
|
|
|
this.isPaymentProcessing = false
|
|
this.isPaymentProcessing = false
|
|
|
- cancelOrderFn({id:this.orderId,cashier:1}).then(res=>{
|
|
|
|
|
|
|
+ cancelOrderFn({id:this.orderId,cashier:1, forceCancel: this.isForceCancel}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg('已取消')
|
|
that.$msg('已取消')
|
|
|
}
|
|
}
|