材料管理更新

This commit is contained in:
李鹏飞 2024-11-25 19:09:24 +08:00
parent 8bb93b36f9
commit cc22d0e0ae
6 changed files with 30 additions and 11 deletions

Binary file not shown.

View File

@ -54,10 +54,10 @@
</Items>
</f:Panel>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="入库单列表"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
DataIDField="Id" EnableColumnLines="true" Height="400" EnableBigData="true"
EnableTextSelection="True">
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="入库单列表" IsFluid="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="True"
DataIDField="Id" EnableCollapse="false" EnableBigData="true" Height="400"
EnableTextSelection="True" ClicksToEdit="1">
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">

View File

@ -22,6 +22,10 @@
.f-grid-row.red {
background-color: darkgoldenrod;
}
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
@ -40,7 +44,7 @@
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" EnableCheckBoxSelect="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick" OnRowCommand="Grid1_RowCommand">
EnableRowDoubleClickEvent="true" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick" OnRowCommand="Grid1_RowCommand">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
@ -128,7 +132,7 @@
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="DESC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000">
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableSummary="true" SummaryPosition="Bottom">
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">

View File

@ -10,6 +10,7 @@ using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.CLGL
{
@ -73,16 +74,27 @@ namespace FineUIPro.Web.CLGL
var tb = BLL.TwInputdetailService.GetListData(table, Grid2);
Grid2.DataSource = tb;
Grid2.DataBind();
var planNumTotal = 0m;
var actNumTotal = 0m;
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 );
if (model.ActNum != model.PlanNum)
{
Grid2.Rows[i].RowCssClass = "red";
}
}
}
JObject summary = new JObject();
//summary.Add("Major", "全部合计");
summary.Add("PlanNum", planNumTotal.ToString("F2"));
summary.Add("ActNum", actNumTotal.ToString("F2"));
Grid2.SummaryData = summary;
}
#endregion
#region GV

File diff suppressed because one or more lines are too long

View File

@ -241,7 +241,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 数据绑定
/// </summary>
private void BindGrid()
{
if (tvControlItem.SelectedNode==null) return;
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
@ -255,6 +257,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
{
strSql += " and pipe.UnitWorkId =@UnitWorkId";