Browse Source

文件导出没有零件名修正

master
yidi.wu 10 months ago
parent
commit
23a7f18c62
  1. 4
      北京北汽/SCP/Properties/AssemblyInfo.cs
  2. 19
      北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs

4
北京北汽/SCP/Properties/AssemblyInfo.cs

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值,
// 方法是按如下所示使用 "*":
[assembly: AssemblyVersion("1.24.0126.1")]
[assembly: AssemblyFileVersion("1.24.0126.1")]
[assembly: AssemblyVersion("1.24.0126.2")]
[assembly: AssemblyFileVersion("1.24.0126.2")]

19
北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs

@ -67,7 +67,6 @@ namespace SCP.Views.PlanData
{
Grid_V_TB_ARRIVE_DETAIL.RecordCount = ret.Result.Count();
var _ls = SortAndPage(ret.Result, Grid_V_TB_ARRIVE_DETAIL);
var lst = _ls.ToList();
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
@ -99,6 +98,22 @@ namespace SCP.Views.PlanData
{
if (ret.State == ReturnStatus.Succeed)
{
var lst = ret.Result.ToList();
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
foreach (var lt in lst)
{
if (string.IsNullOrEmpty(lt.PartDesc1))
{
var partModel = db.TA_PART.FirstOrDefault(p => p.PartCode == lt.PartCode && p.Site == lt.Site);
if (partModel != null)
{
lt.PartDesc1 = partModel.PartDesc1;
lt.Unit = partModel.Unit;
}
}
}
}
Dictionary<string, string> cellheader = new Dictionary<string, string> {
{ "ArrvBillNum", "单据号" },
@ -113,7 +128,7 @@ namespace SCP.Views.PlanData
{ "ShipTime", "时间" },
{ "Remark", "备注" },
};
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细");
string url = EntityListToExcel2003(cellheader, lst, "审核明细");
}
});
}

Loading…
Cancel
Save