From f6b3af99f6f3d4a34a63bbf78d1b2a707accb0d2 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Mon, 10 Mar 2025 11:35:22 +0800 Subject: [PATCH 1/8] =?UTF-8?q?20250310=20total=20budget=E5=9B=9E=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FCL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs | 2 +- FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs | 9 ++++++++- FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs | 13 ++++++++++++- FCL/FineUIPro.Web/Web.config | 2 +- FCL/WebApi/WebApi.csproj.user | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user index fcf3204..accb770 100644 --- a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ ShowAllFiles - Debug|Any CPU + Release|Any CPU true diff --git a/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs index a36dc40..f46c3d7 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs +++ b/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs @@ -45,7 +45,7 @@ namespace FineUIPro.Web.SES private void BindGrid() { - string strSql = @"SELECT * FROM dbo.View_EMC_Punishment WHERE Flag='1' and DATEADD(year,1,PunishDate) >= GETDATE() "; + string strSql = @"SELECT * FROM dbo.View_EMC_Punishment WHERE Flag='1' "; List listStr = new List(); if (!string.IsNullOrEmpty(this.txtFO_NO.Text.Trim())) diff --git a/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs index c343180..afb5fb3 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs @@ -102,7 +102,7 @@ namespace FineUIPro.Web.SES //var u = string.Join(",", sesdata.Where(p => p.User_Representative != null).Select(p => p.User_Representative).Distinct()); //var m = string.Join(",", sesdata.Where(p => p.Main_Coordinator != null).Select(p => p.Main_Coordinator).Distinct()); string cruUser = CurrUser.UserId; - string strSql = @"SELECT * from View_FC_SESRelatedData WHERE DATEADD(year,1,Expire_Date) >=GETDATE() "; + string strSql = @"SELECT * from View_FC_SESRelatedData "; List listStr = new List(); @@ -4412,6 +4412,13 @@ namespace FineUIPro.Web.SES var contracts = BLL.ContractManagementService.GetContractManagementById(rowID); if (contracts != null) { + //删除费用增补回写的Contract Budget随之变化 + var data = BLL.SESRelatedDataService.GetSESRelatedDataById(contracts.FC_ID.ToString()); + if (data != null) + { + data.Actual_Budget = data.Actual_Budget - contracts.TotalBudget; + BLL.SESRelatedDataService.UpdateSESRelatedData(data); + } BLL.ContractManagementService.DeleteContractManagementById(rowID); } } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 68b0fc0..9dec380 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -52,12 +52,23 @@ namespace FineUIPro.Web.SES BLL.DisciplineService.InitDropDownList(this.drpDiscispline, true); //专业 BLL.DisciplineCategoryService.InitDropDownList(this.drpOriginal_WC, true);//专业类别 - BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 + //BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 BLL.PriceSchemeService.InitDropDownList(this.drpPricing_Scheme, true);//价格方案 BLL.ItemService.InitDropDownList(this.drpItem, true); BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种 BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true); BLL.TypeService.InitDropDownList(this.drpType, true); + + var contractorLists = from x in Funs.DB.FC_SESRelatedData + join y in Funs.DB.Base_Contractor on x.Contractor equals y.ContractorId + where x.Expire_Date.Value.AddYears(1) >= DateTime.Now + select new { y.ContractorId, Contractor = y.Contractor + y.ContractorCN }; + this.drpContractor.DataTextField = "Contractor"; + this.drpContractor.DataValueField = "ContractorId"; + this.drpContractor.DataSource = contractorLists.Distinct(); + this.drpContractor.DataBind(); + Funs.FineUIPleaseSelect(this.drpContractor); + //合同员 this.drpContract_Admin.DataTextField = "UserName"; this.drpContract_Admin.DataValueField = "UserId"; diff --git a/FCL/FineUIPro.Web/Web.config b/FCL/FineUIPro.Web/Web.config index 4a08f09..c97a2b2 100644 --- a/FCL/FineUIPro.Web/Web.config +++ b/FCL/FineUIPro.Web/Web.config @@ -55,7 +55,7 @@ - + diff --git a/FCL/WebApi/WebApi.csproj.user b/FCL/WebApi/WebApi.csproj.user index ca0d73e..643f3e5 100644 --- a/FCL/WebApi/WebApi.csproj.user +++ b/FCL/WebApi/WebApi.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU From a8aa85835c0099f051318d2a9cd08f4b68cb7a68 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 12 Mar 2025 10:19:37 +0800 Subject: [PATCH 2/8] =?UTF-8?q?20250312=20=E8=B4=B9=E7=94=A8=E5=A2=9E?= =?UTF-8?q?=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FCL/FineUIPro.Web/Global.asax.cs | 2 +- FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs | 6 +++--- FCL/FineUIPro.Web/common/Main.aspx.cs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/FCL/FineUIPro.Web/Global.asax.cs b/FCL/FineUIPro.Web/Global.asax.cs index 9dd4113..1622646 100644 --- a/FCL/FineUIPro.Web/Global.asax.cs +++ b/FCL/FineUIPro.Web/Global.asax.cs @@ -58,7 +58,7 @@ } //自动填写评价 - if (DateTime.Now.Day == 16) + if (DateTime.Now.Day == 12) { System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed += new System.Timers.ElapsedEventHandler(aTimer_AutoFill); diff --git a/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs index afb5fb3..02290db 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs @@ -102,7 +102,7 @@ namespace FineUIPro.Web.SES //var u = string.Join(",", sesdata.Where(p => p.User_Representative != null).Select(p => p.User_Representative).Distinct()); //var m = string.Join(",", sesdata.Where(p => p.Main_Coordinator != null).Select(p => p.Main_Coordinator).Distinct()); string cruUser = CurrUser.UserId; - string strSql = @"SELECT * from View_FC_SESRelatedData "; + string strSql = @"SELECT * from View_FC_SESRelatedData where 1=1"; List listStr = new List(); @@ -4412,11 +4412,11 @@ namespace FineUIPro.Web.SES var contracts = BLL.ContractManagementService.GetContractManagementById(rowID); if (contracts != null) { - //删除费用增补回写的Contract Budget随之变化 + //删除费用增补回写的Contract Budget-费用增补中的Supplemented Budget var data = BLL.SESRelatedDataService.GetSESRelatedDataById(contracts.FC_ID.ToString()); if (data != null) { - data.Actual_Budget = data.Actual_Budget - contracts.TotalBudget; + data.Actual_Budget = data.Actual_Budget - contracts.SupplementedBudget; BLL.SESRelatedDataService.UpdateSESRelatedData(data); } BLL.ContractManagementService.DeleteContractManagementById(rowID); diff --git a/FCL/FineUIPro.Web/common/Main.aspx.cs b/FCL/FineUIPro.Web/common/Main.aspx.cs index 74aeb97..cdf85af 100644 --- a/FCL/FineUIPro.Web/common/Main.aspx.cs +++ b/FCL/FineUIPro.Web/common/Main.aspx.cs @@ -46,7 +46,8 @@ namespace FineUIPro.Web.common fc.Contract_Admin as Contract_AdminId,CA.UserName AS Contract_Admin, fc.Buyer, mc.UserName AS Main_Coordinator, ur.UserName AS User_Representative, fc.Contract_Person, fc.Contract_Tel,fc.Validate_Date, fc.Expire_Date, - CONVERT(VARCHAR(10),CONVERT(DECIMAL(18,2),(fc.Actual_Budget-ISNULL(c.CheckedValue,0))/fc.Actual_Budget*100))+'%' AS Remaining_Budget_Rate, + (case when fc.Actual_Budget>0 then + CONVERT(VARCHAR(10),CONVERT(DECIMAL(18,2),(fc.Actual_Budget-ISNULL(c.CheckedValue,0))/fc.Actual_Budget*100))+'%' else CONVERT(VARCHAR(10),0)+'%' end) AS Remaining_Budget_Rate, (CASE WHEN DATEDIFF(DAY,fc.Validate_Date,fc.Expire_Date)>0 THEN CONVERT(VARCHAR(10),CONVERT(DECIMAL(18,2),CONVERT(DECIMAL(18,2),DATEDIFF(DAY,GETDATE(),fc.Expire_Date))/CONVERT(DECIMAL(18,2),DATEDIFF(DAY,fc.Validate_Date,fc.Expire_Date))*100))+'%' ELSE ''END) AS Remaining_Duration_Rate From bd49907a8dde8d434138e396be8063a3cbee2ad7 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 13 Mar 2025 15:56:37 +0800 Subject: [PATCH 3/8] 20250313 --- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx | 2 +- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs | 28 +++++++++++++------ .../SES/SESRelatedDataEdit.aspx.cs | 14 ++-------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx index 1d69937..ef01dab 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx @@ -106,7 +106,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs index 8876632..302952a 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs @@ -54,7 +54,17 @@ namespace FineUIPro.Web.SES } // BLL.SESRelatedDataService.InitFONoDropDownList(this.drpFO_No, true);//合同号 - BLL.ContractorService.InitDropDownList(drpContractor, true); //承包商; + //BLL.ContractorService.InitDropDownList(drpContractor, true); //承包商; + var contractorLists = from x in Funs.DB.FC_SESRelatedData + join y in Funs.DB.Base_Contractor on x.Contractor equals y.ContractorId + where x.Expire_Date.Value.AddYears(1) >= DateTime.Now + select new { y.ContractorId, Contractor = y.Contractor + y.ContractorCN }; + this.drpContractor.DataTextField = "Contractor"; + this.drpContractor.DataValueField = "ContractorId"; + this.drpContractor.DataSource = contractorLists.Distinct(); + this.drpContractor.DataBind(); + Funs.FineUIPleaseSelect(this.drpContractor); + BLL.DepartService.InitDepartToWhere(this.drpBYC_RU, true);//BYC负责部门 BLL.Sys_UserService.InitUserDropDownList(this.drpViolationInspector, true);//违章检查人 txtViolationRelatedSes.Enabled = false; @@ -67,7 +77,7 @@ namespace FineUIPro.Web.SES if (punishment != null) { this.txtPunishDate.Text = punishment.PunishDate != null ? string.Format("{0:yyyy-MM-dd}", punishment.PunishDate) : ""; - this.txtPunishTime.Text = punishment.PunishDate != null ? punishment.PunishDate.Value.ToShortTimeString() : ""; + this.txtPunishTime.Text = punishment.PunishDate != null ? string.Format("{0:HH:mm}", punishment.PunishDate) : ""; if (!string.IsNullOrEmpty(punishment.ContractorId)) { @@ -207,7 +217,7 @@ namespace FineUIPro.Web.SES var punishment = BLL.PunishmentService.GetPunishmentById(PunishmentId); if ((this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account == Const.Gly) && this.drpSelectYesNo.SelectedValue == "") { - Alert.ShowInTop("请选择是否有关联SES!", MessageBoxIcon.Warning); + Alert.ShowInTop("请选择是否有关联SES请选择是否有关联SES!", MessageBoxIcon.Warning); return; } } @@ -227,11 +237,13 @@ namespace FineUIPro.Web.SES var sesList = from x in Funs.DB.FC_SESReport where x.FO == drpFO_No.SelectedValue select x.SES_No; if (txtViolationRelatedSes.Text.Length != 10) { - PageContext.RegisterStartupScript(Confirm.GetShowReference("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位 " + ", 确认(继续) / 取消(退出)", - String.Empty, - MessageBoxIcon.Question, - PageManager1.GetCustomEventReference(false, "SaveConfirm_OK"), - PageManager1.GetCustomEventReference("SaveConfirm_Cancel"))); + //PageContext.RegisterStartupScript(Confirm.GetShowReference("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位 " + ", 确认(继续) / 取消(退出)", + // String.Empty, + // MessageBoxIcon.Question, + // PageManager1.GetCustomEventReference(false, "SaveConfirm_OK"), + // PageManager1.GetCustomEventReference("SaveConfirm_Cancel"))); + Alert.ShowInTop("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位,请检查并填入正确的SES号!", MessageBoxIcon.Warning); + return; } else { diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 9dec380..7548dec 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -52,22 +52,12 @@ namespace FineUIPro.Web.SES BLL.DisciplineService.InitDropDownList(this.drpDiscispline, true); //专业 BLL.DisciplineCategoryService.InitDropDownList(this.drpOriginal_WC, true);//专业类别 - //BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 + BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 BLL.PriceSchemeService.InitDropDownList(this.drpPricing_Scheme, true);//价格方案 BLL.ItemService.InitDropDownList(this.drpItem, true); BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种 BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true); - BLL.TypeService.InitDropDownList(this.drpType, true); - - var contractorLists = from x in Funs.DB.FC_SESRelatedData - join y in Funs.DB.Base_Contractor on x.Contractor equals y.ContractorId - where x.Expire_Date.Value.AddYears(1) >= DateTime.Now - select new { y.ContractorId, Contractor = y.Contractor + y.ContractorCN }; - this.drpContractor.DataTextField = "Contractor"; - this.drpContractor.DataValueField = "ContractorId"; - this.drpContractor.DataSource = contractorLists.Distinct(); - this.drpContractor.DataBind(); - Funs.FineUIPleaseSelect(this.drpContractor); + BLL.TypeService.InitDropDownList(this.drpType, true); //合同员 this.drpContract_Admin.DataTextField = "UserName"; From 98e79d401c2aadd0d2495101421e8b772ac7a391 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 2 Apr 2025 09:11:50 +0800 Subject: [PATCH 4/8] =?UTF-8?q?20250402=20=E9=99=84=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AttachFile/webuploader2.aspx.cs | 32 ++++++++++++++++--- .../IncidentInvestigationEdit.aspx.cs | 20 ++++++------ 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs index 5fb510b..b6ce757 100644 --- a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs +++ b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs @@ -51,6 +51,19 @@ namespace FineUIPro.Web.AttachFile } } + public string AType + { + get + { + return (string)ViewState["AType"]; + } + set + { + ViewState["AType"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -68,12 +81,21 @@ namespace FineUIPro.Web.AttachFile AttachPath = Request.QueryString["path"]; ParamStr = sessionName + "|" + AttachPath; MenuId = Request.QueryString["menuId"]; - - string t = Request.QueryString["type"]; - if (t == "-1") + try { - this.Toolbar1.Hidden = true; - this.Grid1.Columns[4].Hidden = true; + AType = Request.QueryString["type"]; + if (!string.IsNullOrEmpty(AType)) + { + if (AType == "view") + { + this.Toolbar1.Hidden = true; + this.Grid1.Columns[4].Hidden = true; + + } + } + } + catch { + } BindGrid(); } diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs index f3176c0..31d363b 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs @@ -1678,7 +1678,7 @@ namespace FineUIPro.Web.ContractorQuality { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=edit&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); } /// @@ -1688,21 +1688,21 @@ namespace FineUIPro.Web.ContractorQuality /// protected void lbtnViewAttach_Click(object sender, EventArgs e) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=-1&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + 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))); } - /// - /// 质量调查相关附件 - /// - /// - /// - protected void btnAttach2_Click(object sender, EventArgs e) + /// + /// 质量调查相关附件 + /// + /// + /// + protected void btnAttach2_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录 { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=edit&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId))); } /// @@ -1712,7 +1712,7 @@ namespace FineUIPro.Web.ContractorQuality /// protected void lbtnViewAttach2_Click(object sender, EventArgs e) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=-1&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + 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))); } #endregion From 2245263c29dec4cd81709379736f3de48f322092 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 10 Apr 2025 09:46:07 +0800 Subject: [PATCH 5/8] 20250410 --- .../AttachFile/fileupload.ashx.cs | 2 ++ .../AttachFile/webuploader2.aspx.cs | 28 ++++++++++++++++++- FCL/FineUIPro.Web/Global.asax.cs | 23 ++++++++++++--- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs | 10 +++---- .../SES/SESRelatedDataContractManage1.aspx.cs | 16 ++++++++++- .../SESRelatedDataContractManage10.aspx.cs | 16 ++++++++++- .../SESRelatedDataContractManage11.aspx.cs | 16 ++++++++++- .../SESRelatedDataContractManage12.aspx.cs | 16 ++++++++++- .../SESRelatedDataContractManage13.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage2.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage3.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage4.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage5.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage6.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage7.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage8.aspx.cs | 16 ++++++++++- .../SES/SESRelatedDataContractManage9.aspx.cs | 16 ++++++++++- FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx | 2 +- .../SES/SESRelatedDataEdit.aspx.cs | 10 ++++++- 19 files changed, 258 insertions(+), 25 deletions(-) diff --git a/FCL/FineUIPro.Web/AttachFile/fileupload.ashx.cs b/FCL/FineUIPro.Web/AttachFile/fileupload.ashx.cs index 48d4ee8..394830b 100644 --- a/FCL/FineUIPro.Web/AttachFile/fileupload.ashx.cs +++ b/FCL/FineUIPro.Web/AttachFile/fileupload.ashx.cs @@ -1,4 +1,6 @@ using Newtonsoft.Json.Linq; +using NPOI.HSSF.Record.Chart; +using Org.BouncyCastle.Asn1.Ocsp; using System; using System.Collections.Generic; using System.IO; diff --git a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs index b6ce757..9728e84 100644 --- a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs +++ b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs @@ -272,8 +272,34 @@ namespace FineUIPro.Web.AttachFile { attachUrl = attachUrl.Replace('/', '\\'); attachUrl = attachUrl.Substring(0, attachUrl.LastIndexOf(",")); - } + } var sour = from x in db.AttachFile where x.ToKeyId == ToKeyId select x; + + //合同管理附件名重复提醒 + if (MenuId == BLL.Const.SESRelatedDateMenuId) + { + string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\")); + string n = newName.Substring(newName.IndexOf("_") + 1); + foreach (var item in sour) + { + if (item.AttachUrl.Contains(n)) + { + Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning); + return; + } + } + string fc_id = Request.QueryString["fcid"]; + string fileTypeId = Request.QueryString["fileTypeId"]; + var conLists = from x in Funs.DB.FC_ContractManagement where x.FC_ID.ToString() == fc_id && x.FileTypeId == fileTypeId select x; + foreach (var item in conLists) + { + if (item.AttachUrl.Contains(n)) + { + Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning); + return; + } + } + } if (sour.Count() == 0) { diff --git a/FCL/FineUIPro.Web/Global.asax.cs b/FCL/FineUIPro.Web/Global.asax.cs index 1622646..ed1ee52 100644 --- a/FCL/FineUIPro.Web/Global.asax.cs +++ b/FCL/FineUIPro.Web/Global.asax.cs @@ -87,7 +87,7 @@ } // 框架承包商评估表的填写邮件通知 - if (DateTime.Now.Hour == 11) + if (DateTime.Now.Hour == 15) { System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed += new System.Timers.ElapsedEventHandler(aTimer_FC_AutoSend); @@ -812,10 +812,25 @@ mailCode = mailCode + "|" + fo.Expire_Date.Value.ToShortDateString(); + //把CGP/S采购经理Purchasing Manager 改为fc list该合同的采购员buyer对应的部门leader + string deparatLeader = string.Empty; + if (!string.IsNullOrEmpty(fo.BuyerId)) + { + var bu = from x in Funs.DB.Sys_User where x.UserId == fo.BuyerId select x; + if (bu != null && !string.IsNullOrEmpty(bu.FirstOrDefault().DepartId)) + { + var de = from x in Funs.DB.Base_Depart where x.DepartId == bu.FirstOrDefault().DepartId select x; + if (de != null && !string.IsNullOrEmpty(de.FirstOrDefault().DepartLeader)) + { + deparatLeader = de.FirstOrDefault().DepartLeader; + } + } + } + var cc = from x in Funs.DB.Sys_User join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId where x.Email != null && x.Email != "" - && (y.RoleName == "CTE/D Manager" || y.RoleName == "Purchasing Manager" || y.RoleName == "CGP Director" || (y.RoleName== "CT Director" && x.DepartId== departId)) + && (y.RoleName == "CTE/D Manager" || x.UserId== deparatLeader || y.RoleName == "CGP Director" || (y.RoleName== "CT Director" && x.DepartId== departId)) select x; mailTo = userList.Select(x => x.Email).ToArray(); @@ -852,8 +867,8 @@ // 过期提示,30天范围 var foList = from x in Funs.DB.FC_SESRelatedData where x.Expire_Date != null - && x.Expire_Date.Value.AddMonths(-6).AddDays(-7).Date <= DateTime.Now.Date - && x.Expire_Date.Value.AddMonths(-5).AddDays(-7).Date >= DateTime.Now.Date + && x.Expire_Date.Value.AddMonths(-6).AddDays(-7) <= DateTime.Now.Date + && x.Expire_Date.Value.AddMonths(-5).AddDays(-7) >= DateTime.Now.Date select x; if (foList.Count() > 0) { diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs index 302952a..8063e9c 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs @@ -226,11 +226,11 @@ namespace FineUIPro.Web.SES PunishmentId = string.Empty; } - if (BLL.PunishmentService.IsExistSES_NO(PunishmentId, this.txtSESNo.Text.Trim(), "1")) - { - Alert.ShowInTop("The Backcharge SES NO. already exists!"); - return; - } + //if (BLL.PunishmentService.IsExistSES_NO(PunishmentId, this.txtSESNo.Text.Trim(), "1")) + //{ + // Alert.ShowInTop("The Backcharge SES NO. already exists!"); + // return; + //} if (txtViolationRelatedSes.Text != string.Empty && drpFO_No.SelectedValue != Const._Null) { diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage1.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage1.aspx.cs index 9426168..6d19349 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage1.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage1.aspx.cs @@ -6,6 +6,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage1 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -36,6 +48,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; this.txtFileName.Text = file.FileName; if (!string.IsNullOrEmpty(file.UploadMan)) @@ -78,6 +91,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -180,7 +194,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "1"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage10.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage10.aspx.cs index 4e0971e..5f6482f 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage10.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage10.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage10 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "10"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage11.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage11.aspx.cs index 223ca7a..d7a097b 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage11.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage11.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage11 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "11"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage12.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage12.aspx.cs index c10fc3f..a495707 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage12.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage12.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage12 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "12"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage13.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage13.aspx.cs index 6d53b63..8594fe9 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage13.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage13.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage13 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "13"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage2.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage2.aspx.cs index 2191314..4077bce 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage2.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage2.aspx.cs @@ -11,6 +11,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage2 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -41,6 +53,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; this.txtFileName.Text = file.FileName; if (!string.IsNullOrEmpty(file.UploadMan)) @@ -85,6 +98,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -203,7 +217,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "2"))); } #endregion diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage3.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage3.aspx.cs index 2e678ab..9b698c5 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage3.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage3.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage3 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -40,6 +52,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; this.txtFileName.Text = file.FileName; if (!string.IsNullOrEmpty(file.UploadMan)) @@ -83,6 +96,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -197,7 +211,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "3"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage4.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage4.aspx.cs index 70b19c1..9c5fa06 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage4.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage4.aspx.cs @@ -11,6 +11,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage4 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -41,6 +53,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; this.txtFileName.Text = file.FileName; if (!string.IsNullOrEmpty(file.UploadMan)) @@ -84,6 +97,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -197,7 +211,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "4"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage5.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage5.aspx.cs index abef95a..1820d99 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage5.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage5.aspx.cs @@ -11,6 +11,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage5 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -46,6 +58,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; this.txtFileName.Text = file.FileName; if (!string.IsNullOrEmpty(file.UploadMan)) @@ -99,6 +112,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -228,7 +242,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "5"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage6.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage6.aspx.cs index 2d36049..8b640dd 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage6.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage6.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage6 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "6"))); } #endregion diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage7.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage7.aspx.cs index c234a26..ec8a719 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage7.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage7.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage7 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "7"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage8.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage8.aspx.cs index e895835..fa1392a 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage8.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage8.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage8 :PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "8"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage9.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage9.aspx.cs index 443f7b5..74f6fc1 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage9.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataContractManage9.aspx.cs @@ -10,6 +10,18 @@ namespace FineUIPro.Web.SES { public partial class SESRelatedDataContractManage9 : PageBase { + public string FC_ID + { + get + { + return (string)ViewState["FC_ID"]; + } + set + { + ViewState["FC_ID"] = value; + } + } + #region 加载 /// /// 加载页面 @@ -42,6 +54,7 @@ namespace FineUIPro.Web.SES Model.FC_ContractManagement file = BLL.ContractManagementService.GetContractManagementById(fileId); if (file != null) { + this.FC_ID = file.FC_ID.ToString(); this.hdId.Text = file.FileId; //if (!string.IsNullOrEmpty(file.FileTypeId)) //{ @@ -93,6 +106,7 @@ namespace FineUIPro.Web.SES string id = Request.Params["id"]; if (!string.IsNullOrEmpty(id)) { + this.FC_ID = id; var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id); if (data != null) { @@ -205,7 +219,7 @@ namespace FineUIPro.Web.SES { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.FC_ContractManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/SESRelatedData/ContractManagement&menuId={1}&fcid={2}&fileTypeId={3}", this.hdId.Text, BLL.Const.SESRelatedDateMenuId, this.FC_ID, "9"))); } #endregion } diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx index 6edfda6..6b16ba5 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx @@ -104,7 +104,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 7548dec..67c9115 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -361,7 +361,7 @@ namespace FineUIPro.Web.SES this.numProportion_of_FC_Definition.Text = ""; } this.txtInitial_Budget.Text = data.InitialBudget.HasValue ? data.InitialBudget.Value.ToString() : ""; - this.txtActual_Budget.Text = data.Actual_Budget.HasValue ? data.Actual_Budget.Value.ToString() : ""; + this.txtActual_Budget.Text = this.txtInitial_Budget.Text;//data.Actual_Budget.HasValue ? data.Actual_Budget.Value.ToString() : ""; this.txtRemark.Text = data.Remark; if (!string.IsNullOrEmpty(data.ConstRecords)) { @@ -741,5 +741,13 @@ namespace FineUIPro.Web.SES } } #endregion + + protected void txtInitial_Budget_TextChanged(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.txtInitial_Budget.Text.Trim())) + { + this.txtActual_Budget.Text = this.txtInitial_Budget.Text.Trim(); + } + } } } \ No newline at end of file From 1cda2d1914513050db20060ef0b58b1663a2def5 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 9 May 2025 15:29:52 +0800 Subject: [PATCH 6/8] =?UTF-8?q?20250509=20=E6=96=B0=E5=A2=9E=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E4=BA=8B=E6=95=85=E6=8A=A5=E5=91=8A=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FCL/BLL/SES/PunishmentService.cs | 14 + .../IncidentInvestigation.aspx.cs | 2 +- .../IncidentInvestigationEdit.aspx.cs | 14 +- .../IncidentInvestigationReport.aspx | 169 ++++ .../IncidentInvestigationReport.aspx.cs | 324 +++++++ ...cidentInvestigationReport.aspx.designer.cs | 152 +++ .../File/Excel/质量事件报告模板.xlsx | Bin 0 -> 10483 bytes FCL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx | 4 +- .../SES/SESRelatedDataEdit.aspx.cs | 48 +- FCL/Model/Model.cs | 887 ++++++++++++++++++ 11 files changed, 1608 insertions(+), 14 deletions(-) create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs create mode 100644 FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx diff --git a/FCL/BLL/SES/PunishmentService.cs b/FCL/BLL/SES/PunishmentService.cs index f2a80f0..c56d9e1 100644 --- a/FCL/BLL/SES/PunishmentService.cs +++ b/FCL/BLL/SES/PunishmentService.cs @@ -70,6 +70,13 @@ namespace BLL newPunishment.SeType = punishment.SeType; newPunishment.PVTRequester = punishment.PVTRequester; newPunishment.IndividualSESReason = punishment.IndividualSESReason; + newPunishment.SSRAdminId = punishment.SSRAdminId; + newPunishment.SSRStaratDate = punishment.SSRStaratDate; + newPunishment.SSREndDate=punishment.SSREndDate; + newPunishment.MainCoordinatorStartDate = punishment.MainCoordinatorStartDate; + newPunishment.MainCoordinatorEndDate = punishment.MainCoordinatorEndDate; + newPunishment.UserDepStartDate = punishment.UserDepStartDate; + newPunishment.UserDepEndDate = punishment.UserDepEndDate; Funs.DB.EMC_Punishment.InsertOnSubmit(newPunishment); Funs.DB.SubmitChanges(); @@ -116,6 +123,13 @@ namespace BLL newPunishment.SeType = punishment.SeType; newPunishment.PVTRequester = punishment.PVTRequester; newPunishment.IndividualSESReason = punishment.IndividualSESReason; + newPunishment.SSRAdminId = punishment.SSRAdminId; + newPunishment.SSRStaratDate = punishment.SSRStaratDate; + newPunishment.SSREndDate = punishment.SSREndDate; + newPunishment.MainCoordinatorStartDate = punishment.MainCoordinatorStartDate; + newPunishment.MainCoordinatorEndDate = punishment.MainCoordinatorEndDate; + newPunishment.UserDepStartDate = punishment.UserDepStartDate; + newPunishment.UserDepEndDate = punishment.UserDepEndDate; Funs.DB.SubmitChanges(); } diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs index 23fc000..59dec68 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs @@ -689,7 +689,7 @@ namespace FineUIPro.Web.ContractorQuality } else if (pun.States == "6") { - s = "已审批"; + s = "已完成"; } else if (pun.States == "7") { diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs index 31d363b..6b68960 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs @@ -627,6 +627,9 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "2";//SSR已提交 + pun.SSREndDate = DateTime.Now;//SSR审批时间 + pun.MainCoordinatorStartDate = DateTime.Now;//主协调员审批到达时间 + pun.SSRAdminId = this.CurrUser.UserId; var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, "SSR"); if (updateAudit != null) @@ -755,6 +758,8 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "3";//主协调员提交 + pun.MainCoordinatorEndDate = DateTime.Now;//主协调员审批时间 + pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间 var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, this.CurrUser.UserId); if (updateAudit != null) @@ -981,13 +986,14 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + 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) @@ -1066,7 +1072,7 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning); return; } } @@ -1176,7 +1182,7 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning); return; } } @@ -1337,6 +1343,7 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "1";//申请人已提交 + pun.SSRStaratDate = DateTime.Now;//SSR审批到达时间 Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit(); audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit)); @@ -1381,6 +1388,7 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { punishment.States = "1";//申请人已提交 + punishment.SSRStaratDate = DateTime.Now;//SSR审批到达时间 } else { diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx new file mode 100644 index 0000000..da2ccdd --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx @@ -0,0 +1,169 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentInvestigationReport.aspx.cs" Inherits="FineUIPro.Web.ContractorQuality.IncidentInvestigationReport" %> + + + + + + + 承包商及供应商质量事件报告报表 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs new file mode 100644 index 0000000..400cfe1 --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs @@ -0,0 +1,324 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using NPOI.SS.UserModel; +using NPOI.XSSF.UserModel; +using System.IO; + +namespace FineUIPro.Web.ContractorQuality +{ + public partial class IncidentInvestigationReport : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + private void BindGrid() + { + string strSql = string.Empty; + strSql = @"select * from View_EMC_PunishmentReport where 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtFoNo.Text.Trim())) + { + strSql += " AND FO_NO like @FO_NO"; + listStr.Add(new SqlParameter("@FO_NO", "%" + this.txtFoNo.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtOriginal_WC.Text.Trim())) + { + strSql += " AND Original_WC =@Original_WC"; + listStr.Add(new SqlParameter("@Original_WC", this.txtOriginal_WC.Text.Trim())); + } + if (this.drpSeType.SelectedValue != "0") + { + strSql += " AND SeType =@SeType"; + listStr.Add(new SqlParameter("@SeType", this.drpSeType.SelectedText.Trim())); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 分页、排序 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出 + /// + /// 导出按钮 + /// + /// + /// + protected void btnExport_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/") + Const.ExcelUrl; + //模板文件 + string TempletFileName = rootPath + "质量事件报告模板.xlsx"; + //导出文件 + string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\"; + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + string ReportFileName = filePath + "out.xlsx"; + + FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read); + XSSFWorkbook hssfworkbook = new XSSFWorkbook(file); + + #region 质量事件报告 + XSSFSheet reportModel = (XSSFSheet)hssfworkbook.GetSheet("Sheet1"); + + XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体 + cs_content_Font.FontName = "sans-serif";//字体 + cs_content_Font.FontHeightInPoints = 10; //字体大小 + + IDataFormat dataformat = hssfworkbook.CreateDataFormat(); + ICellStyle styleDate = hssfworkbook.CreateCellStyle(); + styleDate.DataFormat = dataformat.GetFormat("yyyy/m/d"); + + var list = (from x in Funs.DB.View_EMC_PunishmentReport orderby x.PunishDate descending select x).ToList(); + if (!string.IsNullOrEmpty(this.txtFoNo.Text.Trim())) + { + list = list.Where(x => x.FO_NO.Contains(this.txtFoNo.Text.Trim())).ToList(); + } + if (!string.IsNullOrEmpty(this.txtOriginal_WC.Text.Trim())) + { + list = list.Where(x => x.Original_WC == this.txtOriginal_WC.Text.Trim()).ToList(); + } + if (this.drpSeType.SelectedValue != "0") + { + list = list.Where(x => x.SeType == this.drpSeType.SelectedText.Trim()).ToList(); + } + if (list.Count > 0) + { + var rowIndex = 1; + foreach (var itemOver in list) + { + if (reportModel.GetRow(rowIndex) == null) reportModel.CreateRow(rowIndex); + + #region 列赋值 + //发现日期 + if (reportModel.GetRow(rowIndex).GetCell(0) == null) reportModel.GetRow(rowIndex).CreateCell(0); + reportModel.GetRow(rowIndex).GetCell(0).SetCellValue(itemOver.PunishDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.PunishDate) : ""); + + reportModel.GetRow(rowIndex).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式 + + //合同号 + if (reportModel.GetRow(rowIndex).GetCell(1) == null) reportModel.GetRow(rowIndex).CreateCell(1); + reportModel.GetRow(rowIndex).GetCell(1).SetCellValue(itemOver.FO_NO); + //专业类别 + if (reportModel.GetRow(rowIndex).GetCell(2) == null) reportModel.GetRow(rowIndex).CreateCell(2); + reportModel.GetRow(rowIndex).GetCell(2).SetCellValue(itemOver.Original_WC); + //类型 + if (reportModel.GetRow(rowIndex).GetCell(3) == null) reportModel.GetRow(rowIndex).CreateCell(3); + reportModel.GetRow(rowIndex).GetCell(3).SetCellValue(itemOver.SeType); + //承包商名称 + if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4); + reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver.Contractor); + //位置 + if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5); + reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver.Location); + //质量事件描述 + if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6); + reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver.Description); + //违章等级 + if (reportModel.GetRow(rowIndex).GetCell(7) == null) reportModel.GetRow(rowIndex).CreateCell(7); + reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver.ViolationDegree); + //违章人员 + if (reportModel.GetRow(rowIndex).GetCell(8) == null) reportModel.GetRow(rowIndex).CreateCell(8); + reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver.IndividualPerson); + //违章扣款(公司) + if (reportModel.GetRow(rowIndex).GetCell(9) == null) reportModel.GetRow(rowIndex).CreateCell(9); + reportModel.GetRow(rowIndex).GetCell(9).SetCellValue(itemOver.Company.HasValue ? itemOver.Company.ToString() : ""); + //违章扣款(个人) + if (reportModel.GetRow(rowIndex).GetCell(10) == null) reportModel.GetRow(rowIndex).CreateCell(10); + reportModel.GetRow(rowIndex).GetCell(10).SetCellValue(itemOver.Individual.HasValue ? itemOver.Individual.ToString() : ""); + //合同员 + if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11); + reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver.ContractAdminName); + //主协调员 + if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12); + reportModel.GetRow(rowIndex).GetCell(12).SetCellValue(itemOver.Main_CoordinatorName); + //主协调员部门 + if (reportModel.GetRow(rowIndex).GetCell(13) == null) reportModel.GetRow(rowIndex).CreateCell(13); + reportModel.GetRow(rowIndex).GetCell(13).SetCellValue(itemOver.MCDpartment); + //用户部门 + if (reportModel.GetRow(rowIndex).GetCell(14) == null) reportModel.GetRow(rowIndex).CreateCell(14); + reportModel.GetRow(rowIndex).GetCell(14).SetCellValue(itemOver.UserDepName); + //用户部门经理 + if (reportModel.GetRow(rowIndex).GetCell(15) == null) reportModel.GetRow(rowIndex).CreateCell(15); + reportModel.GetRow(rowIndex).GetCell(15).SetCellValue(itemOver.DepartLeaderName); + //申报人 + if (reportModel.GetRow(rowIndex).GetCell(16) == null) reportModel.GetRow(rowIndex).CreateCell(16); + reportModel.GetRow(rowIndex).GetCell(16).SetCellValue(itemOver.Violation_InspectorName); + //申报人部门 + if (reportModel.GetRow(rowIndex).GetCell(17) == null) reportModel.GetRow(rowIndex).CreateCell(17); + reportModel.GetRow(rowIndex).GetCell(17).SetCellValue(itemOver.Violation_InspectorDepart); + //违章关联SES + if (reportModel.GetRow(rowIndex).GetCell(18) == null) reportModel.GetRow(rowIndex).CreateCell(18); + reportModel.GetRow(rowIndex).GetCell(18).SetCellValue(itemOver.ViolationRelatedSes); + //扣款SES + if (reportModel.GetRow(rowIndex).GetCell(19) == null) reportModel.GetRow(rowIndex).CreateCell(19); + reportModel.GetRow(rowIndex).GetCell(19).SetCellValue(itemOver.SES_No); + //扣款完成时间 + if (reportModel.GetRow(rowIndex).GetCell(20) == null) reportModel.GetRow(rowIndex).CreateCell(20); + reportModel.GetRow(rowIndex).GetCell(20).SetCellValue(itemOver.CompletionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.CompletionDate) : ""); + //当前状态 + if (reportModel.GetRow(rowIndex).GetCell(21) == null) reportModel.GetRow(rowIndex).CreateCell(21); + reportModel.GetRow(rowIndex).GetCell(21).SetCellValue(itemOver.States); + //SSR管理员 + if (reportModel.GetRow(rowIndex).GetCell(22) == null) reportModel.GetRow(rowIndex).CreateCell(22); + reportModel.GetRow(rowIndex).GetCell(22).SetCellValue(itemOver.SSRAdminName); + //SSR审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(23) == null) reportModel.GetRow(rowIndex).CreateCell(23); + reportModel.GetRow(rowIndex).GetCell(23).SetCellValue(itemOver.SSRStaratDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.SSRStaratDate) : ""); + //SSR审批时间 + if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24); + reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(itemOver.SSREndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.SSREndDate) : ""); + //SSR滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(25) == null) reportModel.GetRow(rowIndex).CreateCell(25); + reportModel.GetRow(rowIndex).GetCell(25).SetCellValue(itemOver.SSRStayDays.ToString()); + //主协调员 + if (reportModel.GetRow(rowIndex).GetCell(26) == null) reportModel.GetRow(rowIndex).CreateCell(26); + reportModel.GetRow(rowIndex).GetCell(26).SetCellValue(itemOver.Main_CoordinatorName); + //主协调员审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(27) == null) reportModel.GetRow(rowIndex).CreateCell(27); + reportModel.GetRow(rowIndex).GetCell(27).SetCellValue(itemOver.MainCoordinatorStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.MainCoordinatorStartDate) : ""); + //主协调员审批时间 + if (reportModel.GetRow(rowIndex).GetCell(28) == null) reportModel.GetRow(rowIndex).CreateCell(28); + reportModel.GetRow(rowIndex).GetCell(28).SetCellValue(itemOver.MainCoordinatorEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.MainCoordinatorEndDate) : ""); + //主协调员滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(29) == null) reportModel.GetRow(rowIndex).CreateCell(29); + reportModel.GetRow(rowIndex).GetCell(29).SetCellValue(itemOver.MainCoordinatorStayDays.ToString()); + //用户部门 + if (reportModel.GetRow(rowIndex).GetCell(30) == null) reportModel.GetRow(rowIndex).CreateCell(30); + reportModel.GetRow(rowIndex).GetCell(30).SetCellValue(itemOver.UserDepName); + //用户部门审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(31) == null) reportModel.GetRow(rowIndex).CreateCell(31); + reportModel.GetRow(rowIndex).GetCell(31).SetCellValue(itemOver.UserDepStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.UserDepStartDate) : ""); + //用户部门审批时间 + if (reportModel.GetRow(rowIndex).GetCell(32) == null) reportModel.GetRow(rowIndex).CreateCell(32); + reportModel.GetRow(rowIndex).GetCell(32).SetCellValue(itemOver.UserDepEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.UserDepEndDate) : ""); + //用户部门滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(33) == null) reportModel.GetRow(rowIndex).CreateCell(33); + reportModel.GetRow(rowIndex).GetCell(33).SetCellValue(itemOver.UserDepStayDays.ToString()); + #endregion + + rowIndex++; + } + } + #endregion + reportModel.ForceFormulaRecalculation = true; + + using (FileStream filess = File.OpenWrite(ReportFileName)) + { + hssfworkbook.Write(filess); + } + FileInfo filet = new FileInfo(ReportFileName); + Response.Clear(); + Response.Charset = "GB2312"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + // 添加头信息,为"文件下载/另存为"对话框指定默认文件名 + Response.AddHeader("Content-Disposition", "attachment; filename=质量事件报告" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx")); + // 添加头信息,指定文件大小,让浏览器能够显示下载进度 + Response.AddHeader("Content-Length", filet.Length.ToString()); + // 指定返回的是一个不能被客户端读取的流,必须被下载 + Response.ContentType = "application/ms-excel"; + // 把文件流发送到客户端 + Response.WriteFile(filet.FullName); + // 停止页面的执行 + Response.End(); + } + /// + /// 根据sql获取数据 + /// + /// + /// + /// + /// + public static DataTable GetDataTableNameRunText(string strSql, string tableName = "", params SqlParameter[] parameters) + { + DataTable dataTable = string.IsNullOrEmpty(tableName) ? new DataTable() : new DataTable(tableName); + using (SqlConnection Connection = new SqlConnection(Funs.ConnString)) + { + try + { + Connection.Open(); + SqlCommand command = new SqlCommand(strSql, Connection); + command.CommandType = CommandType.Text; + if (parameters != null) + { + command.Parameters.AddRange(parameters); + } + SqlDataAdapter adapter = new SqlDataAdapter(command); + adapter.Fill(dataTable); + } + finally + { + Connection.Close(); + } + } + return dataTable; + } + #endregion + } +} diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs new file mode 100644 index 0000000..0ab1c3e --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ContractorQuality +{ + + + public partial class IncidentInvestigationReport + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtFoNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFoNo; + + /// + /// txtOriginal_WC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOriginal_WC; + + /// + /// drpSeType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSeType; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnExport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnExport; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx b/FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..44dce996c3950088d19065ccc655582f30a114f3 GIT binary patch literal 10483 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 e{OA{J>;Da~8p + @@ -2941,6 +2942,13 @@ IncidentInvestigationEdit.aspx + + IncidentInvestigationReport.aspx + ASPXCodeBehind + + + IncidentInvestigationReport.aspx + NoPassEdit.aspx ASPXCodeBehind diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx index 6b16ba5..240a962 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx @@ -93,7 +93,7 @@ - + @@ -102,7 +102,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 67c9115..509b68b 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.BaseInfo; using NPOI.OpenXmlFormats.Spreadsheet; using System; using System.Linq; @@ -57,7 +58,7 @@ namespace FineUIPro.Web.SES BLL.ItemService.InitDropDownList(this.drpItem, true); BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种 BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true); - BLL.TypeService.InitDropDownList(this.drpType, true); + BLL.TypeService.InitDropDownList(this.drpType, true); //合同员 this.drpContract_Admin.DataTextField = "UserName"; @@ -231,7 +232,7 @@ namespace FineUIPro.Web.SES } if (data.IfExtend.HasValue) { - if (data.IfExtend==true) + if (data.IfExtend == true) { this.drpIfExtend.SelectedValue = "True"; this.txtPreviousFO.Enabled = true; @@ -450,19 +451,40 @@ namespace FineUIPro.Web.SES Alert.ShowInTop("Please select Const.Records!", MessageBoxIcon.Warning); return; } - - if (this.drpAllocation.SelectedValue == "N") + if (drpAllocation.SelectedValue == "0") { - if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null) + Alert.ShowInTop("Please select Allocation(Y/N)!", MessageBoxIcon.Warning); + return; + } + if (this.drpAllocation.SelectedValue == "Y") + { + if (!string.IsNullOrEmpty(this.numProportion_of_FC_Definition.Text.Trim())) { - if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100) + decimal d = Funs.GetNewDecimalOrZero(this.numProportion_of_FC_Definition.Text.Trim()); + if (d <= 0 || d >= 100) { - Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning); + Alert.ShowInTop("当Allocation选择Y时,Volume Allocation必须是大于0或者小于100!", MessageBoxIcon.Warning); return; } } - + else + { + Alert.ShowInTop("Volume Allocation不能为空!", MessageBoxIcon.Warning); + return; + } } + //if (this.drpAllocation.SelectedValue == "N") + //{ + // if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null) + // { + // if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100) + // { + // Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning); + // return; + // } + // } + + //} Model.FC_SESRelatedData newData = new Model.FC_SESRelatedData(); @@ -749,5 +771,15 @@ namespace FineUIPro.Web.SES this.txtActual_Budget.Text = this.txtInitial_Budget.Text.Trim(); } } + + protected void drpAllocation_SelectedIndexChanged(object sender, EventArgs e) + { + //选择N时,current allocation 默认为100 + this.numProportion_of_FC_Definition.Text = string.Empty; + if (this.drpAllocation.SelectedValue == "N") + { + this.numProportion_of_FC_Definition.Text = "100"; + } + } } } \ No newline at end of file diff --git a/FCL/Model/Model.cs b/FCL/Model/Model.cs index fd67485..29b3122 100644 --- a/FCL/Model/Model.cs +++ b/FCL/Model/Model.cs @@ -878,6 +878,14 @@ namespace Model } } + public System.Data.Linq.Table View_EMC_PunishmentReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_EMC_Que_Punishment { get @@ -9908,6 +9916,20 @@ namespace Model private string _BuyerReson; + private System.Nullable _SSRStaratDate; + + private System.Nullable _SSREndDate; + + private System.Nullable _MainCoordinatorStartDate; + + private System.Nullable _MainCoordinatorEndDate; + + private System.Nullable _UserDepStartDate; + + private System.Nullable _UserDepEndDate; + + private string _SSRAdminId; + private EntityRef _Base_Depart; private EntityRef _Sys_User; @@ -10020,6 +10042,20 @@ namespace Model partial void OnSESReasonChanged(); partial void OnBuyerResonChanging(string value); partial void OnBuyerResonChanged(); + partial void OnSSRStaratDateChanging(System.Nullable value); + partial void OnSSRStaratDateChanged(); + partial void OnSSREndDateChanging(System.Nullable value); + partial void OnSSREndDateChanged(); + partial void OnMainCoordinatorStartDateChanging(System.Nullable value); + partial void OnMainCoordinatorStartDateChanged(); + partial void OnMainCoordinatorEndDateChanging(System.Nullable value); + partial void OnMainCoordinatorEndDateChanged(); + partial void OnUserDepStartDateChanging(System.Nullable value); + partial void OnUserDepStartDateChanged(); + partial void OnUserDepEndDateChanging(System.Nullable value); + partial void OnUserDepEndDateChanged(); + partial void OnSSRAdminIdChanging(string value); + partial void OnSSRAdminIdChanged(); #endregion public EMC_Punishment() @@ -11058,6 +11094,146 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStaratDate", DbType="DateTime")] + public System.Nullable SSRStaratDate + { + get + { + return this._SSRStaratDate; + } + set + { + if ((this._SSRStaratDate != value)) + { + this.OnSSRStaratDateChanging(value); + this.SendPropertyChanging(); + this._SSRStaratDate = value; + this.SendPropertyChanged("SSRStaratDate"); + this.OnSSRStaratDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSREndDate", DbType="DateTime")] + public System.Nullable SSREndDate + { + get + { + return this._SSREndDate; + } + set + { + if ((this._SSREndDate != value)) + { + this.OnSSREndDateChanging(value); + this.SendPropertyChanging(); + this._SSREndDate = value; + this.SendPropertyChanged("SSREndDate"); + this.OnSSREndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStartDate", DbType="DateTime")] + public System.Nullable MainCoordinatorStartDate + { + get + { + return this._MainCoordinatorStartDate; + } + set + { + if ((this._MainCoordinatorStartDate != value)) + { + this.OnMainCoordinatorStartDateChanging(value); + this.SendPropertyChanging(); + this._MainCoordinatorStartDate = value; + this.SendPropertyChanged("MainCoordinatorStartDate"); + this.OnMainCoordinatorStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorEndDate", DbType="DateTime")] + public System.Nullable MainCoordinatorEndDate + { + get + { + return this._MainCoordinatorEndDate; + } + set + { + if ((this._MainCoordinatorEndDate != value)) + { + this.OnMainCoordinatorEndDateChanging(value); + this.SendPropertyChanging(); + this._MainCoordinatorEndDate = value; + this.SendPropertyChanged("MainCoordinatorEndDate"); + this.OnMainCoordinatorEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStartDate", DbType="DateTime")] + public System.Nullable UserDepStartDate + { + get + { + return this._UserDepStartDate; + } + set + { + if ((this._UserDepStartDate != value)) + { + this.OnUserDepStartDateChanging(value); + this.SendPropertyChanging(); + this._UserDepStartDate = value; + this.SendPropertyChanged("UserDepStartDate"); + this.OnUserDepStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepEndDate", DbType="DateTime")] + public System.Nullable UserDepEndDate + { + get + { + return this._UserDepEndDate; + } + set + { + if ((this._UserDepEndDate != value)) + { + this.OnUserDepEndDateChanging(value); + this.SendPropertyChanging(); + this._UserDepEndDate = value; + this.SendPropertyChanged("UserDepEndDate"); + this.OnUserDepEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminId", DbType="NVarChar(50)")] + public string SSRAdminId + { + get + { + return this._SSRAdminId; + } + set + { + if ((this._SSRAdminId != value)) + { + this.OnSSRAdminIdChanging(value); + this.SendPropertyChanging(); + this._SSRAdminId = value; + this.SendPropertyChanged("SSRAdminId"); + this.OnSSRAdminIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EMC_Punishment_Base_Depart", Storage="_Base_Depart", ThisKey="BYC_RU", OtherKey="DepartId", IsForeignKey=true)] public Base_Depart Base_Depart { @@ -31739,6 +31915,717 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_EMC_PunishmentReport")] + public partial class View_EMC_PunishmentReport + { + + private string _PunishmentId; + + private System.Nullable _PunishDate; + + private string _FO_NO; + + private string _Original_WC; + + private string _SeType; + + private string _Contractor; + + private string _Location; + + private string _Description; + + private string _ViolationDegree; + + private string _IndividualPerson; + + private System.Nullable _Company; + + private System.Nullable _Individual; + + private string _ContractAdmin; + + private string _ContractAdminName; + + private string _SSRAdminId; + + private string _SSRAdminName; + + private System.Nullable _SSRStaratDate; + + private System.Nullable _SSREndDate; + + private System.Nullable _SSRStayDays; + + private string _Main_Coordinator; + + private string _Main_CoordinatorName; + + private string _MCDpartment; + + private System.Nullable _MainCoordinatorStartDate; + + private System.Nullable _MainCoordinatorEndDate; + + private System.Nullable _MainCoordinatorStayDays; + + private string _UserDep; + + private string _UserDepName; + + private string _DepartLeader; + + private string _DepartLeaderName; + + private System.Nullable _UserDepStartDate; + + private System.Nullable _UserDepEndDate; + + private System.Nullable _UserDepStayDays; + + private string _Violation_Inspector; + + private string _Violation_InspectorName; + + private string _Violation_InspectorDepart; + + private string _ViolationRelatedSes; + + private string _SES_No; + + private System.Nullable _CompletionDate; + + private string _States; + + public View_EMC_PunishmentReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PunishmentId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string PunishmentId + { + get + { + return this._PunishmentId; + } + set + { + if ((this._PunishmentId != value)) + { + this._PunishmentId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PunishDate", DbType="DateTime")] + public System.Nullable PunishDate + { + get + { + return this._PunishDate; + } + set + { + if ((this._PunishDate != value)) + { + this._PunishDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FO_NO", DbType="NVarChar(50)")] + public string FO_NO + { + get + { + return this._FO_NO; + } + set + { + if ((this._FO_NO != value)) + { + this._FO_NO = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Original_WC", DbType="NVarChar(50)")] + public string Original_WC + { + get + { + return this._Original_WC; + } + set + { + if ((this._Original_WC != value)) + { + this._Original_WC = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeType", DbType="VarChar(4)")] + public string SeType + { + get + { + return this._SeType; + } + set + { + if ((this._SeType != value)) + { + this._SeType = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contractor", DbType="NVarChar(150)")] + public string Contractor + { + get + { + return this._Contractor; + } + set + { + if ((this._Contractor != value)) + { + this._Contractor = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Location", DbType="NVarChar(100)")] + public string Location + { + get + { + return this._Location; + } + set + { + if ((this._Location != value)) + { + this._Location = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(500)")] + public string Description + { + get + { + return this._Description; + } + set + { + if ((this._Description != value)) + { + this._Description = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViolationDegree", DbType="VarChar(10)")] + public string ViolationDegree + { + get + { + return this._ViolationDegree; + } + set + { + if ((this._ViolationDegree != value)) + { + this._ViolationDegree = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndividualPerson", DbType="NVarChar(50)")] + public string IndividualPerson + { + get + { + return this._IndividualPerson; + } + set + { + if ((this._IndividualPerson != value)) + { + this._IndividualPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Company", DbType="Money")] + public System.Nullable Company + { + get + { + return this._Company; + } + set + { + if ((this._Company != value)) + { + this._Company = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Individual", DbType="Money")] + public System.Nullable Individual + { + get + { + return this._Individual; + } + set + { + if ((this._Individual != value)) + { + this._Individual = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractAdmin", DbType="NVarChar(50)")] + public string ContractAdmin + { + get + { + return this._ContractAdmin; + } + set + { + if ((this._ContractAdmin != value)) + { + this._ContractAdmin = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractAdminName", DbType="NVarChar(50)")] + public string ContractAdminName + { + get + { + return this._ContractAdminName; + } + set + { + if ((this._ContractAdminName != value)) + { + this._ContractAdminName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminId", DbType="NVarChar(50)")] + public string SSRAdminId + { + get + { + return this._SSRAdminId; + } + set + { + if ((this._SSRAdminId != value)) + { + this._SSRAdminId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminName", DbType="NVarChar(50)")] + public string SSRAdminName + { + get + { + return this._SSRAdminName; + } + set + { + if ((this._SSRAdminName != value)) + { + this._SSRAdminName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStaratDate", DbType="DateTime")] + public System.Nullable SSRStaratDate + { + get + { + return this._SSRStaratDate; + } + set + { + if ((this._SSRStaratDate != value)) + { + this._SSRStaratDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSREndDate", DbType="DateTime")] + public System.Nullable SSREndDate + { + get + { + return this._SSREndDate; + } + set + { + if ((this._SSREndDate != value)) + { + this._SSREndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStayDays", DbType="Int")] + public System.Nullable SSRStayDays + { + get + { + return this._SSRStayDays; + } + set + { + if ((this._SSRStayDays != value)) + { + this._SSRStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Main_Coordinator", DbType="NVarChar(50)")] + public string Main_Coordinator + { + get + { + return this._Main_Coordinator; + } + set + { + if ((this._Main_Coordinator != value)) + { + this._Main_Coordinator = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Main_CoordinatorName", DbType="NVarChar(50)")] + public string Main_CoordinatorName + { + get + { + return this._Main_CoordinatorName; + } + set + { + if ((this._Main_CoordinatorName != value)) + { + this._Main_CoordinatorName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MCDpartment", DbType="NVarChar(50)")] + public string MCDpartment + { + get + { + return this._MCDpartment; + } + set + { + if ((this._MCDpartment != value)) + { + this._MCDpartment = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStartDate", DbType="DateTime")] + public System.Nullable MainCoordinatorStartDate + { + get + { + return this._MainCoordinatorStartDate; + } + set + { + if ((this._MainCoordinatorStartDate != value)) + { + this._MainCoordinatorStartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorEndDate", DbType="DateTime")] + public System.Nullable MainCoordinatorEndDate + { + get + { + return this._MainCoordinatorEndDate; + } + set + { + if ((this._MainCoordinatorEndDate != value)) + { + this._MainCoordinatorEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStayDays", DbType="Int")] + public System.Nullable MainCoordinatorStayDays + { + get + { + return this._MainCoordinatorStayDays; + } + set + { + if ((this._MainCoordinatorStayDays != value)) + { + this._MainCoordinatorStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDep", DbType="NVarChar(50)")] + public string UserDep + { + get + { + return this._UserDep; + } + set + { + if ((this._UserDep != value)) + { + this._UserDep = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepName", DbType="NVarChar(50)")] + public string UserDepName + { + get + { + return this._UserDepName; + } + set + { + if ((this._UserDepName != value)) + { + this._UserDepName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartLeader", DbType="NVarChar(50)")] + public string DepartLeader + { + get + { + return this._DepartLeader; + } + set + { + if ((this._DepartLeader != value)) + { + this._DepartLeader = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartLeaderName", DbType="NVarChar(50)")] + public string DepartLeaderName + { + get + { + return this._DepartLeaderName; + } + set + { + if ((this._DepartLeaderName != value)) + { + this._DepartLeaderName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStartDate", DbType="DateTime")] + public System.Nullable UserDepStartDate + { + get + { + return this._UserDepStartDate; + } + set + { + if ((this._UserDepStartDate != value)) + { + this._UserDepStartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepEndDate", DbType="DateTime")] + public System.Nullable UserDepEndDate + { + get + { + return this._UserDepEndDate; + } + set + { + if ((this._UserDepEndDate != value)) + { + this._UserDepEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStayDays", DbType="Int")] + public System.Nullable UserDepStayDays + { + get + { + return this._UserDepStayDays; + } + set + { + if ((this._UserDepStayDays != value)) + { + this._UserDepStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_Inspector", DbType="NVarChar(50)")] + public string Violation_Inspector + { + get + { + return this._Violation_Inspector; + } + set + { + if ((this._Violation_Inspector != value)) + { + this._Violation_Inspector = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_InspectorName", DbType="NVarChar(50)")] + public string Violation_InspectorName + { + get + { + return this._Violation_InspectorName; + } + set + { + if ((this._Violation_InspectorName != value)) + { + this._Violation_InspectorName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_InspectorDepart", DbType="NVarChar(50)")] + public string Violation_InspectorDepart + { + get + { + return this._Violation_InspectorDepart; + } + set + { + if ((this._Violation_InspectorDepart != value)) + { + this._Violation_InspectorDepart = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViolationRelatedSes", DbType="NVarChar(50)")] + public string ViolationRelatedSes + { + get + { + return this._ViolationRelatedSes; + } + set + { + if ((this._ViolationRelatedSes != value)) + { + this._ViolationRelatedSes = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SES_No", DbType="NVarChar(20)")] + public string SES_No + { + get + { + return this._SES_No; + } + set + { + if ((this._SES_No != value)) + { + this._SES_No = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDate", DbType="DateTime")] + public System.Nullable CompletionDate + { + get + { + return this._CompletionDate; + } + set + { + if ((this._CompletionDate != value)) + { + this._CompletionDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="VarChar(6) NOT NULL", CanBeNull=false)] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this._States = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_EMC_Que_Punishment")] public partial class View_EMC_Que_Punishment { From 647d00f201ed584e218ff517a7a6f6cbf08f7fc1 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 14 May 2025 23:08:03 +0800 Subject: [PATCH 7/8] =?UTF-8?q?2025-5-14=20=E9=99=84=E4=BB=B6=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E4=B8=8A=E4=BC=A0=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AttachFile/webuploader2.aspx.cs | 56 +++++++++++++------ .../Evaluation/EvaluationNew.aspx.cs | 2 +- FCL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- FCL/FineUIPro.Web/Web.config | 2 +- FCL/WebApi/WebApi.csproj.user | 2 +- 5 files changed, 43 insertions(+), 21 deletions(-) diff --git a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs index 9728e84..cec72b5 100644 --- a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs +++ b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs @@ -7,6 +7,9 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BLL; +using NPOI.SS.Formula.Functions; +using Microsoft.JScript; +using System.Security.Policy; namespace FineUIPro.Web.AttachFile { @@ -278,25 +281,44 @@ namespace FineUIPro.Web.AttachFile //合同管理附件名重复提醒 if (MenuId == BLL.Const.SESRelatedDateMenuId) { - string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\")); - string n = newName.Substring(newName.IndexOf("_") + 1); - foreach (var item in sour) + if (!string.IsNullOrEmpty(attachUrl)) { - if (item.AttachUrl.Contains(n)) + string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\")); + string n = newName.Substring(newName.IndexOf("_") + 1); + + string fc_id = Request.QueryString["fcid"]; + string fileTypeId = Request.QueryString["fileTypeId"]; + var conLists = from x in Funs.DB.FC_ContractManagement where x.FC_ID.ToString() == fc_id && x.FileTypeId == fileTypeId select x; + foreach (var item in conLists) { - Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning); - return; - } - } - string fc_id = Request.QueryString["fcid"]; - string fileTypeId = Request.QueryString["fileTypeId"]; - var conLists = from x in Funs.DB.FC_ContractManagement where x.FC_ID.ToString() == fc_id && x.FileTypeId == fileTypeId select x; - foreach (var item in conLists) - { - if (item.AttachUrl.Contains(n)) - { - Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning); - return; + if (item.FileId != ToKeyId) + { + if (item.AttachUrl.Contains(n)) + { + Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning); + return; + } + } + else + { + List newNames = new List(); + var list = attachUrl.Split(',').ToList(); + foreach (var l in list) + { + string oldname = l.Substring(l.LastIndexOf("\\")); + string oldn = oldname.Substring(oldname.IndexOf("_") + 1); + newNames.Add(oldn); + } + var query = newNames.GroupBy(x => x).Where(g => g.Count() > 1).ToDictionary(x => x.Key, y => y.Count()); + foreach (var i in query) + { + if (i.Value > 1) + { + Alert.ShowInTop(i.Key + "已存在!", MessageBoxIcon.Warning); + return; + } + } + } } } } diff --git a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs index 7a19da3..c0ebab3 100644 --- a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs +++ b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs @@ -1004,7 +1004,7 @@ namespace FineUIPro.Web.Evaluation else { sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == FoNo && p.Requisitioner == CurrUser.Account && (p.Blocked == null || p.Blocked == "") && (p.Deleted == null || p.Deleted == "")).ToList(); - } + } Grid2.DataSource = sesList.OrderByDescending(x=>x.ShowViolationDegree); Grid2.DataBind(); } diff --git a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user index accb770..fcf3204 100644 --- a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ ShowAllFiles - Release|Any CPU + Debug|Any CPU true diff --git a/FCL/FineUIPro.Web/Web.config b/FCL/FineUIPro.Web/Web.config index c97a2b2..4a08f09 100644 --- a/FCL/FineUIPro.Web/Web.config +++ b/FCL/FineUIPro.Web/Web.config @@ -55,7 +55,7 @@ - + diff --git a/FCL/WebApi/WebApi.csproj.user b/FCL/WebApi/WebApi.csproj.user index 643f3e5..ca0d73e 100644 --- a/FCL/WebApi/WebApi.csproj.user +++ b/FCL/WebApi/WebApi.csproj.user @@ -8,7 +8,7 @@ - Release|Any CPU + Debug|Any CPU From fbcfd95f7327ca89b054daf5b19fe86b4a900532 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 5 Jun 2025 10:36:47 +0800 Subject: [PATCH 8/8] 20250605 --- FCL/BLL/Common/CommonService.cs | 22 +++++++--- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx | 2 +- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs | 41 +++++++++++++++---- FCL/FineUIPro.Web/Web.config | 2 +- FCL/FineUIPro.Web/index.aspx.cs | 33 ++++++++------- 5 files changed, 68 insertions(+), 32 deletions(-) diff --git a/FCL/BLL/Common/CommonService.cs b/FCL/BLL/Common/CommonService.cs index 7d48f01..59cf54f 100644 --- a/FCL/BLL/Common/CommonService.cs +++ b/FCL/BLL/Common/CommonService.cs @@ -125,11 +125,11 @@ namespace BLL return isPower; } - + #endregion #region 根据登陆id和系统id得到菜单列表 - + /// /// 本项目用这个方法来获取权限(不按项目角色和项目用户来获取权限) @@ -145,8 +145,11 @@ namespace BLL { if (user.UserId == Const.GlyId) //// 如果是管理员或者本部人员返回所有菜单 { - var sysMenu = from x in Funs.DB.Sys_Menu orderby x.SortIndex select x; - reMenuList = sysMenu.ToList(); + var sysMenu = from x in Funs.DB.Sys_Menu orderby x.SortIndex select x; + if (sysMenu.Count() > 0) + { + reMenuList = sysMenu.ToList(); + } } else { @@ -155,7 +158,10 @@ namespace BLL where y.RoleId == user.RoleId orderby x.SortIndex select x; - reMenuList = sysMenuRole.ToList(); + if (sysMenuRole.Count() > 0) + { + reMenuList = sysMenuRole.ToList(); + } // 对主协调员权限特殊处理 List mc = (from x in Funs.DB.FC_SESRelatedData select x.Main_Coordinator).ToList(); @@ -163,11 +169,15 @@ namespace BLL { Model.Sys_Menu addSupMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == "21FCD41E-2E96-4DE0-8F5F-BDD0C967134F" select x).First(); Model.Sys_Menu addMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == Const.ContractorQualificationMenuId select x).First(); - reMenuList.Add(addMenu); + if (addMenu != null) + { + reMenuList.Add(addMenu); + } } } } reMenuList = reMenuList.Distinct().OrderBy(x => x.SortIndex).ToList(); + return reMenuList; } #endregion diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx index ef01dab..0f1fd59 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx @@ -70,7 +70,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs index 8063e9c..03fe229 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs @@ -8,6 +8,7 @@ using System.Web.UI.WebControls; using FineUIPro.Web.common; using BLL.Common; using BLL; +using Org.BouncyCastle.Asn1.Sec; namespace FineUIPro.Web.SES { @@ -36,7 +37,7 @@ namespace FineUIPro.Web.SES { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); string view = Request.Params["view"]; - + var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId); if (role != null && role.RoleName == "Contract Administrator") { @@ -85,7 +86,7 @@ namespace FineUIPro.Web.SES BLL.SESRelatedDataService.InitFONoDropDownList(this.drpFO_No, drpContractor.SelectedValue, true);//合同号 this.drpFO_No.SelectedValue = punishment.FO_NO; } - + this.txtDiscispline.Text = punishment.Discipline; this.txtLocation.Text = punishment.Location; this.txtDescription.Text = punishment.Description; @@ -98,7 +99,7 @@ namespace FineUIPro.Web.SES { drpViolationDegree.SelectedValue = pun.ViolationDegree; } - + txtContractAdmin.Text = punishment.Contract_Admin; txtMainCoordinator.Text = punishment.Main_Coordinator; txtMCDept.Text = punishment.MCDept; @@ -112,11 +113,16 @@ namespace FineUIPro.Web.SES drpSelectYesNo.SelectedValue = ""; } - txtDef.Text= punishment.Def; + txtDef.Text = punishment.Def; if (!string.IsNullOrEmpty(punishment.BYC_RU)) { this.drpBYC_RU.SelectedValue = punishment.BYC_RU; + //BYC Resp. Dept.选择NA时,End User(BYC Resp. Dept.部门)填写部分灰化 + if (this.drpBYC_RU.SelectedText == "NA") + { + GPDep.Enabled = false; + } } if (!string.IsNullOrEmpty(punishment.Violation_Inspector)) { @@ -126,7 +132,7 @@ namespace FineUIPro.Web.SES txtInspectionDep.Text = depName; } - if (this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account==Const.Gly) + if (this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account == Const.Gly) { btnSave.Hidden = false; txtViolationRelatedSes.Enabled = true; @@ -155,7 +161,7 @@ namespace FineUIPro.Web.SES } else { - + } if (view == "1") @@ -266,7 +272,7 @@ namespace FineUIPro.Web.SES { Save(); } - + } private void Save() @@ -328,7 +334,7 @@ namespace FineUIPro.Web.SES var vses = (from x in Funs.DB.EMC_Punishment where (x.RelatedSesMailIsSend == null || x.RelatedSesMailIsSend == false) && x.BYC_RU != null && x.BYC_RU.ToUpper() != "NA" && x.Flag == "1" - && x.PunishmentId== punishment.PunishmentId + && x.PunishmentId == punishment.PunishmentId select x).ToList(); if (vses.Count() > 0) { @@ -517,8 +523,25 @@ namespace FineUIPro.Web.SES SetReadonly(false); } } - + } #endregion + + /// + /// BYC Resp. Dept.选择NA时,End User(BYC Resp. Dept.部门)填写部分灰化 + /// + /// + /// + protected void drpBYC_RU_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.drpBYC_RU.SelectedText == "NA") + { + this.GPDep.Enabled = false; + } + else + { + this.GPDep.Enabled = true; + } + } } } \ No newline at end of file diff --git a/FCL/FineUIPro.Web/Web.config b/FCL/FineUIPro.Web/Web.config index 4a08f09..0d634cd 100644 --- a/FCL/FineUIPro.Web/Web.config +++ b/FCL/FineUIPro.Web/Web.config @@ -9,7 +9,7 @@
- + diff --git a/FCL/FineUIPro.Web/index.aspx.cs b/FCL/FineUIPro.Web/index.aspx.cs index 45caaab..adfb41a 100644 --- a/FCL/FineUIPro.Web/index.aspx.cs +++ b/FCL/FineUIPro.Web/index.aspx.cs @@ -125,24 +125,27 @@ namespace FineUIPro.Web leftPanel.Items.Add(accordionMenu); var dt = GetNewMenu("0"); - foreach (var dr in dt) + if (dt.Count() > 0) { - AccordionPane accordionPane = new AccordionPane(); - accordionPane.Title = dr.MenuName; - //accordionPane.Layout = Layout.Fit; - accordionPane.ShowBorder = false; - accordionPane.BodyPadding = "2px 0 0 0"; - accordionMenu.Items.Add(accordionPane); + foreach (var dr in dt) + { + AccordionPane accordionPane = new AccordionPane(); + accordionPane.Title = dr.MenuName; + //accordionPane.Layout = Layout.Fit; + accordionPane.ShowBorder = false; + accordionPane.BodyPadding = "2px 0 0 0"; + accordionMenu.Items.Add(accordionPane); - Tree innerTree = new Tree(); - innerTree.ShowBorder = false; - innerTree.ShowHeader = false; - innerTree.EnableIcons = true; - innerTree.AutoScroll = true; - innerTree.EnableSingleClickExpand = true; - accordionPane.Items.Add(innerTree); + Tree innerTree = new Tree(); + innerTree.ShowBorder = false; + innerTree.ShowHeader = false; + innerTree.EnableIcons = true; + innerTree.AutoScroll = true; + innerTree.EnableSingleClickExpand = true; + accordionPane.Items.Add(innerTree); - BoundTree(innerTree.Nodes, dr.MenuId); + BoundTree(innerTree.Nodes, dr.MenuId); + } } return accordionMenu; }