feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期

This commit is contained in:
SunYF
2026-11-02 19:17:05 +08:00
parent 0c03d32682
commit fd2f0e2767
77 changed files with 1773 additions and 664 deletions
+7 -3
View File
@@ -142,6 +142,7 @@ type generalOutboundRequest struct {
TargetStation string `json:"targetStation"`
TargetDock string `json:"targetDock"` // 目标接驳台(叫AGV时必填)
NeedAgv bool `json:"needAgv"` // 是否叫AGV配送到接驳台(可选)
BorrowFrom map[string]int `json:"borrowFrom"` // 跨工位借料来源(call 备料出库专用):stationNo→借用量(已排除本工位自取)
}
// makeOutboundHandler 通用出库 / 科技项目出库 共用工厂(B1/B2 逻辑拆分)。
@@ -253,7 +254,7 @@ func makeOutboundHandler(ctx *svc.ServiceContext, outboundType string) http.Hand
}()
pw := "" // 产品工号:从源库存取,出库单创建后回填(五页带出)
ob, err := tx.OutboundOrder.Create().
obCreate := tx.OutboundOrder.Create().
SetOutboundNo(outboundNo).
SetOutboundType(outboundType).
SetStatus("已出库").
@@ -276,8 +277,11 @@ func makeOutboundHandler(ctx *svc.ServiceContext, outboundType string) http.Hand
SetNillableOperator(strPtr(req.Operator)).
SetNillableRemark(strPtr(req.Remark)).
SetNillableBoxNo(strPtr(req.BoxNo)).
SetNillableContractNo(strPtr(req.ContractNo)).
Save(ctx0())
SetNillableContractNo(strPtr(req.ContractNo))
if len(req.BorrowFrom) > 0 {
obCreate.SetBorrowFrom(req.BorrowFrom)
}
ob, err := obCreate.Save(ctx0())
if err != nil {
fail(w, http.StatusInternalServerError, "创建出库单失败: "+err.Error())
return