Compare commits

...

2 Commits

Author SHA1 Message Date
毕文静 fbcfd95f73 20250605 2025-06-05 10:36:47 +08:00
毕文静 647d00f201 2025-5-14 附件重复上传提醒 2025-05-14 23:08:03 +08:00
9 changed files with 111 additions and 53 deletions

View File

@ -125,11 +125,11 @@ namespace BLL
return isPower;
}
#endregion
#region id和系统id得到菜单列表
/// <summary>
/// 本项目用这个方法来获取权限(不按项目角色和项目用户来获取权限)
@ -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<string> 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

View File

@ -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<string> newNames = new List<string>();
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;
}
}
}
}
}
}

View File

@ -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();
}

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>
</Use64BitIISExpress>

View File

@ -70,7 +70,7 @@
<Items>
<f:TextBox ID="txtUserRepresentative" runat="server" Label="User Representative" LabelAlign="Right" LabelWidth="160px" Readonly="true">
</f:TextBox>
<f:DropDownList ID="drpBYC_RU" runat="server" Label="BYC Resp. Dept." EnableGroup="true" EnableEdit="true" LabelAlign="Right" LabelWidth="160px" Required="true" ShowRedStar="true"></f:DropDownList>
<f:DropDownList ID="drpBYC_RU" runat="server" Label="BYC Resp. Dept." EnableGroup="true" EnableEdit="true" LabelAlign="Right" LabelWidth="160px" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpBYC_RU_SelectedIndexChanged"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -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 UserBYC 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
/// <summary>
/// BYC Resp. Dept.选择NA时End UserBYC Resp. Dept.部门)填写部分灰化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpBYC_RU_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpBYC_RU.SelectedText == "NA")
{
this.GPDep.Enabled = false;
}
else
{
this.GPDep.Enabled = true;
}
}
}
}

View File

@ -9,7 +9,7 @@
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="FCLDBConnectionString" connectionString="Data Source=.\sql2016;Initial Catalog=FCLDB;uid=sa;pwd=1111;" providerName="System.Data.SqlClient"/>
<add name="FCLDBConnectionString" connectionString="Data Source=.\sql2022;Initial Catalog=FCLDB;uid=sa;pwd=1111;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<FineUIPro DebugMode="false" CustomTheme="Metro_Dark_Blue" EnableAnimation="true" JSLibrary="All"/>
<appSettings>
@ -55,7 +55,7 @@
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.6.1">
<compilation debug="true" targetFramework="4.6.1">
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</buildProviders>

View File

@ -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;
}

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>