liu
2026-09-02 fec6a89b4ed2dfc988c1ab308188306d536d8ccd
src/views/mes/md/item/type/index.vue
@@ -5,11 +5,16 @@
import { ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart } from '@vben/utils';
import { message } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteItemType, getItemTypeList } from '#/api/mes/md/item/type';
import {
  deleteItemType,
  exportItemType,
  getItemTypeList,
} from '#/api/mes/md/item/type';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
@@ -47,6 +52,12 @@
/** 导入分类 */
function handleImport() {
  importModalApi.open();
}
/** 导出分类(按当前列表查询条件导出全部命中数据) */
async function handleExport() {
  const data = await exportItemType(await gridApi.formApi.getValues());
  downloadFileFromBlobPart({ fileName: '物料分类数据.xls', source: data });
}
/** 添加下级分类 */
@@ -132,6 +143,13 @@
              onClick: handleImport,
            },
            {
              label: $t('ui.actionTitle.export'),
              type: 'primary',
              icon: ACTION_ICON.DOWNLOAD,
              auth: ['mes:md-item-type:export'],
              onClick: handleExport,
            },
            {
              label: isExpanded ? '收缩' : '展开',
              type: 'primary',
              onClick: handleExpand,