Browse Source

需求单No.139400 新增单据 费用录入。在收购综合分析中增加显示字段【经纪费】【运费】

master
yibo 7 years ago
parent
commit
837771f53c
12 changed files with 469 additions and 23 deletions
  1. +18
    -3
      B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj
  2. +106
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordEdit.cs
  3. +35
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordList.cs
  4. +58
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordList.xml
  5. +19
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordPrint.cs
  6. +74
    -19
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs
  7. +3
    -0
      B3QingDaoWanFu/B3QingDaoWanFu.csproj
  8. +20
    -0
      B3QingDaoWanFu/BL/Bill/CostRecordBL/CostRecordBL.cs
  9. +56
    -0
      B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord.cs
  10. +38
    -0
      B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord_Detail.cs
  11. +25
    -0
      WebFolder/config/billreports/B3QingDaoWanFu/CostRecordPrint.xml
  12. +17
    -1
      WebFolder/config/plugins/B3QingDaoWanFu.plugin

+ 18
- 3
B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj View File

@ -69,11 +69,13 @@
<Reference Include="B3Sale, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Sale.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="B3Sale.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Sale.Web.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="B3UnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\BwpB3Project\tsref\Debug\B3UnitedInfos.dll</HintPath>
@ -141,6 +143,15 @@
<Compile Include="DFGridReportPage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Bills\CostRecord_\CostRecordEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Bills\CostRecord_\CostRecordList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Bills\CostRecord_\CostRecordPrint.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\CustomerDeviceSet_\CustomerDeviceSetEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -176,7 +187,8 @@
<ProjectReference Include="..\B3QingDaoWanFu\B3QingDaoWanFu.csproj">
<Project>{b47ce3c3-c269-48b8-84a7-32360e5a9e8e}</Project>
<Name>B3QingDaoWanFu</Name>
<Private>False</Private></ProjectReference>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Reports\ComprehensiveReport.xml" />
@ -189,6 +201,9 @@
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Reports\PayInfoExport.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3QingDaoWanFu\Bills\CostRecord_\CostRecordList.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.


+ 106
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordEdit.cs View File

@ -0,0 +1,106 @@
using BWP.B3ButcherManage.BO;
using BWP.B3ButcherManage.Utils;
using BWP.B3Frameworks.BO.NamedValueTemplate;
using BWP.B3Frameworks.Utils;
using BWP.B3QingDaoWanFu.BL;
using BWP.B3QingDaoWanFu.BO;
using BWP.Web.Layout;
using BWP.Web.WebControls;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_
{
class CostRecordEdit : DomainBillEditPage<CostRecord, ICostRecordBL>
{
DFEditGrid _detailGrid;
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, CustomPageLayout.PageLayoutSection pageLayoutSection)
{
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer);
var config = new AutoLayoutConfig();
config.Add("AccountingUnit_ID");
config.Add("Date");
config.Add("PurchaseType_ID");
layoutManager.Config = config;
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout());
}
protected override void BuildBody(System.Web.UI.Control parent)
{
base.BuildBody(parent);
AddDetail(parent.EAdd(new TitlePanel("单据明细", "单据明细")));
}
private void AddDetail(TitlePanel titlePanel)
{
if (CanSave)
titlePanel.EAdd(new TSButton("载入", LoadDetail));
var editor = new DFCollectionEditor<CostRecord_Detail>(() => Dmo.Details);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => CanSave;
_detailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("WeightBill_ID"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Supplier_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn("JingJiFee"));
_detailGrid.Columns.Add(new DFEditGridColumn("TransferFee"));
var section = mPageLayoutManager.AddSection("DetaiColumns", "明细列");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_detailGrid, mPageLayoutManager, DFInfo.Get(typeof(CostRecord_Detail)));
}
private void LoadDetail(object sender, EventArgs e)
{
GetFromUI();
if (Dmo.PurchaseType_ID == null)
throw new Exception("请选择收购类型");
Dmo.Details.Clear();
var query = new DQueryDom(new JoinAlias("_weighBill", typeof(WeighBill)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PurchaseType_ID", Dmo.PurchaseType_ID), DQCondition.EQ(DQExpression.Snippet("CAST([_weighBill].[WeighTime] AS DATE)"), DQExpression.Value(Dmo.Date)), DQCondition.GreaterThanOrEqual("BillState", .)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Supplier_Name"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("WeighTime"));
var result = query.EExecuteList<long, string>();
foreach (var item in result)
Dmo.Details.Add(new CostRecord_Detail { WeightBill_ID = item.Item1, Supplier_Name = item.Item2 });
_detailGrid.DataBind();
}
public override void AppToUI()
{
base.AppToUI();
_detailGrid.DataBind();
}
public override void GetFromUI()
{
base.GetFromUI();
_detailGrid.GetFromUI();
}
protected override void InitNewDmo(CostRecord dmo)
{
base.InitNewDmo(dmo);
var profile = DomainUserProfileUtil.Load<B3ButcherManageUserProfile>();
if (profile.AccountingUnit_ID.HasValue)
{
dmo.AccountingUnit_ID = profile.AccountingUnit_ID;
dmo.AccountingUnit_Name = profile.AccountingUnit_Name;
}
}
}
}

+ 35
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordList.cs View File

@ -0,0 +1,35 @@
using BWP.B3QingDaoWanFu.BL;
using BWP.B3QingDaoWanFu.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_
{
class CostRecordList : DomainBillListPage<CostRecord, ICostRecordBL>
{
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
{
config.Add("Date");
config.Add("AccountingUnit_ID");
config.Add("PurchaseType_ID");
config.Remvoe("Remark");
}));
}
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "PurchaseType_Name");
}
}
}
}

+ 58
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordList.xml View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3QingDaoWanFu.BO.CostRecord, B3QingDaoWanFu"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="PurchaseType_ID"/>
<QBE paramName="PurchaseType_ID"/>
</EQ>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</EQ>
<Contains>
<Field name="CreateUser_Name"/>
<QBE paramName="CreateUser_Name"/>
</Contains>
<Contains>
<Field name="CheckUser_Name"/>
<QBE paramName="CheckUser_Name"/>
</Contains>
<GreaterThanOrEqual>
<Field name="CreateTime"/>
<QBE paramName="MinCreateTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="CreateTime"/>
<QBE paramName="MaxCreateTime"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="Date"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
<EQ>
<Field name="BillState"/>
<QBE paramName ="BillState"/>
</EQ>
</And>
</Where>
</Select>

+ 19
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordPrint.cs View File

@ -0,0 +1,19 @@
using BWP.B3QingDaoWanFu.BL;
using BWP.B3QingDaoWanFu.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_
{
class CostRecordPrint : DomainTemplatePrintPage<CostRecord, ICostRecordBL>
{
protected override void AddParameters(IDictionary<string, object> dic)
{
dic.Add("$ID", Dmo.ID);
dic.Add("$Details", Dmo.Details);
dic.Add("$DetailType", typeof(CostRecord_Detail));
}
}
}

+ 74
- 19
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs View File

@ -25,6 +25,7 @@ using BWP.B3Frameworks;
using System.Web.UI;
using TSingSoft.WebPluginFramework.Controls;
using TSingSoft.WebPluginFramework.Exports;
using BWP.B3QingDaoWanFu.BO;
namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
@ -62,7 +63,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
var = (Money<>?)(objToDecimal() + objToDecimal());
row["皮肉重量"] = ;
sum皮肉重量 += ( ?? 0);
var = objToDecimal(row["到厂毛重"]);
row["皮肉比"] = Math.Round((double)( / * 100), 2);
}
@ -78,7 +79,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
SetCommonDivSumTable(table, "实付单价", "实付金额", "到厂毛重");
SetCommonDivSumTable(table, "单头盈亏", "盈亏", "收购头数");
SetCommonDivSumTable(table, "均重", "到厂毛重", "收购头数");
SetCommonDivSumTable(table, "损耗比", "损耗", "原发毛重",true);
SetCommonDivSumTable(table, "损耗比", "损耗", "原发毛重", true);
SetCommonDivSumTable(table, "皮肉比", "皮肉重量", "到厂毛重", true);
Set占比(table);
@ -93,7 +94,27 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
table.SumRow["死亡头数"] = n;
}
// Set占比(table,);
if (_checkbox.Items.FindByText("经纪费").Selected)
{
Money<> n = 0m;
foreach (DFDataRow row in table.Rows)
{
n += Convert.ToDecimal(row["经纪费"] ?? 0);
}
table.SumRow["经纪费"] =n;
}
if (_checkbox.Items.FindByText("运费").Selected)
{
Money<> n = 0;
foreach (DFDataRow row in table.Rows)
{
n += Convert.ToInt32(row["运费"] ?? 0);
}
table.SumRow["运费"] = n;
}
// Set占比(table,);
}
private void Set占比(DFDataTable table)
@ -115,21 +136,21 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
var = + + + + ;
table.SumRow["剥皮|一级|占比"] =Math.Round( / *100,2);
table.SumRow["剥皮|二级|占比"] =Math.Round( / *100,2);
table.SumRow["剥皮|三级|占比"] =Math.Round( / *100,2);
table.SumRow["剥皮|四级|占比"] =Math.Round( / *100,2);
table.SumRow["剥皮|五级|占比"] =Math.Round( / *100,2);
table.SumRow["剥皮|一级|占比"] = Math.Round( / * 100, 2);
table.SumRow["剥皮|二级|占比"] = Math.Round( / * 100, 2);
table.SumRow["剥皮|三级|占比"] = Math.Round( / * 100, 2);
table.SumRow["剥皮|四级|占比"] = Math.Round( / * 100, 2);
table.SumRow["剥皮|五级|占比"] = Math.Round( / * 100, 2);
table.SumRow["烫褪|一级|占比"] =Math.Round( / *100,2);
table.SumRow["烫褪|二级|占比"] =Math.Round( / *100,2);
table.SumRow["烫褪|三级|占比"] =Math.Round( / *100,2);
table.SumRow["烫褪|四级|占比"] =Math.Round( / *100,2);
table.SumRow["烫褪|五级|占比"] =Math.Round( / *100, 2);
table.SumRow["烫褪|一级|占比"] = Math.Round( / * 100, 2);
table.SumRow["烫褪|二级|占比"] = Math.Round( / * 100, 2);
table.SumRow["烫褪|三级|占比"] = Math.Round( / * 100, 2);
table.SumRow["烫褪|四级|占比"] = Math.Round( / * 100, 2);
table.SumRow["烫褪|五级|占比"] = Math.Round( / * 100, 2);
var = + + + ;
var = + ;
table.SumRow["一二级比"] =Math.Round( / * 100, 2);
table.SumRow["一二级比"] = Math.Round( / * 100, 2);
}
@ -211,7 +232,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
_checkbox.Items.Add(new ListItem("过磅单号", "Weigh_ID"));
_checkbox.Items.Add(new ListItem("结算单号", "ID"));
_checkbox.Items.Add(new ListItem("业务员", "Employee_Name"));
_checkbox.Items.Add(new ListItem("经纪费", "JingJiFee"));
_checkbox.Items.Add(new ListItem("运费", "TransferFee"));
_checkbox.Items.Add(new ListItem("收购头数", "RealNumber"));
_checkbox.Items.Add(new ListItem("死亡头数", "DeathNumber"));
@ -280,8 +302,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
return new QuerySettings(SelectRange.All, mDFGrid.SortField, mDFGrid.SortDirection);
};
queryPanel.ButtonsPanel.EAdd(new TSButton("导出到Excel", (sender, args) => exporter.Export(excelExporter)));
queryPanel.ButtonsPanel.EAdd(new TSButton("导出到Excel", (sender, args) => exporter.Export(excelExporter)));
queryPanel.ButtonsPanel.EAdd(exporter);
}
@ -323,6 +345,10 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
tempUnionDom.Register(query);
var unionAlias = new JoinAlias("tempUnionDom", typeof(tempUnionDom));
query.From.AddJoin(JoinType.Left, new DQDmoSource(unionAlias), DQCondition.EQ(bill, "ID", unionAlias, "StatPay_ID"));
var costRecord = new JoinAlias(typeof(CostRecordTemp));
CostRecordTemp.Register(query);
query.From.AddJoin(JoinType.Left, new DQDmoSource(costRecord), DQCondition.EQ(bill, "Weigh_ID", costRecord, "WeightBill_ID"));
query.GroupBy.Expressions.Add(DQExpression.Field(bill, "Date"));
@ -359,7 +385,12 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(field.Value), field.Text));
query.GroupBy.Expressions.Add(DQExpression.Field(field.Value));
break;
case"经纪费":
case"运费":
query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(costRecord, field.Value), field.Text));
query.GroupBy.Expressions.Add(DQExpression.Field(weight, "ID"));
query.GroupBy.Expressions.Add(DQExpression.Field(costRecord, field.Value));
break;
case "均重":
query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ(unionAlias, "UnionType", 1), DQExpression.Field(unionAlias, "RealWeight"))).ESafeDivide(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ(unionAlias, "UnionType", 1), DQExpression.Field(unionAlias, "RealNumber")))).ECastType<Money<>>(), "均重"));
break;
@ -992,9 +1023,33 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
query.Columns.Add(DQSelectColumn.Field("Weigh_ID"));
query.Columns.Add(DQSelectColumn.Sum("Num"));
query.GroupBy.Expressions.Add(DQExpression.Field("Weigh_ID"));
query.Where.Conditions.Add(DQCondition.EQ(setting, "AbnormalItem_Name","死亡"));
query.Where.Conditions.Add(DQCondition.EQ(setting, "AbnormalItem_Name", "死亡"));
return query;
}
}
class CostRecordTemp
{
public long WeightBill_ID { get; set; }
public Money<>? JingJiFee { get; set; }
public Money<>? TransferFee { get; set; }
public static void Register(DQueryDom root)
{
var main = new JoinAlias(typeof(CostRecord));
var detail = new JoinAlias(typeof(CostRecord_Detail));
var query = new DQueryDom(main);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "CostRecord_ID"));
query.Columns.Add(DQSelectColumn.Field("WeightBill_ID", detail));
query.Columns.Add(DQSelectColumn.Sum(detail, "JingJiFee"));
query.Columns.Add(DQSelectColumn.Sum(detail, "TransferFee"));
query.GroupBy.Expressions.Add(DQExpression.Field(detail, "WeightBill_ID"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("BillState", .), DQCondition.EQ("Domain_ID", DomainContext.Current.ID)));
root.RegisterQueryTable(typeof(CostRecordTemp), new string[] { "WeightBill_ID", "JingJiFee", "TransferFee" }, query);
}
}
}
}

+ 3
- 0
B3QingDaoWanFu/B3QingDaoWanFu.csproj View File

@ -136,7 +136,10 @@
<Compile Include="BLActions\SaleForecastBLAction.cs" />
<Compile Include="BLActions\SaleOrderBLAction.cs" />
<Compile Include="BLActions\SaleOutStoreBLActions.cs" />
<Compile Include="BL\Bill\CostRecordBL\CostRecordBL.cs" />
<Compile Include="BL\CustomerDeviceSetBL.cs" />
<Compile Include="BO\Bill\CostRecord\CostRecord.cs" />
<Compile Include="BO\Bill\CostRecord\CostRecord_Detail.cs" />
<Compile Include="BO\CustomerDeviceSet.cs" />
<Compile Include="DataPatchs\StatPaySetBillNeedValue20171123.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />


+ 20
- 0
B3QingDaoWanFu/BL/Bill/CostRecordBL/CostRecordBL.cs View File

@ -0,0 +1,20 @@
using BWP.B3Frameworks.BL;
using BWP.B3QingDaoWanFu.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3QingDaoWanFu.BL
{
[BusinessInterface(typeof(CostRecordBL))]
[LogicName("费用录入")]
public interface ICostRecordBL : IDomainBillBL<CostRecord>
{ }
public class CostRecordBL : DomainBillBL<CostRecord>, ICostRecordBL
{
}
}

+ 56
- 0
B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord.cs View File

@ -0,0 +1,56 @@
using BWP.B3ButcherManage.BO;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.B3QingDaoWanFu.BO
{
[DFClass, Serializable, LogicName("费用录入")]
public class CostRecord : DomainBill, IAccountingUnitBill
{
[LogicName("会计单位")]
[DFNotEmpty]
[DFExtProperty("WebControlType", DFEditControl.ChoiceBox)]
[DFDataKind(B3FrameworksConsts.DataSources.授权会计单位)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3FrameworksConsts.DataSources.授权会计单位全部)]
[DFExtProperty("DisplayField", "AccountingUnit_Name")]
public long? AccountingUnit_ID { get; set; }
DateTime date = DateTime.Today.AddDays(-1);
[LogicName("过磅日期")]
public DateTime Date { get { return date; } set { date = value; } }
[LogicName("收购类型")]
[DFNotEmpty]
[DFExtProperty("WebControlType", DFEditControl.ChoiceBox)]
[DFDataKind(B3ButcherManage.B3ButcherManageConsts.DataSources.收购类型)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ButcherManage.B3ButcherManageConsts.DataSources.收购类型)]
[DFExtProperty("DisplayField", "PurchaseType_Name")]
public long? PurchaseType_ID { get; set; }
private CostRecord_DetailCollection _details = new CostRecord_DetailCollection();
[OneToMany(typeof(CostRecord_Detail), "ID")]
[Join("ID", "CostRecord_ID")]
public CostRecord_DetailCollection Details
{
get { return _details; }
}
[ReferenceTo(typeof(AccountingUnit), "Name")]
[LogicName("会计单位")]
[Join("AccountingUnit_ID", "ID")]
public string AccountingUnit_Name { get; set; }
[ReferenceTo(typeof(PurchaseType), "Name")]
[LogicName("收购类型")]
[Join("PurchaseType_ID", "ID")]
public string PurchaseType_Name { get; set; }
}
}

+ 38
- 0
B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord_Detail.cs View File

@ -0,0 +1,38 @@
using BWP.B3ButcherManage.BO;
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3QingDaoWanFu.BO
{
[Serializable, DFClass, LogicName("费用录入_明细")]
public class CostRecord_Detail : Base
{
public long CostRecord_ID { get; set; }
[LogicName("过磅单号")]
public long WeightBill_ID { get; set; }
[LogicName("经纪费")]
public Money<>? JingJiFee { get; set; }
[LogicName("运费")]
public Money<>? TransferFee { get; set; }
[LogicName("供应商")]
[ReferenceTo(typeof(WeighBill), "Supplier_Name")]
[Join("WeightBill_ID", "ID")]
public string Supplier_Name { get; set; }
}
[Serializable]
public class CostRecord_DetailCollection : DmoCollection<CostRecord_Detail>
{ }
}

+ 25
- 0
WebFolder/config/billreports/B3QingDaoWanFu/CostRecordPrint.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<BillReports xmlns="urn:BillReports" version="1.0" displayName="费用录入" phyName="费用录入">
<Report phyName="标准格式">
<BillReport xmlns="urn:BillReport" version="1" displayName="标准格式" >
<Bands>
<TextBand fontName="黑体" fontSize="15" align="Center">费用录入№$Dmo.ID</TextBand>
<DFInfoBand object="$Dmo" cols="4">
<Field name="AccountingUnit_Name" lblWidth="4"/>
<Field name="Date" lblWidth="4"/>
<Field name="PurchaseType_Name" lblWidth="4"/>
</DFInfoBand>
<HtmlBand>
<![CDATA[<h2>单据明细</h2>]]>
</HtmlBand>
<DFListBand collection="$Details" itemType="$DetailType" enablePaging="true" >
<Field name="WeightBill_ID"/>
<Field name="Supplier_Name"/>
<Field name="JingJiFee" />
<Field name="TransferFee" />
</DFListBand>
<PagerBand/>
</Bands>
</BillReport>
</Report>
</BillReports>

+ 17
- 1
WebFolder/config/plugins/B3QingDaoWanFu.plugin View File

@ -11,7 +11,7 @@
<File name="B3QingDaoWanFu.Web.dll" type="web"/>
</Assemblies>
<ContentFiles>
<!--<Folder name="config/billreports"/>-->
<Folder name="config/billreports"/>
</ContentFiles>
<DbResources></DbResources>
@ -29,6 +29,21 @@
<FunctionGroup name="工具" roleSchemas="employee">
<Function index="0" name="按线路派车"/>
</FunctionGroup>
<FunctionGroup name="费用录入" roleSchemas="employee">
<Function index="0" name="访问" />
<Function index="1" name="新建" />
<Function index="2" name="编辑" />
<Function index="3" name="删除" />
<Function index="4" name="审核" />
<Function index="5" name="撤销" />
<Function index="6" name="锁定" />
<Function index="7" name="解锁" />
<Function index="8" name="管理" />
<Function index="9" name="作废" />
<Function index="10" name="完毕"/>
<Function index="11" name="撤销完毕"/>
<Function index="12" name="打印"/>
</FunctionGroup>
</Security>
<Menus>
<Menu id="0001" name="/B3青岛万福/报表/收购综合报表" roles="B3QingDaoWanFu.报表.收购综合报表" url="B3QingDaoWanFu/Reports/ComprehensiveReport.aspx"/>
@ -36,6 +51,7 @@
<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"/>
<Menu id="0006" name="/B3青岛万福/业务单据/费用录入" roles="B3QingDaoWanFu.费用录入.访问" url="B3QingDaoWanFu/Bills/CostRecord_/CostRecordList.aspx"/>
</Menus>
<Features>
</Features>


Loading…
Cancel
Save