Browse Source

需求单No.138384 新增【代宰价格单】

master
yibo 8 years ago
parent
commit
bbd0ee0aef
17 changed files with 632 additions and 9 deletions
  1. +12
    -1
      B3SubstituteKill.Web/B3SubstituteKill.Web.csproj
  2. +193
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillEdit.cs
  3. +37
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.cs
  4. +69
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.xml
  5. +25
    -0
      B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillPrint.cs
  6. +3
    -2
      B3SubstituteKill.Web/PluginClass.cs
  7. +36
    -0
      B3SubstituteKill.Web/Utils/B3SubstituteDataProvider.cs
  8. +7
    -5
      B3SubstituteKill/B3SubstituteKill.csproj
  9. +20
    -0
      B3SubstituteKill/BL/Bills/SubKillPriceBill/SubKillPriceBillBL.cs
  10. +59
    -0
      B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill.cs
  11. +33
    -0
      B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_CallBackDetail.cs
  12. +41
    -0
      B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_CostItemDetail.cs
  13. +30
    -0
      B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_SupplierDetail.cs
  14. +5
    -1
      B3SubstituteKill/Utils/B3SubstituteKillConsts.cs
  15. +19
    -0
      WebFolder/config/Plugins/B3SubstituteKill.plugin
  16. +42
    -0
      WebFolder/config/billreports/B3SubstituteKill/SubKillPriceBillPrint.xml
  17. +1
    -0
      WebFolder/config/ioc/B3SubstituteKillMenu.txt

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

@ -115,6 +115,15 @@
<Compile Include="Pages\B3SubstituteKill\BaseInfos\SubKillProductLine_\SubKillProductLineList.cs"> <Compile Include="Pages\B3SubstituteKill\BaseInfos\SubKillProductLine_\SubKillProductLineList.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillPrint.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="PluginClass.cs" /> <Compile Include="PluginClass.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\B3SubstituteDataProvider.cs" /> <Compile Include="Utils\B3SubstituteDataProvider.cs" />
@ -126,7 +135,6 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Pages\B3SubstituteKill\Bills\" />
<Folder Include="Pages\B3SubstituteKill\Reports\" /> <Folder Include="Pages\B3SubstituteKill\Reports\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -141,6 +149,9 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\BaseInfos\SubKillProductLine_\SubKillProductLineList.xml" /> <EmbeddedResource Include="Pages\B3SubstituteKill\BaseInfos\SubKillProductLine_\SubKillProductLineList.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3SubstituteKill\Bills\SubKillPriceBill_\SubKillPriceBillList.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.


+ 193
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillEdit.cs View File

@ -0,0 +1,193 @@
using BWP.B3ProcurementInterface.Utils;
using BWP.B3SubstituteKill.BL;
using BWP.B3SubstituteKill.BO;
using BWP.B3SubstituteKill.Utils;
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;
namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillPriceBill_
{
class SubKillPriceBillEdit : DepartmentWorkFlowBillEditPage<SubKillPriceBill, ISubKillPriceBillBL>
{
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("Remark");
layoutManager.Config = config;
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout());
}
protected override void BuildBody(System.Web.UI.Control parent)
{
base.BuildBody(parent);
AddSupplierDetail(parent.EAdd(new TitlePanel("供应商明细", "供应商明细")));
AddCostItemDetail(parent.EAdd(new TitlePanel("代宰费用", "代宰费用")));
AddCallBackDetail(parent.EAdd(new TitlePanel("代宰回收", "代宰回收")));
}
DFEditGrid _supplierDetailGrid;
private void AddSupplierDetail(TitlePanel titlePanel)
{
if (CanSave)
{
var hPanel = titlePanel.EAdd(new HLayoutPanel());
hPanel.Add(new SimpleLabel("选择供应商"));
var supplierSelect = hPanel.Add(new ChoiceBox(B3ProcurementInterfaceDataSources.) { Width = Unit.Pixel(180), EnableInputArgument = true, EnableTopItem = true, AutoPostBack = true });
supplierSelect.SelectedValueChanged += delegate
{
GetFromUI();
if (supplierSelect.IsEmpty)
return;
long v = long.Parse(supplierSelect.Value);
if (Dmo.SupplierDetails.Any(x => x.Supplier_ID == v))
{
supplierSelect.Clear();
return;
}
Dmo.SupplierDetails.Add(new SubKillPriceBill_SupplierDetail { Supplier_ID = v, Supplier_Name = supplierSelect.DisplayValue });
supplierSelect.Clear();
_supplierDetailGrid.DataBind();
};
}
var editor = new DFCollectionEditor<SubKillPriceBill_SupplierDetail>(() => Dmo.SupplierDetails);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => false;
_supplierDetailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_supplierDetailGrid.Columns.Add(new DFEditGridColumn("Supplier_Name"));
var section = mPageLayoutManager.AddSection("SupplierDetail", "供应商明细");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_supplierDetailGrid, mPageLayoutManager, DFInfo.Get(typeof(SubKillPriceBill_SupplierDetail)));
}
DFEditGrid _costItemDetailGrid;
private void AddCostItemDetail(TitlePanel titlePanel)
{
if (CanSave)
{
var hPanel = titlePanel.EAdd(new HLayoutPanel());
hPanel.Add(new SimpleLabel("代宰生产线"));
var productLineSelect = hPanel.Add(new ChoiceBox(B3SubstituteKillConsts.DataSources.线) { Width = Unit.Pixel(180), EnableInputArgument = true, EnableTopItem = true });
hPanel.Add(new SimpleLabel("代宰费用"));
var costItemSelect = hPanel.Add(new ChoiceBox(B3SubstituteKillConsts.DataSources.) { Width = Unit.Pixel(180), EnableInputArgument = true, EnableTopItem = true });
hPanel.Add(new TSButton("添加", delegate
{
GetFromUI();
if (productLineSelect.IsEmpty)
throw new Exception("请选择代宰生产线");
if (costItemSelect.IsEmpty)
throw new Exception("请选择代宰费用");
long pv = long.Parse(productLineSelect.Value);
long cv = long.Parse(costItemSelect.Value);
if (Dmo.CostItemDetails.Any(x => x.SubKillProductLine_ID == pv && x.GenerationCostItem_ID == cv))
{
productLineSelect.Clear();
costItemSelect.Clear();
return;
}
Dmo.CostItemDetails.Add(new SubKillPriceBill_CostItemDetail { SubKillProductLine_ID = pv, SubKillProductLine_Name = productLineSelect.DisplayValue, GenerationCostItem_ID = cv, GenerationCostItem_Name = costItemSelect.DisplayValue });
productLineSelect.Clear();
costItemSelect.Clear();
_costItemDetailGrid.DataBind();
}));
}
var editor = new DFCollectionEditor<SubKillPriceBill_CostItemDetail>(() => Dmo.CostItemDetails);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => CanSave;
_costItemDetailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_costItemDetailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("SubKillProductLine_Name"));
_costItemDetailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("GenerationCostItem_Name"));
_costItemDetailGrid.Columns.Add(new DFEditGridColumn("Price"));
var dic = new Dictionary<string, Unit>();
dic.Add("代宰生产线", Unit.Percentage(35));
dic.Add("单价", Unit.Percentage(30));
_costItemDetailGrid.PreferWidthGridSet = dic;
var section = mPageLayoutManager.AddSection("CostItemDetail", "代宰费用");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_costItemDetailGrid, mPageLayoutManager, DFInfo.Get(typeof(SubKillPriceBill_CostItemDetail)));
}
DFEditGrid _callbackDetailGrid;
private void AddCallBackDetail(TitlePanel titlePanel)
{
if (CanSave)
{
var hPanel = titlePanel.EAdd(new HLayoutPanel());
hPanel.Add(new SimpleLabel("选择代宰回收项"));
var callbackSelect = hPanel.Add(new ChoiceBox(B3SubstituteKillConsts.DataSources.) { Width = Unit.Pixel(180), EnableInputArgument = true, EnableTopItem = true, AutoPostBack = true });
callbackSelect.SelectedValueChanged += delegate
{
GetFromUI();
if (callbackSelect.IsEmpty)
return;
long v = long.Parse(callbackSelect.Value);
if (Dmo.CallBackDetails.Any(x => x.SubKillCallBack_ID == v))
{
callbackSelect.Clear();
return;
}
Dmo.CallBackDetails.Add(new SubKillPriceBill_CallBackDetail { SubKillCallBack_ID = v, SubKillCallBack_Name = callbackSelect.DisplayValue });
callbackSelect.Clear();
_callbackDetailGrid.DataBind();
};
}
var editor = new DFCollectionEditor<SubKillPriceBill_CallBackDetail>(() => Dmo.CallBackDetails);
editor.AllowDeletionFunc = () => CanSave;
editor.CanDeleteFunc = detail => CanSave;
editor.IsEditableFunc = (field, detail) => CanSave;
_callbackDetailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) });
_callbackDetailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("SubKillCallBack_Name"));
_callbackDetailGrid.Columns.Add(new DFEditGridColumn("Price"));
var dic = new Dictionary<string, Unit>();
dic.Add("单价", Unit.Percentage(50));
_callbackDetailGrid.PreferWidthGridSet = dic;
var section = mPageLayoutManager.AddSection("CallBackItemDetail", "代宰回收");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
section.ApplyLayout(_callbackDetailGrid, mPageLayoutManager, DFInfo.Get(typeof(SubKillPriceBill_CallBackDetail)));
}
public override void AppToUI()
{
base.AppToUI();
_supplierDetailGrid.DataBind();
_costItemDetailGrid.DataBind();
_callbackDetailGrid.DataBind();
}
public override void GetFromUI()
{
base.GetFromUI();
_supplierDetailGrid.GetFromUI();
_costItemDetailGrid.GetFromUI();
_callbackDetailGrid.GetFromUI();
}
}
}

+ 37
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.cs View File

@ -0,0 +1,37 @@
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.SubKillPriceBill_
{
class SubKillPriceBillList : DomainBillListPage<SubKillPriceBill, ISubKillPriceBillBL>
{
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
{
config.Add("Date");
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
}));
}
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
AddDFBrowseGridColumn(grid, "Department_Name");
AddDFBrowseGridColumn(grid, "Employee_Name");
AddDFBrowseGridColumn(grid, "Remark");
}
}
}
}

+ 69
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.xml View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3SubstituteKill.BO.SubKillPriceBill, 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="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>

+ 25
- 0
B3SubstituteKill.Web/Pages/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillPrint.cs View File

@ -0,0 +1,25 @@
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.SubKillPriceBill_
{
class SubKillPriceBillPrint : DomainTemplatePrintPage<SubKillPriceBill, ISubKillPriceBillBL>
{
protected override void AddParameters(IDictionary<string, object> dic)
{
dic.Add("$ID", Dmo.ID);
dic.Add("$SupplierDetails", Dmo.SupplierDetails);
dic.Add("$SupplierDetailType", typeof(SubKillPriceBill_SupplierDetail));
dic.Add("$CostItemDetails", Dmo.CostItemDetails);
dic.Add("$CostItemDetailType", typeof(SubKillPriceBill_CostItemDetail));
dic.Add("$CallBackDetails", Dmo.CallBackDetails);
dic.Add("$CallBackDetailType", typeof(SubKillPriceBill_CallBackDetail));
}
}
}

+ 3
- 2
B3SubstituteKill.Web/PluginClass.cs View File

@ -1,4 +1,5 @@
using System;
using BWP.Web.Utils;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -10,7 +11,7 @@ namespace BWP.B3SubstituteKill
{ {
public void OnInit() public void OnInit()
{ {
B3SubstituteDataProvider.Register();
} }
} }
} }

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

@ -30,6 +30,42 @@ namespace BWP.Web.Utils
OnlyAvailable = false OnlyAvailable = false
}.GetData(); }.GetData();
}); });
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources.线, (argu) =>
{
return new DomainChoiceBoxQueryHelper<SubKillProductLine>(argu)
{
AddOrganizationLimit = true,
OnlyAvailable = true
}.GetData();
});
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources.线, (argu) =>
{
return new DomainChoiceBoxQueryHelper<SubKillProductLine>(argu)
{
AddOrganizationLimit = true,
OnlyAvailable = false
}.GetData();
});
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources., (argu) =>
{
return new DomainChoiceBoxQueryHelper<SubKillCallBack>(argu)
{
AddOrganizationLimit = true,
OnlyAvailable = true
}.GetData();
});
ChoiceBoxSettings.Register(B3SubstituteKillConsts.DataSources., (argu) =>
{
return new DomainChoiceBoxQueryHelper<SubKillCallBack>(argu)
{
AddOrganizationLimit = true,
OnlyAvailable = false
}.GetData();
});
} }
} }
} }

+ 7
- 5
B3SubstituteKill/B3SubstituteKill.csproj View File

@ -12,7 +12,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<KeyContainerName>BwpApp</KeyContainerName>
<KeyContainerName>BwpApp</KeyContainerName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -78,17 +78,19 @@
<Compile Include="BL\BaseInfos\SubKillProductLine\SubKillProductLineBL.cs" /> <Compile Include="BL\BaseInfos\SubKillProductLine\SubKillProductLineBL.cs" />
<Compile Include="BL\BaseInfos\SubKillFlag\SubKillFlagBL.cs" /> <Compile Include="BL\BaseInfos\SubKillFlag\SubKillFlagBL.cs" />
<Compile Include="BL\BaseInfos\SubKillCallBack\SubKillCallBackBL.cs" /> <Compile Include="BL\BaseInfos\SubKillCallBack\SubKillCallBackBL.cs" />
<Compile Include="BL\Bills\SubKillPriceBill\SubKillPriceBillBL.cs" />
<Compile Include="BO\BaseInfos\GenerationCostItem\GenerationCostItem.cs" /> <Compile Include="BO\BaseInfos\GenerationCostItem\GenerationCostItem.cs" />
<Compile Include="BO\BaseInfos\SubKillProductLine\SubKillProductLine.cs" /> <Compile Include="BO\BaseInfos\SubKillProductLine\SubKillProductLine.cs" />
<Compile Include="BO\BaseInfos\SubKillFlag\SubKillFlag.cs" /> <Compile Include="BO\BaseInfos\SubKillFlag\SubKillFlag.cs" />
<Compile Include="BO\BaseInfos\SubKillCallBack\SubKillCallBack.cs" /> <Compile Include="BO\BaseInfos\SubKillCallBack\SubKillCallBack.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CallBackDetail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_CostItemDetail.cs" />
<Compile Include="BO\Bills\SubKillPriceBill\SubKillPriceBill_SupplierDetail.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\B3SubstituteKillConsts.cs" /> <Compile Include="Utils\B3SubstituteKillConsts.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="BL\Bills\" />
<Folder Include="BO\Bills\" />
</ItemGroup>
<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.


+ 20
- 0
B3SubstituteKill/BL/Bills/SubKillPriceBill/SubKillPriceBillBL.cs View File

@ -0,0 +1,20 @@
using BWP.B3Frameworks.BL;
using BWP.B3SubstituteKill.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3SubstituteKill.BL
{
[BusinessInterface(typeof(SubKillPriceBillBL))]
[LogicName("代宰价格单")]
public interface ISubKillPriceBillBL : IDepartmentWorkFlowBillBL<SubKillPriceBill>
{ }
public class SubKillPriceBillBL : DepartmentWorkFlowBillBL<SubKillPriceBill>, ISubKillPriceBillBL
{
}
}

+ 59
- 0
B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill.cs View File

@ -0,0 +1,59 @@
using BWP.B3Frameworks;
using BWP.B3Frameworks.Attributes;
using BWP.B3Frameworks.BO;
using BWP.B3SubstituteKill.Utils;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
namespace BWP.B3SubstituteKill.BO
{
[DFClass, Serializable]
[LogicName("代宰价格单")]
[DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SubstituteKill, B3SubstituteKillConsts.DmoTypeIDOffsets.SubKillPriceBill)]
[EditUrl("~/B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillEdit.aspx")]
public class SubKillPriceBill : DepartmentWorkFlowBill
{
private DateTime? date = DateTime.Now;
[LogicName("执行时间")]
[DFExtProperty("WebControlType", DFEditControl.DateTimeInput)]
[DFNotEmpty]
public DateTime? Date
{
get { return date; }
set { date = value; }
}
private SubKillPriceBill_SupplierDetailCollection _supplierDetails = new SubKillPriceBill_SupplierDetailCollection();
[OneToMany(typeof(SubKillPriceBill_SupplierDetail), "ID")]
[Join("ID", "SubKillPriceBill_ID")]
public SubKillPriceBill_SupplierDetailCollection SupplierDetails
{
get { return _supplierDetails; }
set { _supplierDetails = value; }
}
private SubKillPriceBill_CostItemDetailCollection _costItemDetails = new SubKillPriceBill_CostItemDetailCollection();
[OneToMany(typeof(SubKillPriceBill_CostItemDetail), "ID")]
[Join("ID", "SubKillPriceBill_ID")]
public SubKillPriceBill_CostItemDetailCollection CostItemDetails
{
get { return _costItemDetails; }
set { _costItemDetails = value; }
}
private SubKillPriceBill_CallBackDetailCollection _callbackDetails = new SubKillPriceBill_CallBackDetailCollection();
[OneToMany(typeof(SubKillPriceBill_CallBackDetail), "ID")]
[Join("ID", "SubKillPriceBill_ID")]
public SubKillPriceBill_CallBackDetailCollection CallBackDetails
{
get { return _callbackDetails; }
set { _callbackDetails = value; }
}
}
}

+ 33
- 0
B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_CallBackDetail.cs View File

@ -0,0 +1,33 @@
using BWP.B3Frameworks.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 SubKillPriceBill_CallBackDetail : Base
{
public long SubKillPriceBill_ID { get; set; }
[LogicName("代宰回收项")]
public long SubKillCallBack_ID { get; set; }
[LogicName("代宰回收项")]
[ReferenceTo(typeof(SubKillCallBack), "Name")]
[Join("SubKillCallBack_ID", "ID")]
public string SubKillCallBack_Name { get; set; }
[LogicName("单价")]
public Money<decimal>? Price { get; set; }
}
[Serializable]
public class SubKillPriceBill_CallBackDetailCollection : DmoCollection<SubKillPriceBill_CallBackDetail>
{ }
}

+ 41
- 0
B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_CostItemDetail.cs View File

@ -0,0 +1,41 @@
using BWP.B3Frameworks.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 SubKillPriceBill_CostItemDetail : Base
{
public long SubKillPriceBill_ID { get; set; }
[LogicName("代宰费用")]
public long GenerationCostItem_ID { get; set; }
[LogicName("代宰费用")]
[ReferenceTo(typeof(GenerationCostItem), "Name")]
[Join("GenerationCostItem_ID", "ID")]
public string GenerationCostItem_Name { get; set; }
[LogicName("代宰生产线")]
public long SubKillProductLine_ID { get; set; }
[LogicName("代宰生产线")]
[ReferenceTo(typeof(SubKillProductLine), "Name")]
[Join("SubKillProductLine_ID", "ID")]
public string SubKillProductLine_Name { get; set; }
[LogicName("单价")]
public Money<decimal>? Price { get; set; }
}
[Serializable]
public class SubKillPriceBill_CostItemDetailCollection : DmoCollection<SubKillPriceBill_CostItemDetail>
{ }
}

+ 30
- 0
B3SubstituteKill/BO/Bills/SubKillPriceBill/SubKillPriceBill_SupplierDetail.cs View File

@ -0,0 +1,30 @@
using BWP.B3Frameworks.BO;
using BWP.B3ProcurementInterface.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3SubstituteKill.BO
{
[DFClass, Serializable, LogicName("代宰价格单_供应商明细")]
public class SubKillPriceBill_SupplierDetail : Base
{
public long SubKillPriceBill_ID { get; set; }
[LogicName("供应商")]
public long Supplier_ID { get; set; }
[LogicName("供应商")]
[ReferenceTo(typeof(Supplier), "Name")]
[Join("Supplier_ID", "ID")]
public string Supplier_Name { get; set; }
}
[Serializable]
public class SubKillPriceBill_SupplierDetailCollection : DmoCollection<SubKillPriceBill_SupplierDetail>
{ }
}

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

@ -12,11 +12,15 @@ namespace BWP.B3SubstituteKill.Utils
private const string PluginName = "B3SubstituteKill_"; private const string PluginName = "B3SubstituteKill_";
public const string = PluginName + "授权代宰费用"; public const string = PluginName + "授权代宰费用";
public const string = PluginName + "授权代宰费用全部"; public const string = PluginName + "授权代宰费用全部";
public const string 线 = PluginName + "授权代宰生产线";
public const string 线 = PluginName + "授权代宰生产线全部";
public const string = PluginName + "授权代宰回收";
public const string = PluginName + "授权代宰回收全部";
} }
public static class DmoTypeIDOffsets public static class DmoTypeIDOffsets
{ {
// public const byte = 1;
public const byte SubKillPriceBill = 1;
} }
} }
} }

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

@ -3,12 +3,15 @@
pluginClass="BWP.B3SubstituteKill.PluginClass,B3SubstituteKill.Web" > pluginClass="BWP.B3SubstituteKill.PluginClass,B3SubstituteKill.Web" >
<Requires> <Requires>
<Plugin name="B3Frameworks" version="$appVersion" /> <Plugin name="B3Frameworks" version="$appVersion" />
<Plugin name="B3ProcurementInterface" version="$appVersion" />
</Requires> </Requires>
<Assemblies> <Assemblies>
<File name="B3SubstituteKill.dll" type="bo bl" /> <File name="B3SubstituteKill.dll" type="bo bl" />
<File name="B3SubstituteKill.Web.dll" type="web" /> <File name="B3SubstituteKill.Web.dll" type="web" />
</Assemblies> </Assemblies>
<ContentFiles> <ContentFiles>
<File name="config/ioc/B3SubstituteKillMenu.txt" overwrite="true"/>
<Folder name="config/billreports"/>
</ContentFiles> </ContentFiles>
<DbResources> <DbResources>
</DbResources> </DbResources>
@ -55,12 +58,28 @@
<Function index="6" name="锁定" /> <Function index="6" name="锁定" />
<Function index="7" name="解锁" /> <Function index="7" 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"/>
<Menu id="0002" name="/B3代宰模块/基础信息/代宰回收" roles="B3SubstituteKill.代宰回收.访问" url="B3SubstituteKill/BaseInfos/SubKillCallBack_/SubKillCallBackList.aspx"/> <Menu id="0002" name="/B3代宰模块/基础信息/代宰回收" roles="B3SubstituteKill.代宰回收.访问" url="B3SubstituteKill/BaseInfos/SubKillCallBack_/SubKillCallBackList.aspx"/>
<Menu id="0003" name="/B3代宰模块/基础信息/代宰标识" roles="B3SubstituteKill.代宰标识.访问" url="B3SubstituteKill/BaseInfos/SubKillFlag_/SubKillFlagList.aspx"/> <Menu id="0003" name="/B3代宰模块/基础信息/代宰标识" roles="B3SubstituteKill.代宰标识.访问" url="B3SubstituteKill/BaseInfos/SubKillFlag_/SubKillFlagList.aspx"/>
<Menu id="0004" name="/B3代宰模块/基础信息/代宰生产线" roles="B3SubstituteKill.代宰生产线.访问" url="B3SubstituteKill/BaseInfos/SubKillProductLine_/SubKillProductLineList.aspx"/> <Menu id="0004" name="/B3代宰模块/基础信息/代宰生产线" roles="B3SubstituteKill.代宰生产线.访问" url="B3SubstituteKill/BaseInfos/SubKillProductLine_/SubKillProductLineList.aspx"/>
<Menu id="0005" name="/B3代宰模块/业务单据/代宰价格单" roles="B3SubstituteKill.代宰价格单.访问" url="B3SubstituteKill/Bills/SubKillPriceBill_/SubKillPriceBillList.aspx"/>
</Menus> </Menus>
<Features> <Features>


+ 42
- 0
WebFolder/config/billreports/B3SubstituteKill/SubKillPriceBillPrint.xml View File

@ -0,0 +1,42 @@
<?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="Date" lblWidth="4"/>
<Field name="Employee_Name" lblWidth="4"/>
<Field name="Remark" lblWidth="4"/>
</DFInfoBand>
<HtmlBand>
<![CDATA[<h2>供应商明细</h2>]]>
</HtmlBand>
<DFListBand collection="$SupplierDetails" itemType="$SupplierDetailType" enablePaging="false" >
<LineNo header="序号"/>
<Field name="Supplier_Name"/>
</DFListBand>
<HtmlBand>
<![CDATA[<h2>代宰费用</h2>]]>
</HtmlBand>
<DFListBand collection="$CostItemDetails" itemType="$CostItemDetailType" enablePaging="false" >
<LineNo header="序号"/>
<Field name="GenerationCostItem_Name"/>
<Field name="SubKillProductLine_Name"/>
<Field name="Price"/>
</DFListBand>
<HtmlBand>
<![CDATA[<h2>供应商明细</h2>]]>
</HtmlBand>
<DFListBand collection="$CallBackDetails" itemType="$CallBackDetailType" enablePaging="false" >
<LineNo header="序号"/>
<Field name="SubKillCallBack_Name"/>
<Field name="Price"/>
</DFListBand>
</Bands>
</BillReport>
</Report>
</BillReports>

+ 1
- 0
WebFolder/config/ioc/B3SubstituteKillMenu.txt View File

@ -0,0 +1 @@
DisplayName=B3代宰模块菜单

Loading…
Cancel
Save