fix:施工分包部分字段不可修改

This commit is contained in:
geh 2025-03-21 18:28:54 +08:00
parent 9a169d1711
commit 28b9b2cfba
1 changed files with 32 additions and 0 deletions

View File

@ -47,6 +47,7 @@ namespace FineUIPro.Web.Transfer
{ {
this.Id = Request.Params["Id"]; this.Id = Request.Params["Id"];
this.ProjectId = this.CurrUser.LoginProjectId; this.ProjectId = this.CurrUser.LoginProjectId;
ProhibitedFields();
var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id);
if (TransferPunchlistFrom != null) if (TransferPunchlistFrom != null)
{ {
@ -97,6 +98,37 @@ namespace FineUIPro.Web.Transfer
} }
} }
/// <summary>
/// 禁止编辑字段事件触发时。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
}
/// <summary> /// <summary>
/// Photoes附件上传 /// Photoes附件上传
/// </summary> /// </summary>