|
|
@ -53,8 +53,6 @@ |
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemOrderMain.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/eam/item-order-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -63,7 +61,6 @@ import { ItemOrderMain,ItemOrderMainRules } from './itemOrderMain.data' |
|
|
|
import * as ItemOrderMainApi from '@/api/eam/item/itemOrderMain' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
|
|
defineOptions({ name: 'ItemOrderMain' }) |
|
|
@ -99,9 +96,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'eam:itemOrderMain:create'}), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'eam:itemOrderMain:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'eam:itemOrderMain:export'}), // 导出 |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -119,8 +115,6 @@ const HeadButttondata = [ |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { // 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
@ -133,8 +127,8 @@ const buttonBaseClick = (val, item) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'eam:itemOrderMain:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemOrderMain:delete'}), // 删除 |
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
@ -211,21 +205,6 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '备件采购订单主导入模版.xlsx' |
|
|
|
}) |
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
tableObject.params = { |
|
|
@ -238,7 +217,6 @@ const searchFormClick = (searchData) => { |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|
importTemplateData.templateUrl = await ItemOrderMainApi.importTemplate() |
|
|
|
}) |
|
|
|
|
|
|
|
</script> |
|
|
|