Browse Source

结算单分析在客户模块调整。

master
yibo 7 years ago
parent
commit
25e3aafbd3
3 changed files with 65 additions and 0 deletions
  1. +3
    -0
      B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj
  2. +61
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Overlays/PayAnalyse_Ext.cs
  3. +1
    -0
      B3QingDaoWanFu.Web/PluginClass.cs

+ 3
- 0
B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj View File

@ -170,6 +170,9 @@
<Compile Include="Pages\B3QingDaoWanFu\ExportUI\GoodsExportToMES.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Overlays\PayAnalyse_Ext.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Overlays\PayEdit_Ext.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>


+ 61
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Overlays/PayAnalyse_Ext.cs View File

@ -0,0 +1,61 @@
using BWP.B3ButcherManage.BO;
using BWP.B3ButcherManage.NamedValueTemplate;
using BWP.Web.Layout;
using BWP.Web.Pages.B3ButcherManage.Reports;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3QingDaoWanFu.Overlays
{
class PayAnalyse_Ext : PayAnalyse
{
protected override void AddCustomerColumn(Utils.ReportDisplayOptionHelper helper)
{
}
DFNamedValueInput<> payTag;
protected override void AddCustomerCondition(Layout.LayoutManager layout)
{
base.AddCustomerCondition(layout);
payTag = layout.Add("PayTarget", QueryCreator.DFNameValueInput<>(mDFInfo.Fields["PayTarget"]));
payTag.EnableTopItem = false;
payTag.Fill("0", "供应商");
var c = layout.Config as AutoLayoutConfig;
c.Add("PayTarget");
}
protected override Forks.EnterpriseServices.DomainObjects2.DQuery.DQueryDom GetQueryDom()
{
var query = base.GetQueryDom();
var tag = DQSelectColumn.Create(DQExpression.Field("Supplier_Name"), "供应商");
if (payTag.Value == .)
{
var detail = new JoinAlias(typeof(Pay_FarmerDetail));
query.From.AddJoin(JoinType.Left, new DQDmoSource(detail), DQCondition.EQ(query.From.RootSource.Alias, "ID", detail, "Pay_ID"));
tag = DQSelectColumn.Create(DQExpression.Field(detail, "Farmer_Name"), "养殖户");
var last = query.Columns.Last();
if (last.Name == "付款金额")
{
query.Columns.Remove(last);
query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.Field(detail, "Money")), "付款金额"));
}
}
query.Columns.Insert(0, tag);
query.GroupBy.Expressions.Add(tag.Expression);
query.Where.Conditions.Add(DQCondition.EQ("PayTarget", payTag.Value));
if (query.Columns.Last().Name == "付款金额")
{
SumColumnIndexs.Clear();
SumColumnIndexs.Add(query.Columns.Count - 1);
}
return query;
}
}
}

+ 1
- 0
B3QingDaoWanFu.Web/PluginClass.cs View File

@ -24,6 +24,7 @@ namespace BWP.B3QingDaoWanFu
WpfPageFactory.RegisterPageOverlay(typeof(SaleOutStoreEdit).FullName, typeof(SaleOutStoreEdit_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(StatPayList).FullName, typeof(StatPayList_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(BWP.Web.Pages.B3ButcherManage.Bills.Pay_.PayEdit).FullName, typeof(PayEdit_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(BWP.Web.Pages.B3ButcherManage.Reports.PayAnalyse).FullName, typeof(PayAnalyse_Ext).FullName);
GlobalFlags.On(B3ButcherManageConsts.GlobalFlags.StatPayAddRewardWithButcherUseWeight);
GlobalFlags.On(B3SaleConsts.Flags.MarketingActivityEnableAdjustPrice);
GlobalFlags.On(B3SaleConsts.Flags.SendOutStoreNoAvailableStorage);


Loading…
Cancel
Save