| | |
| | | public Dictionary<int, BAS_LABEL_TEMP> LabelDic { get; set; } = new(); |
| | | public List<BAS_LABEL_PV> LabelPV { get; set; } = new(); |
| | | public int FinishLevel = 0; |
| | | private bool IsManually => CurStep.IsNullOrEmpty(); |
| | | #endregion Propertys & Variables |
| | | |
| | | #region Functions |
| | |
| | | if (!pInput.WeightInfo.IsNullOrEmpty() && pInput.WeightInfo.Weight > 0) |
| | | { |
| | | //验证重量数据是否符合设置好的重量范围 |
| | | if (!PkgProd.IsNullOrEmpty() && (pInput.WeightInfo.Weight < PkgProd.MIN_WEIGHT || PkgProd.MAX_WEIGHT < pInput.WeightInfo.Weight)) |
| | | if (!PkgProd.IsNullOrEmpty() && ((pInput.WeightInfo.Weight < PkgProd.MIN_WEIGHT && !IsManually) || PkgProd.MAX_WEIGHT < pInput.WeightInfo.Weight)) |
| | | { |
| | | action.IsSuccessed = false; |
| | | CurStep?.SetStatusMessage(StepStatus.Error, Biz.L("重量超限")); |
| | |
| | | CurPkgItem = curItem; |
| | | |
| | | //添加明细后判断当前包装层级的明细数量是否等于包装数量,若相等则标记当前包装层级为完成并尝试打印标签 |
| | | if (CurPkgItem.Items.Count(q => q.IsFinished) == CurPkgItem.PKG_QTY || CurStep.IsNullOrEmpty()) |
| | | if (CurPkgItem.Items.Count(q => q.IsFinished) == CurPkgItem.PKG_QTY || IsManually) |
| | | { |
| | | //打印前称重:如果当前的包装明细的上一层包装对象是最外层包装且需要称重时,先称重,合格后在发印或者扫描最外层包装标签 |
| | | if (CurPkgItem.PKG_LEVEL == CurPkg.Item.PKG_LEVEL && CurPkg.NeedWeighing) |
| | |
| | | action.LocaleMsg = new("MES.WorkAction.PackingAction.PackageComplete", CurPkg.Item.PKG_LEVEL, CurPkg.Item.PKG_NAME); |
| | | |
| | | //手动结束包装则标记行为完成 |
| | | //if (CurStep.IsNullOrEmpty()) |
| | | //if (IsManually) |
| | | //{ |
| | | // IsFinished = true; |
| | | //} |
| | |
| | | } |
| | | |
| | | //不是手动结束包装则保存行为操作记录 |
| | | if (!CurStep.IsNullOrEmpty()) |
| | | if (!IsManually) |
| | | { |
| | | //记录行为操作记录 |
| | | var wipActs = new List<MES_WIP_ACT>(); |