fix:危大工程
This commit is contained in:
@@ -50,6 +50,7 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpAddress, this.CurrUser.LoginProjectId, false);
|
||||
//类型
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpHazardType, ConstValue.Group_LargerHazardType, true);
|
||||
//是否需要专家论证
|
||||
@@ -61,12 +62,17 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
if (largerHazard != null)
|
||||
{
|
||||
this.ProjectId = largerHazard.ProjectId;
|
||||
this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.HazardId);
|
||||
// this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.HazardId);
|
||||
this.txtLargerHazardCode.Text = largerHazard.HazardCode;
|
||||
if (!string.IsNullOrEmpty(largerHazard.HazardType))
|
||||
{
|
||||
this.drpHazardType.SelectedValue = largerHazard.HazardType;
|
||||
}
|
||||
this.txtAddress.Text = largerHazard.Address;
|
||||
if (!string.IsNullOrEmpty(largerHazard.Address))
|
||||
{
|
||||
this.drpAddress.SelectedValue = largerHazard.Address;
|
||||
}
|
||||
// this.txtAddress.Text = largerHazard.Address;
|
||||
if (largerHazard.ExpectedTime != null)
|
||||
{
|
||||
this.txtExpectedTime.Text = string.Format("{0:yyyy-MM-dd}", largerHazard.ExpectedTime);
|
||||
@@ -102,7 +108,7 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectLargerHazardListMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
// this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectLargerHazardListMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.txtExpectedTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.txtRemark.Text = HttpUtility.HtmlDecode("描述");
|
||||
this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}",DateTime.Now);
|
||||
@@ -124,6 +130,45 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
ShowNotify("请选择类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpStates.SelectedValue != "1")
|
||||
{
|
||||
//判断附件是否必传
|
||||
if (!returnFj(this.HazardId + "_1"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件1-论证后的方案", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!returnFj(this.HazardId + "_2"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件2-专家论证报告", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!returnFj(this.HazardId + "_3"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件3-论证会签到表", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!returnFj(this.HazardId + "_4"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件4-论证会会议照片", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!returnFj(this.HazardId + "_5"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件5-方案交底记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!returnFj(this.HazardId + "_6"))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件6-方案交底会议照片", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
@@ -139,7 +184,8 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
HazardCode = this.txtLargerHazardCode.Text.Trim(),
|
||||
HazardType = this.drpHazardType.SelectedValue,
|
||||
Address = this.txtAddress.Text.Trim(),
|
||||
// Address = this.txtAddress.Text.Trim(),
|
||||
Address = this.drpAddress.SelectedValue,
|
||||
ExpectedTime = Funs.GetNewDateTime(this.txtExpectedTime.Text.Trim()),
|
||||
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
|
||||
IsSuperLargerHazard = Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue),
|
||||
@@ -180,7 +226,81 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId, BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
|
||||
//菜单id和质量危大保持一致
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_1", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
protected void btnAttach_Click2(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_2", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
protected void btnAttach_Click3(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_3", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
protected void btnAttach_Click4(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_4", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
protected void btnAttach_Click5(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_5", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
protected void btnAttach_Click6(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}",
|
||||
this.HazardId+"_6", BLL.Const.MajorPlanApprovalMenuId)));
|
||||
}
|
||||
|
||||
private bool returnFj(string id) {
|
||||
bool isT = true;
|
||||
var model = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == id);
|
||||
if (model==null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return isT;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -190,7 +310,8 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
HazardCode = this.txtLargerHazardCode.Text.Trim(),
|
||||
HazardType = this.drpHazardType.SelectedValue,
|
||||
Address = this.txtAddress.Text.Trim(),
|
||||
// Address = this.txtAddress.Text.Trim(),
|
||||
Address = this.drpAddress.SelectedValue,
|
||||
ExpectedTime = Funs.GetNewDateTime(this.txtExpectedTime.Text.Trim()),
|
||||
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
|
||||
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
|
||||
|
||||
Reference in New Issue
Block a user