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

@@ -10,7 +10,7 @@ import { ref, watch } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -59,32 +59,26 @@ function onEdit(row: any) {
/** 删除字典数据 */
async function onDelete(row: any) {
const loadingInstance = ElLoading.service({
text: $t('common.processing'),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该字典数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteDictData(row.id);
ElMessage.success($t('common.operationSuccess'));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteDictData(row.id);
ElMessage.success($t('common.operationSuccess'));
onRefresh();
}
/** 批量删除字典数据 */
async function onDeleteBatch() {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting'),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该字典数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteDictDataList(checkedIds.value);
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteDictDataList(checkedIds.value);
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
}
const checkedIds = ref<number[]>([]);

View File

@@ -10,7 +10,7 @@ import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -54,32 +54,26 @@ function onEdit(row: any) {
/** 删除字典类型 */
async function onDelete(row: SystemDictTypeApi.DictType) {
const loadingInstance = ElLoading.service({
text: $t('common.processing'),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该字典类型吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteDictType(row.id as number);
ElMessage.success($t('common.operationSuccess'));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteDictType(row.id as number);
ElMessage.success($t('common.operationSuccess'));
onRefresh();
}
/** 批量删除字典类型 */
async function onDeleteBatch() {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting'),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该字典类型吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteDictTypeList(checkedIds.value);
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteDictTypeList(checkedIds.value);
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
}
const checkedIds = ref<number[]>([]);