|
|
|
@ -77,7 +77,7 @@ namespace BWP.Web.Pages.B3YunKen.Reports |
|
|
|
list.Add(new Tuple<string, string>("OrderDate", "订货时间")); |
|
|
|
list.Add(new Tuple<string, string>("LoadTime", "发货时间")); |
|
|
|
list.Add(new Tuple<string, string>("ArriveTime", "到货时间")); |
|
|
|
list.Add(new Tuple<string, string>("CheckTime", "审核时间")); |
|
|
|
list.Add(new Tuple<string, string>("CheckTime", "验收审核时间")); |
|
|
|
list.Add(new Tuple<string, string>("BillType", "业务类型")); |
|
|
|
list.Add(new Tuple<string, string>("Department_Name", "部门")); |
|
|
|
list.Add(new Tuple<string, string>("CustomerSaleZone_Name", "地区")); |
|
|
|
@ -111,6 +111,11 @@ namespace BWP.Web.Pages.B3YunKen.Reports |
|
|
|
list.Add(new Tuple<string, string>("OutMoney", "出库金额")); |
|
|
|
list.Add(new Tuple<string, string>("CustomerDealer_Name", "经销商")); |
|
|
|
list.Add(new Tuple<string, string>("FreightBear", "运费承担方")); |
|
|
|
list.Add(new Tuple<string, string>("DeliveryTime", "预报提货时间")); |
|
|
|
list.Add(new Tuple<string, string>("OrderLoadTime", "订单发货时间")); |
|
|
|
list.Add(new Tuple<string, string>("OutCheckTime", "出库审核时间")); |
|
|
|
list.Add(new Tuple<string, string>("AcceptCheckTime", "验收审核时间")); |
|
|
|
|
|
|
|
var section = mPageLayoutManager.AddSection("显示字段", "显示字段"); |
|
|
|
section.ApplyLayout(list, mPageLayoutManager); |
|
|
|
foreach (var item in list) { |
|
|
|
@ -317,8 +322,6 @@ B3SaleDataSources.结账客户), s => long.Parse(s)), "AccountCustomer_ID")); |
|
|
|
layout.Add("CustomerDealer_ID", mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["CustomerDealer_ID"], |
|
|
|
B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
layout["CustomerDealer_ID"].NotAutoAddToContainer = true; |
|
|
|
layout.Add("ArriveTime", new SimpleLabel("到货时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinArriveTime", "MaxArriveTime")); |
|
|
|
layout["ArriveTime"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
layout.Add("SaleOutID", new SimpleLabel("出库单号"), _saleout = QueryCreator.DFTextBox(mDFInfo.Fields["ID"])); |
|
|
|
layout["SaleOutID"].NotAutoAddToContainer = true; |
|
|
|
@ -333,11 +336,16 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
layout.Add("BillType", new SimpleLabel("业务类型"), billTypeBox); |
|
|
|
layout["BillType"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
layout.Add("DeliveryTime", new SimpleLabel("预报提货时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinDeliveryTime", "MaxDeliveryTime")); |
|
|
|
layout["DeliveryTime"].NotAutoAddToContainer = true; |
|
|
|
layout.Add("OrderLoadTime", new SimpleLabel("订单发货时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinOrderLoadTime", "MaxOrderLoadTime")); |
|
|
|
layout["OrderLoadTime"].NotAutoAddToContainer = true; |
|
|
|
layout.Add("OutCheckTime", new SimpleLabel("出库审核时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinOutCheckTime", "MaxOutCheckTime")); |
|
|
|
layout["OutCheckTime"].NotAutoAddToContainer = true; |
|
|
|
layout.Add("AcceptCheckTime", new SimpleLabel("验收审核时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinAcceptCheckTime", "MaxAcceptCheckTime")); |
|
|
|
layout["AcceptCheckTime"].NotAutoAddToContainer = true; |
|
|
|
var config = layout.CreateDefaultConfig(4); |
|
|
|
config.Expand = false; |
|
|
|
config.Add("LoadTime"); |
|
|
|
config.Add("OrderDate"); |
|
|
|
config.Add("CheckTime"); |
|
|
|
config.Add("Code"); |
|
|
|
//config.Add("SaleOutID");
|
|
|
|
//config.Add("ArriveTime");
|
|
|
|
@ -377,7 +385,7 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
var goods_Package = new JoinAlias(typeof(Goods_PackagePrice)); |
|
|
|
var query = new DQueryDom(goods_Package); |
|
|
|
query.Columns.Add(DQSelectColumn.Field("Goods_ID")); |
|
|
|
query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.Field("Price")),"packagePrice")); |
|
|
|
query.Columns.Add(DQSelectColumn.Create(DQExpression.Max(DQExpression.Field("Price")),"packagePrice")); |
|
|
|
query.Columns.Add(DQSelectColumn.Field("AccountingUnit_ID")); |
|
|
|
query.GroupBy.Expressions.Add(DQExpression.Field("Goods_ID")); |
|
|
|
query.GroupBy.Expressions.Add(DQExpression.Field("AccountingUnit_ID")); |
|
|
|
@ -402,7 +410,8 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
var goodsProperty = new JoinAlias(typeof(GoodsProperty)); |
|
|
|
var customerCatalo = new JoinAlias(typeof(SaleCustomerCatalog)); |
|
|
|
var customer2 = new JoinAlias("cus2",typeof(Customer)); |
|
|
|
|
|
|
|
var order = new JoinAlias(typeof(Order)); |
|
|
|
var saleForecast = new JoinAlias(typeof(SaleForecast)); |
|
|
|
//var salzone = JoinAlias.Create("_9");
|
|
|
|
//var cus = new JoinAlias(typeof(Customer));
|
|
|
|
|
|
|
|
@ -417,7 +426,8 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
DQCondition.And(DQCondition.EQ(packageData, "Goods_ID", detail, "SaleGoods_ID"), DQCondition.EQ(packageData, "AccountingUnit_ID", main, "AccountingUnit_ID"))); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), |
|
|
|
DQCondition.EQ(goods, "ID", detail, "SaleGoods_ID")); |
|
|
|
|
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(order), DQCondition.EQ(outStore, "Order_ID", order,"ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(saleForecast), DQCondition.EQ(order, "SaleForecast_ID", saleForecast, "ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(customer), DQCondition.EQ(main, "Customer_ID", customer, "ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(customer2), DQCondition.EQ(main, "CustomerDealer_ID", customer2, "ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(salzone), DQCondition.EQ(customer, "SaleZone_ID", salzone, "ID")); |
|
|
|
@ -464,6 +474,26 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Snippet<string>("Convert(nvarchar(10),main.LoadTime, 23)")); |
|
|
|
ColumnNames.Add(item.Text); |
|
|
|
break; |
|
|
|
case "DeliveryTime": |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(saleForecast, field), item.Text)); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Field(saleForecast, field)); |
|
|
|
ColumnNames.Add(item.Text); |
|
|
|
break; |
|
|
|
case "OrderLoadTime": |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(order, "LoadTime"), item.Text)); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Field(order, "LoadTime")); |
|
|
|
ColumnNames.Add(item.Text); |
|
|
|
break; |
|
|
|
case "OutCheckTime": |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(outStore, "CheckTime"), item.Text)); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Field(outStore, "CheckTime")); |
|
|
|
ColumnNames.Add(item.Text); |
|
|
|
break; |
|
|
|
case "AcceptCheckTime": |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(main, "CheckTime"), item.Text)); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Field(main, "CheckTime")); |
|
|
|
ColumnNames.Add(item.Text); |
|
|
|
break; |
|
|
|
case "Code": |
|
|
|
case "Remark": |
|
|
|
case "AccountingUnit_Name": |
|
|
|
@ -479,7 +509,6 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
case "Store_Name": |
|
|
|
case "CustomerDealer_Name": |
|
|
|
case "Customer_Name": |
|
|
|
case "CheckTime": |
|
|
|
case "BillType": |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(main, field), item.Text)); |
|
|
|
dom.GroupBy.Expressions.Add(DQExpression.Field(main, field)); |
|
|
|
@ -649,14 +678,39 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID")); |
|
|
|
if (!_goodsBatch.IsEmpty) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(detail, "GoodsBatch_ID"), _goodsBatch.GetValues().Select(x => DQExpression.Value(x)).ToArray())); |
|
|
|
} |
|
|
|
var minArriveTime = mQueryContainer.GetControl<DFDateInput>("MinArriveTime").Value; |
|
|
|
var maxArriveTime = mQueryContainer.GetControl<DFDateInput>("MaxArriveTime").Value; |
|
|
|
if (minArriveTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(outStore, "ArriveTime",minArriveTime )); |
|
|
|
var minDeliveryTime = mQueryContainer.GetControl<DFDateInput>("MinDeliveryTime").Value; |
|
|
|
var maxDeliveryTime = mQueryContainer.GetControl<DFDateInput>("MaxDeliveryTime").Value; |
|
|
|
if (minDeliveryTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(saleForecast, "DeliveryTime", minDeliveryTime)); |
|
|
|
} |
|
|
|
if (maxDeliveryTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(saleForecast, "DeliveryTime", maxDeliveryTime)); |
|
|
|
} |
|
|
|
var minOrderLoadTime = mQueryContainer.GetControl<DFDateInput>("MinOrderLoadTime").Value; |
|
|
|
var maxOrderLoadTime = mQueryContainer.GetControl<DFDateInput>("MaxOrderLoadTime").Value; |
|
|
|
if (minOrderLoadTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(order, "LoadTime", minOrderLoadTime)); |
|
|
|
} |
|
|
|
if (maxOrderLoadTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(order, "LoadTime", maxOrderLoadTime)); |
|
|
|
} |
|
|
|
if (maxArriveTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(outStore, "ArriveTime", maxArriveTime)); |
|
|
|
var minOutCheckTime = mQueryContainer.GetControl<DFDateInput>("MinOutCheckTime").Value; |
|
|
|
var maxOutCheckTime = mQueryContainer.GetControl<DFDateInput>("MaxOutCheckTime").Value; |
|
|
|
if (minOutCheckTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(outStore, "CheckTime", minOutCheckTime)); |
|
|
|
} |
|
|
|
if (maxOutCheckTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(outStore, "CheckTime", maxOutCheckTime)); |
|
|
|
} |
|
|
|
var minAcceptCheckTime = mQueryContainer.GetControl<DFDateInput>("MinAcceptCheckTime").Value; |
|
|
|
var maxAcceptCheckTime = mQueryContainer.GetControl<DFDateInput>("MaxAcceptCheckTime").Value; |
|
|
|
if (minAcceptCheckTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(main, "CheckTime", minAcceptCheckTime)); |
|
|
|
} |
|
|
|
if (maxAcceptCheckTime.HasValue) { |
|
|
|
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(main, "CheckTime", maxAcceptCheckTime)); |
|
|
|
} |
|
|
|
|
|
|
|
if (!_saleout.IsEmpty) |
|
|
|
{ |
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(outStore, "ID", long.Parse(_saleout.Text))); |
|
|
|
|