StockListWindowViewModel中RequestData修改

This commit is contained in:
maqiao 2025-09-30 13:52:47 +08:00
parent 81ea3f55f2
commit d38390d80e
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ namespace DM_Weight.ViewModels
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cs) => cs.DrugName.Contains(SearchValue))
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cs) => cs.PyCode.Contains(SearchValue))
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugBarcode"), (cs) => cs.DrugBarcode.Contains(SearchValue))
.WhereIF(App.SingleModel, di => di.channelStocks.Any(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null&&cs.DrawerNo <= 8&& cs.DrawerType == 1))
.WhereIF(!(App.SingleModel), di => di.channelStocks.Any(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null&&cs.DrawerNo > 8&& cs.DrawerType == 1))
.WhereIF(App.SingleModel, di => di.channelStocks.Any(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null&&cs.DrawerNo <= 2&& cs.DrawerType == 1))
.WhereIF(!(App.SingleModel), di => di.channelStocks.Any(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") && cs.DrugId != null&&cs.DrawerNo > 2&& cs.DrawerType == 1))
.OrderBy(cs => cs.DrugId)
.ToList();
Drugs = q;