|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-04-15 17:46:10
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-29 20:39:45
|
|
|
|
|
* @LastEditTime: 2022-07-13 14:13:24
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
<!-- 待支付可以取消,支付订单 -->
|
|
|
|
|
<template v-if="orderInfo.orderStatus === 1">
|
|
|
|
|
<UiButton class="footer--btn" @click="cancelShow = true">取消订单</UiButton>
|
|
|
|
|
<UiButton class="footer--btn" type="gradual" @click="payShow = true">去支付</UiButton>
|
|
|
|
|
<UiButton class="footer--btn" type="gradual" @click="handlePay">去支付</UiButton>
|
|
|
|
|
</template>
|
|
|
|
|
<u-popup class="cancel" :show="cancelShow" @close="closeCancel" round="16rpx" closeable>
|
|
|
|
|
<view class="cancel--title">取消订单原因</view>
|
|
|
|
@ -49,13 +49,14 @@
|
|
|
|
|
<UiButton type="gradual" :disabed="cancelValue == 0" @click="cancelOrder">确认取消</UiButton>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<BsPay class="modal" :show.sync="payShow" :order="orderInfo"></BsPay>
|
|
|
|
|
<!-- <BsPay class="modal" :show.sync="payShow" :order="orderInfo"></BsPay> -->
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import UiButton from '@/components/UiButton.vue'
|
|
|
|
|
import UiCell from '@/components/UiCell.vue'
|
|
|
|
|
import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order'
|
|
|
|
|
import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order';
|
|
|
|
|
import {ApiPostCashierPrepay} from '@/common/api/pay';
|
|
|
|
|
import BsPay from '../../../../components/BsPay.vue';
|
|
|
|
|
import ORDER from '@/common/dicts/order';
|
|
|
|
|
export default {
|
|
|
|
@ -72,8 +73,6 @@ export default {
|
|
|
|
|
// 取消订单弹窗
|
|
|
|
|
cancelShow : false,
|
|
|
|
|
cancelValue : 0,
|
|
|
|
|
// 支付
|
|
|
|
|
payShow : false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods : {
|
|
|
|
@ -119,29 +118,32 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// this.$msb.confirm({
|
|
|
|
|
// content : '确认已经收到货了吗?',
|
|
|
|
|
// confirm : async ()=>{
|
|
|
|
|
// const {error} = await ApiPutOrderReceive({
|
|
|
|
|
// orderId : this.$Route.query.id
|
|
|
|
|
// });
|
|
|
|
|
// if(error){
|
|
|
|
|
// uni.$toast(error.message);
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
// this.$Router.push('/orderSuccess');
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
service(){
|
|
|
|
|
// uni.$u.toast('客服休息中')
|
|
|
|
|
this.$Router.push({
|
|
|
|
|
path : '/messageChat',
|
|
|
|
|
query : {
|
|
|
|
|
orderId : this.orderInfo.orderId
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async handlePay(){
|
|
|
|
|
|
|
|
|
|
const {error, result} = await ApiPostCashierPrepay({orderId:this.orderInfo.orderId});
|
|
|
|
|
if(error){
|
|
|
|
|
uni.$u.toast(error.message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
window.location.replace(result.wapCashierUrl)
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
// #ifndef H5
|
|
|
|
|
this.$Router.push(`/webView?url=${encodeURIComponent(result.wapCashierUrl)}`);
|
|
|
|
|
// #endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|