|
|
@ -21,6 +21,7 @@ using Forks.Utils; |
|
|
using Forks.Utils.Collections; |
|
|
using Forks.Utils.Collections; |
|
|
using TSingSoft.WebControls2; |
|
|
using TSingSoft.WebControls2; |
|
|
using TSingSoft.WebPluginFramework.Controls; |
|
|
using TSingSoft.WebPluginFramework.Controls; |
|
|
|
|
|
using TSingSoft.WebPluginFramework.Pages; |
|
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
class SaleOrderUpdateEdit : AppBasePage { |
|
|
class SaleOrderUpdateEdit : AppBasePage { |
|
|
@ -213,8 +214,9 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
|
|
|
|
|
|
_goodsGrid.ShowLineNo = true; |
|
|
_goodsGrid.ShowLineNo = true; |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Order_ID")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Order_ID")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Customer_Name")); |
|
|
|
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("LoadTime")); |
|
|
|
|
|
|
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Customer_Name")); |
|
|
|
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("OrderDate")); |
|
|
|
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("LoadTime")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Goods_Code")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Goods_Code")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Goods_Name")); |
|
|
_goodsGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Goods_Name")); |
|
|
|
|
|
|
|
|
@ -317,16 +319,16 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
var dom = _queryContainer.Build(); |
|
|
var dom = _queryContainer.Build(); |
|
|
var order = dom.From.RootSource.Alias; |
|
|
var order = dom.From.RootSource.Alias; |
|
|
var detailAlias = new JoinAlias("detail", typeof(Order_Detail)); |
|
|
var detailAlias = new JoinAlias("detail", typeof(Order_Detail)); |
|
|
|
|
|
|
|
|
var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog)); |
|
|
|
|
|
var goodsProperty = new JoinAlias(typeof(GoodsProperty)); |
|
|
|
|
|
var goods = new JoinAlias(typeof(SaleGoods)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var goodsPropertyCatalog = new JoinAlias("_gpc", typeof(GoodsPropertyCatalog)); |
|
|
|
|
|
var goodsProperty = new JoinAlias("_gp", typeof(GoodsProperty)); |
|
|
|
|
|
var goods = new JoinAlias("_g", typeof(SaleGoods)); |
|
|
|
|
|
var customer = new JoinAlias("_c", typeof(Customer)); |
|
|
dom.From.AddJoin(JoinType.Inner, new DQDmoSource(detailAlias), |
|
|
dom.From.AddJoin(JoinType.Inner, new DQDmoSource(detailAlias), |
|
|
DQCondition.EQ(order, "ID", detailAlias, "Order_ID")); |
|
|
DQCondition.EQ(order, "ID", detailAlias, "Order_ID")); |
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), DQCondition.EQ(detailAlias, "SaleGoods_ID", goods, "ID")); |
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), DQCondition.EQ(detailAlias, "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(goodsProperty), DQCondition.EQ(goodsProperty, "ID", goods, "GoodsProperty_ID")); |
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID")); |
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID")); |
|
|
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(customer), DQCondition.EQ(order, "Customer_ID", customer, "ID")); |
|
|
|
|
|
|
|
|
dom.Columns.Add(DQSelectColumn.Field("ID", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("ID", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("UnitNum", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("UnitNum", detailAlias)); |
|
|
@ -342,41 +344,18 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
dom.Columns.Add(DQSelectColumn.Field("GoodsBatch_ID", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("GoodsBatch_ID", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("GoodsBatch_Name", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("GoodsBatch_Name", detailAlias)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("LoadTime", order)); |
|
|
dom.Columns.Add(DQSelectColumn.Field("LoadTime", order)); |
|
|
|
|
|
dom.Columns.Add(DQSelectColumn.Field("OrderDate", order)); |
|
|
|
|
|
var condition = (IList<IDQExpression>)ViewStateUtil.Current.LoadFromPersistenceMedium(uint.Parse(Request.QueryString["cacheid"]),true); |
|
|
|
|
|
foreach (var expression in condition) |
|
|
|
|
|
{ |
|
|
|
|
|
dom.Where.Conditions.Add(expression); |
|
|
|
|
|
} |
|
|
if (GoodsProperty_ID != null) { |
|
|
if (GoodsProperty_ID != null) { |
|
|
dom.Where.Conditions.Add(DQCondition.EQ(goodsProperty, "ID", GoodsProperty_ID)); |
|
|
dom.Where.Conditions.Add(DQCondition.EQ(goodsProperty, "ID", GoodsProperty_ID)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (AccountingUnit_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(order, "AccountingUnit_ID", AccountingUnit_ID)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (SelectAccountingUnit_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(order, "AccountingUnit_ID", SelectAccountingUnit_ID)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Customer_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(order, "Customer_ID", Customer_ID)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (SelectCustomer_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(order, "Customer_ID", SelectCustomer_ID)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (SelectStore_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(order, "Store_ID", SelectStore_ID)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(SelectGoodsPropertyCatalog_Name)) { |
|
|
|
|
|
var strs = B3SaleWebUtil.GetDeepByTreeName(SelectGoodsPropertyCatalog_Name); |
|
|
|
|
|
|
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(goodsPropertyCatalog, "TreeDeep" + strs[0] + "ID", SelectGoodsPropertyCatalog_ID)); |
|
|
|
|
|
} |
|
|
|
|
|
if (SelectGoodsProperty_ID != null) { |
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ(goodsProperty, "ID", SelectGoodsProperty_ID)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dom.Where.Conditions.Add(DQCondition.EQ("BillState", 单据状态.未审核)); |
|
|
|
|
|
OrganizationUtil.AddOrganizationLimit(dom, typeof(Order)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//dom.Where.Conditions.Add(DQCondition.EQ("BillState", 单据状态.未审核));
|
|
|
|
|
|
//OrganizationUtil.AddOrganizationLimit(dom, typeof(Order));
|
|
|
Details.Clear(); |
|
|
Details.Clear(); |
|
|
using (var context = new TransactionContext()) { |
|
|
using (var context = new TransactionContext()) { |
|
|
using (var reader = context.Session.ExecuteReader(dom)) { |
|
|
using (var reader = context.Session.ExecuteReader(dom)) { |
|
|
@ -395,7 +374,8 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
Order_ID = (long)reader[10], |
|
|
Order_ID = (long)reader[10], |
|
|
GoodsBatch_ID = (long?)reader[11], |
|
|
GoodsBatch_ID = (long?)reader[11], |
|
|
GoodsBatch_Name = (string)reader[12], |
|
|
GoodsBatch_Name = (string)reader[12], |
|
|
LoadTime = (DateTime?)reader[13] |
|
|
|
|
|
|
|
|
LoadTime = (DateTime?)reader[13], |
|
|
|
|
|
OrderDate = (DateTime?)reader[14], |
|
|
}; |
|
|
}; |
|
|
Details.Add(detail); |
|
|
Details.Add(detail); |
|
|
} |
|
|
} |
|
|
@ -414,6 +394,10 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools { |
|
|
class Order_DetailExt : Order_Detail { |
|
|
class Order_DetailExt : Order_Detail { |
|
|
[LogicName("发货时间")] |
|
|
[LogicName("发货时间")] |
|
|
public DateTime? LoadTime { get; set; } |
|
|
public DateTime? LoadTime { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
[LogicName("订货时间")] |
|
|
|
|
|
public DateTime? OrderDate { get; set; } |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |