|
@@ -32,7 +32,8 @@
|
|
|
<view style="margin-top:35upx;">
|
|
<view style="margin-top:35upx;">
|
|
|
<button style="width:25vh;" @click="goBack()" class="admin-button-com big default">返回首页</button>
|
|
<button style="width:25vh;" @click="goBack()" class="admin-button-com big default">返回首页</button>
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="color:#CCCCCC;margin-top:20upx;">15分钟后,订单自动变成欠款单 <text @click="cancelOrder()" style="color:#666666;margin-left:10upx;text-decoration:underline;">取消订单</text></view>
|
|
|
|
|
|
|
+ <view v-if="orderInfo.orderType == 1" style="color:#CCCCCC;margin-top:20upx;">15分钟后,订单自动变成欠款单 <text @click="cancelOrder()" style="color:#666666;margin-left:10upx;text-decoration:underline;">取消订单</text></view>
|
|
|
|
|
+ <view v-else style="color:#CCCCCC;margin-top:20upx;">客户下单,15分钟后将自动取消</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -40,7 +41,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { codePayCheck,scanPay,scanPayCheck,cancel,debtPay} from "@/api/order/index";
|
|
|
|
|
|
|
+import { codePayCheck,scanPay,scanPayCheck,cancel,debtPay,getDetail} from "@/api/order/index";
|
|
|
export default {
|
|
export default {
|
|
|
name: "toPay",
|
|
name: "toPay",
|
|
|
components: {
|
|
components: {
|
|
@@ -56,13 +57,23 @@ export default {
|
|
|
payQrCodeUrl:'',
|
|
payQrCodeUrl:'',
|
|
|
payWay:0,
|
|
payWay:0,
|
|
|
isCashier:true,
|
|
isCashier:true,
|
|
|
- INT:null
|
|
|
|
|
|
|
+ INT:null,
|
|
|
|
|
+ orderInfo:{orderType:0}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
this.orderId = option.orderId
|
|
this.orderId = option.orderId
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.$util.isEmpty(option.orderId)){
|
|
|
|
|
+ getDetail({ id: option.orderId }).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.orderInfo = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
uni.setStorageSync('globalCodePayId',option.orderId)
|
|
uni.setStorageSync('globalCodePayId',option.orderId)
|
|
|
this.actPrice = option.actPrice
|
|
this.actPrice = option.actPrice
|
|
|
this.orderSn = option.orderSn
|
|
this.orderSn = option.orderSn
|
|
@@ -123,9 +134,11 @@ export default {
|
|
|
let that = this
|
|
let that = this
|
|
|
scanPay({id:this.orderId,payWay:this.payWay}).then(res=>{
|
|
scanPay({id:this.orderId,payWay:this.payWay}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
- let url = res.data.url || ''
|
|
|
|
|
- that.payQrCodeUrl = url
|
|
|
|
|
- that.showQrCode = true
|
|
|
|
|
|
|
+ if(res.data.returnStatus == 'SUCCESS'){
|
|
|
|
|
+ let url = res.data.url || ''
|
|
|
|
|
+ that.payQrCodeUrl = url
|
|
|
|
|
+ that.showQrCode = true
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|