|
@@ -16,10 +16,13 @@
|
|
|
</block>
|
|
</block>
|
|
|
<view>
|
|
<view>
|
|
|
<view style="text-align:center;margin:10upx auto 10upx auto;">
|
|
<view style="text-align:center;margin:10upx auto 10upx auto;">
|
|
|
- <view class="balance" style="margin-bottom:25upx;" v-if="goPay == 0">扫客户付款码</view>
|
|
|
|
|
|
|
+ <view class="balance" style="margin-bottom:25upx;" v-if="goPay == 0">请扫客户付款码</view>
|
|
|
<view class="balance" style="margin-bottom:25upx;" v-if="goPay == 1">请求中</view>
|
|
<view class="balance" style="margin-bottom:25upx;" v-if="goPay == 1">请求中</view>
|
|
|
<view style="text-align:center;">
|
|
<view style="text-align:center;">
|
|
|
<image style="width:40upx;height:40upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
|
|
<image style="width:40upx;height:40upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
|
|
|
|
|
+ <block v-if="goPay == 2">
|
|
|
|
|
+ <text style="color:red;font-weight:bold;font-size:28upx;">{{ remindText }}</text>
|
|
|
|
|
+ </block>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="margin-top:20upx;">
|
|
<view style="margin-top:20upx;">
|
|
|
<button style="width:25vh;" @click="beginScan()" class="admin-button-com big blue">点击扫码</button>
|
|
<button style="width:25vh;" @click="beginScan()" class="admin-button-com big blue">点击扫码</button>
|
|
@@ -63,21 +66,17 @@ export default {
|
|
|
payQrCodeUrl:'',
|
|
payQrCodeUrl:'',
|
|
|
payWay:0,
|
|
payWay:0,
|
|
|
isCashier:false,
|
|
isCashier:false,
|
|
|
- INT:null,
|
|
|
|
|
orderInfo:{orderType:0},
|
|
orderInfo:{orderType:0},
|
|
|
expire:0,
|
|
expire:0,
|
|
|
- T:null,
|
|
|
|
|
goPay:0,
|
|
goPay:0,
|
|
|
textscan: '扫码',
|
|
textscan: '扫码',
|
|
|
- typescan: 'scan-listener'
|
|
|
|
|
|
|
+ typescan: 'scan-listener',
|
|
|
|
|
+ remindText:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
},
|
|
},
|
|
|
onUnload() {
|
|
onUnload() {
|
|
|
- if(this.T){
|
|
|
|
|
- clearInterval(this.T)
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
this.orderId = option.orderId
|
|
this.orderId = option.orderId
|
|
@@ -123,6 +122,7 @@ export default {
|
|
|
this.$util.pageTo({url: "/pagesOrder/detail?id="+id,type:2})
|
|
this.$util.pageTo({url: "/pagesOrder/detail?id="+id,type:2})
|
|
|
},
|
|
},
|
|
|
beginScan(){
|
|
beginScan(){
|
|
|
|
|
+ this.remindText = ''
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
this.toScan()
|
|
this.toScan()
|
|
|
// #endif
|
|
// #endif
|
|
@@ -172,8 +172,8 @@ export default {
|
|
|
that.payFinish()
|
|
that.payFinish()
|
|
|
},1200)
|
|
},1200)
|
|
|
}else{
|
|
}else{
|
|
|
- that.$msg(res.msg)
|
|
|
|
|
- that.goPay = 0
|
|
|
|
|
|
|
+ that.remindText = res.msg
|
|
|
|
|
+ that.goPay = 2
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -185,7 +185,6 @@ export default {
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
- clearInterval(that.T)
|
|
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
that.payFinish()
|
|
|
},1500)
|
|
},1500)
|
|
@@ -205,7 +204,6 @@ export default {
|
|
|
let that = this
|
|
let that = this
|
|
|
if(payWay == 2){
|
|
if(payWay == 2){
|
|
|
that.$util.confirmModal({content:'确认赊账?'},() => {
|
|
that.$util.confirmModal({content:'确认赊账?'},() => {
|
|
|
- clearInterval(this.INT)
|
|
|
|
|
debtPay({id:this.orderId}).then(res=>{
|
|
debtPay({id:this.orderId}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg(res.msg)
|
|
that.$msg(res.msg)
|
|
@@ -223,14 +221,11 @@ export default {
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
- clearInterval(that.T)
|
|
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
that.payFinish()
|
|
|
},1500)
|
|
},1500)
|
|
|
- return
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- that.$msg('没有付款,请跟客户确认')
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
confirmToCancel(){
|
|
confirmToCancel(){
|
|
@@ -239,14 +234,12 @@ export default {
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
- clearInterval(that.T)
|
|
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
that.payFinish()
|
|
|
},1500)
|
|
},1500)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- clearInterval(that.T)
|
|
|
|
|
cancel({id:this.orderId}).then(res=>{
|
|
cancel({id:this.orderId}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg('已取消')
|
|
that.$msg('已取消')
|
|
@@ -260,7 +253,6 @@ export default {
|
|
|
toCancel(){
|
|
toCancel(){
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认取消?'},() => {
|
|
that.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
- clearInterval(this.INT)
|
|
|
|
|
cancel({id:this.orderId}).then(res=>{
|
|
cancel({id:this.orderId}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg(res.msg)
|
|
that.$msg(res.msg)
|