修改项目安全实施计划
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using BLL;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.ActionPlan
|
||||
{
|
||||
@@ -33,7 +36,13 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpReviewMan, BLL.Const.UnitId_SEDIN, BLL.Const.Depart_constructionId, true);
|
||||
CQMSConstructSolutionService.setRoleTree(trOne, this.CurrUser.LoginProjectId, "专业工程师", Const.ProjectUnitType_1, Const.ZBCNEngineer);
|
||||
CQMSConstructSolutionService.setRoleTree(trTwo, this.CurrUser.LoginProjectId, "质量组", Const.ProjectUnitType_1, Const.QAManager + "," + Const.CQEngineer);
|
||||
CQMSConstructSolutionService.setRoleTree(trThree, this.CurrUser.LoginProjectId, "HSE组", Const.ProjectUnitType_1, Const.HSSEManager + "," + Const.HSSEEngineer);
|
||||
CQMSConstructSolutionService.setRoleTree(trFour, this.CurrUser.LoginProjectId, "控制组", Const.ProjectUnitType_1, Const.ControlManager + "," + Const.KZEngineer);
|
||||
CQMSConstructSolutionService.setRoleTree(trFive, this.CurrUser.LoginProjectId, "施工经理", Const.ProjectUnitType_1, Const.ConstructionManager + "," + Const.ConstructionAssistantManager);
|
||||
CQMSConstructSolutionService.setRoleTree(trSixe, this.CurrUser.LoginProjectId, "项目经理", Const.ProjectUnitType_1, Const.ProjectManager);
|
||||
this.ActionPlanListId = Request.Params["ActionPlanListId"];
|
||||
if (!string.IsNullOrEmpty(this.ActionPlanListId))
|
||||
{
|
||||
@@ -41,23 +50,89 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
||||
if (actionPlanList != null)
|
||||
{
|
||||
///读取编号
|
||||
this.txtActionPlanListCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ActionPlanListId);
|
||||
this.txtActionPlanListCode.Text = actionPlanList.ActionPlanListCode;
|
||||
this.txtActionPlanListName.Text = actionPlanList.ActionPlanListName;
|
||||
this.txtVersionNo.Text = actionPlanList.VersionNo;
|
||||
this.drpProjectType.SelectedValue = actionPlanList.VersionNo;
|
||||
this.drpProjectType.SelectedValue = actionPlanList.ProjectType;
|
||||
this.drpCompileMan.Text = BLL.Person_PersonsService.GetPersonsNameById(actionPlanList.CompileMan);
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", actionPlanList.CompileDate);
|
||||
this.txtActionPlanListContents.Text = HttpUtility.HtmlDecode(actionPlanList.ActionPlanListContents);
|
||||
if (actionPlanList.IsReview == true)
|
||||
{
|
||||
this.rblIsReview.SelectedValue = "True";
|
||||
this.drpReviewMan.Hidden = false;
|
||||
this.drpReviewMan.SelectedValue = actionPlanList.ReviewMan;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rblIsReview.SelectedValue = "False";
|
||||
}
|
||||
var list = ActionPlanListApproveService.getListData(ActionPlanListId);
|
||||
gvApprove.DataSource = list;
|
||||
gvApprove.DataBind();
|
||||
var zyUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "ZY");
|
||||
if (zyUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trOne, zyUserIds);
|
||||
}
|
||||
var zlUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "ZL");
|
||||
if (zlUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trTwo, zlUserIds);
|
||||
}
|
||||
var aqUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "AQ");
|
||||
if (aqUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trThree, aqUserIds);
|
||||
}
|
||||
var kzUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "KZ");
|
||||
if (kzUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trFour, kzUserIds);
|
||||
}
|
||||
var sgUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "SG");
|
||||
if (sgUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trFive, sgUserIds);
|
||||
}
|
||||
var xmUserIds = ActionPlanListApproveService.GetUserIdsApprovesBySignType(ActionPlanListId, "XM");
|
||||
if (xmUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trSixe, xmUserIds);
|
||||
}
|
||||
WindowAtt_Close(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///初始化审核菜单
|
||||
this.ctlAuditFlow.MenuId = BLL.Const.ProjectActionPlanListMenuId;
|
||||
this.ctlAuditFlow.DataId = this.ActionPlanListId;
|
||||
public string man(Object man)
|
||||
{
|
||||
string appman = string.Empty;
|
||||
if (Person_PersonsService.GetPerson_PersonsById(man.ToString()) != null)
|
||||
{
|
||||
appman = Person_PersonsService.GetPerson_PersonsById(man.ToString()).PersonName;
|
||||
}
|
||||
return appman;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置树的节点选择
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
/// <param name="role"></param>
|
||||
private void SetCheck(Tree tree, List<string> userIds)
|
||||
{
|
||||
foreach (TreeNode tn in tree.Nodes[0].Nodes)
|
||||
{
|
||||
if (userIds.Contains(tn.NodeID))
|
||||
{
|
||||
tn.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
@@ -72,5 +147,36 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void gvApprove_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
object[] keys = gvApprove.DataKeys[e.RowIndex];
|
||||
string fileId = string.Empty;
|
||||
if (keys == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileId = keys[0].ToString();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
|
||||
String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/ActionPlanListAttachUrl&menuId={2}",
|
||||
-1, fileId, Const.ProjectActionPlanListMenuId)));
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
this.divC.InnerHtml = string.Empty;
|
||||
var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.ActionPlanListId);
|
||||
if (getAtt != null)
|
||||
{
|
||||
this.divC.InnerHtml = UploadAttachmentService.ShowAttachment("../../", getAtt.AttachUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.trAtt.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user