|
|
|
@ -4,7 +4,9 @@ using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using B3_DongFangWanQi.BL; |
|
|
|
using B3_DongFangWanQi.BO; |
|
|
|
using BWP.B3Frameworks.BO.MoneyTemplate; |
|
|
|
using BWP.B3Sale.BO; |
|
|
|
using Forks.Utils; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ |
|
|
|
{ |
|
|
|
@ -14,7 +16,39 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ |
|
|
|
{ |
|
|
|
dic.Add("$Details", Dmo.Details); |
|
|
|
dic.Add("$DetailType", typeof(ProductionNotification_Detail)); |
|
|
|
dic.Add("$相同产品并行显示", Get相同产品并行显示()); |
|
|
|
} |
|
|
|
void AddSolidSType(StringBuilder str) |
|
|
|
{ |
|
|
|
str.Append(@"<style>
|
|
|
|
#binghang table { |
|
|
|
border-collapse: collapse; |
|
|
|
text-align:center; |
|
|
|
} |
|
|
|
#binghang table td { |
|
|
|
border:1px solid ; |
|
|
|
} |
|
|
|
</style>");
|
|
|
|
} |
|
|
|
private string Get相同产品并行显示() |
|
|
|
{ |
|
|
|
var str = new StringBuilder(); |
|
|
|
str.Append("<div id='binghang'>"); |
|
|
|
AddSolidSType(str); |
|
|
|
str.Append(@"<table border='1' width='100%'>"); |
|
|
|
|
|
|
|
str.Append("<tr><td>订单号</td><td>发货时间</td><td>购货客户</td><td>存货</td><td>调整数量</td><td>规格</td><td>备注</td></tr>"); |
|
|
|
|
|
|
|
foreach (IGrouping<string, ProductionNotification_Detail> grouping in Dmo.Details.GroupBy(x=>x.Goods_Name)) |
|
|
|
{ |
|
|
|
foreach (ProductionNotification_Detail detail in grouping) |
|
|
|
{ |
|
|
|
str.Append("<tr><td>"+ detail.Order_ID+ "</td><td>"+detail.LoadTime+"</td><td>"+detail.Customer_Name+"</td><td>"+detail.Goods_Name+"</td><td>"+detail.SendNumber + "</td><td>"+detail.Goods_Spec+"</td><td>"+detail.Remark+"</td></tr>"); |
|
|
|
} |
|
|
|
str.Append("<tr><td></td><td></td><td></td><td></td><td>"+(Money<二位小数>?)grouping.Sum(x=>(x.SendNumber??0).Value)+"</td><td></td><td></td></tr>"); |
|
|
|
} |
|
|
|
str.Append("</div>"); |
|
|
|
return str.ToString(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |