|
|
|
|
|
<template>
|
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
|
<!-- 搜索工作栏 -->
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
class="-mb-15px"
|
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
|
ref="queryFormRef"
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
label-width="88px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="选择巷道" prop="streetId">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.streetId"
|
|
|
|
|
|
placeholder="请选择巷道"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in streetList"
|
|
|
|
|
|
:key="dict.plcId"
|
|
|
|
|
|
:label="dict.name"
|
|
|
|
|
|
:value="dict.plcId"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="盘点批次号" prop="lotnum">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.lotnum"
|
|
|
|
|
|
placeholder="请输入盘点批次号"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="层" prop="row">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.row"
|
|
|
|
|
|
placeholder="请输入层"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="列" prop="column">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.column"
|
|
|
|
|
|
placeholder="请输入列"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- <el-form-item label="巷道id" prop="streetId">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.streetId"
|
|
|
|
|
|
placeholder="请选择巷道id"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
|
<el-form-item label="taskid" prop="taskId">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.taskId"
|
|
|
|
|
|
placeholder="请输入taskid"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="货架方向" prop="direction">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.direction"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.DIRECTION)"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="盘点状态" prop="status">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.status"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.CHECK_STATUS)"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="货位号" prop="storage_Code">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.storage_Code"
|
|
|
|
|
|
placeholder="请输入货位号"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
@click="openForm('create')"
|
|
|
|
|
|
v-hasPermi="['logistics:check-log:create']"
|
|
|
|
|
|
>
|
|
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
plain
|
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
|
:loading="exportLoading"
|
|
|
|
|
|
v-hasPermi="['logistics:check-log:export']"
|
|
|
|
|
|
>
|
|
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
|
|
|
<el-table-column label="巷道名" align="center" prop="streetName" />
|
|
|
|
|
|
<el-table-column label="taskid" align="center" prop="taskId" />
|
|
|
|
|
|
<el-table-column label="盘点批次号" align="center" prop="lotnum" />
|
|
|
|
|
|
<el-table-column label="位置" align="center" prop="row" >
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<space >{{ scope.row.row+'层-'+scope.row.column+'列' }}</space>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="货位号" align="center" prop="storage_Code" />
|
|
|
|
|
|
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
|
|
|
|
|
<el-table-column label="货架方向" align="center" prop="direction" >
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<dict-tag :type="DICT_TYPE.DIRECTION" :value="scope.row.direction" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="盘点状态" align="center" prop="status">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<dict-tag :type="DICT_TYPE.CHECK_STATUS" :value="scope.row.status" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作前图片" align="center" prop="pic">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<div class="image">
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
style="width: 60px; height: 50px"
|
|
|
|
|
|
:src="scope.row.pic"
|
|
|
|
|
|
:zoom-rate="1.2"
|
|
|
|
|
|
:max-scale="7"
|
|
|
|
|
|
:min-scale="0.2"
|
|
|
|
|
|
:preview-src-list="scope.row.pic"
|
|
|
|
|
|
:initial-index="4"
|
|
|
|
|
|
fit="cover"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" align="center">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
link
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
@click="handleDelete(scope.row.id)"
|
|
|
|
|
|
v-hasPermi="['logistics:check-log:delete']"
|
|
|
|
|
|
>
|
|
|
|
|
|
删除
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 分页 -->
|
|
|
|
|
|
<Pagination
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
v-model:page="queryParams.pageNo"
|
|
|
|
|
|
v-model:limit="queryParams.pageSize"
|
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
|
|
|
<CheckLogForm ref="formRef" @success="getList" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
|
import { StreetApi,StreetVO } from '@/api/logistics/street'
|
|
|
|
|
|
import download from '@/utils/download'
|
|
|
|
|
|
import { CheckLogApi, CheckLogVO } from '@/api/logistics/checklog'
|
|
|
|
|
|
import CheckLogForm from './CheckLogForm.vue'
|
|
|
|
|
|
|
|
|
|
|
|
/** 盘点 列表 */
|
|
|
|
|
|
defineOptions({ name: 'CheckLog' })
|
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
const streetList = ref<StreetVO[]>([]) // 巷道队列
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
|
|
|
const list = ref<CheckLogVO[]>([]) // 列表的数据
|
|
|
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
|
|
|
const queryParams = reactive({
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
lotnum: undefined,
|
|
|
|
|
|
row: undefined,
|
|
|
|
|
|
column: undefined,
|
|
|
|
|
|
streetId: undefined,
|
|
|
|
|
|
exportTime: [],
|
|
|
|
|
|
taskId: undefined,
|
|
|
|
|
|
direction: undefined,
|
|
|
|
|
|
side: undefined,
|
|
|
|
|
|
status: undefined,
|
|
|
|
|
|
storage_Code: undefined,
|
|
|
|
|
|
})
|
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
const data = await CheckLogApi.getCheckLogPage(queryParams)
|
|
|
|
|
|
list.value = data.list
|
|
|
|
|
|
total.value = data.total
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
|
const handleQuery = () => {
|
|
|
|
|
|
queryParams.pageNo = 1
|
|
|
|
|
|
getList()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
|
const resetQuery = () => {
|
|
|
|
|
|
queryFormRef.value.resetFields()
|
|
|
|
|
|
handleQuery()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
|
|
|
const formRef = ref()
|
|
|
|
|
|
const openForm = (type: string, id?: number) => {
|
|
|
|
|
|
formRef.value.open(type, id)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
const handleDelete = async (id: number) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
// 删除的二次确认
|
|
|
|
|
|
await message.delConfirm()
|
|
|
|
|
|
// 发起删除
|
|
|
|
|
|
await CheckLogApi.deleteCheckLog(id)
|
|
|
|
|
|
message.success(t('common.delSuccess'))
|
|
|
|
|
|
// 刷新列表
|
|
|
|
|
|
await getList()
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
const handleExport = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
// 导出的二次确认
|
|
|
|
|
|
await message.exportConfirm()
|
|
|
|
|
|
// 发起导出
|
|
|
|
|
|
exportLoading.value = true
|
|
|
|
|
|
const data = await CheckLogApi.exportCheckLog(queryParams)
|
|
|
|
|
|
download.excel(data, '盘点.xls')
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
exportLoading.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/** 查询巷道列表 */
|
|
|
|
|
|
const getStringList = () => {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
const data = StreetApi.getStreetList()
|
|
|
|
|
|
data.then((res)=>{
|
|
|
|
|
|
streetList.value = res
|
|
|
|
|
|
})
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
|
|
|
console.log(streetList);
|
|
|
|
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/** 初始化 **/
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getList()
|
|
|
|
|
|
getStringList()
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.image__error .image-slot {
|
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.image__error .image-slot .el-icon {
|
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.image__error .el-image {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 200px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|