|
|
|
@ -34,26 +34,27 @@ |
|
|
|
<div ref="tableViewport" class="table-viewport" @mouseenter="scrollPaused = true" @mouseleave="scrollPaused = false"> |
|
|
|
<table class="board-table"> |
|
|
|
<colgroup> |
|
|
|
<col style="width: 5%"> |
|
|
|
<col style="width: 16%"> |
|
|
|
<col style="width: 15%"> |
|
|
|
<col style="width: 34%"> |
|
|
|
<col style="width: 22%"> |
|
|
|
<col style="width: 14%"> |
|
|
|
<col style="width: 13%"> |
|
|
|
<col style="width: 30%"> |
|
|
|
<col style="width: 25%"> |
|
|
|
<col style="width: 8%"> |
|
|
|
<col style="width: 10%"> |
|
|
|
</colgroup> |
|
|
|
<thead> |
|
|
|
<!-- 六屏仅展示标签物料编码,移除产品编码列后将空间分配给物料名称 - rqrq --> |
|
|
|
<!-- 去掉序号;工单、物料编码、名称略收窄,标签号右侧展示handling_unit.qty - rqrq --> |
|
|
|
<!-- 人工四屏暂不展示说明列,异常原因由状态“数据异常”提示;字段仍保留在接口中供后续排查 - rqrq --> |
|
|
|
<tr><th>No</th><th>工单号</th><th>物料编码</th><th>物料名称</th><th>RFID / 标签号</th><th>状态</th></tr> |
|
|
|
<tr><th>工单号</th><th>物料编码</th><th>物料名称</th><th>RFID / 标签号</th><th>数量</th><th>状态</th></tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(item, index) in visibleRows" :key="item.rfidBarcode"> |
|
|
|
<td>{{ index + 1 }}</td> |
|
|
|
<tr v-for="item in visibleRows" :key="item.rfidBarcode"> |
|
|
|
<td :title="item.orderNo">{{ item.orderNo || '-' }}</td> |
|
|
|
<!-- partNo来自标签表handling_unit.part_no;名称及悬浮提示最多取前100位,空值显示横线 - rqrq --> |
|
|
|
<td :title="item.partNo">{{ item.partNo || '-' }}</td> |
|
|
|
<td class="description" :title="(item.partDesc || '').slice(0, 100)">{{ (item.partDesc || '').slice(0, 100) || '-' }}</td> |
|
|
|
<td class="barcode" :title="item.rfidBarcode">{{ item.rfidBarcode }}</td> |
|
|
|
<!-- 数量是标签handling_unit.qty,去尾零;查不到或重码时后端为空,页面显示横线 - rqrq --> |
|
|
|
<td>{{ formatQty(item.qty) }}</td> |
|
|
|
<td><span :class="['status-badge', item.status === '已完成' ? 'completed' : item.status === '数据异常' ? 'abnormal' : 'pending']">{{ item.status }}</span></td> |
|
|
|
</tr> |
|
|
|
<!-- 未返回任务时表体留白,不展示空数据或异常提示;连接状态由标题指示灯表示 - rqrq --> |
|
|
|
@ -136,6 +137,17 @@ export default { |
|
|
|
clearInterval(this.scrollTimer) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 看板数量去尾零,0保留为0;空值表示标签未唯一命中,显示横线 - rqrq |
|
|
|
formatQty (qty) { |
|
|
|
if (qty === null || qty === undefined || qty === '') { |
|
|
|
return '-' |
|
|
|
} |
|
|
|
const num = Number(qty) |
|
|
|
if (!Number.isFinite(num)) { |
|
|
|
return '-' |
|
|
|
} |
|
|
|
return parseFloat(String(num)) |
|
|
|
}, |
|
|
|
// 专用屏独立使用工厂54,不读取或修改登录工厂;兼容site=54地址,错误工厂参数仍拒绝查询 - rqrq |
|
|
|
initializeBoard () { |
|
|
|
this.requestVersion++ |
|
|
|
|