Browse Source

加付款信息导出。

master
yibo 7 years ago
parent
commit
97a2019b7b
4 changed files with 120 additions and 0 deletions
  1. +6
    -0
      B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj
  2. +79
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/PayInfoExport.cs
  3. +33
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/PayInfoExport.xml
  4. +2
    -0
      WebFolder/config/plugins/B3QingDaoWanFu.plugin

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

@ -159,6 +159,9 @@
<Compile Include="Pages\B3QingDaoWanFu\Reports\ComprehensiveReport.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Reports\PayInfoExport.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Tools\CarLoadingBySendLinePage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -183,6 +186,9 @@
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Reports\PayInfoExport.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


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

@ -0,0 +1,79 @@
using BWP.B3ButcherManage;
using BWP.B3ButcherManage.BO;
using BWP.B3Frameworks;
using BWP.Web.Layout;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
class PayInfoExport : DFGridReportPage<Pay>
{
protected override string AccessRoleName
{
get { return "B3QingDaoWanFu.报表.付款清单导出"; }
}
protected override string Caption
{
get { return "付款清单导出"; }
}
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("Date", new SimpleLabel("付款日期"), QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate", DateTime.Today, null));
layout["Date"].NotAutoAddToContainer = true;
var config = new AutoLayoutConfig { Cols = 2 };
config.Add("Date");
config.Add("ID");
config.Add("AccountingUnit_ID");
config.Add("Supplier_ID");
layout.Config = config;
vPanel.Add(layout.CreateLayout());
}
const string SubTitle = "万福肉联厂委托银行付款打卡清单{0:yyyy年MM月dd日}(本日 表第 表)|";
protected override DQueryDom GetQueryDom()
{
var t = string.Format(SubTitle, GetMinDate());
var query = base.GetQueryDom();
query.Columns.Add(DQSelectColumn.Create(DQExpression.Snippet<string>("ROW_NUMBER() OVER(order by [_bill].[ID])"), t + "序号"));
query.Columns.Add(DQSelectColumn.Field("Supplier_BankAccount", t + "卡号"));
query.Columns.Add(DQSelectColumn.Field("Supplier_Name", t + "姓名"));
query.Columns.Add(DQSelectColumn.Field("Money", t + "金额"));
SumColumnNames.Add("Money");
query.Columns.Add(DQSelectColumn.Field("Remark", t + "备注"));
foreach (var c in query.Columns)
ColumnNames.Add(c.Name);
return query;
}
DateTime GetMinDate()
{
var date = DateTime.Today;
var dateInput = mQueryContainer.GetControl<DFDateInput>("MinDate");
if (!dateInput.IsEmpty)
date = dateInput.Date;
return date;
}
protected override string ExportExcelName
{
get
{
return string.Format("{0:yyyy年MM月dd日}{1}导出.xlsx", DateTime.Today, Caption);
}
}
}
}

+ 33
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/PayInfoExport.xml View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
</Columns>
<From>
<DmoClass class="BWP.B3ButcherManage.BO.Pay, B3ButcherManage" alias="_bill"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID"/>
<QBE paramName="Supplier_ID"/>
</EQ>
<GreaterThanOrEqual>
<Field name="Date"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
</And>
</Where>
</Select>

+ 2
- 0
WebFolder/config/plugins/B3QingDaoWanFu.plugin View File

@ -21,6 +21,7 @@
<FunctionGroup name="报表" roleSchemas="employee">
<Function index="0" name="收购综合报表"/>
<Function index="1" name="异常猪分析"/>
<Function index="2" name="付款清单导出"/>
</FunctionGroup>
<FunctionGroup name="配置" roleSchemas="employee">
<Function index="0" name="结账客户设备配置"/>
@ -34,6 +35,7 @@
<Menu id="0002" name="/B3青岛万福/结账客户设备配置" roles="B3QingDaoWanFu.配置.结账客户设备配置" url="B3QingDaoWanFu/CustomerDeviceSet_/CustomerDeviceSetEdit.aspx"/>
<Menu id="0003" name="/B3青岛万福/按线路派车" roles="B3QingDaoWanFu.工具.按线路派车" url="B3QingDaoWanFu/Tools/CarLoadingBySendLinePage.aspx"/>
<Menu id="0004" name="/B3青岛万福/报表/异常猪分析" roles="B3QingDaoWanFu.报表.异常猪分析" url="B3QingDaoWanFu/Reports/ButcherPigInfo.aspx"/>
<Menu id="0005" name="/B3青岛万福/报表/付款清单导出" roles="B3QingDaoWanFu.报表.付款清单导出" url="B3QingDaoWanFu/Reports/PayInfoExport.aspx"/>
</Menus>
<Features>
</Features>


Loading…
Cancel
Save