焊接修改

This commit is contained in:
2024-12-10 15:18:31 +08:00
parent f4f7f93835
commit b70dec0803
22 changed files with 266 additions and 204 deletions
@@ -77,6 +77,9 @@
<f:DropDownList ID="drpStates" runat="server" Label="状态"
LabelWidth="70px" LabelAlign="Right" Width="170px">
</f:DropDownList>
<f:DropDownList ID="drpCategory" runat="server" Label="类别"
LabelWidth="70px" LabelAlign="Right" Width="170px">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSearch" ToolTip="查询" Icon="SystemSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
@@ -53,6 +53,11 @@ namespace FineUIPro.Web.CLGL
drpStates.DataSource = BLL.TwConst.StateMap;
drpStates.DataBind();
Funs.FineUIPleaseSelect(this.drpStates);
drpCategory.DataTextField = "Key";
drpCategory.DataValueField = "Value";
drpCategory.DataSource = BLL.TwConst.CategoryMap;
drpCategory.DataBind();
Funs.FineUIPleaseSelect(this.drpCategory);
}
#region
@@ -72,6 +77,10 @@ namespace FineUIPro.Web.CLGL
{
table.State = Convert.ToInt32(drpStates.SelectedValue);
}
if (drpCategory.SelectedValue != Const._Null)
{
table.Category = Convert.ToInt32(drpCategory.SelectedValue);
}
if (drpWarehouse.SelectedValue != Const._Null)
{
table.WarehouseCode = drpWarehouse.SelectedValue;
@@ -284,6 +293,7 @@ namespace FineUIPro.Web.CLGL
ReqUnitName = result.ReqUnitName,
CusBillCode = result.CusBillCode,
CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"),
CreateManName = !string.IsNullOrEmpty(result.CreateMan) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateMan) : "",
ProjectName = ProjectService.GetProjectNameByProjectId(result.ProjectId),
CategoryString = result.CategoryString,
BillName = TwConst.PlanPrintMap.Where(x => x.Value == result.TypeInt).Select(x => x.Key).FirstOrDefault(),
+9
View File
@@ -149,6 +149,15 @@ namespace FineUIPro.Web.CLGL
/// </remarks>
protected global::FineUIPro.DropDownList drpStates;
/// <summary>
/// drpCategory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCategory;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -76,6 +76,9 @@
<f:DropDownList ID="drpStates" runat="server" Label="状态"
LabelWidth="70px" LabelAlign="Right" Width="170px">
</f:DropDownList>
<f:DropDownList ID="drpCategory" runat="server" Label="类别"
LabelWidth="70px" LabelAlign="Right" Width="170px">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSearch" ToolTip="查询" Icon="SystemSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
@@ -84,6 +87,9 @@
</f:Button>
<f:Button ID="btnGenOutPlanMaster" Text="生成补料申请单" Icon="ArrowRefresh" runat="server" OnClick="btnGenOutPlanMaster_Click" Hidden="true">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
+40 -1
View File
@@ -10,6 +10,8 @@ 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
{
@@ -47,6 +49,11 @@ namespace FineUIPro.Web.CLGL
drpStates.DataSource = BLL.TwConst.StateMap;
drpStates.DataBind();
Funs.FineUIPleaseSelect(this.drpStates);
drpCategory.DataTextField = "Key";
drpCategory.DataValueField = "Value";
drpCategory.DataSource = BLL.TwConst.CategoryMap;
drpCategory.DataBind();
Funs.FineUIPleaseSelect(this.drpCategory);
}
#region
@@ -66,6 +73,10 @@ namespace FineUIPro.Web.CLGL
{
table.State = Convert.ToInt32(drpStates.SelectedValue);
}
if (drpCategory.SelectedValue != Const._Null)
{
table.Category = Convert.ToInt32(drpCategory.SelectedValue);
}
if (drpWarehouse.SelectedValue != Const._Null)
{
table.WarehouseCode = drpWarehouse.SelectedValue;
@@ -558,10 +569,11 @@ 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"),
CreateManName = !string.IsNullOrEmpty(result.CreateMan) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateMan) : "",
ProjectName = ProjectService.GetProjectNameByProjectId(result.ProjectId),
CategoryString = result.CategoryString,
BillName = TwConst.PrintMap.Where(x => x.Value == result.TypeInt).Select(x => x.Key).FirstOrDefault(),
@@ -650,5 +662,32 @@ namespace FineUIPro.Web.CLGL
#endregion
protected void btnOut_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIDArray.Length > 0)
{
var sheets = new Dictionary<string, object>
{
["出库明细"] = 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");
MiniExcel.SaveAs(path, sheets);
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);
}
}
}
}
+18
View File
@@ -149,6 +149,15 @@ namespace FineUIPro.Web.CLGL
/// </remarks>
protected global::FineUIPro.DropDownList drpStates;
/// <summary>
/// drpCategory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCategory;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -185,6 +194,15 @@ namespace FineUIPro.Web.CLGL
/// </remarks>
protected global::FineUIPro.Button btnGenOutPlanMaster;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// Grid1 控件。
/// </summary>