修改培训穿透页面和安全月报
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="width: 46%; height: 50px; vertical-align: middle; font-size: 20pt; font-weight: bold">
|
||||
<asp:Label ID="lblTital" runat="server" Text="项 目 安 全 月 报"></asp:Label>
|
||||
<asp:Label ID="lblTital" runat="server" Text="项 目 H S E 月 报"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -517,31 +517,31 @@
|
||||
<f:Panel ID="Panel11" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="nbFireWorkCount" Label="动火作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbBreakGroundCount" Label="动土作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbLimitedSpaceCount" Label="受限空间作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbElectricityCount" Label="临时用电作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="Panel12" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="nbHeightWorkCount" Label="高处作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbRadialWork" Label="射线作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbLiftingWorkCount" Label="吊装作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
|
||||
<f:NumberBox ID="nbNightWork" Label="夜间施工许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
|
||||
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="Panel13" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
|
||||
@@ -798,6 +798,7 @@
|
||||
<f:Grid ID="gvFiveExpenseC" ShowBorder="true" ShowHeader="false" Title="本月项目HSE费用投入统计" runat="server"
|
||||
AllowCellEditing="true" ClicksToEdit="1" DataIDField="FiveExpenseId" DataKeyNames="FiveExpenseId"
|
||||
EnableMultiSelect="false" ShowGridHeader="true" MinHeight="380px" EnableColumnLines="true" EnableSummary="true" SummaryPosition="Flow">
|
||||
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
@@ -817,6 +818,10 @@
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="PlanCostMonth1" DataField="PlanCostMonth" FieldType="String"
|
||||
HeaderText="本月原始数据" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="PlanCostYear" DataField="PlanCostYear" FieldType="String"
|
||||
HeaderText="项目累计" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
@@ -835,6 +840,11 @@
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="ActualCostMonth1" DataField="ActualCostMonth" FieldType="String"
|
||||
HeaderText="本月原始数据" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="ActualCostYear" DataField="ActualCostYear" FieldType="String"
|
||||
HeaderText="项目累计" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
@@ -843,8 +853,12 @@
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
|
||||
</f:GroupField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="ongvFiveExpenseC" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -1464,4 +1478,33 @@
|
||||
me.updateCellValue(rowId, 'TotalCheckNum', parseInt(totalCheckNum) + (parseInt(yearCheckNum) - parseInt(yearCheckNum1)));
|
||||
}
|
||||
}
|
||||
|
||||
//5.1 修改本月费用 更改累计费用
|
||||
function ongvFiveExpenseC(event, value, params) {
|
||||
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||
|
||||
//修改本月五环数,累计值变化
|
||||
if (columnId === 'PlanCostMonth') {
|
||||
//原始本月
|
||||
var planCostMonth1 = me.getCellValue(rowId, 'PlanCostMonth1');
|
||||
//本月
|
||||
var planCostMonth = me.getCellValue(rowId, 'PlanCostMonth');
|
||||
|
||||
//年度
|
||||
var planCostYear = me.getCellValue(rowId, 'PlanCostYear');
|
||||
|
||||
me.updateCellValue(rowId, 'PlanCostMonth1', planCostMonth);
|
||||
me.updateCellValue(rowId, 'PlanCostYear', Number(planCostYear) - Number(planCostMonth1) + Number(planCostMonth));
|
||||
} else if (columnId === 'ActualCostMonth') {
|
||||
//原始本月
|
||||
var actualCostMonth1 = me.getCellValue(rowId, 'ActualCostMonth1');
|
||||
//本月
|
||||
var actualCostMonth = me.getCellValue(rowId, 'ActualCostMonth');
|
||||
//年度
|
||||
var actualCostYear = me.getCellValue(rowId, 'ActualCostYear');
|
||||
|
||||
me.updateCellValue(rowId, 'ActualCostMonth1', actualCostMonth);
|
||||
me.updateCellValue(rowId, 'ActualCostYear', Number(actualCostYear) - Number(actualCostMonth1) + Number(actualCostMonth));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1985,6 +1985,12 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
#endregion
|
||||
|
||||
#region HSE培训
|
||||
public class Bosheng {
|
||||
public string TrainType { get; set; }
|
||||
|
||||
public decimal TrainPeriod { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示月报告HSE培训情况
|
||||
/// </summary>
|
||||
@@ -2009,7 +2015,8 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
trainSort.TrainType = item.TrainTypeName;
|
||||
if (listTrain.Count > 0)
|
||||
{
|
||||
trainSort.TeachHour = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TeachHour);
|
||||
trainSort.TeachHour = 0;
|
||||
//trainSort.TeachHour = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TeachHour);
|
||||
trainSort.PersonNum = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TrainPersonNum);
|
||||
}
|
||||
else
|
||||
@@ -2026,7 +2033,21 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x=>x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
var listB = listBosheng.Where(x => x.TrainType.Contains("入场")).Select(x => new Bosheng
|
||||
{
|
||||
TrainType = x.TrainType,
|
||||
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
|
||||
});
|
||||
var model = listB.Where(x => x.TrainType.Contains("入场")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
|
||||
if (model != null)
|
||||
{
|
||||
trainSort.TeachHour += model.TrainPeriod;
|
||||
}
|
||||
else {
|
||||
trainSort.TeachHour = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (item.TrainTypeId == "c1a513bb-a547-45b0-944d-b0dd88f06f82")
|
||||
{
|
||||
@@ -2034,14 +2055,41 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
var listB = listBosheng.Where(x => x.TrainType.Contains("其他")).Select(x => new Bosheng {
|
||||
TrainType = x.TrainType,
|
||||
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
|
||||
});
|
||||
|
||||
var model = listB.Where(x => x.TrainType.Contains("其他")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
|
||||
if (model != null)
|
||||
{
|
||||
trainSort.TeachHour += model.TrainPeriod;
|
||||
}
|
||||
else
|
||||
{
|
||||
trainSort.TeachHour = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//专项
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
var listB = listBosheng.Where(x => x.TrainType.Contains("专项")).Select(x => new Bosheng
|
||||
{
|
||||
TrainType = x.TrainType,
|
||||
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
|
||||
});
|
||||
var model = listB.Where(x => x.TrainType.Contains("专项")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
|
||||
if (model != null)
|
||||
{
|
||||
trainSort.TeachHour += model.TrainPeriod;
|
||||
}
|
||||
else
|
||||
{
|
||||
trainSort.TeachHour = 0;
|
||||
}
|
||||
//Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
//decimal numSum = 0;
|
||||
//trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("专项")).Max(x => funDelegate(x.TrainPeriod, numSum));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3226,6 +3274,34 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 4.4修改数量自动修改本月和累计
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Zy_TextChanged(object sender, EventArgs e) {
|
||||
if (!string.IsNullOrEmpty(nbFireWorkCount.Text)&&!string.IsNullOrEmpty(nbBreakGroundCount.Text)&&
|
||||
!string.IsNullOrEmpty(nbLimitedSpaceCount.Text) && !string.IsNullOrEmpty(nbElectricityCount.Text) &&
|
||||
!string.IsNullOrEmpty(nbHeightWorkCount.Text) && !string.IsNullOrEmpty(nbRadialWork.Text) &&
|
||||
!string.IsNullOrEmpty(nbLiftingWorkCount.Text) && !string.IsNullOrEmpty(nbNightWork.Text) )
|
||||
{
|
||||
|
||||
|
||||
var number1 = Convert.ToInt32(nbFireWorkCount.Text);
|
||||
var number2 = Convert.ToInt32(nbBreakGroundCount.Text);
|
||||
var number3 = Convert.ToInt32(nbLimitedSpaceCount.Text);
|
||||
var number4 = Convert.ToInt32(nbElectricityCount.Text);
|
||||
var number5 = Convert.ToInt32(nbHeightWorkCount.Text);
|
||||
var number6 = Convert.ToInt32(nbRadialWork.Text);
|
||||
var number7 = Convert.ToInt32(nbLiftingWorkCount.Text);
|
||||
var number8 = Convert.ToInt32(nbNightWork.Text);
|
||||
|
||||
//作业累计
|
||||
nbProCount.Text = (Convert.ToInt32(nbProCount.Text) - Convert.ToInt32(nbMonthCount.Text)
|
||||
+ number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
|
||||
nbYearCount.Text= (Convert.ToInt32(nbYearCount.Text) - Convert.ToInt32(nbMonthCount.Text)
|
||||
+ number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
|
||||
nbMonthCount.Text = ( number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
|
||||
}}
|
||||
}
|
||||
}
|
||||
@@ -537,7 +537,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
var urlHz = startDate.ToString("yyyyMMdd") + "-"
|
||||
+ endDate.ToString("yyyyMMdd");
|
||||
|
||||
newUrl = uploadfilepath.Replace("项目安全月报", pModel.ShortName + "项目安全月报(" + model.MonthReportCode + ")" + urlHz);
|
||||
newUrl = uploadfilepath.Replace("项目安全月报", pModel.ShortName + "项目HSE月报(" + model.MonthReportCode + ")" + urlHz);
|
||||
|
||||
if (File.Exists(newUrl))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user