From a46fa6442c2abeea546c33f779ff243066ca8f43 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 Oct 2025 20:26:57 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=20=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E3=80=91=E5=BF=AB=E9=80=92=E5=85=AC=E5=8F=B8=E7=9A=84=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=EF=BC=88antd=20100%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/mall/trade/delivery/express/data.ts | 24 +++++++++++++++++++ .../mall/trade/delivery/express/index.vue | 13 +++++----- .../trade/delivery/express/modules/form.vue | 2 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/apps/web-antd/src/views/mall/trade/delivery/express/data.ts b/apps/web-antd/src/views/mall/trade/delivery/express/data.ts index 28db3aaa5..7b3fe0512 100644 --- a/apps/web-antd/src/views/mall/trade/delivery/express/data.ts +++ b/apps/web-antd/src/views/mall/trade/delivery/express/data.ts @@ -21,12 +21,18 @@ export function useFormSchema(): VbenFormSchema[] { component: 'Input', fieldName: 'code', label: '公司编码', + componentProps: { + placeholder: '请输入快递编码', + }, rules: 'required', }, { component: 'Input', fieldName: 'name', label: '公司名称', + componentProps: { + placeholder: '请输入快递名称', + }, rules: 'required', }, { @@ -34,6 +40,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'logo', label: '公司 logo', rules: 'required', + help: '推荐 180x180 图片分辨率', }, { fieldName: 'sort', @@ -41,6 +48,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'InputNumber', componentProps: { min: 0, + placeholder: '请输入显示顺序', }, rules: 'required', }, @@ -65,17 +73,26 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'name', label: '快递公司名称', component: 'Input', + componentProps: { + placeholder: '请输入快递公司名称', + allowClear: true, + }, }, { fieldName: 'code', label: '快递公司编号', component: 'Input', + componentProps: { + placeholder: '请输入快递公司编号', + allowClear: true, + }, }, { fieldName: 'status', label: '状态', component: 'Select', componentProps: { + placeholder: '请选择状态', allowClear: true, options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), }, @@ -89,18 +106,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'id', title: '编号', + minWidth: 100, }, { field: 'code', title: '公司编码', + minWidth: 120, }, { field: 'name', title: '公司名称', + minWidth: 150, }, { field: 'logo', title: '公司 logo', + minWidth: 120, cellRender: { name: 'CellImage', }, @@ -108,10 +129,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'sort', title: '显示顺序', + minWidth: 100, }, { field: 'status', title: '状态', + minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.COMMON_STATUS }, @@ -120,6 +143,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'createTime', title: '创建时间', + minWidth: 180, formatter: 'formatDateTime', }, { diff --git a/apps/web-antd/src/views/mall/trade/delivery/express/index.vue b/apps/web-antd/src/views/mall/trade/delivery/express/index.vue index c2fcc7c28..ea1df37e6 100644 --- a/apps/web-antd/src/views/mall/trade/delivery/express/index.vue +++ b/apps/web-antd/src/views/mall/trade/delivery/express/index.vue @@ -24,7 +24,7 @@ const [FormModal, formModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -51,11 +51,9 @@ async function handleDelete(row: MallDeliveryExpressApi.DeliveryExpress) { duration: 0, }); try { - await deleteDeliveryExpress(row.id as number); - message.success({ - content: $t('ui.actionMessage.deleteSuccess', [row.name]), - }); - onRefresh(); + await deleteDeliveryExpress(row.id!); + message.success($t('ui.actionMessage.deleteSuccess', [row.name])); + handleRefresh(); } finally { hideLoading(); } @@ -82,6 +80,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -93,7 +92,7 @@ const [Grid, gridApi] = useVbenVxeGrid({