From 423bfffbea0ffc5749cb039230cc26623fcbb961 Mon Sep 17 00:00:00 2001 From: nehc <934298133@qq.com> Date: Wed, 30 Jul 2025 15:24:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(@vben/web-antd):=20erp-purchase-supplier-?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=8A=9F=E8=83=BD=E5=B9=B6=E6=B7=BB=E5=8A=A0=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在供应商管理页面添加权限控制: - 创建供应商 - 导出供应商信息 - 编辑供应商 - 删除供应商 --- apps/web-antd/src/views/erp/purchase/order/index.vue | 9 ++------- apps/web-antd/src/views/erp/purchase/supplier/index.vue | 4 ++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web-antd/src/views/erp/purchase/order/index.vue b/apps/web-antd/src/views/erp/purchase/order/index.vue index bc9552c80..3cb0130a6 100644 --- a/apps/web-antd/src/views/erp/purchase/order/index.vue +++ b/apps/web-antd/src/views/erp/purchase/order/index.vue @@ -129,13 +129,8 @@ function handleUpdateStatus( /** 导出 */ async function handleExport() { - try { - const formValues = gridApi.getFormData(); - const data = await exportPurchaseOrder(formValues); - downloadFileFromBlobPart({ fileName: '采购订单.xls', source: data }); - } catch { - // 处理错误 - } + const data = await exportPurchaseOrder(await gridApi.formApi.getValues()); + downloadFileFromBlobPart({ fileName: '采购订单.xls', source: data }); } const [Grid, gridApi] = useVbenVxeGrid({ diff --git a/apps/web-antd/src/views/erp/purchase/supplier/index.vue b/apps/web-antd/src/views/erp/purchase/supplier/index.vue index b0d6d79ef..98288f4ab 100644 --- a/apps/web-antd/src/views/erp/purchase/supplier/index.vue +++ b/apps/web-antd/src/views/erp/purchase/supplier/index.vue @@ -113,12 +113,14 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('ui.actionTitle.create', ['供应商']), type: 'primary', icon: ACTION_ICON.ADD, + auth: ['erp:supplier:create'], onClick: handleCreate, }, { label: $t('ui.actionTitle.export'), type: 'primary', icon: ACTION_ICON.DOWNLOAD, + auth: ['erp:supplier:export'], onClick: handleExport, }, ]" @@ -132,6 +134,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: '编辑', type: 'link', icon: ACTION_ICON.EDIT, + auth: ['erp:supplier:update'], onClick: handleEdit.bind(null, row), }, { @@ -139,6 +142,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ type: 'link', danger: true, icon: ACTION_ICON.DELETE, + auth: ['erp:supplier:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.name]), confirm: handleDelete.bind(null, row),