feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力
- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页) - WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报 - AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典 - 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列 - 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等) - 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
@@ -360,7 +360,10 @@ var (
|
||||
{Name: "inspector", Type: field.TypeString, Nullable: true, Comment: "检验人"},
|
||||
{Name: "inspection_no", Type: field.TypeString, Nullable: true, Comment: "检测单号(检验报告单号)"},
|
||||
{Name: "report_no", Type: field.TypeString, Nullable: true, Comment: "报检单号(生产报检关联)"},
|
||||
{Name: "disposal_type", Type: field.TypeString, Comment: "不合格处置 NONE/RETURN/SCRAP/PARTIAL", Default: "NONE"},
|
||||
{Name: "inspection_conclusion", Type: field.TypeString, Comment: "检验结论 合格/不合格/待检/挑选(与处置方式正交)", Default: ""},
|
||||
{Name: "disposal_status", Type: field.TypeString, Comment: "不合格品处置状态 待处置/退货中/已退货/返修中/已返修/已报废/已处置", Default: ""},
|
||||
{Name: "parent_record_id", Type: field.TypeInt64, Comment: "拆行来源检验记录ID(不合格隔离行回挂原单)", Default: 0},
|
||||
{Name: "disposal_type", Type: field.TypeString, Comment: "不合格部分处置 NONE/RETURN/SCRAP/PARTIAL/REWORK", Default: "NONE"},
|
||||
{Name: "disposal_remark", Type: field.TypeString, Nullable: true, Comment: "处置说明(报废/退货原因)"},
|
||||
{Name: "return_tracking_no", Type: field.TypeString, Nullable: true, Comment: "退货货运单号"},
|
||||
{Name: "remark", Type: field.TypeString, Nullable: true, Comment: "备注"},
|
||||
@@ -401,7 +404,7 @@ var (
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "manage_mode", Type: field.TypeInt, Comment: "类型 1结构件/2电气件/3其他"},
|
||||
{Name: "sn_mode", Type: field.TypeInt, Comment: "序列号 1=是(逐件SN)/2=否(按批次数量)/0未选择", Default: 0},
|
||||
{Name: "category", Type: field.TypeInt, Comment: "物料类别 1=原材料 2=半成品 3=成品", Default: 1},
|
||||
{Name: "category", Type: field.TypeInt, Comment: "物料类别 1=原材料 2=在制品 3=成品", Default: 1},
|
||||
{Name: "material_code", Type: field.TypeString, Comment: "物料编码(关联 materials 表)"},
|
||||
{Name: "material_name", Type: field.TypeString, Nullable: true, Comment: "物料名称(冗余,便于直接展示)"},
|
||||
{Name: "batch_no", Type: field.TypeString, Nullable: true, Comment: "批次号(系统生成);序列号=是可关联所属批次"},
|
||||
@@ -417,17 +420,18 @@ var (
|
||||
{Name: "production_date", Type: field.TypeString, Nullable: true, Comment: "生产日期"},
|
||||
{Name: "supplier", Type: field.TypeString, Nullable: true, Comment: "供应商"},
|
||||
{Name: "inbound_no", Type: field.TypeString, Nullable: true, Comment: "关联入库单号"},
|
||||
{Name: "order_no", Type: field.TypeString, Size: 64, Comment: "关联工单号(半成品/成品回流)", Default: ""},
|
||||
{Name: "product_work_no", Type: field.TypeString, Nullable: true, Comment: "产品工号(贯穿库存,出库/检验/半成品带出展示)"},
|
||||
{Name: "completed_process", Type: field.TypeString, Size: 64, Comment: "已完成工序(半成品用,如 135)", Default: ""},
|
||||
{Name: "order_no", Type: field.TypeString, Size: 64, Comment: "关联工单号(在制品/成品回流)", Default: ""},
|
||||
{Name: "product_work_no", Type: field.TypeString, Nullable: true, Comment: "产品工号(贯穿库存,出库/检验/在制品带出展示)"},
|
||||
{Name: "completed_process", Type: field.TypeString, Size: 64, Comment: "已完成工序(在制品用,如 135)", Default: ""},
|
||||
{Name: "ownership_type", Type: field.TypeString, Nullable: true, Comment: "归属类型 workorder/project/other"},
|
||||
{Name: "ownership_no", Type: field.TypeString, Nullable: true, Comment: "归属编号(工单号/科技项目号/其他)"},
|
||||
{Name: "product_status", Type: field.TypeString, Nullable: true, Comment: "产品状态 已通过/部分通过/返修(成品用)"},
|
||||
{Name: "related_standard", Type: field.TypeString, Nullable: true, Comment: "相关标准(试验方案号)"},
|
||||
{Name: "test_record_no", Type: field.TypeString, Nullable: true, Comment: "试验记录单号"},
|
||||
{Name: "recorded_by", Type: field.TypeString, Nullable: true, Comment: "记录员"},
|
||||
{Name: "recorded_by", Type: field.TypeString, Nullable: true, Comment: "记录员(展示名;2026-11-13 起由服务端按登录人覆写,前端不可编辑)"},
|
||||
{Name: "recorded_by_id", Type: field.TypeInt64, Nullable: true, Comment: "记录员 user_id(取自 JWT X-UserID,服务端强制写入)"},
|
||||
{Name: "recorded_at", Type: field.TypeInt64, Nullable: true, Comment: "记录日期(unix 秒)"},
|
||||
{Name: "outbound_reason", Type: field.TypeString, Nullable: true, Comment: "出库原因(半成品/成品出库用)"},
|
||||
{Name: "outbound_reason", Type: field.TypeString, Nullable: true, Comment: "出库原因(在制品/成品出库用)"},
|
||||
{Name: "stocktake_no", Type: field.TypeString, Size: 64, Comment: "盘点冻结标记(进行中盘点单号;空=未冻结)", Default: ""},
|
||||
{Name: "remark", Type: field.TypeString, Nullable: true, Comment: "备注"},
|
||||
{Name: "created_at", Type: field.TypeInt64},
|
||||
@@ -528,7 +532,7 @@ var (
|
||||
{Name: "spec", Type: field.TypeString, Nullable: true, Comment: "规格型号"},
|
||||
{Name: "unit", Type: field.TypeString, Nullable: true, Comment: "单位"},
|
||||
{Name: "description", Type: field.TypeString, Nullable: true, Comment: "描述"},
|
||||
{Name: "item_type", Type: field.TypeInt, Comment: "物料类别 1原材料/3成品(半成品不是物料类别,由库存 category=2 承载)", Default: 1},
|
||||
{Name: "item_type", Type: field.TypeInt, Comment: "物料类别 1原材料/3成品(在制品不是物料类别,由库存 category=2 承载)", Default: 1},
|
||||
{Name: "manage_mode", Type: field.TypeInt, Comment: "类型 1结构件/2电气件/3其他", Default: 1},
|
||||
{Name: "sn_mode", Type: field.TypeInt, Comment: "序列号 1=是(逐件录SN)/2=否(按数量)/0未选择", Default: 0},
|
||||
{Name: "is_batch_managed", Type: field.TypeBool, Comment: "是否批次管理(按 sn_mode=2 派生)", Default: false},
|
||||
@@ -837,7 +841,7 @@ var (
|
||||
// SemiFinishedsColumns holds the columns for the "semi_finisheds" table.
|
||||
SemiFinishedsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "sn", Type: field.TypeString, Unique: true, Comment: "半成品 SN"},
|
||||
{Name: "sn", Type: field.TypeString, Unique: true, Comment: "在制品 SN"},
|
||||
{Name: "material_code", Type: field.TypeString, Nullable: true, Comment: "物料编码(MES 未传时按 SN 反查,可空)"},
|
||||
{Name: "completed_process", Type: field.TypeString, Nullable: true, Comment: "已完成工序(如 135)"},
|
||||
{Name: "quantity", Type: field.TypeInt, Comment: "数量", Default: 1},
|
||||
@@ -850,7 +854,7 @@ var (
|
||||
// SemiFinishedsTable holds the schema information for the "semi_finisheds" table.
|
||||
SemiFinishedsTable = &schema.Table{
|
||||
Name: "semi_finisheds",
|
||||
Comment: "SemiFinished 半成品库存",
|
||||
Comment: "SemiFinished 在制品库存",
|
||||
Columns: SemiFinishedsColumns,
|
||||
PrimaryKey: []*schema.Column{SemiFinishedsColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
|
||||
Reference in New Issue
Block a user