代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -1,11 +1,8 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.HSSE.EduTrain;
using Model;
using System;
using System.Collections.Generic;
@@ -7,8 +6,6 @@ using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
@@ -1,13 +1,9 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
{
@@ -68,7 +64,7 @@ namespace FineUIPro.Web.CLGL
var fileName = rootPath + initPath + hdFileName.Text;
ResponeData responeData;
responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName,fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId);
responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName, fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId);
if (responeData.code == 1)
@@ -81,8 +77,8 @@ namespace FineUIPro.Web.CLGL
Alert alert = new Alert();
alert.Message = responeData.message;
alert.MessageBoxIcon = MessageBoxIcon.Error;
alert.Show();
}
alert.Show();
}
}
#endregion
@@ -3,8 +3,6 @@ using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
@@ -93,7 +91,7 @@ namespace FineUIPro.Web.CLGL
model.WarehouseMan = this.CurrUser.PersonId;
model.WarehouseDate = DateTime.Now;
TwInOutplanmasterService.Update(model);
TwInputmasterService.GenInMasterByPlanId(Id, SaveDetail(Id),txtRemark.Text);
TwInputmasterService.GenInMasterByPlanId(Id, SaveDetail(Id), txtRemark.Text);
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
+11 -13
View File
@@ -1,16 +1,14 @@
using BLL;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.CLGL
{
@@ -54,7 +52,7 @@ namespace FineUIPro.Web.CLGL
if (drpTypeInt.SelectedValue != Const._Null)
{
table.TypeInt = Convert.ToInt32(drpTypeInt.SelectedValue);
}
}
if (drpWarehouse.SelectedValue != Const._Null)
{
table.WarehouseCode = drpWarehouse.SelectedValue;
@@ -79,12 +77,12 @@ namespace FineUIPro.Web.CLGL
for (int i = 0; i < Grid2.Rows.Count; i++)
{
var model = Grid2.Rows[i].DataItem as Model.Tw_InOutDetailOutput;
planNumTotal += (model.PlanNum ??0m );
actNumTotal += (model.ActNum ??0m );
planNumTotal += (model.PlanNum ?? 0m);
actNumTotal += (model.ActNum ?? 0m);
if (model.ActNum != model.PlanNum)
{
Grid2.Rows[i].RowCssClass = "red";
}
}
}
JObject summary = new JObject();
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CLGL
Grid2.SummaryData = summary;
}
}
#endregion
#region GV
@@ -208,7 +206,7 @@ namespace FineUIPro.Web.CLGL
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
}
#endregion
#region
@@ -256,9 +254,9 @@ namespace FineUIPro.Web.CLGL
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIDArray.Length>0)
if (Grid1.SelectedRowIDArray.Length > 0)
{
var printModel= TwInputdetailService.GePrintListByInputMasterIds(Grid1.SelectedRowIDArray.ToList());
var printModel = TwInputdetailService.GePrintListByInputMasterIds(Grid1.SelectedRowIDArray.ToList());
string path = Funs.RootPath + @"File\Excel\Temp\InputDetail.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
@@ -275,7 +273,7 @@ namespace FineUIPro.Web.CLGL
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(path);
}
}
}
/// <summary>
@@ -342,7 +340,7 @@ namespace FineUIPro.Web.CLGL
List<Model.Tw_PrintMaster> tw_PrintMasters = new List<Model.Tw_PrintMaster>();
List<Model.Tw_PrintDetail> tw_PrintDetails = new List<Model.Tw_PrintDetail>();
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
{
{
ReqUnitName = UnitService.GetUnitNameByUnitId(Person_PersonsService.GetPerson_PersonsById(result.CreateMan).UnitId),
CusBillCode = result.CusBillCode,
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
{
@@ -1,11 +1,6 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
{
@@ -35,10 +30,10 @@ namespace FineUIPro.Web.CLGL
{
Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput();
table.PipeLineMatCode = txtMatCode.Text.Trim();
if (drpWarehouse.SelectedValue!= Const._Null)
if (drpWarehouse.SelectedValue != Const._Null)
{
table.WarehouseCode = drpWarehouse.SelectedValue;
}
}
table.ProjectId = this.CurrUser.LoginProjectId;
var tb = BLL.TwMaterialstockService.GetListData(table, Grid1);
Grid1.RecordCount = TwMaterialstockService.Count;
@@ -172,7 +167,7 @@ namespace FineUIPro.Web.CLGL
}
#endregion
#region
/// 导出按钮
+21 -31
View File
@@ -1,21 +1,11 @@
using Apache.NMS.ActiveMQ.Threads;
using BLL;
using FineUIPro.Web.HSSE.EduTrain;
using FineUIPro.Web.ProjectData;
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
namespace FineUIPro.Web.CLGL
{
@@ -37,7 +27,7 @@ namespace FineUIPro.Web.CLGL
private void InitDrpList()
{
{
drpWarehouse.DataTextField = "Text";
drpWarehouse.DataValueField = "Value";
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
@@ -116,7 +106,7 @@ namespace FineUIPro.Web.CLGL
if (inOutPlanMasterModel != null)
{
if (inOutPlanMasterModel.State== (int)TwConst.State.|| inOutPlanMasterModel.State == (int)TwConst.State.)
if (inOutPlanMasterModel.State == (int)TwConst.State. || inOutPlanMasterModel.State == (int)TwConst.State.)
{
TabStrip2.Hidden = true;
TabStrip3.Hidden = false;
@@ -143,9 +133,9 @@ namespace FineUIPro.Web.CLGL
}
}
}
#endregion
@@ -213,11 +203,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork1)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName ;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -227,11 +217,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork2)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName ;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
@@ -330,7 +320,7 @@ namespace FineUIPro.Web.CLGL
MaterialDef = y.MaterialDef,
MaterialSpec = y.MaterialSpec,
MaterialUnit = y.MaterialUnit,
PlanNum = (x.Number ??0).ToString(),
PlanNum = (x.Number ?? 0).ToString(),
UnitWorkName = m.UnitWorkName,
}).ToList();
var UnitWorkName = tw_PrintDetailRelation.FirstOrDefault()?.UnitWorkName;
@@ -441,7 +431,7 @@ namespace FineUIPro.Web.CLGL
else
{
BLL.TwInOutplanmasterService.DeleteById(rowID);
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
@@ -455,7 +445,7 @@ namespace FineUIPro.Web.CLGL
}
protected void btnGenInOutMaster_Click(object sender, EventArgs e)
{
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
@@ -485,7 +475,7 @@ namespace FineUIPro.Web.CLGL
}
string planId = Grid1.SelectedRowID;
string message = TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
if (string .IsNullOrEmpty(message))
if (string.IsNullOrEmpty(message))
{
ShowNotify("撤销出库成功!", MessageBoxIcon.Success);
BindGrid();
@@ -495,7 +485,7 @@ namespace FineUIPro.Web.CLGL
Alert.ShowInTop(message, MessageBoxIcon.Warning);
return;
}
}
}
@@ -506,9 +496,9 @@ namespace FineUIPro.Web.CLGL
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string planId = Grid1.SelectedRowID;
string planId = Grid1.SelectedRowID;
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
if (planMaster.State == (int)TwConst.State. &&( planMaster.TypeInt == (int)TwConst.TypeInt. || planMaster.TypeInt == (int)TwConst.TypeInt.))
if (planMaster.State == (int)TwConst.State. && (planMaster.TypeInt == (int)TwConst.TypeInt. || planMaster.TypeInt == (int)TwConst.TypeInt.))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterEdit.aspx?UnitWorkId={0}&Id={1} ", tvControlItem.SelectedNodeID, planId, "新增 - ")));
@@ -517,7 +507,7 @@ namespace FineUIPro.Web.CLGL
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
return;
}
}
@@ -559,7 +549,7 @@ namespace FineUIPro.Web.CLGL
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
}
}
else
{
if (string.IsNullOrEmpty(planMaster.AuditMan))
@@ -609,12 +599,12 @@ namespace FineUIPro.Web.CLGL
{
if (this.TabStrip1.ActiveTabIndex == 0)
{
}
else if (this.TabStrip1.ActiveTabIndex == 1)
{
}
}
@@ -700,6 +690,6 @@ namespace FineUIPro.Web.CLGL
#endregion
}
}
@@ -7,7 +7,7 @@ using System.Linq;
namespace FineUIPro.Web.CLGL
{
public partial class OutPlanMasterEdit :PageBase
public partial class OutPlanMasterEdit : PageBase
{
/// <summary>
/// 单位工程主键
@@ -44,12 +44,12 @@ namespace FineUIPro.Web.CLGL
if (!string.IsNullOrEmpty(Id))
{
var queryModel = new Model.Tw_InOutMasterOutput()
{
Id=Id,
};
{
Id = Id,
};
var result = BLL.TwInOutplanmasterService.GetListData(queryModel).FirstOrDefault();
if (!string .IsNullOrEmpty(result.WeldTaskId) && result.WeldTaskId.Contains("|"))
if (!string.IsNullOrEmpty(result.WeldTaskId) && result.WeldTaskId.Contains("|"))
{
UnitWorkId = result.WeldTaskId.Split('|')[0];
@@ -59,9 +59,9 @@ namespace FineUIPro.Web.CLGL
UnitWorkId = result.WeldTaskId;
}
txtCreateMan.Text = result.CreateManName;
txtCreateDate.Text =result.CreateDate.Value.ToString("yyyy-MM-dd");
drpReqUnit.SelectedValue = result.ReqUnitId;
drpTypeInt.SelectedValue = result.TypeInt.ToString();
txtCreateDate.Text = result.CreateDate.Value.ToString("yyyy-MM-dd");
drpReqUnit.SelectedValue = result.ReqUnitId;
drpTypeInt.SelectedValue = result.TypeInt.ToString();
drpWarehouse.SelectedValue = result.WarehouseCode;
drpCategory.SelectedValue = result.Category.ToString();
txtRemark.Text = result.Remark;
@@ -75,7 +75,7 @@ namespace FineUIPro.Web.CLGL
txtCreateMan.Text = this.CurrUser.PersonName;
txtCreateDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
drpReqUnit.SelectedValue = this.CurrUser.UnitId;
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode,drpTypeInt.SelectedText, drpCategory.SelectedText);
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpTypeInt.SelectedText, drpCategory.SelectedText);
}
drpTypeInt_SelectedIndexChanged(null, null);
@@ -88,13 +88,13 @@ namespace FineUIPro.Web.CLGL
drpWarehouse.DataTextField = "Text";
drpWarehouse.DataValueField = "Value";
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
drpWarehouse.DataBind();
drpWarehouse.DataBind();
string[] typeIntArr = { TwConst.TypeInt..ToString(), TwConst.TypeInt..ToString() };
drpTypeInt.DataTextField = "Key";
drpTypeInt.DataValueField = "Value";
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => typeIntArr.Contains(x.Key));
drpTypeInt.DataBind();
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => typeIntArr.Contains(x.Key));
drpTypeInt.DataBind();
UnitService.InitUnitDropDownList(drpReqUnit, this.CurrUser.LoginProjectId, true);
drpCategory.DataTextField = "Key";
@@ -111,7 +111,7 @@ namespace FineUIPro.Web.CLGL
queryRelationModel.InOutPlanMasterId = Id;
var tb = TwInoutplandetailRelationService.GetListData(queryRelationModel, Grid1);
Grid1.DataSource = tb;
Grid1.DataBind();
Grid1.DataBind();
}
else
{
@@ -119,9 +119,9 @@ namespace FineUIPro.Web.CLGL
queryRelationModel.InOutPlanMasterId = Id;
var tb = TwInOutplandetailService.GetListData(queryRelationModel, Grid1);
Grid2.DataSource = tb;
Grid2.DataBind();
Grid2.DataBind();
}
}
#region
@@ -133,7 +133,7 @@ namespace FineUIPro.Web.CLGL
protected void btnSelect_Click(object sender, EventArgs e)
{
Save(Const.BtnSave);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}",UnitWorkId,Id, "选择- ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}", UnitWorkId, Id, "选择- ")));
}
protected void btnSelectStock_Click(object sender, EventArgs e)
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.CLGL
protected void btnSubmit_Click(object sender, EventArgs e)
{
Save(Const.BtnSubmit);
Save(Const.BtnSubmit);
ShowNotify("提交成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
@@ -163,7 +163,7 @@ namespace FineUIPro.Web.CLGL
switch (type)
{
case Const.BtnSave:
state=(int)TwConst.State.;
state = (int)TwConst.State.;
break;
case Const.BtnSubmit:
state = (int)TwConst.State.;
@@ -176,32 +176,32 @@ namespace FineUIPro.Web.CLGL
var model = new Tw_InOutPlanMaster()
{
Id = Id,
ProjectId=this.CurrUser.LoginProjectId,
CusBillCode=txtCusBillCode.Text,
WarehouseCode = drpWarehouse.SelectedValue,
WeldTaskId=UnitWorkId,
Source=1,
ProjectId = this.CurrUser.LoginProjectId,
CusBillCode = txtCusBillCode.Text,
WarehouseCode = drpWarehouse.SelectedValue,
WeldTaskId = UnitWorkId,
Source = 1,
CreateDate = DateTime.Now,
CreateMan = this.CurrUser.PersonId,
ReqUnitId = drpReqUnit.SelectedValue,
TypeInt = int.Parse( drpTypeInt.SelectedValue),
Remark = txtRemark.Text,
InOutType=(int)TwConst.InOutType.,
Category= int.Parse(drpCategory.SelectedValue),
State=state
ReqUnitId = drpReqUnit.SelectedValue,
TypeInt = int.Parse(drpTypeInt.SelectedValue),
Remark = txtRemark.Text,
InOutType = (int)TwConst.InOutType.,
Category = int.Parse(drpCategory.SelectedValue),
State = state
};
TwInOutplanmasterService.Add(model);
}
else
{
var model = TwInOutplanmasterService.GetById(Id);
var model = TwInOutplanmasterService.GetById(Id);
model.CusBillCode = txtCusBillCode.Text;
model.WarehouseCode = drpWarehouse.SelectedValue;
// model.WeldTaskId = UnitWorkId;
// model.WeldTaskId = UnitWorkId;
model.Source = 1;
model.CreateDate = DateTime.Now;
model.CreateMan = this.CurrUser.PersonId;
model.ReqUnitId = drpReqUnit.SelectedValue;
model.CreateMan = this.CurrUser.PersonId;
model.ReqUnitId = drpReqUnit.SelectedValue;
model.TypeInt = int.Parse(drpTypeInt.SelectedValue);
model.Remark = txtRemark.Text;
model.InOutType = (int)TwConst.InOutType.;
@@ -225,7 +225,7 @@ namespace FineUIPro.Web.CLGL
/// </summary>
private void SaveDetail_Relation()
{
//根据列表中的明细项添加
List<Model.Tw_InOutPlanDetail_Relation> detailLists = new List<Model.Tw_InOutPlanDetail_Relation>();
JArray teamGroupData = Grid1.GetMergedData();
@@ -233,14 +233,14 @@ namespace FineUIPro.Web.CLGL
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
string id = teamGroupRow.Value<string>("id");
string id = teamGroupRow.Value<string>("id");
var mdoel=TwInoutplandetailRelationService.GetById(id);
var mdoel = TwInoutplandetailRelationService.GetById(id);
if (mdoel != null)
{
mdoel.Number= values.Value<decimal>("Number");
mdoel.Number = values.Value<decimal>("Number");
}
TwInoutplandetailRelationService.Update(mdoel);
TwInoutplandetailRelationService.Update(mdoel);
}
TwInOutplandetailService.GenInOutPlanDetailByInoutPlanMasterId(Id);
@@ -263,12 +263,12 @@ namespace FineUIPro.Web.CLGL
mdoel.PlanNum = values.Value<decimal>("PlanNum");
}
TwInOutplandetailService.Update(mdoel);
}
}
}
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "delete" )
if (e.CommandName == "delete")
{
string id = e.RowID;
TwInoutplandetailRelationService.DeleteById(id);
@@ -296,10 +296,10 @@ namespace FineUIPro.Web.CLGL
{
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, drpTypeInt.SelectedText, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpCategory.SelectedText);
}
if (drpTypeInt.SelectedValue ==((int)TwConst.TypeInt.).ToString())
if (drpTypeInt.SelectedValue == ((int)TwConst.TypeInt.).ToString())
{
Grid1.Hidden=false;
Grid2.Hidden=true;
Grid1.Hidden = false;
Grid2.Hidden = true;
}
else
@@ -1,13 +1,9 @@
using System;
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using FineUIPro.Web.HSSE.EduTrain;
using Model;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.CLGL
{
@@ -43,18 +39,18 @@ namespace FineUIPro.Web.CLGL
txtWeldTaskCode.Text = model.WeldTaskCode;
var queryModel = new Model.Tw_InOutDetailOutput()
{
InOutPlanMasterId = Id
{
InOutPlanMasterId = Id
};
var detailList= TwInOutplandetailService.GetByModle(queryModel).ToList();
foreach (var item in detailList)
{
item.ActNum=item.PlanNum;
}
Grid1.DataSource=detailList;
Grid1.DataBind();
};
var detailList = TwInOutplandetailService.GetByModle(queryModel).ToList();
foreach (var item in detailList)
{
item.ActNum = item.PlanNum;
}
Grid1.DataSource = detailList;
Grid1.DataBind();
}
}
@@ -62,9 +58,9 @@ namespace FineUIPro.Web.CLGL
/// <summary>
/// 保存明细项
/// </summary>
private List<Model.Tw_OutputDetail> SaveDetail(string InOutPlanMasterId)
private List<Model.Tw_OutputDetail> SaveDetail(string InOutPlanMasterId)
{
//根据列表中的明细项添加
List<Model.Tw_OutputDetail> detailLists = new List<Model.Tw_OutputDetail>();
JArray teamGroupData = Grid1.GetMergedData();
@@ -79,11 +75,11 @@ namespace FineUIPro.Web.CLGL
//ProNoticeCId= values.Value<string>("ProNoticeCId"),
MaterialCode = values.Value<string>("MaterialCode"),
PlanNum = values.Value<decimal>("PlanNum"),
ActNum = values.Value<decimal>("ActNum"),
ActNum = values.Value<decimal>("ActNum"),
};
detailLists.Add(newDetail);
}
}
return detailLists;
}
protected void btnEditProcess_Click(object sender, EventArgs e)
@@ -1,9 +1,6 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
@@ -52,7 +49,7 @@ namespace FineUIPro.Web.CLGL
{
if (!IsPostBack)
{
UnitWorkId=Request.QueryString["UnitWorkId"];
UnitWorkId = Request.QueryString["UnitWorkId"];
Id = Request.QueryString["Id"];
this.InitTreeMenu();//加载树
InitDropList();
@@ -124,7 +121,7 @@ namespace FineUIPro.Web.CLGL
foreach (var item in pipeline)
{
TreeNode newNode = new TreeNode();
//bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(item.PipelineId, this.CurrUser.LoginProjectId);
//if (istrue)
//{
@@ -214,10 +211,10 @@ namespace FineUIPro.Web.CLGL
// 确保 SelectedNodeID 不为空
if (this.tvControlItem.SelectedNodeID == null)
{
return; // 或者显示一个提示
}
int Category=(int)TwInOutplanmasterService.GetById(Id).Category;
int Category = (int)TwInOutplanmasterService.GetById(Id).Category;
var tb = (from x in Funs.DB.HJGL_PipeLineMat
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
join z in Funs.DB.Tw_MaterialStock on x.MaterialCode equals z.PipeLineMatCode into zz
@@ -227,9 +224,9 @@ namespace FineUIPro.Web.CLGL
&& z.ProjectId == this.CurrUser.LoginProjectId
&& y.UnitWorkId == this.UnitWorkId
&& y.PipelineId == this.tvControlItem.SelectedNodeID
&& (x.PrefabricatedComponents==null||x.PrefabricatedComponents=="")
&& (x.PrefabricatedComponents == null || x.PrefabricatedComponents == "")
select new
{
@@ -240,12 +237,12 @@ namespace FineUIPro.Web.CLGL
lib.MaterialSpec,
lib.MaterialUnit,
PlanNum = x.Number,
StockNum=z.StockNum??0,
StockNum = z.StockNum ?? 0,
x.IsLooseParts,
}).ToList();
if (Category == (int)TwConst.Category.)
{
tb=tb.Where(x=>x.MaterialUnit.Contains("米")).ToList();
tb = tb.Where(x => x.MaterialUnit.Contains("米")).ToList();
}
else
{
@@ -253,8 +250,8 @@ namespace FineUIPro.Web.CLGL
}
var inoutplandetail = (from x in Funs.DB.Tw_InOutPlanDetail_Relation
//where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID
where x.PipelineId == this.tvControlItem.SelectedNodeID
//where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID
where x.PipelineId == this.tvControlItem.SelectedNodeID
&& (x.PrefabricatedComponents == null || x.PrefabricatedComponents == "")
select x).ToList();
@@ -262,7 +259,7 @@ namespace FineUIPro.Web.CLGL
tb = (from x in tb
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
from y in yy.DefaultIfEmpty()
where y == null
where y == null
select x).ToList();
@@ -353,7 +350,7 @@ namespace FineUIPro.Web.CLGL
}
}
}
}
TwInOutplandetailService.GenInOutPlanDetailByInoutPlanMasterId(Id);
}
@@ -1,17 +1,11 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
{
public partial class OutPlanMasterSelectStock : PageBase
{
{
public string Id
{
get
@@ -26,7 +20,7 @@ namespace FineUIPro.Web.CLGL
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
{
Id = Request.QueryString["Id"];
// 绑定表格
this.BindGrid();
@@ -39,7 +33,7 @@ namespace FineUIPro.Web.CLGL
/// </summary>
private void BindGrid()
{
var inoutplanmaster = TwInOutplanmasterService.GetById(Id);
if (inoutplanmaster == null)
{
@@ -58,9 +52,9 @@ namespace FineUIPro.Web.CLGL
else if (inoutplanmaster.Category == (int)TwConst.Category.)
{
table.MaterialUnit = "个";
}
var tb = BLL.TwMaterialstockService.GetListData(table, Grid1);
Grid1.RecordCount = TwMaterialstockService.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
@@ -109,7 +103,7 @@ namespace FineUIPro.Web.CLGL
PlanNum = 0,
};
TwInOutplandetailService.Add(tw_InOutPlanDetail);
}
}
}
}
+18 -20
View File
@@ -1,4 +1,5 @@
using BLL;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
@@ -8,10 +9,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MiniExcelLibs;
using NPOI.SS.Formula.Functions;
namespace FineUIPro.Web.CLGL
{
@@ -82,9 +80,9 @@ namespace FineUIPro.Web.CLGL
table.WarehouseCode = drpWarehouse.SelectedValue;
}
if (!string .IsNullOrEmpty(tvControlItem.SelectedNodeID))
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
table.UnitWorkId=tvControlItem.SelectedNodeID;
table.UnitWorkId = tvControlItem.SelectedNodeID;
}
var tb = BLL.TwOutputmasterService.GetListData(table, Grid1);
Grid1.RecordCount = TwOutputmasterService.Count;
@@ -105,14 +103,14 @@ namespace FineUIPro.Web.CLGL
for (int i = 0; i < Grid2.Rows.Count; i++)
{
var model = Grid2.Rows[i].DataItem as Model.Tw_InOutDetailOutput;
if (model.ActNum> model.PlanNum)
if (model.ActNum > model.PlanNum)
{
Grid2.Rows[i].RowCssClass = "yellow";
}
else if (model.ActNum < model.PlanNum)
{
Grid2.Rows[i].RowCssClass = "red";
}
}
}
@@ -183,11 +181,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork1)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName ;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -197,11 +195,11 @@ namespace FineUIPro.Web.CLGL
{
foreach (var q in unitWork2)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName ;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
@@ -226,7 +224,7 @@ namespace FineUIPro.Web.CLGL
/// <param name="e"></param>
protected void btnTreeFind_Click(object sender, EventArgs e)
{
this.InitTreeMenu();
this.InitTreeMenu();
}
#endregion
@@ -237,7 +235,7 @@ namespace FineUIPro.Web.CLGL
if (e.RowIndex >= 0)
{
string ID = Grid1.DataKeys[e.RowIndex][0].ToString();
BindDetailGrid(ID);
BindDetailGrid(ID);
}
}
@@ -319,8 +317,8 @@ namespace FineUIPro.Web.CLGL
return;
}
string message= TwInOutplanmasterService.GenPlanMasterByOutputMasterId(Grid1.SelectedRowID, TwConst.TypeInt.退);
if (string .IsNullOrEmpty(message))
string message = TwInOutplanmasterService.GenPlanMasterByOutputMasterId(Grid1.SelectedRowID, TwConst.TypeInt.退);
if (string.IsNullOrEmpty(message))
{
ShowNotify("生成通知单成功!", MessageBoxIcon.Success);
}
@@ -537,11 +535,11 @@ namespace FineUIPro.Web.CLGL
if (buttonList.Count > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
{
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
// this.btnPrint.Hidden = false;
{
// this.btnPrint.Hidden = false;
//this.btnMenuInOutPlanMasterEdit.Hidden = false;
this.btnGenInPlanMaster.Hidden = false;
this.btnGenOutPlanMaster.Hidden = false;
@@ -578,7 +576,7 @@ namespace FineUIPro.Web.CLGL
List<Model.Tw_PrintDetail> tw_PrintDetails = new List<Model.Tw_PrintDetail>();
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
{
ReqUnitName = result.ReqUnitName,
CusBillCode = result.CusBillCode,
CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"),
@@ -679,7 +677,7 @@ namespace FineUIPro.Web.CLGL
{
["出库明细"] = TwOutputdetailService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList()),
["管线材料明细"] = TwInoutplandetailRelationService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList())
};
};
string path = Funs.RootPath + @"File\Excel\Temp\OutputDetail.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CLGL
{