|
@ -36,8 +36,7 @@ |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" /> |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" /> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" |
|
|
<SYMonthImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
@success="importSuccess" /> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -49,6 +48,8 @@ |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; |
|
|
|
|
|
import * as BasicMonthEquipmentApi from "@/api/eam/basic/basicMonthEquipment"; |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Location' }) |
|
|
defineOptions({ name: 'Location' }) |
|
|
const tableRef = ref(null); |
|
|
const tableRef = ref(null); |
|
@ -60,7 +61,6 @@ |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(Location.allSchemas.tableColumns) |
|
|
const tableColumns = ref(Location.allSchemas.tableColumns) |
|
|
const importFormRef = ref() |
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const src = ref(BASE_URL + '/jmreport/view/950537917716037632?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/950537917716037632?token=' + getAccessToken()) |
|
|
|
|
|
|
|
@ -96,6 +96,7 @@ |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), // 新增 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), // 新增 |
|
|
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'basic:locationArea:export'}), // 导入 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), // 导出 |
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
@ -115,6 +116,8 @@ |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'add') { // 新增 |
|
|
if (val == 'add') { // 新增 |
|
|
openForm('create') |
|
|
openForm('create') |
|
|
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { // 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'qrCodeBatch') { |
|
|
} else if (val == 'qrCodeBatch') { |
|
@ -209,6 +212,21 @@ |
|
|
} catch { } |
|
|
} catch { } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
|
|
const importFormRef = ref() |
|
|
|
|
|
const handleImport = () => { |
|
|
|
|
|
importFormRef.value.open() |
|
|
|
|
|
} |
|
|
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
|
|
const importTemplateData = reactive({ |
|
|
|
|
|
templateUrl: '', |
|
|
|
|
|
templateTitle: '库位导入模版.xlsx' |
|
|
|
|
|
}) |
|
|
|
|
|
// 导入成功之后 |
|
|
|
|
|
const importSuccess = () => { |
|
|
|
|
|
getList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
/** 导出按钮操作 */ |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
@ -237,5 +255,6 @@ |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
|
|
|
importTemplateData.templateUrl = await LocationApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|