|
@@ -81,7 +81,7 @@
|
|
|
>发货</el-button
|
|
>发货</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"
|
|
@@ -110,7 +110,8 @@ import {
|
|
|
addOrderMain,
|
|
addOrderMain,
|
|
|
updateOrderMain,
|
|
updateOrderMain,
|
|
|
queryOrderStatusStats,
|
|
queryOrderStatusStats,
|
|
|
- closeOrderMain
|
|
|
|
|
|
|
+ closeOrderMain,
|
|
|
|
|
+ changeStatus
|
|
|
} from '@/api/order/orderMain';
|
|
} from '@/api/order/orderMain';
|
|
|
import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
|
|
import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
|
|
|
import DeliverDialog from '../saleOrder/deliverDialog.vue';
|
|
import DeliverDialog from '../saleOrder/deliverDialog.vue';
|
|
@@ -275,6 +276,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 handleViewLogistics = (row?: OrderMainVO) => {
|
|
const handleViewLogistics = (row?: OrderMainVO) => {
|
|
|
if (!row?.id) {
|
|
if (!row?.id) {
|