2023-2-16

This commit is contained in:
李超 2023-03-16 19:28:52 +08:00
parent 30e0673db6
commit ba4e383388
42 changed files with 1442 additions and 1766 deletions

View File

@ -32,6 +32,7 @@ namespace BLL
newFile.Remark = file.Remark; newFile.Remark = file.Remark;
newFile.AttachUrl = file.AttachUrl; newFile.AttachUrl = file.AttachUrl;
newFile.ToMenu = file.ToMenu; newFile.ToMenu = file.ToMenu;
newFile.ProjectId = file.ProjectId;
Funs.DB.Common_FileManager.InsertOnSubmit(newFile); Funs.DB.Common_FileManager.InsertOnSubmit(newFile);
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
} }
@ -50,6 +51,7 @@ namespace BLL
newFile.UploadDate = file.UploadDate; newFile.UploadDate = file.UploadDate;
newFile.ToMenu = file.ToMenu; newFile.ToMenu = file.ToMenu;
newFile.Remark = file.Remark; newFile.Remark = file.Remark;
newFile.ProjectId = file.ProjectId;
newFile.AttachUrl = file.AttachUrl; newFile.AttachUrl = file.AttachUrl;
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
} }

View File

@ -58,13 +58,13 @@
<asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("UnitName")) %>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("UnitName")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%-- <f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%-- <f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDetailsId" DataIFrameUrlFormatString="./DesignDetailsApprove.aspx?Id={0}"/> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDetailsId" DataIFrameUrlFormatString="./DesignDetailsApprove.aspx?Id={0}"/> --%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"

View File

@ -113,15 +113,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label1; protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -52,7 +52,7 @@
<f:FormRow MarginTop="10px"> <%-- <f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
@ -77,7 +77,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
</Rows> </Rows>
<Toolbars> <Toolbars>
@ -88,8 +88,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -38,11 +38,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false);
BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
this.DesignDetailsId = Request.Params["DesignDetailsId"]; this.DesignDetailsId = Request.Params["DesignDetailsId"];
Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId); Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId);
if (designDetails != null) if (designDetails != null)
@ -74,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDetails.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDetails.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
@ -82,9 +82,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//审核状态不可编辑 //审核状态不可编辑
Readonly(); Readonly();
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -92,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (designDetails.Status == BLL.Const.Comprehensive_Compile && designDetails.CompileMan == CurrUser.UserId) if (designDetails.Status == BLL.Const.Comprehensive_Compile && designDetails.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -103,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
this.txtDetailsDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtDetailsDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
} }
} }
} }
@ -121,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpUnitIds.Readonly = true; this.drpUnitIds.Readonly = true;
this.drpUnitWorks.Readonly = true; this.drpUnitWorks.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false; //this.btnAttach.Enabled = false;
@ -142,10 +142,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
#endregion #endregion
@ -165,10 +165,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails(); Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
designDetails.ProjectId = this.CurrUser.LoginProjectId; designDetails.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
designDetails.AuditMan = drpAudit.SelectedValue; // designDetails.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ {
designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
@ -246,192 +246,192 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) // if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return; // return;
} // }
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails(); // Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
designDetails.ProjectId = this.CurrUser.LoginProjectId; // designDetails.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
designDetails.AuditMan = drpAudit.SelectedValue; // designDetails.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) // if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ // {
designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; // designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
} // }
designDetails.DesignDetailsCode = this.txtDesignDetailsCode.Text.Trim(); // designDetails.DesignDetailsCode = this.txtDesignDetailsCode.Text.Trim();
designDetails.DetailsMan = this.txtDetailsMan.Text.Trim(); // designDetails.DetailsMan = this.txtDetailsMan.Text.Trim();
if (!string.IsNullOrEmpty(this.txtDetailsDate.Text)) // if (!string.IsNullOrEmpty(this.txtDetailsDate.Text))
{ // {
designDetails.DetailsDate = Convert.ToDateTime(this.txtDetailsDate.Text); // designDetails.DetailsDate = Convert.ToDateTime(this.txtDetailsDate.Text);
} // }
string ids = string.Empty; // string ids = string.Empty;
var lists = this.drpUnitWorks.SelectedValueArray; // var lists = this.drpUnitWorks.SelectedValueArray;
foreach (var item in lists) // foreach (var item in lists)
{ // {
ids += item + ","; // ids += item + ",";
} // }
if (!string.IsNullOrEmpty(ids)) // if (!string.IsNullOrEmpty(ids))
{ // {
ids = ids.Substring(0, ids.LastIndexOf(",")); // ids = ids.Substring(0, ids.LastIndexOf(","));
} // }
designDetails.UnitWorkId = ids; // designDetails.UnitWorkId = ids;
string unitIds = string.Empty; // string unitIds = string.Empty;
var units = this.drpUnitIds.SelectedValueArray; // var units = this.drpUnitIds.SelectedValueArray;
foreach (var item in units) // foreach (var item in units)
{ // {
unitIds += item + ","; // unitIds += item + ",";
} // }
if (!string.IsNullOrEmpty(unitIds)) // if (!string.IsNullOrEmpty(unitIds))
{ // {
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); // unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
} // }
designDetails.UnitName = unitIds; // designDetails.UnitName = unitIds;
if (string.IsNullOrEmpty(this.DesignDetailsId)) // if (string.IsNullOrEmpty(this.DesignDetailsId))
{ // {
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) // if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{ // {
designDetails.DesignDetailsId = this.hdAttachUrl.Text; // designDetails.DesignDetailsId = this.hdAttachUrl.Text;
} // }
else // else
{ // {
designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails)); // designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
this.hdAttachUrl.Text = designDetails.DesignDetailsId; // this.hdAttachUrl.Text = designDetails.DesignDetailsId;
} // }
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDetails.DesignDetailsId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDetails.DesignDetailsId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
designDetails.CompileMan = this.CurrUser.UserId; // designDetails.CompileMan = this.CurrUser.UserId;
designDetails.CompileDate = DateTime.Now; // designDetails.CompileDate = DateTime.Now;
designDetails.Status = BLL.Const.Comprehensive_Audit; // designDetails.Status = BLL.Const.Comprehensive_Audit;
BLL.DesignDetailsService.AddDesignDetails(designDetails); // BLL.DesignDetailsService.AddDesignDetails(designDetails);
} // }
else // else
{ // {
designDetails.DesignDetailsId = this.DesignDetailsId; // designDetails.DesignDetailsId = this.DesignDetailsId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDetailsId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDetailsId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
var oldDesignDetails = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault(); // var oldDesignDetails = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault();
if (oldDesignDetails == null) //数据库没有记录 直接点提交 当前状态为 审核状态 // if (oldDesignDetails == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{ // {
designDetails.CompileMan = this.CurrUser.UserId; // designDetails.CompileMan = this.CurrUser.UserId;
designDetails.CompileDate = DateTime.Now; // designDetails.CompileDate = DateTime.Now;
designDetails.Status = BLL.Const.Comprehensive_Audit; // designDetails.Status = BLL.Const.Comprehensive_Audit;
BLL.DesignDetailsService.AddDesignDetails(designDetails); // BLL.DesignDetailsService.AddDesignDetails(designDetails);
} // }
else // else
{ // {
designDetails.CompileMan = oldDesignDetails.CompileMan; // designDetails.CompileMan = oldDesignDetails.CompileMan;
designDetails.CompileDate = oldDesignDetails.CompileDate; // designDetails.CompileDate = oldDesignDetails.CompileDate;
if (oldDesignDetails.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 // if (oldDesignDetails.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{ // {
designDetails.Status = BLL.Const.Comprehensive_Audit; // designDetails.Status = BLL.Const.Comprehensive_Audit;
} // }
else if (oldDesignDetails.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 // else if (oldDesignDetails.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{ // {
designDetails.Status = BLL.Const.Comprehensive_Audit; // designDetails.Status = BLL.Const.Comprehensive_Audit;
} // }
else //审核状态 提交 变 完成 或者 重新编制 // else //审核状态 提交 变 完成 或者 重新编制
{ // {
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) // if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{ // {
designDetails.Status = BLL.Const.Comprehensive_Complete; // designDetails.Status = BLL.Const.Comprehensive_Complete;
} // }
else // else
{ // {
designDetails.Status = BLL.Const.Comprehensive_ReCompile; // designDetails.Status = BLL.Const.Comprehensive_ReCompile;
} // }
} // }
BLL.DesignDetailsService.UpdateDesignDetails(designDetails); // BLL.DesignDetailsService.UpdateDesignDetails(designDetails);
} // }
} // }
#region // #region 审核记录
var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId); // var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId);
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // if (currApprove == null) //为获取到为 当前编制状态 直接提交
{ // {
var approve = new Model.Comprehensive_DesignDetailsApprove(); // var approve = new Model.Comprehensive_DesignDetailsApprove();
approve.DesignDetailsId = designDetails.DesignDetailsId; // approve.DesignDetailsId = designDetails.DesignDetailsId;
approve.ApproveMan = this.CurrUser.UserId; // approve.ApproveMan = this.CurrUser.UserId;
approve.ApproveType = Const.Comprehensive_Compile; // approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now; // approve.ApproveDate = DateTime.Now;
DesignDetailsApproveService.EditApprove(approve); //新增编制记录 // DesignDetailsApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove(); // Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
newApprove.DesignDetailsId = designDetails.DesignDetailsId; // newApprove.DesignDetailsId = designDetails.DesignDetailsId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else if (currApprove.ApproveMan == CurrUser.UserId) // else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
DesignDetailsApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // DesignDetailsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove(); // Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
newApprove.DesignDetailsId = designDetails.DesignDetailsId; // newApprove.DesignDetailsId = designDetails.DesignDetailsId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
DesignDetailsApproveService.EditApprove(currApprove); // DesignDetailsApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove(); // Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
reApprove.DesignDetailsId = currApprove.DesignDetailsId; // reApprove.DesignDetailsId = currApprove.DesignDetailsId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
// reApprove.ApproveIdea = txtidea.Text; // // reApprove.ApproveIdea = txtidea.Text;
DesignDetailsApproveService.EditApprove(reApprove); // DesignDetailsApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove(); // Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
reApprove.DesignDetailsId = currApprove.DesignDetailsId; // reApprove.DesignDetailsId = currApprove.DesignDetailsId;
reApprove.ApproveMan = designDetails.CompileMan; // reApprove.ApproveMan = designDetails.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
DesignDetailsApproveService.EditApprove(reApprove); // DesignDetailsApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} //}
#endregion #endregion

View File

@ -122,51 +122,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -194,15 +149,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -86,14 +86,14 @@
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%-- <f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%-- <f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionEquipmentId" DataIFrameUrlFormatString="./InspectionEquipmentApprove.aspx?InspectionEquipmentId={0}" /> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionEquipmentId" DataIFrameUrlFormatString="./InspectionEquipmentApprove.aspx?InspectionEquipmentId={0}" />--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left"> <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate> <ItemTemplate>

View File

@ -140,15 +140,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex; protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -80,9 +80,9 @@
<f:FormRow MarginTop="10px"> <%-- <f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow> </f:FormRow>
@ -103,7 +103,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
@ -116,8 +116,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%-- <f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -40,10 +40,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
BLL.InspectionEquipmentService.InitAttributeDropDownList(this.drpAttribute, true); BLL.InspectionEquipmentService.InitAttributeDropDownList(this.drpAttribute, true);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"]; this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"];
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId); var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
if (inspectionEquipment != null) if (inspectionEquipment != null)
@ -86,7 +86,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionEquipment.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionEquipment.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType== BLL.Const.Comprehensive_Audit&&currApprove.ApproveMan== CurrUser.UserId) else if (currApprove.ApproveType== BLL.Const.Comprehensive_Audit&&currApprove.ApproveMan== CurrUser.UserId)
@ -103,13 +103,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtRemarkCode.Readonly = true; this.txtRemarkCode.Readonly = true;
this.txtEquipmentNo.Readonly = true; this.txtEquipmentNo.Readonly = true;
this.txtUsedPlace.Readonly = true; this.txtUsedPlace.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
this.txtSamplingCount.Readonly = true; this.txtSamplingCount.Readonly = true;
this.txtCounts.Readonly = true; this.txtCounts.Readonly = true;
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -117,7 +117,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if(inspectionEquipment.Status == BLL.Const.Comprehensive_Compile && inspectionEquipment.CompileMan == CurrUser.UserId) if(inspectionEquipment.Status == BLL.Const.Comprehensive_Compile && inspectionEquipment.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; // this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -172,7 +172,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; // this.btnSubmit.Hidden = false;
} }
} }
} }
@ -193,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtRemarkCode.Readonly = true; this.txtRemarkCode.Readonly = true;
this.txtEquipmentNo.Readonly = true; this.txtEquipmentNo.Readonly = true;
this.txtUsedPlace.Readonly = true; this.txtUsedPlace.Readonly = true;
this.drpAudit.Readonly = true; // this.drpAudit.Readonly = true;
this.txtSamplingCount.Readonly = true; this.txtSamplingCount.Readonly = true;
this.txtCounts.Readonly = true; this.txtCounts.Readonly = true;
//this.btnAttach.Enabled = false; //this.btnAttach.Enabled = false;
@ -207,19 +207,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
public void LoadAuditSelect() public void LoadAuditSelect()
{ {
var db = Funs.DB; //var db = Funs.DB;
var userList = from x in db.Sys_User //var userList = from x in db.Sys_User
join y in db.Project_ProjectUnit // join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId // on x.UnitId equals y.UnitId
join p in db.Project_ProjectUser // join p in db.Project_ProjectUser
on x.UserId equals p.UserId // on x.UserId equals p.UserId
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId // where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) // where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; // select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
#endregion #endregion
@ -255,10 +255,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim(); newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
newInspectionEquipment.AuditMan = drpAudit.SelectedValue; // newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (this.drpAttribute.SelectedValue != BLL.Const._Null) if (this.drpAttribute.SelectedValue != BLL.Const._Null)
{ {
@ -354,181 +354,181 @@ namespace FineUIPro.Web.CQMS.Comprehensive
#endregion #endregion
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (this.drpUnitId.SelectedValue == BLL.Const._Null) // if (this.drpUnitId.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return; // return;
} // }
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment(); // Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId; // newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue; // newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue;
newInspectionEquipment.InspectionCode = this.txtInspectionCode.Text.Trim(); // newInspectionEquipment.InspectionCode = this.txtInspectionCode.Text.Trim();
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) // if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ // {
newInspectionEquipment.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; // newInspectionEquipment.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
} // }
newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim(); // newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim();
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim(); // newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim(); // newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim(); // newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim(); // newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.Counts = this.txtCounts.Text.Trim(); // newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); // newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim(); // newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
newInspectionEquipment.AuditMan = drpAudit.SelectedValue; // newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (this.drpAttribute.SelectedValue != BLL.Const._Null) // if (this.drpAttribute.SelectedValue != BLL.Const._Null)
{ // {
newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue; // newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue;
} // }
if (this.drpSamplingResult.SelectedValue != BLL.Const._Null) // if (this.drpSamplingResult.SelectedValue != BLL.Const._Null)
{ // {
newInspectionEquipment.SamplingResult = this.drpSamplingResult.SelectedValue; // newInspectionEquipment.SamplingResult = this.drpSamplingResult.SelectedValue;
} // }
if (!string.IsNullOrEmpty(this.txtInspectionDate.Text)) // if (!string.IsNullOrEmpty(this.txtInspectionDate.Text))
{ // {
newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text); // newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text);
} // }
if (string.IsNullOrEmpty(this.InspectionEquipmentId)) // if (string.IsNullOrEmpty(this.InspectionEquipmentId))
{ // {
newInspectionEquipment.CompileMan = this.CurrUser.UserId; // newInspectionEquipment.CompileMan = this.CurrUser.UserId;
newInspectionEquipment.CompileDate = DateTime.Now; // newInspectionEquipment.CompileDate = DateTime.Now;
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; // newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); // newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == newInspectionEquipment.InspectionEquipmentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == newInspectionEquipment.InspectionEquipmentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); // BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
} // }
else // else
{ // {
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionEquipmentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionEquipmentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId; // newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId;
var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault(); // var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
if (oldInspectionEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态 // if (oldInspectionEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{ // {
newInspectionEquipment.CompileMan = this.CurrUser.UserId; // newInspectionEquipment.CompileMan = this.CurrUser.UserId;
newInspectionEquipment.CompileDate = DateTime.Now; // newInspectionEquipment.CompileDate = DateTime.Now;
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; // newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); // BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
} // }
else // else
{ // {
newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan; // newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan;
newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate; // newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate;
if(oldInspectionEquipment.Status==BLL.Const.Comprehensive_Compile)//编制状态提交变审核 // if(oldInspectionEquipment.Status==BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{ // {
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; // newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
} // }
else if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 // else if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{ // {
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; // newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
} // }
else //审核状态 提交 变 完成 或者 重新编制 // else //审核状态 提交 变 完成 或者 重新编制
{ // {
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) // if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{ // {
newInspectionEquipment.Status = BLL.Const.Comprehensive_Complete; // newInspectionEquipment.Status = BLL.Const.Comprehensive_Complete;
} // }
else // else
{ // {
newInspectionEquipment.Status = BLL.Const.Comprehensive_ReCompile; // newInspectionEquipment.Status = BLL.Const.Comprehensive_ReCompile;
} // }
} // }
BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment); // BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment);
} // }
} // }
#region // #region 审核记录
var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(newInspectionEquipment.InspectionEquipmentId); // var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(newInspectionEquipment.InspectionEquipmentId);
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // if (currApprove == null) //为获取到为 当前编制状态 直接提交
{ // {
var approve = new Model.Comprehensive_InspectionEquipmentApprove(); // var approve = new Model.Comprehensive_InspectionEquipmentApprove();
approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; // approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
approve.ApproveMan = this.CurrUser.UserId; // approve.ApproveMan = this.CurrUser.UserId;
approve.ApproveType = Const.Comprehensive_Compile; // approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now; // approve.ApproveDate = DateTime.Now;
InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录 // InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove(); // Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; // newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
}else if (currApprove.ApproveMan == CurrUser.UserId) // }else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
InspectionEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // InspectionEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove(); // Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; // newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
InspectionEquipmentApproveService.EditApprove(currApprove); // InspectionEquipmentApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove(); // Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId; // reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
//reApprove.ApproveIdea = txtidea.Text; // //reApprove.ApproveIdea = txtidea.Text;
InspectionEquipmentApproveService.EditApprove(reApprove); // InspectionEquipmentApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove(); // Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId; // reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
reApprove.ApproveMan = newInspectionEquipment.CompileMan; // reApprove.ApproveMan = newInspectionEquipment.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
InspectionEquipmentApproveService.EditApprove(reApprove); // InspectionEquipmentApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} //}
#region #region

View File

@ -194,51 +194,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -266,15 +221,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -81,13 +81,13 @@
<f:RenderField ColumnID="ResponsibleMan" DataField="ResponsibleMan" FieldType="String" HeaderText="责任人" TextAlign="Center" <f:RenderField ColumnID="ResponsibleMan" DataField="ResponsibleMan" FieldType="String" HeaderText="责任人" TextAlign="Center"
HeaderTextAlign="Center" Width="110px"> HeaderTextAlign="Center" Width="110px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%-- <f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="NCRManagementId" DataIFrameUrlFormatString="./NCRManagementApprove.aspx?Id={0}"/> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="NCRManagementId" DataIFrameUrlFormatString="./NCRManagementApprove.aspx?Id={0}"/>--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"

View File

@ -140,15 +140,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label3; protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -74,7 +74,7 @@
<f:FormRow MarginTop="10px"> <%--<f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
@ -99,7 +99,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
</Rows> </Rows>
<Toolbars> <Toolbars>
@ -110,8 +110,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -40,11 +40,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.UnitService.InitUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true); BLL.UnitService.InitUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true);
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
this.NCRManagementId = Request.Params["NCRManagementId"]; this.NCRManagementId = Request.Params["NCRManagementId"];
Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId); Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId);
if (nCRManagement != null) if (nCRManagement != null)
@ -90,7 +90,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && nCRManagement.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && nCRManagement.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
@ -98,9 +98,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//审核状态不可编辑 //审核状态不可编辑
Readonly(); Readonly();
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -108,7 +108,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (nCRManagement.Status == BLL.Const.Comprehensive_Compile && nCRManagement.CompileMan == CurrUser.UserId) if (nCRManagement.Status == BLL.Const.Comprehensive_Compile && nCRManagement.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -121,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtClosedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtClosedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
} }
} }
} }
@ -143,7 +143,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpSendUnit.Readonly = true; this.drpSendUnit.Readonly = true;
this.drpUnitIds.Readonly = true; this.drpUnitIds.Readonly = true;
this.drpUnitWorkIds.Readonly = true; this.drpUnitWorkIds.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false; //this.btnAttach.Enabled = false;
@ -155,19 +155,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
public void LoadAuditSelect() public void LoadAuditSelect()
{ {
var db = Funs.DB; //var db = Funs.DB;
var userList = from x in db.Sys_User //var userList = from x in db.Sys_User
join y in db.Project_ProjectUnit // join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId // on x.UnitId equals y.UnitId
join p in db.Project_ProjectUser // join p in db.Project_ProjectUser
on x.UserId equals p.UserId // on x.UserId equals p.UserId
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId // where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) // where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; // select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
@ -193,10 +193,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement(); Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
nCRManagement.ProjectId = this.CurrUser.LoginProjectId; nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
nCRManagement.AuditMan = drpAudit.SelectedValue; // nCRManagement.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (this.drpSendUnit.SelectedValue != BLL.Const._Null) if (this.drpSendUnit.SelectedValue != BLL.Const._Null)
{ {
nCRManagement.SendUnit = this.drpSendUnit.SelectedValue; nCRManagement.SendUnit = this.drpSendUnit.SelectedValue;
@ -290,206 +290,206 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (this.drpSendUnit.SelectedValue == BLL.Const._Null) // if (this.drpSendUnit.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning);
return; // return;
} // }
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) // if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return; // return;
} // }
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement(); // Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
nCRManagement.ProjectId = this.CurrUser.LoginProjectId; // nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
nCRManagement.AuditMan = drpAudit.SelectedValue; // nCRManagement.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (this.drpSendUnit.SelectedValue != BLL.Const._Null) // if (this.drpSendUnit.SelectedValue != BLL.Const._Null)
{ // {
nCRManagement.SendUnit = this.drpSendUnit.SelectedValue; // nCRManagement.SendUnit = this.drpSendUnit.SelectedValue;
} // }
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) // if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ // {
nCRManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; // nCRManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
} // }
nCRManagement.NCRCode = this.txtNCRCode.Text.Trim(); // nCRManagement.NCRCode = this.txtNCRCode.Text.Trim();
nCRManagement.Contents = this.txtContents.Text.Trim(); // nCRManagement.Contents = this.txtContents.Text.Trim();
if (!string.IsNullOrEmpty(this.txtIssuedDate.Text)) // if (!string.IsNullOrEmpty(this.txtIssuedDate.Text))
{ // {
nCRManagement.IssuedDate = Convert.ToDateTime(this.txtIssuedDate.Text); // nCRManagement.IssuedDate = Convert.ToDateTime(this.txtIssuedDate.Text);
} // }
if (!string.IsNullOrEmpty(this.txtClosedDate.Text)) // if (!string.IsNullOrEmpty(this.txtClosedDate.Text))
{ // {
nCRManagement.ClosedDate = Convert.ToDateTime(this.txtClosedDate.Text); // nCRManagement.ClosedDate = Convert.ToDateTime(this.txtClosedDate.Text);
} // }
if (!string.IsNullOrEmpty(this.txtCompleteDate.Text)) // if (!string.IsNullOrEmpty(this.txtCompleteDate.Text))
{ // {
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text); // nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
} // }
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim(); // nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim(); // nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
string ids = string.Empty; // string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray; // var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists) // foreach (var item in lists)
{ // {
ids += item + ","; // ids += item + ",";
} // }
if (!string.IsNullOrEmpty(ids)) // if (!string.IsNullOrEmpty(ids))
{ // {
ids = ids.Substring(0, ids.LastIndexOf(",")); // ids = ids.Substring(0, ids.LastIndexOf(","));
} // }
nCRManagement.UnitWorkId = ids; // nCRManagement.UnitWorkId = ids;
// string unitIds = string.Empty;
// var unitList = this.drpUnitIds.SelectedValueArray;
// foreach (var item in unitList)
// {
// unitIds += item + ",";
// }
// if (!string.IsNullOrEmpty(unitIds))
// {
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
// }
// nCRManagement.ReceiveUnit = unitIds;
// if (string.IsNullOrEmpty(this.NCRManagementId))
// {
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
// {
// nCRManagement.NCRManagementId = this.hdAttachUrl.Text;
// }
// else
// {
// nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
// this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
// }
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
// }
// nCRManagement.CompileMan = this.CurrUser.UserId;
// nCRManagement.Status = BLL.Const.Comprehensive_Audit;
// BLL.NCRManagementService.AddNCRManagement(nCRManagement);
// }
// else
// {
// nCRManagement.NCRManagementId = this.NCRManagementId;
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
// }
// //BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
// var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
// if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
// {
// nCRManagement.CompileMan = this.CurrUser.UserId;
// nCRManagement.Status = BLL.Const.Comprehensive_Audit;
// BLL.NCRManagementService.AddNCRManagement(nCRManagement);
// }
// else
// {
// nCRManagement.CompileMan = oldNCRManagement.CompileMan;
// if (oldNCRManagement.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// nCRManagement.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (oldNCRManagement.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// nCRManagement.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// nCRManagement.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// nCRManagement.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
string unitIds = string.Empty;
var unitList = this.drpUnitIds.SelectedValueArray;
foreach (var item in unitList)
{
unitIds += item + ",";
}
if (!string.IsNullOrEmpty(unitIds))
{
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
nCRManagement.ReceiveUnit = unitIds;
if (string.IsNullOrEmpty(this.NCRManagementId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{
nCRManagement.NCRManagementId = this.hdAttachUrl.Text;
}
else
{
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
}
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return;
}
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
}
else
{
nCRManagement.NCRManagementId = this.NCRManagementId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return;
}
// BLL.NCRManagementService.UpdateNCRManagement(nCRManagement); // BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
}
else
{
nCRManagement.CompileMan = oldNCRManagement.CompileMan;
if (oldNCRManagement.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
}
else if (oldNCRManagement.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
}
else //审核状态 提交 变 完成 或者 重新编制
{
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{
nCRManagement.Status = BLL.Const.Comprehensive_Complete;
}
else
{
nCRManagement.Status = BLL.Const.Comprehensive_ReCompile;
}
}
BLL.NCRManagementService.UpdateNCRManagement(nCRManagement); // }
} // }
// #region 审核记录
} // var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
#region // if (currApprove == null) //为获取到为 当前编制状态 直接提交
// {
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId); // var approve = new Model.Comprehensive_NCRManagementApprove();
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // approve.NCRManagementId = nCRManagement.NCRManagementId;
{ // approve.ApproveMan = this.CurrUser.UserId;
var approve = new Model.Comprehensive_NCRManagementApprove(); // approve.ApproveType = Const.Comprehensive_Compile;
approve.NCRManagementId = nCRManagement.NCRManagementId; // approve.ApproveDate = DateTime.Now;
approve.ApproveMan = this.CurrUser.UserId; // NCRManagementApproveService.EditApprove(approve); //新增编制记录
approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now;
NCRManagementApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove(); // Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
newApprove.NCRManagementId = nCRManagement.NCRManagementId; // newApprove.NCRManagementId = nCRManagement.NCRManagementId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else if (currApprove.ApproveMan == CurrUser.UserId) // else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
NCRManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // NCRManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove(); // Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
newApprove.NCRManagementId = nCRManagement.NCRManagementId; // newApprove.NCRManagementId = nCRManagement.NCRManagementId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
NCRManagementApproveService.EditApprove(currApprove); // NCRManagementApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove(); // Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
reApprove.NCRManagementId = currApprove.NCRManagementId; // reApprove.NCRManagementId = currApprove.NCRManagementId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
// reApprove.ApproveIdea = txtidea.Text; // // reApprove.ApproveIdea = txtidea.Text;
NCRManagementApproveService.EditApprove(reApprove); // NCRManagementApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove(); // Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
reApprove.NCRManagementId = currApprove.NCRManagementId; // reApprove.NCRManagementId = currApprove.NCRManagementId;
reApprove.ApproveMan = nCRManagement.CompileMan; // reApprove.ApproveMan = nCRManagement.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
NCRManagementApproveService.EditApprove(reApprove); // NCRManagementApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} //}
#endregion #endregion
#region #region

View File

@ -167,51 +167,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -239,15 +194,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -61,13 +61,13 @@
<f:RenderField ColumnID="IssuedReportNumber" DataField="IssuedReportNumber" FieldType="String" HeaderText="已初具监检报告条数" TextAlign="Center" <f:RenderField ColumnID="IssuedReportNumber" DataField="IssuedReportNumber" FieldType="String" HeaderText="已初具监检报告条数" TextAlign="Center"
HeaderTextAlign="Center" Width="180px"> HeaderTextAlign="Center" Width="180px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%-- <f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}"/> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}"/>--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"

View File

@ -95,15 +95,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex; protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -53,7 +53,7 @@
</f:FormRow> </f:FormRow>
<f:FormRow MarginTop="10px"> <%-- <f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
@ -77,7 +77,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
</Rows> </Rows>
<Toolbars> <Toolbars>
@ -88,8 +88,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -37,11 +37,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
GetButtonPower(); GetButtonPower();
BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true); BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
this.PressurePipeId = Request.Params["PressurePipeId"]; this.PressurePipeId = Request.Params["PressurePipeId"];
Model.Comprehensive_PressurePipe pressurePipe = BLL.PressurePipeService.GetPressurePipeById(this.PressurePipeId); Model.Comprehensive_PressurePipe pressurePipe = BLL.PressurePipeService.GetPressurePipeById(this.PressurePipeId);
if (pressurePipe != null) if (pressurePipe != null)
@ -65,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
@ -73,9 +73,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//审核状态不可编辑 //审核状态不可编辑
Readonly(); Readonly();
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -83,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId) if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -93,7 +93,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else else
{ {
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
} }
} }
} }
@ -112,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtPressurePipeNumber.Readonly = true; this.txtPressurePipeNumber.Readonly = true;
this.drpUnit.Readonly = true; this.drpUnit.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false; //this.btnAttach.Enabled = false;
@ -125,19 +125,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
public void LoadAuditSelect() public void LoadAuditSelect()
{ {
var db = Funs.DB; //var db = Funs.DB;
var userList = from x in db.Sys_User //var userList = from x in db.Sys_User
join y in db.Project_ProjectUnit // join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId // on x.UnitId equals y.UnitId
join p in db.Project_ProjectUser // join p in db.Project_ProjectUser
on x.UserId equals p.UserId // on x.UserId equals p.UserId
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId // where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) // where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; // select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
#endregion #endregion
@ -157,10 +157,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe(); Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
pressurePipe.Projctid = this.CurrUser.LoginProjectId; pressurePipe.Projctid = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
pressurePipe.AuditMan = drpAudit.SelectedValue; // pressurePipe.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text)) if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text))
{ {
pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text); pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text);
@ -234,184 +234,184 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (drpUnit.SelectedValue == BLL.Const._Null) // if (drpUnit.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return; // return;
} // }
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe(); // Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
pressurePipe.Projctid = this.CurrUser.LoginProjectId; // pressurePipe.Projctid = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
pressurePipe.AuditMan = drpAudit.SelectedValue; // pressurePipe.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text)) // if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text))
{ // {
pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text); // pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text);
} // }
if (this.drpUnit.SelectedValue != BLL.Const._Null) // if (this.drpUnit.SelectedValue != BLL.Const._Null)
{ // {
pressurePipe.UnitId = this.drpUnit.SelectedValue; // pressurePipe.UnitId = this.drpUnit.SelectedValue;
} // }
if (!string.IsNullOrEmpty(this.txtActualNumber.Text)) // if (!string.IsNullOrEmpty(this.txtActualNumber.Text))
{ // {
pressurePipe.ActualNumber = Convert.ToInt32(this.txtActualNumber.Text); // pressurePipe.ActualNumber = Convert.ToInt32(this.txtActualNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtPackageNumber.Text)) // if (!string.IsNullOrEmpty(this.txtPackageNumber.Text))
{ // {
pressurePipe.PackageNumber = Convert.ToInt32(this.txtPackageNumber.Text); // pressurePipe.PackageNumber = Convert.ToInt32(this.txtPackageNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtCompletePackageNumber.Text)) // if (!string.IsNullOrEmpty(this.txtCompletePackageNumber.Text))
{ // {
pressurePipe.CompletePackageNumber = Convert.ToInt32(this.txtCompletePackageNumber.Text); // pressurePipe.CompletePackageNumber = Convert.ToInt32(this.txtCompletePackageNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtPressurePipeNumber.Text)) // if (!string.IsNullOrEmpty(this.txtPressurePipeNumber.Text))
{ // {
pressurePipe.PressurePipeNumber = Convert.ToInt32(this.txtPressurePipeNumber.Text); // pressurePipe.PressurePipeNumber = Convert.ToInt32(this.txtPressurePipeNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtIssuedReportNumber.Text)) // if (!string.IsNullOrEmpty(this.txtIssuedReportNumber.Text))
{ // {
pressurePipe.IssuedReportNumber = Convert.ToInt32(this.txtIssuedReportNumber.Text); // pressurePipe.IssuedReportNumber = Convert.ToInt32(this.txtIssuedReportNumber.Text);
} // }
if (string.IsNullOrEmpty(this.PressurePipeId)) // if (string.IsNullOrEmpty(this.PressurePipeId))
{ // {
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) // if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{ // {
pressurePipe.PressurePipeId = this.hdAttachUrl.Text; // pressurePipe.PressurePipeId = this.hdAttachUrl.Text;
} // }
else // else
{ // {
pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe)); // pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe));
this.hdAttachUrl.Text = pressurePipe.PressurePipeId; // this.hdAttachUrl.Text = pressurePipe.PressurePipeId;
} // }
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.PressurePipeId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.PressurePipeId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
pressurePipe.CompileMan = this.CurrUser.UserId; // pressurePipe.CompileMan = this.CurrUser.UserId;
pressurePipe.Status = BLL.Const.Comprehensive_Audit; // pressurePipe.Status = BLL.Const.Comprehensive_Audit;
BLL.PressurePipeService.AddPressurePipe(pressurePipe); // BLL.PressurePipeService.AddPressurePipe(pressurePipe);
} // }
else // else
{ // {
pressurePipe.PressurePipeId = this.PressurePipeId; // pressurePipe.PressurePipeId = this.PressurePipeId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.PressurePipeId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.PressurePipeId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
// // BLL.PressurePipeService.UpdatePressurePipe(pressurePipe);
// var oldPressurePipe = Funs.DB.Comprehensive_PressurePipe.Where(u => u.PressurePipeId == this.PressurePipeId).FirstOrDefault();
// if (oldPressurePipe == null) //数据库没有记录 直接点提交 当前状态为 审核状态
// {
// pressurePipe.CompileMan = this.CurrUser.UserId;
// //pressurePipe.CompileDate = DateTime.Now;
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// BLL.PressurePipeService.AddPressurePipe(pressurePipe);
// }
// else
// {
// pressurePipe.CompileMan = oldPressurePipe.CompileMan;
// //pressurePipe.CompileDate = oldPressurePipe.CompileDate;
// if (oldPressurePipe.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (oldPressurePipe.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// pressurePipe.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
// BLL.PressurePipeService.UpdatePressurePipe(pressurePipe); // BLL.PressurePipeService.UpdatePressurePipe(pressurePipe);
var oldPressurePipe = Funs.DB.Comprehensive_PressurePipe.Where(u => u.PressurePipeId == this.PressurePipeId).FirstOrDefault();
if (oldPressurePipe == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{
pressurePipe.CompileMan = this.CurrUser.UserId;
//pressurePipe.CompileDate = DateTime.Now;
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
BLL.PressurePipeService.AddPressurePipe(pressurePipe);
}
else
{
pressurePipe.CompileMan = oldPressurePipe.CompileMan;
//pressurePipe.CompileDate = oldPressurePipe.CompileDate;
if (oldPressurePipe.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
}
else if (oldPressurePipe.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
}
else //审核状态 提交 变 完成 或者 重新编制
{
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{
pressurePipe.Status = BLL.Const.Comprehensive_Complete;
}
else
{
pressurePipe.Status = BLL.Const.Comprehensive_ReCompile;
}
}
BLL.PressurePipeService.UpdatePressurePipe(pressurePipe); // }
} // }
// #region 审核记录
} // var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
#region // if (currApprove == null) //为获取到为 当前编制状态 直接提交
// {
var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId); // var approve = new Model.Comprehensive_PressurePipeApprove();
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // approve.PressurePipeId = pressurePipe.PressurePipeId;
{ // approve.ApproveMan = this.CurrUser.UserId;
var approve = new Model.Comprehensive_PressurePipeApprove(); // approve.ApproveType = Const.Comprehensive_Compile;
approve.PressurePipeId = pressurePipe.PressurePipeId; // approve.ApproveDate = DateTime.Now;
approve.ApproveMan = this.CurrUser.UserId; // PressurePipeApproveService.EditApprove(approve); //新增编制记录
approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now;
PressurePipeApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove(); // Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
newApprove.PressurePipeId = pressurePipe.PressurePipeId; // newApprove.PressurePipeId = pressurePipe.PressurePipeId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else if (currApprove.ApproveMan == CurrUser.UserId) // else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
PressurePipeApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // PressurePipeApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove(); // Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
newApprove.PressurePipeId = pressurePipe.PressurePipeId; // newApprove.PressurePipeId = pressurePipe.PressurePipeId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
PressurePipeApproveService.EditApprove(currApprove); // PressurePipeApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove(); // Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
reApprove.PressurePipeId = currApprove.PressurePipeId; // reApprove.PressurePipeId = currApprove.PressurePipeId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
// reApprove.ApproveIdea = txtidea.Text; // // reApprove.ApproveIdea = txtidea.Text;
PressurePipeApproveService.EditApprove(reApprove); // PressurePipeApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove(); // Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
reApprove.PressurePipeId = currApprove.PressurePipeId; // reApprove.PressurePipeId = currApprove.PressurePipeId;
reApprove.ApproveMan = pressurePipe.CompileMan; // reApprove.ApproveMan = pressurePipe.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
PressurePipeApproveService.EditApprove(reApprove); // PressurePipeApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} //}
#endregion #endregion

View File

@ -131,51 +131,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -203,15 +158,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -61,13 +61,13 @@
<f:RenderField ColumnID="CorrectiveActions" DataField="CorrectiveActions" FieldType="String" HeaderText="最终整改措施" TextAlign="Left" <f:RenderField ColumnID="CorrectiveActions" DataField="CorrectiveActions" FieldType="String" HeaderText="最终整改措施" TextAlign="Left"
HeaderTextAlign="Center" Width="250px"> HeaderTextAlign="Center" Width="250px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%--<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="QualityAccidentId" DataIFrameUrlFormatString="./QualityAccidentApprove.aspx?Id={0}"/> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="QualityAccidentId" DataIFrameUrlFormatString="./QualityAccidentApprove.aspx?Id={0}"/>--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"

View File

@ -86,15 +86,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label2; protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -63,7 +63,7 @@
<f:FormRow MarginTop="10px"> <%-- <f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
@ -87,7 +87,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
</Rows> </Rows>
<Toolbars> <Toolbars>
@ -103,8 +103,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%-- <f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -38,10 +38,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, false); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, false);
BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true); BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
this.QualityAccidentId = Request.Params["QualityAccidentId"]; this.QualityAccidentId = Request.Params["QualityAccidentId"];
Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId); Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId);
@ -66,7 +66,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
@ -74,9 +74,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//审核状态不可编辑 //审核状态不可编辑
Readonly(); Readonly();
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -84,7 +84,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId) if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -94,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
this.txtTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
} }
} }
} }
@ -112,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtTime.Readonly = true; this.txtTime.Readonly = true;
this.drpUnit.Readonly = true; this.drpUnit.Readonly = true;
this.drpUnitWorkId.Readonly = true; this.drpUnitWorkId.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false; //this.btnAttach.Enabled = false;
} }
@ -132,10 +132,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
#endregion #endregion
@ -151,10 +151,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident(); Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
pressurePipe.ProjectId = this.CurrUser.LoginProjectId; pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
pressurePipe.AuditMan = drpAudit.SelectedValue; // pressurePipe.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (!string.IsNullOrEmpty(this.txtTime.Text)) if (!string.IsNullOrEmpty(this.txtTime.Text))
{ {
pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text); pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text);
@ -230,185 +230,185 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (drpUnit.SelectedValue != BLL.Const._Null) // if (drpUnit.SelectedValue != BLL.Const._Null)
{ // {
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident(); // Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
pressurePipe.ProjectId = this.CurrUser.LoginProjectId; // pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
pressurePipe.AuditMan = drpAudit.SelectedValue; // pressurePipe.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (!string.IsNullOrEmpty(this.txtTime.Text)) // if (!string.IsNullOrEmpty(this.txtTime.Text))
{ // {
pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text); // pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text);
} // }
else // else
{ // {
pressurePipe.Time = DateTime.Now; // pressurePipe.Time = DateTime.Now;
} // }
pressurePipe.Place = this.txtPlace.Text; // pressurePipe.Place = this.txtPlace.Text;
pressurePipe.DirectEconomicLoss = this.txtDirectEconomicLoss.Text; // pressurePipe.DirectEconomicLoss = this.txtDirectEconomicLoss.Text;
pressurePipe.RemedialMeasures = this.txtRemedialMeasures.Text; // pressurePipe.RemedialMeasures = this.txtRemedialMeasures.Text;
pressurePipe.ResponsibilityDetermination = this.txtResponsibilityDetermination.Text; // pressurePipe.ResponsibilityDetermination = this.txtResponsibilityDetermination.Text;
pressurePipe.CorrectiveActions = this.txtCorrectiveActions.Text; // pressurePipe.CorrectiveActions = this.txtCorrectiveActions.Text;
pressurePipe.UnitId = this.drpUnit.SelectedValue; // pressurePipe.UnitId = this.drpUnit.SelectedValue;
string ids = string.Empty; // string ids = string.Empty;
var lists = this.drpUnitWorkId.SelectedValueArray; // var lists = this.drpUnitWorkId.SelectedValueArray;
foreach (var item in lists) // foreach (var item in lists)
{ // {
ids += item + ","; // ids += item + ",";
} // }
if (!string.IsNullOrEmpty(ids)) // if (!string.IsNullOrEmpty(ids))
{ // {
ids = ids.Substring(0, ids.LastIndexOf(",")); // ids = ids.Substring(0, ids.LastIndexOf(","));
} // }
pressurePipe.UnitWorkId = ids; // pressurePipe.UnitWorkId = ids;
if (string.IsNullOrEmpty(this.QualityAccidentId)) // if (string.IsNullOrEmpty(this.QualityAccidentId))
{ // {
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) // if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{ // {
pressurePipe.QualityAccidentId = this.hdAttachUrl.Text; // pressurePipe.QualityAccidentId = this.hdAttachUrl.Text;
} // }
else // else
{ // {
pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident)); // pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
this.hdAttachUrl.Text = pressurePipe.QualityAccidentId; // this.hdAttachUrl.Text = pressurePipe.QualityAccidentId;
} // }
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.QualityAccidentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.QualityAccidentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
pressurePipe.CompileMan = this.CurrUser.UserId; // pressurePipe.CompileMan = this.CurrUser.UserId;
pressurePipe.CompileDate = DateTime.Now; // pressurePipe.CompileDate = DateTime.Now;
pressurePipe.Status = BLL.Const.Comprehensive_Audit; // pressurePipe.Status = BLL.Const.Comprehensive_Audit;
BLL.QualityAccidentService.AddQualityAccident(pressurePipe); // BLL.QualityAccidentService.AddQualityAccident(pressurePipe);
} // }
else // else
{ // {
pressurePipe.QualityAccidentId = this.QualityAccidentId; // pressurePipe.QualityAccidentId = this.QualityAccidentId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.QualityAccidentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.QualityAccidentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
// // BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe);
// var oldQualityAccident = Funs.DB.Comprehensive_QualityAccident.Where(u => u.QualityAccidentId == this.QualityAccidentId).FirstOrDefault();
// if (oldQualityAccident == null) //数据库没有记录 直接点提交 当前状态为 审核状态
// {
// pressurePipe.CompileMan = this.CurrUser.UserId;
// pressurePipe.CompileDate = DateTime.Now;
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// BLL.QualityAccidentService.AddQualityAccident(pressurePipe);
// }
// else
// {
// pressurePipe.CompileMan = oldQualityAccident.CompileMan;
// pressurePipe.CompileDate = oldQualityAccident.CompileDate;
// if (oldQualityAccident.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (oldQualityAccident.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// pressurePipe.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// pressurePipe.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
// BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe); // BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe);
var oldQualityAccident = Funs.DB.Comprehensive_QualityAccident.Where(u => u.QualityAccidentId == this.QualityAccidentId).FirstOrDefault(); // }
if (oldQualityAccident == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{
pressurePipe.CompileMan = this.CurrUser.UserId;
pressurePipe.CompileDate = DateTime.Now;
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
BLL.QualityAccidentService.AddQualityAccident(pressurePipe);
}
else
{
pressurePipe.CompileMan = oldQualityAccident.CompileMan;
pressurePipe.CompileDate = oldQualityAccident.CompileDate;
if (oldQualityAccident.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
}
else if (oldQualityAccident.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
}
else //审核状态 提交 变 完成 或者 重新编制
{
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{
pressurePipe.Status = BLL.Const.Comprehensive_Complete;
}
else
{
pressurePipe.Status = BLL.Const.Comprehensive_ReCompile;
}
}
BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe); // }
// #region 审核记录
} // var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
} // {
#region // var approve = new Model.Comprehensive_QualityAccidentApprove();
// approve.QualityAccidentId = pressurePipe.QualityAccidentId;
var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId); // approve.ApproveMan = this.CurrUser.UserId;
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // approve.ApproveType = Const.Comprehensive_Compile;
{ // approve.ApproveDate = DateTime.Now;
var approve = new Model.Comprehensive_QualityAccidentApprove(); // QualityAccidentApproveService.EditApprove(approve); //新增编制记录
approve.QualityAccidentId = pressurePipe.QualityAccidentId;
approve.ApproveMan = this.CurrUser.UserId;
approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now;
QualityAccidentApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove(); // Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove();
newApprove.QualityAccidentId = pressurePipe.QualityAccidentId; // newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else if (currApprove.ApproveMan == CurrUser.UserId) // else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
QualityAccidentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // QualityAccidentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove(); // Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove();
newApprove.QualityAccidentId = pressurePipe.QualityAccidentId; // newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
QualityAccidentApproveService.EditApprove(currApprove); // QualityAccidentApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove(); // Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
reApprove.QualityAccidentId = currApprove.QualityAccidentId; // reApprove.QualityAccidentId = currApprove.QualityAccidentId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
reApprove.ApproveIdea = txtidea.Text; // reApprove.ApproveIdea = txtidea.Text;
QualityAccidentApproveService.EditApprove(reApprove); // QualityAccidentApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove(); // Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
reApprove.QualityAccidentId = currApprove.QualityAccidentId; // reApprove.QualityAccidentId = currApprove.QualityAccidentId;
reApprove.ApproveMan = pressurePipe.CompileMan; // reApprove.ApproveMan = pressurePipe.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
QualityAccidentApproveService.EditApprove(reApprove); // QualityAccidentApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} // }
else // else
{ // {
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
} // }
} //}
#endregion #endregion

View File

@ -140,51 +140,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -221,15 +176,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -60,13 +60,13 @@
<f:RenderField ColumnID="MonitoringReportNumber" DataField="MonitoringReportNumber" FieldType="String" HeaderText="监检报告数量" TextAlign="Center" <f:RenderField ColumnID="MonitoringReportNumber" DataField="MonitoringReportNumber" FieldType="String" HeaderText="监检报告数量" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%-- <f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" <%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="SpecialEquipmentId" DataIFrameUrlFormatString="./SpecialEquipmentApprove.aspx?Id={0}"/> Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="SpecialEquipmentId" DataIFrameUrlFormatString="./SpecialEquipmentApprove.aspx?Id={0}"/>--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"

View File

@ -104,15 +104,6 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex; protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// txtStatus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtStatus;
/// <summary> /// <summary>
/// lbtnFileUrl 控件。 /// lbtnFileUrl 控件。
/// </summary> /// </summary>

View File

@ -47,7 +47,7 @@
<f:FormRow MarginTop="10px"> <%-- <f:FormRow MarginTop="10px">
<Items> <Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--"> <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList> </f:DropDownList>
@ -71,7 +71,7 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>--%>
</Rows> </Rows>
<Toolbars> <Toolbars>
@ -82,8 +82,8 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true"> <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1"> <%-- <f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button> </f:Button>--%>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -40,11 +40,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true); BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true);
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; //this.agree.Hidden = true;
this.options.Hidden = true; //this.options.Hidden = true;
this.btnSave.Hidden = true; this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true; //this.btnSubmit.Hidden = true;
Model.Comprehensive_SpecialEquipment specialEquipment = BLL.SpecialEquipmentServices.GetEquipmentById(this.SpecialEquipmentId); Model.Comprehensive_SpecialEquipment specialEquipment = BLL.SpecialEquipmentServices.GetEquipmentById(this.SpecialEquipmentId);
if (specialEquipment != null) if (specialEquipment != null)
{ {
@ -69,7 +69,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ //重新编制 编制人 可以 显示 提交 保存按钮 { //重新编制 编制人 可以 显示 提交 保存按钮
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && specialEquipment.CompileMan == CurrUser.UserId) if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && specialEquipment.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
}//审核状态 审核人 可以显示 提交 保存按钮 }//审核状态 审核人 可以显示 提交 保存按钮
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
@ -77,9 +77,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//审核状态不可编辑 //审核状态不可编辑
Readonly(); Readonly();
this.agree.Hidden = false; //this.agree.Hidden = false;
this.options.Hidden = false; //this.options.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
}//没有当前审核人,已完成状态 或者 待提交状态 }//没有当前审核人,已完成状态 或者 待提交状态
@ -87,7 +87,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (specialEquipment.Status == BLL.Const.Comprehensive_Compile && specialEquipment.CompileMan == CurrUser.UserId) if (specialEquipment.Status == BLL.Const.Comprehensive_Compile && specialEquipment.CompileMan == CurrUser.UserId)
{ {
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
} }
} }
@ -97,7 +97,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else else
{ {
this.btnSave.Hidden = false; this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false; //this.btnSubmit.Hidden = false;
} }
} }
@ -117,7 +117,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpEquipmentId.Readonly = true; this.drpEquipmentId.Readonly = true;
this.drpUnit.Readonly = true; this.drpUnit.Readonly = true;
this.drpAudit.Readonly = true; //this.drpAudit.Readonly = true;
// this.btnAttach.Enabled = false; // this.btnAttach.Enabled = false;
@ -130,19 +130,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
public void LoadAuditSelect() public void LoadAuditSelect()
{ {
var db = Funs.DB; //var db = Funs.DB;
var userList = from x in db.Sys_User //var userList = from x in db.Sys_User
join y in db.Project_ProjectUnit // join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId // on x.UnitId equals y.UnitId
join p in db.Project_ProjectUser // join p in db.Project_ProjectUser
on x.UserId equals p.UserId // on x.UserId equals p.UserId
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId // where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer) // where p.RoleId.Contains(Const.ZBCNEngineer)
select new { UserId = x.UserId, UserName = x.UserName }; // select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId"; //drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName"; //drpAudit.DataTextField = "UserName";
this.drpAudit.DataSource = userList.ToList(); //this.drpAudit.DataSource = userList.ToList();
this.drpAudit.DataBind(); //this.drpAudit.DataBind();
} }
#endregion #endregion
@ -162,10 +162,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment(); Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
specialEquipment.ProjectId = this.CurrUser.LoginProjectId; specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ //{
specialEquipment.AuditMan = drpAudit.SelectedValue; // specialEquipment.AuditMan = drpAudit.SelectedValue;
} //审核人 //} //审核人
if (!string.IsNullOrEmpty(this.txtSunNumber.Text)) if (!string.IsNullOrEmpty(this.txtSunNumber.Text))
{ {
specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text); specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text);
@ -234,179 +234,179 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
protected void btnSubmit_Click(object sender, EventArgs e) //protected void btnSubmit_Click(object sender, EventArgs e)
{ //{
if (drpUnit.SelectedValue == BLL.Const._Null) // if (drpUnit.SelectedValue == BLL.Const._Null)
{ // {
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return; // return;
} // }
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment(); // Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
specialEquipment.ProjectId = this.CurrUser.LoginProjectId; // specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) // if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{ // {
specialEquipment.AuditMan = drpAudit.SelectedValue; // specialEquipment.AuditMan = drpAudit.SelectedValue;
} //审核人 // } //审核人
if (!string.IsNullOrEmpty(this.txtSunNumber.Text)) // if (!string.IsNullOrEmpty(this.txtSunNumber.Text))
{ // {
specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text); // specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text);
} // }
if (this.drpUnit.SelectedValue != BLL.Const._Null) // if (this.drpUnit.SelectedValue != BLL.Const._Null)
{ // {
specialEquipment.UnitId = this.drpUnit.SelectedValue; // specialEquipment.UnitId = this.drpUnit.SelectedValue;
} // }
if (this.drpEquipmentId.SelectedValue != BLL.Const._Null) // if (this.drpEquipmentId.SelectedValue != BLL.Const._Null)
{ // {
specialEquipment.EquipmentId = this.drpEquipmentId.SelectedValue; // specialEquipment.EquipmentId = this.drpEquipmentId.SelectedValue;
} // }
if (!string.IsNullOrEmpty(this.txtSubmitDataNumber.Text)) // if (!string.IsNullOrEmpty(this.txtSubmitDataNumber.Text))
{ // {
specialEquipment.SubmitDataNumber = Convert.ToInt32(this.txtSubmitDataNumber.Text); // specialEquipment.SubmitDataNumber = Convert.ToInt32(this.txtSubmitDataNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtMonitoringReportNumber.Text)) // if (!string.IsNullOrEmpty(this.txtMonitoringReportNumber.Text))
{ // {
specialEquipment.MonitoringReportNumber = Convert.ToInt32(this.txtMonitoringReportNumber.Text); // specialEquipment.MonitoringReportNumber = Convert.ToInt32(this.txtMonitoringReportNumber.Text);
} // }
if (!string.IsNullOrEmpty(this.txtInformNumber.Text)) // if (!string.IsNullOrEmpty(this.txtInformNumber.Text))
{ // {
specialEquipment.InformNumber = Convert.ToInt32(this.txtInformNumber.Text); // specialEquipment.InformNumber = Convert.ToInt32(this.txtInformNumber.Text);
} // }
if (string.IsNullOrEmpty(this.SpecialEquipmentId)) // if (string.IsNullOrEmpty(this.SpecialEquipmentId))
{ // {
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) // if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{ // {
specialEquipment.SpecialEquipmentId = this.hdAttachUrl.Text; // specialEquipment.SpecialEquipmentId = this.hdAttachUrl.Text;
} // }
else // else
{ // {
specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment)); // specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment));
this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId; // this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId;
} // }
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == specialEquipment.SpecialEquipmentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == specialEquipment.SpecialEquipmentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
specialEquipment.CompileMan = this.CurrUser.UserId; // specialEquipment.CompileMan = this.CurrUser.UserId;
specialEquipment.Status = BLL.Const.Comprehensive_Audit; // specialEquipment.Status = BLL.Const.Comprehensive_Audit;
BLL.SpecialEquipmentServices.AddEquipment(specialEquipment); // BLL.SpecialEquipmentServices.AddEquipment(specialEquipment);
} // }
else // else
{ // {
specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId; // specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.SpecialEquipmentId); // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.SpecialEquipmentId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{ // {
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return; // return;
} // }
// // BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment);
// var oldSpecialEquipment = Funs.DB.Comprehensive_SpecialEquipment.Where(u => u.SpecialEquipmentId == this.SpecialEquipmentId).FirstOrDefault();
// if (oldSpecialEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态
// {
// specialEquipment.CompileMan = this.CurrUser.UserId;
// //specialEquipment.CompileDate = DateTime.Now;
// specialEquipment.Status = BLL.Const.Comprehensive_Audit;
// BLL.SpecialEquipmentServices.AddEquipment(specialEquipment);
// }
// else
// {
// specialEquipment.CompileMan = oldSpecialEquipment.CompileMan;
// //specialEquipment.CompileDate = oldSpecialEquipment.CompileDate;
// if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// specialEquipment.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// specialEquipment.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// specialEquipment.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// specialEquipment.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
// BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment); // BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment);
var oldSpecialEquipment = Funs.DB.Comprehensive_SpecialEquipment.Where(u => u.SpecialEquipmentId == this.SpecialEquipmentId).FirstOrDefault();
if (oldSpecialEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态
{
specialEquipment.CompileMan = this.CurrUser.UserId;
//specialEquipment.CompileDate = DateTime.Now;
specialEquipment.Status = BLL.Const.Comprehensive_Audit;
BLL.SpecialEquipmentServices.AddEquipment(specialEquipment);
}
else
{
specialEquipment.CompileMan = oldSpecialEquipment.CompileMan;
//specialEquipment.CompileDate = oldSpecialEquipment.CompileDate;
if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{
specialEquipment.Status = BLL.Const.Comprehensive_Audit;
}
else if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{
specialEquipment.Status = BLL.Const.Comprehensive_Audit;
}
else //审核状态 提交 变 完成 或者 重新编制
{
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{
specialEquipment.Status = BLL.Const.Comprehensive_Complete;
}
else
{
specialEquipment.Status = BLL.Const.Comprehensive_ReCompile;
}
}
BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment); // }
} // }
// #region 审核记录
} // var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId);
#region // if (currApprove == null) //为获取到为 当前编制状态 直接提交
// {
var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId); // var approve = new Model.Comprehensive_SpecialEquipmentApprove();
if (currApprove == null) //为获取到为 当前编制状态 直接提交 // approve.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
{ // approve.ApproveMan = this.CurrUser.UserId;
var approve = new Model.Comprehensive_SpecialEquipmentApprove(); // approve.ApproveType = Const.Comprehensive_Compile;
approve.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; // approve.ApproveDate = DateTime.Now;
approve.ApproveMan = this.CurrUser.UserId; // SpecialEquipmentApproveService.EditApprove(approve); //新增编制记录
approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now;
SpecialEquipmentApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove(); // Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; // newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else if (currApprove.ApproveMan == CurrUser.UserId) // else if (currApprove.ApproveMan == CurrUser.UserId)
{ // {
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) // if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{ // {
currApprove.ApproveDate = DateTime.Now; // currApprove.ApproveDate = DateTime.Now;
//currApprove.IsAgree = true; // //currApprove.IsAgree = true;
SpecialEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 // SpecialEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove(); // Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; // newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
newApprove.ApproveMan = this.drpAudit.SelectedValue; // newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit; // newApprove.ApproveType = Const.InspectionManagement_Audit;
SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 // SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
} // }
else // else
{ // {
currApprove.ApproveDate = DateTime.Now; //更新审核时间 // currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); // currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text; // currApprove.ApproveIdea = this.txtidea.Text;
SpecialEquipmentApproveService.EditApprove(currApprove); // SpecialEquipmentApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 // if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{ // {
Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove(); // Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId; // reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10); // reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId; // reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete; // reApprove.ApproveType = Const.Comprehensive_Complete;
reApprove.ApproveIdea = txtidea.Text; // reApprove.ApproveIdea = txtidea.Text;
SpecialEquipmentApproveService.EditApprove(reApprove); // SpecialEquipmentApproveService.EditApprove(reApprove);
} // }
else // else
{ // {
Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove(); // Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId; // reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
reApprove.ApproveMan = specialEquipment.CompileMan; // reApprove.ApproveMan = specialEquipment.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile; // reApprove.ApproveType = Const.Comprehensive_ReCompile;
SpecialEquipmentApproveService.EditApprove(reApprove); // SpecialEquipmentApproveService.EditApprove(reApprove);
} // }
} // }
} // }
#endregion // #endregion
ShowNotify("保存成功!", MessageBoxIcon.Success); // ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} //}
#endregion #endregion
#region #region

View File

@ -122,51 +122,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAttach; protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -194,15 +149,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// WindowAtt 控件。 /// WindowAtt 控件。
/// </summary> /// </summary>

View File

@ -31,7 +31,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
U.UserName AS UploadManName U.UserName AS UploadManName
FROM dbo.Common_FileManager AS t FROM dbo.Common_FileManager AS t
LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan
WHERE ToMenu='32' "; WHERE ToMenu='32' and t.projectId='" + CurrUser.LoginProjectId+"' ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(txtFileName.Text)) if (!string.IsNullOrEmpty(txtFileName.Text))

View File

@ -62,6 +62,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
{ {
temp.UploadMan = this.drpUploadMan.SelectedValue; temp.UploadMan = this.drpUploadMan.SelectedValue;
} }
temp.ProjectId = this.CurrUser.LoginProjectId;
temp.UploadDate = Funs.GetNewDateTime(this.txtUploadDate.Text.Trim()); temp.UploadDate = Funs.GetNewDateTime(this.txtUploadDate.Text.Trim());
temp.ToMenu = "32"; temp.ToMenu = "32";
temp.Remark = this.txtRemark.Text.Trim(); temp.Remark = this.txtRemark.Text.Trim();

View File

@ -31,7 +31,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
U.UserName AS UploadManName U.UserName AS UploadManName
FROM dbo.Common_FileManager AS t FROM dbo.Common_FileManager AS t
LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan
WHERE ToMenu='31' "; WHERE ToMenu='31' and t.projectId='" + CurrUser.LoginProjectId+"' ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(txtFileName.Text)) if (!string.IsNullOrEmpty(txtFileName.Text))

View File

@ -62,6 +62,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
{ {
temp.UploadMan = this.drpUploadMan.SelectedValue; temp.UploadMan = this.drpUploadMan.SelectedValue;
} }
temp.ProjectId = this.CurrUser.LoginProjectId;
temp.UploadDate = Funs.GetNewDateTime(this.txtUploadDate.Text.Trim()); temp.UploadDate = Funs.GetNewDateTime(this.txtUploadDate.Text.Trim());
temp.ToMenu = "31"; temp.ToMenu = "31";
temp.Remark = this.txtRemark.Text.Trim(); temp.Remark = this.txtRemark.Text.Trim();

View File

@ -31,7 +31,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
U.UserName AS UploadManName U.UserName AS UploadManName
FROM dbo.Common_FileManager AS t FROM dbo.Common_FileManager AS t
LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan LEFT JOIN dbo.Sys_User AS U ON U.UserId = t.UploadMan
WHERE ToMenu='33' "; WHERE ToMenu='33' and t.projectId='" + CurrUser.LoginProjectId+"' ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(txtFileName.Text)) if (!string.IsNullOrEmpty(txtFileName.Text))

View File

@ -49,6 +49,7 @@ namespace FineUIPro.Web.CQMS.ZLCH
{ {
string fileId = Request.Params["fileId"]; string fileId = Request.Params["fileId"];
Model.Common_FileManager temp = new Model.Common_FileManager(); Model.Common_FileManager temp = new Model.Common_FileManager();
temp.ProjectId = this.CurrUser.LoginProjectId;
if (txtFileName.Text == string.Empty) if (txtFileName.Text == string.Empty)
{ {
ShowNotify("名称不能为空!", MessageBoxIcon.Warning); ShowNotify("名称不能为空!", MessageBoxIcon.Warning);

View File

@ -61,6 +61,12 @@
SortField="ProjectName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center" ExpandUnusedSpace="true" SortField="ProjectName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center" ExpandUnusedSpace="true"
TextAlign="Left"> TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("ProjectMapId")) %>' ToolTip="附件查看"></asp:LinkButton>
</ItemTemplate>
</f:TemplateField>
</Columns> </Columns>
</f:Grid> </f:Grid>
</PopPanel> </PopPanel>

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.PZHGL.ProjectData { namespace FineUIPro.Web.PZHGL.ProjectData
{
public partial class ProjectMap { public partial class ProjectMap
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -111,6 +113,15 @@ namespace FineUIPro.Web.PZHGL.ProjectData {
/// </remarks> /// </remarks>
protected global::FineUIPro.RadioButtonList cbType; protected global::FineUIPro.RadioButtonList cbType;
/// <summary>
/// lbtnFileUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
/// <summary> /// <summary>
/// txtTitle 控件。 /// txtTitle 控件。
/// </summary> /// </summary>

View File

@ -26,7 +26,6 @@ namespace FineUIPro.Web.PZHGL.SGCH
if (t != null) if (t != null)
{ {
this.txtFileName.Text = t.FileName; this.txtFileName.Text = t.FileName;
if (!string.IsNullOrEmpty(t.UploadMan)) if (!string.IsNullOrEmpty(t.UploadMan))
{ {
this.drpUploadMan.SelectedValue = t.UploadMan; this.drpUploadMan.SelectedValue = t.UploadMan;

View File

@ -1,4 +1,4 @@
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -40,17 +40,20 @@ body {
padding: 15px 15px 20px; padding: 15px 15px 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.logowrap { .logowrap {
position: absolute; position: absolute;
left: 0; left: 0;
top: -24px; top: -24px;
} }
.logowrap .logo { .logowrap .logo {
height: 35px; height: 35px;
width: 252px; width: 252px;
background: url(../images/logo.png) center center no-repeat; background: url(../images/logo.png) center center no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.item-big { .item-big {
display: block !important; display: block !important;
font-size: 18px; font-size: 18px;
@ -208,7 +211,6 @@ body {
} }
.tab-wrap-tit { .tab-wrap-tit {
} }
.tab-wrap-tit .tab { .tab-wrap-tit .tab {
@ -480,14 +482,14 @@ body {
.flex { .flex {
display: -webkit-flex; display: -webkit-flex;
/* 新版本语法: Chrome 21+ */ /* <EFBFBD>°汾<EFBFBD>: Chrome 21+ */
display: flex; display: flex;
/* 新版本语法: Opera 12.1, Firefox 22+ */ /* <EFBFBD>°汾<EFBFBD>: Opera 12.1, Firefox 22+ */
/*display: -webkit-box; /*display: -webkit-box;
/* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */ display: -moz-box; /* <EFBFBD>ϰ汾<EFBFBD>: Safari, iOS, Android browser, older WebKit browsers. */ display: -moz-box;
/* 老版本语法: Firefox (buggy) */ /* <EFBFBD>ϰ汾<EFBFBD>: Firefox (buggy) */
display: -ms-flexbox; display: -ms-flexbox;
/* 混合版本语法: IE 10 */ /* <EFBFBD><EFBFBD>ϰ汾<EFBFBD>: IE 10 */
} }
.flex1 { .flex1 {
@ -557,7 +559,7 @@ body {
.pdlrb { .pdlrb {
padding: 0 10px 10px !important; padding: 0 10px 10px !important;
} }
/* 圆角背景框 */ /* Բ<EFBFBD>DZ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
.bg-item { .bg-item {
position: relative; position: relative;
width: 100%; width: 100%;
@ -570,7 +572,7 @@ body {
.bg-item:last-child { .bg-item:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
/* 背景色进度条 */ /* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
.tab-content { .tab-content {
color: #fff; color: #fff;
margin-top: 10px; margin-top: 10px;
@ -611,10 +613,12 @@ body {
background-color: #1BCD34; background-color: #1BCD34;
width: 10%; width: 10%;
} }
.tab-content .per { .tab-content .per {
margin-left: 10px; margin-left: 10px;
width: 40px; width: 40px;
} }
.line-item .normal { .line-item .normal {
background-color: #1BCD34 !important; background-color: #1BCD34 !important;
} }
@ -622,6 +626,7 @@ body {
.line-item .warn { .line-item .warn {
background-color: #C71D26 !important; background-color: #C71D26 !important;
} }
.row1 { .row1 {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
@ -631,17 +636,19 @@ body {
margin-top: 5px; margin-top: 5px;
padding: 0 5px; padding: 0 5px;
} }
.row1 span.num { .row1 span.num {
font-size: 20px; font-size: 20px;
margin-right: 10px; margin-right: 10px;
} }
.row2 { .row2 {
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
align-items: center; align-items: center;
} }
.row2 .txt {
.row2 .txt {
} }
.row2 .item-txt-list { .row2 .item-txt-list {
@ -659,10 +666,12 @@ body {
.row2 .item-txt-list:last-child { .row2 .item-txt-list:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
@font-face { @font-face {
font-family: 'digifacewide'; font-family: 'digifacewide';
src: url('font/digifacewide.ttf'); src: url('font/digifacewide.ttf');
} }
.specialNum { .specialNum {
font-family: digifacewide; font-family: digifacewide;
} }

View File

@ -79636,6 +79636,8 @@ namespace Model
private string _Remark; private string _Remark;
private string _ProjectId;
private EntityRef<Sys_User> _Sys_User; private EntityRef<Sys_User> _Sys_User;
#region #region
@ -79656,6 +79658,8 @@ namespace Model
partial void OnToMenuChanged(); partial void OnToMenuChanged();
partial void OnRemarkChanging(string value); partial void OnRemarkChanging(string value);
partial void OnRemarkChanged(); partial void OnRemarkChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
#endregion #endregion
public Common_FileManager() public Common_FileManager()
@ -79808,6 +79812,26 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Common_FileManager_Sys_User", Storage="_Sys_User", ThisKey="UploadMan", OtherKey="UserId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Common_FileManager_Sys_User", Storage="_Sys_User", ThisKey="UploadMan", OtherKey="UserId", IsForeignKey=true)]
public Sys_User Sys_User public Sys_User Sys_User
{ {