Compare commits
4 Commits
8b0a433969
...
77d34e3971
Author | SHA1 | Date | |
---|---|---|---|
![]() |
77d34e3971 | ||
![]() |
d9fe4febab | ||
![]() |
959cf702e0 | ||
![]() |
77b85bcf51 |
16
src/api/map/binLocation.ts
Normal file
16
src/api/map/binLocation.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
//获得任务号
|
||||||
|
export const getHouseLocation = async (id: number) => {
|
||||||
|
return await request.get({ url: `/system/ware/house-location/get?id=` + id })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新库位
|
||||||
|
export const updateHouseLocation = (data) => {
|
||||||
|
return request.put({ url: '/system/ware/house-location/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
//获得库位分页
|
||||||
|
export const getHouseLocationPage = async (data) => {
|
||||||
|
return await request.post({ url: `/system/ware/house-location/page`, data })
|
||||||
|
}
|
@ -37,19 +37,24 @@
|
|||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-class-name="table-row-class"
|
<el-table
|
||||||
:header-cell-style="{ backgroundColor: '#EBF1FF', color: '#0D162A' }">
|
v-loading="loading"
|
||||||
|
:data="list"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
row-class-name="table-row-class"
|
||||||
|
:header-cell-style="{ backgroundColor: '#EBF1FF', padding: '13px 0' }"
|
||||||
|
>
|
||||||
<el-table-column label="序号" align="center" prop="id" />
|
<el-table-column label="序号" align="center" prop="id" />
|
||||||
<el-table-column label="告警等级(1-4)" align="center" prop="warnLevel" />
|
<el-table-column label="告警等级(1-4)" align="center" prop="warnLevel" />
|
||||||
<el-table-column label="告警/异常ID" align="center" prop="warnCode" />
|
<el-table-column label="告警/异常ID" align="center" prop="warnCode" />
|
||||||
<el-table-column label="车辆" align="center" prop="robotNo" />
|
<el-table-column label="车辆" align="center" prop="robotNo" />
|
||||||
<el-table-column label="告警/异常信息" align="center" prop="warnMsg" />
|
<el-table-column label="告警/异常信息" align="center" prop="warnMsg" />
|
||||||
<el-table-column label="发生时间" align="center" prop="createTime" >
|
<el-table-column label="发生时间" align="center" prop="createTime">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatDate(scope.row.createTime, 'YYYY-MM-DD HH:mm:ss') }}
|
{{ formatDate(scope.row.createTime, 'YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="操作" align="center">
|
<!-- <el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -98,7 +103,7 @@ const queryParams = reactive({
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
createTime: [],
|
createTime: [],
|
||||||
warnCode: undefined,
|
warnCode: undefined
|
||||||
})
|
})
|
||||||
const monthList = ref([
|
const monthList = ref([
|
||||||
{ label: '1月', value: 1 },
|
{ label: '1月', value: 1 },
|
||||||
@ -189,6 +194,17 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::v-deep .table-row-class {
|
::v-deep .table-row-class {
|
||||||
background-color: #f9f9f9e5;
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
::v-deep .el-table__body .cell {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #536387;
|
||||||
|
padding: 4px 12px;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #0d162a;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
95
src/views/mapPage/locationList/editFormDialog.vue
Normal file
95
src/views/mapPage/locationList/editFormDialog.vue
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 新增设备 -->
|
||||||
|
<Dialog v-model="dialogFormVisible" title="编辑" width="600" class="equipment-form-dialog">
|
||||||
|
<el-form :model="form" label-width="110" ref="ruleFormRef">
|
||||||
|
<el-form-item label="库位号" prop="locationNo">
|
||||||
|
<el-input v-model="form.locationNo" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属线库号" prop="laneName">
|
||||||
|
<el-input v-model="form.laneName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属区域号" prop="areaName">
|
||||||
|
<el-input v-model="form.areaName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="locationUseStatus">
|
||||||
|
<el-select v-model="form.locationUseStatus">
|
||||||
|
<el-option label="空闲" :value="0" />
|
||||||
|
<el-option label="占用" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否禁用" prop="locationEnable">
|
||||||
|
<el-select v-model="form.locationEnable">
|
||||||
|
<el-option label="空闲" :value="0" />
|
||||||
|
<el-option label="占用" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料信息" prop="skuInfo">
|
||||||
|
<el-input v-model="form.skuInfo" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm"> 确定 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref } from 'vue'
|
||||||
|
import * as BinLocationAPi from '@/api/map/binLocation'
|
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const props = defineProps({
|
||||||
|
positionMapId: {
|
||||||
|
type: String,
|
||||||
|
default: () => ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const ruleFormRef = ref()
|
||||||
|
const dialogFormVisible = ref(false) //列表的
|
||||||
|
|
||||||
|
//新增
|
||||||
|
const form = ref({
|
||||||
|
id: '',
|
||||||
|
locationNo: '', //线库名称
|
||||||
|
laneName: '',
|
||||||
|
areaName: '',
|
||||||
|
locationUseStatus: '',
|
||||||
|
locationEnable: '',
|
||||||
|
skuInfo: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
const open = (id) => {
|
||||||
|
dialogFormVisible.value = true
|
||||||
|
getDetail(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDetail = async (id) => {
|
||||||
|
form.value = await BinLocationAPi.getHouseLocation(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits(['submitSuccess'])
|
||||||
|
const submitForm = async () => {
|
||||||
|
await BinLocationAPi.updateHouseLocation(form.value)
|
||||||
|
dialogFormVisible.value = false
|
||||||
|
emit('submitSuccess')
|
||||||
|
message.success('修改成功')
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.equipment-form-dialog {
|
||||||
|
padding: 0px;
|
||||||
|
|
||||||
|
.el-dialog__footer {
|
||||||
|
padding: 0px 20px 20px 0;
|
||||||
|
border-top: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
234
src/views/mapPage/locationList/index.vue
Normal file
234
src/views/mapPage/locationList/index.vue
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<el-form
|
||||||
|
class="-mb-15px"
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="库位状态" prop="locationUseStatus">
|
||||||
|
<el-select v-model="queryParams.locationUseStatus" class="!w-240px" @change="handleQuery()">
|
||||||
|
<el-option label="空闲" :value="0" />
|
||||||
|
<el-option label="占用" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否禁用" prop="locationEnable">
|
||||||
|
<el-select v-model="queryParams.locationEnable" class="!w-240px" @change="handleQuery()">
|
||||||
|
<el-option label="禁用" :value="0" />
|
||||||
|
<el-option label="启用" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否锁定" prop="locationLock">
|
||||||
|
<el-select v-model="queryParams.locationLock" class="!w-240px" @change="handleQuery()">
|
||||||
|
<el-option label="锁定" :value="0" />
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="库位号" prop="locationNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.locationNo"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线库号" prop="laneName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.laneName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="区域号" prop="areaName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.areaName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料信息" prop="skuInfo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.skuInfo"
|
||||||
|
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-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<ContentWrap>
|
||||||
|
<el-table
|
||||||
|
:data="list"
|
||||||
|
style="width: 100%"
|
||||||
|
row-class-name="table-row-class"
|
||||||
|
:header-cell-style="{ backgroundColor: '#EBF1FF', padding: '13px 0' }"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" align="center" width="60" />
|
||||||
|
<el-table-column label="线库号" prop="laneName" align="center" />
|
||||||
|
<el-table-column label="区域号" prop="areaName" align="center" />
|
||||||
|
<el-table-column label="物料信息" prop="skuInfo" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
|
<el-table-column label="状态" prop="locationUseStatus" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<div class="flex-center">
|
||||||
|
<div v-if="scope.row.locationUseStatus === 1" class="occupation">占用</div>
|
||||||
|
<div v-else class="free-time">空闲</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否锁定" prop="locationLock" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.locationLock === 1" style="color: #c60606">锁定</div>
|
||||||
|
<div v-else style="color: #4dc606">正常</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否禁用" prop="locationEnable" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.locationEnable === 1" style="color: #c60606">禁用</div>
|
||||||
|
<div v-else style="color: #536387">启用</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" size="small" @click="editItem(scope.row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<editFormDialog ref="editFormDialogRef" @submitSuccess="submitSuccess" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Edit } from '@element-plus/icons-vue'
|
||||||
|
import * as BinLocationAPi from '@/api/map/binLocation'
|
||||||
|
import editFormDialog from './editFormDialog.vue'
|
||||||
|
|
||||||
|
defineOptions({ name: 'locationListManage' })
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
|
const { push } = useRouter()
|
||||||
|
|
||||||
|
const loading = ref(true) // 列表的加载中
|
||||||
|
const total = ref(0) // 列表的总页数
|
||||||
|
const list = ref([]) // 列表的数据
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
locationUseStatus: null,
|
||||||
|
locationEnable: null,
|
||||||
|
locationLock: null,
|
||||||
|
taskStage: null,
|
||||||
|
laneName: null,
|
||||||
|
areaName: null,
|
||||||
|
skuInfo: null
|
||||||
|
})
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
|
/** 查询列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await BinLocationAPi.getHouseLocationPage(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const editFormDialogRef = ref()
|
||||||
|
const editItem = (item) => {
|
||||||
|
editFormDialogRef.value.open(item.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitSuccess = () => {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value.resetFields()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化 **/
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .table-row-class {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
::v-deep .el-table__body .cell {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #536387;
|
||||||
|
padding: 1px 12px;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #0d162a;
|
||||||
|
}
|
||||||
|
::v-deep .el-link__inner {
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.occupation {
|
||||||
|
color: #eba861;
|
||||||
|
border: 1px dashed #eba861;
|
||||||
|
width: 70px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.free-time {
|
||||||
|
color: #4dc606;
|
||||||
|
border: 1px dashed #4dc606;
|
||||||
|
width: 70px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-center {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
@ -72,7 +72,7 @@
|
|||||||
:data="list"
|
:data="list"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
row-class-name="table-row-class"
|
row-class-name="table-row-class"
|
||||||
:header-cell-style="{ backgroundColor: '#EBF1FF', color: '#0D162A' }"
|
:header-cell-style="{ backgroundColor: '#EBF1FF', color: '#0D162A', padding: '13px 0' }"
|
||||||
>
|
>
|
||||||
<el-table-column align="center" label="序号" type="expand" width="60">
|
<el-table-column align="center" label="序号" type="expand" width="60">
|
||||||
<template #default="props">
|
<template #default="props">
|
||||||
@ -370,4 +370,10 @@ onMounted(() => {
|
|||||||
::v-deep .table-row-class {
|
::v-deep .table-row-class {
|
||||||
background-color: #f9f9f9e5;
|
background-color: #f9f9f9e5;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-table__body .cell {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #536387;
|
||||||
|
padding: 4px 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user