This commit is contained in:
2024-09-24 20:38:50 +08:00
parent 4e9832dc8a
commit 8edf7e1389
46 changed files with 3109 additions and 748 deletions
+91 -34
View File
@@ -83,6 +83,9 @@ namespace FineUIPro.Web.CLGL
Grid2.DataSource = null;
Grid2.DataBind();
Grid3.DataSource = null;
Grid3.DataBind();
}
private void BindDetailGrid(string inOutPlanMasterId)
@@ -93,6 +96,14 @@ namespace FineUIPro.Web.CLGL
Grid2.DataSource = tb;
Grid2.DataBind();
}
private void BindDetailRelationGrid(string inOutPlanMasterId)
{
Model.Tw_InOutPlanDetail_Relation table = new Model.Tw_InOutPlanDetail_Relation();
table.InOutPlanMasterId = inOutPlanMasterId;
var tb = BLL.TwInoutplandetailRelationService.GetListData(table, Grid3);
Grid3.DataSource = tb;
Grid3.DataBind();
}
#endregion
#region
@@ -159,11 +170,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork1)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn1.Text = q.UnitWorkName ;
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -173,11 +184,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName ;
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
@@ -215,6 +226,7 @@ namespace FineUIPro.Web.CLGL
{
string ID = Grid1.DataKeys[e.RowIndex][0].ToString();
BindDetailGrid(ID);
BindDetailRelationGrid(ID);
}
}
@@ -229,9 +241,9 @@ namespace FineUIPro.Web.CLGL
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnAdd))
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutPlanMasterMenuId, Const.BtnAdd))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InOutPlanMasterEdit.aspx?}", "新增 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterEdit.aspx", "新增 - ")));
}
else
{
@@ -241,7 +253,7 @@ namespace FineUIPro.Web.CLGL
protected void btnMenuInOutPlanMasterDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutPlanMasterMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
@@ -287,7 +299,7 @@ namespace FineUIPro.Web.CLGL
}
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterEdit.aspx?Id={0}", Grid1.SelectedRowID, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterOut.aspx?Id={0}", Grid1.SelectedRowID, "编辑 - ")));
}
}
@@ -300,7 +312,18 @@ namespace FineUIPro.Web.CLGL
return;
}
string planId = Grid1.SelectedRowID;
TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
string message = TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
if (string .IsNullOrEmpty(message))
{
ShowNotify("撤销出库成功!", MessageBoxIcon.Success);
BindGrid();
}
else
{
Alert.ShowInTop(message, MessageBoxIcon.Warning);
return;
}
}
@@ -308,6 +331,62 @@ namespace FineUIPro.Web.CLGL
{
}
protected void btnPassMaster_OnClick(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string planId = Grid1.SelectedRowID;
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
if (planMaster.State != (int)TwConst.State.)
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
}
else
{
//planMaster.State = (int)TwConst.State.已审核;
planMaster.AuditMan = this.CurrUser.PersonId;
planMaster.AuditDate = DateTime.Now;
TwInOutplanmasterService.Update(planMaster);
BindGrid();
ShowNotify("审核通过!", MessageBoxIcon.Success);
}
}
protected void btnPassMaster2_OnClick(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string planId = Grid1.SelectedRowID;
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
if (planMaster.State != (int)TwConst.State.)
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
}
else
{
if (string.IsNullOrEmpty(planMaster.AuditMan))
{
Alert.ShowInTop("请专工先进行预审核!", MessageBoxIcon.Warning);
return;
}
planMaster.State = (int)TwConst.State.;
planMaster.AuditMan2 = this.CurrUser.PersonId;
planMaster.AuditDate2 = DateTime.Now;
TwInOutplanmasterService.Update(planMaster);
BindGrid();
ShowNotify("审核通过!", MessageBoxIcon.Success);
}
}
#endregion
#region
@@ -469,12 +548,12 @@ namespace FineUIPro.Web.CLGL
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.Tw_InPlanMasterMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.Tw_OutPlanMasterMenuId);
if (buttonList.Count > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
// this.btnNew.Hidden = false;
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
@@ -490,34 +569,12 @@ namespace FineUIPro.Web.CLGL
if (buttonList.Contains(BLL.Const.BtnAuditing))
{
this.btnPassMaster.Hidden = false;
this.btnPassMaster2.Hidden = false;
}
}
}
#endregion
protected void btnPassMaster_OnClick(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string planId = Grid1.SelectedRowID;
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
if (planMaster.State != (int)TwConst.State.)
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
}
else
{
planMaster.State = (int)TwConst.State.;
TwInOutplanmasterService.Update(planMaster);
BindGrid();
ShowNotify("审核通过!", MessageBoxIcon.Success);
}
}
}
}