0718-修改进度数据录入保存方法

This commit is contained in:
2022-07-18 15:33:29 +08:00
parent 1f471c2f56
commit bec6bc5fc0
4 changed files with 29 additions and 17 deletions
@@ -174,6 +174,7 @@ namespace FineUIPro.Web.JDGL.WBS
where x.ProjectId == this.CurrUser.LoginProjectId
select x;
foreach (JObject mergedRow in Grid1.GetMergedData())
//foreach (JObject mergedRow in Grid1.GetModifiedData())
{
JObject values = mergedRow.Value<JObject>("values");
int i = mergedRow.Value<int>("index");
@@ -182,6 +183,8 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControl costControl = oldViewInfos.FirstOrDefault(x => x.CostControlId == this.Grid1.Rows[i].DataKeys[2].ToString());
if (costControl != null)
{
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
decimal oldRealPrice = costControl.RealPrice ?? 0;
string costControlId = costControl.CostControlId;
string totalNum = values.Value<string>("TotalNum");
string planPrice = values.Value<string>("PlanPrice");
@@ -211,9 +214,9 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControlId, months[j]);
if (costControlDetail != null)
{
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * oldPlanPrice;
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * oldRealPrice;
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * oldPlanPrice;
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);