Authored by lea guo

订单: 订单删除

... ... @@ -34,7 +34,7 @@ export default {
} = order;
switch (action.name) {
case orderActionsMap.DEL_ORDER.name:
case orderActionsMap.DEL_ORDER.name: {
this.$createConfirmDialog({
content: '确认删除订单?',
confirmBtn: { style: { color: '#D0021B' } },
... ... @@ -49,7 +49,11 @@ export default {
if (isDetail) {
this.$router.back();
} else {
this.filterOrderList(orderCode);
this.filterOrderList({
orderCode,
owner,
status: this.status,
});
}
}
const txt = isOk ? '删除成功' : '删除失败';
... ... @@ -58,6 +62,7 @@ export default {
},
}).show();
break;
}
case orderActionsMap.CANCEL_ORDER.name: {
let confirmInfo = await this.cancelTradeConfirmInfo({
... ...
... ... @@ -100,19 +100,13 @@ export default function() {
* owner: 订单来源 buy | sell
* } param1
*/
async deleteOrder({ commit }, { orderCode, owner, status }) {
async deleteOrder(_, { orderCode, owner }) {
// owner: ownType
const res = await this.$api.get(`/api/${owner}/order/delete`, {
orderCode,
});
const { code, data } = res;
const { data } = res;
// data 为true时删除成功
if (code === 200) {
if (data) {
commit('filterOrderList', { orderCode, owner, status });
}
}
return data;
},
... ...