Browse Source

增加存货分类查询条件

master
wugang 8 years ago
parent
commit
f3326c1ec8
2 changed files with 19 additions and 6 deletions
  1. +19
    -2
      BWP.B3_YunKen.Web/Pages/B3YunKen/ProductTask_/SaleOrderToProductNoticePage.cs
  2. +0
    -4
      BWP.B3_YunKen.Web/Pages/B3YunKen/ProductTask_/SaleOrderToProductNoticePage.xml

+ 19
- 2
BWP.B3_YunKen.Web/Pages/B3YunKen/ProductTask_/SaleOrderToProductNoticePage.cs View File

@ -24,6 +24,7 @@ using Forks.EnterpriseServices.BusinessInterfaces;
using BWP.B3Butchery.BL; using BWP.B3Butchery.BL;
using BWP.B3Butchery.BO; using BWP.B3Butchery.BO;
using BWP.Web.Pages.Utils; using BWP.Web.Pages.Utils;
using Forks.EnterpriseServices.SqlDoms;
namespace BWP.Web.Pages.B3YunKen.ProductTask_ namespace BWP.Web.Pages.B3YunKen.ProductTask_
{ {
@ -39,7 +40,7 @@ namespace BWP.Web.Pages.B3YunKen.ProductTask_
protected static DFInfo mGoodsDFInfo = DFInfo.Get(typeof(Goods)); protected static DFInfo mGoodsDFInfo = DFInfo.Get(typeof(Goods));
protected static DFInfo mPropDFInfo = DFInfo.Get(typeof(GoodsProperty)); protected static DFInfo mPropDFInfo = DFInfo.Get(typeof(GoodsProperty));
private DFChoiceBox ccbxEmployeeUnit, ccbxDepartment, ccbxProductionUnit, ccbxAccountingUnit;
private DFChoiceBox ccbxEmployeeUnit, ccbxDepartment, ccbxProductionUnit, ccbxAccountingUnit, ccbxGoodsPropertyCatalog;
private DFDateInput cDateInput; private DFDateInput cDateInput;
private DFTextBox ccbxRemark; private DFTextBox ccbxRemark;
@ -285,7 +286,8 @@ namespace BWP.Web.Pages.B3YunKen.ProductTask_
cbxHideAlready = new DFCheckBox() { Text = "隐藏已转明细", Checked = true }; cbxHideAlready = new DFCheckBox() { Text = "隐藏已转明细", Checked = true };
manager.Add("隐藏已转明细", cbxHideAlready); manager.Add("隐藏已转明细", cbxHideAlready);
manager["隐藏已转明细"].NoLabel = true; manager["隐藏已转明细"].NoLabel = true;
manager.Add("GoodsPropertyCatalog_ID", new SimpleLabel("存货属性分类"), ccbxGoodsPropertyCatalog = QueryCreator.DFChoiceBox(mPropDFInfo.Fields["GoodsPropertyCatalog_ID"], B3UnitedInfosConsts.DataSources.));
//layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true;
manager.CreateDefaultConfig(8); manager.CreateDefaultConfig(8);
panel.Controls.Add(manager.CreateLayout()); panel.Controls.Add(manager.CreateLayout());
@ -346,6 +348,21 @@ namespace BWP.Web.Pages.B3YunKen.ProductTask_
{ {
dom.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field(detail, "B3Butcher_UnitNum")), DQCondition.LessThan(DQExpression.IfNull(DQExpression.Field(detail, "B3Butcher_UnitNum"), DQExpression.Value(0)), DQExpression.IfNull(DQExpression.Field(detail, "UnitNum"), DQExpression.Value(0))))); dom.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field(detail, "B3Butcher_UnitNum")), DQCondition.LessThan(DQExpression.IfNull(DQExpression.Field(detail, "B3Butcher_UnitNum"), DQExpression.Value(0)), DQExpression.IfNull(DQExpression.Field(detail, "UnitNum"), DQExpression.Value(0)))));
} }
if (!ccbxGoodsPropertyCatalog.IsEmpty) {
var goodsProperty = JoinAlias.Create("prop");
var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog));
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID"));
var strs = B3SaleWebUtil.GetDeepByTreeName(ccbxGoodsPropertyCatalog.DisplayValue);
var conditions = new List<IDQExpression>();
var values = ccbxGoodsPropertyCatalog.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));
}
return dom; return dom;
} }


+ 0
- 4
BWP.B3_YunKen.Web/Pages/B3YunKen/ProductTask_/SaleOrderToProductNoticePage.xml View File

@ -69,10 +69,6 @@
<Field name="Store_ID" /> <Field name="Store_ID" />
<QBE paramName="Store_ID"/> <QBE paramName="Store_ID"/>
</EQ> </EQ>
<EQ>
<Field name="GoodsPropertyCatalog_ID" alias="prop" />
<QBE paramName="GoodsPropertyCatalog_ID"/>
</EQ>
<EQ> <EQ>
<Field name="BrandItem_ID" alias="detail"/> <Field name="BrandItem_ID" alias="detail"/>
<QBE paramName="BrandItem_ID"/> <QBE paramName="BrandItem_ID"/>


Loading…
Cancel
Save