refactor: 清理MES端本地product_type冗余代码,对齐WMS主数据架构

1.  移除MES端本地product_type实体、schema及相关CRUD代码,改为通过WMS内部API代理获取物料主数据
2.  更新物料管理粒度逻辑,新增"其他"类型(3)支持,同步更新入库校验规则
3.  修复前端物料选择、库存筛选等页面的类型判断逻辑,统一使用manage_mode区分管理类型
4.  清理静态资源文件冗余的样式代码,调整前端页面展示逻辑
5.  更新帮助文档,修正物料类型的说明描述
This commit is contained in:
SunYF
2026-09-22 07:41:40 +08:00
parent 12ca493c61
commit 932700ca65
84 changed files with 698 additions and 3955 deletions
-34
View File
@@ -623,36 +623,6 @@ var (
},
},
}
// ProductTypeColumns holds the columns for the "product_type" table.
ProductTypeColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "name", Type: field.TypeString, Size: 50},
{Name: "code", Type: field.TypeString, Size: 20},
{Name: "category", Type: field.TypeString, Size: 30, Default: ""},
{Name: "spec", Type: field.TypeString, Size: 128, Default: ""},
{Name: "unit", Type: field.TypeString, Size: 32, Default: ""},
{Name: "is_active", Type: field.TypeBool, Default: true},
{Name: "created_at", Type: field.TypeTime},
{Name: "updated_at", Type: field.TypeTime, Nullable: true},
}
// ProductTypeTable holds the schema information for the "product_type" table.
ProductTypeTable = &schema.Table{
Name: "product_type",
Columns: ProductTypeColumns,
PrimaryKey: []*schema.Column{ProductTypeColumns[0]},
Indexes: []*schema.Index{
{
Name: "producttype_code",
Unique: false,
Columns: []*schema.Column{ProductTypeColumns[2]},
},
{
Name: "producttype_is_active",
Unique: false,
Columns: []*schema.Column{ProductTypeColumns[6]},
},
},
}
// RoleColumns holds the columns for the "role" table.
RoleColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
@@ -1170,7 +1140,6 @@ var (
PlcSendLogTable,
ProcessFlowTable,
ProcessStepTable,
ProductTypeTable,
RoleTable,
SemiFlowTable,
StationTable,
@@ -1240,9 +1209,6 @@ func init() {
ProcessStepTable.Annotation = &entsql.Annotation{
Table: "process_step",
}
ProductTypeTable.Annotation = &entsql.Annotation{
Table: "product_type",
}
RoleTable.Annotation = &entsql.Annotation{
Table: "role",
}