20240412 质量月报

This commit is contained in:
2024-04-12 23:13:34 +08:00
parent 549b2550c4
commit 95511d1a9c
85 changed files with 1528 additions and 926 deletions
@@ -119,19 +119,19 @@
</f:RenderField>
</Columns>
</f:GroupField>
<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="DataReceivingDocId" DataIFrameUrlFormatString="./DataReceivingDocApprove.aspx?Id={0}" />
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
</f:TemplateField>--%>
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="DataReceivingDocId" DataIFrameUrlFormatString="./DataReceivingDocApprove.aspx?Id={0}" />--%>
<%--<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("DataReceivingDocId")) %>' ToolTip="附件查看"></asp:LinkButton>
</ItemTemplate>
</f:TemplateField>
</f:TemplateField>--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -152,16 +152,16 @@
</f:Panel>
<f:Window ID="Window1" Title="资料收发文登记记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1024px" Height="650px">
Width="1024px" Height="550px">
</f:Window>
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<%--<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="560px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
</f:Window>--%>
<%--<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px">
</f:Window>
</f:Window>--%>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
doc.IssueToUnit,
doc.IssueCopies,
doc.IssueUnitReceiver,
(CASE WHEN doc.IsOnFile='True' THEN '是' ELSE '' END) AS IsOnFile,
(CASE doc.IsOnFile WHEN 'True' THEN '是' WHEN 'False' THEN '否' ELSE '' END) AS IsOnFile,
doc.CompileMan,
doc.CompileDate,
doc.Status,
@@ -129,24 +129,6 @@ namespace FineUIPro.Web.CQMS.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>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -174,24 +156,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -23,13 +23,13 @@
<f:TextBox ID="txtFileCode" runat="server" Label="文件号" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:TextBox ID="txtFileName" runat="server" Label="文件名称" MaxLength="150" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="日期" ID="txtReceiveDate"
LabelAlign="Right" LabelWidth="130px">
LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtFileType" Label="文件类别" runat="server" LabelAlign="Right" LabelWidth="130px">
<f:TextBox ID="txtFileType" Label="文件类别" runat="server" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:DropDownList>
<%--<f:DropDownList ID="drpSendUnit" runat="server" Label="发件单位" EnableCheckBoxSelect="true" EnableMultiSelect="true" AutoSelectFirstItem="false" LabelAlign="Right" LabelWidth="130px"></f:DropDownList>--%>
@@ -38,9 +38,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtCopies" Label="份数" runat="server" NoDecimal="true" LabelAlign="Right" LabelWidth="130px" NoNegative="true">
<f:NumberBox ID="txtCopies" Label="份数" runat="server" NoDecimal="true" LabelAlign="Right" LabelWidth="130px" NoNegative="true" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:TextBox ID="txtSendMan" Label="发件人" runat="server" LabelAlign="Right" LabelWidth="130px">
<f:TextBox ID="txtSendMan" Label="发件人" runat="server" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtDocumentHandler" Label="文件处理人" runat="server" LabelAlign="Right" LabelWidth="130px">
</f:TextBox>
@@ -103,8 +103,8 @@
<f:NumberBox ID="txtIssueCopies" Label="下发份数" runat="server" NoDecimal="true" LabelAlign="Right" LabelWidth="130px" NoNegative="true">
</f:NumberBox>
<f:TextBox ID="txtIssueUnitReceiver" runat="server" Label="下发单位接收人" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:RadioButtonList runat="server" ID="rblIsOnFile" Label="是否存档" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px">
<f:RadioItem Text="是" Value="true" Selected="true" />
<f:RadioButtonList runat="server" ID="rblIsOnFile" Label="是否存档" LabelAlign="Right" LabelWidth="130px">
<f:RadioItem Text="是" Value="true" />
<f:RadioItem Text="否" Value="false" />
</f:RadioButtonList>
</Items>
@@ -115,7 +115,7 @@
</f:GroupPanel>
</Items>
</f:FormRow>
<f:FormRow>
<%--<f:FormRow>
<Items>
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
@@ -127,45 +127,45 @@
</Items>
</f:Panel>
</Items>
</f:FormRow>
<f:FormRow MarginTop="10px">
</f:FormRow>--%>
<%--<f:FormRow MarginTop="10px">
<Items>
<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>--%>
<%--<f:FormRow ID="agree">
<Items>
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true">
<f:RadioItem Text="同意" Value="true" Selected="true" />
<f:RadioItem Text="不同意" Value="false" Selected="true" />
</f:RadioButtonList>
</Items>
</f:FormRow>
<f:FormRow ID="options">
</f:FormRow>--%>
<%--<f:FormRow ID="options">
<Items>
<f:TextArea ID="txtidea" ShowRedStar="true" runat="server" Label="办理意见" MaxLength="3000">
</f:TextArea>
</Items>
</f:FormRow>
</f:FormRow>--%>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>
<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:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>--%>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<%--<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</f:Window>--%>
</form>
</body>
</html>
@@ -28,22 +28,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <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();
}
//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();
//}
#endregion
#region
@@ -72,8 +72,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtIssueCopies.Readonly = true;
this.txtIssueUnitReceiver.Readonly = true;
this.rblIsOnFile.Readonly = true;
this.drpAudit.Readonly = true;
this.btnAttach.Enabled = false;
//this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false;
}
#endregion
@@ -88,21 +88,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.drpSendUnitId, this.CurrUser.LoginProjectId, false);//发件单位
BLL.UnitService.InitUnitDownList(this.drpReceiveUnit, this.CurrUser.LoginProjectId, false);//接收单位
BLL.UnitService.InitUnitDownList(this.drpIssueToUnit, this.CurrUser.LoginProjectId, false);//下发至单位
BLL.UnitService.GetUnit(this.drpSendUnitId, this.CurrUser.LoginProjectId, false);//发件单位
BLL.UnitService.GetUnit(this.drpReceiveUnit, this.CurrUser.LoginProjectId, false);//接收单位
BLL.UnitService.GetUnit(this.drpIssueToUnit, this.CurrUser.LoginProjectId, 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.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
//this.btnSave.Hidden = true;
//this.btnSubmit.Hidden = true;
this.DataReceivingDocId = Request.Params["DataReceivingDocId"];
Model.Comprehensive_DataReceivingDoc dataReceivingDoc = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
if (dataReceivingDoc != null)
{
this.hdAttachUrl.Text = this.DataReceivingDocId;
//this.hdAttachUrl.Text = this.DataReceivingDocId;
this.txtFileCode.Text = dataReceivingDoc.FileCode;
this.txtFileName.Text = dataReceivingDoc.FileName;
this.txtReceiveDate.Text = dataReceivingDoc.ReceiveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", dataReceivingDoc.ReceiveDate) : "";
@@ -141,48 +141,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
this.txtIssueCopies.Text = dataReceivingDoc.IssueCopies.HasValue ? dataReceivingDoc.IssueCopies.ToString() : "";
this.txtIssueUnitReceiver.Text = dataReceivingDoc.IssueUnitReceiver;
if (dataReceivingDoc.IsOnFile == true)
if (dataReceivingDoc.IsOnFile.HasValue)
{
this.rblIsOnFile.SelectedValue = "true";
}
else
{
this.rblIsOnFile.SelectedValue = "false";
}
var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
if (currApprove != null)
{ //重新编制 编制人 可以 显示 提交 保存按钮
this.drpAudit.SelectedValue = currApprove.ApproveMan;
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && dataReceivingDoc.CompileMan == CurrUser.UserId)
if (dataReceivingDoc.IsOnFile == true)
{
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;
this.rblIsOnFile.SelectedValue = "true";
}
}//没有当前审核人,已完成状态 或者 待提交状态
else
{
if (dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile && dataReceivingDoc.CompileMan == CurrUser.UserId)
else
{
this.btnSubmit.Hidden = false;
this.btnSave.Hidden = false;
this.rblIsOnFile.SelectedValue = "false";
}
}
//var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
//if (currApprove != null)
//{ //重新编制 编制人 可以 显示 提交 保存按钮
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && dataReceivingDoc.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 (dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile && dataReceivingDoc.CompileMan == CurrUser.UserId)
// {
// this.btnSubmit.Hidden = false;
// this.btnSave.Hidden = false;
// }
//}
}
else
{
this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false;
// this.btnSave.Hidden = false;
// this.btnSubmit.Hidden = false;
this.txtReceiveDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
}
}
@@ -257,23 +261,26 @@ namespace FineUIPro.Web.CQMS.Comprehensive
dataReceivingDoc.IssueToUnit = issueToUnits;
dataReceivingDoc.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
dataReceivingDoc.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
if (!string.IsNullOrEmpty(this.rblIsOnFile.SelectedValue))
{
dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
} //审核人
dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
}
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
//{
// dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
//} //审核人
if (string.IsNullOrEmpty(this.DataReceivingDocId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{
dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
}
else
{
//if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
//{
// dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
//}
//else
//{
dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
}
//this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
//}
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceivingDoc.DataReceivingDocId);
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
//{
@@ -282,22 +289,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//}
dataReceivingDoc.CompileMan = this.CurrUser.UserId;
dataReceivingDoc.CompileDate = DateTime.Now;
dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
//dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
BLL.DataReceivingDocService.AddDataReceivingDoc(dataReceivingDoc);
}
else
{
dataReceivingDoc.DataReceivingDocId = this.DataReceivingDocId;
var model = Funs.DB.Comprehensive_DataReceivingDoc.Where(u => u.DataReceivingDocId == this.DataReceivingDocId).FirstOrDefault();
if (model != null)
{
dataReceivingDoc.Status = model.Status;
}
else
{
dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
}
//var model = Funs.DB.Comprehensive_DataReceivingDoc.Where(u => u.DataReceivingDocId == this.DataReceivingDocId).FirstOrDefault();
//if (model != null)
//{
// dataReceivingDoc.Status = model.Status;
//}
//else
//{
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
//}
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingDocId);
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
//{
@@ -315,182 +322,182 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_DataReceivingDoc dataReceivingDoc = new Model.Comprehensive_DataReceivingDoc();
dataReceivingDoc.ProjectId = this.CurrUser.LoginProjectId;
dataReceivingDoc.FileCode = this.txtFileCode.Text.Trim();
dataReceivingDoc.FileName = this.txtFileName.Text.Trim();
dataReceivingDoc.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
dataReceivingDoc.FileType = this.txtFileType.Text.Trim();
dataReceivingDoc.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
//string unitIds = string.Empty;
//var unitList = this.drpSendUnit.SelectedValueArray;
//foreach (var item in unitList)
//{
// unitIds += item + ",";
//}
//if (!string.IsNullOrEmpty(unitIds))
//{
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
//}
dataReceivingDoc.SendUnit = drpSendUnitId.SelectedValue;
dataReceivingDoc.SendMan = this.txtSendMan.Text.Trim();
dataReceivingDoc.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
dataReceivingDoc.DocumentHandler = this.txtDocumentHandler.Text.Trim();
dataReceivingDoc.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
string receivingUnits = string.Empty;
var receivingUnitList = this.drpReceiveUnit.SelectedValueArray;
foreach (var item in receivingUnitList)
{
receivingUnits += item + ",";
}
if (!string.IsNullOrEmpty(receivingUnits))
{
receivingUnits = receivingUnits.Substring(0, receivingUnits.LastIndexOf(","));
}
dataReceivingDoc.ReceiveUnit = receivingUnits;
dataReceivingDoc.ReceiveMan = this.txtReceiveMan.Text.Trim();
dataReceivingDoc.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
dataReceivingDoc.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
dataReceivingDoc.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
string issueToUnits = string.Empty;
var issueToUnitLists = this.drpIssueToUnit.SelectedValueArray;
foreach (var item in issueToUnitLists)
{
issueToUnits += item + ",";
}
if (!string.IsNullOrEmpty(issueToUnits))
{
issueToUnits = issueToUnits.Substring(0, issueToUnits.LastIndexOf(","));
}
dataReceivingDoc.IssueToUnit = issueToUnits;
dataReceivingDoc.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
dataReceivingDoc.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
} //审核人
//protected void btnSubmit_Click(object sender, EventArgs e)
//{
// if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
// {
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
// return;
// }
// Model.Comprehensive_DataReceivingDoc dataReceivingDoc = new Model.Comprehensive_DataReceivingDoc();
// dataReceivingDoc.ProjectId = this.CurrUser.LoginProjectId;
// dataReceivingDoc.FileCode = this.txtFileCode.Text.Trim();
// dataReceivingDoc.FileName = this.txtFileName.Text.Trim();
// dataReceivingDoc.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
// dataReceivingDoc.FileType = this.txtFileType.Text.Trim();
// dataReceivingDoc.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
// //string unitIds = string.Empty;
// //var unitList = this.drpSendUnit.SelectedValueArray;
// //foreach (var item in unitList)
// //{
// // unitIds += item + ",";
// //}
// //if (!string.IsNullOrEmpty(unitIds))
// //{
// // unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
// //}
// dataReceivingDoc.SendUnit = drpSendUnitId.SelectedValue;
// dataReceivingDoc.SendMan = this.txtSendMan.Text.Trim();
// dataReceivingDoc.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
// dataReceivingDoc.DocumentHandler = this.txtDocumentHandler.Text.Trim();
// dataReceivingDoc.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
// string receivingUnits = string.Empty;
// var receivingUnitList = this.drpReceiveUnit.SelectedValueArray;
// foreach (var item in receivingUnitList)
// {
// receivingUnits += item + ",";
// }
// if (!string.IsNullOrEmpty(receivingUnits))
// {
// receivingUnits = receivingUnits.Substring(0, receivingUnits.LastIndexOf(","));
// }
// dataReceivingDoc.ReceiveUnit = receivingUnits;
// dataReceivingDoc.ReceiveMan = this.txtReceiveMan.Text.Trim();
// dataReceivingDoc.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
// dataReceivingDoc.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
// dataReceivingDoc.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
// string issueToUnits = string.Empty;
// var issueToUnitLists = this.drpIssueToUnit.SelectedValueArray;
// foreach (var item in issueToUnitLists)
// {
// issueToUnits += item + ",";
// }
// if (!string.IsNullOrEmpty(issueToUnits))
// {
// issueToUnits = issueToUnits.Substring(0, issueToUnits.LastIndexOf(","));
// }
// dataReceivingDoc.IssueToUnit = issueToUnits;
// dataReceivingDoc.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
// dataReceivingDoc.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
// dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
// {
// dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
// } //审核人
if (string.IsNullOrEmpty(this.DataReceivingDocId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{
dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
}
else
{
dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
}
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceivingDoc.DataReceivingDocId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return;
}
dataReceivingDoc.CompileMan = this.CurrUser.UserId;
dataReceivingDoc.CompileDate = DateTime.Now;
dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
BLL.DataReceivingDocService.AddDataReceivingDoc(dataReceivingDoc);
}
else
{
dataReceivingDoc.DataReceivingDocId = this.DataReceivingDocId;
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingDocId);
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return;
}
var model = Funs.DB.Comprehensive_DataReceivingDoc.Where(u => u.DataReceivingDocId == this.DataReceivingDocId).FirstOrDefault();
// if (string.IsNullOrEmpty(this.DataReceivingDocId))
// {
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
// {
// dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
// }
// else
// {
// dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
// this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
// }
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceivingDoc.DataReceivingDocId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
// }
// dataReceivingDoc.CompileMan = this.CurrUser.UserId;
// dataReceivingDoc.CompileDate = DateTime.Now;
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// BLL.DataReceivingDocService.AddDataReceivingDoc(dataReceivingDoc);
// }
// else
// {
// dataReceivingDoc.DataReceivingDocId = this.DataReceivingDocId;
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingDocId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
// }
// var model = Funs.DB.Comprehensive_DataReceivingDoc.Where(u => u.DataReceivingDocId == this.DataReceivingDocId).FirstOrDefault();
if (model.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
{
dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
}
else if (model.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
{
dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
}
else //审核状态 提交 变 完成 或者 重新编制
{
if (Convert.ToBoolean(rblIsAgree.SelectedValue))
{
dataReceivingDoc.Status = BLL.Const.Comprehensive_Complete;
}
else
{
dataReceivingDoc.Status = BLL.Const.Comprehensive_ReCompile;
}
}
BLL.DataReceivingDocService.UpdateDataReceivingDoc(dataReceivingDoc);
}
#region
var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
if (currApprove == null) //为获取到为 当前编制状态 直接提交
{
var approve = new Model.Comprehensive_DataReceivingDocApprove();
approve.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
approve.ApproveMan = this.CurrUser.UserId;
approve.ApproveType = Const.Comprehensive_Compile;
approve.ApproveDate = DateTime.Now;
DataReceivingDocApproveService.EditApprove(approve); //新增编制记录
// if (model.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (model.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
// BLL.DataReceivingDocService.UpdateDataReceivingDoc(dataReceivingDoc);
// }
// #region 审核记录
// var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
// {
// var approve = new Model.Comprehensive_DataReceivingDocApprove();
// approve.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// approve.ApproveMan = this.CurrUser.UserId;
// approve.ApproveType = Const.Comprehensive_Compile;
// approve.ApproveDate = DateTime.Now;
// DataReceivingDocApproveService.EditApprove(approve); //新增编制记录
Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit;
DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
}
else if (currApprove.ApproveMan == CurrUser.UserId)
{
if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
{
currApprove.ApproveDate = DateTime.Now;
DataReceivingDocApproveService.EditApprove(currApprove); //新增专业工程师审核记录
Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
newApprove.ApproveMan = this.drpAudit.SelectedValue;
newApprove.ApproveType = Const.InspectionManagement_Audit;
DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
}
else
{
currApprove.ApproveDate = DateTime.Now; //更新审核时间
currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
currApprove.ApproveIdea = this.txtidea.Text;
DataReceivingDocApproveService.EditApprove(currApprove);
// Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
// newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
// newApprove.ApproveType = Const.InspectionManagement_Audit;
// DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
// }
// else if (currApprove.ApproveMan == CurrUser.UserId)
// {
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile)
// {
// currApprove.ApproveDate = DateTime.Now;
// DataReceivingDocApproveService.EditApprove(currApprove); //新增专业工程师审核记录
// Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
// newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
// newApprove.ApproveType = Const.InspectionManagement_Audit;
// DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
// }
// else
// {
// currApprove.ApproveDate = DateTime.Now; //更新审核时间
// currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
// currApprove.ApproveIdea = this.txtidea.Text;
// DataReceivingDocApproveService.EditApprove(currApprove);
if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
{
Model.Comprehensive_DataReceivingDocApprove reApprove = new Model.Comprehensive_DataReceivingDocApprove();
reApprove.DataReceivingDocId = currApprove.DataReceivingDocId;
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
reApprove.ApproveMan = CurrUser.UserId;
reApprove.ApproveType = Const.Comprehensive_Complete;
reApprove.ApproveIdea = txtidea.Text;
DataReceivingDocApproveService.EditApprove(reApprove);
}
else
{
Model.Comprehensive_DataReceivingDocApprove reApprove = new Model.Comprehensive_DataReceivingDocApprove();
reApprove.DataReceivingDocId = currApprove.DataReceivingDocId;
reApprove.ApproveMan = dataReceivingDoc.CompileMan;
reApprove.ApproveType = Const.Comprehensive_ReCompile;
DataReceivingDocApproveService.EditApprove(reApprove);
}
}
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
#endregion
}
// if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成
// {
// Model.Comprehensive_DataReceivingDocApprove reApprove = new Model.Comprehensive_DataReceivingDocApprove();
// reApprove.DataReceivingDocId = currApprove.DataReceivingDocId;
// reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
// reApprove.ApproveMan = CurrUser.UserId;
// reApprove.ApproveType = Const.Comprehensive_Complete;
// reApprove.ApproveIdea = txtidea.Text;
// DataReceivingDocApproveService.EditApprove(reApprove);
// }
// else
// {
// Model.Comprehensive_DataReceivingDocApprove reApprove = new Model.Comprehensive_DataReceivingDocApprove();
// reApprove.DataReceivingDocId = currApprove.DataReceivingDocId;
// reApprove.ApproveMan = dataReceivingDoc.CompileMan;
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
// DataReceivingDocApproveService.EditApprove(reApprove);
// }
// }
// }
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
// #endregion
//}
#endregion
#region
@@ -499,23 +506,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttach_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
{
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
}
var dataReceivingDoc = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
//protected void btnAttach_Click(object sender, EventArgs e)
//{
// if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
// {
// this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
// }
// var dataReceivingDoc = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
if (dataReceivingDoc == null || ((dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile) || (dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_ReCompile)))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataReceivingDoc&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingDocMenuId)));
}
else
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DataReceivingDoc&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingDocMenuId)));
}
}
// if (dataReceivingDoc == null || ((dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile) || (dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_ReCompile)))
// {
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataReceivingDoc&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingDocMenuId)));
// }
// else
// {
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DataReceivingDoc&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingDocMenuId)));
// }
//}
#endregion
#region
@@ -264,78 +264,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsOnFile;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// btnAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
@@ -345,15 +273,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -362,23 +281,5 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}