feat: 更新组件和API,优化数据处理逻辑

- 将 TreeSelect 组件的 fieldNames 属性更改为 props
- 更新商品分类API的请求路径
- 在多个模块中引入 ElMessageBox 以增强用户交互体验
- 新增售后管理和订单管理的详细视图组件
- 优化了多个表单组件的逻辑,提升了用户体验
This commit is contained in:
lrl
2025-07-15 13:23:20 +08:00
parent 067df741b4
commit 6ce1363dea
69 changed files with 2314 additions and 969 deletions

View File

@@ -7,7 +7,7 @@ import { onMounted } from 'vue';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { ElLoading, ElMessage, ElTag } from 'element-plus';
import { ElMessage, ElMessageBox, ElTag } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -45,32 +45,26 @@ function handleCreate() {
/** 关闭活动 */
async function handleClose(row: MallSeckillActivityApi.SeckillActivity) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.closing', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确认关闭该秒杀活动吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await closeSeckillActivity(row.id as number);
ElMessage.success('关闭成功');
onRefresh();
} finally {
loadingInstance.close();
}
await closeSeckillActivity(row.id as number);
ElMessage.success('关闭成功');
onRefresh();
}
/** 删除活动 */
async function handleDelete(row: MallSeckillActivityApi.SeckillActivity) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确定删除该秒杀活动吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteSeckillActivity(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteSeckillActivity(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}
const [Grid, gridApi] = useVbenVxeGrid({

View File

@@ -4,7 +4,7 @@ import type { MallSeckillConfigApi } from '#/api/mall/promotion/seckill/seckillC
import { confirm, Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -39,17 +39,14 @@ function handleEdit(row: MallSeckillConfigApi.SeckillConfig) {
/** 删除秒杀时段 */
async function handleDelete(row: MallSeckillConfigApi.SeckillConfig) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确定删除该秒杀时段吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteSeckillConfig(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteSeckillConfig(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}
/** 修改状态 */