|
|
@ -1,411 +1,138 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<el-form |
|
|
|
class="-mb-15px" |
|
|
|
:model="queryParams" |
|
|
|
ref="queryFormRef" |
|
|
|
:inline="true" |
|
|
|
label-width="68px" |
|
|
|
> |
|
|
|
<el-form-item label="代码" prop="code"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.code" |
|
|
|
placeholder="请输入代码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="名称" prop="name"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.name" |
|
|
|
placeholder="请输入名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="仓库代码" prop="warehouseCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.warehouseCode" |
|
|
|
placeholder="请输入仓库代码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="区域代码" prop="areaCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.areaCode" |
|
|
|
placeholder="请输入区域代码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="库位组代码" prop="locationGroupCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationGroupCode" |
|
|
|
placeholder="请输入库位组代码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="ERP库位代码" prop="erpLocationCode"> |
|
|
|
<el-select |
|
|
|
v-model="queryParams.erpLocationCode" |
|
|
|
placeholder="请选择ERP库位代码" |
|
|
|
clearable |
|
|
|
class="!w-240px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ERP_LOCATION)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="类型" prop="type"> |
|
|
|
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable class="!w-240px"> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.LOCATION_TYPE)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="巷道" prop="aisle"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.aisle" |
|
|
|
placeholder="请输入巷道" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="货架" prop="shelf"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.shelf" |
|
|
|
placeholder="请输入货架" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="行" prop="locationRow"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationRow" |
|
|
|
placeholder="请输入行" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="列" prop="locationColum"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationColum" |
|
|
|
placeholder="请输入列" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="拣料优先级" prop="pickPriority"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.pickPriority" |
|
|
|
placeholder="请输入拣料优先级" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="最大承重" prop="maxWeight"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.maxWeight" |
|
|
|
placeholder="请输入最大承重" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="最大面积" prop="maxArea"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.maxArea" |
|
|
|
placeholder="请输入最大面积" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="最大体积" prop="maxVolume"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.maxVolume" |
|
|
|
placeholder="请输入最大体积" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="用户组代码" prop="userGroupCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.userGroupCode" |
|
|
|
placeholder="请输入用户组代码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="是否可用" prop="available"> |
|
|
|
<el-select |
|
|
|
v-model="queryParams.available" |
|
|
|
placeholder="请选择是否可用" |
|
|
|
clearable |
|
|
|
class="!w-240px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.TRUE_FALSE)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="生效时间" prop="activeTime"> |
|
|
|
<el-date-picker |
|
|
|
v-model="queryParams.activeTime" |
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
type="daterange" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="失效时间" prop="expireTime"> |
|
|
|
<el-date-picker |
|
|
|
v-model="queryParams.expireTime" |
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
type="daterange" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.remark" |
|
|
|
placeholder="请输入备注" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="创建时间" prop="createTime"> |
|
|
|
<el-date-picker |
|
|
|
v-model="queryParams.createTime" |
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
type="daterange" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="创建者ID" prop="creator"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.creator" |
|
|
|
placeholder="请输入创建者ID" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
class="!w-240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="info" plain @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
|
|
|
<el-button type="info" plain @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
|
|
|
<el-button type="primary" @click="openForm('create')" v-hasPermi="['wms:location:create']"> |
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
@click="handleExport" |
|
|
|
:loading="exportLoading" |
|
|
|
v-hasPermi="['wms:location:export']" |
|
|
|
> |
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<Search :schema="Location.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" /> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> |
|
|
|
<el-table-column label="代码" align="center" prop="code" width="150px" /> |
|
|
|
<el-table-column label="名称" align="center" prop="name" width="150px" /> |
|
|
|
<el-table-column label="描述" align="center" prop="description" width="150px" /> |
|
|
|
<el-table-column label="仓库代码" align="center" prop="warehouseCode" width="150px" /> |
|
|
|
<el-table-column label="区域代码" align="center" prop="areaCode" width="150px" /> |
|
|
|
<el-table-column label="库位组代码" align="center" prop="locationGroupCode" width="150px" /> |
|
|
|
<el-table-column label="ERP库位代码" align="center" prop="erpLocationCode" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :type="DICT_TYPE.ERP_LOCATION" :value="scope.row.erpLocationCode" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="类型" align="center" prop="type" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :type="DICT_TYPE.LOCATION_TYPE" :value="scope.row.type" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="巷道" align="center" prop="aisle" width="150px" /> |
|
|
|
<el-table-column label="货架" align="center" prop="shelf" width="150px" /> |
|
|
|
<el-table-column label="行" align="center" prop="locationRow" width="150px" /> |
|
|
|
<el-table-column label="列" align="center" prop="locationColum" width="150px" /> |
|
|
|
<el-table-column label="拣料优先级" align="center" prop="pickPriority" width="150px" /> |
|
|
|
<el-table-column label="最大承重" align="center" prop="maxWeight" width="150px" /> |
|
|
|
<el-table-column label="最大面积" align="center" prop="maxArea" width="150px" /> |
|
|
|
<el-table-column label="最大体积" align="center" prop="maxVolume" width="150px" /> |
|
|
|
<el-table-column label="用户组代码" align="center" prop="userGroupCode" width="150px" /> |
|
|
|
<el-table-column label="是否可用" align="center" prop="available" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :type="DICT_TYPE.TRUE_FALSE" :value="scope.row.available" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="生效时间" |
|
|
|
align="center" |
|
|
|
prop="activeTime" |
|
|
|
:formatter="dateFormatter" |
|
|
|
width="150px" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="失效时间" |
|
|
|
align="center" |
|
|
|
prop="expireTime" |
|
|
|
:formatter="dateFormatter" |
|
|
|
width="150px" |
|
|
|
/> |
|
|
|
<el-table-column label="备注" align="center" prop="remark" width="150px" /> |
|
|
|
<el-table-column |
|
|
|
label="创建时间" |
|
|
|
align="center" |
|
|
|
prop="createTime" |
|
|
|
:formatter="dateFormatter" |
|
|
|
width="150px" |
|
|
|
/> |
|
|
|
<el-table-column label="创建者ID" align="center" prop="creator" width="150px" /> |
|
|
|
<el-table-column label="操作" align="center" width="150px" fixed="right"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button |
|
|
|
link |
|
|
|
type="primary" |
|
|
|
@click="openForm('update', scope.row.id)" |
|
|
|
v-hasPermi="['wms:location:update']" |
|
|
|
> |
|
|
|
编辑 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
link |
|
|
|
type="danger" |
|
|
|
@click="handleDelete(scope.row.id)" |
|
|
|
v-hasPermi="['wms:location:delete']" |
|
|
|
> |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 分页 --> |
|
|
|
<Pagination |
|
|
|
:total="total" |
|
|
|
v-model:page="queryParams.pageNo" |
|
|
|
v-model:limit="queryParams.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
<Table |
|
|
|
:columns="Location.allSchemas.tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
> |
|
|
|
<template #code="{row}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|
|
|
<span>{{ row.code }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<LocationForm ref="formRef" @success="getList" /> |
|
|
|
<BasicForm |
|
|
|
ref="basicFormRef" |
|
|
|
@success="getList" |
|
|
|
:rules="LocationRules" |
|
|
|
:formAllSchemas="Location.allSchemas" |
|
|
|
searchTableTitle="物料基础信息" |
|
|
|
:searchTableAllSchemas="ItemBasic.allSchemas" |
|
|
|
:searchTablePage="ItembasicApi.getItembasicPage" |
|
|
|
:apiUpdate="LocationApi.updateLocation" |
|
|
|
:apiCreate="LocationApi.createLocation" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/location/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import { DICT_TYPE, getStrDictOptions, getIntDictOptions } from '@/utils/dict' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import download from '@/utils/download' |
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
import LocationForm from './LocationForm.vue' |
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
|
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
|
import { Location, LocationRules, ItemBasic } from '@/utils/disposition/tableColumns' |
|
|
|
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: 'Location' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中 |
|
|
|
const total = ref(0) // 列表的总页数 |
|
|
|
const list = ref([]) // 列表的数据 |
|
|
|
const queryParams = reactive({ |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
code: null, |
|
|
|
name: null, |
|
|
|
description: null, |
|
|
|
warehouseCode: null, |
|
|
|
areaCode: null, |
|
|
|
locationGroupCode: null, |
|
|
|
erpLocationCode: null, |
|
|
|
type: null, |
|
|
|
aisle: null, |
|
|
|
shelf: null, |
|
|
|
locationRow: null, |
|
|
|
locationColum: null, |
|
|
|
pickPriority: null, |
|
|
|
maxWeight: null, |
|
|
|
maxArea: null, |
|
|
|
maxVolume: null, |
|
|
|
userGroupCode: null, |
|
|
|
available: null, |
|
|
|
activeTime: [], |
|
|
|
expireTime: [], |
|
|
|
remark: null, |
|
|
|
createTime: [], |
|
|
|
creator: null |
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: LocationApi.getLocationPage // 分页接口 |
|
|
|
}) |
|
|
|
const queryFormRef = ref() // 搜索的表单 |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
|
|
|
|
/** 查询列表 */ |
|
|
|
const getList = async () => { |
|
|
|
loading.value = true |
|
|
|
try { |
|
|
|
const data = await LocationApi.getLocationPage(queryParams) |
|
|
|
list.value = data.list |
|
|
|
total.value = data.total |
|
|
|
} finally { |
|
|
|
loading.value = false |
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:location:create'}), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:location:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:location:export'}), // 导出 |
|
|
|
// defaultButtons.defaultFilterBtn(), // 筛选 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
// { |
|
|
|
// label: '自定义扩展按钮', |
|
|
|
// name: 'zdy', |
|
|
|
// hide: false, |
|
|
|
// type: 'primary', |
|
|
|
// icon: 'Select', |
|
|
|
// color: '' |
|
|
|
// }, |
|
|
|
] |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { // 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
|
getList() |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else { // 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
const handleQuery = () => { |
|
|
|
queryParams.pageNo = 1 |
|
|
|
getList() |
|
|
|
} |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:location:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:location:delete'}), // 删除 |
|
|
|
] |
|
|
|
|
|
|
|
/** 重置按钮操作 */ |
|
|
|
const resetQuery = () => { |
|
|
|
queryFormRef.value.resetFields() |
|
|
|
handleQuery() |
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'edit') { // 编辑 |
|
|
|
// const res = await LocationApi.getItempackaging(row.id) |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm = (type: string, id?: number) => { |
|
|
|
formRef.value.open(type, id) |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
|
} |
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
@ -422,13 +149,14 @@ const handleDelete = async (id: number) => { |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await LocationApi.exportLocation(queryParams) |
|
|
|
const data = await LocationApi.exportLocation(setSearchParams) |
|
|
|
download.excel(data, '库位.xls') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
@ -436,6 +164,21 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '库位导入模版.xls' |
|
|
|
}) |
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(() => { |
|
|
|
getList() |
|
|
|