|
|
@@ -277,7 +277,7 @@ 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, boxAndStationUnbindTask, reissueTask, getBoxStatus, type BoxRelatedMergeDetailsVO, type LocationMergeDetails } from '@/api/location/merge'
|
|
|
+import { getWorkingDetailsByBox, getBoxSplitCode, boxAndStationUnbindTask, reissueTask, getBoxStatus, forceCompleteBoxTask, type BoxRelatedMergeDetailsVO, type LocationMergeDetails } from '@/api/location/merge'
|
|
|
import { getInventory, inventoryMovement } from '@/api/inventory'
|
|
|
import { showConfirmDialog } from 'vant'
|
|
|
import { getHeader, androidFocus, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
|
@@ -569,6 +569,12 @@ const resetProductInfo = () => {
|
|
|
const loadBoxData = async (code: string) => {
|
|
|
if (!code) return
|
|
|
|
|
|
+ // 检查是否为站台编码(以RLOCHK开头)
|
|
|
+ if (code.startsWith('RLOCHK')) {
|
|
|
+ handleStationCodeForceComplete(code)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
try {
|
|
|
showLoadingToast({ message: '加载中...', forbidClick: true })
|
|
|
|
|
|
@@ -914,6 +920,30 @@ const handleStationClick = (station: StationItem) => {
|
|
|
selectStation(station)
|
|
|
}
|
|
|
|
|
|
+// 处理站台编码强制完成任务
|
|
|
+const handleStationCodeForceComplete = async (stationCode: string) => {
|
|
|
+ showConfirmDialog({
|
|
|
+ title: '强制完成任务',
|
|
|
+ message: `检测到站台编码:${stationCode},是否强制完成该站台料箱任务?`
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ showLoadingToast({ message: '正在强制完成任务...', forbidClick: true })
|
|
|
+ await forceCompleteBoxTask(warehouse, stationCode, null)
|
|
|
+ closeToast()
|
|
|
+ scanSuccess()
|
|
|
+ showToast('强制完成任务成功')
|
|
|
+ // 重新加载数据
|
|
|
+ refreshBoxData()
|
|
|
+ } catch (error: any) {
|
|
|
+ closeToast()
|
|
|
+ scanError()
|
|
|
+ showToast(error.message || '强制完成任务失败')
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ // 用户取消
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 显示重新下发确认框
|
|
|
const showReissueConfirm = (station: StationItem) => {
|
|
|
showConfirmDialog({
|