yibo 7 years ago
parent
commit
7f30a94d5a
4 changed files with 172 additions and 1 deletions
  1. +8
    -0
      B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj
  2. +21
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ButcherPigInfo.cs
  3. +65
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ButcherPigInfo.xml
  4. +78
    -1
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs

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

@ -153,6 +153,9 @@
<Compile Include="Pages\B3QingDaoWanFu\Overlays\StatPayEdit_Ext.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Reports\ButcherPigInfo.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Reports\ComprehensiveReport.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -175,6 +178,11 @@
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Reports\ComprehensiveReport.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Reports\ButcherPigInfo.xml">
<SubType>Designer</SubType>
</EmbeddedResource>
</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.


+ 21
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ButcherPigInfo.cs View File

@ -0,0 +1,21 @@
using BWP.B3ButcherManage.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
class ButcherPigInfo : DFGridReportPage<WeighBill>
{
protected override string AccessRoleName
{
get { throw new NotImplementedException(); }
}
protected override string Caption
{
get { throw new NotImplementedException(); }
}
}
}

+ 65
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ButcherPigInfo.xml View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
</Columns>
<From>
<DmoClass class="BWP.B3ButcherManage.BO.WeighBill, B3ButcherManage" alias="bill"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID" alias="bill"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="Weigh_ID" alias="bill"/>
<QBE paramName="Weigh_ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID" alias="bill"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Department_ID" alias="bill"/>
<QBE paramName="Department_ID"/>
</EQ>
<EQ>
<Field name="Employee_ID" alias="bill"/>
<QBE paramName="Employee_ID"/>
</EQ>
<EQ>
<Field name="BillState" alias="bill"/>
<QBE paramName="BillState"/>
</EQ>
<EQ>
<Field name="SupplierClass_ID" alias="bill"/>
<QBE paramName="SupplierClass_ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID" alias="bill"/>
<QBE paramName="Supplier_ID"/>
</EQ>
<EQ>
<Field name="ValuationArea_ID" alias="bill"/>
<QBE paramName="ValuationArea_ID"/>
</EQ>
<EQ>
<Field name="PurchaseType_ID" alias="bill"/>
<QBE paramName="PurchaseType_ID"/>
</EQ>
<GreaterThanOrEqual>
<Field name="Date" alias="bill"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date" alias="bill"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
</And>
</Where>
</Select>

+ 78
- 1
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs View File

@ -27,6 +27,62 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
public class ComprehensiveReport : DFGridReportPage<StatPay>
{
protected override void AddResultControls(VLayoutPanel vbox)
{
base.AddResultControls(vbox);
mDFGrid.AllowSorting = true;
mDFGrid.HeaderPagerLock = true;
mDFGrid.Height = 650;
mDFGrid.Width = 1100;
string bodyHeight = Request.Form["__BodyHeight"];
string bodyWidth = Request.Form["__BodyWidth"];
if (bodyHeight != null)
{
int height;
if (int.TryParse(bodyHeight, out height) && height > 180)
{
mDFGrid.Height = height - 160;
}
else
{
mDFGrid.Height = 650;
}
}
if (bodyWidth != null)
{
int width;
if (int.TryParse(bodyWidth, out width) && width > 100)
{
mDFGrid.Width = width - 30;
}
else
{
mDFGrid.Width = 1100;
}
}
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
var script = @"
<script type=""text/javascript"">
var conH = document.getElementById('__BodyHeight');
if (conH)
conH.value = $(document.body).height();
var conW = document.getElementById('__BodyWidth');
if (conW)
conW.value = $(document.body).width();
</script>
";
ClientScript.RegisterHiddenField("__BodyHeight", "");
ClientScript.RegisterHiddenField("__BodyWidth", "");
ClientScript.RegisterClientScriptBlock(GetType(), "gridsc", script, false);
}
protected override string Caption
{
get { return "收购综合报表"; }
@ -37,7 +93,6 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
get { return "B3QingDaoWanFu.报表.收购综合报表"; }
}
protected override void BeforeInitAllDataQueryResult(DFDataTable table)
{
ResetTable(table);
@ -160,6 +215,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
return r;
}
TextBox _reportLockCol;
protected override void AddQueryControls(VLayoutPanel vPanel)
{
var layoutManager = new LayoutManager("Main", mDFInfo, mQueryContainer);
@ -194,6 +251,12 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
base.InitQueryPanel(queryPanel);
var panel = queryPanel.CreateTab("显示字段");
var hPanel = new HLayoutPanel();
panel.EAdd(hPanel);
hPanel.Add(new SimpleLabel("锁定列数"));
_reportLockCol = hPanel.Add(new TextBox() { Width = Unit.Pixel(80) });
mQueryControls.Add("__QueryOptions_锁定列数", _reportLockCol);
mQueryControls.EnableHoldLastControlNames.Add("__QueryOptions_锁定列数");
_checkbox = new CheckBoxListWithReverseSelect { RepeatColumns = 6, RepeatDirection = RepeatDirection.Horizontal };
_checkbox.Items.Add(new ListItem("收购日期", "WeighTime"));
@ -244,8 +307,22 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
mQueryControls.EnableHoldLastControlNames.Add("显示字段");
}
private int GetReportLockCol()
{
if (_reportLockCol == null)
return 0;
if (string.IsNullOrEmpty(_reportLockCol.Text))
_reportLockCol.Text = "0";
int colNumber = 0;
if (int.TryParse(_reportLockCol.Text, out colNumber))
return colNumber;
_reportLockCol.Text = "0";
return 0;
}
protected override DQueryDom GetQueryDom()
{
mDFGrid.LockedColumns = GetReportLockCol();
var query = base.GetQueryDom();
var bill = JoinAlias.Create("bill");


Loading…
Cancel
Save