材料入库导入增加序号

This commit is contained in:
2024-11-12 17:56:01 +08:00
parent 2cdb47a854
commit 57a4adcd9e
17 changed files with 115 additions and 28 deletions
+10 -3
View File
@@ -143,7 +143,14 @@
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode"
SortDirection="DESC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" >
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" >
<Toolbars>
<f:Toolbar runat="server">
<Items>
<f:TextBox runat="server" ID="txtMaterialCode" Label="材料编码" AutoPostBack="True" OnTextChanged="txtMaterialCode_OnTextChanged" LabelWidth="100px" LabelAlign="Right" Width="200px"/>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
@@ -151,8 +158,8 @@
<asp:Label ID="Label1" runat="server" Text='<%# Grid2.PageIndex * Grid2.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
FieldType="String" HeaderText="材料编码" TextAlign="Left" HeaderTextAlign="Center">
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
FieldType="String" HeaderText="材料编码" TextAlign="Left" HeaderTextAlign="Center" >
</f:RenderField>
<f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
FieldType="String" HeaderText="材料名称" TextAlign="Left" HeaderTextAlign="Center">
+8 -3
View File
@@ -80,6 +80,7 @@ namespace FineUIPro.Web.CLGL
{
Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput();
table.InOutPlanMasterId = inOutPlanMasterId;
table.MaterialCode = txtMaterialCode.Text;
var tb = BLL.TwInOutplandetailService.GetListData(table, Grid2);
Grid2.DataSource = tb;
Grid2.DataBind();
@@ -329,7 +330,6 @@ namespace FineUIPro.Web.CLGL
this.btnMenuEdit.Hidden = false;
this.btnGenInMaster.Hidden = false;
this.btnRevokeGenInMaster.Hidden = false;
this.btnPassMaster.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
@@ -438,8 +438,8 @@ namespace FineUIPro.Web.CLGL
AuditDate = string.Format("{0:yyyy-MM-dd}", result.AuditDate),
AuditManName2 = !string.IsNullOrEmpty(result.AuditMan2) ? BLL.Person_PersonsService.getSignatureUrl(result.AuditMan2) : "",
AuditDate2 = string.Format("{0:yyyy-MM-dd}", result.AuditDate2),
WarehouseManName = !string.IsNullOrEmpty(result.WarehouseMan) ? BLL.Person_PersonsService.getSignatureUrl(result.WarehouseMan) : "",
WarehouseManAuditDate = string.Format("{0:yyyy-MM-dd}", result.WarehouseDate),
WarehouseManName = !string.IsNullOrEmpty(result.CreateManName) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateManName) : "",
WarehouseManAuditDate = string.Format("{0:yyyy-MM-dd}", result.CreateDate),
};
tw_PrintMasters.Add(printMaster);
// orderApproveIn.ProjectManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ProjectManager) : "";
@@ -479,6 +479,7 @@ namespace FineUIPro.Web.CLGL
var tw_PrintDetail = ( from x in Funs.DB.Tw_InOutPlanDetail
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
where x.InOutPlanMasterId==Id
orderby x.SortIndex
select new Model.Tw_PrintDetail
{
SortIndex =0,
@@ -518,5 +519,9 @@ namespace FineUIPro.Web.CLGL
}
}
protected void txtMaterialCode_OnTextChanged(object sender, EventArgs e)
{
BindDetailGrid(Grid1.SelectedRowID);
}
}
}
+9
View File
@@ -221,6 +221,15 @@ namespace FineUIPro.Web.CLGL
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// txtMaterialCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCode;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -17,7 +17,7 @@
<form id="form1" runat="server">
<div>
<f:PageManager runat="server" AutoSizePanelID="Form2" />
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="库单详情"
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="库单详情"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="TbCreate" Position="Top" ToolbarAlign="Right" runat="server" >
@@ -54,7 +54,7 @@
</Items>
</f:Panel>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="库单列表"
<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">
+1 -1
View File
@@ -38,7 +38,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="出入库计划主表" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
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">
<Toolbars>
+21 -9
View File
@@ -1,4 +1,5 @@
using BLL;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
@@ -243,15 +244,26 @@ namespace FineUIPro.Web.CLGL
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("出入库计划主表" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = 500;
this.BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
if (Grid1.SelectedRowIDArray.Length>0)
{
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");
MiniExcel.SaveAs(path, printModel);
string fileName = "入库明细表.xlsx";
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(path);
}
}
/// <summary>
+1 -1
View File
@@ -35,7 +35,7 @@
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" EnableTextSelection="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" >
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
+1 -1
View File
@@ -165,7 +165,7 @@
<f:Grid ID="Grid2" ShowBorder="False" ShowHeader="False" Title="出库明细" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode"
SortDirection="DESC" EnableColumnLines="true"
SortDirection="DESC" EnableColumnLines="true" EnableTextSelection="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000">
<Columns>
+1 -1
View File
@@ -158,7 +158,7 @@
<f:Grid ID="Grid2" ShowBorder="False" ShowHeader="False" Title="入库申请明细表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode"
SortDirection="DESC" EnableColumnLines="true"
SortDirection="DESC" EnableColumnLines="true" EnableTextSelection="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000">
<Columns>
<%--<f:RenderField Width="150px" ColumnID="PipelineComponent" DataField="PipelineComponent" SortField="PipelineComponent"