还空瓶页面添加根据machine_id查询可还药数量

This commit is contained in:
maqiao 2024-10-09 11:46:09 +08:00
parent fcf1238c2c
commit deb7b044e9
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ namespace DM_Weight.ViewModels
.WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
.Select((cs, di) => new ChannelStock{
CanReturnQuantity = SqlFunc.Subqueryable<MachineRecord>().Where(mr => mr.DrugId == cs.DrugId).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) ,
CanReturnQuantity = SqlFunc.Subqueryable<MachineRecord>().Where(mr => mr.DrugId == cs.DrugId&&mr.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) ,
DrugInfo = new DrugInfo
{
DrugId = di.DrugId,

View File

@ -34,7 +34,7 @@
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<StackPanel
<!--<StackPanel
Margin="0 0 0 0">
<Button
HorizontalAlignment="Right"
@ -42,7 +42,7 @@
Command="{Binding ReturnRecordCommand}"
Style="{StaticResource MaterialDesignOutlinedLightButton}" Content="导出回收登记记录">
</Button>
</StackPanel>
</StackPanel>-->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"
Grid.Column="1">
<Button