Browse Source

需求单No.139614

master
wugang 7 years ago
parent
commit
ad6bd975eb
3 changed files with 71 additions and 40 deletions
  1. +70
    -16
      BWP.B3_YunKen.Web/Pages/B3YunKen/Reports/ToFreightNetPriceReport2.cs
  2. +0
    -24
      BWP.B3_YunKen.Web/Pages/B3YunKen/Reports/ToFreightNetPriceReport2.xml
  3. +1
    -0
      BWP.B3_YunKen.Web/PluginClass.cs

+ 70
- 16
BWP.B3_YunKen.Web/Pages/B3YunKen/Reports/ToFreightNetPriceReport2.cs View File

@ -77,7 +77,7 @@ namespace BWP.Web.Pages.B3YunKen.Reports
list.Add(new Tuple<string, string>("OrderDate", "订货时间")); list.Add(new Tuple<string, string>("OrderDate", "订货时间"));
list.Add(new Tuple<string, string>("LoadTime", "发货时间")); list.Add(new Tuple<string, string>("LoadTime", "发货时间"));
list.Add(new Tuple<string, string>("ArriveTime", "到货时间")); 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>("BillType", "业务类型"));
list.Add(new Tuple<string, string>("Department_Name", "部门")); list.Add(new Tuple<string, string>("Department_Name", "部门"));
list.Add(new Tuple<string, string>("CustomerSaleZone_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>("OutMoney", "出库金额"));
list.Add(new Tuple<string, string>("CustomerDealer_Name", "经销商")); list.Add(new Tuple<string, string>("CustomerDealer_Name", "经销商"));
list.Add(new Tuple<string, string>("FreightBear", "运费承担方")); 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("显示字段", "显示字段"); var section = mPageLayoutManager.AddSection("显示字段", "显示字段");
section.ApplyLayout(list, mPageLayoutManager); section.ApplyLayout(list, mPageLayoutManager);
foreach (var item in list) { 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"], layout.Add("CustomerDealer_ID", mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["CustomerDealer_ID"],
B3SaleDataSources.), s => long.Parse(s)), "CustomerDealer_ID")); B3SaleDataSources.), s => long.Parse(s)), "CustomerDealer_ID"));
layout["CustomerDealer_ID"].NotAutoAddToContainer = true; 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.Add("SaleOutID", new SimpleLabel("出库单号"), _saleout = QueryCreator.DFTextBox(mDFInfo.Fields["ID"]));
layout["SaleOutID"].NotAutoAddToContainer = true; layout["SaleOutID"].NotAutoAddToContainer = true;
@ -333,11 +336,16 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID"));
layout.Add("BillType", new SimpleLabel("业务类型"), billTypeBox); layout.Add("BillType", new SimpleLabel("业务类型"), billTypeBox);
layout["BillType"].NotAutoAddToContainer = true; 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); var config = layout.CreateDefaultConfig(4);
config.Expand = false; config.Expand = false;
config.Add("LoadTime");
config.Add("OrderDate");
config.Add("CheckTime");
config.Add("Code"); config.Add("Code");
//config.Add("SaleOutID"); //config.Add("SaleOutID");
//config.Add("ArriveTime"); //config.Add("ArriveTime");
@ -377,7 +385,7 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID"));
var goods_Package = new JoinAlias(typeof(Goods_PackagePrice)); var goods_Package = new JoinAlias(typeof(Goods_PackagePrice));
var query = new DQueryDom(goods_Package); var query = new DQueryDom(goods_Package);
query.Columns.Add(DQSelectColumn.Field("Goods_ID")); 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.Columns.Add(DQSelectColumn.Field("AccountingUnit_ID"));
query.GroupBy.Expressions.Add(DQExpression.Field("Goods_ID")); query.GroupBy.Expressions.Add(DQExpression.Field("Goods_ID"));
query.GroupBy.Expressions.Add(DQExpression.Field("AccountingUnit_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 goodsProperty = new JoinAlias(typeof(GoodsProperty));
var customerCatalo = new JoinAlias(typeof(SaleCustomerCatalog)); var customerCatalo = new JoinAlias(typeof(SaleCustomerCatalog));
var customer2 = new JoinAlias("cus2",typeof(Customer)); 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 salzone = JoinAlias.Create("_9");
//var cus = new JoinAlias(typeof(Customer)); //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"))); 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), dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods),
DQCondition.EQ(goods, "ID", detail, "SaleGoods_ID")); 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(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(customer2), DQCondition.EQ(main, "CustomerDealer_ID", customer2, "ID"));
dom.From.AddJoin(JoinType.Left, new DQDmoSource(salzone), DQCondition.EQ(customer, "SaleZone_ID", salzone, "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)")); dom.GroupBy.Expressions.Add(DQExpression.Snippet<string>("Convert(nvarchar(10),main.LoadTime, 23)"));
ColumnNames.Add(item.Text); ColumnNames.Add(item.Text);
break; 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 "Code":
case "Remark": case "Remark":
case "AccountingUnit_Name": case "AccountingUnit_Name":
@ -479,7 +509,6 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID"));
case "Store_Name": case "Store_Name":
case "CustomerDealer_Name": case "CustomerDealer_Name":
case "Customer_Name": case "Customer_Name":
case "CheckTime":
case "BillType": case "BillType":
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(main, field), item.Text)); dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(main, field), item.Text));
dom.GroupBy.Expressions.Add(DQExpression.Field(main, field)); dom.GroupBy.Expressions.Add(DQExpression.Field(main, field));
@ -649,14 +678,39 @@ B3SaleDataSources.经销商), s => long.Parse(s)), "CustomerDealer_ID"));
if (!_goodsBatch.IsEmpty) { if (!_goodsBatch.IsEmpty) {
dom.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(detail, "GoodsBatch_ID"), _goodsBatch.GetValues().Select(x => DQExpression.Value(x)).ToArray())); 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) if (!_saleout.IsEmpty)
{ {
dom.Where.Conditions.Add(DQCondition.EQ(outStore, "ID", long.Parse(_saleout.Text))); dom.Where.Conditions.Add(DQCondition.EQ(outStore, "ID", long.Parse(_saleout.Text)));


+ 0
- 24
BWP.B3_YunKen.Web/Pages/B3YunKen/Reports/ToFreightNetPriceReport2.xml View File

@ -15,30 +15,6 @@
<Field name="Code"/> <Field name="Code"/>
<QBE paramName="Code"/> <QBE paramName="Code"/>
</Like> </Like>
<GreaterThanOrEqual>
<Field name="LoadTime"/>
<QBE paramName="MinLoadTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="LoadTime"/>
<QBE paramName="MaxLoadTime"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="OrderDate"/>
<QBE paramName="MinOrderDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="OrderDate"/>
<QBE paramName="MaxOrderDate"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="CheckTime"/>
<QBE paramName="MinCheckTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="CheckTime"/>
<QBE paramName="MaxCheckTime"/>
</LessThanOrEqual>
<QBEIn> <QBEIn>
<Field name="AccountingUnit_ID"/> <Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/> <QBE paramName="AccountingUnit_ID"/>


+ 1
- 0
BWP.B3_YunKen.Web/PluginClass.cs View File

@ -50,6 +50,7 @@ namespace BWP.B3_YunKen.Web
GlobalFlags.On(B3FrameworksConsts.GlobalFlags.); GlobalFlags.On(B3FrameworksConsts.GlobalFlags.);
GlobalFlags.On(B3SaleConsts.Flags.SetPriceByBrandItem); GlobalFlags.On(B3SaleConsts.Flags.SetPriceByBrandItem);
GlobalFlags.On(B3UnitedInfosConsts.GlobalFlags.QucklyAddGoodsByBrandItem); GlobalFlags.On(B3UnitedInfosConsts.GlobalFlags.QucklyAddGoodsByBrandItem);
GlobalFlags.On(B3SaleConsts.Flags.ManySaleOutStoreToOneCustomerAccept);
WpfPageFactory.RegisterPageOverlay(typeof(OrderEdit).FullName, typeof(OrderEdit_Ext).FullName); WpfPageFactory.RegisterPageOverlay(typeof(OrderEdit).FullName, typeof(OrderEdit_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(SaleOutStoreEdit).FullName, typeof(SaleOutStoreEdit_Ext).FullName); WpfPageFactory.RegisterPageOverlay(typeof(SaleOutStoreEdit).FullName, typeof(SaleOutStoreEdit_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(SaleForecastEdit).FullName, typeof(SaleForecastEdit_Ext).FullName); WpfPageFactory.RegisterPageOverlay(typeof(SaleForecastEdit).FullName, typeof(SaleForecastEdit_Ext).FullName);


Loading…
Cancel
Save