Fix(订单):[#1621]已完成的订单无法删除
This commit is contained in:
+22
-17
@@ -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
|
||||
})
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user