20240614 菜单调整
This commit is contained in:
@@ -85,13 +85,13 @@
|
||||
<f:RenderField ColumnID="CompleteDate" DataField="CompleteDate" FieldType="Date" Renderer="Date" HeaderText="施工完成日期" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignChangeOrderId" DataIFrameUrlFormatString="./DesignChangeOrderApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignChangeOrderId" DataIFrameUrlFormatString="./DesignChangeOrderApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -165,15 +165,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -93,7 +93,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -104,8 +104,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
this.DesignChangeOrderId = Request.Params["DesignChangeOrderId"];
|
||||
Model.Comprehensive_DesignChangeOrder designChangeOrder = BLL.DesignChangeOrderService.GetDesignChangeOrderById(this.DesignChangeOrderId);
|
||||
if (designChangeOrder != null)
|
||||
@@ -79,35 +79,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpImplementationFrontState.SelectedValue= designChangeOrder.ImplementationFrontState;
|
||||
this.txtRemarkCode.Text = designChangeOrder.RemarkCode.HasValue ? designChangeOrder.RemarkCode.ToString() : "";
|
||||
|
||||
var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designChangeOrder.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designChangeOrder.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (designChangeOrder.Status == BLL.Const.Comprehensive_Compile && designChangeOrder.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (designChangeOrder.Status == BLL.Const.Comprehensive_Compile && designChangeOrder.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
else
|
||||
@@ -116,7 +116,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtApprovalDate.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.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
drpCNProfessionalId.Readonly = true;
|
||||
drpUnitIds.Readonly = true;
|
||||
drpUnitWorks.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
// this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -147,23 +147,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -200,10 +200,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
designChangeOrder.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text);
|
||||
designChangeOrder.CompleteDate = Funs.GetNewDateTime(this.txtCompleteDate.Text);
|
||||
designChangeOrder.ImplementationFrontState = this.drpImplementationFrontState.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designChangeOrder.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// designChangeOrder.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
string unitWorks = string.Empty;
|
||||
var unitWorksList = this.drpUnitWorks.SelectedValueArray;
|
||||
foreach (var item in unitWorksList)
|
||||
@@ -262,186 +262,186 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_DesignChangeOrder designChangeOrder = new Model.Comprehensive_DesignChangeOrder();
|
||||
designChangeOrder.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
designChangeOrder.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
designChangeOrder.ChangeOrderCode = this.txtChangeOrderCode.Text.Trim();
|
||||
designChangeOrder.ChangeReason = this.txtChangeReason.Text.Trim();
|
||||
designChangeOrder.Contents = this.txtContents.Text.Trim();
|
||||
designChangeOrder.IssuedDate = Funs.GetNewDateTime(this.txtIssuedDate.Text);
|
||||
designChangeOrder.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text);
|
||||
designChangeOrder.CompleteDate = Funs.GetNewDateTime(this.txtCompleteDate.Text);
|
||||
designChangeOrder.ImplementationFrontState = this.drpImplementationFrontState.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designChangeOrder.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
string unitWorks = string.Empty;
|
||||
var unitWorksList = this.drpUnitWorks.SelectedValueArray;
|
||||
foreach (var item in unitWorksList)
|
||||
{
|
||||
unitWorks += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorks))
|
||||
{
|
||||
unitWorks = unitWorks.Substring(0, unitWorks.LastIndexOf(','));
|
||||
}
|
||||
designChangeOrder.UnitWorkId = unitWorks;
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_DesignChangeOrder designChangeOrder = new Model.Comprehensive_DesignChangeOrder();
|
||||
// designChangeOrder.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// designChangeOrder.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// designChangeOrder.ChangeOrderCode = this.txtChangeOrderCode.Text.Trim();
|
||||
// designChangeOrder.ChangeReason = this.txtChangeReason.Text.Trim();
|
||||
// designChangeOrder.Contents = this.txtContents.Text.Trim();
|
||||
// designChangeOrder.IssuedDate = Funs.GetNewDateTime(this.txtIssuedDate.Text);
|
||||
// designChangeOrder.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text);
|
||||
// designChangeOrder.CompleteDate = Funs.GetNewDateTime(this.txtCompleteDate.Text);
|
||||
// designChangeOrder.ImplementationFrontState = this.drpImplementationFrontState.SelectedValue;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// designChangeOrder.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// string unitWorks = string.Empty;
|
||||
// var unitWorksList = this.drpUnitWorks.SelectedValueArray;
|
||||
// foreach (var item in unitWorksList)
|
||||
// {
|
||||
// unitWorks += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(unitWorks))
|
||||
// {
|
||||
// unitWorks = unitWorks.Substring(0, unitWorks.LastIndexOf(','));
|
||||
// }
|
||||
// designChangeOrder.UnitWorkId = unitWorks;
|
||||
|
||||
string unitIds = string.Empty;
|
||||
var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
foreach (var item in unitLists)
|
||||
{
|
||||
unitIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(','));
|
||||
}
|
||||
designChangeOrder.UnitId = unitIds;
|
||||
designChangeOrder.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.DesignChangeOrderId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
designChangeOrder.DesignChangeOrderId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
designChangeOrder.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder));
|
||||
this.hdAttachUrl.Text = designChangeOrder.DesignChangeOrderId;
|
||||
}
|
||||
designChangeOrder.CompileMan = this.CurrUser.UserId;
|
||||
designChangeOrder.CompileDate = DateTime.Now;
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder);
|
||||
}
|
||||
else
|
||||
{
|
||||
designChangeOrder.DesignChangeOrderId = this.DesignChangeOrderId;
|
||||
// string unitIds = string.Empty;
|
||||
// var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
// foreach (var item in unitLists)
|
||||
// {
|
||||
// unitIds += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(unitIds))
|
||||
// {
|
||||
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(','));
|
||||
// }
|
||||
// designChangeOrder.UnitId = unitIds;
|
||||
// designChangeOrder.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.DesignChangeOrderId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// designChangeOrder.DesignChangeOrderId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designChangeOrder.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder));
|
||||
// this.hdAttachUrl.Text = designChangeOrder.DesignChangeOrderId;
|
||||
// }
|
||||
// designChangeOrder.CompileMan = this.CurrUser.UserId;
|
||||
// designChangeOrder.CompileDate = DateTime.Now;
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designChangeOrder.DesignChangeOrderId = this.DesignChangeOrderId;
|
||||
|
||||
|
||||
var oldDesignChangeOrder = Funs.DB.Comprehensive_DesignChangeOrder.Where(u => u.DesignChangeOrderId == this.DesignChangeOrderId).FirstOrDefault();
|
||||
if (oldDesignChangeOrder == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
designChangeOrder.CompileMan = this.CurrUser.UserId;
|
||||
designChangeOrder.CompileDate = DateTime.Now;
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder);
|
||||
}
|
||||
else
|
||||
{
|
||||
designChangeOrder.CompileMan = oldDesignChangeOrder.CompileMan;
|
||||
designChangeOrder.CompileDate = oldDesignChangeOrder.CompileDate;
|
||||
if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
designChangeOrder.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// var oldDesignChangeOrder = Funs.DB.Comprehensive_DesignChangeOrder.Where(u => u.DesignChangeOrderId == this.DesignChangeOrderId).FirstOrDefault();
|
||||
// if (oldDesignChangeOrder == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// designChangeOrder.CompileMan = this.CurrUser.UserId;
|
||||
// designChangeOrder.CompileDate = DateTime.Now;
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designChangeOrder.CompileMan = oldDesignChangeOrder.CompileMan;
|
||||
// designChangeOrder.CompileDate = oldDesignChangeOrder.CompileDate;
|
||||
// if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designChangeOrder.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.DesignChangeOrderService.UpdateDesignChangeOrder(designChangeOrder);
|
||||
// BLL.DesignChangeOrderService.UpdateDesignChangeOrder(designChangeOrder);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
approve.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
DesignChangeOrderApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
// approve.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// DesignChangeOrderApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
// newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
DesignChangeOrderApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
DesignChangeOrderApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// DesignChangeOrderApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
// newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// DesignChangeOrderApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
//reApprove.ApproveIdea = txtidea.Text;
|
||||
DesignChangeOrderApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId;
|
||||
reApprove.ApproveMan = designChangeOrder.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
DesignChangeOrderApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
// reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// //reApprove.ApproveIdea = txtidea.Text;
|
||||
// DesignChangeOrderApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove();
|
||||
// reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId;
|
||||
// reApprove.ApproveMan = designChangeOrder.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// DesignChangeOrderApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
-54
@@ -165,51 +165,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtRemarkCode;
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -237,15 +192,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("UnitName")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDetailsId" DataIFrameUrlFormatString="./DesignDetailsApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDetailsId" DataIFrameUrlFormatString="./DesignDetailsApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -129,15 +129,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
|
||||
<%--
|
||||
<f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
@@ -84,7 +84,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -95,8 +95,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
this.DesignDetailsId = Request.Params["DesignDetailsId"];
|
||||
Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId);
|
||||
if (designDetails != null)
|
||||
@@ -72,42 +72,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtJoinPersonNum.Text = designDetails.JoinPersonNum.ToString();
|
||||
}
|
||||
this.txtRemarkCode.Text = designDetails.RemarCode.HasValue ? designDetails.RemarCode.ToString() : "";
|
||||
var auditApprove = DesignDetailsApproveService.GetAuditApprove(designDetails.DesignDetailsId, BLL.Const.Comprehensive_Audit);
|
||||
if (auditApprove != null)
|
||||
{
|
||||
drpAudit.SelectedValue = auditApprove.ApproveMan;
|
||||
//var auditApprove = DesignDetailsApproveService.GetAuditApprove(designDetails.DesignDetailsId, BLL.Const.Comprehensive_Audit);
|
||||
//if (auditApprove != null)
|
||||
//{
|
||||
// drpAudit.SelectedValue = auditApprove.ApproveMan;
|
||||
|
||||
}
|
||||
var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDetails.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//}
|
||||
//var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDetails.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (designDetails.Status == BLL.Const.Comprehensive_Compile && designDetails.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (designDetails.Status == BLL.Const.Comprehensive_Compile && designDetails.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -115,7 +115,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtDetailsDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpUnitIds.Readonly = true;
|
||||
this.drpUnitWorks.Readonly = true;
|
||||
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
|
||||
//this.btnAttach.Enabled = false;
|
||||
@@ -143,23 +143,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -184,10 +184,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
|
||||
designDetails.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designDetails.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// designDetails.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
@@ -256,190 +256,190 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
|
||||
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
|
||||
designDetails.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designDetails.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
designDetails.DesignDetailsCode = this.txtDesignDetailsCode.Text.Trim();
|
||||
designDetails.DetailsMan = this.txtDetailsMan.Text.Trim();
|
||||
designDetails.JoinPersonNum = Funs.GetNewIntOrZero(this.txtJoinPersonNum.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.txtDetailsDate.Text))
|
||||
{
|
||||
designDetails.DetailsDate = Convert.ToDateTime(this.txtDetailsDate.Text);
|
||||
}
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorks.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
designDetails.UnitWorkId = ids;
|
||||
// Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
|
||||
// designDetails.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// designDetails.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// designDetails.DesignDetailsCode = this.txtDesignDetailsCode.Text.Trim();
|
||||
// designDetails.DetailsMan = this.txtDetailsMan.Text.Trim();
|
||||
// designDetails.JoinPersonNum = Funs.GetNewIntOrZero(this.txtJoinPersonNum.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(this.txtDetailsDate.Text))
|
||||
// {
|
||||
// designDetails.DetailsDate = Convert.ToDateTime(this.txtDetailsDate.Text);
|
||||
// }
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorks.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// designDetails.UnitWorkId = ids;
|
||||
|
||||
string unitIds = string.Empty;
|
||||
var units = this.drpUnitIds.SelectedValueArray;
|
||||
foreach (var item in units)
|
||||
{
|
||||
unitIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
designDetails.UnitName = unitIds;
|
||||
designDetails.RemarCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.DesignDetailsId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
designDetails.DesignDetailsId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
this.hdAttachUrl.Text = designDetails.DesignDetailsId;
|
||||
}
|
||||
// string unitIds = string.Empty;
|
||||
// var units = this.drpUnitIds.SelectedValueArray;
|
||||
// foreach (var item in units)
|
||||
// {
|
||||
// unitIds += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(unitIds))
|
||||
// {
|
||||
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
// }
|
||||
// designDetails.UnitName = unitIds;
|
||||
// designDetails.RemarCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.DesignDetailsId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// designDetails.DesignDetailsId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
// this.hdAttachUrl.Text = designDetails.DesignDetailsId;
|
||||
// }
|
||||
|
||||
designDetails.CompileMan = this.CurrUser.UserId;
|
||||
designDetails.CompileDate = DateTime.Now;
|
||||
designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignDetailsService.AddDesignDetails(designDetails);
|
||||
}
|
||||
else
|
||||
{
|
||||
designDetails.DesignDetailsId = this.DesignDetailsId;
|
||||
// designDetails.CompileMan = this.CurrUser.UserId;
|
||||
// designDetails.CompileDate = DateTime.Now;
|
||||
// designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignDetailsService.AddDesignDetails(designDetails);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDetails.DesignDetailsId = this.DesignDetailsId;
|
||||
|
||||
var oldDesignDetails = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault();
|
||||
if (oldDesignDetails == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
designDetails.CompileMan = this.CurrUser.UserId;
|
||||
designDetails.CompileDate = DateTime.Now;
|
||||
designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignDetailsService.AddDesignDetails(designDetails);
|
||||
}
|
||||
else
|
||||
{
|
||||
designDetails.CompileMan = oldDesignDetails.CompileMan;
|
||||
designDetails.CompileDate = oldDesignDetails.CompileDate;
|
||||
if (oldDesignDetails.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldDesignDetails.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
designDetails.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDetails.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// var oldDesignDetails = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault();
|
||||
// if (oldDesignDetails == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// designDetails.CompileMan = this.CurrUser.UserId;
|
||||
// designDetails.CompileDate = DateTime.Now;
|
||||
// designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignDetailsService.AddDesignDetails(designDetails);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDetails.CompileMan = oldDesignDetails.CompileMan;
|
||||
// designDetails.CompileDate = oldDesignDetails.CompileDate;
|
||||
// if (oldDesignDetails.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldDesignDetails.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// designDetails.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// designDetails.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDetails.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.DesignDetailsService.UpdateDesignDetails(designDetails);
|
||||
// BLL.DesignDetailsService.UpdateDesignDetails(designDetails);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_DesignDetailsApprove();
|
||||
approve.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
DesignDetailsApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_DesignDetailsApprove();
|
||||
// approve.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// DesignDetailsApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
newApprove.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
// newApprove.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
DesignDetailsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
newApprove.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
DesignDetailsApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// DesignDetailsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
// newApprove.DesignDetailsId = designDetails.DesignDetailsId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// DesignDetailsApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
reApprove.DesignDetailsId = currApprove.DesignDetailsId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
DesignDetailsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
reApprove.DesignDetailsId = currApprove.DesignDetailsId;
|
||||
reApprove.ApproveMan = designDetails.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
DesignDetailsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
// reApprove.DesignDetailsId = currApprove.DesignDetailsId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// // reApprove.ApproveIdea = txtidea.Text;
|
||||
// DesignDetailsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove();
|
||||
// reApprove.DesignDetailsId = currApprove.DesignDetailsId;
|
||||
// reApprove.ApproveMan = designDetails.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// DesignDetailsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -138,51 +138,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -210,15 +165,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -83,13 +83,13 @@
|
||||
<f:RenderField ColumnID="ReceiveMan" DataField="ReceiveMan" FieldType="String" HeaderText="接收人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDrawingsId" DataIFrameUrlFormatString="./DesignDrawingsApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DesignDrawingsId" DataIFrameUrlFormatString="./DesignDrawingsApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -147,15 +147,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -97,7 +97,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -108,8 +108,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -38,12 +38,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
this.DesignDrawingsId = Request.Params["DesignDrawingsId"];
|
||||
Model.Comprehensive_DesignDrawings designDrawings = BLL.DesignDrawingsService.GetDesignDrawingsById(this.DesignDrawingsId);
|
||||
if (designDrawings != null)
|
||||
@@ -73,39 +73,39 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarkCode.Text = designDrawings.RemarkCode.HasValue ? designDrawings.RemarkCode.ToString() : "";
|
||||
|
||||
|
||||
var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId);
|
||||
if (currApprove != null)
|
||||
{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
//var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId);
|
||||
//if (currApprove != null)
|
||||
//{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDrawings.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (designDrawings.Status == BLL.Const.Comprehensive_Compile && designDrawings.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDrawings.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (designDrawings.Status == BLL.Const.Comprehensive_Compile && designDrawings.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemark.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
this.txtSendDate.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
}
|
||||
@@ -136,23 +136,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@@ -191,10 +191,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
designDrawings.Remark = this.txtRemark.Text.Trim();
|
||||
designDrawings.CompileMan = this.CurrUser.UserId;
|
||||
designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
@@ -250,185 +250,185 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings();
|
||||
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
|
||||
designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
designDrawings.DesignDrawingsCode = this.txtDesignDrawingsCode.Text.Trim();
|
||||
designDrawings.DesignDrawingsContent = this.txtDesignDrawingsContent.Text.Trim();
|
||||
designDrawings.Edition = this.txtEdition.Text.Trim();
|
||||
designDrawings.PageNumber = Funs.GetNewInt(this.txtPageNumber.Text.Trim());
|
||||
designDrawings.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text);
|
||||
designDrawings.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
|
||||
designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim();
|
||||
designDrawings.Remark = this.txtRemark.Text.Trim();
|
||||
designDrawings.CompileMan = this.CurrUser.UserId;
|
||||
designDrawings.RemarkCode =Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
designDrawings.UnitWorkId = ids;
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings();
|
||||
// designDrawings.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// designDrawings.DesignDrawingsCode = this.txtDesignDrawingsCode.Text.Trim();
|
||||
// designDrawings.DesignDrawingsContent = this.txtDesignDrawingsContent.Text.Trim();
|
||||
// designDrawings.Edition = this.txtEdition.Text.Trim();
|
||||
// designDrawings.PageNumber = Funs.GetNewInt(this.txtPageNumber.Text.Trim());
|
||||
// designDrawings.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text);
|
||||
// designDrawings.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
|
||||
// designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim();
|
||||
// designDrawings.Remark = this.txtRemark.Text.Trim();
|
||||
// designDrawings.CompileMan = this.CurrUser.UserId;
|
||||
// designDrawings.RemarkCode =Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// designDrawings.UnitWorkId = ids;
|
||||
|
||||
string unitIds = string.Empty;
|
||||
var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
foreach (var item in unitLists)
|
||||
{
|
||||
unitIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
designDrawings.ReceiveUnits = unitIds;
|
||||
if (!string.IsNullOrEmpty(this.DesignDrawingsId))
|
||||
{
|
||||
designDrawings.DesignDrawingsId = this.DesignDrawingsId;
|
||||
//BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
var oldDesignDrawings = Funs.DB.Comprehensive_DesignDrawings.Where(u => u.DesignDrawingsId == this.DesignDrawingsId).FirstOrDefault();
|
||||
if (oldDesignDrawings == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
designDrawings.CompileMan = this.CurrUser.UserId;
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignDrawingsService.AddDesignDrawings(designDrawings);
|
||||
}
|
||||
else
|
||||
{
|
||||
designDrawings.CompileMan = oldDesignDrawings.CompileMan;
|
||||
if (oldDesignDrawings.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldDesignDrawings.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// string unitIds = string.Empty;
|
||||
// var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
// foreach (var item in unitLists)
|
||||
// {
|
||||
// unitIds += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(unitIds))
|
||||
// {
|
||||
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
// }
|
||||
// designDrawings.ReceiveUnits = unitIds;
|
||||
// if (!string.IsNullOrEmpty(this.DesignDrawingsId))
|
||||
// {
|
||||
// designDrawings.DesignDrawingsId = this.DesignDrawingsId;
|
||||
// //BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
// var oldDesignDrawings = Funs.DB.Comprehensive_DesignDrawings.Where(u => u.DesignDrawingsId == this.DesignDrawingsId).FirstOrDefault();
|
||||
// if (oldDesignDrawings == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// designDrawings.CompileMan = this.CurrUser.UserId;
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignDrawingsService.AddDesignDrawings(designDrawings);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDrawings.CompileMan = oldDesignDrawings.CompileMan;
|
||||
// if (oldDesignDrawings.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldDesignDrawings.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
// BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
designDrawings.DesignDrawingsId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDrawings.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
this.hdAttachUrl.Text = designDrawings.DesignDrawingsId;
|
||||
}
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// designDrawings.DesignDrawingsId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDrawings.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
// this.hdAttachUrl.Text = designDrawings.DesignDrawingsId;
|
||||
// }
|
||||
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.DesignDrawingsService.AddDesignDrawings(designDrawings);
|
||||
}
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.DesignDrawingsService.AddDesignDrawings(designDrawings);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 审核记录
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove =DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
approve.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
DesignDrawingsApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove =DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// approve.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// DesignDrawingsApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
DesignDrawingsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
DesignDrawingsApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// DesignDrawingsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// DesignDrawingsApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
reApprove.ApproveMan = designDrawings.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// // reApprove.ApproveIdea = txtidea.Text;
|
||||
// DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
// reApprove.ApproveMan = designDrawings.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 保存方法
|
||||
|
||||
+26
-82
@@ -7,13 +7,11 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class DesignDrawingsEdit
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class DesignDrawingsEdit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessionalId 控件。
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessionalId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWorkIds 控件。
|
||||
/// </summary>
|
||||
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWorkIds;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDesignDrawingsCode 控件。
|
||||
/// </summary>
|
||||
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDesignDrawingsCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtEdition 控件。
|
||||
/// </summary>
|
||||
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtEdition;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDesignDrawingsContent 控件。
|
||||
/// </summary>
|
||||
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDesignDrawingsContent;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRemarkCode 控件。
|
||||
/// </summary>
|
||||
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemarkCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtPageNumber 控件。
|
||||
/// </summary>
|
||||
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPageNumber;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtReceiveDate 控件。
|
||||
/// </summary>
|
||||
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtReceiveDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtSendDate 控件。
|
||||
/// </summary>
|
||||
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtSendDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitIds 控件。
|
||||
/// </summary>
|
||||
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitIds;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtReceiveMan 控件。
|
||||
/// </summary>
|
||||
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtReceiveMan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
@@ -175,52 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -229,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
@@ -238,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -247,16 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -92,14 +92,14 @@
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<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">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -147,15 +147,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%--<f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
--%>
|
||||
|
||||
|
||||
</Rows>
|
||||
@@ -121,8 +121,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpUnitId.SelectedValue = CurrUser.UnitId;
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.InspectionEquipmentService.InitAttributeDropDownList(this.drpAttribute, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"];
|
||||
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
|
||||
if (inspectionEquipment != null)
|
||||
@@ -85,48 +85,48 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarkCode.Text = inspectionEquipment.RemarkCode.HasValue ? inspectionEquipment.RemarkCode.ToString() : "";
|
||||
this.txtEquipmentNo.Text = inspectionEquipment.EquipmentNO;
|
||||
this.txtUsedPlace.Text = inspectionEquipment.UsedPlace;
|
||||
var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId);
|
||||
if(currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionEquipment.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType== BLL.Const.Comprehensive_Audit&&currApprove.ApproveMan== CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
this.txtInspectionName.Readonly = true;
|
||||
this.drpUnitId.Readonly = true;
|
||||
this.drpCNProfessionalId.Readonly = true;
|
||||
this.txtSpecifications.Readonly = true;
|
||||
this.txtSupplier.Readonly = true;
|
||||
this.drpAttribute.Readonly = true;
|
||||
this.drpSamplingResult.Readonly = true;
|
||||
this.txtInspectionDate.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
this.txtEquipmentNo.Readonly = true;
|
||||
this.txtUsedPlace.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
this.txtSamplingCount.Readonly = true;
|
||||
this.txtCounts.Readonly = true;
|
||||
//var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId);
|
||||
//if(currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionEquipment.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType== BLL.Const.Comprehensive_Audit&&currApprove.ApproveMan== CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// this.txtInspectionName.Readonly = true;
|
||||
// this.drpUnitId.Readonly = true;
|
||||
// this.drpCNProfessionalId.Readonly = true;
|
||||
// this.txtSpecifications.Readonly = true;
|
||||
// this.txtSupplier.Readonly = true;
|
||||
// this.drpAttribute.Readonly = true;
|
||||
// this.drpSamplingResult.Readonly = true;
|
||||
// this.txtInspectionDate.Readonly = true;
|
||||
// this.txtRemarkCode.Readonly = true;
|
||||
// this.txtEquipmentNo.Readonly = true;
|
||||
// this.txtUsedPlace.Readonly = true;
|
||||
// this.drpAudit.Readonly = true;
|
||||
// this.txtSamplingCount.Readonly = true;
|
||||
// this.txtCounts.Readonly = true;
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if(inspectionEquipment.Status == BLL.Const.Comprehensive_Compile && inspectionEquipment.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if(inspectionEquipment.Status == BLL.Const.Comprehensive_Compile && inspectionEquipment.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
//var res = InspectionEquipmentApproveService.GetState(inspectionEquipment.InspectionEquipmentId);
|
||||
|
||||
//if (inspectionEquipment.CompileMan != CurrUser.UserId) //不是创建用户禁止编辑
|
||||
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
this.txtEquipmentNo.Readonly = true;
|
||||
this.txtUsedPlace.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtSamplingCount.Readonly = true;
|
||||
this.txtCounts.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
@@ -210,23 +210,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -268,10 +268,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
|
||||
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
|
||||
newInspectionEquipment.EquipmentOrMatail = drpEquipmentOrMatail.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
|
||||
if (this.drpAttribute.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
@@ -322,176 +322,176 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
#endregion
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
|
||||
var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
|
||||
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue;
|
||||
newInspectionEquipment.InspectionCode = this.txtInspectionCode.Text.Trim();
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newInspectionEquipment.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim();
|
||||
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
|
||||
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
|
||||
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
|
||||
newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
|
||||
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
|
||||
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
|
||||
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
|
||||
// var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
|
||||
// newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue;
|
||||
// newInspectionEquipment.InspectionCode = this.txtInspectionCode.Text.Trim();
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// newInspectionEquipment.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim();
|
||||
// newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
|
||||
// newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
|
||||
// newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
|
||||
// newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
|
||||
// newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
|
||||
// newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
|
||||
// newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// newInspectionEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
|
||||
if (this.drpAttribute.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue;
|
||||
}
|
||||
if (this.drpSamplingResult.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newInspectionEquipment.SamplingResult = this.drpSamplingResult.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtInspectionDate.Text))
|
||||
{
|
||||
newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text);
|
||||
}
|
||||
// if (this.drpAttribute.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue;
|
||||
// }
|
||||
// if (this.drpSamplingResult.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// newInspectionEquipment.SamplingResult = this.drpSamplingResult.SelectedValue;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtInspectionDate.Text))
|
||||
// {
|
||||
// newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text);
|
||||
// }
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(this.InspectionEquipmentId))
|
||||
{
|
||||
newInspectionEquipment.CompileMan = this.CurrUser.UserId;
|
||||
newInspectionEquipment.CompileDate = DateTime.Now;
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
// if (string.IsNullOrEmpty(this.InspectionEquipmentId))
|
||||
// {
|
||||
// newInspectionEquipment.CompileMan = this.CurrUser.UserId;
|
||||
// newInspectionEquipment.CompileDate = DateTime.Now;
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
// newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
|
||||
|
||||
BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
|
||||
}
|
||||
else
|
||||
{
|
||||
newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId;
|
||||
var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
|
||||
if (oldInspectionEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
newInspectionEquipment.CompileMan = this.CurrUser.UserId;
|
||||
newInspectionEquipment.CompileDate = DateTime.Now;
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
|
||||
}
|
||||
else
|
||||
{
|
||||
newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan;
|
||||
newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate;
|
||||
if(oldInspectionEquipment.Status==BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId;
|
||||
// var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
|
||||
// if (oldInspectionEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// newInspectionEquipment.CompileMan = this.CurrUser.UserId;
|
||||
// newInspectionEquipment.CompileDate = DateTime.Now;
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan;
|
||||
// newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate;
|
||||
// if(oldInspectionEquipment.Status==BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newInspectionEquipment.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment);
|
||||
// BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
#region 审核记录
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(newInspectionEquipment.InspectionEquipmentId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(newInspectionEquipment.InspectionEquipmentId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
// approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
// newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
InspectionEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
InspectionEquipmentApproveService.EditApprove(currApprove);
|
||||
// }else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// InspectionEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
// newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// InspectionEquipmentApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
//reApprove.ApproveIdea = txtidea.Text;
|
||||
InspectionEquipmentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
|
||||
reApprove.ApproveMan = newInspectionEquipment.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
InspectionEquipmentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
// reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// //reApprove.ApproveIdea = txtidea.Text;
|
||||
// InspectionEquipmentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove();
|
||||
// reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId;
|
||||
// reApprove.ApproveMan = newInspectionEquipment.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// InspectionEquipmentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
|
||||
#region 附件上传
|
||||
|
||||
-54
@@ -210,51 +210,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -282,15 +237,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -97,13 +97,13 @@
|
||||
<f:RenderField ColumnID="LeaveDate" DataField="LeaveDate" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionMachineId" DataIFrameUrlFormatString="./InspectionMachineApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionMachineId" DataIFrameUrlFormatString="./InspectionMachineApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -129,15 +129,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" LabelAlign="Right" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true" LabelWidth="110px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -117,7 +117,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -128,8 +128,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.InspectionMachineId = Request.Params["InspectionMachineId"];
|
||||
Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId);
|
||||
@@ -89,39 +89,39 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtUnitsCount.Text = inspectionMachine.UnitsCount.ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(inspectionMachine.AuditMan))
|
||||
{
|
||||
drpAudit.SelectedValue = inspectionMachine.AuditMan;
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(inspectionMachine.AuditMan))
|
||||
//{
|
||||
// drpAudit.SelectedValue = inspectionMachine.AuditMan;
|
||||
//}
|
||||
this.txtRemarkCode.Text = inspectionMachine.RemarkCode.HasValue ? inspectionMachine.RemarkCode.ToString() : "";
|
||||
var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachine.InspectionMachineId);
|
||||
if (currApprove != null)
|
||||
{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionMachine.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachine.InspectionMachineId);
|
||||
//if (currApprove != null)
|
||||
//{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionMachine.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (inspectionMachine.Status == BLL.Const.Comprehensive_Compile && inspectionMachine.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (inspectionMachine.Status == BLL.Const.Comprehensive_Compile && inspectionMachine.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -129,7 +129,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtSpecificationModel.Readonly = true;
|
||||
this.txtTestCycle.Readonly = true;
|
||||
this.txtUnitsCount.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -160,23 +160,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -222,10 +222,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text);
|
||||
inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim());
|
||||
inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
inspectionMachone.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// inspectionMachone.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (string.IsNullOrEmpty(this.InspectionMachineId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
@@ -261,178 +261,178 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine();
|
||||
inspectionMachone.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionMachone.UnitId = this.drpUnitId.SelectedValue;
|
||||
}
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionMachone.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
inspectionMachone.InspectionType = this.rblInspectionType.SelectedValue;
|
||||
inspectionMachone.InspectionMachineCode = this.txtInspectionMachineCode.Text.Trim();
|
||||
inspectionMachone.InspectionMachineName = this.txtInspectionMachineName.Text.Trim();
|
||||
inspectionMachone.SpecificationModel = this.txtSpecificationModel.Text.Trim();
|
||||
inspectionMachone.NextTestDate = Funs.GetNewDateTime(this.txtNextTestDate.Text);
|
||||
inspectionMachone.TestCycle = this.txtTestCycle.Text.Trim();
|
||||
inspectionMachone.IsVerification = this.rblIsVerification.SelectedValue == "true" ? true : false;
|
||||
inspectionMachone.InspectionDate = Funs.GetNewDateTime(this.txtInspectionDate.Text);
|
||||
inspectionMachone.IsOnSite = this.rblIsOnSite.SelectedValue == "true" ? true : false;
|
||||
inspectionMachone.IsCheckOK = this.rblIsCheckOK.SelectedValue == "true" ? true : false;
|
||||
inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text);
|
||||
inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim());
|
||||
inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
inspectionMachone.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (string.IsNullOrEmpty(this.InspectionMachineId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
inspectionMachone.InspectionMachineId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionMachone.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
this.hdAttachUrl.Text = inspectionMachone.InspectionMachineId;
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine();
|
||||
// inspectionMachone.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// inspectionMachone.UnitId = this.drpUnitId.SelectedValue;
|
||||
// }
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// inspectionMachone.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// inspectionMachone.InspectionType = this.rblInspectionType.SelectedValue;
|
||||
// inspectionMachone.InspectionMachineCode = this.txtInspectionMachineCode.Text.Trim();
|
||||
// inspectionMachone.InspectionMachineName = this.txtInspectionMachineName.Text.Trim();
|
||||
// inspectionMachone.SpecificationModel = this.txtSpecificationModel.Text.Trim();
|
||||
// inspectionMachone.NextTestDate = Funs.GetNewDateTime(this.txtNextTestDate.Text);
|
||||
// inspectionMachone.TestCycle = this.txtTestCycle.Text.Trim();
|
||||
// inspectionMachone.IsVerification = this.rblIsVerification.SelectedValue == "true" ? true : false;
|
||||
// inspectionMachone.InspectionDate = Funs.GetNewDateTime(this.txtInspectionDate.Text);
|
||||
// inspectionMachone.IsOnSite = this.rblIsOnSite.SelectedValue == "true" ? true : false;
|
||||
// inspectionMachone.IsCheckOK = this.rblIsCheckOK.SelectedValue == "true" ? true : false;
|
||||
// inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text);
|
||||
// inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim());
|
||||
// inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// inspectionMachone.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (string.IsNullOrEmpty(this.InspectionMachineId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// inspectionMachone.InspectionMachineId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionMachone.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
// this.hdAttachUrl.Text = inspectionMachone.InspectionMachineId;
|
||||
// }
|
||||
|
||||
|
||||
inspectionMachone.CompileMan = this.CurrUser.UserId;
|
||||
inspectionMachone.CompileDate = DateTime.Now;
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone);
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionMachone.InspectionMachineId = this.InspectionMachineId;
|
||||
// inspectionMachone.CompileMan = this.CurrUser.UserId;
|
||||
// inspectionMachone.CompileDate = DateTime.Now;
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionMachone.InspectionMachineId = this.InspectionMachineId;
|
||||
|
||||
//BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone);
|
||||
// //BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone);
|
||||
|
||||
var oldInspectionMachine = Funs.DB.Comprehensive_InspectionMachine.Where(u => u.InspectionMachineId == this.InspectionMachineId).FirstOrDefault();
|
||||
if (oldInspectionMachine == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
inspectionMachone.CompileMan = this.CurrUser.UserId;
|
||||
inspectionMachone.CompileDate = DateTime.Now;
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone);
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionMachone.CompileMan = oldInspectionMachine.CompileMan;
|
||||
inspectionMachone.CompileDate = oldInspectionMachine.CompileDate;
|
||||
if (oldInspectionMachine.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldInspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionMachone.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// var oldInspectionMachine = Funs.DB.Comprehensive_InspectionMachine.Where(u => u.InspectionMachineId == this.InspectionMachineId).FirstOrDefault();
|
||||
// if (oldInspectionMachine == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// inspectionMachone.CompileMan = this.CurrUser.UserId;
|
||||
// inspectionMachone.CompileDate = DateTime.Now;
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionMachone.CompileMan = oldInspectionMachine.CompileMan;
|
||||
// inspectionMachone.CompileDate = oldInspectionMachine.CompileDate;
|
||||
// if (oldInspectionMachine.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldInspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionMachone.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone);
|
||||
// BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachone.InspectionMachineId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_InspectionMachineApprove();
|
||||
approve.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
InspectionMachineApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachone.InspectionMachineId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_InspectionMachineApprove();
|
||||
// approve.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// InspectionMachineApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
// newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
InspectionMachineApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
InspectionMachineApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// InspectionMachineApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
// newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// InspectionMachineApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
reApprove.InspectionMachineId = currApprove.InspectionMachineId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
InspectionMachineApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
reApprove.InspectionMachineId = currApprove.InspectionMachineId;
|
||||
reApprove.ApproveMan = inspectionMachone.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
InspectionMachineApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
// reApprove.InspectionMachineId = currApprove.InspectionMachineId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// // reApprove.ApproveIdea = txtidea.Text;
|
||||
// InspectionMachineApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove();
|
||||
// reApprove.InspectionMachineId = currApprove.InspectionMachineId;
|
||||
// reApprove.ApproveMan = inspectionMachone.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// InspectionMachineApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
-54
@@ -201,51 +201,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtRemarkCode;
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -273,15 +228,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -93,13 +93,13 @@
|
||||
<f:RenderField ColumnID="DepartureTime" DataField="DepartureTime" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="110px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionPersonId" DataIFrameUrlFormatString="./InspectionPersonApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="InspectionPersonId" DataIFrameUrlFormatString="./InspectionPersonApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -335,34 +335,34 @@ namespace FineUIPro.Web.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
public static string ConvertState(object Status)
|
||||
{
|
||||
if (Status != null)
|
||||
{
|
||||
if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
return "重报";
|
||||
}
|
||||
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
|
||||
{
|
||||
return "驳回";
|
||||
}
|
||||
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
|
||||
{
|
||||
return "待审批";
|
||||
}
|
||||
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
return "审批完成";
|
||||
}
|
||||
}
|
||||
//public static string ConvertState(object Status)
|
||||
//{
|
||||
// if (Status != null)
|
||||
// {
|
||||
// if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// return "重报";
|
||||
// }
|
||||
// else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
|
||||
// {
|
||||
// return "驳回";
|
||||
// }
|
||||
// else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
|
||||
// {
|
||||
// return "编制";
|
||||
// }
|
||||
// else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
|
||||
// {
|
||||
// return "待审批";
|
||||
// }
|
||||
// else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
|
||||
// {
|
||||
// return "审批完成";
|
||||
// }
|
||||
// }
|
||||
|
||||
return "编制";
|
||||
}
|
||||
// return "编制";
|
||||
//}
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
|
||||
@@ -138,15 +138,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -118,7 +118,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -129,8 +129,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
BLL.PostService.InitPostDownList(this.drpPostId, true);
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.InspectionPersonId = Request.Params["InspectionPersonId"];
|
||||
Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
|
||||
@@ -109,35 +109,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarkCode.Text = inspectionPerson.RemarkCode.HasValue ? inspectionPerson.RemarkCode.ToString() : "";
|
||||
|
||||
|
||||
var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionPerson.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionPerson.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (inspectionPerson.Status == BLL.Const.Comprehensive_Compile && inspectionPerson.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (inspectionPerson.Status == BLL.Const.Comprehensive_Compile && inspectionPerson.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -147,7 +147,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtApprovalTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.txtDepartureTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemark.Readonly = true;
|
||||
this.txtValidityDate.Readonly = true;
|
||||
this.drpPostId.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.drpUnitWorkIds.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
@@ -182,23 +182,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@@ -266,10 +266,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
//人员报验
|
||||
Model.Comprehensive_InspectionPerson inspectionPerson = new Model.Comprehensive_InspectionPerson();
|
||||
inspectionPerson.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
inspectionPerson.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// inspectionPerson.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionPerson.UnitId = this.drpUnitId.SelectedValue;
|
||||
@@ -394,281 +394,281 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (this.drpPostId.SelectedText == "焊工")
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtWelderCode.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("焊工编号必填!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
// 焊工部分
|
||||
Model.BS_Welder welder = new Model.BS_Welder();
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
welder.WED_Unit = this.drpUnitId.SelectedValue;
|
||||
}
|
||||
//welder.WED_Code = this.txtInspectionCode.Text.Trim();
|
||||
welder.WED_Name = this.txtPersonName.Text.Trim();
|
||||
if (!String.IsNullOrEmpty(this.txtValidityDate.Text.ToString()))
|
||||
{
|
||||
welder.LimitDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString());
|
||||
}
|
||||
if (!String.IsNullOrEmpty(this.txtDepartureTime.Text.ToString()))
|
||||
{
|
||||
welder.LeaveDate = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
|
||||
}
|
||||
if (!String.IsNullOrEmpty(this.txtApprovalTime.Text.ToString()))
|
||||
{
|
||||
welder.PostDate = Convert.ToDateTime(this.txtApprovalTime.Text.ToString());
|
||||
}
|
||||
welder.WED_WorkCode = this.txtCertificateNumber.Text.Trim();
|
||||
welder.WED_Class = this.txtQualifiedProjectCode.Text.Trim();
|
||||
if (this.rblIsOnSite.SelectedValue == "true")
|
||||
{
|
||||
welder.WED_IfOnGuard = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
welder.WED_IfOnGuard = false;
|
||||
}
|
||||
welder.WED_Code = txtWelderCode.Text.Trim();
|
||||
welder.WED_Remark = this.txtRemark.Text.Trim();
|
||||
welder.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//人员报验
|
||||
Model.Comprehensive_InspectionPerson inspectionPerson = new Model.Comprehensive_InspectionPerson();
|
||||
inspectionPerson.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
inspectionPerson.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionPerson.UnitId = this.drpUnitId.SelectedValue;
|
||||
}
|
||||
inspectionPerson.InspectionPersonCode = this.txtInspectionCode.Text.Trim();
|
||||
if (this.drpPostId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionPerson.PostId = this.drpPostId.SelectedValue;
|
||||
}
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionPerson.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
inspectionPerson.PersonName = this.txtPersonName.Text.Trim();
|
||||
inspectionPerson.CertificateNumber = this.txtCertificateNumber.Text.Trim();
|
||||
inspectionPerson.QualifiedProjectCode = this.txtQualifiedProjectCode.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtValidityDate.Text.ToString()))
|
||||
{
|
||||
inspectionPerson.ValidityDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtApprovalTime.Text.ToString()))
|
||||
{
|
||||
inspectionPerson.ApprovalTime = Convert.ToDateTime(this.txtApprovalTime.Text.ToString());
|
||||
}
|
||||
if (this.rblIsOnSite.SelectedValue == "true")
|
||||
{
|
||||
inspectionPerson.IsOnSite = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.IsOnSite = false;
|
||||
}
|
||||
if (this.rblIsTrain.SelectedValue == "true")
|
||||
{
|
||||
inspectionPerson.IsTrain = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.IsTrain = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDepartureTime.Text.ToString()))
|
||||
{
|
||||
inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
|
||||
}
|
||||
inspectionPerson.Remark = this.txtRemark.Text.Trim();
|
||||
inspectionPerson.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
inspectionPerson.UnitWorkId = ids;
|
||||
if (string.IsNullOrEmpty(this.InspectionPersonId))
|
||||
{
|
||||
inspectionPerson.CompileMan = this.CurrUser.UserId;
|
||||
inspectionPerson.CompileDate = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
inspectionPerson.InspectionPersonId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
this.hdAttachUrl.Text = inspectionPerson.InspectionPersonId;
|
||||
}
|
||||
// if (this.drpPostId.SelectedText == "焊工")
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(txtWelderCode.Text.Trim()))
|
||||
// {
|
||||
// Alert.ShowInTop("焊工编号必填!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// // 焊工部分
|
||||
// Model.BS_Welder welder = new Model.BS_Welder();
|
||||
// if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// welder.WED_Unit = this.drpUnitId.SelectedValue;
|
||||
// }
|
||||
// //welder.WED_Code = this.txtInspectionCode.Text.Trim();
|
||||
// welder.WED_Name = this.txtPersonName.Text.Trim();
|
||||
// if (!String.IsNullOrEmpty(this.txtValidityDate.Text.ToString()))
|
||||
// {
|
||||
// welder.LimitDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString());
|
||||
// }
|
||||
// if (!String.IsNullOrEmpty(this.txtDepartureTime.Text.ToString()))
|
||||
// {
|
||||
// welder.LeaveDate = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
|
||||
// }
|
||||
// if (!String.IsNullOrEmpty(this.txtApprovalTime.Text.ToString()))
|
||||
// {
|
||||
// welder.PostDate = Convert.ToDateTime(this.txtApprovalTime.Text.ToString());
|
||||
// }
|
||||
// welder.WED_WorkCode = this.txtCertificateNumber.Text.Trim();
|
||||
// welder.WED_Class = this.txtQualifiedProjectCode.Text.Trim();
|
||||
// if (this.rblIsOnSite.SelectedValue == "true")
|
||||
// {
|
||||
// welder.WED_IfOnGuard = true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// welder.WED_IfOnGuard = false;
|
||||
// }
|
||||
// welder.WED_Code = txtWelderCode.Text.Trim();
|
||||
// welder.WED_Remark = this.txtRemark.Text.Trim();
|
||||
// welder.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// //人员报验
|
||||
// Model.Comprehensive_InspectionPerson inspectionPerson = new Model.Comprehensive_InspectionPerson();
|
||||
// inspectionPerson.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// inspectionPerson.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// inspectionPerson.UnitId = this.drpUnitId.SelectedValue;
|
||||
// }
|
||||
// inspectionPerson.InspectionPersonCode = this.txtInspectionCode.Text.Trim();
|
||||
// if (this.drpPostId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// inspectionPerson.PostId = this.drpPostId.SelectedValue;
|
||||
// }
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// inspectionPerson.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// inspectionPerson.PersonName = this.txtPersonName.Text.Trim();
|
||||
// inspectionPerson.CertificateNumber = this.txtCertificateNumber.Text.Trim();
|
||||
// inspectionPerson.QualifiedProjectCode = this.txtQualifiedProjectCode.Text.Trim();
|
||||
// if (!string.IsNullOrEmpty(this.txtValidityDate.Text.ToString()))
|
||||
// {
|
||||
// inspectionPerson.ValidityDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString());
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtApprovalTime.Text.ToString()))
|
||||
// {
|
||||
// inspectionPerson.ApprovalTime = Convert.ToDateTime(this.txtApprovalTime.Text.ToString());
|
||||
// }
|
||||
// if (this.rblIsOnSite.SelectedValue == "true")
|
||||
// {
|
||||
// inspectionPerson.IsOnSite = true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.IsOnSite = false;
|
||||
// }
|
||||
// if (this.rblIsTrain.SelectedValue == "true")
|
||||
// {
|
||||
// inspectionPerson.IsTrain = true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.IsTrain = false;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtDepartureTime.Text.ToString()))
|
||||
// {
|
||||
// inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
|
||||
// }
|
||||
// inspectionPerson.Remark = this.txtRemark.Text.Trim();
|
||||
// inspectionPerson.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// inspectionPerson.UnitWorkId = ids;
|
||||
// if (string.IsNullOrEmpty(this.InspectionPersonId))
|
||||
// {
|
||||
// inspectionPerson.CompileMan = this.CurrUser.UserId;
|
||||
// inspectionPerson.CompileDate = DateTime.Now;
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// inspectionPerson.InspectionPersonId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
// this.hdAttachUrl.Text = inspectionPerson.InspectionPersonId;
|
||||
// }
|
||||
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
// 人员报验
|
||||
BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson);
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
// // 人员报验
|
||||
// BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson);
|
||||
|
||||
if (this.drpPostId.SelectedText == "焊工")
|
||||
{
|
||||
// 焊工部分
|
||||
if (string.IsNullOrEmpty(welderId))
|
||||
{
|
||||
// 焊工部分
|
||||
BLL.PersonManageService.AddBSWelder(welder);
|
||||
}
|
||||
else
|
||||
{
|
||||
welder.WED_ID = welderId;
|
||||
BLL.PersonManageService.UpdateBSWelder(welder);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.InspectionPersonId = this.InspectionPersonId;
|
||||
// BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson);
|
||||
var oldInspectionPerson = Funs.DB.Comprehensive_InspectionPerson.Where(u => u.InspectionPersonId == this.InspectionPersonId).FirstOrDefault();
|
||||
if (oldInspectionPerson == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
inspectionPerson.CompileMan = this.CurrUser.UserId;
|
||||
inspectionPerson.CompileDate = DateTime.Now;
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson);
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.CompileMan = oldInspectionPerson.CompileMan;
|
||||
inspectionPerson.CompileDate = oldInspectionPerson.CompileDate;
|
||||
if (oldInspectionPerson.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldInspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
inspectionPerson.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// if (this.drpPostId.SelectedText == "焊工")
|
||||
// {
|
||||
// // 焊工部分
|
||||
// if (string.IsNullOrEmpty(welderId))
|
||||
// {
|
||||
// // 焊工部分
|
||||
// BLL.PersonManageService.AddBSWelder(welder);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// welder.WED_ID = welderId;
|
||||
// BLL.PersonManageService.UpdateBSWelder(welder);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.InspectionPersonId = this.InspectionPersonId;
|
||||
// // BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson);
|
||||
// var oldInspectionPerson = Funs.DB.Comprehensive_InspectionPerson.Where(u => u.InspectionPersonId == this.InspectionPersonId).FirstOrDefault();
|
||||
// if (oldInspectionPerson == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// inspectionPerson.CompileMan = this.CurrUser.UserId;
|
||||
// inspectionPerson.CompileDate = DateTime.Now;
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.CompileMan = oldInspectionPerson.CompileMan;
|
||||
// inspectionPerson.CompileDate = oldInspectionPerson.CompileDate;
|
||||
// if (oldInspectionPerson.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldInspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// inspectionPerson.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson);
|
||||
if (this.drpPostId.SelectedText == "焊工")
|
||||
{
|
||||
// 焊工部分
|
||||
if (string.IsNullOrEmpty(welderId))
|
||||
{
|
||||
// 焊工部分
|
||||
BLL.PersonManageService.AddBSWelder(welder);
|
||||
}
|
||||
else
|
||||
{
|
||||
welder.WED_ID = welderId;
|
||||
BLL.PersonManageService.UpdateBSWelder(welder);
|
||||
}
|
||||
}
|
||||
// BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson);
|
||||
// if (this.drpPostId.SelectedText == "焊工")
|
||||
// {
|
||||
// // 焊工部分
|
||||
// if (string.IsNullOrEmpty(welderId))
|
||||
// {
|
||||
// // 焊工部分
|
||||
// BLL.PersonManageService.AddBSWelder(welder);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// welder.WED_ID = welderId;
|
||||
// BLL.PersonManageService.UpdateBSWelder(welder);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_InspectionPersonApprove();
|
||||
approve.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
InspectionPersonApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_InspectionPersonApprove();
|
||||
// approve.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// InspectionPersonApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
// newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
InspectionPersonApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
InspectionPersonApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// InspectionPersonApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
// newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// InspectionPersonApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
reApprove.InspectionPersonId = currApprove.InspectionPersonId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
reApprove.ApproveIdea = txtidea.Text;
|
||||
InspectionPersonApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
reApprove.InspectionPersonId = currApprove.InspectionPersonId;
|
||||
reApprove.ApproveMan = inspectionPerson.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
InspectionPersonApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
// reApprove.InspectionPersonId = currApprove.InspectionPersonId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// InspectionPersonApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove();
|
||||
// reApprove.InspectionPersonId = currApprove.InspectionPersonId;
|
||||
// reApprove.ApproveMan = inspectionPerson.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// InspectionPersonApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -210,51 +210,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -282,15 +237,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -90,13 +90,13 @@
|
||||
<f:RenderField ColumnID="ResponsibleMan" DataField="ResponsibleMan" FieldType="String" HeaderText="责任人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="110px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="NCRManagementId" DataIFrameUrlFormatString="./NCRManagementApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="NCRManagementId" DataIFrameUrlFormatString="./NCRManagementApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -147,15 +147,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -119,7 +119,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -130,8 +130,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.InitAllUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true);
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.NCRManagementId = Request.Params["NCRManagementId"];
|
||||
Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId);
|
||||
@@ -90,35 +90,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
//this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
|
||||
this.ddlImplementationFrontState.SelectedValue = nCRManagement.ImplementationFrontState;
|
||||
|
||||
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && nCRManagement.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && nCRManagement.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (nCRManagement.Status == BLL.Const.Comprehensive_Compile && nCRManagement.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (nCRManagement.Status == BLL.Const.Comprehensive_Compile && nCRManagement.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtClosedDate.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.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpSendUnit.Readonly = true;
|
||||
this.drpUnitIds.Readonly = true;
|
||||
this.drpUnitWorkIds.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.ddlProblem.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
@@ -158,26 +158,26 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
///// <summary>
|
||||
///// 加载专业工程师
|
||||
///// </summary>
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -209,10 +209,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
|
||||
nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
nCRManagement.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// nCRManagement.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (this.drpSendUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
nCRManagement.SendUnit = this.drpSendUnit.SelectedValue;
|
||||
@@ -315,221 +315,221 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpSendUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
|
||||
nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
nCRManagement.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (this.drpSendUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
nCRManagement.SendUnit = this.drpSendUnit.SelectedValue;
|
||||
}
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
nCRManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
nCRManagement.NCRCode = this.txtNCRCode.Text.Trim();
|
||||
nCRManagement.Contents = this.txtContents.Text.Trim();
|
||||
#region 新增2024-03-29
|
||||
if (!string.IsNullOrEmpty(this.ddlProblem.SelectedValue))
|
||||
{
|
||||
nCRManagement.Problem = this.ddlProblem.SelectedValue;
|
||||
}
|
||||
nCRManagement.Measure = this.txtMeasure.Text.Trim();
|
||||
#endregion
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (this.drpSendUnit.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
|
||||
// nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// nCRManagement.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (this.drpSendUnit.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// nCRManagement.SendUnit = this.drpSendUnit.SelectedValue;
|
||||
// }
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// nCRManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// nCRManagement.NCRCode = this.txtNCRCode.Text.Trim();
|
||||
// nCRManagement.Contents = this.txtContents.Text.Trim();
|
||||
// #region 新增2024-03-29
|
||||
// if (!string.IsNullOrEmpty(this.ddlProblem.SelectedValue))
|
||||
// {
|
||||
// nCRManagement.Problem = this.ddlProblem.SelectedValue;
|
||||
// }
|
||||
// nCRManagement.Measure = this.txtMeasure.Text.Trim();
|
||||
// #endregion
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtIssuedDate.Text))
|
||||
{
|
||||
nCRManagement.IssuedDate = Convert.ToDateTime(this.txtIssuedDate.Text);
|
||||
}
|
||||
// if (!string.IsNullOrEmpty(this.txtIssuedDate.Text))
|
||||
// {
|
||||
// nCRManagement.IssuedDate = Convert.ToDateTime(this.txtIssuedDate.Text);
|
||||
// }
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtClosedDate.Text))
|
||||
{
|
||||
nCRManagement.ClosedDate = Convert.ToDateTime(this.txtClosedDate.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtCompleteDate.Text))
|
||||
{
|
||||
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
||||
}
|
||||
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
||||
nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
nCRManagement.UnitWorkId = ids;
|
||||
// if (!string.IsNullOrEmpty(this.txtClosedDate.Text))
|
||||
// {
|
||||
// nCRManagement.ClosedDate = Convert.ToDateTime(this.txtClosedDate.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtCompleteDate.Text))
|
||||
// {
|
||||
// nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
||||
// }
|
||||
// nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
||||
// nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// 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;
|
||||
nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
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;
|
||||
// nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
|
||||
// BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_NCRManagementApprove();
|
||||
approve.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
NCRManagementApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_NCRManagementApprove();
|
||||
// approve.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// NCRManagementApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
newApprove.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
// newApprove.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
NCRManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
newApprove.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
NCRManagementApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// NCRManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
// newApprove.NCRManagementId = nCRManagement.NCRManagementId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// NCRManagementApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
reApprove.NCRManagementId = currApprove.NCRManagementId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
NCRManagementApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
reApprove.NCRManagementId = currApprove.NCRManagementId;
|
||||
reApprove.ApproveMan = nCRManagement.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
NCRManagementApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
// reApprove.NCRManagementId = currApprove.NCRManagementId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// // reApprove.ApproveIdea = txtidea.Text;
|
||||
// NCRManagementApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove();
|
||||
// reApprove.NCRManagementId = currApprove.NCRManagementId;
|
||||
// reApprove.ApproveMan = nCRManagement.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// NCRManagementApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
|
||||
@@ -192,51 +192,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -264,15 +219,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
<f:RenderField ColumnID="IssuedReportNumber" DataField="IssuedReportNumber" FieldType="String" HeaderText="已初具监检报告条数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="180px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}" />
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}" />--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -111,15 +111,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -60,16 +60,17 @@
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="150px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
<%--<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="150px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>--%>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="填报日期" ID="txtReportTime"
|
||||
LabelAlign="Right" LabelWidth="180px">
|
||||
LabelAlign="Right" LabelWidth="150px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="Label2" runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow ID="agree">
|
||||
<%-- <f:FormRow ID="agree">
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true">
|
||||
<f:RadioItem Text="同意" Value="true" Selected="true" />
|
||||
@@ -85,7 +86,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -96,8 +97,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -36,12 +36,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
GetButtonPower();
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
this.PressurePipeId = Request.Params["PressurePipeId"];
|
||||
Model.Comprehensive_PressurePipe pressurePipe = BLL.PressurePipeService.GetPressurePipeById(this.PressurePipeId);
|
||||
if (pressurePipe != null)
|
||||
@@ -64,35 +64,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtReportTime.Text = string.Format("{0:yyyy-MM-dd}", pressurePipe.ReportTime);
|
||||
}
|
||||
this.txtRemarkCode.Text = pressurePipe.RemarkCode.HasValue ? pressurePipe.RemarkCode.ToString() : "";
|
||||
var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtReportTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtReportTime.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -131,23 +131,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -173,10 +173,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
|
||||
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
|
||||
pressurePipe.Projctid = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text))
|
||||
{
|
||||
pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text);
|
||||
@@ -243,183 +243,183 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
|
||||
pressurePipe.Projctid = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text))
|
||||
{
|
||||
pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text);
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pressurePipe.UnitId = this.drpUnit.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtActualNumber.Text))
|
||||
{
|
||||
pressurePipe.ActualNumber = Convert.ToInt32(this.txtActualNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPackageNumber.Text))
|
||||
{
|
||||
pressurePipe.PackageNumber = Convert.ToInt32(this.txtPackageNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtCompletePackageNumber.Text))
|
||||
{
|
||||
pressurePipe.CompletePackageNumber = Convert.ToInt32(this.txtCompletePackageNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPressurePipeNumber.Text))
|
||||
{
|
||||
pressurePipe.PressurePipeNumber = Convert.ToInt32(this.txtPressurePipeNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIssuedReportNumber.Text))
|
||||
{
|
||||
pressurePipe.IssuedReportNumber = Convert.ToInt32(this.txtIssuedReportNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtReportTime.Text))
|
||||
{
|
||||
pressurePipe.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
|
||||
}
|
||||
pressurePipe.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.PressurePipeId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
pressurePipe.PressurePipeId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe));
|
||||
this.hdAttachUrl.Text = pressurePipe.PressurePipeId;
|
||||
}
|
||||
pressurePipe.CompileMan = this.CurrUser.UserId;
|
||||
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.PressurePipeService.AddPressurePipe(pressurePipe);
|
||||
}
|
||||
else
|
||||
{
|
||||
pressurePipe.PressurePipeId = this.PressurePipeId;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpUnit.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
|
||||
// pressurePipe.Projctid = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text))
|
||||
// {
|
||||
// pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text);
|
||||
// }
|
||||
// if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// pressurePipe.UnitId = this.drpUnit.SelectedValue;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtActualNumber.Text))
|
||||
// {
|
||||
// pressurePipe.ActualNumber = Convert.ToInt32(this.txtActualNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtPackageNumber.Text))
|
||||
// {
|
||||
// pressurePipe.PackageNumber = Convert.ToInt32(this.txtPackageNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtCompletePackageNumber.Text))
|
||||
// {
|
||||
// pressurePipe.CompletePackageNumber = Convert.ToInt32(this.txtCompletePackageNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtPressurePipeNumber.Text))
|
||||
// {
|
||||
// pressurePipe.PressurePipeNumber = Convert.ToInt32(this.txtPressurePipeNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtIssuedReportNumber.Text))
|
||||
// {
|
||||
// pressurePipe.IssuedReportNumber = Convert.ToInt32(this.txtIssuedReportNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtReportTime.Text))
|
||||
// {
|
||||
// pressurePipe.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
|
||||
// }
|
||||
// pressurePipe.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.PressurePipeId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// pressurePipe.PressurePipeId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe));
|
||||
// this.hdAttachUrl.Text = pressurePipe.PressurePipeId;
|
||||
// }
|
||||
// pressurePipe.CompileMan = this.CurrUser.UserId;
|
||||
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.PressurePipeService.AddPressurePipe(pressurePipe);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pressurePipe.PressurePipeId = this.PressurePipeId;
|
||||
// // 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);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_PressurePipeApprove();
|
||||
approve.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
PressurePipeApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_PressurePipeApprove();
|
||||
// approve.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// PressurePipeApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
newApprove.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
// newApprove.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
PressurePipeApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
newApprove.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
PressurePipeApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// PressurePipeApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
// newApprove.PressurePipeId = pressurePipe.PressurePipeId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// PressurePipeApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
reApprove.PressurePipeId = currApprove.PressurePipeId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
PressurePipeApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
reApprove.PressurePipeId = currApprove.PressurePipeId;
|
||||
reApprove.ApproveMan = pressurePipe.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
PressurePipeApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
// reApprove.PressurePipeId = currApprove.PressurePipeId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// // reApprove.ApproveIdea = txtidea.Text;
|
||||
// PressurePipeApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove();
|
||||
// reApprove.PressurePipeId = currApprove.PressurePipeId;
|
||||
// reApprove.ApproveMan = pressurePipe.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// PressurePipeApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -138,15 +138,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// drpAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpAudit;
|
||||
|
||||
/// <summary>
|
||||
/// txtReportTime 控件。
|
||||
/// </summary>
|
||||
@@ -157,40 +148,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
protected global::FineUIPro.DatePicker txtReportTime;
|
||||
|
||||
/// <summary>
|
||||
/// agree 控件。
|
||||
/// Label2 控件。
|
||||
/// </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;
|
||||
protected global::FineUIPro.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
@@ -219,15 +183,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
<f:RenderField ColumnID="CorrectiveActions" DataField="CorrectiveActions" FieldType="String" HeaderText="最终整改措施" TextAlign="Left"
|
||||
HeaderTextAlign="Center" Width="250px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="QualityAccidentId" DataIFrameUrlFormatString="./QualityAccidentApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="QualityAccidentId" DataIFrameUrlFormatString="./QualityAccidentApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -102,15 +102,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -88,7 +88,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -104,8 +104,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -37,11 +37,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
GetButtonPower();
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
|
||||
this.QualityAccidentId = Request.Params["QualityAccidentId"];
|
||||
Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId);
|
||||
@@ -61,42 +61,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpUnitWorkId.SelectedValueArray = pressurePipe.UnitWorkId.Split(',');
|
||||
}
|
||||
this.txtRemarkCode.Text = pressurePipe.RemarkCode.HasValue ? pressurePipe.RemarkCode.ToString() : "";
|
||||
var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtTime.Readonly = true;
|
||||
this.drpUnit.Readonly = true;
|
||||
this.drpUnitWorkId.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -123,23 +123,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
@@ -160,10 +160,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
|
||||
pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtTime.Text))
|
||||
{
|
||||
pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text);
|
||||
@@ -228,180 +228,180 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
|
||||
pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtTime.Text))
|
||||
{
|
||||
pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
pressurePipe.Time = DateTime.Now;
|
||||
}
|
||||
pressurePipe.Place = this.txtPlace.Text;
|
||||
pressurePipe.DirectEconomicLoss = this.txtDirectEconomicLoss.Text;
|
||||
pressurePipe.RemedialMeasures = this.txtRemedialMeasures.Text;
|
||||
pressurePipe.ResponsibilityDetermination = this.txtResponsibilityDetermination.Text;
|
||||
pressurePipe.CorrectiveActions = this.txtCorrectiveActions.Text;
|
||||
pressurePipe.UnitId = this.drpUnit.SelectedValue;
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkId.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
pressurePipe.UnitWorkId = ids;
|
||||
pressurePipe.RemarkCode =Funs.GetNewInt( this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.QualityAccidentId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
pressurePipe.QualityAccidentId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
|
||||
this.hdAttachUrl.Text = pressurePipe.QualityAccidentId;
|
||||
}
|
||||
pressurePipe.CompileMan = this.CurrUser.UserId;
|
||||
pressurePipe.CompileDate = DateTime.Now;
|
||||
pressurePipe.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.QualityAccidentService.AddQualityAccident(pressurePipe);
|
||||
}
|
||||
else
|
||||
{
|
||||
pressurePipe.QualityAccidentId = this.QualityAccidentId;
|
||||
// BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe);
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
|
||||
// pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// pressurePipe.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (!string.IsNullOrEmpty(this.txtTime.Text))
|
||||
// {
|
||||
// pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pressurePipe.Time = DateTime.Now;
|
||||
// }
|
||||
// pressurePipe.Place = this.txtPlace.Text;
|
||||
// pressurePipe.DirectEconomicLoss = this.txtDirectEconomicLoss.Text;
|
||||
// pressurePipe.RemedialMeasures = this.txtRemedialMeasures.Text;
|
||||
// pressurePipe.ResponsibilityDetermination = this.txtResponsibilityDetermination.Text;
|
||||
// pressurePipe.CorrectiveActions = this.txtCorrectiveActions.Text;
|
||||
// pressurePipe.UnitId = this.drpUnit.SelectedValue;
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorkId.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// pressurePipe.UnitWorkId = ids;
|
||||
// pressurePipe.RemarkCode =Funs.GetNewInt( this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.QualityAccidentId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// pressurePipe.QualityAccidentId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
|
||||
// this.hdAttachUrl.Text = pressurePipe.QualityAccidentId;
|
||||
// }
|
||||
// pressurePipe.CompileMan = this.CurrUser.UserId;
|
||||
// pressurePipe.CompileDate = DateTime.Now;
|
||||
// pressurePipe.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.QualityAccidentService.AddQualityAccident(pressurePipe);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pressurePipe.QualityAccidentId = this.QualityAccidentId;
|
||||
// // 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;
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_QualityAccidentApprove();
|
||||
approve.QualityAccidentId = pressurePipe.QualityAccidentId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
QualityAccidentApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_QualityAccidentApprove();
|
||||
// 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();
|
||||
newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
// newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
QualityAccidentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
QualityAccidentApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// QualityAccidentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
// newApprove.QualityAccidentId = pressurePipe.QualityAccidentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// QualityAccidentApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
reApprove.QualityAccidentId = currApprove.QualityAccidentId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
reApprove.ApproveIdea = txtidea.Text;
|
||||
QualityAccidentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
reApprove.QualityAccidentId = currApprove.QualityAccidentId;
|
||||
reApprove.ApproveMan = pressurePipe.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
QualityAccidentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
// reApprove.QualityAccidentId = currApprove.QualityAccidentId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// QualityAccidentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove();
|
||||
// reApprove.QualityAccidentId = currApprove.QualityAccidentId;
|
||||
// reApprove.ApproveMan = pressurePipe.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// QualityAccidentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -147,51 +147,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtRemarkCode;
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -228,15 +183,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -71,13 +71,13 @@
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="Id" DataIFrameUrlFormatString="./DesignDrawingsApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="Id" DataIFrameUrlFormatString="./DesignDrawingsApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -138,15 +138,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -77,7 +77,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -88,8 +88,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -38,12 +38,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
this.Id = Request.Params["Id"];
|
||||
var model = BLL.ReviewDrawingsService.Detail(this.Id);
|
||||
if (model != null)
|
||||
@@ -69,39 +69,39 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarks.Text = model.Remarks;
|
||||
this.txtRemarkCode.Text = model.RemarkCode.HasValue ? model.RemarkCode.ToString() : "";
|
||||
|
||||
var currApprove = DesignDrawingsApproveService.GetCurrentApprove(model.Id);
|
||||
if (currApprove != null)
|
||||
{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
//var currApprove = DesignDrawingsApproveService.GetCurrentApprove(model.Id);
|
||||
//if (currApprove != null)
|
||||
//{ //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && model.CreateMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (model.Status == BLL.Const.Comprehensive_Compile && model.CreateMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && model.CreateMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (model.Status == BLL.Const.Comprehensive_Compile && model.CreateMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
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.txtRemarks.Readonly = true;
|
||||
this.txtReviewDate.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -130,23 +130,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@@ -286,181 +286,181 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var designDrawings = new Model.Comprehensive_ReviewDrawings();
|
||||
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
|
||||
designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
designDrawings.DraCode = this.txtDraCode.Text.Trim();
|
||||
designDrawings.ReviewDate = Funs.GetNewDateTime(this.txtReviewDate.Text);
|
||||
designDrawings.Remarks = this.txtRemarks.Text.Trim();
|
||||
designDrawings.CreateMan = this.CurrUser.UserId;
|
||||
designDrawings.CreateDate = DateTime.Now;
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
ids += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
}
|
||||
designDrawings.UnitWorkId = ids;
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var designDrawings = new Model.Comprehensive_ReviewDrawings();
|
||||
// designDrawings.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// designDrawings.DraCode = this.txtDraCode.Text.Trim();
|
||||
// designDrawings.ReviewDate = Funs.GetNewDateTime(this.txtReviewDate.Text);
|
||||
// designDrawings.Remarks = this.txtRemarks.Text.Trim();
|
||||
// designDrawings.CreateMan = this.CurrUser.UserId;
|
||||
// designDrawings.CreateDate = DateTime.Now;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// designDrawings.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// string ids = string.Empty;
|
||||
// var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
// foreach (var item in lists)
|
||||
// {
|
||||
// ids += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(ids))
|
||||
// {
|
||||
// ids = ids.Substring(0, ids.LastIndexOf(","));
|
||||
// }
|
||||
// designDrawings.UnitWorkId = ids;
|
||||
|
||||
string unitIds = string.Empty;
|
||||
var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
foreach (var item in unitLists)
|
||||
{
|
||||
unitIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
designDrawings.ReceiveUnits = unitIds;
|
||||
designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
designDrawings.Id = this.Id;
|
||||
//BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
var oldDesignDrawings = Funs.DB.Comprehensive_ReviewDrawings.Where(u => u.Id == this.Id).FirstOrDefault();
|
||||
if (oldDesignDrawings == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
designDrawings.CreateMan = this.CurrUser.UserId;
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.ReviewDrawingsService.Insert(designDrawings);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (oldDesignDrawings.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldDesignDrawings.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDrawings.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// string unitIds = string.Empty;
|
||||
// var unitLists = this.drpUnitIds.SelectedValueArray;
|
||||
// foreach (var item in unitLists)
|
||||
// {
|
||||
// unitIds += item + ",";
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(unitIds))
|
||||
// {
|
||||
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
// }
|
||||
// designDrawings.ReceiveUnits = unitIds;
|
||||
// designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(this.Id))
|
||||
// {
|
||||
// designDrawings.Id = this.Id;
|
||||
// BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings);
|
||||
// var oldDesignDrawings = Funs.DB.Comprehensive_ReviewDrawings.Where(u => u.Id == this.Id).FirstOrDefault();
|
||||
// if (oldDesignDrawings == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// designDrawings.CreateMan = this.CurrUser.UserId;
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.ReviewDrawingsService.Insert(designDrawings);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
BLL.ReviewDrawingsService.Update(designDrawings);
|
||||
// if (oldDesignDrawings.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldDesignDrawings.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
designDrawings.Id = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
designDrawings.Id = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
this.hdAttachUrl.Text = designDrawings.Id;
|
||||
}
|
||||
// BLL.ReviewDrawingsService.Update(designDrawings);
|
||||
|
||||
designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.ReviewDrawingsService.Insert(designDrawings);
|
||||
}
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// designDrawings.Id = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// designDrawings.Id = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
// this.hdAttachUrl.Text = designDrawings.Id;
|
||||
// }
|
||||
|
||||
// designDrawings.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.ReviewDrawingsService.Insert(designDrawings);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 审核记录
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.Id);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
approve.DesignDrawingsId = designDrawings.Id;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
DesignDrawingsApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.Id);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// approve.DesignDrawingsId = designDrawings.Id;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// DesignDrawingsApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
newApprove.DesignDrawingsId = designDrawings.Id;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// newApprove.DesignDrawingsId = designDrawings.Id;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
DesignDrawingsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
newApprove.DesignDrawingsId = designDrawings.Id;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
DesignDrawingsApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// currApprove.IsAgree = true;
|
||||
// DesignDrawingsApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// newApprove.DesignDrawingsId = designDrawings.Id;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// DesignDrawingsApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
reApprove.ApproveMan = designDrawings.CreateMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove();
|
||||
// reApprove.DesignDrawingsId = currApprove.DesignDrawingsId;
|
||||
// reApprove.ApproveMan = designDrawings.CreateMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// DesignDrawingsApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 保存方法
|
||||
|
||||
@@ -129,51 +129,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -201,15 +156,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="VisaId" DataIFrameUrlFormatString="./SiteVisaManagementApprove.aspx?Id={0}" />
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="VisaId" DataIFrameUrlFormatString="./SiteVisaManagementApprove.aspx?Id={0}" />--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -147,15 +147,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<%-- <f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
@@ -94,7 +94,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -105,8 +105,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -38,12 +38,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, true);
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
this.VisaId = Request.Params["VisaId"];
|
||||
Model.Comprehensive_SiteVisaManagement siteVisaManagement = BLL.SiteVisaManagementService.GetSiteVisaManagementById(this.VisaId);
|
||||
if (siteVisaManagement != null)
|
||||
@@ -78,35 +78,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtRemarkCode.Text = siteVisaManagement.RemarkCode.HasValue ? siteVisaManagement.RemarkCode.ToString() : "";
|
||||
|
||||
|
||||
var currApprove = SiteVisaManagementApproveService.GetCurrentApprove(siteVisaManagement.VisaId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && siteVisaManagement.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = SiteVisaManagementApproveService.GetCurrentApprove(siteVisaManagement.VisaId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && siteVisaManagement.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (siteVisaManagement.Status == BLL.Const.Comprehensive_Compile && siteVisaManagement.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (siteVisaManagement.Status == BLL.Const.Comprehensive_Compile && siteVisaManagement.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtVisaDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.txtVisaDate.Readonly = true;
|
||||
this.drpUnitWorkId.Readonly = true;
|
||||
this.drpProcessingState.Readonly = true;
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
@@ -142,23 +142,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
@@ -182,10 +182,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
Model.Comprehensive_SiteVisaManagement siteVisaManagement = new Model.Comprehensive_SiteVisaManagement();
|
||||
siteVisaManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
siteVisaManagement.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// siteVisaManagement.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
siteVisaManagement.UnitId = this.drpUnitId.SelectedValue;
|
||||
@@ -240,172 +240,172 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_SiteVisaManagement siteVisaManagement = new Model.Comprehensive_SiteVisaManagement();
|
||||
siteVisaManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
siteVisaManagement.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
siteVisaManagement.UnitId = this.drpUnitId.SelectedValue;
|
||||
}
|
||||
siteVisaManagement.VisaCode = this.txtVisaCode.Text.Trim();
|
||||
siteVisaManagement.VisaContent = this.txtVisaContent.Text.Trim();
|
||||
siteVisaManagement.ProcessingState = this.drpProcessingState.SelectedValue.Trim();
|
||||
if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
siteVisaManagement.UnitWorkId = this.drpUnitWorkId.SelectedValue;
|
||||
}
|
||||
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
siteVisaManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtVisaDate.Text))
|
||||
{
|
||||
siteVisaManagement.VisaDate = Convert.ToDateTime(this.txtVisaDate.Text);
|
||||
}
|
||||
siteVisaManagement.SignMan = this.txtSignMan.Text.Trim();
|
||||
siteVisaManagement.AuditMan = this.txtAuditMan.Text.Trim();
|
||||
siteVisaManagement.Remark = this.txtRemark.Text.Trim();
|
||||
siteVisaManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.VisaId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
siteVisaManagement.VisaId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
siteVisaManagement.VisaId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagement));
|
||||
this.hdAttachUrl.Text = siteVisaManagement.VisaId;
|
||||
}
|
||||
siteVisaManagement.CompileMan = this.CurrUser.UserId;
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.SiteVisaManagementService.AddSiteVisaManagement(siteVisaManagement);
|
||||
}
|
||||
else
|
||||
{
|
||||
siteVisaManagement.VisaId = this.VisaId;
|
||||
// BLL.SiteVisaManagementService.UpdateSiteVisaManagement(siteVisaManagement);
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_SiteVisaManagement siteVisaManagement = new Model.Comprehensive_SiteVisaManagement();
|
||||
// siteVisaManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// siteVisaManagement.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// siteVisaManagement.UnitId = this.drpUnitId.SelectedValue;
|
||||
// }
|
||||
// siteVisaManagement.VisaCode = this.txtVisaCode.Text.Trim();
|
||||
// siteVisaManagement.VisaContent = this.txtVisaContent.Text.Trim();
|
||||
// siteVisaManagement.ProcessingState = this.drpProcessingState.SelectedValue.Trim();
|
||||
// if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// siteVisaManagement.UnitWorkId = this.drpUnitWorkId.SelectedValue;
|
||||
// }
|
||||
// if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// siteVisaManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtVisaDate.Text))
|
||||
// {
|
||||
// siteVisaManagement.VisaDate = Convert.ToDateTime(this.txtVisaDate.Text);
|
||||
// }
|
||||
// siteVisaManagement.SignMan = this.txtSignMan.Text.Trim();
|
||||
// siteVisaManagement.AuditMan = this.txtAuditMan.Text.Trim();
|
||||
// siteVisaManagement.Remark = this.txtRemark.Text.Trim();
|
||||
// siteVisaManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.VisaId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// siteVisaManagement.VisaId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// siteVisaManagement.VisaId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagement));
|
||||
// this.hdAttachUrl.Text = siteVisaManagement.VisaId;
|
||||
// }
|
||||
// siteVisaManagement.CompileMan = this.CurrUser.UserId;
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.SiteVisaManagementService.AddSiteVisaManagement(siteVisaManagement);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// siteVisaManagement.VisaId = this.VisaId;
|
||||
// // BLL.SiteVisaManagementService.UpdateSiteVisaManagement(siteVisaManagement);
|
||||
|
||||
var oldSiteVisaManagement = Funs.DB.Comprehensive_SiteVisaManagement.Where(u => u.VisaId == this.VisaId).FirstOrDefault();
|
||||
if (oldSiteVisaManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
{
|
||||
siteVisaManagement.CompileMan = this.CurrUser.UserId;
|
||||
//siteVisaManagement.CompileDate = DateTime.Now;
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.SiteVisaManagementService.AddSiteVisaManagement(siteVisaManagement);
|
||||
}
|
||||
else
|
||||
{
|
||||
siteVisaManagement.CompileMan = oldSiteVisaManagement.CompileMan;
|
||||
//siteVisaManagement.CompileDate = oldSiteVisaManagement.CompileDate;
|
||||
if (oldSiteVisaManagement.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
{
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else if (oldSiteVisaManagement.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
{
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
}
|
||||
else //审核状态 提交 变 完成 或者 重新编制
|
||||
{
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
{
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
siteVisaManagement.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
}
|
||||
}
|
||||
// var oldSiteVisaManagement = Funs.DB.Comprehensive_SiteVisaManagement.Where(u => u.VisaId == this.VisaId).FirstOrDefault();
|
||||
// if (oldSiteVisaManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
// {
|
||||
// siteVisaManagement.CompileMan = this.CurrUser.UserId;
|
||||
// //siteVisaManagement.CompileDate = DateTime.Now;
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.SiteVisaManagementService.AddSiteVisaManagement(siteVisaManagement);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// siteVisaManagement.CompileMan = oldSiteVisaManagement.CompileMan;
|
||||
// //siteVisaManagement.CompileDate = oldSiteVisaManagement.CompileDate;
|
||||
// if (oldSiteVisaManagement.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
|
||||
// {
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else if (oldSiteVisaManagement.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
|
||||
// {
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
// }
|
||||
// else //审核状态 提交 变 完成 或者 重新编制
|
||||
// {
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
|
||||
// {
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_Complete;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// siteVisaManagement.Status = BLL.Const.Comprehensive_ReCompile;
|
||||
// }
|
||||
// }
|
||||
|
||||
BLL.SiteVisaManagementService.UpdateSiteVisaManagement(siteVisaManagement);
|
||||
// BLL.SiteVisaManagementService.UpdateSiteVisaManagement(siteVisaManagement);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = SiteVisaManagementApproveService.GetCurrentApprove(siteVisaManagement.VisaId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
approve.VisaId = siteVisaManagement.VisaId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
SiteVisaManagementApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = SiteVisaManagementApproveService.GetCurrentApprove(siteVisaManagement.VisaId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
// approve.VisaId = siteVisaManagement.VisaId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// SiteVisaManagementApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_SiteVisaManagementApprove newApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
newApprove.VisaId = siteVisaManagement.VisaId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
SiteVisaManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_SiteVisaManagementApprove newApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
// newApprove.VisaId = siteVisaManagement.VisaId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// SiteVisaManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
SiteVisaManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_SiteVisaManagementApprove newApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
newApprove.VisaId = siteVisaManagement.VisaId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
SiteVisaManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
SiteVisaManagementApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// SiteVisaManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_SiteVisaManagementApprove newApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
// newApprove.VisaId = siteVisaManagement.VisaId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// SiteVisaManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// SiteVisaManagementApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_SiteVisaManagementApprove reApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
reApprove.VisaId = currApprove.VisaId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
reApprove.ApproveIdea = txtidea.Text;
|
||||
SiteVisaManagementApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_SiteVisaManagementApprove reApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
reApprove.VisaId = currApprove.VisaId;
|
||||
reApprove.ApproveMan = siteVisaManagement.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
SiteVisaManagementApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_SiteVisaManagementApprove reApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
// reApprove.VisaId = currApprove.VisaId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// SiteVisaManagementApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_SiteVisaManagementApprove reApprove = new Model.Comprehensive_SiteVisaManagementApprove();
|
||||
// reApprove.VisaId = currApprove.VisaId;
|
||||
// reApprove.ApproveMan = siteVisaManagement.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// SiteVisaManagementApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
-54
@@ -165,51 +165,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtRemarkCode;
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -237,15 +192,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -68,13 +68,13 @@
|
||||
<f:RenderField ColumnID="MonitoringReportNumber" DataField="MonitoringReportNumber" FieldType="String" HeaderText="监检报告数量" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="160px">
|
||||
</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>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="SpecialEquipmentId" DataIFrameUrlFormatString="./SpecialEquipmentApprove.aspx?Id={0}"/>
|
||||
</f:TemplateField>--%>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="SpecialEquipmentId" DataIFrameUrlFormatString="./SpecialEquipmentApprove.aspx?Id={0}"/>--%>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -120,15 +120,6 @@ namespace FineUIPro.Web.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -55,16 +55,17 @@
|
||||
|
||||
<f:FormRow MarginTop="10px">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="填报日期" ID="txtReportTime"
|
||||
LabelAlign="Right" LabelWidth="130px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="Label2" runat="server"></f:Label>
|
||||
<%-- <f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
|
||||
</f:DropDownList>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow ID="agree">
|
||||
<%-- <f:FormRow ID="agree">
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true">
|
||||
<f:RadioItem Text="同意" Value="true" Selected="true" />
|
||||
@@ -80,7 +81,7 @@
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
@@ -91,8 +92,8 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -39,12 +39,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
|
||||
BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true);
|
||||
|
||||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
//this.btnSubmit.Hidden = true;
|
||||
Model.Comprehensive_SpecialEquipment specialEquipment = BLL.SpecialEquipmentServices.GetEquipmentById(this.SpecialEquipmentId);
|
||||
if (specialEquipment != null)
|
||||
{
|
||||
@@ -68,35 +68,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
this.txtRemarkCode.Text = specialEquipment.RemarkCode.HasValue ? specialEquipment.RemarkCode.ToString() : "";
|
||||
|
||||
var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId);
|
||||
if (currApprove != null)
|
||||
{
|
||||
this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
//重新编制 编制人 可以 显示 提交 保存按钮
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && specialEquipment.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
//var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
|
||||
// //重新编制 编制人 可以 显示 提交 保存按钮
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && specialEquipment.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }//审核状态 审核人 可以显示 提交 保存按钮
|
||||
// else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// //审核状态不可编辑
|
||||
// Readonly();
|
||||
|
||||
this.agree.Hidden = false;
|
||||
this.options.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
else
|
||||
{
|
||||
if (specialEquipment.Status == BLL.Const.Comprehensive_Compile && specialEquipment.CompileMan == CurrUser.UserId)
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
// this.agree.Hidden = false;
|
||||
// this.options.Hidden = false;
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}//没有当前审核人,已完成状态 或者 待提交状态
|
||||
//else
|
||||
//{
|
||||
// if (specialEquipment.Status == BLL.Const.Comprehensive_Compile && specialEquipment.CompileMan == CurrUser.UserId)
|
||||
// {
|
||||
// this.btnSubmit.Hidden = false;
|
||||
// this.btnSave.Hidden = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtReportTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
//this.btnSubmit.Hidden = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
this.drpUnit.Readonly = true;
|
||||
this.txtPositionNum.Readonly = true;
|
||||
|
||||
this.drpAudit.Readonly = true;
|
||||
//this.drpAudit.Readonly = true;
|
||||
this.txtRemarkCode.Readonly = true;
|
||||
|
||||
// this.btnAttach.Enabled = false;
|
||||
@@ -136,23 +136,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <summary>
|
||||
/// 加载专业工程师
|
||||
/// </summary>
|
||||
public void LoadAuditSelect()
|
||||
{
|
||||
//public void LoadAuditSelect()
|
||||
//{
|
||||
|
||||
var db = Funs.DB;
|
||||
var userList = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
join p in db.Project_ProjectUser
|
||||
on x.UserId equals p.UserId
|
||||
where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
select new { UserId = x.UserId, UserName = x.UserName };
|
||||
drpAudit.DataValueField = "UserId";
|
||||
drpAudit.DataTextField = "UserName";
|
||||
this.drpAudit.DataSource = userList.ToList();
|
||||
this.drpAudit.DataBind();
|
||||
}
|
||||
// var db = Funs.DB;
|
||||
// var userList = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUnit
|
||||
// on x.UnitId equals y.UnitId
|
||||
// join p in db.Project_ProjectUser
|
||||
// on x.UserId equals p.UserId
|
||||
// where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
|
||||
// where p.RoleId.Contains(Const.ZBCNEngineer)
|
||||
// select new { UserId = x.UserId, UserName = x.UserName };
|
||||
// drpAudit.DataValueField = "UserId";
|
||||
// drpAudit.DataTextField = "UserName";
|
||||
// this.drpAudit.DataSource = userList.ToList();
|
||||
// this.drpAudit.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -177,10 +177,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
|
||||
specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
specialEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
//{
|
||||
// specialEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
//} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtSunNumber.Text))
|
||||
{
|
||||
specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text);
|
||||
@@ -243,179 +243,179 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
|
||||
specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
{
|
||||
specialEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
} //审核人
|
||||
if (!string.IsNullOrEmpty(this.txtSunNumber.Text))
|
||||
{
|
||||
specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text);
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
specialEquipment.UnitId = this.drpUnit.SelectedValue;
|
||||
}
|
||||
if (this.drpEquipmentId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
specialEquipment.EquipmentId = this.drpEquipmentId.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtSubmitDataNumber.Text))
|
||||
{
|
||||
specialEquipment.SubmitDataNumber = Convert.ToInt32(this.txtSubmitDataNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtMonitoringReportNumber.Text))
|
||||
{
|
||||
specialEquipment.MonitoringReportNumber = Convert.ToInt32(this.txtMonitoringReportNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtInformNumber.Text))
|
||||
{
|
||||
specialEquipment.InformNumber = Convert.ToInt32(this.txtInformNumber.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtReportTime.Text))
|
||||
{
|
||||
specialEquipment.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
|
||||
}
|
||||
specialEquipment.PositionNum = this.txtPositionNum.Text.Trim();
|
||||
specialEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (string.IsNullOrEmpty(this.SpecialEquipmentId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
specialEquipment.SpecialEquipmentId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment));
|
||||
this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId;
|
||||
}
|
||||
specialEquipment.CompileMan = this.CurrUser.UserId;
|
||||
specialEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.SpecialEquipmentServices.AddEquipment(specialEquipment);
|
||||
}
|
||||
else
|
||||
{
|
||||
specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpUnit.SelectedValue == BLL.Const._Null)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
|
||||
// if (q != null)
|
||||
// {
|
||||
// Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
|
||||
// specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
|
||||
// {
|
||||
// specialEquipment.AuditMan = drpAudit.SelectedValue;
|
||||
// } //审核人
|
||||
// if (!string.IsNullOrEmpty(this.txtSunNumber.Text))
|
||||
// {
|
||||
// specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text);
|
||||
// }
|
||||
// if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// specialEquipment.UnitId = this.drpUnit.SelectedValue;
|
||||
// }
|
||||
// if (this.drpEquipmentId.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// specialEquipment.EquipmentId = this.drpEquipmentId.SelectedValue;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtSubmitDataNumber.Text))
|
||||
// {
|
||||
// specialEquipment.SubmitDataNumber = Convert.ToInt32(this.txtSubmitDataNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtMonitoringReportNumber.Text))
|
||||
// {
|
||||
// specialEquipment.MonitoringReportNumber = Convert.ToInt32(this.txtMonitoringReportNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtInformNumber.Text))
|
||||
// {
|
||||
// specialEquipment.InformNumber = Convert.ToInt32(this.txtInformNumber.Text);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtReportTime.Text))
|
||||
// {
|
||||
// specialEquipment.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
|
||||
// }
|
||||
// specialEquipment.PositionNum = this.txtPositionNum.Text.Trim();
|
||||
// specialEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
// if (string.IsNullOrEmpty(this.SpecialEquipmentId))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
// {
|
||||
// specialEquipment.SpecialEquipmentId = this.hdAttachUrl.Text;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment));
|
||||
// this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId;
|
||||
// }
|
||||
// specialEquipment.CompileMan = this.CurrUser.UserId;
|
||||
// specialEquipment.Status = BLL.Const.Comprehensive_Audit;
|
||||
// BLL.SpecialEquipmentServices.AddEquipment(specialEquipment);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId;
|
||||
// // 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);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
#region 审核记录
|
||||
// }
|
||||
// #region 审核记录
|
||||
|
||||
var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId);
|
||||
if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
{
|
||||
var approve = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
approve.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
approve.ApproveMan = this.CurrUser.UserId;
|
||||
approve.ApproveType = Const.Comprehensive_Compile;
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
SpecialEquipmentApproveService.EditApprove(approve); //新增编制记录
|
||||
// var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId);
|
||||
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
|
||||
// {
|
||||
// var approve = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
// approve.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
// approve.ApproveMan = this.CurrUser.UserId;
|
||||
// approve.ApproveType = Const.Comprehensive_Compile;
|
||||
// approve.ApproveDate = DateTime.Now;
|
||||
// SpecialEquipmentApproveService.EditApprove(approve); //新增编制记录
|
||||
|
||||
|
||||
Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
// newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
|
||||
}
|
||||
else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now;
|
||||
//currApprove.IsAgree = true;
|
||||
SpecialEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
}
|
||||
else
|
||||
{
|
||||
currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
currApprove.ApproveIdea = this.txtidea.Text;
|
||||
SpecialEquipmentApproveService.EditApprove(currApprove);
|
||||
// }
|
||||
// else if (currApprove.ApproveMan == CurrUser.UserId)
|
||||
// {
|
||||
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now;
|
||||
// //currApprove.IsAgree = true;
|
||||
// SpecialEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录
|
||||
// Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
// newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
|
||||
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
|
||||
// newApprove.ApproveType = Const.InspectionManagement_Audit;
|
||||
// SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
|
||||
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
// currApprove.ApproveIdea = this.txtidea.Text;
|
||||
// SpecialEquipmentApproveService.EditApprove(currApprove);
|
||||
|
||||
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
{
|
||||
Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
|
||||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
reApprove.ApproveIdea = txtidea.Text;
|
||||
SpecialEquipmentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
|
||||
reApprove.ApproveMan = specialEquipment.CompileMan;
|
||||
reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
SpecialEquipmentApproveService.EditApprove(reApprove);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
|
||||
// {
|
||||
// Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
// reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
|
||||
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
// reApprove.ApproveMan = CurrUser.UserId;
|
||||
// reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// SpecialEquipmentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove();
|
||||
// reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId;
|
||||
// reApprove.ApproveMan = specialEquipment.CompileMan;
|
||||
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
|
||||
// SpecialEquipmentApproveService.EditApprove(reApprove);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
// ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
|
||||
+2
-47
@@ -138,15 +138,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// drpAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpAudit;
|
||||
|
||||
/// <summary>
|
||||
/// txtReportTime 控件。
|
||||
/// </summary>
|
||||
@@ -157,40 +148,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
protected global::FineUIPro.DatePicker txtReportTime;
|
||||
|
||||
/// <summary>
|
||||
/// agree 控件。
|
||||
/// Label2 控件。
|
||||
/// </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;
|
||||
protected global::FineUIPro.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
@@ -219,15 +183,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user