|
@@ -478,20 +478,15 @@ const handleCheck = async (row?: OrderMainVO) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-/** 审核按钮操作 */
|
|
|
|
|
|
|
+/** 取消订单按钮操作 */
|
|
|
const handleCancel = async (row?: OrderMainVO) => {
|
|
const handleCancel = async (row?: OrderMainVO) => {
|
|
|
- const oldValue = row.checkStatus; // 保存旧值
|
|
|
|
|
-
|
|
|
|
|
- // 弹出审核选择对话框
|
|
|
|
|
try {
|
|
try {
|
|
|
- // 调用接口,传入用户选择的值
|
|
|
|
|
|
|
+ await proxy?.$modal.confirm('是否确认取消该订单?');
|
|
|
await changeStatus(row.id, '7');
|
|
await changeStatus(row.id, '7');
|
|
|
getList();
|
|
getList();
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- // 用户取消或操作失败
|
|
|
|
|
if (error !== 'cancel' && error !== 'close') {
|
|
if (error !== 'cancel' && error !== 'close') {
|
|
|
- row.checkStatus = oldValue; // 失败回滚
|
|
|
|
|
proxy?.$modal.msgError('操作失败,请重试');
|
|
proxy?.$modal.msgError('操作失败,请重试');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|