From 28b9b2cfbadba2530325f11dd6f6dd9bd026b6d2 Mon Sep 17 00:00:00 2001 From: geh <1923421292@qq.com> Date: Fri, 21 Mar 2025 18:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=96=BD=E5=B7=A5=E5=88=86=E5=8C=85?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Transfer/PunchlistFromEdit.aspx.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs index 7a8ab639..43e8d42c 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs @@ -47,6 +47,7 @@ namespace FineUIPro.Web.Transfer { this.Id = Request.Params["Id"]; this.ProjectId = this.CurrUser.LoginProjectId; + ProhibitedFields(); var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); if (TransferPunchlistFrom != null) { @@ -97,6 +98,37 @@ namespace FineUIPro.Web.Transfer } } + + + /// + /// 禁止编辑字段事件触发时。 + /// + /// + /// + protected void ProhibitedFields() + { + var query = (from projectUser in Funs.DB.Project_ProjectUser + join projectUnit in Funs.DB.Project_ProjectUnit on new { projectUser.UnitId, projectUser.ProjectId } + equals new { projectUnit.UnitId, projectUnit.ProjectId } into projectUnitJoin + from projectUnit in projectUnitJoin.DefaultIfEmpty() + join sysConst in Funs.DB.Sys_Const on new + { GroupId = "ProjectUnitType", ConstValue = projectUnit.UnitType } equals new + { sysConst.GroupId, sysConst.ConstValue } into sysConstJoin + from sysConst in sysConstJoin.DefaultIfEmpty() + where projectUser.UserId == this.CurrUser.UserId + select sysConst.ConstValue) + .Distinct().FirstOrDefault(); + + if (query != null && query == "2") + { + this.txtConfirmed_By.Readonly = true; + this.txtConfirmed_Date.Readonly = true; + this.txtVerified_By.Readonly = true; + this.txtVerified_Date.Readonly = true; + } + + } + /// /// Photoes附件上传 ///