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

@@ -6,6 +6,8 @@ import { useRouter } from 'vue-router';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteDiyPage, getDiyPagePage } from '#/api/mall/promotion/diy/page';
import { $t } from '#/locales';
@@ -45,7 +47,13 @@ function handleDecorate(row: MallDiyPageApi.DiyPage) {
/** 删除DIY页面 */
async function handleDelete(row: MallDiyPageApi.DiyPage) {
await ElMessageBox.confirm('确定删除该装修页面吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
await deleteDiyPage(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}

View File

@@ -4,9 +4,9 @@ import type { MallDiyTemplateApi } from '#/api/mall/promotion/diy/template';
import { useRouter } from 'vue-router';
import { confirm, DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -51,19 +51,26 @@ function handleDecorate(row: MallDiyTemplateApi.DiyTemplate) {
/** 使用模板 */
async function handleUse(row: MallDiyTemplateApi.DiyTemplate) {
confirm({
content: `是否使用模板"${row.name}"?`,
}).then(async () => {
// 发起删除
await useDiyTemplate(row.id as number);
ElMessage.success('使用成功');
onRefresh();
await ElMessageBox.confirm(`是否使用模板"${row.name}"?`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
// 发起删除
await useDiyTemplate(row.id as number);
ElMessage.success('使用成功');
onRefresh();
}
/** 删除DIY模板 */
async function handleDelete(row: MallDiyTemplateApi.DiyTemplate) {
await ElMessageBox.confirm('确定删除该装修模板吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
await deleteDiyTemplate(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}