|
|
|
@ -28,6 +28,7 @@ using Forks.EnterpriseServices.DomainObjects2; |
|
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
using Forks.EnterpriseServices.SqlDoms; |
|
|
|
using BWP.B3Frameworks.BO; |
|
|
|
using BWP.B3Frameworks; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
{ |
|
|
|
@ -41,6 +42,7 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
private QueryContainer mQueryContainer; |
|
|
|
private DFContainer dfContainer; |
|
|
|
private DFBoolComboBox _sortType; |
|
|
|
private B3SaleOnlineConfiguration saleConfig = new B3SaleOnlineConfiguration(); |
|
|
|
|
|
|
|
uint QueryID |
|
|
|
{ |
|
|
|
@ -108,8 +110,15 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
_priceClass = QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["PriceClass_ID"], B3SaleDataSources.价格分类); |
|
|
|
layoutManager.Add("PriceClass_ID", new SimpleLabel("价格分类"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_priceClass, s => long.Parse(s)), "PriceClass_ID")); |
|
|
|
layoutManager["PriceClass_ID"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(saleConfig.PriceClassId)) { |
|
|
|
layoutManager.Add("AccountingUnit_ID", new SimpleLabel("会计单位"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.授权会计单位全部), s => long.Parse(s)), "AccountingUnit_ID")); |
|
|
|
layoutManager["AccountingUnit_ID"].NotAutoAddToContainer = true; |
|
|
|
} else { |
|
|
|
layoutManager.Add("BrandItem_ID", new SimpleLabel("品牌项"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["BrandItem_ID"], B3UnitedInfosConsts.DataSources.品牌项), s => long.Parse(s)), "BrandItem_ID")); |
|
|
|
layoutManager["BrandItem_ID"].NotAutoAddToContainer = true; |
|
|
|
} |
|
|
|
vPanel.Add(layoutManager.CreateLayout()); |
|
|
|
|
|
|
|
HLayoutPanel hPanel = new HLayoutPanel() { Align = HorizontalAlign.Center }; |
|
|
|
TSButton qButton = new TSButton("开始查询"); |
|
|
|
hPanel.Add(qButton); |
|
|
|
@ -175,11 +184,15 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
var main = dom.From.RootSource.Alias; |
|
|
|
var detail = JoinAlias.Create("detail"); |
|
|
|
var priceTemp = new JoinAlias("priTemp", typeof(PriceBillTemp)); |
|
|
|
PriceBillTemp.Regiester(dom); |
|
|
|
PriceBillTemp.AddJoin(dom, priceTemp); |
|
|
|
var auu = new JoinAlias("auu", typeof(AccountingUnit)); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(auu), DQCondition.EQ(priceTemp, "AccountingUnit_ID", auu, "ID")); |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(saleConfig.PriceClassId)) { |
|
|
|
PriceBillTemp.Regiester(dom); |
|
|
|
PriceBillTemp.AddJoin(dom, priceTemp); |
|
|
|
var auu = new JoinAlias("auu", typeof(AccountingUnit)); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(auu), DQCondition.EQ(priceTemp, "AccountingUnit_ID", auu, "ID")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(auu, "Name"), "会计单位")); |
|
|
|
} else { |
|
|
|
dom.Columns.Add(DQSelectColumn.Field("BrandItem_Name",main)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach (var field in detailFields) |
|
|
|
@ -188,7 +201,7 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
} |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Snippet<string>("''"), "备注")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(main, "ID"), "MainID")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(auu, "Name"), "会计单位")); |
|
|
|
|
|
|
|
QueryID = ViewStateUtil.Current.SaveToPersistenceMedium(dom.Where.Conditions); |
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(main, "BillState", 单据状态.未审核)); |
|
|
|
var billFlowCataID = new B3YunKenOnlineConfiguration().PriceAdjustBillFlowState.Value; |
|
|
|
@ -240,7 +253,11 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
_grid.DFGridSetEnabled = false; |
|
|
|
_grid.MultiSelectionEnabled = true; |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn("Goods_Name")).HeaderText = "标准件"; |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn("会计单位")).HeaderText = "会计单位"; ; |
|
|
|
if (string.IsNullOrEmpty(saleConfig.PriceClassId)) { |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn("会计单位")).HeaderText = "会计单位"; |
|
|
|
} else { |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn("BrandItem_Name")); |
|
|
|
} |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn( "GoodsProperty_Name")).HeaderText = "存货分类"; |
|
|
|
_grid.Columns.EAdd(new DFBrowseGridColumn("SourcePrice")).HeaderText = "原单价"; |
|
|
|
_grid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Price")).HeaderText = "调整单价"; |
|
|
|
|