|
|
@@ -129,12 +129,12 @@
|
|
|
'box-waiting': station.status === 'waiting',
|
|
|
'box-error': station.status === 'error',
|
|
|
'box-selected': selectedBox === station.stationCode,
|
|
|
- 'box-split': station.splitCount && station.status !== 'error' && station.status !== 'waiting'
|
|
|
+ 'box-split': station.splitCount && ['offline', 'filled', 'emptyBox'].includes(station.status)
|
|
|
}"
|
|
|
@click="handleStationClick(station)"
|
|
|
>
|
|
|
<!-- 分割的料箱(异常/等待调箱状态不渲染分割) -->
|
|
|
- <template v-if="station.splitCount && station.subLocations && station.status !== 'error' && station.status !== 'waiting'">
|
|
|
+ <template v-if="station.splitCount && station.subLocations && ['offline', 'filled', 'emptyBox'].includes(station.status)">
|
|
|
<div class="sub-grid" :style="getSubGridStyle(station.splitCount)">
|
|
|
<div
|
|
|
v-for="sub in station.subLocations"
|
|
|
@@ -176,12 +176,12 @@
|
|
|
'box-waiting': station.status === 'waiting',
|
|
|
'box-error': station.status === 'error',
|
|
|
'box-selected': selectedBox === station.stationCode,
|
|
|
- 'box-split': station.splitCount && station.status !== 'error' && station.status !== 'waiting'
|
|
|
+ 'box-split': station.splitCount && ['offline', 'filled', 'emptyBox'].includes(station.status)
|
|
|
}"
|
|
|
@click="handleStationClick(station)"
|
|
|
>
|
|
|
<!-- 分割的料箱(异常/等待调箱状态不渲染分割) -->
|
|
|
- <template v-if="station.splitCount && station.subLocations && station.status !== 'error' && station.status !== 'waiting'">
|
|
|
+ <template v-if="station.splitCount && station.subLocations && ['offline', 'filled', 'emptyBox'].includes(station.status)">
|
|
|
<div class="sub-grid" :style="getSubGridStyle(station.splitCount)">
|
|
|
<div
|
|
|
v-for="sub in station.subLocations"
|
|
|
@@ -211,7 +211,7 @@
|
|
|
<div class="footer-buttons">
|
|
|
<van-button class="btn-robot" size="small" @click="callRobot">呼唤机器人</van-button>
|
|
|
<div class="btn-right">
|
|
|
- <van-button type="primary" class="btn-reset" size="small" @click="resetInput">重新输入</van-button>
|
|
|
+ <van-button type="primary" class="btn-reset" size="small" @click="resetAllData">重新输入</van-button>
|
|
|
<van-button class="btn-submit" size="small" @click="submitMove">提交移库</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -277,9 +277,8 @@ import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
|
|
|
import { onMounted, onUnmounted, ref, reactive, nextTick } from 'vue'
|
|
|
import { showToast, showLoadingToast, closeToast } from 'vant'
|
|
|
import { useStore } from '@/store/modules/user'
|
|
|
-import { getWorkingDetailsByBox, getBoxSplitCode, boxInbound, reissueTask, getBoxStatus, type BoxRelatedMergeDetailsVO, type LocationMergeDetails } from '@/api/location/merge'
|
|
|
+import { getWorkingDetailsByBox, getBoxSplitCode, boxAndStationUnbindTask, reissueTask, getBoxStatus, type BoxRelatedMergeDetailsVO, type LocationMergeDetails } from '@/api/location/merge'
|
|
|
import { getInventory, inventoryMovement } from '@/api/inventory'
|
|
|
-import { boxAndStationUnbindTask } from '@/api/haikang'
|
|
|
import { showConfirmDialog } from 'vant'
|
|
|
import { getHeader, androidFocus, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
|
import MergeTaskDetailsDialog from './components/MergeTaskDetailsDialog.vue'
|
|
|
@@ -531,6 +530,7 @@ const resetAllData = () => {
|
|
|
mergeDataList.value = []
|
|
|
clickableLocationsMap.value = new Map()
|
|
|
resetProductInfo()
|
|
|
+ productInfo.targetLocationNew = '' // 清空目标库位
|
|
|
initStations()
|
|
|
scanType.value = 1
|
|
|
focusBoxCodeInput()
|
|
|
@@ -817,7 +817,7 @@ const updateStationList = (boxDetailsList: BoxRelatedMergeDetailsVO[], splitMap:
|
|
|
status = 'offline'
|
|
|
} else if (boxStatus === 40) {
|
|
|
status = 'error'
|
|
|
- label = '异'
|
|
|
+ label = '调库异常'
|
|
|
}
|
|
|
|
|
|
// 获取分割数量
|
|
|
@@ -904,7 +904,7 @@ const handleStationClick = (station: StationItem) => {
|
|
|
return
|
|
|
}
|
|
|
// 空料箱状态弹出解绑确认框(仅当料箱无分割,即料箱即库位时才能触发)
|
|
|
- if (station.status === 'emptyBox' && (!station.splitCount || station.splitCount === 1)) {
|
|
|
+ if (station.status === 'emptyBox') {
|
|
|
showUnbindConfirm(station)
|
|
|
return
|
|
|
}
|
|
|
@@ -918,7 +918,7 @@ const handleStationClick = (station: StationItem) => {
|
|
|
const showReissueConfirm = (station: StationItem) => {
|
|
|
showConfirmDialog({
|
|
|
title: '重新下发任务',
|
|
|
- message: `站台${station.displayNumber}的料箱出现异常,是否重新下发任务?`
|
|
|
+ message: `料箱${station.boxCode}调用海康异常,是否重新下发任务?`
|
|
|
})
|
|
|
.then(() => {
|
|
|
doReissueTask(station)
|
|
|
@@ -949,8 +949,7 @@ const doUnbindTask = async (station: StationItem) => {
|
|
|
const data = {
|
|
|
warehouse,
|
|
|
boxCode: station.boxCode,
|
|
|
- stationCode: station.stationCode,
|
|
|
- releaseStation: false
|
|
|
+ stationCode: station.stationCode
|
|
|
}
|
|
|
await boxAndStationUnbindTask(data)
|
|
|
closeToast()
|
|
|
@@ -1014,7 +1013,7 @@ const refreshBoxStatus = async () => {
|
|
|
status = 'offline'
|
|
|
} else if (newBoxStatus === 40) {
|
|
|
status = 'error'
|
|
|
- label = '异'
|
|
|
+ label = '调库异常'
|
|
|
}
|
|
|
|
|
|
return { ...station, status, label }
|
|
|
@@ -1156,6 +1155,11 @@ const selectSubLocation = (station: StationItem, sub: SubLocation) => {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if (station.status === 'emptyBox') {
|
|
|
+ showUnbindConfirm(station)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
selectedBox.value = sub.locationCode
|
|
|
|
|
|
// 获取库位推荐信息
|
|
|
@@ -1210,7 +1214,7 @@ const currentBoxList = ref<string[]>([])
|
|
|
// 料箱选择成功
|
|
|
const onBoxSelectionSuccess = () => {
|
|
|
// 重置页面数据并聚焦到料箱输入框
|
|
|
- resetAllData()
|
|
|
+ refreshBoxData()
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1301,11 +1305,6 @@ const callRobot = () => {
|
|
|
boxSelectionDialogRef.value?.showDialog()
|
|
|
}
|
|
|
|
|
|
-// 重新输入(不重置料箱号)
|
|
|
-const resetInput = () => {
|
|
|
- resetExceptBoxCode()
|
|
|
-}
|
|
|
-
|
|
|
// 提交移库
|
|
|
const submitMove = () => {
|
|
|
if (!boxCode.value) {
|
|
|
@@ -1421,7 +1420,7 @@ const submitMove = () => {
|
|
|
}
|
|
|
|
|
|
.station-tabs {
|
|
|
- margin-bottom: 12px;
|
|
|
+ margin-bottom: 50px;
|
|
|
background: #fff;
|
|
|
border-radius: 4px;
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
|
@@ -1613,12 +1612,11 @@ const submitMove = () => {
|
|
|
}
|
|
|
|
|
|
&.box-error {
|
|
|
- background: #ffcccc;
|
|
|
border-color: #ff6666;
|
|
|
cursor: pointer;
|
|
|
|
|
|
.box-label {
|
|
|
- color: #cc0000;
|
|
|
+ color: #ff6666;
|
|
|
}
|
|
|
}
|
|
|
|