Browse Source

需求单No.141415 增加羊付款单。

需求单No.141623结算单调整。
master
yibo 7 years ago
parent
commit
c90585c151
19 changed files with 1014 additions and 60 deletions
  1. +22
    -0
      B3SheepButcherManage.Web/B3SheepButcherManage.Web.csproj
  2. +156
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayEdit.cs
  3. +56
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayList.cs
  4. +80
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayList.xml
  5. +20
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayPrint.cs
  6. +83
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/SelectStatPayDialog.cs
  7. +76
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/SelectStatPayDialog.xml
  8. +25
    -1
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/StatPay_/StatPayEdit.cs
  9. +84
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.cs
  10. +46
    -0
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.xml
  11. +2
    -0
      B3SheepButcherManage.Web/Utils/B3SheepButcherManageChoiceBoxProvider.cs
  12. +3
    -0
      B3SheepButcherManage/B3SheepButcherManage.csproj
  13. +83
    -0
      B3SheepButcherManage/BL/Bill/PayBL/PayBL.cs
  14. +58
    -59
      B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs
  15. +111
    -0
      B3SheepButcherManage/BO/Bill/Pay/Pay.cs
  16. +58
    -0
      B3SheepButcherManage/BO/Bill/Pay/Pay_Detail.cs
  17. +1
    -0
      B3SheepButcherManage/DmoTypeIDOffsets.cs
  18. +18
    -0
      WebFolder/config/Plugins/B3SheepButcherManage.Plugin
  19. +32
    -0
      WebFolder/config/billreports/B3SheepButcherManage/PayPrint.xml

+ 22
- 0
B3SheepButcherManage.Web/B3SheepButcherManage.Web.csproj View File

@ -144,6 +144,18 @@
<Compile Include="Pages\B3SheepButcherManage\Bills\HurryButcher_\SelectHurryButcherDetailDialog.cs"> <Compile Include="Pages\B3SheepButcherManage\Bills\HurryButcher_\SelectHurryButcherDetailDialog.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Pages\B3SheepButcherManage\Bills\Pay_\PayPrint.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SheepButcherManage\Bills\Pay_\PayList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SheepButcherManage\Bills\Pay_\PayEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SheepButcherManage\Bills\Pay_\SelectStatPayDialog.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SheepButcherManage\Bills\StatPay_\SelectButcherDetailDialog.cs"> <Compile Include="Pages\B3SheepButcherManage\Bills\StatPay_\SelectButcherDetailDialog.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
@ -177,6 +189,9 @@
<Compile Include="Pages\B3SheepButcherManage\Reports\HurryButcherAnalyse_\HurryButcherAnalyse.cs"> <Compile Include="Pages\B3SheepButcherManage\Reports\HurryButcherAnalyse_\HurryButcherAnalyse.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Pages\B3SheepButcherManage\Reports\PayAnalyse_\PayAnalyse.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SheepButcherManage\Reports\StatPayAnalyse_\StatPayAnalyse.cs"> <Compile Include="Pages\B3SheepButcherManage\Reports\StatPayAnalyse_\StatPayAnalyse.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
@ -235,6 +250,13 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Pages\B3SheepButcherManage\Reports\HurryButcherAnalyse_\HurryButcherAnalyse.xml" /> <EmbeddedResource Include="Pages\B3SheepButcherManage\Reports\HurryButcherAnalyse_\HurryButcherAnalyse.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SheepButcherManage\Bills\Pay_\PayList.xml" />
<EmbeddedResource Include="Pages\B3SheepButcherManage\Bills\Pay_\SelectStatPayDialog.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SheepButcherManage\Reports\PayAnalyse_\PayAnalyse.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.


+ 156
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayEdit.cs View File

@ -0,0 +1,156 @@
using BWP.B3SheepButcherManage.BL.Bill.PayBL;
using BWP.B3SheepButcherManage.BO;
using BWP.Web.CustomPageLayout;
using BWP.Web.Layout;
using BWP.Web.WebControls;
using Forks.EnterpriseServices.DataForm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using TSingSoft.WebControls2;
using Forks.Utils.Collections;
using BWP.Web.Utils;
namespace BWP.Web.Pages.B3SheepButcherManage.Bills.Pay_
{
class PayEdit : DepartmentWorkFlowBillEditPage<Pay, IPayBL>
{
private DFEditGrid _detailGrid;
//private DFEditGrid _advanceDetailGrid;
protected override void BuildBody(Control control)
{
base.BuildBody(control);
AddDetails(control.EAdd(new TitlePanel("付款明细", "付款明细")));
}
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection)
{
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer);
var config = new AutoLayoutConfig();
layoutManager.Config = config;
config.Add("AccountingUnit_ID");
config.Add("Supplier_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
config.Add("Date");
config.Add("Account_ID");
config.Add("Account_BankAccountNumber");
config.Add("PaySupplier_ID");
config.Add("PaySupplier_AccountNo");
config.Add("Remark");
pageLayoutSection.SetRequired("AccountingUnit_ID", "Department_ID");
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout());
if (layoutManager.Contains("PaySupplier_ID"))
{
var paySupplierInput = layoutManager["PaySupplier_ID"].InputControl as DFChoiceBox;
if (paySupplierInput != null)
{
var script = @"
var txtValue =parseInt(__DFContainer.getValue('PaySupplier_ID'));
simpleRestCall('/MainSystem/B3CowButcherManage/Rpcs/SupplierRpc/GetBySupplierID',[txtValue,['AccountNo']],
function(result){
if(typeof(result.AccountNo)!='undefined')
{
__DFContainer.setValue('PaySupplier_AccountNo',result.AccountNo);
}
else
{
__DFContainer.setValue('PaySupplier_AccountNo','');
}
},{ });";
paySupplierInput.OnClientSelected = script;
}
}
}
private void AddDetails(TitlePanel titlePanel)
{
var vPanel = titlePanel.EAdd(new VLayoutPanel());
AddToolsBar(vPanel);
var editor = new DFCollectionEditor<Pay_Detail>(() => Dmo.Details);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => CanSave;
_detailGrid = new DFEditGrid(editor);
_detailGrid.DFGridSetEnabled = false;
_detailGrid.Width = Unit.Percentage(100);
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_ID"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_Date"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Weigh_ID"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("WeighTime"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_Money"));
// _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("PaidMoney"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("AlreadyPaidMoney"));
_detailGrid.Columns.EAdd(new DFEditGridColumn("Money")).SumMode = SumMode.Sum;//本次
_detailGrid.Columns.Add(new DFEditGridColumn("Remark"));
mDFContainer.AddNonDFControl(_detailGrid, "$detailGrid");
var section = mPageLayoutManager.AddSection("DetaiColumns", "明细列");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_detailGrid, mPageLayoutManager, DFInfo.Get(typeof(Pay_Detail)));
vPanel.Add(_detailGrid);
}
private void AddToolsBar(VLayoutPanel vPanel)
{
if (!CanSave)
return;
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
{
_detailGrid.GetFromUI();
var details = DialogUtil.GetCachedObj<Pay_Detail>(this);
foreach (Pay_Detail detail in details)
{
if (Dmo.Details.Any(x => x.StatPay_ID == detail.StatPay_ID))
continue;
Dmo.Details.Add(detail);
}
_detailGrid.DataBind();
};
}
public override void AppToUI()
{
base.AppToUI();
_detailGrid.DataBind();
// mDFContainer.MakeReadonly("PaySupplier_AccountNo",true);
}
public override void GetFromUI()
{
base.GetFromUI();
_detailGrid.GetFromUI();
}
}
}

+ 56
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayList.cs View File

@ -0,0 +1,56 @@
using BWP.B3SheepButcherManage.BL.Bill.PayBL;
using BWP.B3SheepButcherManage.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SheepButcherManage.Bills.Pay_
{
class PayList : DomainBillListPage<Pay, IPayBL>
{
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "ID")
{
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
}
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "Supplier_Name");
AddDFBrowseGridColumn(grid, "Account_Name");
AddDFBrowseGridColumn(grid, "PaySupplier_Name");
AddDFBrowseGridColumn(grid, "PaySupplier_AccountNo");
}
}
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
{
config.AddAfter("Account_ID", "BillState");
config.AddAfter("Supplier_ID", "BillState");
config.AddAfter("Employee_ID", "BillState");
config.AddAfter("Department_ID", "BillState");
config.AddAfter("AccountingUnit_ID", "BillState");
config.AddAfter("Date", "BillState");
config.AddAfter("PaySupplier_ID", "BillState");
}));
}
protected override void InitToolBar(HLayoutPanel toolbar)
{
base.InitToolBar(toolbar);
if (!CheckDefaultRole("数据分析", true))
return;
var button = new TSButton("数据分析") { UseSubmitBehavior = false };
button.OnClientClick = "preventEventDefault(event);OpenUrlInTopTab('B3SheepButcherManage/Reports/PayAnalyse.aspx','数据分析');";
toolbar.Add(button);
}
}
}

+ 80
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayList.xml View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3SheepButcherManage.BO.Pay, B3SheepButcherManage"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID"/>
<QBE paramName="Supplier_ID"/>
</EQ>
<EQ>
<Field name="Account_ID"/>
<QBE paramName="Account_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="PaySupplier_ID"/>
<QBE paramName="PaySupplier_ID"/>
</EQ>
<EQ>
<Field name="Employee_ID"/>
<QBE paramName="Employee_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>

+ 20
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayPrint.cs View File

@ -0,0 +1,20 @@
using BWP.B3SheepButcherManage.BL.Bill.PayBL;
using BWP.B3SheepButcherManage.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.Web.Pages.B3SheepButcherManage.Bills.Pay_
{
class PayPrint : DomainTemplatePrintPage<Pay, IPayBL>
{
protected override void AddParameters(IDictionary<string, object> dic)
{
dic.Add("$ID", Dmo.ID);
dic.Add("$Details", Dmo.Details);
dic.Add("$DetailType", typeof(Pay_Detail));
}
}
}

+ 83
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/SelectStatPayDialog.cs View File

@ -0,0 +1,83 @@
using BWP.B3Frameworks.BO.NamedValueTemplate;
using BWP.B3SheepButcherManage.BO;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
using Forks.Utils.Collections;
using Forks.Utils;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3Frameworks;
using BWP.Web.Utils;
namespace BWP.Web.Pages.B3SheepButcherManage.Bills.Pay_
{
class SelectStatPayDialog : DmoMultiSelectDialog<StatPay, Pay_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 DQueryDom GetQueryDom()
{
var query = mQueryContainer.Build();
query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", _supplierID));
query.Where.Conditions.Add(DQCondition.Or(DQCondition.EQ("BillState", .), DQCondition.EQ("BillState", .)));
query.Where.Conditions.Add(DQCondition.GreaterThan(DQExpression.Field("Money"), DQExpression.IfNull(DQExpression.Field("PaidMoney"), DQExpression.ConstValue(0))));
query.Where.Conditions.Add(DQCondition.EQ("Domain_ID", DomainContext.Current.ID));
return query;
}
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("WeightBill_ID"));
grid.Columns.Add(new DFBrowseGridColumn("WeighTime"));
grid.Columns.Add(new DFBrowseGridColumn("ActualMoney"));
grid.Columns.Add(new DFBrowseGridColumn("PaidMoney"));
grid.Columns.Add(new DFBrowseGridColumn("Remark"));
}
protected override void SetResultFromDFDataRow(Pay_Detail dmo, Forks.EnterpriseServices.DataForm.DFDataRow row)
{
dmo.StatPay_ID = (long?)row["ID"];
dmo.Weigh_ID = (long?)row["WeightBill_ID"];
dmo.WeighTime = (DateTime?)row["WeighTime"];
dmo.StatPay_Date = (DateTime?)row["Date"];
dmo.StatPay_Money = (Money<>?)row["ActualMoney"];
// dmo.PaidMoney = (Money<金额>?)row["PaidMoney"];
// dmo.Money = (dmo.StatPay_Money ?? 0) - (dmo.PaidMoney ?? 0);
dmo.AlreadyPaidMoney = (Money<>?)row["PaidMoney"];
dmo.Money = (dmo.StatPay_Money ?? 0) - (dmo.AlreadyPaidMoney ?? 0);
}
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["WeightBill_ID"]), "WeightBill_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);
}
}
}

+ 76
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/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.B3SheepButcherManage.BO.StatPay, B3SheepButcherManage"/>
</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="WeightBill_ID"/>
<QBE paramName="WeightBill_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>

+ 25
- 1
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/StatPay_/StatPayEdit.cs View File

@ -99,7 +99,8 @@ namespace BWP.Web.Pages.B3SheepButcherManage.Bills.StatPay_
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection) protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection)
{ {
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); var layoutManager = new LayoutManager("", mDFInfo, mDFContainer);
layoutManager.Add("WeightBill_ID", InputCreator.DFChoiceBox(B3SheepButcherManageConsts.DataSources., "WeightBill_ID"));
var wb=layoutManager.Add("WeightBill_ID", InputCreator.DFChoiceBox(B3SheepButcherManageConsts.DataSources., "WeightBill_ID"));
wb.OnBeforeDrop = "this.codeArgument=__DFContainer.getValue('Supplier_ID');";
layoutManager.Add("ActualPrice", CreateActualPrice()); layoutManager.Add("ActualPrice", CreateActualPrice());
var config = new AutoLayoutConfig(); var config = new AutoLayoutConfig();
layoutManager.Config = config; layoutManager.Config = config;
@ -125,6 +126,29 @@ namespace BWP.Web.Pages.B3SheepButcherManage.Bills.StatPay_
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout()); titlePanel.Controls.Add(layoutManager.CreateLayout());
if (layoutManager.Contains("Supplier_ID"))
{
var paySupplierInput = layoutManager["Supplier_ID"].InputControl as DFChoiceBox;
if (paySupplierInput != null)
{
var script = @"
var txtValue =parseInt(__DFContainer.getValue('Supplier_ID'));
simpleRestCall('/MainSystem/B3CowButcherManage/Rpcs/SupplierRpc/GetBySupplierID',[txtValue,['Employee_ID','Employee_Name']],
function(result){
if(typeof(result.Employee_ID)!='undefined')
{
__DFContainer.getControl('Employee_ID').fill(result.Employee_ID,result.Employee_Name);
}
else
{
__DFContainer.getControl('Employee_ID').fill('','');
}
},{ });";
paySupplierInput.OnClientSelected = script;
}
}
} }
Panel CreateActualPrice() Panel CreateActualPrice()


+ 84
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.cs View File

@ -0,0 +1,84 @@
using BWP.B3CowButcherManage;
using BWP.B3Frameworks;
using BWP.B3SheepButcherManage.BO;
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.B3SheepButcherManage.Reports.PayAnalyse_
{
class PayAnalyse : DFBrowseGridReportPage<Pay>
{
protected override string Caption
{
get { return "付款单分析"; }
}
protected override string QueryOptionsTabName
{
get
{
return "显示字段";
}
}
protected override string AccessRoleName
{
get { return "B3SheepButcherManage.付款单.数据分析"; }
}
protected override void AddQueryControls(VLayoutPanel vPanel)//查询条件
{
var layout = new LayoutManager("Main", mDFInfo, mQueryContainer);
layout.Add("AccountingUnit_ID", new SimpleLabel("会计单位"), QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.));
layout.Add("Supplier_ID", new SimpleLabel("供应商"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3CowButcherManageConsts.DataSources.));
layout.Add("Money");
layout.Add("Date", new SimpleLabel("付款日期"), QueryCreator.TimeRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate"));
layout["Date"].NotAutoAddToContainer = true;
var config = new AutoLayoutConfig { Cols = 2 };
config.Add("ID");
config.Add("AccountingUnit_ID");
config.Add("Supplier_ID");
config.Add("Money");
config.Add("Date");
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", "Supplier_Name", false);
mDisplayHelper.AddOptionItem("付款日期", "bill", "Date", false);
mDisplayHelper.AddOptionItem("付款金额", "bill", "Money", false, true);
AddQueryOption("选项", mDisplayHelper.GetAllDisplayNames(), mDisplayHelper.GetDefaultSelelectedDisplayNames());
base.AddQueryOptions(vPanel);
}
protected override DQueryDom GetQueryDom()
{
var dom = base.GetQueryDom();
//dom.Columns.Add(DQSelectColumn.Field("Supplier_ID"));
//dom.Columns.Add(DQSelectColumn.Field("Supplier_Name"));
var bill = dom.From.RootSource.Alias;
mDisplayHelper.AddAlias("bill", JoinAlias.Create("bill"));
//mDisplayHelper.AddAlias("bill", JoinAlias.Create("supplier"));
mDisplayHelper.AddSelectColumns(dom, (name) => OptionIsSelected("选项", name), SumColumnIndexs);
return dom;
}
}
}

+ 46
- 0
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.xml View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
</Columns>
<From>
<DmoClass class="BWP.B3SheepButcherManage.BO.Pay, B3SheepButcherManage" alias="bill"/>
<!--<DmoClass class="BWP.B3ProcurementInterface.BO.Supplier, B3ProcurementInterface" alias="supplier"/>
<Condition>
<EQ>
<Field name="Supplier_ID" alias="bill"/>
<Field name="ID" alias="supplier"/>
</EQ>
</Condition>-->
</From>
<Where>
<And>
<EQ>
<Field name="ID" alias="bill"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID" alias="bill"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Money" alias="bill"/>
<QBE paramName="Money"/>
</EQ>
<EQ>
<Field name="Supplier_ID" alias="bill"/>
<QBE paramName="Supplier_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>

+ 2
- 0
B3SheepButcherManage.Web/Utils/B3SheepButcherManageChoiceBoxProvider.cs View File

@ -59,6 +59,8 @@ namespace BWP.Web.Utils
{ {
dom.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", long.Parse(argu.CodeArgument))); dom.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", long.Parse(argu.CodeArgument)));
} }
if (!string.IsNullOrEmpty(argu.InputArgument))
dom.Where.Conditions.Add(DQCondition.Like("ID", argu.InputArgument));
OrganizationUtil.AddOrganizationLimit(dom, typeof(WeightBill)); OrganizationUtil.AddOrganizationLimit(dom, typeof(WeightBill));
dom.Where.Conditions.Add(DQCondition.EQ("Domain_ID", DomainContext.Current.ID)); dom.Where.Conditions.Add(DQCondition.EQ("Domain_ID", DomainContext.Current.ID));
return Query(dom); return Query(dom);


+ 3
- 0
B3SheepButcherManage/B3SheepButcherManage.csproj View File

@ -91,6 +91,7 @@
<Compile Include="BL\Bill\ButcherBL\ButcherBL.cs" /> <Compile Include="BL\Bill\ButcherBL\ButcherBL.cs" />
<Compile Include="BL\Bill\FixedPriceBL\FixedPriceBL.cs" /> <Compile Include="BL\Bill\FixedPriceBL\FixedPriceBL.cs" />
<Compile Include="BL\Bill\HurryButcherBL\HurryButcherBL.cs" /> <Compile Include="BL\Bill\HurryButcherBL\HurryButcherBL.cs" />
<Compile Include="BL\Bill\PayBL\PayBL.cs" />
<Compile Include="BL\Bill\StatPayBL\StatPayBL.cs" /> <Compile Include="BL\Bill\StatPayBL\StatPayBL.cs" />
<Compile Include="BL\Bill\WeightBillBL\WeightBillBL.cs" /> <Compile Include="BL\Bill\WeightBillBL\WeightBillBL.cs" />
<Compile Include="BO\BaseInfo\Livestock.cs" /> <Compile Include="BO\BaseInfo\Livestock.cs" />
@ -100,6 +101,8 @@
<Compile Include="BO\Bill\FixedPrice\FixedPrice_Detail.cs" /> <Compile Include="BO\Bill\FixedPrice\FixedPrice_Detail.cs" />
<Compile Include="BO\Bill\HurryButcher\HurryButcher.cs" /> <Compile Include="BO\Bill\HurryButcher\HurryButcher.cs" />
<Compile Include="BO\Bill\HurryButcher\HurryButcher_Detail.cs" /> <Compile Include="BO\Bill\HurryButcher\HurryButcher_Detail.cs" />
<Compile Include="BO\Bill\Pay\Pay.cs" />
<Compile Include="BO\Bill\Pay\Pay_Detail.cs" />
<Compile Include="BO\Bill\StatPay\IStatDetail.cs" /> <Compile Include="BO\Bill\StatPay\IStatDetail.cs" />
<Compile Include="BO\Bill\StatPay\StatPay.cs" /> <Compile Include="BO\Bill\StatPay\StatPay.cs" />
<Compile Include="BO\Bill\StatPay\StatPay_Butcher.cs" /> <Compile Include="BO\Bill\StatPay\StatPay_Butcher.cs" />


+ 83
- 0
B3SheepButcherManage/BL/Bill/PayBL/PayBL.cs View File

@ -0,0 +1,83 @@
using BWP.B3Frameworks.BL;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3Frameworks.BO.NamedValueTemplate;
using BWP.B3SheepButcherManage.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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebPluginFramework;
namespace BWP.B3SheepButcherManage.BL.Bill.PayBL
{
[BusinessInterface(typeof(PayBL))]
[LogicName("羊付款单")]
public interface IPayBL : IDepartmentWorkFlowBillBL<Pay>
{ }
public class PayBL : DepartmentWorkFlowBillBL<Pay>, IPayBL
{
protected override void doCheck(Pay dmo)
{
foreach (var detail in dmo.Details)
{
var notPayMoney = (detail.StatPay_Money ?? 0) - (detail.AlreadyPaidMoney ?? 0);
if ((detail.Money ?? 0) > notPayMoney)
{
throw new ApplicationException(string.Format("结算单No.{0} 本次付款金额{1}大于未付款金额{2}", detail.StatPay_ID, detail.Money, notPayMoney));
}
else
{
detail.AlreadyPaidMoney = detail.AlreadyPaidMoney + detail.Money;
}
}
base.doCheck(dmo);
UpdateStatPayMoney(dmo);
}
protected override void doUnCheck(Pay dmo)
{
base.doUnCheck(dmo);
UpdateStatPayMoney(dmo);
}
private void UpdateStatPayMoney(Pay dmo)
{
var statPayIds = dmo.Details.Select(x => x.StatPay_ID).ToList();
var detail = new JoinAlias(typeof(Pay_Detail));
var bill = new JoinAlias(typeof(Pay));
var dom = new DQueryDom(detail);
dom.From.AddJoin(JoinType.Inner, new DQDmoSource(bill), DQCondition.EQ(bill, "ID", detail, "Pay_ID"));
dom.Where.Conditions.Add(DQCondition.Or(DQCondition.EQ(bill, "BillState", .), DQCondition.EQ(bill, "BillState", .)));
dom.Where.Conditions.EFieldInList("StatPay_ID", statPayIds);
dom.Columns.Add(DQSelectColumn.Sum(detail, "Money"));
dom.Columns.Add(DQSelectColumn.Field("StatPay_ID", detail));
dom.Columns.Add(DQSelectColumn.Sum(detail, "AlreadyPaidMoney"));
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 update = new DQUpdateDom(typeof(StatPay));
update.Columns.Add(new DQUpdateColumn("PaidMoney", 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);
}
}
}
}

+ 58
- 59
B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs View File

@ -453,69 +453,68 @@ namespace BWP.B3SheepButcherManage.BL
public void CancelAllHurryButchers(long statPayID) public void CancelAllHurryButchers(long statPayID)
{ {
//CancelAllDetails<HurryButcher_Detail>(statPayID);
CancelAllDetails<HurryButcher_Detail>(statPayID);
} }
public void AddHurryButchers(StatPay dmo) public void AddHurryButchers(StatPay dmo)
{ {
return;
//var detailAlias = new JoinAlias(typeof(HurryButcher_Detail));
//var billAlias = new JoinAlias(typeof(HurryButcher));
//var dom = new DQueryDom(detailAlias);
//dom.From.AddJoin(JoinType.Inner, new DQDmoSource(billAlias), DQCondition.EQ(billAlias, "ID", detailAlias, "HurryButcher_ID"));
//dom.Where.Conditions.Add(DQCondition.EQ(detailAlias, "StatPay_ID", dmo.ID));
//dom.Columns.Add(DQSelectColumn.Field("HurryButcher_ID"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("HurryButcher_ID"));
//dom.Columns.Add(DQSelectColumn.Field("Livestock_ID"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("Livestock_ID"));
//dom.Columns.Add(DQSelectColumn.Field("Livestock_Name"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("Livestock_Name"));
//dom.Columns.Add(DQSelectColumn.Sum("Weight"));
//dom.Columns.Add(DQSelectColumn.Sum("Number"));
//dom.Columns.Add(DQSelectColumn.Field("Remark"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("Remark"));
//dom.Columns.Add(DQSelectColumn.Sum("GrossWeight"));
//dom.Columns.Add(DQSelectColumn.Field("LiveVarieties_ID"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("LiveVarieties_ID"));
//dom.Columns.Add(DQSelectColumn.Field("LiveVarieties_Name"));
//dom.GroupBy.Expressions.Add(DQExpression.Field("LiveVarieties_Name"));
//using (var reader = Session.ExecuteReader(dom))
//{
// dmo.HurryButcherDetails.Clear();
// while (reader.Read())
// {
// var detail = new StatPay_HurryButcher();
// detail.HurryButcher_ID = (long?)reader[0];
// detail.Livestock_ID = (long?)reader[1];
// detail.Livestock_Name = (string)reader[2];
// detail.Weight = (Money<decimal>?)reader[3];
// detail.Number = (int?)reader[4];
// detail.Remark = (string)reader[5];
// detail.PriceWeight = detail.Weight;
// detail.GrossWeight = (Money<decimal>?)reader[6];
// detail.LiveVarieties_ID = (long?)reader[7];
// detail.LiveVarieties_Name = (string)reader[8];
// dmo.HurryButcherDetails.Add(detail);
// }
//}
//SetPrice(dmo, dmo.HurryButcherDetails);
//foreach (var detail in dmo.HurryButcherDetails)
//{
// detail.Money = detail.Price * detail.Weight;
//}
//ResetAcquisitionInfo(dmo);
var detailAlias = new JoinAlias(typeof(HurryButcher_Detail));
var billAlias = new JoinAlias(typeof(HurryButcher));
var dom = new DQueryDom(detailAlias);
dom.From.AddJoin(JoinType.Inner, new DQDmoSource(billAlias), DQCondition.EQ(billAlias, "ID", detailAlias, "HurryButcher_ID"));
dom.Where.Conditions.Add(DQCondition.EQ(detailAlias, "StatPay_ID", dmo.ID));
dom.Columns.Add(DQSelectColumn.Field("HurryButcher_ID"));
dom.GroupBy.Expressions.Add(DQExpression.Field("HurryButcher_ID"));
dom.Columns.Add(DQSelectColumn.Field("Livestock_ID"));
dom.GroupBy.Expressions.Add(DQExpression.Field("Livestock_ID"));
dom.Columns.Add(DQSelectColumn.Field("Livestock_Name"));
dom.GroupBy.Expressions.Add(DQExpression.Field("Livestock_Name"));
dom.Columns.Add(DQSelectColumn.Sum("Weight"));
dom.Columns.Add(DQSelectColumn.Sum("Number"));
dom.Columns.Add(DQSelectColumn.Field("Remark"));
dom.GroupBy.Expressions.Add(DQExpression.Field("Remark"));
dom.Columns.Add(DQSelectColumn.Sum("GrossWeight"));
dom.Columns.Add(DQSelectColumn.Field("LiveVarieties_ID"));
dom.GroupBy.Expressions.Add(DQExpression.Field("LiveVarieties_ID"));
dom.Columns.Add(DQSelectColumn.Field("LiveVarieties_Name"));
dom.GroupBy.Expressions.Add(DQExpression.Field("LiveVarieties_Name"));
using (var reader = Session.ExecuteReader(dom))
{
dmo.HurryButcherDetails.Clear();
while (reader.Read())
{
var detail = new StatPay_HurryButcher();
detail.HurryButcher_ID = (long?)reader[0];
detail.Livestock_ID = (long?)reader[1];
detail.Livestock_Name = (string)reader[2];
detail.Weight = (Money<decimal>?)reader[3];
detail.Number = (int?)reader[4];
detail.Remark = (string)reader[5];
detail.PriceWeight = detail.Weight;
detail.GrossWeight = (Money<decimal>?)reader[6];
detail.LiveVarieties_ID = (long?)reader[7];
detail.LiveVarieties_Name = (string)reader[8];
dmo.HurryButcherDetails.Add(detail);
}
}
SetPrice(dmo, dmo.HurryButcherDetails);
foreach (var detail in dmo.HurryButcherDetails)
{
detail.Money = detail.Price * detail.Weight;
}
ResetAcquisitionInfo(dmo);
} }
public void AddOtherReward(StatPay dmo) public void AddOtherReward(StatPay dmo)


+ 111
- 0
B3SheepButcherManage/BO/Bill/Pay/Pay.cs View File

@ -0,0 +1,111 @@
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3ProcurementInterface.BO;
using BWP.B3ProcurementInterface.Utils;
using BWP.B3UnitedInfos;
using BWP.B3UnitedInfos.BO;
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.B3SheepButcherManage.BO
{
[Serializable]
[DFClass]
[LogicName("羊付款单")]
[BillAccountTarget(typeof(Supplier))]
[DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SheepButcherManage, B3SheepButcherManageConsts.DmoTypeIDOffsets.Pay)]
public class Pay : DepartmentWorkFlowBill
{
[LogicName("供应商")]
[DFDataKind(B3ProcurementInterfaceDataSources.供应商)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "Supplier_Name")]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ProcurementInterfaceDataSources.供应商全部)]
public long? Supplier_ID { get; set; }
private DateTime? mDate = DateTime.Today;
[LogicName("付款日期")]
public DateTime? Date
{
get { return mDate; }
set { mDate = value; }
}
[LogicName("付款账户")]
[DFDataKind(B3UnitedInfosConsts.DataSources.账户)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "Account_Name")]
public long? Account_ID { get; set; }
[LogicName("付款金额")]
public Money<>? Money { get; set; }
[LogicName("付款对象")]
[DFDataKind(B3ProcurementInterfaceDataSources.供应商)]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "PaySupplier_Name")]
[DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ProcurementInterfaceDataSources.供应商全部)]
public long? PaySupplier_ID { get; set; }
[LogicName("付款对象")]
[ReferenceTo(typeof(Supplier), "Name")]
[Join("PaySupplier_ID", "ID")]
public string PaySupplier_Name { get; set; }
[LogicName("支付账户")]
[ReferenceTo(typeof(Supplier), "AccountNo")]
[Join("PaySupplier_ID", "ID")]
public string PaySupplier_AccountNo { get; set; }
private Pay_DetailCollection mDetails = new Pay_DetailCollection();
[OneToMany(typeof(Pay_Detail), "ID")]
[Join("ID", "Pay_ID")]
public Pay_DetailCollection Details
{
get
{
return mDetails;
}
}
#region ReferenceTo
[LogicName("供应商")]
[ReferenceTo(typeof(Supplier), "Name")]
[Join("Supplier_ID", "ID")]
public string Supplier_Name { get; set; }
[LogicName("付款账户")]
[ReferenceTo(typeof(Account), "Name")]
[Join("Account_ID", "ID")]
public string Account_Name { get; set; }
[ReferenceTo(typeof(Account), "BankAccountNumber")]
[Join("Account_ID", "ID")]
[DFPrompt("银行账号")]
public string Account_BankAccountNumber { get; set; }
#endregion
public IList<BaseDetailAccountInfo> CreateBillAccount()
{
var list = new List<BaseDetailAccountInfo>();
var target = new BaseDetailAccountInfo();
var dateTime = Date;
if (dateTime != null)
target.Date = dateTime.Value.Date;
//target.Money = Money ?? 0;
target.TargetID = Supplier_ID ?? 0;
target.TargetTypeID = DmoTypeIDAttribute.GetID(typeof(Supplier));
list.Add(target);
return list;
}
}
}

+ 58
- 0
B3SheepButcherManage/BO/Bill/Pay/Pay_Detail.cs View File

@ -0,0 +1,58 @@
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataDictionary;
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.B3SheepButcherManage.BO
{
[LogicName("付款明细")]
[DFClass, Serializable]
public class Pay_Detail : Base
{
[LogicName("付款单号"), DbColumn(Index = IndexType.Normal)]
public long Pay_ID { get; set; }
[LogicName("结算单")]
public long? StatPay_ID { get; set; }
[LogicName("备注")]
public string Remark { get; set; }
[LogicName("本次付款金额")]
public Money<>? Money { 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), "WeightBill_ID")]
[Join("StatPay_ID", "ID")]
public long? Weigh_ID { get; set; }
[LogicName("应付金额")]
[ReferenceTo(typeof(StatPay), "ActualMoney")]
[Join("StatPay_ID", "ID")]
public Money<>? StatPay_Money { get; set; }
[LogicName("已付金额")]
public Money<>? AlreadyPaidMoney { get; set; }
}
[Serializable]
public class Pay_DetailCollection : DmoCollection<Pay_Detail>
{ }
}

+ 1
- 0
B3SheepButcherManage/DmoTypeIDOffsets.cs View File

@ -16,6 +16,7 @@ namespace BWP.B3SheepButcherManage
public const byte Butcher = 5; public const byte Butcher = 5;
public const byte StatPay = 6; public const byte StatPay = 6;
public const byte HurryButcher = 7; public const byte HurryButcher = 7;
public const byte Pay = 8;
} }
public static class DataSources public static class DataSources


+ 18
- 0
WebFolder/config/Plugins/B3SheepButcherManage.Plugin View File

@ -116,6 +116,22 @@
<Function index="11" name="撤销完毕"/> <Function index="11" name="撤销完毕"/>
<Function index="12" name="打印"/> <Function index="12" name="打印"/>
</FunctionGroup> </FunctionGroup>
<FunctionGroup name="羊付款单" roleSchemas="employee" features="B3SheepButcherManage.0005">
<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="打印"/>
<Function index="13" name="数据分析"/>
</FunctionGroup>
<!--<FunctionGroup name="报表" roleSchemas="employee"> <!--<FunctionGroup name="报表" roleSchemas="employee">
<Function index="0" name="过磅单分析" /> <Function index="0" name="过磅单分析" />
</FunctionGroup>--> </FunctionGroup>-->
@ -128,12 +144,14 @@
<Menu id="0005" features="B3SheepButcherManage.0003" name="/B3羊屠宰场管理/业务单据/羊屠宰单" roles="B3SheepButcherManage.羊屠宰单.访问" url="B3SheepButcherManage/Bills/Butcher_/ButcherList.aspx"/> <Menu id="0005" features="B3SheepButcherManage.0003" name="/B3羊屠宰场管理/业务单据/羊屠宰单" roles="B3SheepButcherManage.羊屠宰单.访问" url="B3SheepButcherManage/Bills/Butcher_/ButcherList.aspx"/>
<Menu id="0006" features="B3SheepButcherManage.0004" name="/B3羊屠宰场管理/业务单据/羊结算单" roles="B3SheepButcherManage.羊结算单.访问" url="B3SheepButcherManage/Bills/StatPay_/StatPayList.aspx"/> <Menu id="0006" features="B3SheepButcherManage.0004" name="/B3羊屠宰场管理/业务单据/羊结算单" roles="B3SheepButcherManage.羊结算单.访问" url="B3SheepButcherManage/Bills/StatPay_/StatPayList.aspx"/>
<Menu id="0007" name="/B3羊屠宰场管理/业务单据/羊急宰单" roles="B3SheepButcherManage.羊急宰单.访问" url="B3SheepButcherManage/Bills/HurryButcher_/HurryButcherList.aspx"/> <Menu id="0007" name="/B3羊屠宰场管理/业务单据/羊急宰单" roles="B3SheepButcherManage.羊急宰单.访问" url="B3SheepButcherManage/Bills/HurryButcher_/HurryButcherList.aspx"/>
<Menu id="0008" features="B3SheepButcherManage.0005" name="/B3羊屠宰场管理/业务单据/羊付款单" roles="B3SheepButcherManage.羊付款单.访问" url="B3SheepButcherManage/Bills/Pay_/PayList.aspx"/>
</Menus> </Menus>
<Features> <Features>
<Feature id="0001" name="羊过磅单"/> <Feature id="0001" name="羊过磅单"/>
<Feature id="0003" name="羊屠宰单"/> <Feature id="0003" name="羊屠宰单"/>
<Feature id="0004" name="羊结算单"/> <Feature id="0004" name="羊结算单"/>
<Feature id="0005" name="羊付款单"/>
</Features> </Features>
</Plugin> </Plugin>


+ 32
- 0
WebFolder/config/billreports/B3SheepButcherManage/PayPrint.xml View File

@ -0,0 +1,32 @@
<?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="Department_Name" lblWidth="4"/>
<Field name="Employee_Name" lblWidth="4"/>
<Field name="Store_Name" lblWidth="4"/>
<Field name="Date" lblWidth="4"/>
<Field name="Remark" lblWidth="4"/>
</DFInfoBand>
<HtmlBand>
<![CDATA[<h2>付款明细</h2>]]>
</HtmlBand>
<DFListBand collection="$Details" itemType="$DetailType" enablePaging="true" >
<Field name="StatPay_ID"/>
<Field name="StatPay_Date"/>
<Field name="Weigh_ID" />
<Field name="WeighTime" />
<Field name="StatPay_Money" sum="true"/>
<Field name="AlreadyPaidMoney" sum="true"/>
<Field name="Money" sum="true"/>
<Field name="Remark"/>
</DFListBand>
</Bands>
</BillReport>
</Report>
</BillReports>

Loading…
Cancel
Save