| | |
| | | //只允许单个产品进行客户条码绑定 |
| | | if (CurPosition.CurWipSNs.Count > 1) |
| | | { |
| | | action.Data.ShortMsg = new("请扫描产品", ShortMessage.Types.Error); |
| | | CurStep.Message = Biz.L("请扫描单个产品"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("请扫描单个产品", ShortMessage.Types.Error); |
| | | //action.LocaleMsg = new($"条码[{0}]是包装/载具条码,请重新扫描单个厂内条码进行客户条码绑定"); |
| | | action.LocaleMsg = new("MES.WorkAction.ThreeInOne.NotProductSN", CurPosition.CurSN); |
| | | //重置工序操作 |
| | |
| | | //厂内条码已绑定客户条码,直接结束行为 |
| | | if (!CurCSN.IsNullOrEmpty()) |
| | | { |
| | | CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; |
| | | CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; |
| | | action.Data.Data = new |
| | | if (CurCSN.WORK_ORDER == CurPosition.WorkBatch.WO.ORDER_NO) |
| | | { |
| | | NeedPrint = false, |
| | | NeedScan = false, |
| | | Label = "", |
| | | }; |
| | | action = End(); |
| | | CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; |
| | | CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; |
| | | action.Data.Data = new |
| | | { |
| | | NeedPrint = false, |
| | | NeedScan = false, |
| | | Label = "", |
| | | }; |
| | | action = End(input); |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | //厂内条码未绑定客户条码 |
| | | else |
| | |
| | | NeedScan = true, |
| | | Label = "", |
| | | }; |
| | | action.Data.ShortMsg = new("扫描客户标签", ShortMessage.Types.Normal); |
| | | CurStep.Message = Biz.L("扫描客户标签"); |
| | | CurStep.Status = StepStatus.Normal; |
| | | action.Data.ShortMsg = new("扫描客户标签", ShortMessage.Types.Normal); |
| | | //action.LocaleMsg = new Locale($"请扫描厂内条码[{0}]需要绑定客户条码"); |
| | | action.LocaleMsg = new Locale("MES.WorkAction.ThreeInOne.BeginScan", wipSn.SN); |
| | | } |
| | |
| | | NeedScan = true, |
| | | Label, |
| | | }; |
| | | action.Data.ShortMsg = new("扫描已打印的客户标签", ShortMessage.Types.Normal); |
| | | CurStep.Message = Biz.L("扫描已打印的客户标签"); |
| | | CurStep.Status = StepStatus.Normal; |
| | | action.Data.ShortMsg = new("扫描已打印的客户标签", ShortMessage.Types.Normal); |
| | | //action.LocaleMsg = new Locale($"开始打印厂内条码[{0}]对应的客户条码"); |
| | | action.LocaleMsg = new Locale("MES.WorkAction.ThreeInOne.BeginPrint", wipSn.SN); |
| | | } |
| | |
| | | //客户条码已绑定其他厂内条码 |
| | | if (!CurCSN.FLOW_SN.IsNullOrEmpty() && CurCSN.FLOW_SN != CurPosition.CurWipSNs.First().SN) |
| | | { |
| | | CurStep.Message = Biz.L("绑定失败"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("绑定失败", ShortMessage.Types.Failed); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"厂内条码[{0}]绑定客户条码[{1}]失败,客户条码已绑定厂内条码[{2}]"); |
| | |
| | | //客户条码不属于当前工单的客户 |
| | | else if (CurCSN.CUST_CODE.IsNullOrEmpty(CurPosition.WorkBatch.WO.CUST_CODE) != CurPosition.WorkBatch.WO.CUST_CODE) |
| | | { |
| | | CurStep.Message = Biz.L("绑定失败"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("绑定失败", ShortMessage.Types.Failed); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"客户条码[{0}]属于客户[{1}],与当前工单的客户[{2}]不一致"); |
| | |
| | | CurCSN.FLOW_SN = CurPosition.CurWipSNs.First().SN; |
| | | CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; |
| | | CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | |
| | | return action; |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Message = Biz.L("客户条码已绑定"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("客户条码已绑定", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"厂内条码[{0}]已绑定客户条码[{1}]完成", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.ThreeInOne.BindingComplete", CurCSN.FLOW_SN, CurCSN.CUST_SN); |