Browse Source

代宰过磅加数据分析

master
yibo 8 years ago
parent
commit
edb390f7f8
5 changed files with 206 additions and 3 deletions
  1. +7
    -3
      B3SubstituteKill.Web/B3SubstituteKill.Web.csproj
  2. +11
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillWeightBill_/SubKillWeightBillList.cs
  3. +120
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.cs
  4. +66
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.xml
  5. +2
    -0
      WebFolder/config/Plugins/B3SubstituteKill.plugin

+ 7
- 3
B3SubstituteKill.Web/B3SubstituteKill.Web.csproj View File

@ -141,6 +141,9 @@
<Compile Include="Pages\B3SubstituteKill\Dialogs\WeightRecordDialog.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Reports\SubKillWeightBillAnalyse_\SubKillWeightBillAnalyse.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="PluginClass.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\B3SubstituteDataProvider.cs" />
@ -151,9 +154,7 @@
<Name>B3SubstituteKill</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Pages\B3SubstituteKill\Reports\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\BaseInfos\GenerationCostItem_\GenerationCostItemList.xml" />
</ItemGroup>
@ -175,6 +176,9 @@
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Dialogs\WeightRecordDialog.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Reports\SubKillWeightBillAnalyse_\SubKillWeightBillAnalyse.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.


+ 11
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillWeightBill_/SubKillWeightBillList.cs View File

@ -35,5 +35,16 @@ namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillWeightBill_
AddDFBrowseGridColumn(grid, "Supplier_Name");
}
}
protected override void InitToolBar(HLayoutPanel toolbar)
{
base.InitToolBar(toolbar);
if (CheckDefaultRole("数据分析", false))
{
var dataAnysBtn = new TSButton() { Text = "数据分析", UseSubmitBehavior = false };
dataAnysBtn.OnClientClick = string.Format("OpenUrlInTopTab('{0}','数据分析');return false;", TSingSoft.WebPluginFramework.WpfPageUrl.ToGlobal(AspUtil.AddTimeStampToUrl("~/B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.aspx")));
toolbar.Add(dataAnysBtn);
}
}
}
}

+ 120
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.cs View File

@ -0,0 +1,120 @@
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO.NamedValueTemplate;
using BWP.B3ProcurementInterface.Utils;
using BWP.B3ProduceUnitedInfos;
using BWP.B3SubstituteKill.BO;
using BWP.B3SubstituteKill.Utils;
using BWP.Web.Layout;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SubstituteKill.Reports.SubKillWeightBillAnalyse_
{
class SubKillWeightBillAnalyse : DFBrowseGridReportPage<SubKillWeightBill>
{
protected override string Caption
{
get { return "代宰过磅分析"; }
}
protected override string QueryOptionsTabName
{
get
{
return "显示字段";
}
}
protected override string AccessRoleName
{
get { return "B3SubstituteKill.代宰过磅.数据分析"; }
}
protected override void AddQueryControls(VLayoutPanel vPanel)
{
var layout = new LayoutManager("Main", mDFInfo, mQueryContainer);
layout.Add("ID", new DFTextBox(mDFInfo.Fields["ID"]));
layout.Add("AccountingUnit_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.));
layout.Add("Department_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["Department_ID"], B3FrameworksConsts.DataSources.));
layout.Add("Employee_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["Employee_ID"], mQueryContainer, "Employee_ID", B3FrameworksConsts.DataSources.));
layout["Employee_ID"].NotAutoAddToContainer = true;
layout.Add("Date", QueryCreator.TimeRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate"));
layout.Add("Supplier_ID", new SimpleLabel("供应商"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3ProcurementInterfaceDataSources.));
layout.Add("LiveVarieties_ID", new SimpleLabel("生猪品种"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3ProduceUnitedInfos.B3ProduceUnitedInfosDataSources.));
layout.Add("LiveColonyHouse_ID", new SimpleLabel("圈舍"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3ProduceUnitedInfosDataSources.,"2"));
layout.Add("SubKillProductLine_ID", new SimpleLabel("代宰生产线"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3SubstituteKillConsts.DataSources.线));
var state = mQueryContainer.Add(QueryCreator. (mDFInfo.Fields["BillState"], true, false, true, true), "BillState");
((ChoiceBox)state).Value = ..Value.ToString()+"|";
state.DisplayValue = "已审核;";
layout.Add("BillState", state);
layout["BillState"].NotAutoAddToContainer = true;
var config = new AutoLayoutConfig { Cols = 4 };
config.Add("ID");
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
config.Add("Date").ColSpan = 4;
config.Add("Supplier_ID");
config.Add("LiveVarieties_ID");
config.Add("LiveColonyHouse_ID");
config.Add("SubKillProductLine_ID");
config.Add("BillState");
layout.Config = config;
vPanel.Add(layout.CreateLayout());
}
ReportDisplayOptionHelper mDisplayHelper = new ReportDisplayOptionHelper();
protected override void AddQueryOptions(VLayoutPanel vPanel)
{
mDisplayHelper.AddOptionItem("单号", "bill", "ID", false);
mDisplayHelper.AddOptionItem("会计单位", "bill", "AccountingUnit_Name", false);
mDisplayHelper.AddOptionItem("部门", "bill", "Department_Name", false);
mDisplayHelper.AddOptionItem("经办人", "bill", "Employee_Name", false);
mDisplayHelper.AddOptionItem("过磅时间", "bill", "Date", false);
mDisplayHelper.AddOptionItem("供应商", "bill", "Supplier_Name", false);
mDisplayHelper.AddOptionItem("联系方式", "bill", "Supplier_Tel", false);
mDisplayHelper.AddOptionItem("身份证", "bill", "Supplier_Card_ID", false);
mDisplayHelper.AddOptionItem("地址", "bill", "Supplier_Address", false);
mDisplayHelper.AddOptionItem("价格单号", "bill", "PriceBill_ID", false);
mDisplayHelper.AddOptionItem("摘要", "bill", "Remark", false);
mDisplayHelper.AddOptionItem("生猪品种", "detail", "LiveVarieties_Name", false);
mDisplayHelper.AddOptionItem("头数", "detail", "Number", false, true);
mDisplayHelper.AddOptionItem("毛重", "detail", "MaoWeight", false, true);
mDisplayHelper.AddOptionItem("皮重", "detail", "PiWeight", false, true);
mDisplayHelper.AddOptionItem("重量", "detail", "Weight", false, true);
mDisplayHelper.AddOptionItem("圈舍", "detail", "LiveColonyHouse_Name", false);
mDisplayHelper.AddOptionItem("生产线", "detail", "SubKillProductLine_Name", false);
mDisplayHelper.AddOptionItem("备注", "detail", "Remark", false);
AddQueryOption("选项", mDisplayHelper.GetAllDisplayNames(), mDisplayHelper.GetDefaultSelelectedDisplayNames());
base.AddQueryOptions(vPanel);
}
protected override DQueryDom GetQueryDom()
{
var dom = base.GetQueryDom();
var bill = dom.From.RootSource.Alias;
mDisplayHelper.AddAlias("bill", JoinAlias.Create("bill"));
var detail = JoinAlias.Create("detail");
mDisplayHelper.AddAlias("detail", detail);
mDisplayHelper.AddSelectColumns(dom, (name) => OptionIsSelected("选项", name), SumColumnIndexs);
return dom;
}
}
}

+ 66
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.xml View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
</Columns>
<From>
<Join type="Left">
<DmoClass class="BWP.B3SubstituteKill.BO.SubKillWeightBill, B3SubstituteKill" alias="bill"/>
<DmoClass class="BWP.B3SubstituteKill.BO.SubKillWeightBill_Detail, B3SubstituteKill" alias="detail"/>
<Condition>
<EQ>
<Field name="ID" alias="bill"/>
<Field name="SubKillWeightBill_ID" alias="detail"/>
</EQ>
</Condition>
</Join>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Department_ID"/>
<QBE paramName="Department_ID"/>
</EQ>
<QBEIn>
<Field name="Employee_ID"/>
<QBE paramName ="Employee_ID"/>
</QBEIn>
<GreaterThanOrEqual>
<Field name="Date"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
<EQ>
<Field name="Supplier_ID" />
<QBE paramName="Supplier_ID"/>
</EQ>
<EQ>
<Field name="LiveVarieties_ID"/>
<QBE paramName="LiveVarieties_ID"/>
</EQ>
<EQ>
<Field name="LiveColonyHouse_ID" />
<QBE paramName="LiveColonyHouse_ID"/>
</EQ>
<EQ>
<Field name="SubKillProductLine_ID"/>
<QBE paramName ="SubKillProductLine_ID"/>
</EQ>
<QBEIn>
<Field name="BillState"/>
<QBE paramName ="BillState"/>
</QBEIn>
</And>
</Where>
</Select>

+ 2
- 0
WebFolder/config/Plugins/B3SubstituteKill.plugin View File

@ -87,6 +87,7 @@
<Function index="9" name="作废" />
<Function index="10" name="完毕"/>
<Function index="11" name="撤销完毕"/>
<Function index="12" name="数据分析"/>
</FunctionGroup>
</Security>
<Menus>
@ -96,6 +97,7 @@
<Menu id="0004" name="/B3代宰模块/基础信息/代宰生产线" roles="B3SubstituteKill.代宰生产线.访问" url="B3SubstituteKill/BaseInfos/SubKillProductLine_/SubKillProductLineList.aspx"/>
<Menu id="0005" name="/B3代宰模块/业务单据/代宰价格单" roles="B3SubstituteKill.代宰价格单.访问" url="B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.aspx"/>
<Menu id="0006" name="/B3代宰模块/业务单据/代宰过磅" roles="B3SubstituteKill.代宰过磅.访问" url="B3SubstituteKill/Bills/SubKillWeightBill_/SubKillWeightBillList.aspx"/>
<Menu id="0007" name="/B3代宰模块/报表分析/代宰过磅分析" roles="B3SubstituteKill.代宰过磅.数据分析" url="B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.aspx"/>
</Menus>
<Features>


Loading…
Cancel
Save