feat(mes/wms/终端): 签字循环业务重构 + 叫料池实物账两列 + 工位流水按包真分页 + 下线单据提示条(2026-11-30 现场整改)

【MES · 签字循环重构(业务重构,非修 bug)】
- 旧模型作废(签字随报工落库、检验员分支永不生效的死代码);新口径:
  工人干完点「呼叫签字」→ 检验员巡检端签 OK/NG → OK 后工人再点一次「报工」;NG 整改后重新呼叫(新一轮)
- 内容指纹(SHA256):呼叫时算一次落库,报工时重算比对,变了即「签字后改数据作废本轮」要求重呼;
  只覆盖步骤录入(值/文本/勾选/拧紧结果),装机绑定不进指纹(独立台账)、改备注不触发
- 轮次统一:一次呼叫=一轮,操作工/检验员共用 round;NG/撤回/重呼=新一轮,旧轮作废历史保留
- 三档状态(作业中/签字中/待整改/可报工)从签字记录推导,不建表不存终端
- 报工闸门:本轮需签步骤齐全(操作工+检验员OK)+ 指纹未变才放行
- 撤回呼叫整轮作废;超时巡检每分钟扫描(阈值 30 分钟可在基础设置调),超时落预警中心+异常角标不进铃铛,60 分钟窗口去重
- 工位终端新增签字交互接口与呼叫/撤回/状态查询;巡检端保留 NG 回看

【MES · 叫料池实物账(十五节 Q1/Q16 + 17.6 裁决)】
- call_pool 新增 receivedQty(已收累计,拒收按退库单冲减)/ returnedQty(已退累计,按退库单号防重)两列实物账,与 sentQty 额度账并存
- 台面在手(可用)= 已收 − 已装 − 已退;在途 = 已发 − 已收

【工位终端 · 物料/叫料页重构(十五节 Q1~Q17 拍板落地)】
- 「本工位物料明细」改名「物料明细」,四数列改为:可用/需求/已发/已收/已装,量为 0 也显示不分左右托盘
- 去除「刷新池子」「刷新」按钮(有长连接);「我的叫料单」扩为类银行流水(叫料/退料/等等)
- 叫料/退料数量列直排,提交时弹窗确认数量并选接驳台;管理端叫料与退料 AGV 派车流程统一收归库管
- 工位流水按包真分页(2026-11-29 拍板):后端按包号分组 Count+Limit/Offset,每页 20 包,前端不再内存聚合

【下线 · 单据流转提示条】
- MES/WMS 前端整体删除 NextStepBar / nextStep / nextStepRules(35 条规则表整套下线),页面不再出现常驻「下一步」提示条

【文档】
- 问题临时.md 新增十四节(主控独立审计:终端账号删除/心跳/闸门函数 8 处对码全过)+ 十五节(工位物料叫料 8 条原话逐字留档与 Q1~Q17 拍板底稿)
- 新增《工位终端页面.md》;案例.md 同步更新验收口径
This commit is contained in:
SunYF
2026-11-30 15:25:29 +08:00
parent 88875c1f13
commit f9eaebad28
120 changed files with 6210 additions and 2366 deletions
+38 -28
View File
@@ -667,132 +667,142 @@ func init() {
permission.DefaultUpdatedAt = permissionDescUpdatedAt.Default.(func() int64)
returnorderFields := schema.ReturnOrder{}.Fields()
_ = returnorderFields
// returnorderDescPackageNo is the schema descriptor for package_no field.
returnorderDescPackageNo := returnorderFields[1].Descriptor()
// returnorder.DefaultPackageNo holds the default value on creation for the package_no field.
returnorder.DefaultPackageNo = returnorderDescPackageNo.Default.(string)
// returnorder.PackageNoValidator is a validator for the "package_no" field. It is called by the builders before save.
returnorder.PackageNoValidator = returnorderDescPackageNo.Validators[0].(func(string) error)
// returnorderDescSourceType is the schema descriptor for source_type field.
returnorderDescSourceType := returnorderFields[1].Descriptor()
returnorderDescSourceType := returnorderFields[2].Descriptor()
// returnorder.DefaultSourceType holds the default value on creation for the source_type field.
returnorder.DefaultSourceType = returnorderDescSourceType.Default.(string)
// returnorderDescOrderNo is the schema descriptor for order_no field.
returnorderDescOrderNo := returnorderFields[2].Descriptor()
returnorderDescOrderNo := returnorderFields[3].Descriptor()
// returnorder.DefaultOrderNo holds the default value on creation for the order_no field.
returnorder.DefaultOrderNo = returnorderDescOrderNo.Default.(string)
// returnorderDescRefNo is the schema descriptor for ref_no field.
returnorderDescRefNo := returnorderFields[3].Descriptor()
returnorderDescRefNo := returnorderFields[4].Descriptor()
// returnorder.DefaultRefNo holds the default value on creation for the ref_no field.
returnorder.DefaultRefNo = returnorderDescRefNo.Default.(string)
// returnorder.RefNoValidator is a validator for the "ref_no" field. It is called by the builders before save.
returnorder.RefNoValidator = returnorderDescRefNo.Validators[0].(func(string) error)
// returnorderDescStationNo is the schema descriptor for station_no field.
returnorderDescStationNo := returnorderFields[4].Descriptor()
returnorderDescStationNo := returnorderFields[5].Descriptor()
// returnorder.DefaultStationNo holds the default value on creation for the station_no field.
returnorder.DefaultStationNo = returnorderDescStationNo.Default.(int)
// returnorderDescReturnDock is the schema descriptor for return_dock field.
returnorderDescReturnDock := returnorderFields[5].Descriptor()
returnorderDescReturnDock := returnorderFields[6].Descriptor()
// returnorder.DefaultReturnDock holds the default value on creation for the return_dock field.
returnorder.DefaultReturnDock = returnorderDescReturnDock.Default.(string)
// returnorder.ReturnDockValidator is a validator for the "return_dock" field. It is called by the builders before save.
returnorder.ReturnDockValidator = returnorderDescReturnDock.Validators[0].(func(string) error)
// returnorderDescSn is the schema descriptor for sn field.
returnorderDescSn := returnorderFields[6].Descriptor()
returnorderDescSn := returnorderFields[7].Descriptor()
// returnorder.DefaultSn holds the default value on creation for the sn field.
returnorder.DefaultSn = returnorderDescSn.Default.(string)
// returnorderDescSnList is the schema descriptor for sn_list field.
returnorderDescSnList := returnorderFields[7].Descriptor()
returnorderDescSnList := returnorderFields[8].Descriptor()
// returnorder.DefaultSnList holds the default value on creation for the sn_list field.
returnorder.DefaultSnList = returnorderDescSnList.Default.(string)
// returnorderDescQty is the schema descriptor for qty field.
returnorderDescQty := returnorderFields[11].Descriptor()
returnorderDescQty := returnorderFields[12].Descriptor()
// returnorder.DefaultQty holds the default value on creation for the qty field.
returnorder.DefaultQty = returnorderDescQty.Default.(int)
// returnorderDescUnit is the schema descriptor for unit field.
returnorderDescUnit := returnorderFields[12].Descriptor()
returnorderDescUnit := returnorderFields[13].Descriptor()
// returnorder.DefaultUnit holds the default value on creation for the unit field.
returnorder.DefaultUnit = returnorderDescUnit.Default.(string)
// returnorderDescReason is the schema descriptor for reason field.
returnorderDescReason := returnorderFields[13].Descriptor()
returnorderDescReason := returnorderFields[14].Descriptor()
// returnorder.DefaultReason holds the default value on creation for the reason field.
returnorder.DefaultReason = returnorderDescReason.Default.(string)
// returnorderDescLossReason is the schema descriptor for loss_reason field.
returnorderDescLossReason := returnorderFields[14].Descriptor()
returnorderDescLossReason := returnorderFields[15].Descriptor()
// returnorder.DefaultLossReason holds the default value on creation for the loss_reason field.
returnorder.DefaultLossReason = returnorderDescLossReason.Default.(string)
// returnorder.LossReasonValidator is a validator for the "loss_reason" field. It is called by the builders before save.
returnorder.LossReasonValidator = returnorderDescLossReason.Validators[0].(func(string) error)
// returnorderDescStatus is the schema descriptor for status field.
returnorderDescStatus := returnorderFields[15].Descriptor()
returnorderDescStatus := returnorderFields[16].Descriptor()
// returnorder.DefaultStatus holds the default value on creation for the status field.
returnorder.DefaultStatus = returnorderDescStatus.Default.(string)
// returnorderDescTransportMode is the schema descriptor for transport_mode field.
returnorderDescTransportMode := returnorderFields[16].Descriptor()
returnorderDescTransportMode := returnorderFields[17].Descriptor()
// returnorder.DefaultTransportMode holds the default value on creation for the transport_mode field.
returnorder.DefaultTransportMode = returnorderDescTransportMode.Default.(string)
// returnorder.TransportModeValidator is a validator for the "transport_mode" field. It is called by the builders before save.
returnorder.TransportModeValidator = returnorderDescTransportMode.Validators[0].(func(string) error)
// returnorderDescDispatchedAt is the schema descriptor for dispatched_at field.
returnorderDescDispatchedAt := returnorderFields[17].Descriptor()
returnorderDescDispatchedAt := returnorderFields[18].Descriptor()
// returnorder.DefaultDispatchedAt holds the default value on creation for the dispatched_at field.
returnorder.DefaultDispatchedAt = returnorderDescDispatchedAt.Default.(int64)
// returnorderDescCancelledBy is the schema descriptor for cancelled_by field.
returnorderDescCancelledBy := returnorderFields[18].Descriptor()
returnorderDescCancelledBy := returnorderFields[19].Descriptor()
// returnorder.DefaultCancelledBy holds the default value on creation for the cancelled_by field.
returnorder.DefaultCancelledBy = returnorderDescCancelledBy.Default.(string)
// returnorder.CancelledByValidator is a validator for the "cancelled_by" field. It is called by the builders before save.
returnorder.CancelledByValidator = returnorderDescCancelledBy.Validators[0].(func(string) error)
// returnorderDescCancelReason is the schema descriptor for cancel_reason field.
returnorderDescCancelReason := returnorderFields[19].Descriptor()
returnorderDescCancelReason := returnorderFields[20].Descriptor()
// returnorder.DefaultCancelReason holds the default value on creation for the cancel_reason field.
returnorder.DefaultCancelReason = returnorderDescCancelReason.Default.(string)
// returnorder.CancelReasonValidator is a validator for the "cancel_reason" field. It is called by the builders before save.
returnorder.CancelReasonValidator = returnorderDescCancelReason.Validators[0].(func(string) error)
// returnorderDescOperator is the schema descriptor for operator field.
returnorderDescOperator := returnorderFields[20].Descriptor()
returnorderDescOperator := returnorderFields[21].Descriptor()
// returnorder.DefaultOperator holds the default value on creation for the operator field.
returnorder.DefaultOperator = returnorderDescOperator.Default.(string)
// returnorderDescReceiveBy is the schema descriptor for receive_by field.
returnorderDescReceiveBy := returnorderFields[21].Descriptor()
returnorderDescReceiveBy := returnorderFields[22].Descriptor()
// returnorder.DefaultReceiveBy holds the default value on creation for the receive_by field.
returnorder.DefaultReceiveBy = returnorderDescReceiveBy.Default.(string)
// returnorderDescReceiveQty is the schema descriptor for receive_qty field.
returnorderDescReceiveQty := returnorderFields[22].Descriptor()
returnorderDescReceiveQty := returnorderFields[23].Descriptor()
// returnorder.DefaultReceiveQty holds the default value on creation for the receive_qty field.
returnorder.DefaultReceiveQty = returnorderDescReceiveQty.Default.(int)
// returnorderDescReceiveDiff is the schema descriptor for receive_diff field.
returnorderDescReceiveDiff := returnorderFields[23].Descriptor()
returnorderDescReceiveDiff := returnorderFields[24].Descriptor()
// returnorder.DefaultReceiveDiff holds the default value on creation for the receive_diff field.
returnorder.DefaultReceiveDiff = returnorderDescReceiveDiff.Default.(int)
// returnorderDescReceiveNote is the schema descriptor for receive_note field.
returnorderDescReceiveNote := returnorderFields[24].Descriptor()
returnorderDescReceiveNote := returnorderFields[25].Descriptor()
// returnorder.DefaultReceiveNote holds the default value on creation for the receive_note field.
returnorder.DefaultReceiveNote = returnorderDescReceiveNote.Default.(string)
// returnorderDescAdjustQty is the schema descriptor for adjust_qty field.
returnorderDescAdjustQty := returnorderFields[25].Descriptor()
returnorderDescAdjustQty := returnorderFields[26].Descriptor()
// returnorder.DefaultAdjustQty holds the default value on creation for the adjust_qty field.
returnorder.DefaultAdjustQty = returnorderDescAdjustQty.Default.(int)
// returnorderDescAdjustBeforeQty is the schema descriptor for adjust_before_qty field.
returnorderDescAdjustBeforeQty := returnorderFields[26].Descriptor()
returnorderDescAdjustBeforeQty := returnorderFields[27].Descriptor()
// returnorder.DefaultAdjustBeforeQty holds the default value on creation for the adjust_before_qty field.
returnorder.DefaultAdjustBeforeQty = returnorderDescAdjustBeforeQty.Default.(int)
// returnorderDescAdjustedBy is the schema descriptor for adjusted_by field.
returnorderDescAdjustedBy := returnorderFields[27].Descriptor()
returnorderDescAdjustedBy := returnorderFields[28].Descriptor()
// returnorder.DefaultAdjustedBy holds the default value on creation for the adjusted_by field.
returnorder.DefaultAdjustedBy = returnorderDescAdjustedBy.Default.(string)
// returnorder.AdjustedByValidator is a validator for the "adjusted_by" field. It is called by the builders before save.
returnorder.AdjustedByValidator = returnorderDescAdjustedBy.Validators[0].(func(string) error)
// returnorderDescAdjustReason is the schema descriptor for adjust_reason field.
returnorderDescAdjustReason := returnorderFields[28].Descriptor()
returnorderDescAdjustReason := returnorderFields[29].Descriptor()
// returnorder.DefaultAdjustReason holds the default value on creation for the adjust_reason field.
returnorder.DefaultAdjustReason = returnorderDescAdjustReason.Default.(string)
// returnorder.AdjustReasonValidator is a validator for the "adjust_reason" field. It is called by the builders before save.
returnorder.AdjustReasonValidator = returnorderDescAdjustReason.Validators[0].(func(string) error)
// returnorderDescAdjustedAt is the schema descriptor for adjusted_at field.
returnorderDescAdjustedAt := returnorderFields[29].Descriptor()
returnorderDescAdjustedAt := returnorderFields[30].Descriptor()
// returnorder.DefaultAdjustedAt holds the default value on creation for the adjusted_at field.
returnorder.DefaultAdjustedAt = returnorderDescAdjustedAt.Default.(int64)
// returnorderDescCreatedAt is the schema descriptor for created_at field.
returnorderDescCreatedAt := returnorderFields[30].Descriptor()
returnorderDescCreatedAt := returnorderFields[31].Descriptor()
// returnorder.DefaultCreatedAt holds the default value on creation for the created_at field.
returnorder.DefaultCreatedAt = returnorderDescCreatedAt.Default.(func() int64)
// returnorderDescArrivedAt is the schema descriptor for arrived_at field.
returnorderDescArrivedAt := returnorderFields[32].Descriptor()
// returnorder.DefaultArrivedAt holds the default value on creation for the arrived_at field.
returnorder.DefaultArrivedAt = returnorderDescArrivedAt.Default.(int64)
// returnorderDescReceiveAt is the schema descriptor for receive_at field.
returnorderDescReceiveAt := returnorderFields[31].Descriptor()
returnorderDescReceiveAt := returnorderFields[33].Descriptor()
// returnorder.DefaultReceiveAt holds the default value on creation for the receive_at field.
returnorder.DefaultReceiveAt = returnorderDescReceiveAt.Default.(int64)
roleFields := schema.Role{}.Fields()