diff --git a/SGGL/BLL/CLGL/TwInputmasterService.cs b/SGGL/BLL/CLGL/TwInputmasterService.cs index 7f2d06eb..261f6d61 100644 --- a/SGGL/BLL/CLGL/TwInputmasterService.cs +++ b/SGGL/BLL/CLGL/TwInputmasterService.cs @@ -241,7 +241,7 @@ namespace BLL if (plan == null || plan.State != (int)TwConst.State.已审核) { return; - } + } //判断是否已经生成过入库单 var queryIsExitInMaster = new Tw_InOutMasterOutput(); queryIsExitInMaster.InOutPlanMasterId = planId; diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx index bde8c373..5959a00d 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx @@ -22,7 +22,7 @@ - <%-- + /// 保存计划明细项的实收数量 + /// + private void SavePlanDetail(string InOutPlanMasterId) + { + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + string detailId = teamGroupRow.Value("id"); + decimal actNum = values.Value("ActNum"); + + var detail = TwInOutplandetailService.GetById(detailId); + if (detail != null) + { + detail.ActNum = actNum; + TwInOutplandetailService.Update(detail); + } + } + } protected void btnEditProcess_Click(object sender, EventArgs e) { throw new NotImplementedException(); @@ -87,7 +109,14 @@ namespace FineUIPro.Web.CLGL protected void btnSave_Click(object sender, EventArgs e) { var model = TwInOutplanmasterService.GetById(Id); - if (model == null) return; + if (model == null) return; + if (model.State == (int)TwConst.State.待审核) + { + SavePlanDetail(Id); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + return; + } model.WarehouseMan = this.CurrUser.PersonId; model.WarehouseDate = DateTime.Now; TwInOutplanmasterService.Update(model);