焊接管理,补充公司级树

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
@@ -9,6 +9,22 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
public partial class StockIn : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -19,6 +35,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();
this.drpWeldType.DataTextField = "Text";
@@ -31,11 +61,31 @@ namespace FineUIPro.Web.HJGL.MaterialManage
}
}
/// <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 StockIn.StockInId,StockIn.WeldId,StockIn.Amount,StockIn.Weight,Users.UserName AS Materialman,StockIn.InStockDate,
ReviewDate,Weld.ConsumablesCode,Weld.ConsumablesName,Weld.SteelFormat,StockIn.Warrantybook, StockIn.HeartNo,
case Weld.ConsumablesType when '1' then '焊丝' when '2' then '焊条' when '3' then '焊剂' else '' end as WeldTypeName,Weld.WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
@@ -47,7 +97,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=store.UnitId
WHERE StockIn.Flag='1' and StockIn.ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(this.txtWeldName.Text.Trim()))
{
strSql += " AND Weld.ConsumablesCode LIKE @ConsumablesCode";
@@ -158,7 +208,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_StockInMenuId, BLL.Const.BtnAdd))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnAdd))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StockInEdit.aspx?StockInId={0}", string.Empty, "编辑 - ")));
}
@@ -172,7 +222,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
protected void btnMoveStore_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnModify))
{
if (CurrUser.UserId != Const.sysglyId && CurrUser.UserId != Const.hfnbdId)
{
@@ -217,7 +267,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void EditData()
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
@@ -269,7 +319,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void DeleteData()
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnDelete))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 1)