| | |
| | | action.Data.ShortMsg = new("工单错误", ShortMessage.Types.Error); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"产品[{CurSN}]不属于当前工单,请切换到工单[{wipSNs.First().WORK_ORDER}]后再扫描"); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.WoError", CurSN, wipSNs.First().WORK_ORDER); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.WoError", input.SN, wipSNs.First().WORK_ORDER); |
| | | return action; |
| | | } |
| | | else |
| | |
| | | action.Data.ShortMsg = new("产线错误", ShortMessage.Types.Error); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"产品[{CurSN}]已在产线[{wipSNs.First().LINE_CODE}]投产,请到产线[{wipSNs.First().LINE_CODE}]扫描"); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.LineError", CurSN, wipSNs.First().LINE_CODE); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.LineError", input.SN, wipSNs.First().LINE_CODE); |
| | | return action; |
| | | } |
| | | } |
| | |
| | | { |
| | | if (Context.ContainsKey("CurPackage")) |
| | | { |
| | | var CurPkg = Context["CurPackage"] as WipPkg; |
| | | int shipQty = input.Data.ToInt32(); |
| | | //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数 |
| | | if (shipQty > 0) |
| | | { |
| | | |
| | | } |
| | | |
| | | NodeCmd = "PkgSubmit"; |
| | | |
| | | TempPkgAction = new PackingAction(); |
| | | TempPkgAction.Init(this); |
| | | |
| | | int curQty = CurPkg.Item.TotalQty; |
| | | int ruleQty = TempPkgAction.PkgRule.GetTotalQty(); |
| | | //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数 |
| | | if (shipQty > 0 && curQty != shipQty % ruleQty) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"出货数量设定为[{0}],目前包装了[{1}],包装尾数的数量必需是[{2}],请装够数量后再结束包装"); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.NotMatchShipQty", shipQty, curQty, shipQty % ruleQty); |
| | | } |
| | | |
| | | action = TempPkgAction.Submit(null); |
| | | } |
| | | else |