/// <summary> /// 不入库出货 /// </summary> /// <param name="ScaleOutStoke"></param> /// <returns></returns> public ActionResult NoOutStockInsert(ScaleOutStoke ScaleOutStoke) { List <Scale> BigScale = Scale.GetBigScaleList(ScaleOutStoke.Code); List <Scale> SmallScale = Scale.GetSmallScaleList(ScaleOutStoke.Code); List <Scale> CodeScale = new List <Scale>(); string msg = string.Empty; if (BigScale.Count > 0) { CodeScale = BigScale; } else if (SmallScale.Count > 0) { CodeScale = SmallScale; } else { return(Content("没有此条码!!")); } foreach (Scale item in CodeScale) { if (Scale.GetBoolInCode(item.SmallCode)) { msg += item.SmallCode + "条码已出库<br/>"; } else if (!ScaleOutStoke.GetInScale(item.SmallCode)) { ScaleOutStoke.BigCode = item.BigCode; ScaleOutStoke.SmallCode = item.SmallCode; ScaleOutStoke.AntiCode = item.AntiCode; ScaleOutStoke.Code = item.SmallCode; ScaleOutStoke.Shipper = "总部"; ScaleOutStoke.State = "启用"; ScaleOutStoke.InsertAndReturnIdentity(); Scale.GetUpdateScaleOutState(item.SmallCode); msg += item.SmallCode + "条码出货成功!<br/>"; } else { msg += item.SmallCode + "条码已出货!<br/>"; } } if (string.IsNullOrWhiteSpace(msg)) { msg = "条码已出货"; } return(Content(msg)); }