# Conflicts: # B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj # B3QingDaoWanFu/B3QingDaoWanFu.csproj # WebFolder/config/plugins/B3QingDaoWanFu.pluginmaster
| @ -0,0 +1,252 @@ | |||||
| using BWP.B3ExportBase; | |||||
| using BWP.B3ExportBase.BL; | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.Web.Layout; | |||||
| using BWP.Web.Utils; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using Forks.EnterpriseServices.DataForm; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Security; | |||||
| using System.Text; | |||||
| using System.Web.UI; | |||||
| using System.Web.UI.WebControls; | |||||
| using TSingSoft.WebControls2; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| using Forks.Utils.Collections; | |||||
| namespace BWP.Web | |||||
| { | |||||
| public abstract class ExportBaseInfoList<TDmo, TBL> : ListPageBase, IExportUIBase | |||||
| where TBL : IExportBaseBL | |||||
| { | |||||
| protected override bool EnableExcelExport | |||||
| { | |||||
| get | |||||
| { | |||||
| return false; | |||||
| } | |||||
| } | |||||
| protected readonly static DFInfo mDFInfo = DFInfo.Get(typeof(TDmo)); | |||||
| public virtual Control CreateUI() | |||||
| { | |||||
| return null; | |||||
| } | |||||
| protected TBL BL = BIFactory.Create<TBL>(); | |||||
| private ChoiceBox _chb; | |||||
| private short? _billTypeID; | |||||
| protected short BillTypeID | |||||
| { | |||||
| get | |||||
| { | |||||
| if (_billTypeID == null) | |||||
| { | |||||
| _billTypeID = DmoTypeIDAttribute.GetID(typeof(TDmo)); | |||||
| } | |||||
| return _billTypeID.Value; | |||||
| } | |||||
| } | |||||
| private short? _methodID; | |||||
| public short MethodID | |||||
| { | |||||
| get | |||||
| { | |||||
| if (_methodID == null) | |||||
| _methodID = BL.GetMethodID(); | |||||
| return _methodID.Value; | |||||
| } | |||||
| } | |||||
| public abstract string Url { get; } | |||||
| protected virtual string AccessRoleName | |||||
| { | |||||
| get { return ""; } | |||||
| } | |||||
| protected override void InitForm(System.Web.UI.HtmlControls.HtmlForm form) | |||||
| { | |||||
| var hPanel = new HLayoutPanel(); | |||||
| hPanel.Add(new SimpleLabel("导出方法")); | |||||
| form.Controls.Add(hPanel); | |||||
| _chb = hPanel.Add(new ChoiceBox(B3ExportBaseConsts.DataSources.导出方法)); | |||||
| _chb.Width = 150; | |||||
| _chb.AutoPostBack = true; | |||||
| _chb.EnableInputArgument = true; | |||||
| _chb.SelectedValueChanged += delegate | |||||
| { | |||||
| var ui = B3ExportBaseUtil.GetExportUI(short.Parse(_chb.Value)); | |||||
| if (ui == null) | |||||
| return; | |||||
| if (!string.IsNullOrEmpty(ui.Url)) | |||||
| { | |||||
| AspUtil.Redirect(ui.Url); | |||||
| } | |||||
| else | |||||
| { | |||||
| AspUtil.Redirect("~/B3ExportBase/ExportPage.aspx?methodID=" + _chb.Value); | |||||
| } | |||||
| }; | |||||
| if (BLContext.User.IsInRole("B3ExportBase.接口管理.配置")) | |||||
| { | |||||
| var button = new TSButton("配置") { UseSubmitBehavior = false }; | |||||
| button.OnClientClick = string.Format("preventEventDefault(event);OpenUrlInTopTab('B3ExportBase/ExportConfigEdit.aspx?methodID={0}','{1}配置');", MethodID, Caption); | |||||
| hPanel.Add(button); | |||||
| } | |||||
| base.InitForm(form); | |||||
| } | |||||
| static readonly bool IsWithCode = TypeUtil.IsWithCodeBaseInfo(typeof(TDmo)); | |||||
| protected Control CreateDefaultBaseInfoQueryControls(Action<LayoutManager, AutoLayoutConfig> beforeCreateLayout = null) | |||||
| { | |||||
| var layoutManager = new LayoutManager("", mDFInfo, mQueryContainer); | |||||
| var config = new AutoLayoutConfig() { Cols = 8, DefaultLabelWidth = 4 }; | |||||
| config.Add("ID"); | |||||
| config.Add("Name"); | |||||
| if (IsWithCode) | |||||
| { | |||||
| config.Add("Code"); | |||||
| } | |||||
| config.Add("Stopped"); | |||||
| config.Add("IsLocked"); | |||||
| config.Add("Remark"); | |||||
| layoutManager.Config = config; | |||||
| if (beforeCreateLayout != null) | |||||
| { | |||||
| beforeCreateLayout(layoutManager, config); | |||||
| } | |||||
| var section = mPageLayoutManager.AddSection(B3FrameworksConsts.PageLayouts.QueryConditions, B3FrameworksConsts.PageLayouts.QueryConditions_DisplayName); | |||||
| section.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); | |||||
| return layoutManager.CreateLayout(); | |||||
| } | |||||
| protected override void AddGrid(Control parent) | |||||
| { | |||||
| var hbox = new HLayoutPanel(); | |||||
| hbox.CssClass += " LeftPaddingWrapper"; | |||||
| parent.Controls.Add(hbox); | |||||
| AddExportControl(hbox); | |||||
| base.AddGrid(parent); | |||||
| } | |||||
| protected virtual void AddExportControl(HLayoutPanel hbox) | |||||
| { | |||||
| var btnExport = hbox.Add(new TSButton("导出")); | |||||
| btnExport.Click += (sender, obj) => Export(); | |||||
| hbox.Add(new LiteralControl(" ")); | |||||
| } | |||||
| protected virtual void BeforeUnExport(List<long> ids) | |||||
| { | |||||
| } | |||||
| private void Export() | |||||
| { | |||||
| var idList = mBrowseGrid.GetSelectedItems().Select(item => (long)item["ID"]).ToList(); | |||||
| var message = DoExport(idList); | |||||
| AspUtil.Alert(this, message); | |||||
| mBrowseGrid.DataBind(); | |||||
| } | |||||
| protected abstract string DoExport(List<long> idList); | |||||
| protected override void InitBrowseGrid(DFBrowseGrid grid) | |||||
| { | |||||
| base.InitBrowseGrid(grid); | |||||
| var section = mPageLayoutManager.AddSection(B3FrameworksConsts.PageLayouts.QueryResult, B3FrameworksConsts.PageLayouts.QueryResult_DisplayName); | |||||
| section.ApplyLayout(grid, mPageLayoutManager, mDFInfo); | |||||
| grid.MultiSelectionEnabled = true; | |||||
| } | |||||
| protected override DQueryDom GetQueryDom() | |||||
| { | |||||
| var query = base.GetQueryDom(); | |||||
| OrganizationUtil.AddOrganizationLimit(query, typeof(TDmo)); | |||||
| if (query.OrderBy.Expressions.Count == 0) | |||||
| { | |||||
| query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); | |||||
| } | |||||
| return query; | |||||
| } | |||||
| protected override void OnLoad(EventArgs e) | |||||
| { | |||||
| if (!IsPostBack && MethodID > 0) | |||||
| { | |||||
| _chb.Value = MethodID.ToString(); | |||||
| _chb.DisplayValue = Caption; | |||||
| } | |||||
| base.OnLoad(e); | |||||
| } | |||||
| protected override bool NotWaitingUserInput() | |||||
| { | |||||
| return true; | |||||
| } | |||||
| protected override void OnInit(EventArgs e) | |||||
| { | |||||
| if (!string.IsNullOrEmpty(AccessRoleName) && !User.IsInRole(AccessRoleName)) | |||||
| { | |||||
| throw new SecurityException("您无权访问此页面"); | |||||
| } | |||||
| base.OnInit(e); | |||||
| } | |||||
| protected override void CreateDFBrowseGridColumns(DFBrowseGrid grid) | |||||
| { | |||||
| if (string.IsNullOrEmpty(EditUrl)) | |||||
| { | |||||
| AddDFBrowseGridColumn(grid, "ID"); | |||||
| } | |||||
| else | |||||
| { | |||||
| grid.Columns.EAdd(new DFBrowseGridCustomExtColumn((row, cell, dataSourceIndex) => | |||||
| { | |||||
| var id = row["ID"]; | |||||
| var linkButton = new LinkButton(); | |||||
| linkButton.OnClientClick = string.Format("OpenUrlInTopTab('{0}?ID={1}');return false;", EditUrl, id); | |||||
| linkButton.Text = string.Format("No.{0}", id); | |||||
| cell.Controls.Add(linkButton); | |||||
| cell.Align = "center"; | |||||
| })).HeaderText = "单号"; | |||||
| } | |||||
| if (IsWithCode) | |||||
| AddDFBrowseGridColumn(grid, "Code"); | |||||
| AddDFBrowseGridColumn(grid, "Name"); | |||||
| AddDFBrowseGridColumn(grid, "Stopped"); | |||||
| AddDFBrowseGridColumn(grid, "IsLocked"); | |||||
| AddDFBrowseGridColumn(grid, "Remark"); | |||||
| } | |||||
| protected virtual string EditUrl | |||||
| { | |||||
| get | |||||
| { | |||||
| return ""; | |||||
| } | |||||
| } | |||||
| protected virtual string LogicName | |||||
| { | |||||
| get { return mDFInfo.LogicName; } | |||||
| } | |||||
| //conString = InnerBLUtil.GetDmoPropertyByID<string>(context.Session, typeof(ExtSystem), "Address", extSystemID); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,128 @@ | |||||
| using BWP.B3ButcherManage.BO; | |||||
| using BWP.B3ButcherManage.Utils; | |||||
| using BWP.B3Frameworks.BO.NamedValueTemplate; | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.B3QingDaoWanFu.BL; | |||||
| using BWP.B3QingDaoWanFu.BO; | |||||
| using BWP.Web.Layout; | |||||
| using BWP.Web.WebControls; | |||||
| using Forks.EnterpriseServices.DataForm; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Web.UI.WebControls; | |||||
| using TSingSoft.WebControls2; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_ | |||||
| { | |||||
| class CostRecordEdit : DomainBillEditPage<CostRecord, ICostRecordBL> | |||||
| { | |||||
| DFEditGrid _detailGrid; | |||||
| protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, CustomPageLayout.PageLayoutSection pageLayoutSection) | |||||
| { | |||||
| var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); | |||||
| var config = new AutoLayoutConfig(); | |||||
| config.Add("AccountingUnit_ID"); | |||||
| config.Add("Date"); | |||||
| config.Add("PurchaseType_ID"); | |||||
| layoutManager.Config = config; | |||||
| pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); | |||||
| titlePanel.Controls.Add(layoutManager.CreateLayout()); | |||||
| } | |||||
| protected override void BuildBody(System.Web.UI.Control parent) | |||||
| { | |||||
| base.BuildBody(parent); | |||||
| AddDetail(parent.EAdd(new TitlePanel("单据明细", "单据明细"))); | |||||
| } | |||||
| private void AddDetail(TitlePanel titlePanel) | |||||
| { | |||||
| if (CanSave) | |||||
| titlePanel.EAdd(new TSButton("载入", LoadDetail)); | |||||
| var editor = new DFCollectionEditor<CostRecord_Detail>(() => Dmo.Details); | |||||
| editor.AllowDeletionFunc = () => CanSave; | |||||
| editor.CanDeleteFunc = detail => CanSave; | |||||
| editor.IsEditableFunc = (field, detail) => CanSave; | |||||
| _detailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) }); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("WeightBill_ID")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Supplier_Name")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Employee_Name")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Car_Name")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("BuyNum")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn("Mileage")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn("TransferFee")); | |||||
| _detailGrid.Columns.Add(new DFEditGridColumn("JingJiFee")); | |||||
| var section = mPageLayoutManager.AddSection("DetaiColumns", "明细列"); | |||||
| titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name); | |||||
| section.ApplyLayout(_detailGrid, mPageLayoutManager, DFInfo.Get(typeof(CostRecord_Detail))); | |||||
| } | |||||
| private void LoadDetail(object sender, EventArgs e) | |||||
| { | |||||
| GetFromUI(); | |||||
| if (Dmo.PurchaseType_ID == null) | |||||
| throw new Exception("请选择收购类型"); | |||||
| Dmo.Details.Clear(); | |||||
| var query = new DQueryDom(new JoinAlias("_weighBill", typeof(WeighBill))); | |||||
| query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PurchaseType_ID", Dmo.PurchaseType_ID), DQCondition.EQ(DQExpression.Snippet("CAST([_weighBill].[WeighTime] AS DATE)"), DQExpression.Value(Dmo.Date)), DQCondition.GreaterThanOrEqual("BillState", 单据状态.已审核))); | |||||
| query.Columns.Add(DQSelectColumn.Field("ID")); | |||||
| query.Columns.Add(DQSelectColumn.Field("Supplier_Name")); | |||||
| query.Columns.Add(DQSelectColumn.Field("Employee_Name")); | |||||
| query.Columns.Add(DQSelectColumn.Field("Car_Name")); | |||||
| query.Columns.Add(DQSelectColumn.Field("BuyNum")); | |||||
| query.OrderBy.Expressions.Add(DQOrderByExpression.Create("WeighTime")); | |||||
| using (var session = Forks.EnterpriseServices.DomainObjects2.Dmo.NewSession()) | |||||
| { | |||||
| using (var reader = session.ExecuteReader(query)) | |||||
| { | |||||
| while (reader.Read()) | |||||
| { | |||||
| var detail = new CostRecord_Detail() | |||||
| { | |||||
| WeightBill_ID = (long)reader[0], | |||||
| Supplier_Name = (string)reader[1], | |||||
| Employee_Name = (string)reader[2], | |||||
| Car_Name = (string)reader[3], | |||||
| BuyNum = (int?)reader[4] | |||||
| }; | |||||
| Dmo.Details.Add(detail); | |||||
| } | |||||
| } | |||||
| } | |||||
| _detailGrid.DataBind(); | |||||
| } | |||||
| public override void AppToUI() | |||||
| { | |||||
| base.AppToUI(); | |||||
| _detailGrid.DataBind(); | |||||
| } | |||||
| public override void GetFromUI() | |||||
| { | |||||
| base.GetFromUI(); | |||||
| _detailGrid.GetFromUI(); | |||||
| } | |||||
| protected override void InitNewDmo(CostRecord dmo) | |||||
| { | |||||
| base.InitNewDmo(dmo); | |||||
| var profile = DomainUserProfileUtil.Load<B3ButcherManageUserProfile>(); | |||||
| if (profile.AccountingUnit_ID.HasValue) | |||||
| { | |||||
| dmo.AccountingUnit_ID = profile.AccountingUnit_ID; | |||||
| dmo.AccountingUnit_Name = profile.AccountingUnit_Name; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,35 @@ | |||||
| using BWP.B3QingDaoWanFu.BL; | |||||
| using BWP.B3QingDaoWanFu.BO; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebControls2; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_ | |||||
| { | |||||
| class CostRecordList : DomainBillListPage<CostRecord, ICostRecordBL> | |||||
| { | |||||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||||
| { | |||||
| vPanel.Add(CreateDefaultBillQueryControls((panel, config) => | |||||
| { | |||||
| config.Add("Date"); | |||||
| config.Add("AccountingUnit_ID"); | |||||
| config.Add("PurchaseType_ID"); | |||||
| config.Remvoe("Remark"); | |||||
| })); | |||||
| } | |||||
| protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field) | |||||
| { | |||||
| base.AddDFBrowseGridColumn(grid, field); | |||||
| if (field == "BillState") | |||||
| { | |||||
| AddDFBrowseGridColumn(grid, "AccountingUnit_Name"); | |||||
| AddDFBrowseGridColumn(grid, "Date"); | |||||
| AddDFBrowseGridColumn(grid, "PurchaseType_Name"); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,58 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <Select xmlns="urn:XDQuery"> | |||||
| <Columns> | |||||
| <Field name="ID"/> | |||||
| </Columns> | |||||
| <From> | |||||
| <DmoClass class="BWP.B3QingDaoWanFu.BO.CostRecord, B3QingDaoWanFu"/> | |||||
| </From> | |||||
| <Where> | |||||
| <And> | |||||
| <EQ> | |||||
| <Field name="ID"/> | |||||
| <QBE paramName="ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="AccountingUnit_ID"/> | |||||
| <QBE paramName="AccountingUnit_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="PurchaseType_ID"/> | |||||
| <QBE paramName="PurchaseType_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="IsLocked"/> | |||||
| <QBE paramName="IsLocked"/> | |||||
| </EQ> | |||||
| <Contains> | |||||
| <Field name="CreateUser_Name"/> | |||||
| <QBE paramName="CreateUser_Name"/> | |||||
| </Contains> | |||||
| <Contains> | |||||
| <Field name="CheckUser_Name"/> | |||||
| <QBE paramName="CheckUser_Name"/> | |||||
| </Contains> | |||||
| <GreaterThanOrEqual> | |||||
| <Field name="CreateTime"/> | |||||
| <QBE paramName="MinCreateTime" /> | |||||
| </GreaterThanOrEqual> | |||||
| <LessThanOrEqual> | |||||
| <Field name="CreateTime"/> | |||||
| <QBE paramName="MaxCreateTime"/> | |||||
| </LessThanOrEqual> | |||||
| <GreaterThanOrEqual> | |||||
| <Field name="Date"/> | |||||
| <QBE paramName="MinDate" /> | |||||
| </GreaterThanOrEqual> | |||||
| <LessThanOrEqual> | |||||
| <Field name="Date"/> | |||||
| <QBE paramName="MaxDate"/> | |||||
| </LessThanOrEqual> | |||||
| <EQ> | |||||
| <Field name="BillState"/> | |||||
| <QBE paramName ="BillState"/> | |||||
| </EQ> | |||||
| </And> | |||||
| </Where> | |||||
| </Select> | |||||
| @ -0,0 +1,19 @@ | |||||
| using BWP.B3QingDaoWanFu.BL; | |||||
| using BWP.B3QingDaoWanFu.BO; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_ | |||||
| { | |||||
| class CostRecordPrint : DomainTemplatePrintPage<CostRecord, ICostRecordBL> | |||||
| { | |||||
| protected override void AddParameters(IDictionary<string, object> dic) | |||||
| { | |||||
| dic.Add("$ID", Dmo.ID); | |||||
| dic.Add("$Details", Dmo.Details); | |||||
| dic.Add("$DetailType", typeof(CostRecord_Detail)); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,134 @@ | |||||
| using BWP.B3ExportBase; | |||||
| using BWP.B3ExportBase.Utils; | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.B3QingDaoWanFu.BL; | |||||
| using BWP.B3UnitedInfos; | |||||
| using BWP.B3UnitedInfos.BO; | |||||
| using BWP.Web.Layout; | |||||
| using BWP.Web.Pages.B3ExportBase; | |||||
| using BWP.Web.Utils; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using Forks.EnterpriseServices.SqlDoms; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Web.UI; | |||||
| using TSingSoft.WebControls2; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.ExportUI | |||||
| { | |||||
| // [LogicName("存货导MES")] | |||||
| class GoodsExportToMES : ExportBaseInfoList<Goods, IGoodsExportBL> | |||||
| { | |||||
| private ChoiceBox _dfcUrl; | |||||
| protected override void AddExportControl(HLayoutPanel hbox) | |||||
| { | |||||
| hbox.Add(new SimpleLabel("外部系统")); | |||||
| _dfcUrl = hbox.Add(new ChoiceBox()); | |||||
| _dfcUrl.DataKind = B3ExportBaseConsts.DataSources.外部系统; | |||||
| _dfcUrl.EnableInputArgument = true; | |||||
| _dfcUrl.SmartOrderEnabled = false; | |||||
| _dfcUrl.EnableTopItem = true; | |||||
| _dfcUrl.Width = 130; | |||||
| base.AddExportControl(hbox); | |||||
| } | |||||
| protected override string DoExport(List<long> idList) | |||||
| { | |||||
| if (idList.Count == 0) | |||||
| { | |||||
| throw new ApplicationException("请选择档案!"); | |||||
| } | |||||
| if (_dfcUrl.IsEmpty) | |||||
| { | |||||
| throw new ApplicationException("请选择外部系统!"); | |||||
| } | |||||
| BL.Export(idList, long.Parse(_dfcUrl.Value)); | |||||
| return BIFactory.GetLastMessage(); | |||||
| } | |||||
| public override string Url | |||||
| { | |||||
| get { return "~/B3QingDaoWanFu/ExportUI/GoodsExportToMES.aspx"; } | |||||
| } | |||||
| protected override string Caption | |||||
| { | |||||
| get { return "存货导MES存货"; } | |||||
| } | |||||
| protected override string EditUrl | |||||
| { | |||||
| get | |||||
| { | |||||
| return "B3UnitedInfos/BaseInfos/Goods_/GoodsEdit.aspx"; | |||||
| } | |||||
| } | |||||
| protected override DQueryDom GetQueryDom() | |||||
| { | |||||
| var query = base.GetQueryDom(); | |||||
| var goodsProperty = query.EJoin<GoodsProperty>(); | |||||
| var catalog = query.EJoin<GoodsPropertyCatalog>("GoodsPropertyCatalog_ID", JoinType.Left, goodsProperty); | |||||
| query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(goodsProperty, "Name"), "存货属性")); | |||||
| query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(catalog, "Name"), "存货属性分类")); | |||||
| TreeUtil.AddTreeCondition<GoodsPropertyCatalog>(query, mQueryContainer, "存货属性分类", catalog); | |||||
| DomainUtil.AddDomainPermissionLimit(query, typeof(GoodsProperty), goodsProperty); | |||||
| return query; | |||||
| } | |||||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||||
| { | |||||
| vPanel.Add(CreateDefaultBaseInfoQueryControls((layoutManager, config) => | |||||
| { | |||||
| layoutManager.Add("存货属性分类", new SimpleLabel("属性分类"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3UnitedInfosConsts.DataSources.存货属性分类)); | |||||
| config.AddAfter("GoodsProperty_ID", "ID"); | |||||
| config.AddBefore("存货属性分类", "GoodsProperty_ID"); | |||||
| config.Add("ProductLine_ID"); | |||||
| config.Add("Brand"); | |||||
| config.Add("Origin"); | |||||
| })); | |||||
| } | |||||
| protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field) | |||||
| { | |||||
| base.AddDFBrowseGridColumn(grid, field); | |||||
| if (field == "Name") | |||||
| { | |||||
| AddDFBrowseGridColumn(grid, "Brand"); | |||||
| AddDFBrowseGridColumn(grid, "Origin"); | |||||
| AddDFBrowseGridColumn(grid, "存货属性"); | |||||
| AddDFBrowseGridColumn(grid, "存货属性分类"); | |||||
| AddDFBrowseGridColumn(grid, "ProductLine_Name"); | |||||
| AddDFBrowseGridColumn(grid, "MainUnit"); | |||||
| AddDFBrowseGridColumn(grid, "SecondUnit"); | |||||
| AddDFBrowseGridColumn(grid, "Spec"); | |||||
| } | |||||
| } | |||||
| protected override void OnLoad(EventArgs e) | |||||
| { | |||||
| base.OnLoad(e); | |||||
| if (!IsPostBack) | |||||
| { | |||||
| var tuple = ExportConfigUtil.LoadDefaultExtSystems(MethodID); | |||||
| if (tuple != null) | |||||
| { | |||||
| _dfcUrl.Value = tuple.Item1.ToString(); | |||||
| _dfcUrl.DisplayValue = tuple.Item2; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,59 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <Select xmlns="urn:XDQuery"> | |||||
| <Columns> | |||||
| <Field name="ID"/> | |||||
| </Columns> | |||||
| <From> | |||||
| <DmoClass class="BWP.B3UnitedInfos.BO.Goods, B3UnitedInfos"/> | |||||
| </From> | |||||
| <Where> | |||||
| <And> | |||||
| <EQ> | |||||
| <Field name="ID"/> | |||||
| <QBE paramName="ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="GoodsProperty_ID"/> | |||||
| <QBE paramName="GoodsProperty_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="ProductLine_ID"/> | |||||
| <QBE paramName="ProductLine_ID"/> | |||||
| </EQ> | |||||
| <Or> | |||||
| <Contains> | |||||
| <Field name="Name"/> | |||||
| <QBE paramName="Name"/> | |||||
| </Contains> | |||||
| <Contains> | |||||
| <Field name="Spell"/> | |||||
| <QBE paramName="Name"/> | |||||
| </Contains> | |||||
| </Or> | |||||
| <Contains> | |||||
| <Field name="Code"/> | |||||
| <QBE paramName="Code"/> | |||||
| </Contains> | |||||
| <EQ> | |||||
| <Field name="Stopped"/> | |||||
| <QBE paramName="Stopped"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="IsLocked"/> | |||||
| <QBE paramName="IsLocked"/> | |||||
| </EQ> | |||||
| <Contains> | |||||
| <Field name="Brand"/> | |||||
| <QBE paramName="Brand"/> | |||||
| </Contains> | |||||
| <Contains> | |||||
| <Field name="Origin"/> | |||||
| <QBE paramName="Origin"/> | |||||
| </Contains> | |||||
| <Contains> | |||||
| <Field name="Remark"/> | |||||
| <QBE paramName="Remark"/> | |||||
| </Contains> | |||||
| </And> | |||||
| </Where> | |||||
| </Select> | |||||
| @ -0,0 +1,20 @@ | |||||
| using BWP.Web.Pages.B3ButcherManage.Bills.StatPay_; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebControls2; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.Overlays | |||||
| { | |||||
| class StatPayList_Ext : StatPayList | |||||
| { | |||||
| protected override void InitToolBar(TSingSoft.WebControls2.HLayoutPanel toolbar) | |||||
| { | |||||
| base.InitToolBar(toolbar); | |||||
| var button = new TSButton("养殖户分析") { UseSubmitBehavior = false }; | |||||
| button.OnClientClick = "preventEventDefault(event);OpenUrlInTopTab('B3QingDaoWanFu/Reports/StatPayAnalyse.aspx','养殖户分析');"; | |||||
| toolbar.Add(button); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,162 @@ | |||||
| using BWP.B3ButcherManage; | |||||
| using BWP.B3ButcherManage.BO; | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||||
| using BWP.Web.Layout; | |||||
| using BWP.Web.Utils; | |||||
| 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.WebControls2; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| namespace BWP.Web.Pages.B3QingDaoWanFu.Reports | |||||
| { | |||||
| class StatPayAnalyse : DFGridReportPage<StatPay> | |||||
| { | |||||
| protected override string AccessRoleName | |||||
| { | |||||
| get { return "B3QingDaoWanFu.报表.结算单分析"; } | |||||
| } | |||||
| protected override string Caption | |||||
| { | |||||
| get { return "结算单分析"; } | |||||
| } | |||||
| protected override string QueryOptionsTabName | |||||
| { | |||||
| get | |||||
| { | |||||
| return "显示字段"; | |||||
| } | |||||
| } | |||||
| protected override void InitForm(System.Web.UI.HtmlControls.HtmlForm form) | |||||
| { | |||||
| base.InitForm(form); | |||||
| mDFGrid.AllowRowGroup = true; | |||||
| } | |||||
| public override Forks.EnterpriseServices.DataForm.PagedDFDataTable GetPagedDFDataTable(TSingSoft.WebControls2.DFGrids.QuerySettings settings) | |||||
| { | |||||
| var result = base.GetPagedDFDataTable(settings); | |||||
| var billSum = GetBillSum(); | |||||
| if (billSum != null) | |||||
| { | |||||
| if (ColumnNames.Contains("实付金额")) | |||||
| result.Data.SumRow["实付金额"] = billSum.Item1; | |||||
| if (ColumnNames.Contains("收购头数")) | |||||
| result.Data.SumRow["收购头数"] = billSum.Item2; | |||||
| if (ColumnNames.Contains("收购重量")) | |||||
| result.Data.SumRow["收购重量"] = billSum.Item3; | |||||
| } | |||||
| return result; | |||||
| } | |||||
| Tuple<Money<金额>?, int?, Money<decimal>?> GetBillSum() | |||||
| { | |||||
| var query = base.GetQueryDom(); | |||||
| var n = new DQueryDom(new JoinAlias(typeof(StatPay))); | |||||
| n.Where.Conditions.Add(DQCondition.And(query.Where.Conditions)); | |||||
| n.Columns.Add(DQSelectColumn.Sum("ActualMoney")); | |||||
| n.Columns.Add(DQSelectColumn.Sum("RealNumber")); | |||||
| n.Columns.Add(DQSelectColumn.Sum("RealWeight")); | |||||
| return n.EExecuteScalar<Money<金额>?, int?, Money<decimal>?>(); | |||||
| } | |||||
| public override Forks.EnterpriseServices.DataForm.DFDataTable GetDFDataTable(TSingSoft.WebControls2.DFGrids.QuerySettings settings) | |||||
| { | |||||
| var result = base.GetDFDataTable(settings); | |||||
| var billSum = GetBillSum(); | |||||
| if (billSum != null) | |||||
| { | |||||
| if (ColumnNames.Contains("实付金额")) | |||||
| result.SumRow["实付金额"] = billSum.Item1; | |||||
| if (ColumnNames.Contains("收购头数")) | |||||
| result.SumRow["收购头数"] = billSum.Item2; | |||||
| if (ColumnNames.Contains("收购重量")) | |||||
| result.SumRow["收购重量"] = billSum.Item3; | |||||
| } | |||||
| return result; | |||||
| } | |||||
| protected override void InitQueryPanel(WebControls.QueryPanel queryPanel) | |||||
| { | |||||
| base.InitQueryPanel(queryPanel); | |||||
| queryPanel.ConditonPanel.EAdd(CreateDatePanel()); | |||||
| } | |||||
| private HLayoutPanel CreateDatePanel() | |||||
| { | |||||
| var panel = new HLayoutPanel(); | |||||
| panel.Add(new SimpleLabel("核算日期")); | |||||
| panel.Add(QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate", DateTime.Today, null)); | |||||
| return panel; | |||||
| } | |||||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||||
| { | |||||
| var layout = new LayoutManager("Main", mDFInfo, mQueryContainer); | |||||
| var config = new AutoLayoutConfig { Cols = 4 }; | |||||
| config.Add("ID"); | |||||
| config.Add("BillState"); | |||||
| config.Add("Supplier_ID"); | |||||
| config.Add("Employee_ID"); | |||||
| config.Add("PurchaseType_ID"); | |||||
| config.Add("Weigh_ID"); | |||||
| config.Add("WeighTime"); | |||||
| layout.Config = config; | |||||
| vPanel.Add(layout.CreateLayout()); | |||||
| } | |||||
| ReportDisplayOptionHelper mDisplayHelper = new ReportDisplayOptionHelper(); | |||||
| protected override void AddQueryOptions(VLayoutPanel vPanel)//显示字段 | |||||
| { | |||||
| mDisplayHelper.AddOptionItem("过磅日期", () => DQExpression.Snippet("CAST([_weight].[WeighTime] AS DATE)").ECastType<DateTime?>(), false); | |||||
| mDisplayHelper.AddOptionItem("过磅单号", "_bill", "Weigh_ID", false); | |||||
| mDisplayHelper.AddOptionItem("结算日期", "_bill", "Date", false); | |||||
| mDisplayHelper.AddOptionItem("结算单号", "_bill", "ID", false); | |||||
| mDisplayHelper.AddOptionItem("供应商", "_bill", "Supplier_Name", false); | |||||
| mDisplayHelper.AddOptionItem("收购头数", "_bill", "RealNumber", false); | |||||
| mDisplayHelper.AddOptionItem("收购重量", "_bill", "RealWeight", false); | |||||
| mDisplayHelper.AddOptionItem("实付金额", "_bill", "ActualMoney", false); | |||||
| mDisplayHelper.AddOptionItem("养殖户", "_detail", "Farmer_Name", false); | |||||
| mDisplayHelper.AddOptionItem("身份证号", "_detail", "Farmer_IDCard", false); | |||||
| mDisplayHelper.AddOptionItem("地址", "_detail", "Farmer_Address", false); | |||||
| mDisplayHelper.AddOptionItem("电话", "_detail", "Farmer_Tel", false); | |||||
| mDisplayHelper.AddOptionItem("棚前头数", "_detail", "Number", false, true); | |||||
| mDisplayHelper.AddOptionItem("棚前重量", "_detail", "ExeWeight", false, true); | |||||
| mDisplayHelper.AddOptionItem("棚前金额", "_detail", "ExtMoney", false, true); | |||||
| AddQueryOption("选项", mDisplayHelper.GetAllDisplayNames(), mDisplayHelper.GetDefaultSelelectedDisplayNames()); | |||||
| base.AddQueryOptions(vPanel); | |||||
| } | |||||
| protected override DQueryDom GetQueryDom() | |||||
| { | |||||
| var query = base.GetQueryDom(); | |||||
| var root = query.From.RootSource.Alias; | |||||
| var weight = new JoinAlias("_weight", typeof(WeighBill)); | |||||
| var detail = new JoinAlias("_detail", typeof(Weigh_FarmerDetail)); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(weight), DQCondition.EQ(root, "Weigh_ID", weight, "ID")); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(detail), DQCondition.EQ(root, "Weigh_ID", detail, "Weigh_ID")); | |||||
| mDisplayHelper.AddAlias("_bill", root); | |||||
| mDisplayHelper.AddAlias("_weight", weight); | |||||
| mDisplayHelper.AddAlias("_detail", detail); | |||||
| mDisplayHelper.AddSelectColumns(query, (name) => OptionIsSelected("选项", name), SumColumnNames, ColumnNames); | |||||
| query.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID)); | |||||
| return query; | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,53 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <Select xmlns="urn:XDQuery"> | |||||
| <Columns> | |||||
| </Columns> | |||||
| <From> | |||||
| <DmoClass class="BWP.B3ButcherManage.BO.StatPay, B3ButcherManage" alias="_bill"/> | |||||
| </From> | |||||
| <Where> | |||||
| <And> | |||||
| <EQ> | |||||
| <Field name="ID"/> | |||||
| <QBE paramName="ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="Supplier_ID"/> | |||||
| <QBE paramName="Supplier_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="Employee_ID"/> | |||||
| <QBE paramName="Employee_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="PurchaseType_ID"/> | |||||
| <QBE paramName="PurchaseType_ID"/> | |||||
| </EQ> | |||||
| <EQ> | |||||
| <Field name="Weigh_ID"/> | |||||
| <QBE paramName="Weigh_ID"/> | |||||
| </EQ> | |||||
| <GreaterThanOrEqual> | |||||
| <Field name="Date"/> | |||||
| <QBE paramName="MinDate" /> | |||||
| </GreaterThanOrEqual> | |||||
| <LessThanOrEqual> | |||||
| <Field name="Date"/> | |||||
| <QBE paramName="MaxDate"/> | |||||
| </LessThanOrEqual> | |||||
| <GreaterThanOrEqual> | |||||
| <Field name="WeighTime"/> | |||||
| <QBE paramName="MinWeighTime" /> | |||||
| </GreaterThanOrEqual> | |||||
| <LessThanOrEqual> | |||||
| <Field name="WeighTime"/> | |||||
| <QBE paramName="MaxWeighTime"/> | |||||
| </LessThanOrEqual> | |||||
| <EQ> | |||||
| <Field name="BillState"/> | |||||
| <QBE paramName="BillState"/> | |||||
| </EQ> | |||||
| </And> | |||||
| </Where> | |||||
| </Select> | |||||
| @ -0,0 +1,20 @@ | |||||
| using BWP.B3Frameworks.BL; | |||||
| using BWP.B3QingDaoWanFu.BO; | |||||
| using Forks.EnterpriseServices; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| namespace BWP.B3QingDaoWanFu.BL | |||||
| { | |||||
| [BusinessInterface(typeof(CostRecordBL))] | |||||
| [LogicName("费用录入")] | |||||
| public interface ICostRecordBL : IDomainBillBL<CostRecord> | |||||
| { } | |||||
| public class CostRecordBL : DomainBillBL<CostRecord>, ICostRecordBL | |||||
| { | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,135 @@ | |||||
| using BWP.B3ExportBase; | |||||
| using BWP.B3ExportBase.BL; | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3UnitedInfos.BO; | |||||
| using Forks.EnterpriseServices; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebPluginFramework.BIPlugins.BLEvents; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.B3ExportBase.BO; | |||||
| using Forks.JsonRpc.Client; | |||||
| using Newtonsoft.Json; | |||||
| namespace BWP.B3QingDaoWanFu.BL | |||||
| { | |||||
| [BusinessInterface(typeof(GoodsExportBL))] | |||||
| public interface IGoodsExportBL : IExportBaseBL | |||||
| { | |||||
| void Export(List<long> dmoIDs, long extSystemID); | |||||
| void UpdateOrInsert(Goods goods); | |||||
| void Stop(string code); | |||||
| void Start(string code); | |||||
| void Delete(string code); | |||||
| } | |||||
| [LogicName("存货导MES存货")] | |||||
| [ExportID(B3FrameworksConsts.DmoTypeIDBases.B3QingDaoWanFu, B3QingDaoWanFuConsts.DmoTypeIDOffsets.GoodsExport)] | |||||
| public class GoodsExportBL : ExportBaseBL<Goods>, IGoodsExportBL | |||||
| { | |||||
| const string MethodPath = "/MainSystem/B3ClientService/Rpcs/InterfaceRpc/GoodsRpc/"; | |||||
| protected override void BeforeExport(List<long> dmoIDs) | |||||
| { | |||||
| Dmos = new List<Goods>(); | |||||
| var scriptHelper = new PythonScriptHelper(string.Empty, Config.Script, this); | |||||
| MinDmoProperties = new List<string>(); | |||||
| MinDetailProperties = new List<string>(); | |||||
| LoadFullDom = true; | |||||
| //在脚本里设置是否载入整张单据 或者部分字段 | |||||
| scriptHelper.Before(); | |||||
| if (LoadFullDom) | |||||
| { | |||||
| var list = new List<long>(); | |||||
| var query = new DmoQuery(typeof(Goods)); | |||||
| query.Where.Conditions.EFieldInList("ID", dmoIDs); | |||||
| foreach (Goods bill in Session.ExecuteList(query)) | |||||
| { | |||||
| if (list.IndexOf(bill.ID) == -1) | |||||
| { | |||||
| list.Add(bill.ID); | |||||
| Dmos.Add(bill); | |||||
| } | |||||
| } | |||||
| return; | |||||
| } | |||||
| LoadMinDmo(Dmos, dmoIDs); | |||||
| } | |||||
| private string _serverUrl; | |||||
| protected string ServerUrl | |||||
| { | |||||
| get { return _serverUrl; } | |||||
| set { _serverUrl = value; } | |||||
| } | |||||
| public void Export(List<long> dmoIDs, long extSystemID) | |||||
| { | |||||
| if (dmoIDs.Count == 0) | |||||
| throw new Exception("没有要导出的内容"); | |||||
| ExtSystemID = extSystemID; | |||||
| _serverUrl = InnerBLUtil.GetDmoPropertyByID<string>(Session, typeof(ExtSystem), "Address", extSystemID); | |||||
| if (string.IsNullOrEmpty(_serverUrl)) | |||||
| throw new Exception("外部系统地址不能为空"); | |||||
| BeforeExport(dmoIDs); | |||||
| DoExport(dmoIDs); | |||||
| } | |||||
| private void DoExport(List<long> dmoIDs) | |||||
| { | |||||
| var scriptHelper = new PythonScriptHelper(string.Empty, Config.Script, this); | |||||
| var dmos = Dmos.OrderBy(x => x.ID).ToList(); | |||||
| scriptHelper.AddLocalVar("dmos", dmos); | |||||
| scriptHelper.Execute(); | |||||
| InitRpc(); | |||||
| var json = JsonConvert.SerializeObject(dmos); | |||||
| RpcFacade.Call<int>(MethodPath + "BatchImport", json); | |||||
| BIFactory.MsgBuilder.Append("导出成功!"); | |||||
| } | |||||
| public void UpdateOrInsert(Goods goods) | |||||
| { | |||||
| RpcFacade.Call<int>(MethodPath + "UpdateOrInsert", JsonConvert.SerializeObject(goods)); | |||||
| } | |||||
| public void Stop(string code) | |||||
| { | |||||
| RpcFacade.Call<int>(MethodPath + "Stop", code); | |||||
| } | |||||
| public void Start(string code) | |||||
| { | |||||
| RpcFacade.Call<int>(MethodPath + "Start", code); | |||||
| } | |||||
| public void Delete(string code) | |||||
| { | |||||
| RpcFacade.Call<int>(MethodPath + "Delete", code); | |||||
| } | |||||
| void InitRpc() | |||||
| { | |||||
| try | |||||
| { | |||||
| RpcFacade.Init(_serverUrl, "B3QingFu"); | |||||
| } | |||||
| catch (Exception ex) | |||||
| { | |||||
| if (ex.Message != "Can only start once") | |||||
| throw; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,34 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using BWP.B3Frameworks.Utils; | |||||
| using BWP.B3Sale.BO; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| namespace BWP.B3QingDaoWanFu.BLActions | |||||
| { | |||||
| class BLActionUtil | |||||
| { | |||||
| public static void GetDepEmpByCustomer(IDmoSession session,long customerId,out long? depid,out long? empid) | |||||
| { | |||||
| depid = null; | |||||
| empid = null; | |||||
| var query = new DQueryDom(new JoinAlias(typeof(Customer))); | |||||
| query.Columns.Add(DQSelectColumn.Field("Department_ID")); | |||||
| query.Columns.Add(DQSelectColumn.Field("Employee_ID")); | |||||
| query.Where.Conditions.Add(DQCondition.EQ("ID",customerId)); | |||||
| using (var reader=session.ExecuteReader(query)) | |||||
| { | |||||
| if (reader.Read()) | |||||
| { | |||||
| depid = (long?) reader[0]; | |||||
| empid = (long?) reader[1]; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,82 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using BWP.B3Sale.BO; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| using TSingSoft.WebPluginFramework.BIPlugins.BLEvents; | |||||
| namespace BWP.B3QingDaoWanFu.BLActions | |||||
| { | |||||
| class SaleOrderCreateUpdateDepEmpBLAction: IBLMethodAction | |||||
| { | |||||
| public void Execute(IDmoContext context, object dmo, object parameter) | |||||
| { | |||||
| var order = dmo as Order; | |||||
| long? depid; | |||||
| long? empid; | |||||
| BLActionUtil.GetDepEmpByCustomer(context.Session,order.Customer_ID??0, out depid,out empid); | |||||
| if (depid != null) | |||||
| { | |||||
| order.Department_ID = depid; | |||||
| } | |||||
| if (empid != null) | |||||
| { | |||||
| order.Employee_ID = empid; | |||||
| } | |||||
| } | |||||
| public string Name | |||||
| { | |||||
| get { return "B3QingDaoWanFu.销售订单创建根据客户档案更新部门经办人"; } | |||||
| } | |||||
| public string Description | |||||
| { | |||||
| get { return "销售订单创建根据客户档案更新部门经办人"; } | |||||
| } | |||||
| public IList<string> Features | |||||
| { | |||||
| get { return new List<string>(); } | |||||
| } | |||||
| } | |||||
| class SaleOrderCheckUpdateDepEmpBLAction : IBLMethodAction | |||||
| { | |||||
| public void Execute(IDmoContext context, object dmo, object parameter) | |||||
| { | |||||
| var order = dmo as Order; | |||||
| long? depid; | |||||
| long? empid; | |||||
| BLActionUtil.GetDepEmpByCustomer(context.Session, order.Customer_ID ?? 0, out depid, out empid); | |||||
| if (depid.HasValue || empid.HasValue) | |||||
| { | |||||
| var updateDom = new DQUpdateDom(typeof(Order)); | |||||
| if (depid.HasValue) | |||||
| { | |||||
| updateDom.Columns.Add(new DQUpdateColumn("Department_ID", depid)); | |||||
| } | |||||
| if (empid.HasValue) | |||||
| { | |||||
| updateDom.Columns.Add(new DQUpdateColumn("Employee_ID", empid)); | |||||
| } | |||||
| updateDom.Where.Conditions.Add(DQCondition.EQ("ID",order.ID)); | |||||
| context.Session.ExecuteNonQuery(updateDom); | |||||
| } | |||||
| } | |||||
| public string Name | |||||
| { | |||||
| get { return "B3QingDaoWanFu.销售订单审核根据客户档案更新部门经办人"; } | |||||
| } | |||||
| public string Description | |||||
| { | |||||
| get { return "销售订单审核根据客户档案更新部门经办人"; } | |||||
| } | |||||
| public IList<string> Features | |||||
| { | |||||
| get { return new List<string>(); } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,39 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using BWP.B3Sale.BL; | |||||
| using BWP.B3Sale.BO; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using TSingSoft.WebPluginFramework.BIPlugins.BLEvents; | |||||
| namespace BWP.B3QingDaoWanFu.BLActions | |||||
| { | |||||
| //class SaleOutStoreCheckNullifyBLActions : IBLMethodAction | |||||
| //{ | |||||
| // public void Execute(IDmoContext context, object dmo, object parameter) | |||||
| // { | |||||
| // var bl = BIFactory.Create<ISaleOutStoreBL>(context.Session); | |||||
| // var outstore = dmo as SaleOutStore; | |||||
| // if (outstore.Details.Count == 0) | |||||
| // { | |||||
| // bl.UnCheck(outstore); | |||||
| // bl.Nullify(outstore); | |||||
| // } | |||||
| // } | |||||
| // public string Name | |||||
| // { | |||||
| // get { return "B3QingDaoWanFu.销售出库审核作废没有明细的单据"; } | |||||
| // } | |||||
| // public string Description | |||||
| // { | |||||
| // get { return "销售出库审核作废没有明细的单据"; } | |||||
| // } | |||||
| // public IList<string> Features | |||||
| // { | |||||
| // get { return new List<string>(); } | |||||
| // } | |||||
| //} | |||||
| } | |||||
| @ -0,0 +1,56 @@ | |||||
| using BWP.B3ButcherManage.BO; | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3Frameworks.BO; | |||||
| using Forks.EnterpriseServices; | |||||
| using Forks.EnterpriseServices.DataForm; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebControls2; | |||||
| namespace BWP.B3QingDaoWanFu.BO | |||||
| { | |||||
| [DFClass, Serializable, LogicName("费用录入")] | |||||
| public class CostRecord : DomainBill, IAccountingUnitBill | |||||
| { | |||||
| [LogicName("会计单位")] | |||||
| [DFNotEmpty] | |||||
| [DFExtProperty("WebControlType", DFEditControl.ChoiceBox)] | |||||
| [DFDataKind(B3FrameworksConsts.DataSources.授权会计单位)] | |||||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3FrameworksConsts.DataSources.授权会计单位全部)] | |||||
| [DFExtProperty("DisplayField", "AccountingUnit_Name")] | |||||
| public long? AccountingUnit_ID { get; set; } | |||||
| DateTime date = DateTime.Today.AddDays(-1); | |||||
| [LogicName("过磅日期")] | |||||
| public DateTime Date { get { return date; } set { date = value; } } | |||||
| [LogicName("收购类型")] | |||||
| [DFNotEmpty] | |||||
| [DFExtProperty("WebControlType", DFEditControl.ChoiceBox)] | |||||
| [DFDataKind(B3ButcherManage.B3ButcherManageConsts.DataSources.收购类型)] | |||||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ButcherManage.B3ButcherManageConsts.DataSources.收购类型)] | |||||
| [DFExtProperty("DisplayField", "PurchaseType_Name")] | |||||
| public long? PurchaseType_ID { get; set; } | |||||
| private CostRecord_DetailCollection _details = new CostRecord_DetailCollection(); | |||||
| [OneToMany(typeof(CostRecord_Detail), "ID")] | |||||
| [Join("ID", "CostRecord_ID")] | |||||
| public CostRecord_DetailCollection Details | |||||
| { | |||||
| get { return _details; } | |||||
| } | |||||
| [ReferenceTo(typeof(AccountingUnit), "Name")] | |||||
| [LogicName("会计单位")] | |||||
| [Join("AccountingUnit_ID", "ID")] | |||||
| public string AccountingUnit_Name { get; set; } | |||||
| [ReferenceTo(typeof(PurchaseType), "Name")] | |||||
| [LogicName("收购类型")] | |||||
| [Join("PurchaseType_ID", "ID")] | |||||
| public string PurchaseType_Name { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,56 @@ | |||||
| using BWP.B3ButcherManage.BO; | |||||
| using BWP.B3Frameworks.BO; | |||||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||||
| using Forks.EnterpriseServices; | |||||
| using Forks.EnterpriseServices.DataForm; | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using Forks.Utils; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| namespace BWP.B3QingDaoWanFu.BO | |||||
| { | |||||
| [Serializable, DFClass, LogicName("费用录入_明细")] | |||||
| public class CostRecord_Detail : Base | |||||
| { | |||||
| public long CostRecord_ID { get; set; } | |||||
| [LogicName("过磅单号")] | |||||
| public long WeightBill_ID { get; set; } | |||||
| [LogicName("里程")] | |||||
| public decimal? Mileage { get; set; } | |||||
| [LogicName("人工费")] | |||||
| public Money<金额>? JingJiFee { get; set; } | |||||
| [LogicName("运费")] | |||||
| public Money<金额>? TransferFee { get; set; } | |||||
| [LogicName("供应商")] | |||||
| [ReferenceTo(typeof(WeighBill), "Supplier_Name")] | |||||
| [Join("WeightBill_ID", "ID")] | |||||
| public string Supplier_Name { get; set; } | |||||
| [LogicName("车辆")] | |||||
| [ReferenceTo(typeof(WeighBill), "Car_Name")] | |||||
| [Join("WeightBill_ID", "ID")] | |||||
| public string Car_Name { get; set; } | |||||
| [LogicName("经纪人")] | |||||
| [ReferenceTo(typeof(WeighBill), "Employee_Name")] | |||||
| [Join("WeightBill_ID", "ID")] | |||||
| public string Employee_Name { get; set; } | |||||
| [LogicName("头数")] | |||||
| [ReferenceTo(typeof(WeighBill), "BuyNum")] | |||||
| [Join("WeightBill_ID", "ID")] | |||||
| public int? BuyNum { get; set; } | |||||
| } | |||||
| [Serializable] | |||||
| public class CostRecord_DetailCollection : DmoCollection<CostRecord_Detail> | |||||
| { } | |||||
| } | |||||
| @ -0,0 +1,17 @@ | |||||
| using Forks.EnterpriseServices.DomainObjects2; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| namespace BWP.B3QingDaoWanFu.BO | |||||
| { | |||||
| [BOClass] | |||||
| [KeyField("SaleOutStore_ID", KeyGenType.assigned)] | |||||
| public class SaleOutStoreBarCodeToMESLog | |||||
| { | |||||
| public long SaleOutStore_ID { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,170 @@ | |||||
| using BWP.B3ProcurementInterface.Utils; | |||||
| using BWP.B3QingDaoWanFu.BO; | |||||
| using BWP.B3Sale.BO; | |||||
| 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 System.Threading; | |||||
| using TSingSoft.WebPluginFramework.TimerTasks; | |||||
| using TSingSoft.WebPluginFramework; | |||||
| using Forks.JsonRpc.Client; | |||||
| using Newtonsoft.Json; | |||||
| using BWP.B3Frameworks.BO.NamedValueTemplate; | |||||
| using BWP.B3ButcherManage.Utils; | |||||
| namespace BWP.B3QingDaoWanFu.Tasks | |||||
| { | |||||
| public class SyncSaleOutStoreInfoToMES : ITimerTask | |||||
| { | |||||
| volatile static object _lockObj = new object(); | |||||
| public void Execute() | |||||
| { | |||||
| if (!Monitor.TryEnter(_lockObj)) | |||||
| { | |||||
| throw new SameTaskNotFinishException(this); | |||||
| } | |||||
| try | |||||
| { | |||||
| DoExecute(); | |||||
| } | |||||
| finally | |||||
| { | |||||
| Monitor.Exit(_lockObj); | |||||
| } | |||||
| } | |||||
| private void DoExecute() | |||||
| { | |||||
| if (!ClientServerFacedRpcFacadeUtil.InitRpcFacade()) | |||||
| return; | |||||
| var main = new JoinAlias(typeof(SaleOutStore)); | |||||
| var relate = new JoinAlias(typeof(SaleOutStoreBarCodeToMESLog)); | |||||
| var detail = new JoinAlias(typeof(SaleOutStore_Detail)); | |||||
| var weight = new JoinAlias(typeof(WeightingInfor)); | |||||
| var scan = new JoinAlias(typeof(WeightingInfo_ScanDetail)); | |||||
| var temp = new JoinAlias(typeof(Temp)); | |||||
| var query = new DQueryDom(main); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(relate), DQCondition.EQ(main, "ID", relate, "SaleOutStore_ID")); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "SaleOutStore_ID")); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(weight), DQCondition.And(DQCondition.EQ(detail, "ID", weight, "DetailID"), DQCondition.EQ(weight, "BillType", DmoTypeIDAttribute.GetID(typeof(SaleOutStore))))); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(scan), DQCondition.And(DQCondition.EQ(detail, "ID", scan, "Detail_ID"), DQCondition.EQ(weight, "ID", scan, "WeightingInfo_ID"))); | |||||
| query.RegisterQueryTable(typeof(Temp), new string[] { "GroupID", "Weight" }, Temp.GetQueryDom()); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(temp), DQCondition.EQ(detail, "ID", temp, "GroupID")); | |||||
| query.Columns.Add(DQSelectColumn.Field("ID", main)); | |||||
| query.Columns.Add(DQSelectColumn.Field("BarCode", scan)); | |||||
| query.Columns.Add(DQSelectColumn.Field("NetWeight", weight)); | |||||
| query.Columns.Add(DQSelectColumn.Field("ID", detail)); | |||||
| query.Columns.Add(DQSelectColumn.Field("LoadTime", main)); | |||||
| query.Columns.Add(DQSelectColumn.Field("Goods_Code", detail)); | |||||
| query.Columns.Add(DQSelectColumn.Field("Weight", temp)); | |||||
| query.Where.Conditions.Add(DQCondition.And(DQCondition.GreaterThanOrEqual("BillState", 单据状态.已审核), DQCondition.IsNull(DQExpression.Field(relate, "SaleOutStore_ID")), DQCondition.IsNotNull(DQExpression.Field(scan, "ID")))); | |||||
| query.OrderBy.Expressions.Add(DQOrderByExpression.Create(main, "ID")); | |||||
| query.OrderBy.Expressions.Add(DQOrderByExpression.Create(weight, "NetWeight", true)); | |||||
| using (var session = Dmo.NewSession()) | |||||
| { | |||||
| var list = new List<CarcassSaleOutStoreObj>(); | |||||
| var ids = new List<long>(); | |||||
| var discont = new Dictionary<long, decimal>(); | |||||
| using (var reader = session.ExecuteReader(query)) | |||||
| { | |||||
| while (reader.Read()) | |||||
| { | |||||
| var id = (long)reader[0]; | |||||
| if (!ids.Contains(id)) | |||||
| ids.Add(id); | |||||
| var entity = new CarcassSaleOutStoreObj(); | |||||
| entity.BarCode = (string)reader[1]; | |||||
| var wv = ((Money<decimal>?)reader[2]).EToDecimal(); | |||||
| entity.GroupID = (long)reader[3]; | |||||
| if (wv < 0) | |||||
| { | |||||
| var first = list.FirstOrDefault(x => x.GroupID == entity.GroupID && x.BarCode == entity.BarCode); | |||||
| if (first != null) | |||||
| list.Remove(first); | |||||
| continue; | |||||
| } | |||||
| entity.Time = (DateTime?)reader[4]; | |||||
| entity.SaleGoods_Code = (string)reader[5]; | |||||
| entity.Weight = (decimal?)reader[6]; | |||||
| list.Add(entity); | |||||
| } | |||||
| } | |||||
| if (ids.Count == 0) | |||||
| return; | |||||
| if (list.Any()) | |||||
| { | |||||
| foreach (var g in list.GroupBy(x => x.GroupID)) | |||||
| { | |||||
| var first = true; | |||||
| foreach (var item in g) | |||||
| { | |||||
| if (first) | |||||
| first = false; | |||||
| else | |||||
| item.Weight = 0; | |||||
| } | |||||
| } | |||||
| var slist = TraceBackInfoUtil.SplitList(list, 1000); | |||||
| foreach (var items in slist) | |||||
| { | |||||
| var par = JsonConvert.SerializeObject(items); | |||||
| var json = RpcFacade.Call<int>("/MainSystem/B3ClientService/Rpcs/CarcassSaleOutStoreRpc/UploadCarcassInfo", par); | |||||
| } | |||||
| } | |||||
| foreach (var item in ids) | |||||
| session.Insert(new SaleOutStoreBarCodeToMESLog { SaleOutStore_ID = item }); | |||||
| session.Commit(); | |||||
| } | |||||
| } | |||||
| public string Name | |||||
| { | |||||
| get { return "上传审核的销售出库扫码信息到MES"; } | |||||
| } | |||||
| class Temp | |||||
| { | |||||
| public long GroupID { get; set; } | |||||
| public decimal? Weight { get; set; } | |||||
| public static DQueryDom GetQueryDom() | |||||
| { | |||||
| var main = new JoinAlias(typeof(SaleOutStore)); | |||||
| var relate = new JoinAlias(typeof(SaleOutStoreBarCodeToMESLog)); | |||||
| var detail = new JoinAlias(typeof(SaleOutStore_Detail)); | |||||
| var weight = new JoinAlias(typeof(WeightingInfor)); | |||||
| var query = new DQueryDom(main); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(relate), DQCondition.EQ(main, "ID", relate, "SaleOutStore_ID")); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "SaleOutStore_ID")); | |||||
| query.From.AddJoin(JoinType.Left, new DQDmoSource(weight), DQCondition.And(DQCondition.EQ(detail, "ID", weight, "DetailID"), DQCondition.EQ(weight, "BillType", DmoTypeIDAttribute.GetID(typeof(SaleOutStore))))); | |||||
| query.Columns.Add(DQSelectColumn.Field("ID", detail)); | |||||
| query.Columns.Add(DQSelectColumn.Sum(weight, "NetWeight")); | |||||
| query.GroupBy.Expressions.Add(DQExpression.Field(detail, "ID")); | |||||
| query.Where.Conditions.Add(DQCondition.And(DQCondition.GreaterThanOrEqual("BillState", 单据状态.已审核), DQCondition.IsNull(DQExpression.Field(relate, "SaleOutStore_ID")), DQCondition.IsNotNull(DQExpression.Field(weight, "ID")))); | |||||
| return query; | |||||
| } | |||||
| } | |||||
| } | |||||
| class CarcassSaleOutStoreObj | |||||
| { | |||||
| public string BarCode { get; set; } | |||||
| public decimal? Weight { get; set; } | |||||
| public DateTime? Time { get; set; } | |||||
| public long? GroupID { get; set; } | |||||
| public string SaleGoods_Code { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,65 @@ | |||||
| using BWP.B3Frameworks; | |||||
| using BWP.B3ProcurementInterface.Utils; | |||||
| using BWP.B3QingDaoWanFu.BL; | |||||
| using BWP.B3UnitedInfos.BL; | |||||
| using BWP.B3UnitedInfos.BO; | |||||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| namespace BWP.B3QingDaoWanFu.TypeIOCs | |||||
| { | |||||
| [TypeIOC(typeof(GoodsBL), typeof(GoodsBL.BaseBLIOCs.AfterSave))] | |||||
| public class GoodsAfterSave : GoodsBL.BaseBLIOCs.AfterSave | |||||
| { | |||||
| public void Invoke(IDmoContext context, Goods dmo) | |||||
| { | |||||
| if (ClientServerFacedRpcFacadeUtil.InitRpcFacade()) | |||||
| { | |||||
| var bl = BIFactory.Create<IGoodsExportBL>(context); | |||||
| bl.UpdateOrInsert(dmo); | |||||
| } | |||||
| } | |||||
| } | |||||
| [TypeIOC(typeof(GoodsBL), typeof(GoodsBL.BaseInfoBLIOCs.AfterStart))] | |||||
| public class GoodsAfterStart : GoodsBL.BaseInfoBLIOCs.AfterStart | |||||
| { | |||||
| public void Invoke(IDmoContext context, Goods dmo) | |||||
| { | |||||
| if (ClientServerFacedRpcFacadeUtil.InitRpcFacade()) | |||||
| { | |||||
| var bl = BIFactory.Create<IGoodsExportBL>(context); | |||||
| bl.Start(dmo.Code); | |||||
| } | |||||
| } | |||||
| } | |||||
| [TypeIOC(typeof(GoodsBL), typeof(GoodsBL.BaseInfoBLIOCs.AfterStop))] | |||||
| public class GoodsAfterStop : GoodsBL.BaseInfoBLIOCs.AfterStop | |||||
| { | |||||
| public void Invoke(IDmoContext context, Goods dmo) | |||||
| { | |||||
| if (ClientServerFacedRpcFacadeUtil.InitRpcFacade()) | |||||
| { | |||||
| var bl = BIFactory.Create<IGoodsExportBL>(context); | |||||
| bl.Stop(dmo.Code); | |||||
| } | |||||
| } | |||||
| } | |||||
| [TypeIOC(typeof(GoodsBL), typeof(GoodsBL.BaseBLIOCs.AfterDelete))] | |||||
| public class GoodsAfterDelete : GoodsBL.BaseBLIOCs.AfterDelete | |||||
| { | |||||
| public void Invoke(IDmoContext context, Goods dmo) | |||||
| { | |||||
| if (ClientServerFacedRpcFacadeUtil.InitRpcFacade()) | |||||
| { | |||||
| var bl = BIFactory.Create<IGoodsExportBL>(context); | |||||
| bl.Delete(dmo.Code); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,15 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| namespace BWP.B3QingDaoWanFu | |||||
| { | |||||
| public class B3QingDaoWanFuConsts | |||||
| { | |||||
| internal static class DmoTypeIDOffsets | |||||
| { | |||||
| public const byte GoodsExport = 1; | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,25 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <BillReports xmlns="urn:BillReports" version="1.0" displayName="费用录入" phyName="费用录入"> | |||||
| <Report phyName="标准格式"> | |||||
| <BillReport xmlns="urn:BillReport" version="1" displayName="标准格式" > | |||||
| <Bands> | |||||
| <TextBand fontName="黑体" fontSize="15" align="Center">费用录入№$Dmo.ID</TextBand> | |||||
| <DFInfoBand object="$Dmo" cols="4"> | |||||
| <Field name="AccountingUnit_Name" lblWidth="4"/> | |||||
| <Field name="Date" lblWidth="4"/> | |||||
| <Field name="PurchaseType_Name" lblWidth="4"/> | |||||
| </DFInfoBand> | |||||
| <HtmlBand> | |||||
| <![CDATA[<h2>单据明细</h2>]]> | |||||
| </HtmlBand> | |||||
| <DFListBand collection="$Details" itemType="$DetailType" enablePaging="true" > | |||||
| <Field name="WeightBill_ID"/> | |||||
| <Field name="Supplier_Name"/> | |||||
| <Field name="JingJiFee" /> | |||||
| <Field name="TransferFee" /> | |||||
| </DFListBand> | |||||
| <PagerBand/> | |||||
| </Bands> | |||||
| </BillReport> | |||||
| </Report> | |||||
| </BillReports> | |||||