Fix(订单):[#1621]已完成的订单无法删除
This commit is contained in:
+20
-15
@@ -49,25 +49,30 @@ export function takeOrderHandle(orderId) {
|
||||
|
||||
export function delOrderHandle(orderId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
dialog.confirm({
|
||||
mes: "确认删除该订单?",
|
||||
opts() {
|
||||
delOrder(orderId)
|
||||
.then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该订单?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
delOrder(orderId).then(res => {
|
||||
uni.showToast({
|
||||
title: '删除成功', icon: 'success', duration: 2000
|
||||
});
|
||||
resolve(res);
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
.catch(err => {
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '删除失败', icon: 'none', duration: 2000
|
||||
});
|
||||
reject(err);
|
||||
});
|
||||
title: '删除失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
reject(err)
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function payOrderHandle(orderId, type, from) {
|
||||
|
||||
@@ -233,9 +233,11 @@
|
||||
</template>
|
||||
<template v-if="status.type == 4">
|
||||
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
||||
<view class="bnt default" @click="
|
||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||
" v-if="orderInfo.isTickets!==1">查看物流
|
||||
<view
|
||||
v-if="orderInfo.isTickets !== 1"
|
||||
class="bnt default"
|
||||
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
||||
>查看物流
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="status.type == 6">
|
||||
@@ -483,8 +485,8 @@ export default {
|
||||
},
|
||||
delOrder() {
|
||||
delOrderHandle(this.orderInfo.orderId).then(() => {
|
||||
setTimeout(() => this.goBack(), 300);
|
||||
});
|
||||
this.goBack()
|
||||
})
|
||||
},
|
||||
setOfflinePayStatus: function (status) {
|
||||
var that = this;
|
||||
|
||||
Reference in New Issue
Block a user