修改进度录入页面
This commit is contained in:
parent
89c0966c2a
commit
205b67e05e
|
@ -231,7 +231,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["本月计划工作预算费用-BCWS"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["本月计划工作预算费用-BCWS"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["本月计划工作预算费用-BCWS"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["本月计划工作预算费用-BCWS"].Points[i].ToolTip = "本月计划工作预算费用-BCWS\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
chart1.Series["本月已完工作预算费用-BCWP"].Points.DataBindXY(dv, "月份", dv, "本月已完工作预算费用-BCWP");
|
chart1.Series["本月已完工作预算费用-BCWP"].Points.DataBindXY(dv, "月份", dv, "本月已完工作预算费用-BCWP");
|
||||||
|
@ -239,7 +239,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["本月已完工作预算费用-BCWP"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["本月已完工作预算费用-BCWP"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["本月已完工作预算费用-BCWP"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["本月已完工作预算费用-BCWP"].Points[i].ToolTip = "本月已完工作预算费用-BCWP\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
chart1.Series["本月已完工作实际费用-ACWP"].Points.DataBindXY(dv, "月份", dv, "本月已完工作实际费用-ACWP");
|
chart1.Series["本月已完工作实际费用-ACWP"].Points.DataBindXY(dv, "月份", dv, "本月已完工作实际费用-ACWP");
|
||||||
|
@ -247,7 +247,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["本月已完工作实际费用-ACWP"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["本月已完工作实际费用-ACWP"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["本月已完工作实际费用-ACWP"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["本月已完工作实际费用-ACWP"].Points[i].ToolTip = "本月已完工作实际费用-ACWP\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
chart1.Series["累计计划工作预算费用-BCWS"].Points.DataBindXY(dv, "月份", dv, "累计计划工作预算费用-BCWS");
|
chart1.Series["累计计划工作预算费用-BCWS"].Points.DataBindXY(dv, "月份", dv, "累计计划工作预算费用-BCWS");
|
||||||
|
@ -257,7 +257,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["累计计划工作预算费用-BCWS"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["累计计划工作预算费用-BCWS"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["累计计划工作预算费用-BCWS"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["累计计划工作预算费用-BCWS"].Points[i].ToolTip = "累计计划工作预算费用-BCWS\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
chart1.Series["累计已完工作预算费用-BCWP"].Points.DataBindXY(dv, "月份", dv, "累计已完工作预算费用-BCWP");
|
chart1.Series["累计已完工作预算费用-BCWP"].Points.DataBindXY(dv, "月份", dv, "累计已完工作预算费用-BCWP");
|
||||||
|
@ -267,7 +267,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["累计已完工作预算费用-BCWP"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["累计已完工作预算费用-BCWP"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["累计已完工作预算费用-BCWP"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["累计已完工作预算费用-BCWP"].Points[i].ToolTip = "累计已完工作预算费用-BCWP\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
chart1.Series["累计已完工作实际费用-ACWP"].Points.DataBindXY(dv, "月份", dv, "累计已完工作实际费用-ACWP");
|
chart1.Series["累计已完工作实际费用-ACWP"].Points.DataBindXY(dv, "月份", dv, "累计已完工作实际费用-ACWP");
|
||||||
|
@ -277,7 +277,7 @@ namespace Web.Controls
|
||||||
|
|
||||||
for (int i = 0; i < chart1.Series["累计已完工作实际费用-ACWP"].Points.Count; i++)
|
for (int i = 0; i < chart1.Series["累计已完工作实际费用-ACWP"].Points.Count; i++)
|
||||||
{
|
{
|
||||||
chart1.Series["累计已完工作实际费用-ACWP"].Points[i].ToolTip = "#VALX,#VALY";
|
chart1.Series["累计已完工作实际费用-ACWP"].Points[i].ToolTip = "累计已完工作实际费用-ACWP\n#VALX\n#VALY";
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Add(chart1);
|
Controls.Add(chart1);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
|
<f:TextBox runat="server" ID="hdId" Hidden="true"></f:TextBox>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存"
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存"
|
||||||
OnClick="btnSave_Click">
|
OnClick="btnSave_Click">
|
||||||
|
@ -93,9 +94,27 @@
|
||||||
</Editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||||
|
</Listeners>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
</form>
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var hdIdClientID = '<%= hdId.ClientID %>';
|
||||||
|
|
||||||
|
function onGridAfterEdit(event, value, params) {
|
||||||
|
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||||
|
var str = F(hdIdClientID).ooIl1;
|
||||||
|
if (str == undefined) {
|
||||||
|
str = rowId;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
str = str + "," + rowId;
|
||||||
|
}
|
||||||
|
F(hdIdClientID).setValue(str);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -169,77 +169,77 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
select x;
|
select x;
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
string[] ids = this.hdId.Text.Split(',');
|
||||||
//foreach (JObject mergedRow in Grid1.GetModifiedData())
|
if (ids.Length > 0)
|
||||||
{
|
{
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||||
int i = mergedRow.Value<int>("index");
|
|
||||||
if (this.Grid1.Rows[i].DataKeys[2] != null)
|
|
||||||
{
|
{
|
||||||
Model.WBS_CostControl costControl = oldViewInfos.FirstOrDefault(x => x.CostControlId == this.Grid1.Rows[i].DataKeys[2].ToString());
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
if (costControl != null)
|
int i = mergedRow.Value<int>("index");
|
||||||
|
if (this.Grid1.Rows[i].DataKeys[2] != null)
|
||||||
{
|
{
|
||||||
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
|
Model.WBS_CostControl costControl = oldViewInfos.FirstOrDefault(x => x.CostControlId == this.Grid1.Rows[i].DataKeys[2].ToString());
|
||||||
decimal oldRealPrice = costControl.RealPrice ?? 0;
|
if (costControl != null && ids.Contains(this.Grid1.Rows[i].DataKeys[2].ToString()))
|
||||||
string costControlId = costControl.CostControlId;
|
|
||||||
string totalNum = values.Value<string>("TotalNum");
|
|
||||||
string planPrice = values.Value<string>("PlanPrice");
|
|
||||||
string realPrice = values.Value<string>("RealPrice");
|
|
||||||
string planStartDate = values.Value<string>("PlanStartDate");
|
|
||||||
string planEndDate = values.Value<string>("PlanEndDate");
|
|
||||||
string realStartDate = values.Value<string>("RealStartDate");
|
|
||||||
string realEndDate = values.Value<string>("RealEndDate");
|
|
||||||
costControl.TotalNum = Funs.GetNewDecimal(totalNum);
|
|
||||||
costControl.PlanPrice = Funs.GetNewDecimal(planPrice);
|
|
||||||
costControl.RealPrice = Funs.GetNewDecimal(realPrice);
|
|
||||||
costControl.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
|
||||||
costControl.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
|
||||||
costControl.RealStartDate = Funs.GetNewDateTime(realStartDate);
|
|
||||||
costControl.RealEndDate = Funs.GetNewDateTime(realEndDate);
|
|
||||||
BLL.CostControlService.UpdateCostControl(costControl);
|
|
||||||
for (int j = 0; j < months.Count; j++)
|
|
||||||
{
|
{
|
||||||
oldThisPlanValue = 0;
|
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
|
||||||
oldThisRealCost = 0;
|
decimal oldRealPrice = costControl.RealPrice ?? 0;
|
||||||
oldThisPlanCost = 0;
|
string costControlId = costControl.CostControlId;
|
||||||
changeThisPlanValue = 0;
|
string totalNum = values.Value<string>("TotalNum");
|
||||||
changeThisRealCost = 0;
|
string planPrice = values.Value<string>("PlanPrice");
|
||||||
changeThisPlanCost = 0;
|
string realPrice = values.Value<string>("RealPrice");
|
||||||
string planNum = values.Value<string>(string.Format("{0:yyyy-MM}", months[j]) + "Plan");
|
string planStartDate = values.Value<string>("PlanStartDate");
|
||||||
string thisNum = values.Value<string>(string.Format("{0:yyyy-MM}", months[j]) + "This");
|
string planEndDate = values.Value<string>("PlanEndDate");
|
||||||
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControlId, months[j]);
|
string realStartDate = values.Value<string>("RealStartDate");
|
||||||
if (costControlDetail != null)
|
string realEndDate = values.Value<string>("RealEndDate");
|
||||||
{
|
costControl.TotalNum = Funs.GetNewDecimal(totalNum);
|
||||||
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * oldPlanPrice;
|
costControl.PlanPrice = Funs.GetNewDecimal(planPrice);
|
||||||
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * oldRealPrice;
|
costControl.RealPrice = Funs.GetNewDecimal(realPrice);
|
||||||
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * oldPlanPrice;
|
costControl.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
||||||
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
|
costControl.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
||||||
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
|
costControl.RealStartDate = Funs.GetNewDateTime(realStartDate);
|
||||||
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
|
costControl.RealEndDate = Funs.GetNewDateTime(realEndDate);
|
||||||
thisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
|
BLL.CostControlService.UpdateCostControl(costControl);
|
||||||
thisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
|
for (int j = 0; j < months.Count; j++)
|
||||||
//BLL.CostControlDetailService.UpdateCostControlDetail(costControlDetail);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
costControlDetail = new Model.WBS_CostControlDetail();
|
|
||||||
costControlDetail.CostControlDetailId = SQLHelper.GetNewID();
|
|
||||||
costControlDetail.CostControlId = costControlId;
|
|
||||||
costControlDetail.Months = months[j];
|
|
||||||
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
|
|
||||||
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
|
|
||||||
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
|
|
||||||
thisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
|
|
||||||
thisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
|
|
||||||
//BLL.CostControlDetailService.AddCostControlDetail(costControlDetail);
|
|
||||||
db.WBS_CostControlDetail.InsertOnSubmit(costControlDetail);
|
|
||||||
}
|
|
||||||
//累加变化值,计算总的变化值
|
|
||||||
changeThisPlanValue += thisPlanValue - oldThisPlanValue;
|
|
||||||
changeThisRealCost += thisRealCost - oldThisRealCost;
|
|
||||||
changeThisPlanCost += thisPlanCost - oldThisPlanCost;
|
|
||||||
if (changeThisPlanValue != 0 || changeThisRealCost != 0 || changeThisPlanCost != 0)
|
|
||||||
{
|
{
|
||||||
|
oldThisPlanValue = 0;
|
||||||
|
oldThisRealCost = 0;
|
||||||
|
oldThisPlanCost = 0;
|
||||||
|
changeThisPlanValue = 0;
|
||||||
|
changeThisRealCost = 0;
|
||||||
|
changeThisPlanCost = 0;
|
||||||
|
string planNum = values.Value<string>(string.Format("{0:yyyy-MM}", months[j]) + "Plan");
|
||||||
|
string thisNum = values.Value<string>(string.Format("{0:yyyy-MM}", months[j]) + "This");
|
||||||
|
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControlId, months[j]);
|
||||||
|
if (costControlDetail != null)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
thisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
|
||||||
|
thisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
|
||||||
|
//BLL.CostControlDetailService.UpdateCostControlDetail(costControlDetail);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
costControlDetail = new Model.WBS_CostControlDetail();
|
||||||
|
costControlDetail.CostControlDetailId = SQLHelper.GetNewID();
|
||||||
|
costControlDetail.CostControlId = costControlId;
|
||||||
|
costControlDetail.Months = months[j];
|
||||||
|
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
|
||||||
|
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
|
||||||
|
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
|
||||||
|
thisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
|
||||||
|
thisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
|
||||||
|
//BLL.CostControlDetailService.AddCostControlDetail(costControlDetail);
|
||||||
|
db.WBS_CostControlDetail.InsertOnSubmit(costControlDetail);
|
||||||
|
}
|
||||||
|
//累加变化值,计算总的变化值
|
||||||
|
changeThisPlanValue += thisPlanValue - oldThisPlanValue;
|
||||||
|
changeThisRealCost += thisRealCost - oldThisRealCost;
|
||||||
|
changeThisPlanCost += thisPlanCost - oldThisPlanCost;
|
||||||
//更新工作包、工作项
|
//更新工作包、工作项
|
||||||
Model.Wbs_WbsSet wbsSet = BLL.WbsSetService.GetWbsSetByWbsSetId(costControl.WbsSetId);
|
Model.Wbs_WbsSet wbsSet = BLL.WbsSetService.GetWbsSetByWbsSetId(costControl.WbsSetId);
|
||||||
UpdateWbsSetDetail(db, costControl.WbsSetId, months[j], changeThisPlanValue, changeThisRealCost, changeThisPlanCost);
|
UpdateWbsSetDetail(db, costControl.WbsSetId, months[j], changeThisPlanValue, changeThisRealCost, changeThisPlanCost);
|
||||||
|
|
|
@ -57,6 +57,15 @@ namespace FineUIPro.Web.JDGL.WBS {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar Toolbar2;
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// hdId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox hdId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSave 控件。
|
/// btnSave 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue