feat(HJGL): 新增材料仓库管理并优化管线划分页面
**新增功能:** - 添加材料仓库管理模块(增删改查) - 管线划分页面支持按流水段和管线划分筛选 - 管线划分页面支持批量设置仓库 **技术改进:** - 新增 Base_Warehouse 表和模型 - 扩展 HJGL_Pipeline 模型添加 WarehouseId 字段 - 优化管线查询支持多条件组合
This commit is contained in:
@@ -33,8 +33,9 @@
|
||||
.f-grid-row.green {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.f-grid-row {
|
||||
font-size:smaller;
|
||||
font-size: smaller;
|
||||
}
|
||||
</style>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
@@ -50,6 +51,13 @@
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWarehouse" runat="server" Label="仓库" AutoSelectFirstItem="true"
|
||||
Width="230px" LabelWidth="65px" OnSelectedIndexChanged="drpWarehouse_SelectedIndexChanged" AutoPostBack="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号"
|
||||
EmptyText="输入查询条件" Width="230px" LabelWidth="65px">
|
||||
@@ -57,17 +65,18 @@
|
||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left" >
|
||||
<Items >
|
||||
|
||||
|
||||
<f:Toolbar ID="Toolbar6" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
<f:DropDownList ID="drpFlowingSection" Label="流水段" AutoPostBack="true"
|
||||
runat="server" LabelWidth="80px"
|
||||
Width="180px" LabelAlign="Left">
|
||||
runat="server" LabelWidth="80px"
|
||||
Width="180px" LabelAlign="Left">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
|
||||
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
@@ -84,14 +93,14 @@
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="装置区域"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="false" AutoLeafIdentification="true" EnableSingleExpand="true" EnableCheckBox="true"
|
||||
EnableSingleClickExpand="false" AutoLeafIdentification="true" EnableSingleExpand="true" EnableCheckBox="true"
|
||||
EnableTextSelection="true" OnNodeExpand="tvControlItem_TreeNodeExpanded">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panel3" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
|
||||
Width="230px" Title="匹配管线(棕色为正在出库中管线)" ShowBorder="true" ShowHeader="true"
|
||||
BodyPadding="10px" AutoScroll="true">
|
||||
BodyPadding="10px" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" Position="Bottom" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
@@ -99,12 +108,12 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnDeletePipelineMatchMat" Icon="Delete" runat="server" OnClick="btnDeletePipelineMatchMat_Click">
|
||||
</f:Button>
|
||||
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="Key" DataIDField="Key" ShowGridHeader="false" EnableRowLines="false" EnableAlternateRowColor="false">
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="Value" DataField="Value" SortField="Value"
|
||||
@@ -129,10 +138,10 @@
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lbRate" runat="server" LabelWidth="100px" Hidden="true"></f:Label>
|
||||
<f:Label ID="lbNote" runat="server" LabelWidth="100px" Text="绿色为匹配率100%,红色为匹配率小于100%"></f:Label>
|
||||
<f:Label ID="lbNote" runat="server" LabelWidth="100px" Text="绿色为匹配率100%,红色为匹配率小于100%"></f:Label>
|
||||
<f:Button ID="btnGenTask" ToolTip="生成任务单" Icon="ApplicationViewIcons" runat="server" OnClick="btnGenTask_Click" ConfirmText="确定生成任务单吗?">
|
||||
</f:Button>
|
||||
<f:CheckBox ID="cbSelectCom" ShowLabel="false" runat="server" Text="默认勾选匹配100%" Checked="true" >
|
||||
<f:CheckBox ID="cbSelectCom" ShowLabel="false" runat="server" Text="默认勾选匹配100%" Checked="true">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -141,7 +150,7 @@
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="材料匹配" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="PipelineId" AllowSorting="true" OnRowClick="Grid2_RowClick"
|
||||
SortField="PipelineId" SortDirection="ASC" EnableCheckBoxSelect="true" >
|
||||
SortField="PipelineId" SortDirection="ASC" EnableCheckBoxSelect="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="150px" ColumnID="UnitWorkName" DataField="UnitWorkName" SortField="UnitWorkName"
|
||||
FieldType="String" HeaderText="主项" HeaderTextAlign="Center"
|
||||
@@ -167,7 +176,7 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound"
|
||||
SortField="Id" SortDirection="ASC" OnSort="Grid1_Sort" >
|
||||
SortField="Id" SortDirection="ASC" OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderText="管线号" HeaderTextAlign="Center"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
@@ -12,18 +13,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
public partial class WeldMatMatch : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
//public Dictionary<string, string> dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
//public static List<Model.Tw_PipeMatMatchOutput> tw_PipeMatMatchOutputs ;
|
||||
public static decimal Rate = 0;
|
||||
public string WarehouseCode
|
||||
public string WarehouseId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["WarehouseCode"];
|
||||
return (string)ViewState["WarehouseId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["WarehouseCode"] = value;
|
||||
ViewState["WarehouseId"] = value;
|
||||
}
|
||||
}
|
||||
public string PipeArea
|
||||
@@ -79,15 +78,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
|
||||
PipeArea = Request.Params["PipeArea"];
|
||||
if (PipeArea == "2")
|
||||
{
|
||||
WarehouseCode = "现场安装";
|
||||
}
|
||||
else
|
||||
{
|
||||
WarehouseCode = "工厂预制";
|
||||
}
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
drpWarehouse.DataTextField = "Key";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId);
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse_SelectedIndexChanged(null, null);
|
||||
; HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
@@ -159,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId select x).Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -182,7 +178,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId select x).Count();
|
||||
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
|
||||
//int a = NowComPipelineCode.Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
@@ -221,14 +217,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
var CompleteInOutPlanDetail_RelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
where y.State == (int)TwConst.State.已完成 && y.WarehouseCode == WarehouseCode
|
||||
where y.State == (int)TwConst.State.已完成 && y.WarehouseCode == drpWarehouse.SelectedValue
|
||||
select x;
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
join y in CompleteInOutPlanDetail_RelationList on x.PipelineId equals y.PipelineId into temp
|
||||
from y in temp.DefaultIfEmpty()
|
||||
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) && x.WarehouseId==WarehouseId
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
@@ -396,7 +392,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var model2 = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(model));
|
||||
string pipeid = model2.First().Value;
|
||||
|
||||
var relationModle = TwInoutplandetailRelationService.GetByPipelineId(pipeid, WarehouseCode);
|
||||
var relationModle = TwInoutplandetailRelationService.GetByPipelineId(pipeid, drpWarehouse.SelectedValue);
|
||||
if (relationModle != null)
|
||||
{
|
||||
Grid3.Rows[i].RowCssClass = "yellow";
|
||||
@@ -499,7 +495,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID && x.PipeArea == PipeArea
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
List<string> pipelineList = new List<string>();
|
||||
@@ -570,7 +566,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
dicSeclectPipeLine.Add(node.NodeID, node.Text);
|
||||
}
|
||||
}
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||
|
||||
BindGrid3();
|
||||
BindGrid2();
|
||||
@@ -587,7 +583,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
node.Checked = false;
|
||||
}
|
||||
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||
|
||||
BindGrid3();
|
||||
BindGrid2();
|
||||
@@ -765,8 +761,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return isCover;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
protected void drpWarehouse_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
WarehouseId = Base_WarehouseService.GetWarehouseList(this.CurrUser.LoginProjectId).Where(x => x.WarehouseName == drpWarehouse.SelectedValue).Select(x => x.WarehouseId).FirstOrDefault();
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpWarehouse 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWarehouse;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
@@ -78,13 +96,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected global::FineUIPro.HiddenField hdUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar5 控件。
|
||||
/// Toolbar6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar5;
|
||||
protected global::FineUIPro.Toolbar Toolbar6;
|
||||
|
||||
/// <summary>
|
||||
/// drpFlowingSection 控件。
|
||||
@@ -96,13 +114,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected global::FineUIPro.DropDownList drpFlowingSection;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// Toolbar5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
protected global::FineUIPro.Toolbar Toolbar5;
|
||||
|
||||
/// <summary>
|
||||
/// btnTreeFind 控件。
|
||||
|
||||
Reference in New Issue
Block a user