Browse Source

需求单No.139232 付款单加载预付款单 在万福模块实现方式改为 以供应商关联获取。

需求单No.139231 付款单增加收购类型,并且在付款导出表中增加查询条件。
master
yibo 7 years ago
parent
commit
50efdd8f7a
2 changed files with 26 additions and 0 deletions
  1. +25
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/PayInfoExport.cs
  2. +1
    -0
      B3QingDaoWanFu.Web/PluginClass.cs

+ 25
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/PayInfoExport.cs View File

@ -3,7 +3,9 @@ using BWP.B3ButcherManage.BO;
using BWP.B3Frameworks;
using BWP.Web.Layout;
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;
@ -24,11 +26,14 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
get { return "付款清单导出"; }
}
DFChoiceBox purchaseType;
protected override void AddQueryControls(VLayoutPanel vPanel)
{
var layout = new LayoutManager("Main", mDFInfo, mQueryContainer);
layout.Add("AccountingUnit_ID", new SimpleLabel("会计单位"), QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.));
layout.Add("Supplier_ID", new SimpleLabel("供应商"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3ButcherManageConsts.DataSources.));
layout.Add("PurchaseType_ID", new SimpleLabel("收购类型"), purchaseType = QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3ButcherManageConsts.DataSources.));
layout["PurchaseType_ID"].NotAutoAddToContainer = true;
layout.Add("Date", new SimpleLabel("付款日期"), QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate", DateTime.Today, null));
layout["Date"].NotAutoAddToContainer = true;
@ -37,6 +42,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
config.Add("ID");
config.Add("AccountingUnit_ID");
config.Add("Supplier_ID");
config.Add("PurchaseType_ID");
layout.Config = config;
vPanel.Add(layout.CreateLayout());
@ -54,6 +60,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
query.Columns.Add(DQSelectColumn.Field("Money", t + "金额"));
SumColumnNames.Add("Money");
query.Columns.Add(DQSelectColumn.Field("Remark", t + "备注"));
if (!purchaseType.IsEmpty)
DetailTemp.AddPurchaseTypeCondition(query, long.Parse(purchaseType.Value));
foreach (var c in query.Columns)
ColumnNames.Add(c.Name);
return query;
@ -76,4 +84,21 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
}
}
}
class DetailTemp
{
public long Pay_ID { get; set; }
public static void AddPurchaseTypeCondition(DQueryDom root, long purchaseTypeID)
{
var query = new DQueryDom(new JoinAlias(typeof(Pay_Detail)));
query.Where.Conditions.Add(DQCondition.EQ("StatPay_PurchaseType_ID", purchaseTypeID));
query.Columns.Add(DQSelectColumn.Field("Pay_ID"));
query.GroupBy.Expressions.Add(DQExpression.Field("Pay_ID"));
root.RegisterQueryTable(typeof(DetailTemp), new string[] { "Pay_ID" }, query);
var detail = new JoinAlias(typeof(DetailTemp));
root.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(root.From.RootSource.Alias, "ID", detail, "Pay_ID"));
}
}
}

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

@ -24,6 +24,7 @@ namespace BWP.B3QingDaoWanFu
GlobalFlags.On(B3SaleConsts.Flags.MarketingActivityEnableAdjustPrice);
GlobalFlags.On(B3SaleConsts.Flags.SendOutStoreNoAvailableStorage);
GlobalFlags.On(B3SaleConsts.Flags.CustAcceptAnalyseHasFactoryPrice);
GlobalFlags.On(B3ButcherManageConsts.GlobalFlags.);
}
}
}

Loading…
Cancel
Save