专项检查
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
FieldType="String" HeaderText="负责人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CreateTime" DataField="CreateTime" SortField="CreateTime"
|
||||
FieldType="String" HeaderText="创建日期" HeaderTextAlign="Center" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Left">
|
||||
FieldType="String" HeaderText="创建日期" HeaderTextAlign="Center" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="ProblemTypeName" DataField="ProblemTypeName" SortField="ProblemTypeName"
|
||||
FieldType="String" HeaderText="问题类型" HeaderTextAlign="Center" TextAlign="Left">
|
||||
@@ -78,7 +78,7 @@
|
||||
FieldType="String" HeaderText="检查区域" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="CheckTime" DataField="CheckTime" SortField="CheckTime"
|
||||
FieldType="String" HeaderText="检查日期" HeaderTextAlign="Center" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Left">
|
||||
FieldType="String" HeaderText="检查日期" HeaderTextAlign="Center" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField ColumnID="tfImageUrl1" Width="250px" HeaderText="整改前" HeaderTextAlign="Center"
|
||||
@@ -124,6 +124,9 @@
|
||||
<f:MenuButton ID="btnMenuSee" EnablePostBack="true" runat="server" Text="查看"
|
||||
OnClick="btnMenuSee_Click" Icon="Find">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true"
|
||||
Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
@@ -140,8 +143,8 @@
|
||||
this.mergeColumns(['CheckMan']);
|
||||
this.mergeColumns(['PersonResponsibleName']);
|
||||
this.mergeColumns(['ProblemTypeName']);
|
||||
this.mergeColumns(['Place']);
|
||||
this.mergeColumns(['CreateTime']);
|
||||
this.mergeColumns(['Place']);
|
||||
this.mergeColumns(['CreateTime']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -254,148 +254,31 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
#region 删除
|
||||
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == Const.State_1) //待整改
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以在整改前继续编辑
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
Model.Inspect_InspectionItem item = db.Inspect_InspectionItem.FirstOrDefault(x => x.InspectionItemId == rowID);
|
||||
if (item != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录检查人,无法编辑!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (registration.States == Const.State_2) //已整改待确认
|
||||
{
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以在确认前继续编辑
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录责任人,无法编辑!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (registration.States == Const.State_3) //已闭环
|
||||
{
|
||||
Alert.ShowInTop("该记录已闭环,无法编辑!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 整改
|
||||
/// <summary>
|
||||
/// 整改按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuRectify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == "1") //待整改
|
||||
{
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId={0}", registration.HazardRegisterId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录责任人,无法整改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
db.Inspect_InspectionItem.DeleteOnSubmit(item);
|
||||
db.SubmitChanges();
|
||||
int count = db.Inspect_Inspection.Count(x => x.InspectionId == item.InspectionId);
|
||||
if (count == 0)
|
||||
{
|
||||
db.Inspect_Inspection.DeleteOnSubmit(db.Inspect_Inspection.FirstOrDefault(x => x.InspectionId == item.InspectionId));
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("该记录不是待整改状态,无法进行整改操作!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 确认
|
||||
/// <summary>
|
||||
/// 确认按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuConfirm_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == Const.State_2) //待确认
|
||||
{
|
||||
if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以进行确认操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId={0}", registration.HazardRegisterId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录检查人,无法确认!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("该记录不是待确认状态,无法进行确认操作!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编制
|
||||
/// <summary>
|
||||
/// 编制
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationAdd.aspx", "登记 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -612,8 +495,18 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
|
||||
var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "C7481FEE-EA92-44B8-99F6-C5CA6BBDCFF5");
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSee))
|
||||
{
|
||||
this.btnMenuSee.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -184,5 +184,14 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuSee;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="conclusion" runat="server" Label="审批结论" Readonly="true">
|
||||
<f:TextBox ID="conclusion" runat="server" Label="审批结果" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
this.Code.Text = item.InspectionCode;
|
||||
this.PName.Text = item.ProjectName;
|
||||
this.Cman.Text = item.CheckMan;
|
||||
this.Pman.Text = item.ProblemTypeName;
|
||||
this.Pman.Text = item.PersonResponsibleName;
|
||||
this.Ptype.Text = item.ProblemTypeName;
|
||||
this.Iarea.Text = item.Place;
|
||||
this.Carea.Text = item.WorkAreaName;
|
||||
|
||||
Reference in New Issue
Block a user