| | |
| | | #endregion |
| | | public BAS_LABEL_TEMP Label { get; set; } |
| | | public List<BAS_LABEL_PV> LabelPV { get; set; } |
| | | public bool NoNeedPrint { get; set; } |
| | | #endregion Propertys & Variables |
| | | |
| | | #region Functions |
| | |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | | if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel) |
| | | NoNeedPrint = (!CurPosition.Context.ContainsKey("CurPackage") || !(CurPosition.Context["CurPackage"] as WipPkg).IsFinished) |
| | | || (CurPosition is YadaPacking && (CurPosition as YadaPacking).IsPrintCustomerLabel); |
| | | if (NoNeedPrint) |
| | | { |
| | | action = End(input); |
| | | } |
| | |
| | | ACT_VALUE_2 = Label.Variables.ToJson(), |
| | | ACT_RESULT = "Y", |
| | | ELAPSED_TIME = CurStep.GetElapsedTime().TotalMilliseconds.ToInt64(), |
| | | TRACE_INFO = $"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", |
| | | TRACE_INFO = NoNeedPrint ? $"无需打印入库标签" : $"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", |
| | | }; |
| | | if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel) |
| | | { |
| | | wipAct.TRACE_INFO = $"无需打印入库标签"; |
| | | } |
| | | wipActs.Add(wipAct); |
| | | } |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Message = Biz.L("打印完成"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("打印完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"入库标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); |
| | | if (NoNeedPrint) |
| | | { |
| | | CurStep.Message = Biz.L("无需打印"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("无需打印", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"无需打印入库标签{0}[{1}]"); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.NoNeedPrint", Label.LABEL_NAME, Label.LABEL_CODE); |
| | | } |
| | | else |
| | | { |
| | | CurStep.Message = Biz.L("打印完成"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("打印完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"入库标签{0}[{1}打印成功"); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); |
| | | } |
| | | return action; |
| | | } |
| | | |