feat: 新增收集式校验错误弹窗及工位报警语音播报
新增 ErrorListDialog 组件用于统一展示结构化校验错误信息,实现报错一次收全;新增工位报警语音播报功能,通过浏览器 SpeechSynthesis 播放本工位相关报警;调整物料类别及序列号字段文案,移除「其他」类别;新增工单实际开始字段及采集方式配置;优化 AGV 及 PlcSend 页签刷新逻辑;新增看板物料追溯及工位报警接口;删除 PLC 强制写 M 位及相关测试代码;同步数据库字段注释及补丁。
This commit is contained in:
@@ -8,6 +8,7 @@ interface MovementRow {
|
||||
material: string;
|
||||
qty: string;
|
||||
operator: string;
|
||||
batch: string;
|
||||
}
|
||||
|
||||
export function WarehouseBoard({ data }: { data: DashboardData }) {
|
||||
@@ -19,8 +20,12 @@ export function WarehouseBoard({ data }: { data: DashboardData }) {
|
||||
material: m.material,
|
||||
qty: `${m.qty}`,
|
||||
operator: m.operator,
|
||||
batch: m.batch || '—',
|
||||
}));
|
||||
|
||||
const locationPct =
|
||||
w.locationTotal > 0 ? `${Math.round((w.locationUsed / w.locationTotal) * 100)}%` : '—';
|
||||
|
||||
const columns = [
|
||||
{ title: '时间', dataIndex: 'time' },
|
||||
{
|
||||
@@ -32,21 +37,37 @@ export function WarehouseBoard({ data }: { data: DashboardData }) {
|
||||
},
|
||||
{ title: '物料名称', dataIndex: 'material' },
|
||||
{ title: '数量', dataIndex: 'qty' },
|
||||
{ title: '批次', dataIndex: 'batch', width: 140 },
|
||||
{ title: '操作人', dataIndex: 'operator' },
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 16 }}>
|
||||
<Card title="库存总量" style={{ gridColumn: 'span 2' }}>
|
||||
<BigNumber value={w.totalStock} unit="件" color="#36a3f7" />
|
||||
</Card>
|
||||
<Card title="物料种类">
|
||||
<BigNumber value={w.materialTypes} unit="种" color="#00d68f" />
|
||||
</Card>
|
||||
<Card title="当日出入库">
|
||||
<div style={{ display: 'flex', gap: 24 }}>
|
||||
<TextStat color="#00d68f" value={w.inboundToday} label="入库" />
|
||||
<TextStat color="#36a3f7" value={w.outboundToday} label="出库" />
|
||||
<div style={{ gridColumn: 'span 4', display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 14 }}>
|
||||
<Card title="库存总量">
|
||||
<BigNumber value={w.totalStock} unit="件" color="#36a3f7" />
|
||||
</Card>
|
||||
<Card title="物料种类">
|
||||
<BigNumber value={w.materialTypes} unit="种" color="#00d68f" />
|
||||
</Card>
|
||||
<Card title="当日出入库">
|
||||
<div style={{ display: 'flex', gap: 24 }}>
|
||||
<TextStat color="#00d68f" value={w.inboundToday} label="入库" />
|
||||
<TextStat color="#36a3f7" value={w.outboundToday} label="出库" />
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="库位利用率">
|
||||
<BigNumber value={locationPct} unit="" color="#fbbf24" />
|
||||
<div style={{ color: '#8fa3bf', fontSize: 12, marginTop: 4 }}>
|
||||
已用 {w.locationUsed} / 共 {w.locationTotal}
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<Card title="待处理出入库任务" style={{ gridColumn: 'span 4' }}>
|
||||
<div style={{ display: 'flex', gap: 32 }}>
|
||||
<TextStat color="#fbbf24" value={w.pendingInbound} label="入库待检(检未闭环)" />
|
||||
<TextStat color="#36a3f7" value={w.pendingOutbound} label="出库待送(已出库)" />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -77,7 +98,7 @@ function BigNumber({
|
||||
unit,
|
||||
color,
|
||||
}: {
|
||||
value: number;
|
||||
value: number | string;
|
||||
unit: string;
|
||||
color: string;
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user