|
@@ -85,7 +85,7 @@
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" v-if="scope.row.orderStatus != '4'" @click="handleDeliver(scope.row)">发货</el-button>
|
|
<el-button link type="primary" v-if="scope.row.orderStatus != '4'" @click="handleDeliver(scope.row)">发货</el-button>
|
|
|
<el-button link type="primary" @click="handleReview(scope.row)">查看发货信息</el-button>
|
|
<el-button link type="primary" @click="handleReview(scope.row)">查看发货信息</el-button>
|
|
|
- <el-button link type="primary">取消订单</el-button>
|
|
|
|
|
|
|
+ <el-button link type="primary" @click="handleCancel(scope.row)">取消订单</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
link
|
|
link
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -115,7 +115,8 @@ import {
|
|
|
addOrderMain,
|
|
addOrderMain,
|
|
|
updateOrderMain,
|
|
updateOrderMain,
|
|
|
queryOrderStatusStats,
|
|
queryOrderStatusStats,
|
|
|
- closeOrderMain
|
|
|
|
|
|
|
+ closeOrderMain,
|
|
|
|
|
+ changeStatus
|
|
|
} from '@/api/order/orderMain';
|
|
} from '@/api/order/orderMain';
|
|
|
import { getOrderMainCrrcExt } from '@/api/order/orderMainCrrcExt';
|
|
import { getOrderMainCrrcExt } from '@/api/order/orderMainCrrcExt';
|
|
|
import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
|
|
import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
|
|
@@ -283,6 +284,20 @@ const getList = async () => {
|
|
|
queryOrderStatusStatsMethod();
|
|
queryOrderStatusStatsMethod();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/** 取消订单按钮操作 */
|
|
|
|
|
+const handleCancel = async (row?: OrderMainVO) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await proxy?.$modal.confirm('是否确认取消该订单?');
|
|
|
|
|
+ await changeStatus(row.id, '7');
|
|
|
|
|
+ getList();
|
|
|
|
|
+ proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ if (error !== 'cancel' && error !== 'close') {
|
|
|
|
|
+ proxy?.$modal.msgError('操作失败,请重试');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// 批量获取平台订单号
|
|
// 批量获取平台订单号
|
|
|
const fetchCrrcOrderNos = async (rows: OrderMainVO[]) => {
|
|
const fetchCrrcOrderNos = async (rows: OrderMainVO[]) => {
|
|
|
const results = await Promise.allSettled(
|
|
const results = await Promise.allSettled(
|