| @ -0,0 +1,343 @@ | |||
| using BWP.B3ProcurementInterface.Utils; | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using BWP.Web.CustomPageLayout; | |||
| using BWP.Web.Layout; | |||
| using BWP.Web.Utils; | |||
| using BWP.Web.WebControls; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Web.UI; | |||
| using System.Web.UI.WebControls; | |||
| using TSingSoft.WebControls2; | |||
| using Forks.Utils.Collections; | |||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||
| using BWP.B3SheepButcherManage.Utils; | |||
| using BWP.B3ProduceUnitedInfos.NamedValueTemplate; | |||
| using BWP.Web.Pages.B3CowButcherManage.Dialogs; | |||
| using BWP.B3CowButcherManage; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.Bills.WeightBill_ | |||
| { | |||
| class WeightBillEdit : DepartmentWorkFlowBillEditPage<WeightBill, IWeightBillBL> | |||
| { | |||
| private DFEditGrid _weightGrid, _abnormalGrid; | |||
| protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection section) | |||
| { | |||
| var layoutManager = new LayoutManager("main", mDFInfo, mDFContainer); | |||
| var supplierInpput = InputCreator.DFChoiceBox(B3ProcurementInterfaceDataSources.供应商, "Supplier_Name"); | |||
| layoutManager.Add("Supplier_ID", supplierInpput); | |||
| var config = new AutoLayoutConfig(); | |||
| config.Add("AccountingUnit_ID"); | |||
| config.Add("Department_ID"); | |||
| config.Add("Employee_ID"); | |||
| config.Add("WeighTime"); | |||
| config.Add("Supplier_ID"); | |||
| config.Add("Supplier_Tel"); | |||
| config.Add("Supplier_Card_ID"); | |||
| config.Add("BuyNum"); | |||
| config.Add("BuyWeigh1"); | |||
| config.Add("Zone_ID"); | |||
| config.Add("ValuationArea_ID"); | |||
| config.Add("MoneyCountMethod"); | |||
| config.Add("QuarantineNumber"); | |||
| config.Add("Remark"); | |||
| layoutManager.Config = config; | |||
| section.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); | |||
| titlePanel.Controls.Add(layoutManager.CreateLayout()); | |||
| if (layoutManager.Contains("ValuationArea_ID")) | |||
| { | |||
| var valuationAreaInput = layoutManager["ValuationArea_ID"].InputControl as DFChoiceBox; | |||
| if (valuationAreaInput != null) | |||
| { | |||
| valuationAreaInput.OnBeforeDrop = "this.codeArgument = __DFContainer.getValue('AccountingUnit_ID');"; | |||
| } | |||
| } | |||
| AddSupplierScript(layoutManager); | |||
| } | |||
| void AddSupplierScript(LayoutManager layoutManager) | |||
| { | |||
| if (layoutManager.Contains("Supplier_ID")) | |||
| { | |||
| var supplierInput = layoutManager["Supplier_ID"].InputControl as DFChoiceBox; | |||
| var script = @" | |||
| var txtValue =parseInt(__DFContainer.getValue('Supplier_ID')); | |||
| simpleRestCall('/MainSystem/B3CowButcherManage/Rpcs/SupplierRpc/GetBySupplierID',[txtValue], | |||
| function(result){ | |||
| if(typeof(result.Tel)!='undefined') | |||
| { | |||
| __DFContainer.setValue('Supplier_Tel',result.Tel); | |||
| } | |||
| else | |||
| { | |||
| __DFContainer.setValue('Supplier_Tel',''); | |||
| } | |||
| if(typeof(result.Card_ID)!='undefined') | |||
| { | |||
| __DFContainer.setValue('Supplier_Card_ID',result.Card_ID); | |||
| } | |||
| else | |||
| { | |||
| __DFContainer.setValue('Supplier_Card_ID',''); | |||
| } | |||
| },{ });"; | |||
| supplierInput.OnClientSelected = script; | |||
| } | |||
| } | |||
| protected override void BuildBody(Control form) | |||
| { | |||
| base.BuildBody(form); | |||
| CreateWeighInfoPanel(form.EAdd(new TitlePanel("过磅记录"))); | |||
| CreateAbnormalItemPanel(form.EAdd(new TitlePanel("异常记录"))); | |||
| } | |||
| private void CreateWeighInfoPanel(TitlePanel titlePanel) | |||
| { | |||
| var vPanel = new VLayoutPanel(); | |||
| titlePanel.Controls.Add(vPanel); | |||
| if (CanSave) | |||
| { | |||
| var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left)); | |||
| var addBtn = new TSButton() { Text = "新增" }; | |||
| addBtn.Click += (sender, e) => | |||
| { | |||
| _weightGrid.GetFromUI(); | |||
| WeightBill_Record w = new WeightBill_Record(); | |||
| Dmo.WeighRecords.Add(w); | |||
| _weightGrid.DataBind(); | |||
| }; | |||
| hPanel.Add(addBtn); | |||
| var input1 = hPanel.Add(new DFWebSocketInput(8181)); | |||
| input1.Width = 100; | |||
| input1.Height = 35; | |||
| input1.Font.Bold = true; | |||
| input1.Font.Size = 16; | |||
| #if DEBUG | |||
| input1.Text = "15.5"; | |||
| #endif | |||
| //input1.Text = "15"; | |||
| mDFContainer.AddNonDFControl(input1, "$WebSocketInput"); | |||
| TSButton readBtn = hPanel.Add(new TSButton() | |||
| { | |||
| Text = "载入重量数据" | |||
| }); | |||
| readBtn.OnClientClick = "$('#GridRowIndex').val(__DFContainer.getControl('$Details').behind.mSelectedRowIndex);"; | |||
| readBtn.Click += delegate | |||
| { | |||
| _weightGrid.GetFromUI(); | |||
| var index = int.Parse(Request.Form["GridRowIndex"]) - 1; | |||
| var detail = Dmo.WeighRecords[index]; | |||
| if (detail.Weight == null) | |||
| { | |||
| detail.Weight = 0; | |||
| } | |||
| decimal inputWeight; | |||
| if (decimal.TryParse(input1.Text, out inputWeight)) | |||
| { | |||
| detail.Weight += inputWeight; | |||
| } | |||
| WeightUtil.InsertRecord(Dmo, detail, decimal.Round(decimal.Parse(input1.Text), 2), "电子称"); | |||
| _weightGrid.DataBind(); | |||
| }; | |||
| var weight = hPanel.Add(new DialogButton { Text = "称重记录" }); | |||
| weight.Click += queryWInforBtn_Click; | |||
| weight.Url = AspUtil.AddParamToUrl(AspUtil.AddParamToUrl(AspUtil.AddParamToUrl("~/B3CowButcherManage/Dialogs/WeightRecordDialog.aspx", "BillType", "'+3139+'"), "DetailID", "'+__DFContainer.getControl('$Details').behind.selectedRow().dfContainer.getValue('ID')+'"), "BillID", "'+" + MinDmo.ID + "+'"); | |||
| } | |||
| var detailEditor = new DFCollectionEditor<WeightBill_Record>(() => Dmo.WeighRecords); | |||
| detailEditor.AllowDeletionFunc = () => CanSave; | |||
| detailEditor.CanDeleteFunc = (detail) => CanSave; | |||
| detailEditor.IsEditableFunc = (field, detail) => CanSave; | |||
| _weightGrid = vPanel.Add(new DFEditGrid(detailEditor) { Width = Unit.Percentage(100) }); | |||
| var liveVarieties = new DFEditGridColumn<DFChoiceBox>("LiveVarieties_ID"); | |||
| _weightGrid.Columns.Add(liveVarieties); | |||
| liveVarieties.InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.DataKind = B3ProduceUnitedInfos.B3ProduceUnitedInfosDataSources.活体品种; | |||
| e.Control.CodeArgument = 生物资产属性.羊.Value.ToString(); | |||
| e.Control.DFDisplayField = "LiveVarieties_Name"; | |||
| e.Control.Width = Unit.Pixel(150); | |||
| e.Control.EnableInputArgument = true; | |||
| }; | |||
| _weightGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Number")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.Style["width"] = "160px"; | |||
| }; | |||
| _weightGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Weight")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.Style["width"] = "160px"; | |||
| }; | |||
| _weightGrid.Columns.EAdd(new DFEditGridColumn<DFChoiceBox>("LiveColonyHouse_ID")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.DataKind = B3ProduceUnitedInfos.B3ProduceUnitedInfosDataSources.活体圈舍; | |||
| e.Control.CodeArgument = 生物资产属性.牛.Value.ToString(); | |||
| e.Control.DFDisplayField = "LiveColonyHouse_Name"; | |||
| e.Control.Width = Unit.Pixel(150); | |||
| }; | |||
| _weightGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Remark")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.Style["width"] = "360px"; | |||
| }; | |||
| _weightGrid.ValueColumns.Add("ID"); | |||
| var section2 = mPageLayoutManager.AddSection("detailColumns1", "明细"); | |||
| section2.ApplyLayout(_weightGrid, mPageLayoutManager, DFInfo.Get(typeof(WeightBill_Record))); | |||
| titlePanel.SetPageLayoutSetting(mPageLayoutManager, section2.Name); | |||
| mDFContainer.AddNonDFControl(_weightGrid, "$Details"); | |||
| } | |||
| void queryWInforBtn_Click(object sender, EventArgs e) | |||
| { | |||
| _weightGrid.GetFromUI(); | |||
| var vInfor = DialogUtil.GetCachedObj(this) as SumWInfor; | |||
| var detail = Dmo.WeighRecords.First(x => x.ID == vInfor.DetailID); | |||
| detail.Weight = vInfor.Weight; | |||
| _weightGrid.DataBind(); | |||
| GetFromUI(); | |||
| DmoSave2(detail.ID); | |||
| } | |||
| private void DmoSave2(long detailID = 0) | |||
| { | |||
| GetFromUI(); | |||
| if (IsNew) | |||
| { | |||
| mBL.Insert(Dmo); | |||
| } | |||
| else | |||
| { | |||
| mBL.Update(Dmo); | |||
| } | |||
| var blMessage = BIFactory.GetLastMessage(); | |||
| var url = Request.RawUrl; | |||
| if (IsNew) | |||
| { | |||
| url = AspUtil.RemoveUrlParam(url, "ReferToID"); | |||
| url = AspUtil.AddParamToUrl(url, "ID", Dmo.ID.ToString()); | |||
| } | |||
| var message = "保存成功!"; | |||
| if (!string.IsNullOrEmpty(blMessage)) | |||
| { | |||
| message += "\r\n" + blMessage; | |||
| } | |||
| url = AspUtil.RemoveUrlParam(url, "detailID"); | |||
| if (detailID == 0) | |||
| AspUtil.RedirectAndAlert(this, url, message); | |||
| else | |||
| AspUtil.Redirect(AspUtil.UpdateUrlParam(Request.RawUrl, "detailID", detailID.ToString())); | |||
| } | |||
| private void CreateAbnormalItemPanel(TitlePanel titlePanel) | |||
| { | |||
| var vPanel = new VLayoutPanel(); | |||
| titlePanel.Controls.Add(vPanel); | |||
| if (CanSave) | |||
| { | |||
| var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left)); | |||
| var addBtn = new TSButton() { Text = "新增" }; | |||
| addBtn.Click += (sender, e) => | |||
| { | |||
| _abnormalGrid.GetFromUI(); | |||
| Dmo.WeighAbnormalRecording.Add(new WeightBill_AbnormalRecording()); | |||
| _abnormalGrid.DataBind(); | |||
| }; | |||
| hPanel.Add(addBtn); | |||
| } | |||
| var detailEditor = new DFCollectionEditor<WeightBill_AbnormalRecording>(() => Dmo.WeighAbnormalRecording); | |||
| detailEditor.AllowDeletionFunc = () => CanSave; | |||
| detailEditor.CanDeleteFunc = (detail) => CanSave; | |||
| detailEditor.IsEditableFunc = (field, detail) => CanSave; | |||
| _abnormalGrid = vPanel.Add(new DFEditGrid(detailEditor) { Width = Unit.Percentage(100), ShowLineNo = true }); | |||
| _abnormalGrid.Columns.EAdd(new DFEditGridColumn<DFChoiceBox>("RewardItem_ID")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.DataKind = B3CowButcherManageConsts.DataSources.奖罚项目; | |||
| e.Control.OnBeforeDrop = "this.codeArgument=dfContainer.getValue('RewardItem_ID');"; | |||
| e.Control.DFDisplayField = "RewardItem_Name"; | |||
| e.Control.Width = Unit.Pixel(150); | |||
| }; | |||
| _abnormalGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Abnormal_Money")).InitEditControl += (sender, e) => | |||
| { | |||
| e.Control.Style["width"] = "160px"; | |||
| }; | |||
| _abnormalGrid.PreferWidthGridSet = new Dictionary<string, Unit> { { "序号", Unit.Pixel(80) }, { "奖罚项目", Unit.Percentage(45) }, { "金额", Unit.Percentage(45) } }; | |||
| var section3 = mPageLayoutManager.AddSection("detailColumns2", "明细"); | |||
| section3.ApplyLayout(_abnormalGrid, mPageLayoutManager, DFInfo.Get(typeof(WeightBill_AbnormalRecording))); | |||
| titlePanel.SetPageLayoutSetting(mPageLayoutManager, section3.Name); | |||
| } | |||
| protected override void OnPreRender(EventArgs e) | |||
| { | |||
| base.OnPreRender(e); | |||
| Page.ClientScript.RegisterHiddenField("LastAction", Page.Request.Form["LastAction"]); | |||
| Page.ClientScript.RegisterHiddenField("GridRowIndex", ""); | |||
| if (!IsPostBack) | |||
| { | |||
| var detailID = Request.QueryString["detailID"]; | |||
| if (!string.IsNullOrEmpty(detailID)) | |||
| { | |||
| int index = 0; | |||
| foreach (var detail in Dmo.WeighRecords) | |||
| { | |||
| if (detail.ID.ToString() == detailID) | |||
| { | |||
| break; | |||
| } | |||
| index++; | |||
| } | |||
| if (index >= 0) | |||
| { | |||
| _weightGrid.CurrentPageIndex = index / _weightGrid.PageSize; | |||
| var selectedrow = (index - _weightGrid.CurrentPageIndex * _weightGrid.PageSize).ToString(); | |||
| Page.ClientScript.RegisterStartupScript(GetType(), "FocusToRow", @" | |||
| $(function(){ | |||
| if (browserContext && browserContext.Browser == ""IE"") { | |||
| __DFContainer.getControl(""$Details"").rows({row}).scrollIntoView(); | |||
| }else { | |||
| __DFContainer.getControl(""$Details"").rows[{row}].scrollIntoView(); | |||
| } | |||
| });".Replace("{row}", selectedrow.ToString()), true); | |||
| _weightGrid.DataBind(); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| protected override void OnLoad(EventArgs e) | |||
| { | |||
| base.OnLoad(e); | |||
| if (!IsPostBack) | |||
| DataBind(); | |||
| } | |||
| public override void GetFromUI() | |||
| { | |||
| base.GetFromUI(); | |||
| _weightGrid.GetFromUI(); | |||
| _abnormalGrid.GetFromUI(); | |||
| } | |||
| protected override bool EnableReferToCreate | |||
| { | |||
| get { return false; } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,55 @@ | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.Bills.WeightBill_ | |||
| { | |||
| class WeightBillList : DomainBillListPage<WeightBill, IWeightBillBL> | |||
| { | |||
| 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("Supplier_ID"); | |||
| config.Add("MoneyCountMethod"); | |||
| })); | |||
| } | |||
| protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field) | |||
| { | |||
| base.AddDFBrowseGridColumn(grid, field); | |||
| if (field == "BillState") | |||
| { | |||
| AddDFBrowseGridColumn(grid, "AccountingUnit_Name"); | |||
| AddDFBrowseGridColumn(grid, "Employee_Name"); | |||
| AddDFBrowseGridColumn(grid, "Department_Name"); | |||
| AddDFBrowseGridColumn(grid, "MoneyCountMethod"); | |||
| } | |||
| } | |||
| protected override void InitToolBar(HLayoutPanel toolbar) | |||
| { | |||
| base.InitToolBar(toolbar); | |||
| if (CheckDefaultRole("数据分析", true)) | |||
| { | |||
| var button = new TSButton("数据分析") { UseSubmitBehavior = false }; | |||
| button.OnClientClick = "preventEventDefault(event);OpenUrlInTopTab('B3SheepButcherManage/Reports/WeightBillAnalyse_/WeightBillAnalyse.aspx','数据分析');"; | |||
| toolbar.Add(button); | |||
| } | |||
| if (CheckDefaultRole("异常分析", true)) | |||
| { | |||
| var button = new TSButton("异常分析") { UseSubmitBehavior = false }; | |||
| button.OnClientClick = "preventEventDefault(event);OpenUrlInTopTab('B3SheepButcherManage/Reports/WeightBillAnalyse_/WeightBillAbnormalAnalyse.aspx','数据分析');"; | |||
| toolbar.Add(button); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,65 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| <Field name="ID"/> | |||
| </Columns> | |||
| <From> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.WeightBill, B3SheepButcherManage"/> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="IsLocked"/> | |||
| <QBE paramName="IsLocked"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="MoneyCountMethod"/> | |||
| <QBE paramName="MoneyCountMethod"/> | |||
| </EQ> | |||
| <Contains> | |||
| <Field name="Remark"/> | |||
| <QBE paramName="Remark"/> | |||
| </Contains> | |||
| <EQ> | |||
| <Field name="AccountingUnit_ID"/> | |||
| <QBE paramName="AccountingUnit_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Employee_ID"/> | |||
| <QBE paramName="Employee_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Department_ID"/> | |||
| <QBE paramName="Department_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Supplier_ID"/> | |||
| <QBE paramName="Supplier_ID"/> | |||
| </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> | |||
| <EQ> | |||
| <Field name="BillState"/> | |||
| <QBE paramName ="BillState"/> | |||
| </EQ> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -0,0 +1,21 @@ | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.Bills.WeightBill_ | |||
| { | |||
| class WeightBillPrint : DomainTemplatePrintPage<WeightBill, IWeightBillBL> | |||
| { | |||
| protected override void AddParameters(IDictionary<string, object> dic) | |||
| { | |||
| dic.Add("$ID", Dmo.ID); | |||
| dic.Add("$WeighRecords", Dmo.WeighRecords); | |||
| dic.Add("$WeighRecordsType", typeof(WeightBill_Record)); | |||
| dic.Add("$WeighAbnormalRecording", Dmo.WeighAbnormalRecording); | |||
| dic.Add("$WeighAbnormalRecordingType", typeof(WeightBill_AbnormalRecording)); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,96 @@ | |||
| using BWP.B3CowButcherManage; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3ProcurementInterface.Utils; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using BWP.Web.Layout; | |||
| using BWP.Web.Utils; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.Reports.WeightBillAnalyse_ | |||
| { | |||
| class WeightBillAbnormalAnalyse : DFBrowseGridReportPage<WeightBill> | |||
| { | |||
| protected override string Caption | |||
| { | |||
| get { return "羊过磅异常分析"; } | |||
| } | |||
| protected override string QueryOptionsTabName | |||
| { | |||
| get | |||
| { | |||
| return "显示字段"; | |||
| } | |||
| } | |||
| protected override string AccessRoleName | |||
| { | |||
| get { return "B3SheepButcherManage.羊过磅单.异常分析"; } | |||
| } | |||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||
| { | |||
| var layout = new LayoutManager("Main", mDFInfo, mQueryContainer); | |||
| layout.Add("ID", new DFTextBox(mDFInfo.Fields["ID"])); | |||
| layout.Add("AccountingUnit_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.授权会计单位全部)); | |||
| layout.Add("WeighTime", new SimpleLabel("过磅时间"), QueryCreator.TimeRange(mDFInfo.Fields["WeighTime"], mQueryContainer, "MinDate", "MaxDate")); | |||
| layout["WeighTime"].NotAutoAddToContainer = true; | |||
| layout.Add("RewardItem_ID", new SimpleLabel("奖罚项目"), QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3CowButcherManageConsts.DataSources.奖罚项目)); | |||
| layout.Add("Supplier_ID", new SimpleLabel("供应商"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3ProcurementInterfaceDataSources.供应商全部)); | |||
| layout.Add("Zone_ID", new SimpleLabel("来源地"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Zone_ID"], "B3CowButcherManage_区域")); | |||
| var config = new AutoLayoutConfig { Cols = 2 }; | |||
| config.Add("ID"); | |||
| config.Add("AccountingUnit_ID"); | |||
| config.Add("WeighTime"); | |||
| config.Add("RewardItem_ID"); | |||
| config.Add("Supplier_ID"); | |||
| config.Add("Zone_ID"); | |||
| 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", "WeighTime", false); | |||
| mDisplayHelper.AddOptionItem("供应商", "bill", "Supplier_Name", false); | |||
| mDisplayHelper.AddOptionItem("来源地", "bill", "Zone_Name", false); | |||
| mDisplayHelper.AddOptionItem("收购头数", "bill", "BuyNum", false); | |||
| mDisplayHelper.AddOptionItem("收购重量", "bill", "BuyWeigh1", false); | |||
| mDisplayHelper.AddOptionItem("奖罚项目", "detail", "RewardItem_Name", false); | |||
| mDisplayHelper.AddOptionItem("扣罚金额", "detail", "Abnormal_Money", false, true); | |||
| 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", bill); | |||
| var detail = JoinAlias.Create("detail"); | |||
| mDisplayHelper.AddAlias("detail", detail); | |||
| mDisplayHelper.AddSelectColumns(dom, (name) => OptionIsSelected("选项", name), SumColumnIndexs); | |||
| return dom; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,50 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| </Columns> | |||
| <From> | |||
| <Join> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.WeightBill, B3SheepButcherManage" alias="bill"/> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.WeightBill_AbnormalRecording, B3SheepButcherManage" alias="detail"/> | |||
| <Condition> | |||
| <EQ> | |||
| <Field name="ID" alias="bill"/> | |||
| <Field name="WeightBill_ID" alias="detail"/> | |||
| </EQ> | |||
| </Condition> | |||
| </Join> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Zone_ID"/> | |||
| <QBE paramName="Zone_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="AccountingUnit_ID"/> | |||
| <QBE paramName="AccountingUnit_ID"/> | |||
| </EQ> | |||
| <GreaterThanOrEqual> | |||
| <Field name="WeighTime"/> | |||
| <QBE paramName="MinDate" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="WeighTime"/> | |||
| <QBE paramName="MaxDate"/> | |||
| </LessThanOrEqual> | |||
| <EQ> | |||
| <Field name="Supplier_ID" /> | |||
| <QBE paramName="Supplier_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="RewardItem_ID" alias="detail"/> | |||
| <QBE paramName="RewardItem_ID"/> | |||
| </EQ> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -0,0 +1,99 @@ | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.BO.NamedValueTemplate; | |||
| using BWP.B3ProcurementInterface.Utils; | |||
| using BWP.B3ProduceUnitedInfos.NamedValueTemplate; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using BWP.Web.Layout; | |||
| using BWP.Web.Utils; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.Reports.WeightBillAnalyse_ | |||
| { | |||
| class WeightBillAnalyse : DFBrowseGridReportPage<WeightBill> | |||
| { | |||
| protected override string Caption | |||
| { | |||
| get { return "羊过磅单分析"; } | |||
| } | |||
| protected override string QueryOptionsTabName | |||
| { | |||
| get | |||
| { | |||
| return "显示字段"; | |||
| } | |||
| } | |||
| protected override string AccessRoleName | |||
| { | |||
| get { return "B3SheepButcherManage.羊过磅单.数据分析"; } | |||
| } | |||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||
| { | |||
| var layout = new LayoutManager("Main", mDFInfo, mQueryContainer); | |||
| layout.Add("ID", new DFTextBox(mDFInfo.Fields["ID"])); | |||
| layout.Add("AccountingUnit_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.授权会计单位全部)); | |||
| layout.Add("WeighTime", new SimpleLabel("过磅时间"), QueryCreator.TimeRange(mDFInfo.Fields["WeighTime"], mQueryContainer, "MinDate", "MaxDate")); | |||
| layout["WeighTime"].NotAutoAddToContainer = true; | |||
| DFChoiceBox lv; | |||
| layout.Add("LiveVarieties_ID", new SimpleLabel("品种"), lv = QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3ProduceUnitedInfos.B3ProduceUnitedInfosDataSources.活体品种)); | |||
| lv.CodeArgument = 生物资产属性.羊.Value.ToString(); | |||
| layout.Add("Supplier_ID", new SimpleLabel("供应商"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Supplier_ID"], B3ProcurementInterfaceDataSources.供应商全部)); | |||
| layout.Add("Zone_ID", new SimpleLabel("来源地"), QueryCreator.DFChoiceBox(mDFInfo.Fields["Zone_ID"], "B3CowButcherManage_区域")); | |||
| var config = new AutoLayoutConfig { Cols = 2 }; | |||
| config.Add("ID"); | |||
| config.Add("AccountingUnit_ID"); | |||
| config.Add("WeighTime"); | |||
| config.Add("LiveVarieties_ID"); | |||
| config.Add("Supplier_ID"); | |||
| config.Add("Zone_ID"); | |||
| 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", "WeighTime", false); | |||
| mDisplayHelper.AddOptionItem("供应商", "bill", "Supplier_Name", false); | |||
| mDisplayHelper.AddOptionItem("来源地", "bill", "Zone_Name", false); | |||
| mDisplayHelper.AddOptionItem("品种", "detail", "LiveVarieties_Name", false); | |||
| mDisplayHelper.AddOptionItem("收购头数", "detail", "Number", false, true); | |||
| mDisplayHelper.AddOptionItem("收购重量", "detail", "Weight", false, true); | |||
| mDisplayHelper.AddOptionItem("圈舍", "detail", "LiveColonyHouse_Name", 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", bill); | |||
| var detail = JoinAlias.Create("detail"); | |||
| mDisplayHelper.AddAlias("detail", detail); | |||
| mDisplayHelper.AddSelectColumns(dom, (name) => OptionIsSelected("选项", name), SumColumnIndexs); | |||
| return dom; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,50 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| </Columns> | |||
| <From> | |||
| <Join> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.WeightBill, B3SheepButcherManage" alias="bill"/> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.WeightBill_Record, B3SheepButcherManage" alias="detail"/> | |||
| <Condition> | |||
| <EQ> | |||
| <Field name="ID" alias="bill"/> | |||
| <Field name="WeightBill_ID" alias="detail"/> | |||
| </EQ> | |||
| </Condition> | |||
| </Join> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Zone_ID"/> | |||
| <QBE paramName="Zone_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="AccountingUnit_ID"/> | |||
| <QBE paramName="AccountingUnit_ID"/> | |||
| </EQ> | |||
| <GreaterThanOrEqual> | |||
| <Field name="WeighTime"/> | |||
| <QBE paramName="MinDate" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="WeighTime"/> | |||
| <QBE paramName="MaxDate"/> | |||
| </LessThanOrEqual> | |||
| <EQ> | |||
| <Field name="Supplier_ID" /> | |||
| <QBE paramName="Supplier_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="LiveVarieties_ID" alias="detail"/> | |||
| <QBE paramName="LiveVarieties_ID"/> | |||
| </EQ> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -0,0 +1,20 @@ | |||
| using BWP.B3Frameworks.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.BL | |||
| { | |||
| [BusinessInterface(typeof(WeightBillBL))] | |||
| [LogicName("羊过磅单")] | |||
| public interface IWeightBillBL : IDepartmentWorkFlowBillBL<WeightBill> | |||
| { } | |||
| public class WeightBillBL : DepartmentWorkFlowBillBL<WeightBill>, IWeightBillBL | |||
| { | |||
| } | |||
| } | |||
| @ -0,0 +1,129 @@ | |||
| using BWP.B3CowButcherManage; | |||
| using BWP.B3CowButcherManage.BO; | |||
| using BWP.B3CowButcherManage.NamedValueTemplate; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.Attributes; | |||
| using BWP.B3Frameworks.BO; | |||
| using BWP.B3Frameworks.Utils; | |||
| using BWP.B3ProcurementInterface.BO; | |||
| using BWP.B3ProcurementInterface.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.B3SheepButcherManage.BO | |||
| { | |||
| [DFClass, Serializable] | |||
| [LogicName("羊过磅单")] | |||
| [DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SheepButcherManage, B3SheepButcherManageConsts.DmoTypeIDOffsets.WeightBill)] | |||
| [EditUrl("~/B3SheepButcherManage/Bills/WeightBill_/WeightBillEdit.aspx")] | |||
| public class WeightBill : DepartmentWorkFlowBill | |||
| { | |||
| [DFDataKind(B3ProcurementInterfaceDataSources.供应商全部)] | |||
| [LogicName("供应商")] | |||
| [DFExtProperty("DisplayField", "Supplier_Name")] | |||
| public long? Supplier_ID { get; set; } | |||
| DateTime dt = DateTime.Now; | |||
| [LogicName("过磅时间")] | |||
| [DFNotEmpty] | |||
| [DFExtProperty("WebControlType", DFEditControl.DateTimeInput)] | |||
| public DateTime WeighTime { get { return dt; } set { dt = value; } } | |||
| [LogicName("收购头数")] | |||
| [DFExtProperty("WebControlType", DFEditControl.StaticText)] | |||
| public int? BuyNum { get; set; } | |||
| [LogicName("收购重量")] | |||
| [DFExtProperty("WebControlType", DFEditControl.StaticText)] | |||
| public Money<decimal>? BuyWeigh1 { get; set; } | |||
| [LogicName("来源地")] | |||
| [DFExtProperty("WebControlType", DFEditControl.ChoiceBox)] | |||
| [DFDataKind("B3CowButcherManage_区域")] | |||
| [DFExtProperty("DisplayField", "Zone_TreeName")] | |||
| public long? Zone_ID { get; set; } | |||
| [LogicName("计价方式")] | |||
| public NamedValue<计价方式>? MoneyCountMethod { get; set; } | |||
| [LogicName("计价区域")] | |||
| [DFDataKind(B3CowButcherManageConsts.DataSources.计价区域)] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "ValuationArea_Name")] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3CowButcherManageConsts.DataSources.计价区域)] | |||
| public long? ValuationArea_ID { get; set; } | |||
| [LogicName("检疫证号")] | |||
| public string QuarantineNumber { get; set; } | |||
| [Join("Supplier_ID", "ID")] | |||
| [LogicName("供应商")] | |||
| [ReferenceTo(typeof(Supplier), "Name")] | |||
| public string Supplier_Name { get; set; } | |||
| [Join("Supplier_ID", "ID")] | |||
| [LogicName("联系方式")] | |||
| [ReferenceTo(typeof(Supplier), "Tel")] | |||
| public string Supplier_Tel { get; set; } | |||
| [Join("Supplier_ID", "ID")] | |||
| [LogicName("身份证号")] | |||
| [ReferenceTo(typeof(Supplier), "Card_ID")] | |||
| public string Supplier_Card_ID { get; set; } | |||
| [ReferenceTo(typeof(Zone1), "Depth")] | |||
| [Join("Zone_ID", "ID")] | |||
| public int? Zone_Depth { get; set; } | |||
| [ReferenceTo(typeof(Zone1), "Name")] | |||
| [Join("Zone_ID", "ID")] | |||
| [LogicName("区域")] | |||
| public string Zone_Name { get; set; } | |||
| [ReferenceTo(typeof(Zone1), "TreeDeep1_Name")] | |||
| [Join("Zone_ID", "ID")] | |||
| [LogicName("一级区域")] | |||
| public string TreeDeep1_Name { get; set; } | |||
| [ReferenceTo(typeof(Zone1), "TreeDeep2_Name")] | |||
| [Join("Zone_ID", "ID")] | |||
| [LogicName("二级区域")] | |||
| public string TreeDeep2_Name { get; set; } | |||
| [NonDmoProperty] | |||
| [DFPrompt("区域树形名称")] | |||
| public string Zone_TreeName | |||
| { | |||
| get { return TreeUtil.GetTreePrefix(Zone_Depth) + Zone_Name; } | |||
| } | |||
| [ReferenceTo(typeof(ValuationArea), "Name")] | |||
| [Join("ValuationArea_ID", "ID")] | |||
| [LogicName("计价区域")] | |||
| public string ValuationArea_Name { get; set; } | |||
| private WeightBill_RecordCollection mWeighRecord = new WeightBill_RecordCollection(); | |||
| [OneToMany(typeof(WeightBill_Record), "ID")] | |||
| [Join("ID", "WeightBill_ID")] | |||
| public WeightBill_RecordCollection WeighRecords | |||
| { | |||
| get { return mWeighRecord; } | |||
| set { mWeighRecord = value; } | |||
| } | |||
| private WeightBill_AbnormalRecordingCollection mWeighAbnormalRecording = new WeightBill_AbnormalRecordingCollection(); | |||
| [OneToMany(typeof(WeightBill_AbnormalRecording), "ID")] | |||
| [Join("ID", "WeightBill_ID")] | |||
| public WeightBill_AbnormalRecordingCollection WeighAbnormalRecording | |||
| { | |||
| get { return mWeighAbnormalRecording; } | |||
| set { mWeighAbnormalRecording = value; } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,42 @@ | |||
| using BWP.B3CowButcherManage; | |||
| using BWP.B3CowButcherManage.BO; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.BO; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.DataDictionary; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.Utils; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.BO | |||
| { | |||
| [DFClass, Serializable] | |||
| [LogicName("过磅单_异常明细")] | |||
| public class WeightBill_AbnormalRecording : Base | |||
| { | |||
| [DbColumn(Index = IndexType.Normal, AllowNull = false)] | |||
| public long WeightBill_ID { get; set; } | |||
| [LogicName("金额")] | |||
| public Money<decimal>? Abnormal_Money { get; set; } | |||
| [LogicName("奖罚项目")] | |||
| [DFDataKind(B3CowButcherManageConsts.DataSources.奖罚项目)] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "RewardItem_Name")] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3CowButcherManageConsts.DataSources.奖罚项目)] | |||
| public long? RewardItem_ID { get; set; } | |||
| [LogicName("奖罚项目")] | |||
| [ReferenceTo(typeof(RewardItem), "Name")] | |||
| [Join("RewardItem_ID", "ID")] | |||
| public string RewardItem_Name { get; set; } | |||
| } | |||
| [Serializable] | |||
| public class WeightBill_AbnormalRecordingCollection : DmoCollection<WeightBill_AbnormalRecording> | |||
| { } | |||
| } | |||
| @ -0,0 +1,50 @@ | |||
| using BWP.B3Frameworks.BO; | |||
| using BWP.B3ProduceUnitedInfos.BO; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.DataDictionary; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.Utils; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.BO | |||
| { | |||
| [DFClass, Serializable] | |||
| [LogicName("过磅单_称重明细")] | |||
| public class WeightBill_Record : Base | |||
| { | |||
| [DbColumn(Index = IndexType.Normal, AllowNull = false)] | |||
| public long WeightBill_ID { get; set; } | |||
| [LogicName("品种")] | |||
| public long? LiveVarieties_ID { get; set; } | |||
| [LogicName("品种")] | |||
| [ReferenceTo(typeof(LiveVarieties), "Name")] | |||
| [Join("LiveVarieties_ID", "ID")] | |||
| public string LiveVarieties_Name { get; set; } | |||
| [LogicName("数量")] | |||
| public int? Number { get; set; } | |||
| [LogicName("重量")] | |||
| public Money<decimal>? Weight { get; set; } | |||
| [LogicName("活体圈舍")] | |||
| public long? LiveColonyHouse_ID { get; set; } | |||
| [LogicName("活体圈舍")] | |||
| [ReferenceTo(typeof(LiveColonyHouse), "Name")] | |||
| [Join("LiveColonyHouse_ID", "ID")] | |||
| public string LiveColonyHouse_Name { get; set; } | |||
| [LogicName("备注")] | |||
| public string Remark { get; set; } | |||
| } | |||
| [Serializable] | |||
| public class WeightBill_RecordCollection : DmoCollection<WeightBill_Record> | |||
| { } | |||
| } | |||
| @ -0,0 +1,34 @@ | |||
| using BWP.B3CowButcherManage.BO; | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.Utils | |||
| { | |||
| public class WeightUtil | |||
| { | |||
| public static void InsertRecord(WeightBill dmo, WeightBill_Record detail, decimal number, string type) | |||
| { | |||
| using (var context = new TransactionContext()) | |||
| { | |||
| var weightingInfor = new WeightingInfo(); | |||
| // weightingInfor.Goods_ID = detail.SaleGoods_ID; | |||
| weightingInfor.WeightTime = DateTime.Now; | |||
| weightingInfor.DetailID = detail.ID; | |||
| weightingInfor.Weight = number; | |||
| weightingInfor.BillType = 3139; | |||
| weightingInfor.BillID = detail.WeightBill_ID; | |||
| // weightingInfor.Type = type; | |||
| context.Session.Insert(weightingInfor); | |||
| var bl = BIFactory.Create<IWeightBillBL>(context); | |||
| bl.Update(dmo); | |||
| context.Commit(); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,41 @@ | |||
| <?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="Supplier_Name" lblWidth="4"/> | |||
| <Field name="Employee_Name" lblWidth="4"/> | |||
| <Field name="Supplier_Tel" lblWidth="4"/> | |||
| <Field name="WeighTime" lblWidth="4"/> | |||
| <Field name="BuyNum" lblWidth="4"/> | |||
| <Field name="BuyWeigh1" lblWidth="4"/> | |||
| <Field name="Zone_ID" lblWidth="4"/> | |||
| <Field name="Remark" lblWidth="4"/> | |||
| </DFInfoBand> | |||
| <HtmlBand> | |||
| <![CDATA[<h2>过磅记录</h2>]]> | |||
| </HtmlBand> | |||
| <DFListBand collection="$WeighRecords" itemType="$WeighRecordsType" enablePaging="true" > | |||
| <Field name="LiveVarieties_Name"/> | |||
| <Field name="Number"/> | |||
| <Field name="Weight" /> | |||
| <Field name="LiveColonyHouse_Name"/> | |||
| <Field name="Remark"/> | |||
| </DFListBand> | |||
| <HtmlBand> | |||
| <![CDATA[<h2>异常记录</h2>]]> | |||
| </HtmlBand> | |||
| <DFListBand collection="$WeighAbnormalRecording" itemType="$WeighAbnormalRecordingType" enablePaging="false" > | |||
| <LineNo header="序号"/> | |||
| <Field name="RewardItem_Name"/> | |||
| <Field name="Abnormal_Money" /> | |||
| </DFListBand> | |||
| </Bands> | |||
| </BillReport> | |||
| </Report> | |||
| </BillReports> | |||