81 lines
3.5 KiB
Vue
81 lines
3.5 KiB
Vue
<template>
|
|||
|
|
<div>
|
||
|
|
<el-card>
|
||
|
|
<h3>托盘工作台</h3>
|
||
|
|
<el-alert type="info" :closable="false" show-icon
|
||
|
|
title="库管托盘回收闭环:工位接驳台「有托盘」的行 = 待处理(库管可先确认现场状况,再派 AGV 回收空托盘,或到「退库单」页代工位退料)。派车为业务自动触发(空车前往工位接驳台免弹窗);AGV 到位后进「到位待令」,在 MES AGV 配送页点「确认装车并送货」才拉走——防止库管不知现场状况被误拖。" />
|
||
|
|
<el-button class="mt" :loading="loading" @click="load">刷新接驳台台账</el-button>
|
||
|
|
</el-card>
|
||
|
|
<el-card class="mt">
|
||
|
|
<el-table :data="rows" border v-loading="loading">
|
||
|
|
<el-table-column prop="dockCode" label="接驳台" width="110" />
|
||
|
|
<el-table-column prop="name" label="名称" min-width="180" show-overflow-tooltip />
|
||
|
|
<el-table-column prop="stationNo" label="工位" width="70" align="center">
|
||
|
|
<template #default="{ row }">{{ row.stationNo || '库房' }}</template>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column label="左右" width="70" align="center">
|
||
|
|
<template #default="{ row }"><el-tag size="small" effect="plain">{{ row.sideCn }}</el-tag></template>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column label="托盘" width="110" align="center">
|
||
|
|
<template #default="{ row }">
|
||
|
|
<el-tag :type="row.hasPallet ? 'warning' : 'success'" size="small">{{ row.hasPallet ? '有托盘' : '空闲' }}</el-tag>
|
||
|
|
</template>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column prop="palletRef" label="托盘关联" width="150" show-overflow-tooltip />
|
||
|
|
<el-table-column label="状态" width="90" align="center">
|
||
|
|
<template #default="{ row }">{{ row.status === 'DISABLED' ? '已停用' : '启用' }}</template>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column label="操作" width="170" align="center" fixed="right">
|
||
|
|
<template #default="{ row }">
|
||
|
|
<el-button v-if="row.hasPallet && row.dockType === 'line'" size="small" type="warning" :loading="dispatching === row.dockCode"
|
||
|
|
@click="dispatchRecovery(row)">派 AGV 回收</el-button>
|
||
|
|
<span v-else style="color:#999">-</span>
|
||
|
|
</template>
|
||
|
|
</el-table-column>
|
||
|
|
</el-table>
|
||
|
|
</el-card>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup>
|
||
|
|
import { ref } from 'vue'
|
||
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||
|
|
import request from '../utils/request'
|
||
|
|
import PageHelp from '../components/PageHelp.vue'
|
||
|
|
|
||
|
|
defineOptions({ name: 'PalletWorkbench' })
|
||
|
|
|
||
|
|
const rows = ref([])
|
||
|
|
const loading = ref(false)
|
||
|
|
const dispatching = ref('')
|
||
|
|
|
||
|
|
async function load() {
|
||
|
|
loading.value = true
|
||
|
|
try {
|
||
|
|
const d = await request.get('/pallet/docks')
|
||
|
|
rows.value = d?.list || []
|
||
|
|
} finally { loading.value = false }
|
||
|
|
}
|
||
|
|
|
||
|
|
async function dispatchRecovery(row) {
|
||
|
|
try {
|
||
|
|
await ElMessageBox.confirm(
|
||
|
|
`确认派 AGV 前往 ${row.name} 回收托盘?\n\n流程:AGV 空车前往(免确认)→ 到位后停住(到位待令)→ 请在 MES「AGV 配送」页点「确认装车并送货」→ 送回库房接驳台 → 确认卸货。`,
|
||
|
|
'派 AGV 回收托盘', { type: 'warning', confirmButtonText: '确认派车' })
|
||
|
|
} catch { return }
|
||
|
|
dispatching.value = row.dockCode
|
||
|
|
try {
|
||
|
|
await request.post('/pallet/dispatch', { dockCode: row.dockCode })
|
||
|
|
ElMessage.success('已派车,AGV 前往中')
|
||
|
|
load()
|
||
|
|
} catch { /* 拦截器已提示 */ }
|
||
|
|
dispatching.value = ''
|
||
|
|
}
|
||
|
|
|
||
|
|
load()
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped>
|
||
|
|
.mt { margin-top: 12px; }
|
||
|
|
</style>
|