补充公司级树

This commit is contained in:
2025-04-13 20:44:26 +08:00
parent 96899ce306
commit f5344bddfb
34 changed files with 2330 additions and 1350 deletions
@@ -4,10 +4,6 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace FineUIPro.Web.CQMS.Check
{
@@ -62,21 +58,50 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
ProjectId = CurrUser.LoginProjectId;
GetButtonPower();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("EditJointCheck.aspx") + "return false;";
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
//{
// this.ProjectId = Request.Params["projectId"];
//}
//权限按钮方法
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
JointCheckService.Init(drpCheckType, true);
JointCheckService.InitState(drpState, true);
bindata();
BindGrid();
}
}
private void InitDropDownList()
{
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
//<summary>
//获取办理人姓名
//</summary>
@@ -192,9 +217,12 @@ namespace FineUIPro.Web.CQMS.Check
/// <summary>
/// 列表数据
/// </summary>
private void bindata()
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT chec.JointCheckId,chec.JointCheckCode,chec.State,chec.CheckDate,chec.CheckName,chec.unitId,"
+ @" unit.UnitName,u.userName as CheckMan,chec.CheckType "
+ @" FROM Check_JointCheck chec"
@@ -202,7 +230,7 @@ namespace FineUIPro.Web.CQMS.Check
+ @" left join sys_User u on u.userId = chec.CheckMan"
+ @" where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') ";
listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
@@ -265,13 +293,13 @@ namespace FineUIPro.Web.CQMS.Check
protected void btnQuery_Click(object sender, EventArgs e)
{
bindata();
BindGrid();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
GvJoinCheck.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
bindata();
BindGrid();
}
protected void GvJoinCheck_RowDoubleClick(object sender, GridRowClickEventArgs e)
@@ -283,7 +311,7 @@ namespace FineUIPro.Web.CQMS.Check
protected void GvJoinCheck_PageIndexChange(object sender, GridPageEventArgs e)
{
bindata();
BindGrid();
}
protected void GvJoinCheck_FilterChange(object sender, EventArgs e)
@@ -298,7 +326,7 @@ namespace FineUIPro.Web.CQMS.Check
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
bindata();
BindGrid();
}
protected void btnMenuModify_Click(object sender, EventArgs e)
@@ -330,7 +358,7 @@ namespace FineUIPro.Web.CQMS.Check
JointCheckService.DeleteJointCheck(jointCheckId);
LogService.AddSys_Log(CurrUser, "001", jointCheckId, Const.JointCheckMenuId, "删除质量共检记录");
Alert.ShowInTop("删除成功!", MessageBoxIcon.Warning);
bindata();
BindGrid();
}
@@ -399,7 +427,7 @@ namespace FineUIPro.Web.CQMS.Check
drpState.SelectedIndex = 0;
txtStartTime.Text = "";
txtEndTime.Text = "";
bindata();
BindGrid();
}
}
}