Browse Source

Merge branch 'master' of git:BWPB3/B3SubstituteKill

# Conflicts:
#	B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs
#	B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs
master
yibo 8 years ago
parent
commit
01ed730836
24 changed files with 831 additions and 26 deletions
  1. +52
    -9
      B3SubstituteKill.Web/B3SubstituteKill.Web.csproj
  2. +4
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/BaseInfos/SubKillFlag_/SubKillFlagEdit.cs
  3. +1
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/StatPay_/StatPayEdit.cs
  4. +1
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/StatPay_/StatPayList.cs
  5. +5
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderEdit.cs
  6. +80
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SelectStatPayDialog.cs
  7. +76
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SelectStatPayDialog.xml
  8. +155
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringEdit.cs
  9. +39
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringList.cs
  10. +72
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringList.xml
  11. +1
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillWeightBill_/SubKillWeightBillList.cs
  12. +1
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.cs
  13. +34
    -8
      B3SubstituteKill/B3SubstituteKill.csproj
  14. +81
    -0
      B3SubstituteKill/BL/Bills/SubKillGathering/SubKillGatheringBL.cs
  15. +43
    -2
      B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs
  16. +3
    -0
      B3SubstituteKill/BO/BaseInfos/SubKillFlag/SubKillFlag_Detail.cs
  17. +20
    -4
      B3SubstituteKill/BO/Bills/StatPay/StatPay.cs
  18. +3
    -0
      B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs
  19. +3
    -0
      B3SubstituteKill/BO/Bills/SubKillButcherOrder/SubKillButcherOrder_Detail.cs
  20. +72
    -0
      B3SubstituteKill/BO/Bills/SubKillGathering/SubKillGathering.cs
  21. +61
    -0
      B3SubstituteKill/BO/Bills/SubKillGathering/SubKillGathering_Detail.cs
  22. +7
    -3
      B3SubstituteKill/Rpcs/SupplierRpc.cs
  23. +1
    -0
      B3SubstituteKill/Utils/B3SubstituteKillConsts.cs
  24. +16
    -0
      WebFolder/config/Plugins/B3SubstituteKill.plugin

+ 52
- 9
B3SubstituteKill.Web/B3SubstituteKill.Web.csproj View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -36,62 +36,91 @@
<Reference Include="B3Frameworks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="B3Frameworks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Frameworks.dll</HintPath> <HintPath>..\..\..\tsref\Debug\B3Frameworks.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3Frameworks.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="B3Frameworks.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.Web.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.Web.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3ProcurementInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL"> <Reference Include="B3ProcurementInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3ProcurementInterface.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3ProcurementInterface.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3ProduceUnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL"> <Reference Include="B3ProduceUnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath> <HintPath>..\..\..\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="B3System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3System.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3System.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="MainSystem.Web, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="MainSystem.Web, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\MainSystem.Web.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\MainSystem.Web.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Core">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Web">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml.Linq">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Microsoft.CSharp">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml">
<SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="TSingSoft.WebControls2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="TSingSoft.WebControls2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\TSingSoft.WebControls2.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\TSingSoft.WebControls2.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Wpf, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="Wpf, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Wpf.System.Web, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="Wpf.System.Web, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.Web.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.Web.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -137,6 +166,15 @@
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderPrint.cs"> <Compile Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderPrint.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillGathering_\SelectStatPayDialog.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillGathering_\SubKillGatheringEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillGathering_\SubKillGatheringList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillEdit.cs"> <Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillEdit.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
@ -173,6 +211,7 @@
<ProjectReference Include="..\B3SubstituteKill\B3SubstituteKill.csproj"> <ProjectReference Include="..\B3SubstituteKill\B3SubstituteKill.csproj">
<Project>{b5b60a6b-95e6-44e0-b771-69a679a2a7b4}</Project> <Project>{b5b60a6b-95e6-44e0-b771-69a679a2a7b4}</Project>
<Name>B3SubstituteKill</Name> <Name>B3SubstituteKill</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -210,6 +249,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Bills\SubKillGathering_\SelectStatPayDialog.xml" />
<EmbeddedResource Include="Pages\B3SubstituteKill\Bills\SubKillGathering_\SubKillGatheringList.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.


+ 4
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/BaseInfos/SubKillFlag_/SubKillFlagEdit.cs View File

@ -57,6 +57,10 @@ namespace BWP.Web.Pages.B3SubstituteKill.BaseInfos.SubKillFlag_
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Name")).InitEditControl += (sender, e) => { _detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Name")).InitEditControl += (sender, e) => {
e.Control.Style["width"] = "400px"; e.Control.Style["width"] = "400px";
}; };
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Remark")).InitEditControl += (sender, e) => {
e.Control.Style["width"] = "400px";
};
var section = mPageLayoutManager.AddSection("Detail", "标识明细"); var section = mPageLayoutManager.AddSection("Detail", "标识明细");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name); titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);


+ 1
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/StatPay_/StatPayEdit.cs View File

@ -108,6 +108,7 @@ __DFContainer.setValue('PriceBill_ID','');
_costDetail = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) }); _costDetail = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_costDetail.Columns.Add(new DFEditGridColumn("SubKillProductLine_Name")); _costDetail.Columns.Add(new DFEditGridColumn("SubKillProductLine_Name"));
_costDetail.Columns.Add(new DFEditGridColumn("GenerationCostItem_Name")); _costDetail.Columns.Add(new DFEditGridColumn("GenerationCostItem_Name"));
_costDetail.Columns.Add(new DFEditGridColumn("Number"));
_costDetail.Columns.Add(new DFEditGridColumn("Price")); _costDetail.Columns.Add(new DFEditGridColumn("Price"));
_costDetail.Columns.EAdd(new DFEditGridColumn("Money")); _costDetail.Columns.EAdd(new DFEditGridColumn("Money"));
var section = mPageLayoutManager.AddSection("CostDetail", "代宰费用"); var section = mPageLayoutManager.AddSection("CostDetail", "代宰费用");


+ 1
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/StatPay_/StatPayList.cs View File

@ -32,6 +32,7 @@ namespace BWP.Web.Pages.B3SubstituteKill.Bills.StatPay_
AddDFBrowseGridColumn(grid, "Employee_Name"); AddDFBrowseGridColumn(grid, "Employee_Name");
AddDFBrowseGridColumn(grid, "Date"); AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "Supplier_Name"); AddDFBrowseGridColumn(grid, "Supplier_Name");
AddDFBrowseGridColumn(grid, "Remark");
} }
} }
} }


+ 5
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderEdit.cs View File

@ -142,6 +142,11 @@ __DFContainer.setValue('PriceBill_ID','');
{ {
e.Control.Style["width"] = "120px"; e.Control.Style["width"] = "120px";
}; };
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("AllMixedNumber")).InitEditControl += (sender, e) =>
{
e.Control.Style["width"] = "120px";
};
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Weight")).InitEditControl += (sender, e) => _detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Weight")).InitEditControl += (sender, e) =>
{ {
e.Control.Style["width"] = "120px"; e.Control.Style["width"] = "120px";


+ 80
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SelectStatPayDialog.cs View File

@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3SubstituteKill.BO;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.Utils;
using Forks.Utils.Collections;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_
{
class SelectStatPayDialog : DmoMultiSelectDialog<StatPay, SubKillGathering_Detail>
{
long _supplierID;
protected override void InitForm(System.Web.UI.HtmlControls.HtmlForm form)
{
_supplierID = Convert.ToInt64(Request.QueryString["Supplier_ID"]);
base.InitForm(form);
}
protected override void CreateQuery(VLayoutPanel vPanel)
{
var tablePanel = new TableLayoutPanel(10, 1);
tablePanel.Add(0, 1, 0, 1, new SimpleLabel("过磅单号"));
tablePanel.Add(1, 2, 0, 1, mQueryContainer.Add(new DFTextBox(mDFInfo.Fields["Weigh_ID"]), "Weigh_ID"));
tablePanel.Add(2, 3, 0, 1, new SimpleLabel("结算单号"));
tablePanel.Add(3, 4, 0, 1, mQueryContainer.Add(new DFTextBox(mDFInfo.Fields["ID"]), "ID"));
tablePanel.Add(4, 5, 0, 1, new SimpleLabel("结算日期"));
tablePanel.Add(5, 6, 0, 1, QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate"));
vPanel.Add(tablePanel);
base.CreateQuery(vPanel);
}
protected override DQueryDom GetQueryDom()
{
var query = mQueryContainer.Build();
var bill = query.From.RootSource.Alias;
query.Where.Conditions.Add(DQCondition.GreaterThan(DQExpression.Field("ReceiveMoney"), DQExpression.IfNull(DQExpression.Field("AlreadyReceiveMoney"), DQExpression.ConstValue(0))));
query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", _supplierID));
query.EAddCheckedCondition(bill);
query.Where.Conditions.Add(DQCondition.EQ("Domain_ID", DomainContext.Current.ID));
return query;
}
protected override void SetResultFromDFDataRow(SubKillGathering_Detail dmo, DFDataRow row)
{
dmo.StatPay_ID = (long?)row["ID"];
dmo.Weigh_ID = (long?)row["Weigh_ID"];
dmo.WeighTime = (DateTime?)row["WeighTime"];
dmo.StatPay_Date = (DateTime?)row["Date"];
dmo.StatPay_ReceiveMoney = (Money<>?)row["ReceiveMoney"];
dmo.AlreadyReceiveMoney = (Money<>?)row["AlreadyReceiveMoney"];
dmo.ThisReceiveMoney = (dmo.StatPay_ReceiveMoney ?? 0) - (dmo.AlreadyReceiveMoney ?? 0);
}
protected override void CreateQueryGridColumns(DFBrowseGrid grid)
{
grid.Columns.EAdd(new DFBrowseGridColumn("ID")).HeaderText = "结算单";
grid.Columns.EAdd(new DFBrowseGridColumn("Supplier_Name"));
grid.Columns.EAdd(new DFBrowseGridColumn("Date")).HeaderText = "结算日期";
grid.Columns.Add(new DFBrowseGridColumn("Weigh_ID"));
grid.Columns.Add(new DFBrowseGridColumn("WeighTime"));
grid.Columns.Add(new DFBrowseGridColumn("ReceiveMoney"));
grid.Columns.Add(new DFBrowseGridColumn("AlreadyReceiveMoney"));
grid.Columns.Add(new DFBrowseGridColumn("Remark"));
}
}
}

+ 76
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SelectStatPayDialog.xml View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3SubstituteKill.BO.StatPay, B3SubstituteKill"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID"/>
<QBE paramName="Supplier_ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Department_ID"/>
<QBE paramName="Department_ID"/>
</EQ>
<EQ>
<Field name="Employee_ID"/>
<QBE paramName="Employee_ID"/>
</EQ>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</EQ>
<EQ>
<Field name="Weigh_ID"/>
<QBE paramName="Weigh_ID"/>
</EQ>
<Contains>
<Field name="Remark"/>
<QBE paramName="Remark"/>
</Contains>
<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>

+ 155
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringEdit.cs View File

@ -0,0 +1,155 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
using BWP.Web.Layout;
using BWP.Web.Utils;
using BWP.Web.WebControls;
using Forks.EnterpriseServices.DataForm;
using Forks.Utils.Collections;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_
{
class SubKillGatheringEdit : DepartmentWorkFlowBillEditPage<SubKillGathering, ISubKillGatheringBL>
{
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("Department_ID");
config.Add("Employee_ID");
config.Add("Date");
config.Add("Supplier_ID");
config.Add("Supplier_Tel");
config.Add("Supplier_Card_ID");
config.Add("Supplier_Address");
config.Add("Remark");
layoutManager.Config = config;
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout());
if (layoutManager.Contains("Supplier_ID"))
{
var supplierInput = layoutManager["Supplier_ID"].InputControl as DFChoiceBox;
if (supplierInput != null)
{
var script = @"
var txtValue =parseInt(__DFContainer.getValue('Supplier_ID'));
simpleRestCall('/MainSystem/B3SubstituteKill/Rpcs/SupplierRpc/GetSupplierAndPriceBillID',[txtValue,__DFContainer.getControl('Date').value],
function(result){
if(typeof(result.Address)!='undefined')
{
__DFContainer.setValue('Supplier_Address',result.Address);
}
else
{
__DFContainer.setValue('Supplier_Address','');
}
if(typeof(result.Tel)!='undefined')
{
__DFContainer.setValue('Supplier_Tel',result.Tel);
}
else
{
__DFContainer.setValue('Supplier_Tel','');
}
if(typeof(result.Supplier_Card_ID)!='undefined')
{
__DFContainer.setValue('Supplier_Card_ID',result.Card_ID);
}
else
{
__DFContainer.setValue('Supplier_Card_ID','');
}
},{ });";
supplierInput.OnClientSelected = script;
}
}
}
protected override void BuildBody(System.Web.UI.Control parent)
{
base.BuildBody(parent);
AddCostDetail(parent.EAdd(new TitlePanel("收款明细", "收款明细")));
}
DFEditGrid _detail;
private void AddCostDetail(TitlePanel titlePanel)
{
var vPanel = titlePanel.EAdd(new VLayoutPanel());
AddToolbarControl(vPanel);
var editor = new DFCollectionEditor<SubKillGathering_Detail>(() => Dmo.Details);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => CanSave;
_detail = vPanel.Add(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_ID"));
_detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_Date"));
_detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("Weigh_ID"));
_detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("WeighTime"));
_detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("StatPay_ReceiveMoney"));
_detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("AlreadyReceiveMoney"));
_detail.Columns.EAdd(new DFEditGridColumn<DFTextBox>("ThisReceiveMoney"));
_detail.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Remark"));
var section = mPageLayoutManager.AddSection("CostDetail", "收款明细");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_detail, mPageLayoutManager, DFInfo.Get(typeof(SubKillGathering_Detail)));
}
private void AddToolbarControl(VLayoutPanel vPanel)
{
if (CanSave)
{
var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));
var dialogButton = hPanel.Add(new DialogButton
{
Text = "选择结算单",
Url = "SelectStatPayDialog.aspx?"
});
dialogButton.BeforeClientClick = "var sid=__DFContainer.getValue('Supplier_ID'); if (sid == '') { alert('先选择供应商');return false;}";
dialogButton.ClientDynamicParamGetter = "return 'Supplier_ID=' + __DFContainer.getValue('Supplier_ID')";
dialogButton.Click += delegate {
_detail.GetFromUI();
var details = DialogUtil.GetCachedObj<SubKillGathering_Detail>(this);
foreach (SubKillGathering_Detail detail in details)
{
if (Dmo.Details.Any(x => x.StatPay_ID == detail.StatPay_ID))
continue;
Dmo.Details.Add(detail);
}
_detail.DataBind();
};
}
}
public override void AppToUI()
{
base.AppToUI();
_detail.DataBind();
}
public override void GetFromUI()
{
base.GetFromUI();
_detail.GetFromUI();
}
}
}

+ 39
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringList.cs View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_
{
class SubKillGatheringList : DomainBillListPage<SubKillGathering, ISubKillGatheringBL>
{
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
{
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
config.Add("Date");
config.Add("Supplier_ID");
}));
}
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
AddDFBrowseGridColumn(grid, "Department_Name");
AddDFBrowseGridColumn(grid, "Employee_Name");
AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "Supplier_Name");
AddDFBrowseGridColumn(grid, "Remark");
}
}
}
}

+ 72
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringList.xml View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3SubstituteKill.BO.SubKillGathering, B3SubstituteKill"/>
</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>
<EQ>
<Field name="Employee_ID"/>
<QBE paramName="Employee_ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID"/>
<QBE paramName="Supplier_ID"/>
</EQ>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</EQ>
<Contains>
<Field name="Remark"/>
<QBE paramName="Remark"/>
</Contains>
<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>

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

@ -33,6 +33,7 @@ namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillWeightBill_
AddDFBrowseGridColumn(grid, "Employee_Name"); AddDFBrowseGridColumn(grid, "Employee_Name");
AddDFBrowseGridColumn(grid, "Date"); AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "Supplier_Name"); AddDFBrowseGridColumn(grid, "Supplier_Name");
AddDFBrowseGridColumn(grid, "Remark");
} }
} }


+ 1
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.cs View File

@ -89,6 +89,7 @@ namespace BWP.Web.Pages.B3SubstituteKill.Reports.SubKillButcherOrderAnalyse_
mDisplayHelper.AddOptionItem("生产线", "detail", "SubKillProductLine_Name", false); mDisplayHelper.AddOptionItem("生产线", "detail", "SubKillProductLine_Name", false);
mDisplayHelper.AddOptionItem("代宰标识", "detail", "SubKillFlag_Detail_Name", false); mDisplayHelper.AddOptionItem("代宰标识", "detail", "SubKillFlag_Detail_Name", false);
mDisplayHelper.AddOptionItem("头数", "detail", "Number", false, true); mDisplayHelper.AddOptionItem("头数", "detail", "Number", false, true);
mDisplayHelper.AddOptionItem("全杂头数", "detail", "AllMixedNumber", false, true);
mDisplayHelper.AddOptionItem("重量", "detail", "Weight", false, true); mDisplayHelper.AddOptionItem("重量", "detail", "Weight", false, true);
mDisplayHelper.AddOptionItem("圈舍", "detail", "LiveColonyHouse_Name", false); mDisplayHelper.AddOptionItem("圈舍", "detail", "LiveColonyHouse_Name", false);


+ 34
- 8
B3SubstituteKill/B3SubstituteKill.csproj View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -36,45 +36,68 @@
<Reference Include="B3Frameworks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="B3Frameworks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3Frameworks.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="B3Frameworks.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.Web.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3Frameworks.Web.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3ProcurementInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL"> <Reference Include="B3ProcurementInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3ProcurementInterface.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\B3ProcurementInterface.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="B3ProduceUnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL"> <Reference Include="B3ProduceUnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath> <HintPath>..\..\..\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Core">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml.Linq">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Microsoft.CSharp">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml">
<SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="TSingSoft.WebControls2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="TSingSoft.WebControls2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\TSingSoft.WebControls2.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\TSingSoft.WebControls2.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Wpf, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="Wpf, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"> <Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.dll</HintPath> <HintPath>..\..\..\..\..\..\BwpB3Project\tsref\Debug\Wpf.System.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -84,6 +107,7 @@
<Compile Include="BL\BaseInfos\SubKillCallBack\SubKillCallBackBL.cs" /> <Compile Include="BL\BaseInfos\SubKillCallBack\SubKillCallBackBL.cs" />
<Compile Include="BL\Bills\StatPay\StatPayBL.cs" /> <Compile Include="BL\Bills\StatPay\StatPayBL.cs" />
<Compile Include="BL\Bills\SubKillButcherOrder\SubKillButcherOrderBL.cs" /> <Compile Include="BL\Bills\SubKillButcherOrder\SubKillButcherOrderBL.cs" />
<Compile Include="BL\Bills\SubKillGathering\SubKillGatheringBL.cs" />
<Compile Include="BL\Bills\SubKillPriceBill\SubKillPriceBillBL.cs" /> <Compile Include="BL\Bills\SubKillPriceBill\SubKillPriceBillBL.cs" />
<Compile Include="BL\Bills\SubKillWeightBill\WeightingInfoBL.cs" /> <Compile Include="BL\Bills\SubKillWeightBill\WeightingInfoBL.cs" />
<Compile Include="BL\Bills\SubKillWeightBill\SubKillWeightBillBL.cs" /> <Compile Include="BL\Bills\SubKillWeightBill\SubKillWeightBillBL.cs" />
@ -97,6 +121,8 @@
<Compile Include="BO\Bills\StatPay\StatPay_CostDetail.cs" /> <Compile Include="BO\Bills\StatPay\StatPay_CostDetail.cs" />
<Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder.cs" /> <Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder.cs" />
<Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder_Detail.cs" /> <Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder_Detail.cs" />
<Compile Include="BO\Bills\SubKillGathering\SubKillGathering.cs" />
<Compile Include="BO\Bills\SubKillGathering\SubKillGathering_Detail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill.cs" /> <Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CallBackDetail.cs" /> <Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CallBackDetail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CostItemDetail.cs" /> <Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CostItemDetail.cs" />


+ 81
- 0
B3SubstituteKill/BL/Bills/SubKillGathering/SubKillGatheringBL.cs View File

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BL;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3SubstituteKill.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.Utils;
using TSingSoft.WebPluginFramework;
namespace BWP.B3SubstituteKill.BL
{
[BusinessInterface(typeof(SubKillGatheringBL))]
[LogicName("代宰收款")]
public interface ISubKillGatheringBL : IDepartmentWorkFlowBillBL<SubKillGathering>
{ }
public class SubKillGatheringBL : DepartmentWorkFlowBillBL<SubKillGathering>, ISubKillGatheringBL
{
protected override void doCheck(SubKillGathering dmo)
{
// foreach (var detail in dmo.Details)
// {
// var notPayMoney = (detail.StatPay_ReceiveMoney ?? 0) - (detail.AlreadyReceiveMoney ?? 0);
// if ((detail.ThisReceiveMoney ?? 0) > notPayMoney)
// {
// throw new ApplicationException(string.Format("结算单No.{0} 本次收款金额{1}大于未收款金额{2}", detail.StatPay_ID, detail.ThisReceiveMoney, notPayMoney));
// }
// }
base.doCheck(dmo);
UpdateStatPayMoney(dmo);
}
protected override void doUnCheck(SubKillGathering dmo)
{
base.doUnCheck(dmo);
UpdateStatPayMoney(dmo);
}
private void UpdateStatPayMoney(SubKillGathering dmo)
{
var statPayIds = dmo.Details.Select(x => x.StatPay_ID).ToList();
var detail = new JoinAlias(typeof(SubKillGathering_Detail));
var bill = new JoinAlias(typeof(SubKillGathering));
var dom = new DQueryDom(detail);
dom.From.AddJoin(JoinType.Inner, new DQDmoSource(bill), DQCondition.EQ(bill, "ID", detail, "SubKillGathering_ID"));
dom.EAddCheckedCondition(bill);
dom.Where.Conditions.EFieldInList("StatPay_ID", statPayIds);
dom.Columns.Add(DQSelectColumn.Sum(detail, "ThisReceiveMoney"));
dom.Columns.Add(DQSelectColumn.Field("StatPay_ID", detail));
dom.Columns.Add(DQSelectColumn.Sum(detail, "AlreadyReceiveMoney"));
dom.GroupBy.Expressions.Add(DQExpression.Field(detail, "StatPay_ID"));
var tupleList = dom.EExecuteList<Money<>?, long, Money<>?>(Session);
foreach (var statPayId in statPayIds)
{
// var money = tupleList.Sum(x => x.Item2 == statPayId ? ((x.Item1 ?? 0).Value+(x.Item3 ?? 0).Value) : 0m);
var money = tupleList.Sum(x => x.Item2 == statPayId ? (x.Item1 ?? 0).Value : 0m);
var update = new DQUpdateDom(typeof(StatPay));
update.Columns.Add(new DQUpdateColumn("AlreadyReceiveMoney", money));
update.Columns.Add(new DQUpdateColumn("RowVersion",
DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.ConstValue(1))));
update.Where.Conditions.Add(DQCondition.EQ("ID", statPayId));
Session.ExecuteNonQuery(update);
}
}
}
}

+ 43
- 2
B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs View File

@ -8,6 +8,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO.NamedValueTemplate;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.Utils;
using TSingSoft.WebPluginFramework; using TSingSoft.WebPluginFramework;
namespace BWP.B3SubstituteKill.BL namespace BWP.B3SubstituteKill.BL
@ -37,14 +43,49 @@ namespace BWP.B3SubstituteKill.BL
protected override void doCheck(SubKillWeightBill dmo) protected override void doCheck(SubKillWeightBill dmo)
{ {
if (!new B3SubstituteKillOnlineConfig().ButcherOrderCreateStatPay) if (!new B3SubstituteKillOnlineConfig().ButcherOrderCreateStatPay)
{ }
CreateStatPay(dmo);
base.doCheck(dmo); base.doCheck(dmo);
} }
protected override void doUnCheck(SubKillWeightBill dmo) protected override void doUnCheck(SubKillWeightBill dmo)
{ {
DeleteUnCheckedStatPay(dmo);
base.doUnCheck(dmo); base.doUnCheck(dmo);
} }
private void DeleteUnCheckedStatPay(SubKillWeightBill dmo)
{
var query = new DQueryDom(new JoinAlias(typeof(StatPay)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("BillState"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("SourceBillID", dmo.ID), DQCondition.EQ("ShourceBillType", mDmoTypeID)));
var info = query.EExecuteScalar<long, NamedValue<>>(Session);
if (info == null)
return;
if (info.Item2 >= .)
throw new Exception(string.Format("结算单 No.{0}{1},不能执行此操作。", info.Item1, info.Item2));
var statPayBL = BIFactory.Create<IStatPayBL>(Session);
var statPay = statPayBL.Load(info.Item1);
statPayBL.Delete(statPay);
AppendMessage("已删除结算单No." + statPay.ID);
}
private void CreateStatPay(SubKillWeightBill dmo)
{
var statPay = new StatPay();
statPay.AccountingUnit_ID = dmo.AccountingUnit_ID;
statPay.Domain_ID = dmo.Domain_ID;
statPay.Department_ID = dmo.Department_ID;
statPay.Employee_ID = dmo.Employee_ID;
statPay.Date = dmo.Date;
statPay.Supplier_ID = dmo.Supplier_ID;
statPay.Number = dmo.Number;
statPay.Weight = dmo.Weight;
statPay.PriceBill_ID = dmo.PriceBill_ID;
statPay.SourceBillID = dmo.ID;
statPay.ShourceBillType = mDmoTypeID;
BIFactory.Create<IStatPayBL>(Session).Insert(statPay);
AppendMessage("生成代宰结算单:" + statPay.ID);
}
} }
} }

+ 3
- 0
B3SubstituteKill/BO/BaseInfos/SubKillFlag/SubKillFlag_Detail.cs View File

@ -18,6 +18,9 @@ namespace BWP.B3SubstituteKill.BO
[LogicName("标识名称")] [LogicName("标识名称")]
public string Name { get; set; } public string Name { get; set; }
[LogicName("备注")]
public string Remark { get; set; }
public string Spell { get; set; } public string Spell { get; set; }
} }


+ 20
- 4
B3SubstituteKill/BO/Bills/StatPay/StatPay.cs View File

@ -24,8 +24,8 @@ namespace BWP.B3SubstituteKill.BO
public class StatPay : DepartmentWorkFlowBill public class StatPay : DepartmentWorkFlowBill
{ {
private DateTime? date = DateTime.Now; private DateTime? date = DateTime.Now;
[LogicName("过磅时间")]
[DFExtProperty("WebControlType", DFEditControl.DateTimeInput)]
[LogicName("结算日期")]
[DFExtProperty("WebControlType", DFEditControl.DateInput)]
[DFNotEmpty] [DFNotEmpty]
public DateTime? Date public DateTime? Date
{ {
@ -63,11 +63,11 @@ namespace BWP.B3SubstituteKill.BO
[LogicName("代宰头数")] [LogicName("代宰头数")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)] [DFExtProperty("WebControlType", DFEditControl.StaticText)]
public int Number { get; set; }
public int? Number { get; set; }
[LogicName("代宰重量")] [LogicName("代宰重量")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)] [DFExtProperty("WebControlType", DFEditControl.StaticText)]
public Money<decimal> Weight { get; set; }
public Money<decimal>? Weight { get; set; }
[LogicName("价格单号")] [LogicName("价格单号")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)] [DFExtProperty("WebControlType", DFEditControl.StaticText)]
@ -77,6 +77,22 @@ namespace BWP.B3SubstituteKill.BO
[DFExtProperty("WebControlType", DFEditControl.StaticText)] [DFExtProperty("WebControlType", DFEditControl.StaticText)]
public Money<>? ReceiveMoney { get; set; } public Money<>? ReceiveMoney { get; set; }
[LogicName("已收金额")]
public Money<>? AlreadyReceiveMoney { get; set; }
//[LogicName("过磅单")]
//[DFExtProperty("WebControlType", DFEditControl.StaticText)]
//public long? Weigh_ID { get; set; }
//[LogicName("过磅时间")]
//[ReferenceTo(typeof(SubKillWeightBill), "Date")]
//[Join("Weigh_ID", "ID")]
//public DateTime? WeighTime { get; set; }
public long? SourceBillID { get; set; }
public short? ShourceBillType { get; set; }
private StatPay_CostDetailCollection _mCostDetails = new StatPay_CostDetailCollection(); private StatPay_CostDetailCollection _mCostDetails = new StatPay_CostDetailCollection();
[OneToMany(typeof(StatPay_CostDetail), "ID")] [OneToMany(typeof(StatPay_CostDetail), "ID")]
[Join("ID", "StatPay_ID")] [Join("ID", "StatPay_ID")]


+ 3
- 0
B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs View File

@ -26,6 +26,9 @@ namespace BWP.B3SubstituteKill.BO
[LogicName("单价")] [LogicName("单价")]
public Money<decimal>? Price { get; set; } public Money<decimal>? Price { get; set; }
[LogicName("头数")]
public int? Number { get; set; }
[LogicName("金额")] [LogicName("金额")]
public Money<>? Money { get; set; } public Money<>? Money { get; set; }


+ 3
- 0
B3SubstituteKill/BO/Bills/SubKillButcherOrder/SubKillButcherOrder_Detail.cs View File

@ -25,6 +25,9 @@ namespace BWP.B3SubstituteKill.BO
[LogicName("头数")] [LogicName("头数")]
public int? Number { get; set; } public int? Number { get; set; }
[LogicName("全杂头数")]
public int? AllMixedNumber { get; set; }
[LogicName("重量")] [LogicName("重量")]
public Money<decimal>? Weight { get; set; } public Money<decimal>? Weight { get; set; }


+ 72
- 0
B3SubstituteKill/BO/Bills/SubKillGathering/SubKillGathering.cs View File

@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks;
using BWP.B3Frameworks.Attributes;
using BWP.B3Frameworks.BO;
using BWP.B3ProcurementInterface.BO;
using BWP.B3ProcurementInterface.Utils;
using BWP.B3SubstituteKill.Utils;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using TSingSoft.WebControls2;
namespace BWP.B3SubstituteKill.BO
{
[DFClass, Serializable]
[LogicName("代宰收款")]
[DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SubstituteKill, B3SubstituteKillConsts.DmoTypeIDOffsets.SubKillGathering)]
[EditUrl("~/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringEdit.aspx")]
public class SubKillGathering : DepartmentWorkFlowBill
{
private DateTime? date = DateTime.Now;
[LogicName("收款日期")]
[DFExtProperty("WebControlType", DFEditControl.DateInput)]
[DFNotEmpty]
public DateTime? Date
{
get { return date; }
set { date = value; }
}
[DFDataKind(B3ProcurementInterfaceDataSources.供应商用于屠宰场)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "Supplier_Name")]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ProcurementInterfaceDataSources.供应商用于屠宰场全部)]
[DFExtProperty("WebControlType", DFEditControl.ChoiceBox)]
[DFPrompt("供应商")]
[DFNotEmpty]
public long? Supplier_ID { get; set; }
[ReferenceTo(typeof(Supplier), "Name")]
[Join("Supplier_ID", "ID")]
[DFPrompt("供应商")]
public string Supplier_Name { get; set; }
[ReferenceTo(typeof(Supplier), "Tel")]
[Join("Supplier_ID", "ID")]
[DFPrompt("联系方式")]
public string Supplier_Tel { get; set; }
[ReferenceTo(typeof(Supplier), "Card_ID")]
[Join("Supplier_ID", "ID")]
[DFPrompt("身份证号")]
public string Supplier_Card_ID { get; set; }
[ReferenceTo(typeof(Supplier), "Address")]
[Join("Supplier_ID", "ID")]
[DFPrompt("地址")]
public string Supplier_Address { get; set; }
private SubKillGathering_DetailCollection _mDetails = new SubKillGathering_DetailCollection();
[OneToMany(typeof(SubKillGathering_Detail), "ID")]
[Join("ID", "SubKillGathering_ID")]
public SubKillGathering_DetailCollection Details
{
get { return _mDetails; }
set { _mDetails = value; }
}
}
}

+ 61
- 0
B3SubstituteKill/BO/Bills/SubKillGathering/SubKillGathering_Detail.cs View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.Utils;
namespace BWP.B3SubstituteKill.BO
{
[DFClass, Serializable, LogicName("代宰收款_明细")]
public class SubKillGathering_Detail:Base
{
public long SubKillGathering_ID { get; set; }
[LogicName("结算单")]
public long? StatPay_ID { get; set; }
[LogicName("结算日期")]
[ReferenceTo(typeof(StatPay), "Date")]
[Join("StatPay_ID", "ID")]
public DateTime? StatPay_Date { get; set; }
[LogicName("过磅时间")]
[ReferenceTo(typeof(StatPay), "WeighTime")]
[Join("StatPay_ID", "ID")]
public DateTime? WeighTime { get; set; }
[LogicName("过磅单")]
[ReferenceTo(typeof(StatPay), "Weigh_ID")]
[Join("StatPay_ID", "ID")]
public long? Weigh_ID { get; set; }
[LogicName("应收金额")]
[ReferenceTo(typeof(StatPay), "ReceiveMoney")]
[Join("StatPay_ID", "ID")]
public Money<>? StatPay_ReceiveMoney { get; set; }
[LogicName("已收金额")]
public Money<>? AlreadyReceiveMoney { get; set; }
[LogicName("本次收款金额")]
public Money<>? ThisReceiveMoney { get; set; }
[LogicName("摘要")]
public string Remark { get; set; }
}
[Serializable]
public class SubKillGathering_DetailCollection : DmoCollection<SubKillGathering_Detail>
{ }
}

+ 7
- 3
B3SubstituteKill/Rpcs/SupplierRpc.cs View File

@ -20,16 +20,20 @@ namespace BWP.B3SubstituteKill.Rpcs
public static class SupplierRpc public static class SupplierRpc
{ {
[Rpc] [Rpc]
public static Supplier GetSupplierAndPriceBillID(long? supplierId, DateTime? date)
public static Supplier GetSupplierAndPriceBillID(long supplierId, string strdate)
{ {
var supplier = new Supplier(); var supplier = new Supplier();
DateTime? date=null;
if (!string.IsNullOrWhiteSpace(strdate))
{
date = Convert.ToDateTime(strdate);
}
var res = WebBLUtil.GetSingleDmo<Supplier>("ID", supplierId, "Tel", "Card_ID", "Address"); var res = WebBLUtil.GetSingleDmo<Supplier>("ID", supplierId, "Tel", "Card_ID", "Address");
if (res != null) if (res != null)
{ {
supplier = res; supplier = res;
if (date.HasValue) if (date.HasValue)
supplier.SupplierApply_ID = GetPriceBillID(supplierId.Value, date.Value);
supplier.SupplierApply_ID = GetPriceBillID(supplierId, date.Value);
} }
return supplier; return supplier;
} }


+ 1
- 0
B3SubstituteKill/Utils/B3SubstituteKillConsts.cs View File

@ -27,6 +27,7 @@ namespace BWP.B3SubstituteKill.Utils
public const byte WeightingInfo = 3; public const byte WeightingInfo = 3;
public const byte SubKillButcherOrder = 4; public const byte SubKillButcherOrder = 4;
public const byte StatPay = 5; public const byte StatPay = 5;
public const byte SubKillGathering = 6;
} }
} }
} }

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

@ -124,6 +124,21 @@
<Function index="10" name="完毕"/> <Function index="10" name="完毕"/>
<Function index="11" name="撤销完毕"/> <Function index="11" name="撤销完毕"/>
</FunctionGroup> </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="撤销完毕"/>
</FunctionGroup>
</Security> </Security>
<Menus> <Menus>
<Menu id="0001" name="/B3代宰模块/基础信息/代宰费用" roles="B3SubstituteKill.代宰费用.访问" url="B3SubstituteKill/BaseInfos/GenerationCostItem_/GenerationCostItemList.aspx"/> <Menu id="0001" name="/B3代宰模块/基础信息/代宰费用" roles="B3SubstituteKill.代宰费用.访问" url="B3SubstituteKill/BaseInfos/GenerationCostItem_/GenerationCostItemList.aspx"/>
@ -136,6 +151,7 @@
<Menu id="0008" name="/B3代宰模块/业务单据/代宰排宰" roles="B3SubstituteKill.代宰排宰.访问" url="B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.aspx"/> <Menu id="0008" name="/B3代宰模块/业务单据/代宰排宰" roles="B3SubstituteKill.代宰排宰.访问" url="B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.aspx"/>
<Menu id="0009" name="/B3代宰模块/报表分析/代宰排宰分析" roles="B3SubstituteKill.代宰排宰.数据分析" url="B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.aspx"/> <Menu id="0009" name="/B3代宰模块/报表分析/代宰排宰分析" roles="B3SubstituteKill.代宰排宰.数据分析" url="B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.aspx"/>
<Menu id="0010" name="/B3代宰模块/业务单据/代宰结算" roles="B3SubstituteKill.代宰结算.访问" url="B3SubstituteKill/Bills/StatPay_/StatPayList.aspx"/> <Menu id="0010" name="/B3代宰模块/业务单据/代宰结算" roles="B3SubstituteKill.代宰结算.访问" url="B3SubstituteKill/Bills/StatPay_/StatPayList.aspx"/>
<Menu id="0011" name="/B3代宰模块/业务单据/代宰收款" roles="B3SubstituteKill.代宰收款.访问" url="B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringList.aspx"/>
</Menus> </Menus>
<Features> <Features>


Loading…
Cancel
Save