@@ -175,7 +175,7 @@ var (
{ Name : "material_code" , Type : field . TypeString , Comment : "物料编码" } ,
{ Name : "material_name" , Type : field . TypeString , Nullable : true , Comment : "物料名称(冗余)" } ,
{ Name : "manage_mode" , Type : field . TypeInt , Comment : "类型 1结构件/2电气件/3其他" , Default : 1 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号件 (逐件SN)/2批次件( 数量)/0未选择" , Default : 0 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "序列号 1=是 (逐件SN)/2=否(按 批次数量)/0未选择" , Default : 0 } ,
{ Name : "batch_no" , Type : field . TypeString , Nullable : true , Comment : "批次号(结构件)" } ,
{ Name : "zone_code" , Type : field . TypeString , Nullable : true , Comment : "入库区域(大区)" } ,
{ Name : "shelf_no" , Type : field . TypeString , Nullable : true , Comment : "货架号(如 A)" } ,
@@ -236,8 +236,8 @@ var (
{ Name : "result_value" , Type : field . TypeString , Nullable : true , Comment : "实测值(部分检验项)" } ,
{ Name : "inspect_qty" , Type : field . TypeInt , Comment : "检验数量(抽检件数)" , Default : 0 } ,
{ Name : "pass_qty" , Type : field . TypeInt , Comment : "合格数量(≤检验数量)" , Default : 0 } ,
{ Name : "batch_seq" , Type : field . TypeInt , Comment : "第几批(批次件 来料检验必填≥1, 0=未填)" , Default : 0 } ,
{ Name : "batch_total" , Type : field . TypeInt , Comment : "共几件(批次件 来料检验必填≥1, 0=未填)" , Default : 0 } ,
{ Name : "batch_seq" , Type : field . TypeInt , Comment : "第几批(序列号=否 来料检验必填≥1, 0=未填)" , Default : 0 } ,
{ Name : "batch_total" , Type : field . TypeInt , Comment : "共几件(序列号=否 来料检验必填≥1, 0=未填)" , Default : 0 } ,
{ Name : "reject_qty" , Type : field . TypeInt , Comment : "不合格数量(=检验数量-合格数量)" , Default : 0 } ,
{ Name : "check_desc" , Type : field . TypeString , Nullable : true , Comment : "检测说明(检验项目/方法)" } ,
{ Name : "inspector" , Type : field . TypeString , Nullable : true , Comment : "检验人" } ,
@@ -283,20 +283,20 @@ var (
InventoriesColumns = [ ] * schema . Column {
{ Name : "id" , Type : field . TypeInt , Increment : true } ,
{ Name : "manage_mode" , Type : field . TypeInt , Comment : "类型 1结构件/2电气件/3其他" } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号件 (逐件SN)/2批次件( 数量)/0未选择" , Default : 0 } ,
{ Name : "category" , Type : field . TypeInt , Comment : "品类 1=原材料 2=半成品 3=成品" , Default : 1 } ,
{ 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 : "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 : "批次号(系统生成);序列号件 可关联所属批次" } ,
{ Name : "sn_code" , Type : field . TypeString , Nullable : true , Comment : "序列号(SN,仅序列号件 );全局唯一,空值表示非 SN 行" } ,
{ Name : "quantity" , Type : field . TypeInt , Comment : "数量:批次件 =批次余量;序列号件 =1" , Default : 0 } ,
{ Name : "locked_qty" , Type : field . TypeInt , Comment : "已锁定数量(库存占用): 批次件 =件数;序列号件 =0/1" , Default : 0 } ,
{ Name : "batch_no" , Type : field . TypeString , Nullable : true , Comment : "批次号(系统生成);序列号=是 可关联所属批次" } ,
{ Name : "sn_code" , Type : field . TypeString , Nullable : true , Comment : "序列号(SN,仅序列号=是 );全局唯一,空值表示非 SN 行" } ,
{ Name : "quantity" , Type : field . TypeInt , Comment : "数量:序列号=否 =批次余量;序列号=是 =1" , Default : 0 } ,
{ Name : "locked_qty" , Type : field . TypeInt , Comment : "已锁定数量(库存占用): 序列号=否 =件数;序列号=是 =0/1" , Default : 0 } ,
{ Name : "quality_status" , Type : field . TypeString , Comment : "检验状态 未检/合格/不合格" , Default : "未检" } ,
{ Name : "zone_code" , Type : field . TypeString , Nullable : true , Comment : "所在区域(Z01~Z04 大分区)" } ,
{ Name : "shelf_no" , Type : field . TypeString , Nullable : true , Comment : "货架号(手填,如 A)" } ,
{ Name : "layer_no" , Type : field . TypeString , Nullable : true , Comment : "第几层(手填,如 3)" } ,
{ Name : "position_no" , Type : field . TypeString , Nullable : true , Comment : "位置号(手填,如 12)" } ,
{ Name : "status" , Type : field . TypeString , Comment : "生命周期:在库/锁定/出库/使用/报废(序列号件用;批次件恒在库) " , Default : "在库" } ,
{ Name : "status" , Type : field . TypeString , Comment : "生命周期:在库/锁定/出库/使用/报废(序列号=是用;序列号=否恒在库)。使用=预留未启用:原 SN 件产线在制态,现统一走「出库」,枚举值保留不动以保持兼容 " , Default : "在库" } ,
{ 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 : "关联入库单号" } ,
@@ -411,9 +411,9 @@ 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成品/4其他(半成品不是物料品 类,由库存 category=2 承载)" , Default : 1 } ,
{ Name : "item_type" , Type : field . TypeInt , Comment : "物料类别 1原材料/3成品/4其他(半成品不是物料类别 ,由库存 category=2 承载)" , Default : 1 } ,
{ Name : "manage_mode" , Type : field . TypeInt , Comment : "类型 1结构件/2电气件/3其他" , Default : 1 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号件 (逐件SN)/2批次件 (数量)/0未选择" , Default : 0 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号=是 (逐件SN)/2序列号=否 (数量)/0未选择" , Default : 0 } ,
{ Name : "is_batch_managed" , Type : field . TypeBool , Comment : "是否批次管理(按 sn_mode=2 派生)" , Default : false } ,
{ Name : "is_serial_managed" , Type : field . TypeBool , Comment : "是否序列号管理(按 sn_mode=1 派生)" , Default : false } ,
{ Name : "template_code" , Type : field . TypeString , Nullable : true , Comment : "物料模板编码(物料种类)" } ,
@@ -546,7 +546,7 @@ var (
{ Name : "material_code" , Type : field . TypeString , Comment : "物料编码" } ,
{ Name : "material_name" , Type : field . TypeString , Nullable : true , Comment : "物料名称(冗余)" } ,
{ Name : "manage_mode" , Type : field . TypeInt , Comment : "类型 1结构件/2电气件/3其他" , Default : 1 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号件 (逐件SN)/2批次件 (数量)/0未选择" , Default : 0 } ,
{ Name : "sn_mode" , Type : field . TypeInt , Comment : "SN管理 1序列号=是 (逐件SN)/2序列号=否 (数量)/0未选择" , Default : 0 } ,
{ Name : "batch_no" , Type : field . TypeString , Nullable : true , Comment : "批次号(结构件)" } ,
{ Name : "zone_code" , Type : field . TypeString , Nullable : true , Comment : "出库区域(大区)" } ,
{ Name : "shelf_no" , Type : field . TypeString , Nullable : true , Comment : "货架号(与入库同口径)" } ,