Browse Source

增加查询条件 详见需求单 139791

master
wushukun 7 years ago
parent
commit
d19b91aec5
2 changed files with 39 additions and 2 deletions
  1. +31
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs
  2. +8
    -2
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml

+ 31
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs View File

@ -97,6 +97,8 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
base.InitForm(form);
}
private ChoiceBox _goodsPropertyCatalog;
protected override void AddQueryControls(VLayoutPanel vPanel)
{
var layout = new LayoutManager("Main", _mainInfo);
@ -112,6 +114,14 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
layout.Add("BillState", state);
layout.Add("OrderDate", QueryCreator.TimeRange(_mainInfo.Fields["OrderDate"], mQueryContainer, "MinOrderDate", "MaxOrderDate"));
_goodsPropertyCatalog = QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["GoodsPropertyCatalog_ID"], B3UnitedInfosConsts.DataSources.);
layout.Add("GoodsPropertyCatalog_ID", new SimpleLabel("属性分类"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_goodsPropertyCatalog, s => long.Parse(s)), "GoodsPropertyCatalog_ID"));
layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true;
layout.Add("Customer_ID", mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Customer_ID"], B3SaleDataSources.), s => long.Parse(s)), "Customer_ID"));
layout.Add("TakeGoods_Type", mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(QueryCreator.DFNameValueInputEnableMultiSelection<>(_mainInfo.Fields["TakeGoods_Type"]), s => long.Parse(s)), "TakeGoods_Type"));
layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true;
var config = layout.CreateDefaultConfig(4);
config.Expand = false;
var section = mPageLayoutManager.AddSection("查询条件", "查询条件");
@ -166,8 +176,29 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
var dom = base.GetQueryDom();
var root = dom.From.RootSource.Alias;
var detail = JoinAlias.Create("detail");
var goods = new JoinAlias(typeof(SaleGoods));
var goodsProperty = new JoinAlias(typeof(GoodsProperty));
var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog));
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), DQCondition.EQ(detail, "SaleGoods_ID", goods, "ID"));
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsProperty), DQCondition.EQ(goodsProperty, "ID", goods, "GoodsProperty_ID"));
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID"));
dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID));
OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore));
if (!_goodsPropertyCatalog.IsEmpty)
{
var strs = B3SaleWebUtil.GetDeepByTreeName(_goodsPropertyCatalog.DisplayValue);
var conditions = new List<IDQExpression>();
var values = _goodsPropertyCatalog.GetValues();
for (int index = 0; index < values.Length; index++)
{
var value = values[index];
conditions.Add(DQCondition.EQ(goodsPropertyCatalog, "TreeDeep" + strs[index] + "ID", value));
}
dom.Where.Conditions.Add(DQCondition.Or(conditions));
}
foreach (var item in fieldInfo)


+ 8
- 2
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml View File

@ -41,8 +41,14 @@
<Field name="DeliverGoodsLine_ID"/>
<QBE paramName="DeliverGoodsLine_ID"/>
</QBEIn>
<QBEIn>
<Field name="TakeGoods_Type"/>
<QBE paramName="TakeGoods_Type"/>
</QBEIn>
<QBEIn>
<Field name="Customer_ID"/>
<QBE paramName="Customer_ID"/>
</QBEIn>
</And>
</Where>
</Select>

Loading…
Cancel
Save