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