chore: initial commit
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
export const WAREHOUSES = ['仓库 A', '仓库 B', '仓库 C']
|
||||
|
||||
export const DEMO_ACCOUNTS = [
|
||||
{ id: 'W001', password: '123456', name: '张伟', role: '拣货员' },
|
||||
{ id: 'W002', password: '123456', name: '李敏', role: '拣货组长' },
|
||||
{ id: 'W003', password: '123456', name: '王磊', role: '仓管员' }
|
||||
]
|
||||
|
||||
export const MODULES = [
|
||||
{ key: 'inbound', name: '入库', icon: '入', description: '收货、上架与质检', meta: '3 个静态页面', operations: [
|
||||
{ name: '到货收货', icon: '收', description: '扫描到货单并确认实收数量' },
|
||||
{ name: '商品上架', icon: '上', description: '按推荐库位完成商品上架' },
|
||||
{ name: '入库质检', icon: '检', description: '登记质检结果与异常信息' }
|
||||
] },
|
||||
{ key: 'outbound', name: '出库', icon: '出', description: '拣货、复核与装箱', meta: '3 个待办', operations: [
|
||||
{ name: '集装箱拣货', icon: '拣', description: '按箱号扫描并确认拣货', available: true },
|
||||
{ name: '出库复核', icon: '核', description: '复核拣货商品与出库数量' },
|
||||
{ name: '装箱交接', icon: '装', description: '完成装箱并登记交接信息' }
|
||||
] },
|
||||
{ key: 'inventory', name: '库存', icon: '库', description: '盘点、移库与调整', meta: '3 个静态页面', operations: [
|
||||
{ name: '库存盘点', icon: '盘', description: '按任务扫描库位与商品' },
|
||||
{ name: '商品移库', icon: '移', description: '扫描来源和目标库位完成移库' },
|
||||
{ name: '库存调整', icon: '调', description: '登记库存差异并提交审核' }
|
||||
] },
|
||||
{ key: 'query', name: '查询', icon: '查', description: '商品、库位与任务查询', meta: '3 个静态页面', operations: [
|
||||
{ name: '商品查询', icon: '品', description: '扫描 SKU 查询库存与库位' },
|
||||
{ name: '库位查询', icon: '位', description: '查看库位状态与在库商品' },
|
||||
{ name: '任务查询', icon: '单', description: '按单号查询现场任务进度' }
|
||||
] }
|
||||
]
|
||||
|
||||
export const OPERATION_PROTOTYPES = {
|
||||
'到货收货': { subtitle: '核对预约到货与实收商品', scanLabel: '到货单 / ASN', scanPlaceholder: '扫描或输入到货单号', prefix: 'ASN', titles: ['深圳华南供应商到货', '宁波配件中心到货'], meta: '供应商送货', location: '收货月台 R-02', quantity: '12 SKU · 480 件', action: '开始收货' },
|
||||
'商品上架': { subtitle: '按推荐库位完成商品上架', scanLabel: '托盘码 / 商品码', scanPlaceholder: '扫描托盘、容器或 SKU', prefix: 'PUT', titles: ['电子元件批次上架', '包装材料批次上架'], meta: '普通上架任务', location: '待上架区 S-01', quantity: '8 SKU · 16 箱', action: '开始上架' },
|
||||
'入库质检': { subtitle: '登记抽检结果与异常信息', scanLabel: '质检单 / 商品码', scanPlaceholder: '扫描质检单或 SKU', prefix: 'QC', titles: ['电子元件到货抽检', '机械配件外观检查'], meta: '抽样比例 10%', location: '质检区 Q-01', quantity: '6 SKU · 待检 120 件', action: '开始质检' },
|
||||
'出库复核': { subtitle: '复核商品、批次与出库数量', scanLabel: '周转箱 / 出库单', scanPlaceholder: '扫描周转箱或出库单号', prefix: 'CHK', titles: ['SO-78545 出库复核', 'SO-78546 出库复核'], meta: '集装箱出库', location: '复核台 C-03', quantity: '9 SKU · 260 件', action: '开始复核' },
|
||||
'装箱交接': { subtitle: '确认装箱结果并完成现场交接', scanLabel: '箱码 / 交接单', scanPlaceholder: '扫描箱码或交接单号', prefix: 'HDO', titles: ['CBX-20260709-004 装箱', 'CBX-20260709-005 交接'], meta: '海运集装箱', location: '装箱区 P-02', quantity: '4 箱 · 680 kg', action: '开始作业' },
|
||||
'库存盘点': { subtitle: '按盘点任务扫描库位与商品', scanLabel: '盘点单 / 库位码', scanPlaceholder: '扫描盘点单或库位码', prefix: 'CC', titles: ['A 区电子元件循环盘点', 'B 区机械配件抽盘'], meta: '动态盘点', location: '库区 A-03', quantity: '24 库位 · 86 SKU', action: '开始盘点' },
|
||||
'商品移库': { subtitle: '从来源库位移动到目标库位', scanLabel: '移库单 / 来源库位', scanPlaceholder: '扫描移库单或来源库位', prefix: 'MV', titles: ['高频商品库位优化', '超储商品移库'], meta: '系统推荐移库', location: 'A-05 → A-01', quantity: '7 SKU · 140 件', action: '开始移库' },
|
||||
'库存调整': { subtitle: '登记差异原因并提交审核', scanLabel: '调整单 / 商品码', scanPlaceholder: '扫描调整单或 SKU', prefix: 'ADJ', titles: ['盘亏差异调整', '破损库存状态调整'], meta: '需要组长复核', location: '异常区 E-01', quantity: '3 SKU · 差异 8 件', action: '查看处理' },
|
||||
'商品查询': { subtitle: '查询商品库存、批次与所在库位', scanLabel: 'SKU / 条码', scanPlaceholder: '扫描商品条码或输入 SKU', prefix: 'SKU', titles: ['EL-38201 电容 100μF/25V', 'ME-55010 M8 不锈钢螺栓'], meta: '可用库存', location: 'A-03-12', quantity: '可用 1,280 件', action: '查看详情' },
|
||||
'库位查询': { subtitle: '查看库位容量、状态与在库商品', scanLabel: '库位码', scanPlaceholder: '扫描或输入库位编码', prefix: 'LOC', titles: ['A-03-12 标准货架位', 'B-01-08 重型货架位'], meta: '库位状态:正常', location: 'A 区 03 通道', quantity: '占用 72% · 4 SKU', action: '查看详情' },
|
||||
'任务查询': { subtitle: '按业务单号查询现场执行进度', scanLabel: '任务号 / 业务单号', scanPlaceholder: '扫描或输入任务、订单编号', prefix: 'TSK', titles: ['SO-78542 集装箱拣货', 'ASN-260728-018 到货收货'], meta: '今日现场任务', location: '仓库 A', quantity: '进度 6 / 8', action: '查看进度' }
|
||||
}
|
||||
|
||||
export const DEMO_PICKING_ITEMS = Array.from({ length: 10 }, (_, index) => {
|
||||
const sequence = index + 1
|
||||
const sku = `M${String(sequence).padStart(3, '0')}`
|
||||
const aisle = Math.floor(index / 10) + 1
|
||||
const position = index % 10 + 1
|
||||
return {
|
||||
id: sequence,
|
||||
sku,
|
||||
desc: `演示物料·${sku}`,
|
||||
qty: 1,
|
||||
unit: '件',
|
||||
location: `A-${String(aisle).padStart(2, '0')}-${String(position).padStart(2, '0')}`
|
||||
}
|
||||
})
|
||||
|
||||
export const DEMO_BOXES = [
|
||||
{ boxNo: 'CBX-20260709-001', orderNo: 'SO-78542', items: DEMO_PICKING_ITEMS },
|
||||
{ boxNo: 'CBX-20260709-002', orderNo: 'SO-78543', items: [
|
||||
{ id: 21, sku: 'ME-55020', desc: '机械配件·铜质接头 DN15', qty: 40, unit: '个', location: 'B-02-03' }, { id: 22, sku: 'EL-38205', desc: '电子元件·继电器 5V DC', qty: 25, unit: '个', location: 'A-03-20' }, { id: 23, sku: 'PL-22002', desc: '塑料件·尼龙法兰 80mm', qty: 100, unit: '个', location: 'C-03-01' }, { id: 24, sku: 'SA-33001', desc: '安防配件·门磁开关', qty: 20, unit: '套', location: 'E-01-05' }
|
||||
] },
|
||||
{ boxNo: 'CBX-20260709-003', orderNo: 'SO-78544', items: [
|
||||
{ id: 25, sku: 'EL-38206', desc: '电子元件·温控芯片 NTC', qty: 50, unit: '个', location: 'A-06-02' }, { id: 26, sku: 'ME-55030', desc: '机械配件·铝合金支架 L型', qty: 10, unit: '件', location: 'B-03-07' }, { id: 27, sku: 'PA-11002', desc: '包装材料·气泡膜 60cm宽', qty: 8, unit: '卷', location: 'D-01-05' }, { id: 28, sku: 'EL-38207', desc: '电子元件·变压器 220V→12V', qty: 15, unit: '个', location: 'A-07-01' }, { id: 29, sku: 'PL-22003', desc: '塑料件·PVC管件 90°弯头', qty: 60, unit: '个', location: 'C-04-03' }
|
||||
] }
|
||||
]
|
||||
|
||||
export const SKIP_REASONS = ['货柜已装满', '货物破损/异常,需质检复核', '库位找不到货', '货物与订单规格不符', '其他原因']
|
||||
export const INCOMPLETE_REASONS = ['本库位库存不足', '商品异常待复核', '班次结束,转交后续处理']
|
||||
|
||||
export function createBoxes() {
|
||||
return DEMO_BOXES.map((box) => ({ ...box, items: box.items.map((item) => ({ ...item, skipReason: '', finalState: '', finalPartialQuantity: 0 })) }))
|
||||
}
|
||||
|
||||
export function getOperationPrototype(name) {
|
||||
const prototype = OPERATION_PROTOTYPES[name] || OPERATION_PROTOTYPES['任务查询']
|
||||
return { ...prototype, metrics: [
|
||||
{ label: '待处理', value: 6, tone: 'metric-primary' }, { label: '进行中', value: 2, tone: 'metric-warning' }, { label: '今日完成', value: 18, tone: 'metric-success' }
|
||||
], tasks: [
|
||||
{ code: `${prototype.prefix}-260728-001`, title: prototype.titles[0], meta: prototype.meta, location: prototype.location, quantity: prototype.quantity, action: prototype.action, status: '待处理', tone: 'status-pending' },
|
||||
{ code: `${prototype.prefix}-260728-002`, title: prototype.titles[1], meta: prototype.meta, location: prototype.location, quantity: prototype.quantity, action: '继续处理', status: '进行中', tone: 'status-progress' }
|
||||
] }
|
||||
}
|
||||
Reference in New Issue
Block a user