20250812 修改质量事项报告
This commit is contained in:
@@ -50,6 +50,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
left join Sys_User as u on u.UserId = p.Violation_Inspector
|
||||
left join Base_Depart as d on d.DepartId = u.DepartId
|
||||
left join Sys_User as du on du.UserId = d.DepartLeader
|
||||
left join FC_SESRelatedData fo on fo.FO_NO = p.FO_NO
|
||||
where Flag='2' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
|
||||
@@ -72,7 +73,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
var user = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId);
|
||||
if (user != null)
|
||||
{
|
||||
strSql += " and p.PunishmentId in (select PunishmentId from EMC_PunishmentAudit where (AuditMan='" + user.DepartId + "' or AuditMan='" + this.CurrUser.UserId + "') and AuditDate is null)";
|
||||
strSql += " and p.PunishmentId in (select PunishmentId from EMC_PunishmentAudit where ((AuditMan='" + user.DepartId + "' or AuditMan='" + this.CurrUser.UserId + "') and AuditDate is null) or (p.States='3' and p.MainCoordinatorEndDate is not null and p.UserDepStartDate is null and fo.Main_Coordinator='" + this.CurrUser.UserId + "'))";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,14 +208,32 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
var user = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId);
|
||||
if (user != null)
|
||||
{
|
||||
if (pun.IsFrame == true && user.DepartId == pun.UserDep)
|
||||
if ((pun.MainCoordinatorEndDate.HasValue && pun.MainCoordinatorEndDate.Value.AddDays(3) < DateTime.Now) || pun.UserDepStartDate.HasValue)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
if (pun.IsFrame == true && user.DepartId == pun.UserDep)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
var depart = BLL.DepartService.GetDepartNameById(pun.UserDep);
|
||||
ShowAlert("您不是" + depart + "部门用户,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var depart = BLL.DepartService.GetDepartNameById(pun.UserDep);
|
||||
ShowAlert("您不是" + depart + "部门用户,不能操作!", MessageBoxIcon.Warning);
|
||||
Model.FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
if (this.CurrUser.UserId == fc.Main_Coordinator || this.CurrUser.RoleId == BLL.Const.Role_Contractor_LeaderId)//当前用户等于主协调员
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("您不是" + BLL.Sys_UserService.GetUserNameByUserId(fc.Main_Coordinator) + ",不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -614,6 +633,8 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
#region 审批人
|
||||
/// <summary>
|
||||
/// 审批人
|
||||
/// </summary>
|
||||
@@ -655,7 +676,19 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
else if (pun.States == "3" && pun.IsFrame == true)
|
||||
{
|
||||
name = BLL.DepartService.GetDepartNameById(pun.UserDep);
|
||||
//承包商联系人有异议或3天未有动作
|
||||
if ((pun.MainCoordinatorEndDate.HasValue && pun.MainCoordinatorEndDate.Value.AddDays(3) < DateTime.Now) || pun.UserDepStartDate.HasValue)
|
||||
{
|
||||
name = BLL.DepartService.GetDepartNameById(pun.UserDep);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
name = BLL.Sys_UserService.GetUserNameByUserId(fc.Main_Coordinator);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pun.States == "4" && pun.IsFrame == true)
|
||||
{
|
||||
@@ -669,7 +702,9 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
return name;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 状态
|
||||
/// <summary>
|
||||
/// 当期状态
|
||||
/// </summary>
|
||||
@@ -697,13 +732,23 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
else
|
||||
{
|
||||
s = "进行中";
|
||||
if (pun.Pause == true)
|
||||
{
|
||||
s = "已暂停";
|
||||
}
|
||||
else
|
||||
{
|
||||
s = "进行中";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 筛选
|
||||
/// <summary>
|
||||
/// 筛选
|
||||
/// </summary>
|
||||
@@ -713,5 +758,6 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -177,8 +177,8 @@
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach2" Icon="TableCell" EnablePostBack="true" Text="上传" runat="server" OnClick="btnAttach2_Click">
|
||||
</f:Button>
|
||||
<f:Label ID="Label6" runat="server" Text="(最大不超过20M)" CssClass="customlabel"></f:Label>
|
||||
<f:LinkButton ID="lbtnViewAttach2" runat="server" Text="查看" OnClick="lbtnViewAttach2_Click"></f:LinkButton>
|
||||
<f:Label ID="Label6" runat="server" Text="(最大不超过20M)" CssClass="customlabel"></f:Label>
|
||||
<f:LinkButton ID="lbtnViewAttach2" runat="server" Text="查看" OnClick="lbtnViewAttach2_Click"></f:LinkButton>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
@@ -246,7 +246,8 @@
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items><f:DropDownList ID="drpBuyer2" runat="server" Label="采购员" LabelAlign="Right" LabelWidth="150px" EnableEdit="true"></f:DropDownList>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpBuyer2" runat="server" Label="采购员" LabelAlign="Right" LabelWidth="150px" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpViolationClause2" runat="server" Label="违章条款" EnableEdit="true" LabelAlign="Right" LabelWidth="150px" EnableGroup="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpViolationClause2_OnSelectedIndexChanged" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
@@ -273,7 +274,7 @@
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach3" Icon="TableCell" EnablePostBack="true" Text="上传" runat="server" OnClick="btnAttach2_Click">
|
||||
</f:Button>
|
||||
<f:Label ID="Label8" runat="server" Text="(最大不超过20M)" CssClass="customlabel"></f:Label>
|
||||
<f:Label ID="Label8" runat="server" Text="(最大不超过20M)" CssClass="customlabel"></f:Label>
|
||||
<f:LinkButton ID="lbtnAttach3" runat="server" Text="查看" OnClick="lbtnViewAttach2_Click"></f:LinkButton>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -313,10 +314,41 @@
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow ID="frModifyDef" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:TextArea ID="txtModifyDef" runat="server" Label="修改内容说明" LabelAlign="Right" LabelWidth="140px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="frModifyDefUrl" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:Panel ID="Panel4" Width="500px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server" BodyPadding="10px" >
|
||||
<Items>
|
||||
<f:Label ID="Label13" runat="server" Label="修改内容说明" LabelAlign="Right" LabelWidth="140px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnModifyAttach" Icon="TableCell" EnablePostBack="true" Text="上传" runat="server" OnClick="btnModifyAttach_Click">
|
||||
</f:Button>
|
||||
<f:Label ID="Label14" runat="server" Text="(最大不超过20M)" CssClass="customlabel"></f:Label>
|
||||
<f:LinkButton ID="lbtnModifyAttach" runat="server" Text="查看" OnClick="lbtnModifyAttach_Click"></f:LinkButton>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="frPassResult" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rblPass" runat="server" Label="最终审核结果" LabelAlign="Right" LabelWidth="140px">
|
||||
<f:RadioItem Value="True" Text="通过" />
|
||||
<f:RadioItem Value="False" Text="不通过" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label ID="Label15" runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdModifyContent" runat="server"></f:HiddenField>
|
||||
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
|
||||
<f:Button ID="btnReturn" Icon="ArrowRedo" runat="server" Text="退回到上一流程" ToolTip="退回到上一流程" OnClick="btnReturn_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -331,6 +363,8 @@
|
||||
<f:Button ID="btnSbumit" Icon="DatabaseSave" runat="server" Text="提交" ToolTip="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSbumit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPause" Icon="ControlPauseBlue" runat="server" Text="暂停" ToolTip="暂停" Hidden="true" OnClick="btnPause_Click"></f:Button>
|
||||
<f:Button ID="btnSureModify" Icon="DatabaseSave" runat="server" Text="确认修改" ToolTip="确认修改" Hidden="true" OnClick="btnSureModify_Click"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using NPOI.POIFS.Crypt.Dsig;
|
||||
using Org.BouncyCastle.Bcpg.OpenPgp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
@@ -69,7 +71,6 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
this.PunishmentId = Request.Params["punishmentId"];
|
||||
if (!string.IsNullOrEmpty(this.PunishmentId))
|
||||
{
|
||||
|
||||
var att1 = from x in Funs.DB.AttachFile where x.ToKeyId == this.PunishmentId + "#1" select x;
|
||||
if (att1.Count() == 0)
|
||||
{
|
||||
@@ -107,6 +108,9 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
GroupPanel3.Hidden = false;
|
||||
GroupPanel4.Hidden = false;
|
||||
GroupPanel5.Hidden = false;
|
||||
frModifyDef.Hidden = false;
|
||||
frModifyDefUrl.Hidden = false;
|
||||
//frPassResult.Hidden = false;
|
||||
|
||||
var audit = BLL.PunishmentAuditService.GetAuditBypunishmentIdAndAuditMan(this.PunishmentId, this.CurrUser.UserId);
|
||||
if (pun.IsPass == false && audit != null)
|
||||
@@ -308,15 +312,44 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
else if (pun.States == "3" && pun.IsFrame == true)//用户部门填写
|
||||
{
|
||||
//GroupPanel1.Enabled = false;
|
||||
GroupPanel1Enabled();
|
||||
GroupPanel2.Hidden = false;
|
||||
GroupPanel2.Enabled = false;
|
||||
//GroupPanel3.Enabled = false;
|
||||
GroupPanel3Enabled();
|
||||
GroupPanel3.Hidden = false;
|
||||
GroupPanel4.Hidden = false;
|
||||
this.btnSbumit.Hidden = false;
|
||||
//用户部门操作前主协调员可暂停
|
||||
Model.FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
if (this.CurrUser.UserId == fc.Main_Coordinator)//当前用户等于主协调员
|
||||
{
|
||||
Panel4.Hidden = false;
|
||||
if (pun.MainCoordinatorEndDate.HasValue && pun.MainCoordinatorEndDate.Value.AddDays(3) >= DateTime.Now)
|
||||
{
|
||||
this.btnPause.Hidden = false;
|
||||
//this.btnSave.Hidden = true;
|
||||
//this.btnSbumit.Hidden = true;
|
||||
this.GroupPanel4.Hidden = true;
|
||||
}
|
||||
if (pun.Pause == true)
|
||||
{
|
||||
this.btnPause.Hidden = true;
|
||||
this.frPassResult.Hidden = false;
|
||||
}
|
||||
}
|
||||
// 承包商管理角色可编辑提交后的申报人填写、SSR填写、主协调员填写内容
|
||||
if (this.CurrUser.RoleId == BLL.Const.Role_Contractor_LeaderId)
|
||||
{
|
||||
GroupPanel1.Enabled = true;
|
||||
GroupPanel2.Enabled = true;
|
||||
GroupPanel3.Enabled = true;
|
||||
GroupPanel4.Hidden = true;
|
||||
frModifyDef.Hidden = false;
|
||||
frModifyDefUrl.Hidden = false;
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSbumit.Hidden = true;
|
||||
this.btnSureModify.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pun.States == "4" && pun.IsFrame == true)//合同管理员填写
|
||||
{
|
||||
@@ -490,7 +523,9 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
this.txtIndividualSESReason.Text = pun.IndividualSESReason;
|
||||
this.txtSESReson.Text = pun.SESReason;
|
||||
this.txtBuyerReson.Text = pun.BuyerReson;
|
||||
#endregion
|
||||
this.hdModifyContent.Text = pun.ModifyContent;
|
||||
this.txtModifyDef.Text = pun.ModifyContent;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -500,7 +535,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 不可编辑
|
||||
/// <summary>
|
||||
/// 申报人填写不可编辑
|
||||
/// </summary>
|
||||
@@ -551,6 +586,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
Label10.Enabled = false;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 保存、提交
|
||||
/// <summary>
|
||||
@@ -577,6 +613,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.PunishmentId))
|
||||
{
|
||||
List<string> emialLists = new List<string>(); //承包商联系人Email
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(this.PunishmentId);
|
||||
if (pun != null)
|
||||
{
|
||||
@@ -596,6 +633,10 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
pun.ContractAdmin = this.drpContractAdmin.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(fc.Email))
|
||||
{
|
||||
emialLists.Add(fc.Email);//承包商联系人Email
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -759,7 +800,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
pun.States = "3";//主协调员提交
|
||||
pun.MainCoordinatorEndDate = DateTime.Now;//主协调员审批时间
|
||||
pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间
|
||||
//pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间
|
||||
|
||||
var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, this.CurrUser.UserId);
|
||||
if (updateAudit != null)
|
||||
@@ -769,14 +810,14 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
updateAudit.IsPass = true;
|
||||
BLL.PunishmentAuditService.UpdatePunishmentAudit(updateAudit);
|
||||
}
|
||||
//通知承包商联系人,有3天反馈时间,若3天后未处理,进入下一审批,否则暂停重新评估
|
||||
//Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit();
|
||||
//audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit));
|
||||
//audit.PunishmentId = this.PunishmentId;
|
||||
//audit.AuditMan = pun.UserDep;
|
||||
//BLL.PunishmentAuditService.AddPunishmentAudit(audit);
|
||||
|
||||
Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit();
|
||||
audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit));
|
||||
audit.PunishmentId = this.PunishmentId;
|
||||
audit.AuditMan = pun.UserDep;
|
||||
BLL.PunishmentAuditService.AddPunishmentAudit(audit);
|
||||
|
||||
#region 主协调员审批通过邮件:发送给部门经理,抄送流程经办人
|
||||
#region 主协调员通过-通知承包商联系人
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
@@ -786,44 +827,76 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批通过通知"));
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("承包商联系人通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
string departLeader = string.Empty;
|
||||
var depart = BLL.DepartService.GetDepartById(drpUserDep.SelectedValue);
|
||||
if (depart != null)
|
||||
{
|
||||
departLeader = depart.DepartLeader;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(departLeader))
|
||||
{
|
||||
var userTo = from x in Funs.DB.Sys_User
|
||||
where x.UserId.Contains(departLeader) && x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
var userCc = from x in Funs.DB.View_EMail_UserTo
|
||||
where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userCc != null)
|
||||
{
|
||||
mailCC = userCc.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
//var userTo = from x in Funs.DB.Sys_User
|
||||
// where x.RoleId == BLL.Const.Role_Contractor_LeaderId && x.Email != null && x.Email != ""
|
||||
// select x;
|
||||
//if (userTo != null)
|
||||
//{
|
||||
// mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
//}
|
||||
mailTo = emialLists.ToArray();
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批通过通知", mailTo, mailCC, out resultMessage);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "承包商联系人通知", mailTo, mailCC, out resultMessage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 主协调员审批通过邮件:发送给部门经理,抄送流程经办人
|
||||
//Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
//if (pops == null)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
//string[] mailTo = null;
|
||||
//string[] mailCC = null;
|
||||
//string resultMessage = "";
|
||||
|
||||
//var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批通过通知"));
|
||||
//if (emailTemplate.Count() > 0)
|
||||
//{
|
||||
// string departLeader = string.Empty;
|
||||
// var depart = BLL.DepartService.GetDepartById(drpUserDep.SelectedValue);
|
||||
// if (depart != null)
|
||||
// {
|
||||
// departLeader = depart.DepartLeader;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(departLeader))
|
||||
// {
|
||||
// var userTo = from x in Funs.DB.Sys_User
|
||||
// where x.UserId.Contains(departLeader) && x.Email != null && x.Email != ""
|
||||
// select x;
|
||||
// if (userTo != null)
|
||||
// {
|
||||
// mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
// }
|
||||
// }
|
||||
|
||||
// var userCc = from x in Funs.DB.View_EMail_UserTo
|
||||
// where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
// && x.Email != null && x.Email != ""
|
||||
// select x;
|
||||
// if (userCc != null)
|
||||
// {
|
||||
// mailCC = userCc.Select(x => x.Email).Distinct().ToArray();
|
||||
// }
|
||||
// if (mailTo.Length > 0)
|
||||
// {
|
||||
// NameValueCollection myPram = new NameValueCollection();
|
||||
// myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
// myPram.Add("位置", pun.Location);
|
||||
// myPram.Add("质量事件描述", pun.Description);
|
||||
// MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批通过通知", mailTo, mailCC, out resultMessage);
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else //非框架合同
|
||||
@@ -974,87 +1047,194 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
else if (pun.States == "3")//用户部门提交
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtIndividualSES.Text.Trim()))
|
||||
var user = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId);
|
||||
if (user != null)
|
||||
{
|
||||
pun.ViolationRelatedSes = this.txtIndividualSES.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtIndividualSESReason.Text.Trim()))
|
||||
if (user.DepartId == pun.UserDep)
|
||||
{
|
||||
pun.IndividualSESReason = this.txtIndividualSESReason.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtIndividualSES.Text.Trim()))
|
||||
{
|
||||
pun.ViolationRelatedSes = this.txtIndividualSES.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtIndividualSESReason.Text.Trim()))
|
||||
{
|
||||
pun.IndividualSESReason = this.txtIndividualSESReason.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "4";//用户部门提交
|
||||
pun.UserDepEndDate = DateTime.Now;//用户部门审批时间
|
||||
|
||||
var u = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId);
|
||||
if (u != null)
|
||||
{
|
||||
var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, u.DepartId);
|
||||
if (updateAudit != null)
|
||||
{
|
||||
updateAudit.AuditMan = this.CurrUser.UserId;
|
||||
updateAudit.AuditDate = DateTime.Now;
|
||||
updateAudit.IsPass = true;
|
||||
BLL.PunishmentAuditService.UpdatePunishmentAudit(updateAudit);
|
||||
}
|
||||
}
|
||||
|
||||
Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit();
|
||||
audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit));
|
||||
audit.PunishmentId = this.PunishmentId;
|
||||
audit.AuditMan = pun.ContractAdmin;
|
||||
BLL.PunishmentAuditService.AddPunishmentAudit(audit);
|
||||
|
||||
#region 用户部门填写后审批邮件:发送给合同管理员,抄送给流程经办人
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("用户部门填写后审核通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
var userTo = from x in Funs.DB.Sys_User
|
||||
where x.UserId.Contains(this.drpContractAdmin.SelectedValue)
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
}
|
||||
|
||||
var userCc = from x in Funs.DB.View_EMail_UserTo
|
||||
where (x.PunishmentId == this.PunishmentId && x.AuditDate != null)
|
||||
|| (x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userCc != null)
|
||||
{
|
||||
mailCC = userCc.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "用户部门填写后审核通知", mailTo, mailCC, out resultMessage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "4";//用户部门提交
|
||||
pun.UserDepEndDate = DateTime.Now;//用户部门审批时间
|
||||
|
||||
var u = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId);
|
||||
if (u != null)
|
||||
{
|
||||
var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, u.DepartId);
|
||||
if (updateAudit != null)
|
||||
#region 最终审核通过,发送给用户部门办理,未通过发送给所有经办人
|
||||
Model.View_FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataViewByFO(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
updateAudit.AuditMan = this.CurrUser.UserId;
|
||||
updateAudit.AuditDate = DateTime.Now;
|
||||
updateAudit.IsPass = true;
|
||||
BLL.PunishmentAuditService.UpdatePunishmentAudit(updateAudit);
|
||||
if (this.CurrUser.UserId == fc.Main_CoordinatorId && type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
if (rblPass.SelectedValue == "True")
|
||||
{
|
||||
pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间
|
||||
pun.Pause = false;//如果审核通过,取消暂停
|
||||
|
||||
#region 主协调员审批通过邮件:发送给部门经理,抄送流程经办人
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批通过通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
string departLeader = string.Empty;
|
||||
var depart = BLL.DepartService.GetDepartById(drpUserDep.SelectedValue);
|
||||
if (depart != null)
|
||||
{
|
||||
departLeader = depart.DepartLeader;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(departLeader))
|
||||
{
|
||||
var userTo = from x in Funs.DB.Sys_User
|
||||
where x.UserId.Contains(departLeader) && x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
var userCc = from x in Funs.DB.View_EMail_UserTo
|
||||
where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userCc != null)
|
||||
{
|
||||
mailCC = userCc.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批通过通知", mailTo, mailCC, out resultMessage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else//最终审核未通过通知
|
||||
{
|
||||
pun.States = "7";//已拒绝
|
||||
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
//string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批未通过通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
var userTo = from x in Funs.DB.View_EMail_UserTo
|
||||
where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批未通过通知", mailTo, null, out resultMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit();
|
||||
audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit));
|
||||
audit.PunishmentId = this.PunishmentId;
|
||||
audit.AuditMan = pun.ContractAdmin;
|
||||
BLL.PunishmentAuditService.AddPunishmentAudit(audit);
|
||||
|
||||
#region 用户部门填写后审批邮件:发送给合同管理员,抄送给流程经办人
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("用户部门填写后审核通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
var userTo = from x in Funs.DB.Sys_User
|
||||
where x.UserId.Contains(this.drpContractAdmin.SelectedValue)
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).ToArray();
|
||||
}
|
||||
|
||||
var userCc = from x in Funs.DB.View_EMail_UserTo
|
||||
where (x.PunishmentId == this.PunishmentId && x.AuditDate != null)
|
||||
|| (x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userCc != null)
|
||||
{
|
||||
mailCC = userCc.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "用户部门填写后审核通知", mailTo, mailCC, out resultMessage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else if (pun.States == "4")//合同管理员
|
||||
@@ -1699,12 +1879,12 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=view&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量调查相关附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach2_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// 质量调查相关附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
|
||||
{
|
||||
@@ -1722,6 +1902,31 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=view&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
|
||||
#region 修改内容说明附件
|
||||
/// <summary>
|
||||
/// 上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnModifyAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=edit&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=3", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtnModifyAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=view&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=3", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 拒绝
|
||||
@@ -1771,8 +1976,155 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 暂停
|
||||
/// <summary>
|
||||
/// 承包商联系人有异议线下通知主协调员,主协调员可暂停重新评估
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPause_Click(object sender, EventArgs e)
|
||||
{
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(this.PunishmentId);
|
||||
if (pun != null)
|
||||
{
|
||||
pun.Pause = true;
|
||||
pun.PauseDate = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
ShowNotify("已暂停,请联合发起人及承包商调查审核!", MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存修改
|
||||
/// <summary>
|
||||
/// 确认修改
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSureModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
string con = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.PunishmentId))
|
||||
{
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(this.PunishmentId);
|
||||
if (pun != null)
|
||||
{
|
||||
if (pun.States == "3" && !pun.UserDepStartDate.HasValue && rblSeType.SelectedValue == "1")
|
||||
{
|
||||
Model.View_FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataViewByFO(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
#region 承包商管理角色可修改用户部门前的所有内容
|
||||
if (this.CurrUser.RoleId == BLL.Const.Role_Contractor_LeaderId)
|
||||
{
|
||||
if (pun.PunishDate.Value.ToShortDateString() != Funs.GetNewDateTime(this.txtPunishDate.Text.Trim()).Value.ToShortDateString())
|
||||
{
|
||||
con += "发现日期由【" + string.Format("{0:yyyy-MM-dd}", pun.PunishDate) + "】改为【" + string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(this.txtPunishDate.Text.Trim())) + "】;";
|
||||
pun.PunishDate = Funs.GetNewDateTime(this.txtPunishDate.Text.Trim());
|
||||
}
|
||||
if (pun.Location != this.txtLocation.Text.Trim())
|
||||
{
|
||||
con += "位置由【" + pun.Location + "】改为【" + this.txtLocation.Text.Trim() + "】;";
|
||||
pun.Location = this.txtLocation.Text.Trim();
|
||||
}
|
||||
if (pun.Description != this.txtDescription.Text.Trim())
|
||||
{
|
||||
con += "质量事件描述由【" + pun.Description + "】改为【" + this.txtDescription.Text.Trim() + "】;";
|
||||
pun.Description = this.txtDescription.Text.Trim();
|
||||
}
|
||||
if (pun.MIContractor != this.txtMIContractor.Text.Trim())
|
||||
{
|
||||
con += "可能涉及的承包商由【" + pun.MIContractor + "】改为【" + this.txtMIContractor.Text.Trim() + "】;";
|
||||
pun.MIContractor = this.txtMIContractor.Text.Trim();
|
||||
}
|
||||
if (pun.SeType != this.rblSeType.SelectedValue)
|
||||
{
|
||||
con += "类型由【" + pun.SeType == "1" ? "服务" : "物资" + "】改为【" + this.rblSeType.SelectedValue == "1" ? "服务" : "物资" + "】;";
|
||||
pun.SeType = this.rblSeType.SelectedValue;
|
||||
}
|
||||
if (pun.FO_NO != this.txtFO_No.Text.Trim())
|
||||
{
|
||||
con += "合同号由【" + pun.FO_NO + "】改为【" + this.txtFO_No.Text.Trim() + "】;";
|
||||
pun.FO_NO = this.txtFO_No.Text.Trim();
|
||||
}
|
||||
if (pun.Contractor != this.txtContractor.Text.Trim())
|
||||
{
|
||||
con += "涉及承包商由【" + pun.Contractor + "】改为【" + this.txtContractor.Text.Trim() + "】;";
|
||||
pun.Contractor = this.txtContractor.Text.Trim();
|
||||
}
|
||||
if (pun.ContractAdmin != this.drpContractAdmin.SelectedValue)
|
||||
{
|
||||
if (this.drpContractAdmin.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
con += "合同管理员由【" + Sys_UserService.GetUserNameByUserId(pun.Contractor) + "】改为【" + Sys_UserService.GetUserNameByUserId(this.drpContractAdmin.SelectedValue) + "】;";
|
||||
pun.ContractAdmin = this.drpContractAdmin.SelectedValue;
|
||||
}
|
||||
}
|
||||
if (pun.ContractRequester != this.drpContractRequester.SelectedValue)
|
||||
{
|
||||
if (this.drpContractRequester.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
con += "合同需求人由【" + Sys_UserService.GetUserNameByUserId(pun.ContractRequester) + "】改为【" + Sys_UserService.GetUserNameByUserId(this.drpContractRequester.SelectedValue) + "】;";
|
||||
pun.ContractRequester = this.drpContractRequester.SelectedValue;
|
||||
}
|
||||
}
|
||||
//if (pun.ContractRequesterDep != txtContractRequesterDep.Text.Trim())
|
||||
//{
|
||||
// con += "需求人部门由" + pun.ContractRequesterDep + "改为" + txtContractRequesterDep.Text.Trim() + ";";
|
||||
// pun.ContractRequester = this.drpContractRequester.SelectedValue;
|
||||
//}
|
||||
//if (pun.Buyer != this.drpBuyer.SelectedValue)
|
||||
//{
|
||||
// con += "采购员由" + Sys_UserService.GetUserNameByUserId(pun.Buyer) + "改为" + Sys_UserService.GetUserNameByUserId(this.drpBuyer.SelectedValue) + ";";
|
||||
// pun.ContractRequester = this.drpContractRequester.SelectedValue;
|
||||
//}
|
||||
if (pun.ViolationDegree != this.drpViolationDegree.SelectedValue)
|
||||
{
|
||||
if (this.drpViolationDegree.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
con += "违章条款由【" + BLL.ViolationClauseService.GetViolationClause(pun.ViolationDegree).ClauseDef + "】改为【" + BLL.ViolationClauseService.GetViolationClause(this.drpViolationDegree.SelectedValue).ClauseDef + "】;";
|
||||
pun.ViolationDegree = this.drpViolationDegree.SelectedValue;
|
||||
}
|
||||
}
|
||||
if (pun.Company != Funs.GetNewDecimal(this.txtCompany.Text.Trim()))
|
||||
{
|
||||
con += "违章扣款(公司)由【" + pun.Company + "】改为【" + Funs.GetNewDecimal(this.txtCompany.Text.Trim()) + "】;";
|
||||
pun.Company = Funs.GetNewDecimal(this.txtCompany.Text.Trim());
|
||||
}
|
||||
if (pun.IndividualPerson != this.txtIndividualPerson.Text.Trim())
|
||||
{
|
||||
con += "违章人员由【" + pun.IndividualPerson + "】改为【" + this.txtIndividualPerson.Text.Trim() + "】;";
|
||||
pun.IndividualPerson = this.txtIndividualPerson.Text.Trim();
|
||||
}
|
||||
if (pun.Individual != Funs.GetNewDecimal(this.txtIndividual.Text.Trim()))
|
||||
{
|
||||
con += "违章扣款(个人)由【" + pun.Individual + "】改为【" + Funs.GetNewDecimal(this.txtIndividual.Text.Trim()) + "】;";
|
||||
pun.Individual = Funs.GetNewDecimal(this.txtIndividual.Text.Trim());
|
||||
}
|
||||
if (pun.UserDep != this.drpUserDep.SelectedValue)
|
||||
{
|
||||
if (this.drpUserDep.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
con += "用户部门由【" + DepartService.GetDepartNameById(pun.UserDep) + "】改为【" + DepartService.GetDepartNameById(this.drpUserDep.SelectedValue) + "】;";
|
||||
pun.UserDep = this.drpUserDep.SelectedValue;
|
||||
}
|
||||
}
|
||||
this.txtModifyDef.Text = this.hdModifyContent.Text + con;
|
||||
pun.ModifyContent = this.txtModifyDef.Text.Trim();
|
||||
pun.Modifyer = this.CurrUser.UserId;
|
||||
pun.ModifyDate = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
ShowNotify("修改成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+126
@@ -761,6 +761,105 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtBuyerReson;
|
||||
|
||||
/// <summary>
|
||||
/// frModifyDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow frModifyDef;
|
||||
|
||||
/// <summary>
|
||||
/// txtModifyDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtModifyDef;
|
||||
|
||||
/// <summary>
|
||||
/// frModifyDefUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow frModifyDefUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Panel4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel4;
|
||||
|
||||
/// <summary>
|
||||
/// Label13 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label13;
|
||||
|
||||
/// <summary>
|
||||
/// btnModifyAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnModifyAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Label14 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label14;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnModifyAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.LinkButton lbtnModifyAttach;
|
||||
|
||||
/// <summary>
|
||||
/// frPassResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow frPassResult;
|
||||
|
||||
/// <summary>
|
||||
/// rblPass 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblPass;
|
||||
|
||||
/// <summary>
|
||||
/// Label15 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label15;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -770,6 +869,15 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdModifyContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdModifyContent;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
@@ -824,6 +932,24 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSbumit;
|
||||
|
||||
/// <summary>
|
||||
/// btnPause 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPause;
|
||||
|
||||
/// <summary>
|
||||
/// btnSureModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSureModify;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user