From b0c32a2a18e07ff239eb1d48f41fc3c7eb50c8b2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 Oct 2025 15:31:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90erp?= =?UTF-8?q?=20=E7=B3=BB=E7=BB=9F=E3=80=91finance/account=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/erp/finance/account/data.ts | 26 +++++++++++++++++-- .../src/views/erp/finance/account/index.vue | 11 ++++---- .../erp/finance/account/modules/form.vue | 5 ++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/apps/web-antd/src/views/erp/finance/account/data.ts b/apps/web-antd/src/views/erp/finance/account/data.ts index dab12441c..595c3cac3 100644 --- a/apps/web-antd/src/views/erp/finance/account/data.ts +++ b/apps/web-antd/src/views/erp/finance/account/data.ts @@ -49,7 +49,6 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入排序', precision: 0, - class: 'w-full', }, rules: 'required', defaultValue: 0, @@ -86,11 +85,14 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'remark', label: '备注', component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + rows: 3, + }, }, ]; } -// TODO @xuzhiqiang:搜索的是不是缺了,placeholder /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -98,16 +100,28 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'name', label: '名称', component: 'Input', + componentProps: { + placeholder: '请输入名称', + allowClear: true, + }, }, { fieldName: 'no', label: '编码', component: 'Input', + componentProps: { + placeholder: '请输入编码', + allowClear: true, + }, }, { fieldName: 'remark', label: '备注', component: 'Input', + componentProps: { + placeholder: '请输入备注', + allowClear: true, + }, }, ]; } @@ -118,22 +132,28 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'name', title: '名称', + minWidth: 150, }, { field: 'no', title: '编码', + minWidth: 120, }, { field: 'remark', title: '备注', + minWidth: 150, + showOverflow: 'tooltip', }, { field: 'sort', title: '排序', + minWidth: 80, }, { field: 'status', title: '状态', + minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.COMMON_STATUS }, @@ -142,6 +162,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'defaultStatus', title: '是否默认', + minWidth: 100, slots: { default: ({ row }) => { return h( @@ -158,6 +179,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'createTime', title: '创建时间', + minWidth: 180, formatter: 'formatDateTime', }, { diff --git a/apps/web-antd/src/views/erp/finance/account/index.vue b/apps/web-antd/src/views/erp/finance/account/index.vue index c613f8277..52cd2bc72 100644 --- a/apps/web-antd/src/views/erp/finance/account/index.vue +++ b/apps/web-antd/src/views/erp/finance/account/index.vue @@ -24,7 +24,7 @@ const [FormModal, formModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -52,10 +52,8 @@ async function handleDelete(row: ErpAccountApi.Account) { }); try { await deleteAccount(row.id as number); - message.success({ - content: $t('ui.actionMessage.deleteSuccess', [row.name]), - }); - onRefresh(); + message.success($t('ui.actionMessage.deleteSuccess', [row.name])); + handleRefresh(); } finally { hideLoading(); } @@ -100,7 +98,8 @@ const [Grid, gridApi] = useVbenVxeGrid({ url="https://doc.iocoder.cn/sale/finance-payment-receipt/" /> - + +