Browse Source

需求单No.138386 新增【代宰排宰】业务单据。支持:打印、数据分析。

master
yibo 8 years ago
parent
commit
7cc56460ac
15 changed files with 778 additions and 1 deletions
  1. +18
    -1
      B3SubstituteKill.Web/B3SubstituteKill.Web.csproj
  2. +178
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderEdit.cs
  3. +50
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.cs
  4. +72
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.xml
  5. +19
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderPrint.cs
  6. +116
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.cs
  7. +62
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.xml
  8. +29
    -0
      B3SubstituteKill.Web/Utils/B3SubstituteDataProvider.cs
  9. +3
    -0
      B3SubstituteKill/B3SubstituteKill.csproj
  10. +31
    -0
      B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs
  11. +84
    -0
      B3SubstituteKill/BO/Bills/SubKillButcherOrder/SubKillButcherOrder.cs
  12. +56
    -0
      B3SubstituteKill/BO/Bills/SubKillButcherOrder/SubKillButcherOrder_Detail.cs
  13. +3
    -0
      B3SubstituteKill/Utils/B3SubstituteKillConsts.cs
  14. +20
    -0
      WebFolder/config/Plugins/B3SubstituteKill.plugin
  15. +37
    -0
      WebFolder/config/billreports/B3SubstituteKill/SubKillButcherOrderPrint.xml

+ 18
- 1
B3SubstituteKill.Web/B3SubstituteKill.Web.csproj View File

@ -119,6 +119,15 @@
<Compile Include="Pages\B3SubstituteKill\BaseInfos\SubKillProductLine_\SubKillProductLineList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderPrint.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -141,6 +150,9 @@
<Compile Include="Pages\B3SubstituteKill\Dialogs\WeightRecordDialog.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Reports\SubKillButcherOrderAnalyse_\SubKillButcherOrderAnalyse.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Reports\SubKillWeightBillAnalyse_\SubKillWeightBillAnalyse.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -154,7 +166,9 @@
<Name>B3SubstituteKill</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Bills\SubKillButcherOrder_\SubKillButcherOrderList.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\BaseInfos\GenerationCostItem_\GenerationCostItemList.xml" />
</ItemGroup>
@ -179,6 +193,9 @@
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Reports\SubKillWeightBillAnalyse_\SubKillWeightBillAnalyse.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Reports\SubKillButcherOrderAnalyse_\SubKillButcherOrderAnalyse.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


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

@ -0,0 +1,178 @@
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
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.WebControls;
using TSingSoft.WebControls2;
using Forks.Utils.Collections;
using BWP.B3SubstituteKill.Utils;
using BWP.B3ProduceUnitedInfos;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillButcherOrder_
{
class SubKillButcherOrderEdit : DepartmentWorkFlowBillEditPage<SubKillButcherOrder, ISubKillButcherOrderBL>
{
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("Number");
config.Add("Weight");
config.Add("PriceBill_ID");
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','');
}
if(typeof(result.SupplierApply_ID)!='undefined')
{
__DFContainer.setValue('PriceBill_ID',result.SupplierApply_ID);
}
else
{
__DFContainer.setValue('PriceBill_ID','');
}
},{ });";
supplierInput.OnClientSelected = script;
}
}
}
protected override void BuildBody(System.Web.UI.Control parent)
{
base.BuildBody(parent);
AddDetail(parent.EAdd(new TitlePanel("排宰明细", "排宰明细")));
}
DFEditGrid _detailGrid;
private void AddDetail(TitlePanel titlePanel)
{
if(CanSave){
titlePanel.EAdd(new TSButton("新增", delegate {
GetFromUI();
Dmo.Details.Add(new SubKillButcherOrder_Detail());
_detailGrid.DataBind();
}));
}
var editor = new DFCollectionEditor<SubKillButcherOrder_Detail>(() => Dmo.Details);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) =>
{
if (!CanSave)
return false;
if (field.Name == "Number")
return CheckDefaultRole("编辑头数");
if (field.Name == "Weight")
return CheckDefaultRole("编辑重量");
return true;
}; ;
_detailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFChoiceBox>("SubKillProductLine_ID")).InitEditControl += (sender, e) =>
{
e.Control.DataKind = B3SubstituteKillConsts.DataSources.线;
e.Control.EnableInputArgument = true;
e.Control.EnableTopItem = true;
e.Control.DFDisplayField = "SubKillProductLine_Name";
e.Control.Width = Unit.Pixel(150);
};
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFChoiceBox>("SubKillFlag_Detail_ID")).InitEditControl += (sender, e) =>
{
e.Control.DataKind = B3SubstituteKillConsts.DataSources.;
e.Control.EnableInputArgument = true;
e.Control.EnableTopItem = true;
e.Control.DFDisplayField = "SubKillFlag_Detail_Name";
e.Control.OnBeforeDrop = "this.codeArgument=__DFContainer.getValue('Supplier_ID');";
e.Control.Width = Unit.Pixel(150);
};
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Number")).InitEditControl += (sender, e) =>
{
e.Control.Style["width"] = "120px";
};
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Weight")).InitEditControl += (sender, e) =>
{
e.Control.Style["width"] = "120px";
};
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFChoiceBox>("LiveColonyHouse_ID")).InitEditControl += (sender, e) =>
{
e.Control.DataKind = B3ProduceUnitedInfosDataSources.;
e.Control.EnableInputArgument = true;
e.Control.EnableTopItem = true;
e.Control.OnBeforeDrop = "this.codeArgument=2";
e.Control.DFDisplayField = "LiveColonyHouse_Name";
e.Control.Width = Unit.Pixel(150);
};
_detailGrid.Columns.Add(new DFEditGridColumn("Content"));
_detailGrid.ValueColumns.Add("ID");
var section = mPageLayoutManager.AddSection("Detail", "排宰明细");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_detailGrid, mPageLayoutManager, DFInfo.Get(typeof(SubKillButcherOrder_Detail)));
}
public override void AppToUI()
{
base.AppToUI();
_detailGrid.DataBind();
}
public override void GetFromUI()
{
base.GetFromUI();
_detailGrid.GetFromUI();
}
}
}

+ 50
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.cs View File

@ -0,0 +1,50 @@
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillButcherOrder_
{
class SubKillButcherOrderList : DomainBillListPage<SubKillButcherOrder, ISubKillButcherOrderBL>
{
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");
}
}
protected override void InitToolBar(HLayoutPanel toolbar)
{
base.InitToolBar(toolbar);
if (CheckDefaultRole("数据分析", false))
{
var dataAnysBtn = new TSButton() { Text = "数据分析", UseSubmitBehavior = false };
dataAnysBtn.OnClientClick = string.Format("OpenUrlInTopTab('{0}','数据分析');return false;", TSingSoft.WebPluginFramework.WpfPageUrl.ToGlobal(AspUtil.AddTimeStampToUrl("~/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.aspx")));
toolbar.Add(dataAnysBtn);
}
}
}
}

+ 72
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderList.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.SubKillButcherOrder, 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>

+ 19
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderPrint.cs View File

@ -0,0 +1,19 @@
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillButcherOrder_
{
class SubKillButcherOrderPrint : DomainTemplatePrintPage<SubKillButcherOrder, ISubKillButcherOrderBL>
{
protected override void AddParameters(IDictionary<string, object> dic)
{
dic.Add("$ID", Dmo.ID);
dic.Add("$Details", Dmo.Details);
dic.Add("$DetailType", typeof(SubKillButcherOrder_Detail));
}
}
}

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

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

+ 62
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Reports/SubKillButcherOrderAnalyse_/SubKillButcherOrderAnalyse.xml View File

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

+ 29
- 0
B3SubstituteKill.Web/Utils/B3SubstituteDataProvider.cs View File

@ -1,11 +1,15 @@
using BWP.B3Frameworks.Utils;
using BWP.B3SubstituteKill.BO;
using BWP.B3SubstituteKill.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
namespace BWP.Web.Utils
{
@ -66,6 +70,31 @@ namespace BWP.Web.Utils
OnlyAvailable = false
}.GetData();
});
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources., (argu) => { return Get代宰标识(argu, true); });
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources., (argu) => { return Get代宰标识(argu, false); });
}
static IEnumerable<WordPair> Get代宰标识(ChoiceBoxArgument argu, bool available)
{
if (string.IsNullOrEmpty(argu.CodeArgument))
return new List<WordPair>();
var main = new JoinAlias(typeof(SubKillFlag));
var detail = new JoinAlias(typeof(SubKillFlag_Detail));
var query = new DQueryDom(main);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "SubKillFlag_ID"));
query.Columns.Add(DQSelectColumn.Field("ID", detail));
query.Columns.Add(DQSelectColumn.Field("Name", detail));
query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", long.Parse(argu.CodeArgument)));
if (available)
query.Where.Conditions.Add(DQCondition.EQ("Stopped", false));
if (!string.IsNullOrEmpty(argu.InputArgument))
query.Where.Conditions.Add(DQCondition.Or(DQCondition.Like(detail, "Name", argu.InputArgument), DQCondition.Like(detail, "Spell", argu.InputArgument)));
var result = query.EExecuteList<long, string>();
var l = new List<WordPair>();
foreach (var item in result)
l.Add(new WordPair(item.Item2, item.Item1.ToString()));
return l;
}
}
}

+ 3
- 0
B3SubstituteKill/B3SubstituteKill.csproj View File

@ -82,6 +82,7 @@
<Compile Include="BL\BaseInfos\SubKillProductLine\SubKillProductLineBL.cs" />
<Compile Include="BL\BaseInfos\SubKillFlag\SubKillFlagBL.cs" />
<Compile Include="BL\BaseInfos\SubKillCallBack\SubKillCallBackBL.cs" />
<Compile Include="BL\Bills\SubKillButcherOrder\SubKillButcherOrderBL.cs" />
<Compile Include="BL\Bills\SubKillPriceBill\SubKillPriceBillBL.cs" />
<Compile Include="BL\Bills\SubKillWeightBill\WeightingInfoBL.cs" />
<Compile Include="BL\Bills\SubKillWeightBill\SubKillWeightBillBL.cs" />
@ -90,6 +91,8 @@
<Compile Include="BO\BaseInfos\SubKillProductLine\SubKillProductLine.cs" />
<Compile Include="BO\BaseInfos\SubKillFlag\SubKillFlag.cs" />
<Compile Include="BO\BaseInfos\SubKillCallBack\SubKillCallBack.cs" />
<Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder.cs" />
<Compile Include="BO\Bills\SubKillButcherOrder\SubKillButcherOrder_Detail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CallBackDetail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CostItemDetail.cs" />


+ 31
- 0
B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs View File

@ -0,0 +1,31 @@
using BWP.B3Frameworks.BL;
using BWP.B3SubstituteKill.BO;
using BWP.B3SubstituteKill.Rpcs;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebPluginFramework;
namespace BWP.B3SubstituteKill.BL
{
[BusinessInterface(typeof(SubKillButcherOrderBL))]
[LogicName("代宰排宰")]
public interface ISubKillButcherOrderBL : IDepartmentWorkFlowBillBL<SubKillButcherOrder>
{ }
public class SubKillButcherOrderBL : DepartmentWorkFlowBillBL<SubKillButcherOrder>, ISubKillButcherOrderBL
{
protected override void beforeSave(SubKillButcherOrder dmo)
{
dmo.PriceBill_ID = null;
if (dmo.Date.HasValue && dmo.Supplier_ID.HasValue)
dmo.PriceBill_ID = SupplierRpc.GetPriceBillID(dmo.Supplier_ID.Value, dmo.Date.Value);
dmo.Number = dmo.Details.Sum(x => x.Number ?? 0);
dmo.Weight = dmo.Details.Sum(x => x.Weight.EToDecimal() ?? 0);
base.beforeSave(dmo);
}
}
}

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

@ -0,0 +1,84 @@
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 Forks.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.B3SubstituteKill.BO
{
[DFClass, Serializable]
[LogicName("代宰排宰")]
[DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SubstituteKill, B3SubstituteKillConsts.DmoTypeIDOffsets.SubKillButcherOrder)]
[EditUrl("~/B3SubstituteKill/Bills/SubKillButcherOrder_/SubKillButcherOrderEdit.aspx")]
public class SubKillButcherOrder : DepartmentWorkFlowBill
{
private DateTime? date = DateTime.Now;
[LogicName("排宰时间")]
[DFExtProperty("WebControlType", DFEditControl.DateTimeInput)]
[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; }
[LogicName("代宰头数")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)]
public int Number { get; set; }
[LogicName("代宰重量")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)]
public Money<decimal> Weight { get; set; }
[LogicName("价格单号")]
[DFExtProperty("WebControlType", DFEditControl.StaticText)]
public long? PriceBill_ID { get; set; }
private SubKillButcherOrder_DetailCollection _mDetails = new SubKillButcherOrder_DetailCollection();
[OneToMany(typeof(SubKillButcherOrder_Detail), "ID")]
[Join("ID", "SubKillButcherOrder_ID")]
public SubKillButcherOrder_DetailCollection Details
{
get { return _mDetails; }
set { _mDetails = value; }
}
}
}

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

@ -0,0 +1,56 @@
using BWP.B3Frameworks.BO;
using BWP.B3ProduceUnitedInfos.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.B3SubstituteKill.BO
{
[DFClass, Serializable, LogicName("代宰排宰_明细")]
public class SubKillButcherOrder_Detail : Base
{
public long SubKillButcherOrder_ID { get; set; }
[LogicName("生产线")]
public long? SubKillProductLine_ID { get; set; }
[LogicName("代宰标识")]
public long? SubKillFlag_Detail_ID { get; set; }
[LogicName("头数")]
public int? Number { get; set; }
[LogicName("重量")]
public Money<decimal>? Weight { get; set; }
[LogicName("圈舍")]
public long? LiveColonyHouse_ID { get; set; }
[LogicName("备注")]
public string Content { get; set; }
[ReferenceTo(typeof(SubKillProductLine), "Name")]
[Join("SubKillProductLine_ID", "ID")]
[LogicName("生产线")]
public string SubKillProductLine_Name { get; set; }
[ReferenceTo(typeof(SubKillFlag_Detail), "Name")]
[Join("SubKillFlag_Detail_ID", "ID")]
[LogicName("代宰标识")]
public string SubKillFlag_Detail_Name { get; set; }
[LogicName("圈舍")]
[ReferenceTo(typeof(LiveColonyHouse), "Name")]
[Join("LiveColonyHouse_ID", "ID")]
public string LiveColonyHouse_Name { get; set; }
}
[Serializable]
public class SubKillButcherOrder_DetailCollection : DmoCollection<SubKillButcherOrder_Detail>
{ }
}

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

@ -16,6 +16,8 @@ namespace BWP.B3SubstituteKill.Utils
public const string 线 = PluginName + "授权代宰生产线全部";
public const string = PluginName + "授权代宰回收";
public const string = PluginName + "授权代宰回收全部";
public const string = PluginName + "供应商代宰标识";
public const string = PluginName + "供应商代宰标识全部";
}
public static class DmoTypeIDOffsets
@ -23,6 +25,7 @@ namespace BWP.B3SubstituteKill.Utils
public const byte SubKillPriceBill = 1;
public const byte SubKillWeightBill = 2;
public const byte WeightingInfo = 3;
public const byte SubKillButcherOrder = 4;
}
}
}

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

@ -91,6 +91,24 @@
<Function index="13" name="编辑重量"/>
<Function index="14" name="数据分析"/>
</FunctionGroup>
<FunctionGroup name="代宰排宰" roleSchemas="employee">
<Function index="0" name="访问" />
<Function index="1" name="新建" />
<Function index="2" name="编辑" />
<Function index="3" name="删除" />
<Function index="4" name="审核" />
<Function index="5" name="撤销" />
<Function index="6" name="锁定" />
<Function index="7" name="解锁" />
<Function index="8" name="管理" />
<Function index="9" name="作废" />
<Function index="10" name="完毕"/>
<Function index="11" name="撤销完毕"/>
<Function index="12" name="编辑头数"/>
<Function index="13" name="编辑重量"/>
<Function index="14" name="数据分析"/>
</FunctionGroup>
</Security>
<Menus>
<Menu id="0001" name="/B3代宰模块/基础信息/代宰费用" roles="B3SubstituteKill.代宰费用.访问" url="B3SubstituteKill/BaseInfos/GenerationCostItem_/GenerationCostItemList.aspx"/>
@ -100,6 +118,8 @@
<Menu id="0005" name="/B3代宰模块/业务单据/代宰价格单" roles="B3SubstituteKill.代宰价格单.访问" url="B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.aspx"/>
<Menu id="0006" name="/B3代宰模块/业务单据/代宰过磅" roles="B3SubstituteKill.代宰过磅.访问" url="B3SubstituteKill/Bills/SubKillWeightBill_/SubKillWeightBillList.aspx"/>
<Menu id="0007" name="/B3代宰模块/报表分析/代宰过磅分析" roles="B3SubstituteKill.代宰过磅.数据分析" url="B3SubstituteKill/Reports/SubKillWeightBillAnalyse_/SubKillWeightBillAnalyse.aspx"/>
<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"/>
</Menus>
<Features>


+ 37
- 0
WebFolder/config/billreports/B3SubstituteKill/SubKillButcherOrderPrint.xml View File

@ -0,0 +1,37 @@
<?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="Date" lblWidth="4"/>
<Field name="Supplier_Name" lblWidth="4"/>
<Field name="Supplier_Tel" lblWidth="4"/>
<Field name="Supplier_Card_ID" lblWidth="4"/>
<Field name="Supplier_Address" lblWidth="4"/>
<Field name="Number" lblWidth="4"/>
<Field name="Weight" lblWidth="4"/>
<Field name="PriceBill_ID" lblWidth="4"/>
<Field name="Remark" lblWidth="4"/>
</DFInfoBand>
<HtmlBand>
<![CDATA[<h2>过磅明细</h2>]]>
</HtmlBand>
<DFListBand collection="$Details" itemType="$DetailType" enablePaging="true" rowsPerPage="20" >
<LineNo header="序号"/>
<Field name="SubKillProductLine_Name"/>
<Field name="SubKillFlag_Detail_Name"/>
<Field name="Number"/>
<Field name="Weight"/>
<Field name="LiveColonyHouse_Name"/>
<Field name="Content"/>
</DFListBand>
</Bands>
</BillReport>
</Report>
</BillReports>

Loading…
Cancel
Save