feat(CLGL): 入库计划编辑页面支持保存计划明细实收数量
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="TbCreate" Position="Top" ToolbarAlign="Right" runat="server" >
|
<f:Toolbar ID="TbCreate" Position="Top" ToolbarAlign="Right" runat="server" >
|
||||||
<Items>
|
<Items>
|
||||||
<f:Button ID="btnSave" ToolTip="入库" Text="入库" Icon="SystemSave" OnClick="btnSave_Click"
|
<f:Button ID="btnSave" ToolTip="保存" Text="保存" Icon="SystemSave" OnClick="btnSave_Click"
|
||||||
EnablePostBack="true" runat="server">
|
EnablePostBack="true" runat="server">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<%--<f:Button ID="btnEditProcess" ToolTip="编辑流程" Text="编辑流程" Icon="ApplicationEdit" OnClick="btnEditProcess_Click"
|
<%--<f:Button ID="btnEditProcess" ToolTip="编辑流程" Text="编辑流程" Icon="ApplicationEdit" OnClick="btnEditProcess_Click"
|
||||||
|
|||||||
@@ -42,9 +42,11 @@ namespace FineUIPro.Web.CLGL
|
|||||||
};
|
};
|
||||||
var detailList = TwInOutplandetailService.GetByModle(queryModel).ToList();
|
var detailList = TwInOutplandetailService.GetByModle(queryModel).ToList();
|
||||||
foreach (var item in detailList)
|
foreach (var item in detailList)
|
||||||
|
{
|
||||||
|
if (!item.ActNum.HasValue)
|
||||||
{
|
{
|
||||||
item.ActNum = item.PlanNum;
|
item.ActNum = item.PlanNum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Grid1.DataSource = detailList;
|
Grid1.DataSource = detailList;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
@@ -79,6 +81,26 @@ namespace FineUIPro.Web.CLGL
|
|||||||
}
|
}
|
||||||
return detailLists;
|
return detailLists;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 保存计划明细项的实收数量
|
||||||
|
/// </summary>
|
||||||
|
private void SavePlanDetail(string InOutPlanMasterId)
|
||||||
|
{
|
||||||
|
JArray teamGroupData = Grid1.GetMergedData();
|
||||||
|
foreach (JObject teamGroupRow in teamGroupData)
|
||||||
|
{
|
||||||
|
JObject values = teamGroupRow.Value<JObject>("values");
|
||||||
|
string detailId = teamGroupRow.Value<string>("id");
|
||||||
|
decimal actNum = values.Value<decimal>("ActNum");
|
||||||
|
|
||||||
|
var detail = TwInOutplandetailService.GetById(detailId);
|
||||||
|
if (detail != null)
|
||||||
|
{
|
||||||
|
detail.ActNum = actNum;
|
||||||
|
TwInOutplandetailService.Update(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
protected void btnEditProcess_Click(object sender, EventArgs e)
|
protected void btnEditProcess_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@@ -88,6 +110,13 @@ namespace FineUIPro.Web.CLGL
|
|||||||
{
|
{
|
||||||
var model = TwInOutplanmasterService.GetById(Id);
|
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.WarehouseMan = this.CurrUser.PersonId;
|
||||||
model.WarehouseDate = DateTime.Now;
|
model.WarehouseDate = DateTime.Now;
|
||||||
TwInOutplanmasterService.Update(model);
|
TwInOutplanmasterService.Update(model);
|
||||||
|
|||||||
Reference in New Issue
Block a user