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() {
try {
const formValues = gridApi.getFormData();
const data = await exportPurchaseOrder(formValues);
const data = await exportPurchaseOrder(await gridApi.formApi.getValues());
downloadFileFromBlobPart({ fileName: '采购订单.xls', source: data });
} catch {
//
}
}
const [Grid, gridApi] = useVbenVxeGrid({

View File

@ -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),