feat: 新增工序签字功能,移除移料指令模块
新增操作工/检验员工序签字功能,支持工艺步骤配置签字要求;删除移料指令相关代码,将移料页签重命名为产线点位(上料/下料);新增成品入库功能及相关权限;优化备料单状态、质量状态逻辑,新增批次序号字段;修复AGV取消后备料单回退状态问题。
This commit is contained in:
@@ -55,23 +55,11 @@ export const fileNameFromUrl = (u) => {
|
||||
return i >= 0 ? s.slice(i + '/api/v1/files/'.length) : s
|
||||
}
|
||||
|
||||
// ---------- 产线点位 / 上位机移料 / 叫料(代理 MES) ----------
|
||||
// ---------- 产线点位 / 叫料(代理 MES) ----------
|
||||
// 产线点位台账(上料位/工位/缓存位/接驳台/末端 当前工件),唯一事实源
|
||||
export const getLinePoints = () => request.get('/api/line/points')
|
||||
|
||||
// 移料指令列表:{status, sn, limit}
|
||||
export const getLineMoves = (params) => request.get('/api/line/moves', { params })
|
||||
|
||||
// 下发移料指令:{sn, fromPoint, toPoint, orderNo}
|
||||
export const issueLineMove = (data) => request.post('/api/line/move', data)
|
||||
|
||||
// 工件到位确认:{cmdNo}(回写台账并闭环指令)
|
||||
export const arriveLineMove = (data) => request.post('/api/line/move/arrive', data)
|
||||
|
||||
// PLC 应答:{cmdNo}
|
||||
export const ackLineMove = (data) => request.post('/api/line/move/ack', data)
|
||||
|
||||
// 点位人工记账:{pointNo, sn, orderNo, action: 'IN'|'OUT'}
|
||||
// 点位人工记账:{pointNo, sn, orderNo, action: 'IN'|'OUT'}(扫码即到位凭证:IN=上料到位、OUT=下料释放)
|
||||
export const occupyLinePoint = (data) => request.post('/api/line/occupy', data)
|
||||
|
||||
// 工位叫料:{stationNo, orderNo, items:[{materialCode, materialName, unit, snMode, qty}]}
|
||||
|
||||
@@ -168,27 +168,26 @@ export const helpMaterial = {
|
||||
]
|
||||
}
|
||||
|
||||
// 移料页
|
||||
export const helpMove = {
|
||||
title: '移料 使用说明',
|
||||
// 产线点位(上料/下料)页(页签 key 沿用历史 'move',原移料指令功能已删除)
|
||||
export const helpLinePoint = {
|
||||
title: '产线点位(上料/下料) 使用说明',
|
||||
overview:
|
||||
'移料页以产线点位图为唯一事实源,每个点位显示当前占用工件。选起点(已占用)→ 选终点(空闲)→ 下发移料;也支持上料登记/下料释放与移料指令应答/到位。',
|
||||
'本页以产线点位图为唯一事实源,实时显示每个点位当前占用的工件;用于人工上料登记与下料释放(扫码到位后由作业页自动记账,本页处理补登记/异常释放)。',
|
||||
sections: [
|
||||
{
|
||||
title: '产线点位与移料',
|
||||
overview: '点击点位选择起点与终点,下发工件在产线间的移动。',
|
||||
title: '产线点位',
|
||||
overview: '查看产线各点位(上料位/工位/缓存位/末端/接驳台)的实时占用情况。',
|
||||
fields: [
|
||||
{ name: '点位图', source: 'MES 产线点位台账。实时反映每点位占用情况。', purpose: '看清工件在产线上的实时位置', fill: '点一个已占用点位为起点,再点一个空闲点位为终点' },
|
||||
{ name: '下发移料', source: '按钮操作 + 确认框。生成移料指令。', purpose: '把工件从起点移到终点', fill: '选完起点/终点后点「下发移料」并确认' },
|
||||
{ name: '上料登记/下料释放', source: '按钮操作。更新点位占用。', purpose: '人工登记工件上料或释放已下料点位', fill: '选中点位后点对应按钮,按提示输入 SN 或确认' }
|
||||
{ name: '点位图', source: 'MES 产线点位台账。实时反映每点位占用情况。', purpose: '看清工件在产线上的实时位置', fill: '只读展示,点「刷新」更新;高亮框为本工位点位' },
|
||||
{ name: '本工位接驳台', source: 'MES 产线点位台账(AGV 点位)。', purpose: '查看叫料物料送达的接驳台', fill: '只读展示' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '移料指令',
|
||||
overview: '列出最近 20 条移料指令及其状态,可应答与确认到位。',
|
||||
title: '上料登记 / 下料释放',
|
||||
overview: '人工维护点位占用:上料登记把工件 SN 记到点位,下料释放清空点位。',
|
||||
fields: [
|
||||
{ name: '指令状态', source: 'MES 移料指令。', purpose: '跟踪指令从下发→应答→到位→闭环', fill: '只读展示,按状态提供对应操作按钮' },
|
||||
{ name: '应答/确认到位', source: '按钮操作。上报 MES。', purpose: '推进移料指令流转,到位后自动更新点位占用', fill: '指令处于对应状态时点击即可' }
|
||||
{ name: '上料登记', source: '按钮操作。更新点位占用。', purpose: '首件上线或补登记时把工件记到所选点位', fill: '点选空闲点位 → 点「上料登记」→ 按提示输入 SN' },
|
||||
{ name: '下料释放', source: '按钮操作。更新点位占用。', purpose: '工件已物理离开点位时释放占用', fill: '点选占用点位 → 点「下料释放」并确认' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
// 工位终端全局状态(模块级单例)
|
||||
// 终端一个工位一个进程:工位号由服务端配置固定,前端不可修改。
|
||||
// 状态集中在这里,作业/物料/移料/工艺各面板共享,避免多份轮询与状态不一致。
|
||||
// 状态集中在这里,作业/物料/产线点位/工艺各面板共享,避免多份轮询与状态不一致。
|
||||
import { computed, reactive, watch } from 'vue'
|
||||
import {
|
||||
getBindPanel,
|
||||
getConfig,
|
||||
getLineMoves,
|
||||
getLinePoints,
|
||||
getStationState,
|
||||
getSyncStats,
|
||||
getTaskCurrent,
|
||||
getTighteningList,
|
||||
getWip,
|
||||
issueLineMove,
|
||||
occupyLinePoint,
|
||||
pauseStation,
|
||||
submitTorque
|
||||
@@ -26,7 +24,6 @@ export const state = reactive({
|
||||
currentSn: '',
|
||||
task: null,
|
||||
points: [],
|
||||
moves: [],
|
||||
tightRows: [],
|
||||
wip: [],
|
||||
bindPanel: null,
|
||||
@@ -93,7 +90,7 @@ export const missingTorqueSteps = computed(
|
||||
() => torqueSteps.value.filter((s) => !torqueRowOfStep(s.id))
|
||||
)
|
||||
export const orderNos = computed(() => (Array.isArray(state.task?.orderNos) ? state.task.orderNos : []))
|
||||
// 终端可见页签(按工位配置;空=全部显示)。可选值 online/work/material/move/pdf/inspect/offline
|
||||
// 终端可见页签(按工位配置;空=全部显示)。可选值 online/work/material/move(产线点位:上料/下料,历史 key 沿用)/pdf/inspect/offline
|
||||
export const visibleTabs = computed(() => (Array.isArray(state.task?.tabs) ? state.task.tabs : []))
|
||||
// 页签是否显示:未配置(空数组)一律显示
|
||||
export const hasTab = (name) => !visibleTabs.value.length || visibleTabs.value.includes(name)
|
||||
@@ -231,14 +228,6 @@ export async function loadPoints() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function loadMoves() {
|
||||
try {
|
||||
state.moves = (await getLineMoves({ limit: 20 })) || []
|
||||
} catch {
|
||||
state.moves = []
|
||||
}
|
||||
}
|
||||
|
||||
// loadTight 只加载「当前工件」的拧紧记录(按 SN 过滤):拧紧数据绑定工件,切换工件即切换明细。
|
||||
export async function loadTight() {
|
||||
if (!state.currentSn) {
|
||||
@@ -361,37 +350,26 @@ export function setCurrentSn(sn) {
|
||||
}
|
||||
|
||||
// ---------- 产线动作(把工件弄到本工位 / 移出本工位) ----------
|
||||
// bringSnToStation:扫描工件 SN 后自动判断来源——
|
||||
// 1) SN 已在产线某点位 → 下发移料指令(起点该点位 → 终点本工位),返回 {mode:'MOVE', cmdNo}
|
||||
// 2) SN 不在任何点位(首件/人工上料)→ 直接记账到本工位,返回 {mode:'IN'}
|
||||
// 3) SN 已在本工位 → 返回 {mode:'HERE'}
|
||||
// bringSnToStation:扫描工件 SN 即到位凭证(移料指令功能已删除:产线单向流动,PLC 不参与业务)。
|
||||
// 1) SN 已在本工位点位 → 返回 {mode:'HERE'}
|
||||
// 2) 其余情况(首件/人工上料/上游流转到位)→ 直接记账到本工位,返回 {mode:'IN'}
|
||||
export async function bringSnToStation(sn) {
|
||||
const target = String(state.stationNo)
|
||||
const src = state.points.find((p) => p.currentSn === sn && p.occupied)
|
||||
if (!src) {
|
||||
await occupyLinePoint({ pointNo: target, sn, orderNo: state.orderNo || '', action: 'IN' })
|
||||
return { mode: 'IN' }
|
||||
}
|
||||
if (String(src.pointNo) === target) return { mode: 'HERE' }
|
||||
const r = await issueLineMove({ sn, fromPoint: src.pointNo, toPoint: target, orderNo: state.orderNo || '' })
|
||||
return { mode: 'MOVE', cmdNo: r?.cmdNo, fromPoint: src.pointNo }
|
||||
if (src && String(src.pointNo) === target) return { mode: 'HERE' }
|
||||
await occupyLinePoint({ pointNo: target, sn, orderNo: state.orderNo || '', action: 'IN' })
|
||||
return { mode: 'IN' }
|
||||
}
|
||||
|
||||
// 工件移出本工位:默认目标为下游第一个空闲点位(缓存位优先)
|
||||
export function suggestOutPoint() {
|
||||
const mySeq = myPoint.value?.seq || 0
|
||||
const down = beltPoints.value.filter((p) => (p.seq || 0) > mySeq)
|
||||
return (down.find((p) => !p.occupied) || down[0] || null)
|
||||
}
|
||||
|
||||
export async function moveOut(sn, toPoint) {
|
||||
const r = await issueLineMove({
|
||||
sn,
|
||||
fromPoint: String(state.stationNo),
|
||||
toPoint,
|
||||
orderNo: state.orderNo || ''
|
||||
// moveOut 工件移出本工位:释放本工位点位(下料记账)。
|
||||
// 工件随产线单向流向下工位,由下工位扫码登记到位,无需选择目标点位。
|
||||
export async function moveOut() {
|
||||
await occupyLinePoint({
|
||||
pointNo: String(state.stationNo),
|
||||
sn: state.currentSn,
|
||||
orderNo: '',
|
||||
action: 'OUT'
|
||||
})
|
||||
return r?.cmdNo
|
||||
}
|
||||
|
||||
export const operatorName = () => user.name || user.username || ''
|
||||
|
||||
@@ -52,8 +52,9 @@
|
||||
<el-tab-pane v-if="hasTab('material')" label="物料 / 叫料" name="material">
|
||||
<MaterialPanel />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="hasTab('move')" label="移料" name="move">
|
||||
<MovePanel />
|
||||
<!-- 页签 key 沿用 'move':兼容存量工位 visibleTabs 配置(历史为移料,现为产线点位上料/下料) -->
|
||||
<el-tab-pane v-if="hasTab('move')" label="产线点位(上料/下料)" name="move">
|
||||
<LinePointPanel />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="hasTab('pdf')" label="工艺文件" name="pdf">
|
||||
<PdfPanel />
|
||||
@@ -76,7 +77,7 @@ import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import WorkPanel from './panels/WorkPanel.vue'
|
||||
import MaterialPanel from './panels/MaterialPanel.vue'
|
||||
import MovePanel from './panels/MovePanel.vue'
|
||||
import LinePointPanel from './panels/LinePointPanel.vue'
|
||||
import PdfPanel from './panels/PdfPanel.vue'
|
||||
import InspectPanel from './panels/InspectPanel.vue'
|
||||
import OnlinePanel from './panels/OnlinePanel.vue'
|
||||
@@ -85,8 +86,8 @@ import WorkloadDialog from './panels/WorkloadDialog.vue'
|
||||
import PageHelp from '../components/PageHelp.vue'
|
||||
import {
|
||||
helpInspect,
|
||||
helpLinePoint,
|
||||
helpMaterial,
|
||||
helpMove,
|
||||
helpOffline,
|
||||
helpOnline,
|
||||
helpPdf,
|
||||
@@ -98,7 +99,6 @@ import {
|
||||
hasNg,
|
||||
hasTab,
|
||||
loadConfig,
|
||||
loadMoves,
|
||||
loadPoints,
|
||||
loadStats,
|
||||
loadStationState,
|
||||
@@ -141,7 +141,7 @@ const HELP_MAP = {
|
||||
offline: helpOffline,
|
||||
work: helpWorkstation,
|
||||
material: helpMaterial,
|
||||
move: helpMove,
|
||||
move: helpLinePoint,
|
||||
pdf: helpPdf,
|
||||
inspect: helpInspect
|
||||
}
|
||||
@@ -180,7 +180,6 @@ onMounted(async () => {
|
||||
else if (hasTab('offline')) tab.value = 'offline'
|
||||
else tab.value = 'work'
|
||||
refreshAll()
|
||||
loadMoves()
|
||||
workRef.value?.focusScan?.()
|
||||
|
||||
timerTask = setInterval(loadTask, 5000) // 任务 5 秒
|
||||
@@ -189,7 +188,6 @@ onMounted(async () => {
|
||||
timerClock = setInterval(() => {
|
||||
tickClock()
|
||||
loadPoints() // 点位台账 10 秒
|
||||
loadMoves()
|
||||
loadWip() // 在制品 10 秒
|
||||
loadStationState() // 停单状态 10 秒
|
||||
}, 10000)
|
||||
|
||||
+8
-124
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="move-panel">
|
||||
<!-- ① 产线点位图(唯一事实源:每点位当前工件) -->
|
||||
<div class="line-point-panel">
|
||||
<!-- 产线点位图(唯一事实源:每点位当前工件)+ 人工上料/下料登记 -->
|
||||
<section class="card">
|
||||
<div class="card-title">
|
||||
产线点位(点击选择起点 → 再点终点 → 下发移料)
|
||||
产线点位(上料/下料登记)
|
||||
<el-button size="large" @click="clearSel">清空选择</el-button>
|
||||
<el-button size="large" @click="loadPoints">刷新</el-button>
|
||||
</div>
|
||||
@@ -31,80 +31,32 @@
|
||||
|
||||
<div class="ops">
|
||||
<div class="sel-text">
|
||||
起点:<b>{{ fromText }}</b> | 终点:<b>{{ toText }}</b>
|
||||
已选点位:<b>{{ selected || '未选择' }}</b>
|
||||
</div>
|
||||
<el-button type="primary" size="large" :disabled="!canIssue" @click="onIssue">下发移料</el-button>
|
||||
<el-button size="large" :disabled="!selected" @click="onIn">上料登记</el-button>
|
||||
<el-button type="danger" size="large" :disabled="!selected" @click="onOut">下料释放</el-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ② 移料指令 -->
|
||||
<section class="card">
|
||||
<div class="card-title">移料指令(最近 20 条)</div>
|
||||
<el-table :data="moves" border size="large" height="420">
|
||||
<el-table-column prop="cmdNo" label="指令号" min-width="150" />
|
||||
<el-table-column prop="sn" label="工件SN" min-width="140" />
|
||||
<el-table-column label="起点 → 终点" min-width="140">
|
||||
<template #default="{ row }">{{ row.fromPoint }} → {{ row.toPoint }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="110">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusType(row.status)" effect="dark">{{ statusText(row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operator" label="操作人" width="110" />
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.status === 'ISSUED'"
|
||||
size="large"
|
||||
@click="onAck(row)"
|
||||
>应答</el-button>
|
||||
<el-button
|
||||
v-if="row.status === 'ISSUED' || row.status === 'ACK'"
|
||||
type="primary"
|
||||
size="large"
|
||||
@click="onArrive(row)"
|
||||
>确认到位</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ackLineMove, arriveLineMove, issueLineMove, occupyLinePoint } from '../../api'
|
||||
import { occupyLinePoint } from '../../api'
|
||||
import {
|
||||
beltPoints,
|
||||
loadMoves,
|
||||
loadPoints,
|
||||
myDocks,
|
||||
orderNo,
|
||||
pointByNo,
|
||||
stationNo,
|
||||
state
|
||||
stationNo
|
||||
} from '../../store/station'
|
||||
|
||||
const moves = computed(() => state.moves)
|
||||
const selected = ref('')
|
||||
const from = ref('')
|
||||
const to = ref('')
|
||||
|
||||
const fromText = computed(() => from.value || '未选择')
|
||||
const toText = computed(() => to.value || '未选择')
|
||||
const canIssue = computed(() => {
|
||||
if (!from.value || !to.value || from.value === to.value) return false
|
||||
return !!pointByNo(from.value)?.occupied
|
||||
})
|
||||
|
||||
function clearSel() {
|
||||
selected.value = ''
|
||||
from.value = ''
|
||||
to.value = ''
|
||||
}
|
||||
|
||||
function typeClass(p) {
|
||||
@@ -116,50 +68,6 @@ function typeClass(p) {
|
||||
|
||||
function onPick(p) {
|
||||
selected.value = p.pointNo
|
||||
if (!from.value) {
|
||||
// 起点必须是占用点位
|
||||
if (!p.occupied) {
|
||||
ElMessage.warning(p.pointNo + ' 当前无工件,不能作为起点')
|
||||
return
|
||||
}
|
||||
from.value = p.pointNo
|
||||
return
|
||||
}
|
||||
if (p.pointNo === from.value) {
|
||||
to.value = ''
|
||||
return
|
||||
}
|
||||
if (p.occupied) {
|
||||
ElMessage.warning(p.pointNo + ' 已被占用,不能作为终点')
|
||||
return
|
||||
}
|
||||
to.value = p.pointNo
|
||||
}
|
||||
|
||||
async function onIssue() {
|
||||
const src = pointByNo(from.value)
|
||||
if (!src) return
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确认把「${src.currentSn}」从 ${from.value} 移到 ${to.value}?`,
|
||||
'移料确认',
|
||||
{ confirmButtonText: '确认下发', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
try {
|
||||
await issueLineMove({
|
||||
sn: src.currentSn,
|
||||
fromPoint: from.value,
|
||||
toPoint: to.value,
|
||||
orderNo: orderNo.value || src.orderNo || ''
|
||||
})
|
||||
ElMessage.success('移料指令已下发')
|
||||
clearSel()
|
||||
loadPoints()
|
||||
loadMoves()
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
}
|
||||
|
||||
async function onIn() {
|
||||
@@ -210,34 +118,10 @@ async function onOut() {
|
||||
loadPoints()
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
}
|
||||
|
||||
async function onAck(row) {
|
||||
try {
|
||||
await ackLineMove({ cmdNo: row.cmdNo })
|
||||
ElMessage.success('已应答')
|
||||
loadMoves()
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
}
|
||||
|
||||
async function onArrive(row) {
|
||||
try {
|
||||
await arriveLineMove({ cmdNo: row.cmdNo })
|
||||
ElMessage.success('到位已记账')
|
||||
loadMoves()
|
||||
loadPoints()
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
}
|
||||
|
||||
function statusText(s) {
|
||||
return { ISSUED: '已下发', ACK: '已应答', ARRIVED: '已到位', CLOSED: '已闭环', FAILED: '失败' }[s] || s
|
||||
}
|
||||
function statusType(s) {
|
||||
return { ISSUED: 'warning', ACK: 'primary', ARRIVED: 'success', CLOSED: 'info', FAILED: 'danger' }[s] || 'info'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.move-panel {
|
||||
.line-point-panel {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 12px;
|
||||
@@ -204,7 +204,7 @@
|
||||
<script setup>
|
||||
import { computed, nextTick, reactive, ref, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { arriveLineMove, fileNameFromUrl, getTrace, pdfOpenUrl, reportProcessDone, reportTempStore } from '../../api'
|
||||
import { fileNameFromUrl, getTrace, pdfOpenUrl, reportProcessDone, reportTempStore } from '../../api'
|
||||
import {
|
||||
autoTorqueState,
|
||||
bindBlocking,
|
||||
@@ -216,7 +216,6 @@ import {
|
||||
flowName,
|
||||
hasNg,
|
||||
loadBind,
|
||||
loadMoves,
|
||||
loadPoints,
|
||||
loadStats,
|
||||
loadTask,
|
||||
@@ -243,7 +242,6 @@ import {
|
||||
stepValues,
|
||||
stationNo,
|
||||
submitTorqueStep,
|
||||
suggestOutPoint,
|
||||
torqueDoneCount,
|
||||
torqueRowOfStep,
|
||||
torqueStepCount,
|
||||
@@ -426,25 +424,13 @@ async function onTakeIn() {
|
||||
}
|
||||
taking.value = true
|
||||
try {
|
||||
// 扫码即到位凭证:不再下发移料指令,直接记账到本工位
|
||||
const r = await bringSnToStation(v)
|
||||
await loadPoints()
|
||||
if (r.mode === 'MOVE' && r.cmdNo) {
|
||||
// PLC 联调前由人工确认到位;联调后由 PLC 到位信号自动闭环
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`已下发移料指令:${r.fromPoint} → 工位${stationNo.value}。工件到位后点「确认到位」记账。`,
|
||||
'移料指令已下发',
|
||||
{ confirmButtonText: '确认到位', cancelButtonText: '稍后', type: 'info' }
|
||||
)
|
||||
await arriveLineMove({ cmdNo: r.cmdNo })
|
||||
await loadPoints()
|
||||
await loadMoves()
|
||||
} catch { /* 稍后:指令留在列表,可在移料页确认 */ }
|
||||
}
|
||||
setCurrentSn(v)
|
||||
markStationArrival()
|
||||
scanInput.value = ''
|
||||
ElMessage.success(r.mode === 'IN' ? '已登记上料到本工位' : r.mode === 'HERE' ? '工件已在本工位' : '工件已调入本工位')
|
||||
ElMessage.success(r.mode === 'IN' ? '已登记上料到本工位' : '工件已在本工位')
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
taking.value = false
|
||||
focusScan()
|
||||
@@ -452,14 +438,9 @@ async function onTakeIn() {
|
||||
|
||||
async function onMoveOut() {
|
||||
if (!sn.value) return
|
||||
const target = suggestOutPoint.value
|
||||
if (!target) {
|
||||
ElMessage.warning('下游无可用点位')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确认把「${sn.value}」移出本工位到 ${target.label || target.pointNo}?`,
|
||||
`确认把「${sn.value}」移出本工位?下工位扫码后自动登记到位。`,
|
||||
'移出确认',
|
||||
{ confirmButtonText: '确认移出', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
@@ -467,14 +448,10 @@ async function onMoveOut() {
|
||||
return
|
||||
}
|
||||
try {
|
||||
const cmdNo = await moveOut(sn.value, target.pointNo)
|
||||
try {
|
||||
await arriveLineMove({ cmdNo })
|
||||
} catch { /* 指令保留在列表 */ }
|
||||
await moveOut()
|
||||
await loadPoints()
|
||||
await loadMoves()
|
||||
setCurrentSn('')
|
||||
ElMessage.success('已移出到 ' + (target.label || target.pointNo))
|
||||
ElMessage.success('已移出本工位,点位已释放')
|
||||
} catch (e) { /* 统一错误提示 */ }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user