|
|
|
@ -52,27 +52,25 @@ namespace BWP.Web.Pages.B3ClientService.Reports.CarcassStateAnalyse_ |
|
|
|
ChoiceBox batchSelect; |
|
|
|
DFCheckBox noCodeBox; |
|
|
|
DateInput butcherDate; |
|
|
|
DFTextBox minInput, maxInput; |
|
|
|
private void AddQueryControl(Panel queryPanel) |
|
|
|
{ |
|
|
|
var hp = queryPanel.EAdd(new Panel()); |
|
|
|
hp.Style.Add("float", "right"); |
|
|
|
hp.EAdd(new SimpleLabel("屠宰日期")); |
|
|
|
butcherDate = hp.EAdd(new DateInput()); |
|
|
|
noCodeBox = hp.EAdd(new DFCheckBox() { Text = "查看无码", AutoPostBack = true }); |
|
|
|
noCodeBox.InputAttributes.Add("style", "width:15px;height:15px;"); |
|
|
|
hp.EAdd(new SimpleLabel("生产批次")); |
|
|
|
batchSelect = hp.EAdd(new ChoiceBox(B3ClientServiceConsts.DataSources.生产批次) { EnableInputArgument = true, EnableTopItem = true, AutoPostBack = true, Width = Unit.Pixel(160) }); |
|
|
|
batchSelect = hp.EAdd(new ChoiceBox(B3ClientServiceConsts.DataSources.生产批次) { EnableInputArgument = true, EnableTopItem = true, Width = Unit.Pixel(160) }); |
|
|
|
var batch = GetYesterdayBatch(); |
|
|
|
if (batch != null) |
|
|
|
batchSelect.Fill(batch.Item1.ToString(), batch.Item2); |
|
|
|
noCodeBox.CheckedChanged += delegate |
|
|
|
{ |
|
|
|
StartQuery(); |
|
|
|
}; |
|
|
|
batchSelect.SelectedValueChanged += delegate |
|
|
|
{ |
|
|
|
StartQuery(); |
|
|
|
}; |
|
|
|
hp.EAdd(new SimpleLabel("入库重量")); |
|
|
|
minInput = hp.EAdd(new DFTextBox() { Width = Unit.Pixel(50) }); |
|
|
|
hp.EAdd(new LiteralControl("-")); |
|
|
|
maxInput = hp.EAdd(new DFTextBox() { Width = Unit.Pixel(50) }); |
|
|
|
noCodeBox = hp.EAdd(new DFCheckBox() { Text = "查看无码" }); |
|
|
|
noCodeBox.InputAttributes.Add("style", "width:15px;height:15px;"); |
|
|
|
hp.EAdd(new TSButton("开始查询", delegate { StartQuery(); })); |
|
|
|
} |
|
|
|
|
|
|
|
Tuple<long, string> GetYesterdayBatch() |
|
|
|
@ -148,6 +146,10 @@ namespace BWP.Web.Pages.B3ClientService.Reports.CarcassStateAnalyse_ |
|
|
|
} |
|
|
|
if (noCodeBox.Checked) |
|
|
|
query.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field("BarCode")), DQCondition.EQ("BarCode", ""))); |
|
|
|
if (!minInput.IsEmpty) |
|
|
|
query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("InStoreWeight", decimal.Parse(minInput.Text))); |
|
|
|
if (!maxInput.IsEmpty) |
|
|
|
query.Where.Conditions.Add(DQCondition.LessThanOrEqual("InStoreWeight", decimal.Parse(maxInput.Text))); |
|
|
|
var args = new LoadArguments(query); |
|
|
|
foreach (var idx in sumColumns) |
|
|
|
args.SumColumns.Add(idx); |
|
|
|
|