From 2fe330a44f9e8bdd8a1afd6124c57851f2a5b7ea Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 11:07:01 +0800
Subject: [PATCH] 供应商档案:新增时状态默认「开启」
---
src/views/basicData/mdm/index.vue | 81 ++++++++++++++++++++--------------------
1 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/src/views/basicData/mdm/index.vue b/src/views/basicData/mdm/index.vue
index 99cea03..016baa6 100644
--- a/src/views/basicData/mdm/index.vue
+++ b/src/views/basicData/mdm/index.vue
@@ -14,7 +14,7 @@
import {
deleteItem,
deleteItemList,
- // exportItem,
+ exportItem,
getItemPage,
updateItemStatus,
updateItemSync,
@@ -81,11 +81,11 @@
gridApi.query();
}
-/** 瀵煎嚭琛ㄦ牸 */
-// async function handleExport() {
-// const data = await exportItem(await gridApi.formApi.getValues());
-// downloadFileFromBlobPart({ fileName: '鐗╂枡.xls', source: data });
-// }
+/** 瀵煎嚭琛ㄦ牸锛堟寜褰撳墠鍒楄〃鏌ヨ鏉′欢瀵煎嚭鍏ㄩ儴鍛戒腑鏁版嵁锛� */
+async function handleExport() {
+ const data = await exportItem(await gridApi.formApi.getValues());
+ downloadFileFromBlobPart({ fileName: '鐗╂枡鏁版嵁.xls', source: data });
+}
/** 鍒涘缓鐗╂枡 */
function handleCreate() {
@@ -96,6 +96,40 @@
function handleImport() {
importModalApi.open();
}
+
+/** 宸ュ叿鏍忔寜閽� */
+const toolbarActions = computed(() => [
+ {
+ label: $t('ui.actionTitle.create', ['鐗╂枡']),
+ type: 'primary' as const,
+ icon: ACTION_ICON.ADD,
+ auth: ['mdm:item:create'],
+ onClick: handleCreate,
+ },
+ {
+ label: $t('ui.actionTitle.import', ['鐗╂枡']),
+ type: 'primary' as const,
+ icon: ACTION_ICON.UPLOAD,
+ auth: ['mdm:item:import'],
+ onClick: handleImport,
+ },
+ {
+ label: $t('ui.actionTitle.export'),
+ type: 'primary' as const,
+ icon: ACTION_ICON.DOWNLOAD,
+ auth: ['mdm:item:export'],
+ onClick: handleExport,
+ },
+ {
+ label: $t('ui.actionTitle.deleteBatch'),
+ type: 'primary' as const,
+ danger: true,
+ icon: ACTION_ICON.DELETE,
+ auth: ['mdm:item:delete'],
+ disabled: isEmpty(checkedIds),
+ onClick: handleDeleteBatch,
+ },
+]);
/** 缂栬緫鐗╂枡 */
function handleEdit(row: MdmItemApi.Item) {
@@ -225,40 +259,7 @@
<ImportModal @success="handleRefresh" />
<Grid table-title="鐗╂枡鍒楄〃">
<template #toolbar-tools>
- <TableAction
- :actions="[
- {
- label: $t('ui.actionTitle.create', ['鐗╂枡']),
- type: 'primary',
- icon: ACTION_ICON.ADD,
- auth: ['mdm:item:create'],
- onClick: handleCreate,
- },
- {
- label: $t('ui.actionTitle.import', ['鐗╂枡']),
- type: 'primary',
- icon: ACTION_ICON.UPLOAD,
- auth: ['mdm:item:import'],
- onClick: handleImport,
- },
- // {
- // label: $t('ui.actionTitle.export'),
- // type: 'primary',
- // icon: ACTION_ICON.DOWNLOAD,
- // auth: ['mdm:item:export'],
- // onClick: handleExport,
- // },
- {
- label: $t('ui.actionTitle.deleteBatch'),
- type: 'primary',
- danger: true,
- icon: ACTION_ICON.DELETE,
- auth: ['mdm:item:delete'],
- disabled: isEmpty(checkedIds),
- onClick: handleDeleteBatch,
- },
- ]"
- />
+ <TableAction :actions="toolbarActions" />
</template>
<template #categoryName="{ row }">
<Tag v-if="getCategoryColor(row.categoryId)" :color="getCategoryColor(row.categoryId)">{{ getCategoryName(row.categoryId) }}</Tag>
--
Gitblit v1.9.3