feat(@vben/web-antd): erp-purchase-supplier-优化采购订单导出功能并添加供应商管理权限控制

- 在供应商管理页面添加权限控制:
  - 创建供应商
  - 导出供应商信息
  - 编辑供应商
  - 删除供应商
pull/183/head
nehc 2025-07-30 15:24:05 +08:00
parent 33cec7caee
commit 423bfffbea
2 changed files with 6 additions and 7 deletions

View File

@ -129,13 +129,8 @@ function handleUpdateStatus(
/** 导出 */ /** 导出 */
async function handleExport() { async function handleExport() {
try { const data = await exportPurchaseOrder(await gridApi.formApi.getValues());
const formValues = gridApi.getFormData(); downloadFileFromBlobPart({ fileName: '采购订单.xls', source: data });
const data = await exportPurchaseOrder(formValues);
downloadFileFromBlobPart({ fileName: '采购订单.xls', source: data });
} catch {
//
}
} }
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({

View File

@ -113,12 +113,14 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: $t('ui.actionTitle.create', ['供应商']), label: $t('ui.actionTitle.create', ['供应商']),
type: 'primary', type: 'primary',
icon: ACTION_ICON.ADD, icon: ACTION_ICON.ADD,
auth: ['erp:supplier:create'],
onClick: handleCreate, onClick: handleCreate,
}, },
{ {
label: $t('ui.actionTitle.export'), label: $t('ui.actionTitle.export'),
type: 'primary', type: 'primary',
icon: ACTION_ICON.DOWNLOAD, icon: ACTION_ICON.DOWNLOAD,
auth: ['erp:supplier:export'],
onClick: handleExport, onClick: handleExport,
}, },
]" ]"
@ -132,6 +134,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: '编辑', label: '编辑',
type: 'link', type: 'link',
icon: ACTION_ICON.EDIT, icon: ACTION_ICON.EDIT,
auth: ['erp:supplier:update'],
onClick: handleEdit.bind(null, row), onClick: handleEdit.bind(null, row),
}, },
{ {
@ -139,6 +142,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
type: 'link', type: 'link',
danger: true, danger: true,
icon: ACTION_ICON.DELETE, icon: ACTION_ICON.DELETE,
auth: ['erp:supplier:delete'],
popConfirm: { popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.name]), title: $t('ui.actionMessage.deleteConfirm', [row.name]),
confirm: handleDelete.bind(null, row), confirm: handleDelete.bind(null, row),