焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -11,6 +11,22 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
public partial class UsingPlan : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -21,6 +37,20 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
string lastPlan = @"SELECT p.UsingPlanId FROM dbo.Weld_UsingPlan p
@@ -41,12 +71,33 @@ namespace FineUIPro.Web.HJGL.MaterialManage
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT UsingPlan.UsingPlanId, UsingPlan.WeldId, UsingPlan.ProjectId, UsingPlan.UsePosition,team.TeamGroupName,UsingPlan.STE_Name,
unit.UnitName AS UsingUnit,UsingPlan.Amount, UsingPlan.UsingManOne, UsingPlan.InPutDate,
UsingPlan.OrderDate,UsingPlan.OrderTime, UsingPlan.CancelDate,UsingPlan.IsNeedConfirm,
@@ -85,7 +136,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
}
strSql += " AND UsingPlan.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(this.txtWeldCode.Text.Trim()))
{
strSql += " AND Weld.ConsumablesCode LIKE @ConsumablesCode";
@@ -270,7 +321,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAdd))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAdd))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UsingPlanEdit.aspx?UsingPlanId={0}", string.Empty, "编辑 - ")));
}
@@ -303,7 +354,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void EditData()
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
@@ -348,7 +399,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void CopyData()
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
@@ -395,7 +446,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
protected void btnConfirm_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAuditing))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAuditing))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
@@ -442,7 +493,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAuditing))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnAuditing))
{
bool selectItem = false;
CheckBoxField cb = Grid1.FindColumn("WelderAudit") as CheckBoxField;
@@ -491,7 +542,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void DeleteData()
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnDelete))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingPlanMenuId, BLL.Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{