|
|
@ -3,7 +3,9 @@ using BWP.B3ButcherManage.BO; |
|
|
using BWP.B3Frameworks; |
|
|
using BWP.B3Frameworks; |
|
|
using BWP.Web.Layout; |
|
|
using BWP.Web.Layout; |
|
|
using BWP.Web.Utils; |
|
|
using BWP.Web.Utils; |
|
|
|
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
|
|
|
using Forks.EnterpriseServices.SqlDoms; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
@ -24,11 +26,14 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports |
|
|
get { return "付款清单导出"; } |
|
|
get { return "付款清单导出"; } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DFChoiceBox purchaseType; |
|
|
protected override void AddQueryControls(VLayoutPanel vPanel) |
|
|
protected override void AddQueryControls(VLayoutPanel vPanel) |
|
|
{ |
|
|
{ |
|
|
var layout = new LayoutManager("Main", mDFInfo, mQueryContainer); |
|
|
var layout = new LayoutManager("Main", mDFInfo, mQueryContainer); |
|
|
layout.Add("AccountingUnit_ID", new SimpleLabel("会计单位"), QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.授权会计单位全部)); |
|
|
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("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.Add("Date", new SimpleLabel("付款日期"), QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate", DateTime.Today, null)); |
|
|
layout["Date"].NotAutoAddToContainer = true; |
|
|
layout["Date"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
|
@ -37,6 +42,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports |
|
|
config.Add("ID"); |
|
|
config.Add("ID"); |
|
|
config.Add("AccountingUnit_ID"); |
|
|
config.Add("AccountingUnit_ID"); |
|
|
config.Add("Supplier_ID"); |
|
|
config.Add("Supplier_ID"); |
|
|
|
|
|
config.Add("PurchaseType_ID"); |
|
|
|
|
|
|
|
|
layout.Config = config; |
|
|
layout.Config = config; |
|
|
vPanel.Add(layout.CreateLayout()); |
|
|
vPanel.Add(layout.CreateLayout()); |
|
|
@ -54,6 +60,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports |
|
|
query.Columns.Add(DQSelectColumn.Field("Money", t + "金额")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Money", t + "金额")); |
|
|
SumColumnNames.Add("Money"); |
|
|
SumColumnNames.Add("Money"); |
|
|
query.Columns.Add(DQSelectColumn.Field("Remark", t + "备注")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Remark", t + "备注")); |
|
|
|
|
|
if (!purchaseType.IsEmpty) |
|
|
|
|
|
DetailTemp.AddPurchaseTypeCondition(query, long.Parse(purchaseType.Value)); |
|
|
foreach (var c in query.Columns) |
|
|
foreach (var c in query.Columns) |
|
|
ColumnNames.Add(c.Name); |
|
|
ColumnNames.Add(c.Name); |
|
|
return query; |
|
|
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")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |