修改请领列表状态查询条件
This commit is contained in:
		
							parent
							
								
									1a33934c45
								
							
						
					
					
						commit
						3a12e3bfee
					
				| 
						 | 
					@ -330,6 +330,16 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (SelectDrugPleaseClaim.GetQuantity == 1)
 | 
					                if (SelectDrugPleaseClaim.GetQuantity == 1)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
 | 
					                    if(SelectDrugPleaseClaim.DrugManuNo is null)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        AlertMsg alertMsg = new AlertMsg
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            Message = "药品没有批次效期信息!",
 | 
				
			||||||
 | 
					                            Type = MsgType.ERROR,
 | 
				
			||||||
 | 
					                        };
 | 
				
			||||||
 | 
					                        _eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
 | 
				
			||||||
 | 
					                        return;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                    //请领单里只有一种药
 | 
					                    //请领单里只有一种药
 | 
				
			||||||
                    List<DrugPleaseManuNo> drugManuInfoList = JsonConvert.DeserializeObject<List<DrugPleaseManuNo>>(SelectDrugPleaseClaim.DrugManuNo);
 | 
					                    List<DrugPleaseManuNo> drugManuInfoList = JsonConvert.DeserializeObject<List<DrugPleaseManuNo>>(SelectDrugPleaseClaim.DrugManuNo);
 | 
				
			||||||
                    drugManuInfoList.ForEach(dm => dm.DrugId = SelectDrugPleaseClaim.DrugId);
 | 
					                    drugManuInfoList.ForEach(dm => dm.DrugId = SelectDrugPleaseClaim.DrugId);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -143,12 +143,13 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
            CollectDrugLst = SqlSugarHelper.Db.Queryable<CollectDrug>()
 | 
					            CollectDrugLst = SqlSugarHelper.Db.Queryable<CollectDrug>()
 | 
				
			||||||
                           .Includes<DrugPleaseClaim>(cd => cd.drugPleaseClaim)
 | 
					                           .Includes<DrugPleaseClaim>(cd => cd.drugPleaseClaim)
 | 
				
			||||||
                           .Includes<DrugInfo>(cd => cd.drugInfo)
 | 
					                           .Includes<DrugInfo>(cd => cd.drugInfo)
 | 
				
			||||||
                           .Where(cd => cd.MachineId.Equals(ConfigurationManager.AppSettings["department"] ?? "DM3"))
 | 
					                           .InnerJoin<DrugPleaseClaim>((cd,dp)=>cd.DrugPleaseClaimId==dp.PleaseNo)
 | 
				
			||||||
 | 
					                           .Where(cd => cd.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM3"))
 | 
				
			||||||
                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cd) => cd.drugInfo.DrugId.ToString() == SearchValue)
 | 
					                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cd) => cd.drugInfo.DrugId.ToString() == SearchValue)
 | 
				
			||||||
                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cd) => cd.drugInfo.DrugName.Contains(SearchValue))
 | 
					                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cd) => cd.drugInfo.DrugName.Contains(SearchValue))
 | 
				
			||||||
                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cd) => cd.drugInfo.PyCode.Contains(SearchValue))
 | 
					                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cd) => cd.drugInfo.PyCode.Contains(SearchValue))
 | 
				
			||||||
                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugBarcode"), (cd) => cd.drugInfo.DrugBarcode.Contains(SearchValue))
 | 
					                           .WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugBarcode"), (cd) => cd.drugInfo.DrugBarcode.Contains(SearchValue))
 | 
				
			||||||
                           .WhereIF((_DrugPleaseState!=null&& _DrugPleaseState.StateValue>=0),(cd)=>cd.Status==_DrugPleaseState.StateValue)
 | 
					                           .WhereIF((_DrugPleaseState!=null&& _DrugPleaseState.StateValue>=0),(cd,dp)=>dp.State==_DrugPleaseState.StateValue)
 | 
				
			||||||
                           .OrderByDescending(cd => cd.Createdate)
 | 
					                           .OrderByDescending(cd => cd.Createdate)
 | 
				
			||||||
                           .OrderByDescending(cd => cd.DrugId)
 | 
					                           .OrderByDescending(cd => cd.DrugId)
 | 
				
			||||||
                           .ToList();
 | 
					                           .ToList();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -123,6 +123,7 @@
 | 
				
			||||||
                                            <Expander.Header >
 | 
					                                            <Expander.Header >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                <StackPanel Orientation="Horizontal">
 | 
					                                                <StackPanel Orientation="Horizontal">
 | 
				
			||||||
 | 
					                                                    <TextBlock Text="{Binding Path=Name.PleaseNo,StringFormat=请领单号:{0},}" FontWeight="Bold" />
 | 
				
			||||||
                                                    <TextBlock Text="{Binding Path=Name.TotalQuantity,StringFormat=请领数量:{0},}" FontWeight="Bold" />
 | 
					                                                    <TextBlock Text="{Binding Path=Name.TotalQuantity,StringFormat=请领数量:{0},}" FontWeight="Bold" />
 | 
				
			||||||
                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.ReturnPrQuantity,StringFormat=处方张数:{0},}" />
 | 
					                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.ReturnPrQuantity,StringFormat=处方张数:{0},}" />
 | 
				
			||||||
                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.DoDate,StringFormat=请领时间:{0},}" />
 | 
					                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.DoDate,StringFormat=请领时间:{0},}" />
 | 
				
			||||||
| 
						 | 
					@ -169,12 +170,12 @@
 | 
				
			||||||
                                    Header="数量"
 | 
					                                    Header="数量"
 | 
				
			||||||
                                    IsReadOnly="True"
 | 
					                                    IsReadOnly="True"
 | 
				
			||||||
                                    ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
					                                    ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
				
			||||||
                <DataGridTextColumn Width="100"
 | 
					                <!--<DataGridTextColumn Width="100"
 | 
				
			||||||
                        Binding="{Binding CurrentMachineId}"
 | 
					                        Binding="{Binding CurrentMachineId}"
 | 
				
			||||||
                        Header="当前所在"
 | 
					                        Header="当前所在"
 | 
				
			||||||
                        IsReadOnly="True"
 | 
					                        IsReadOnly="True"
 | 
				
			||||||
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
					                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
				
			||||||
                <!--<DataGridTextColumn Width="80"
 | 
					                <DataGridTextColumn Width="80"
 | 
				
			||||||
                        Binding="{Binding Status,Converter={StaticResource ApplyListConverter}, ConverterParameter=OrderStatus}"
 | 
					                        Binding="{Binding Status,Converter={StaticResource ApplyListConverter}, ConverterParameter=OrderStatus}"
 | 
				
			||||||
                        Header="状态"
 | 
					                        Header="状态"
 | 
				
			||||||
                        IsReadOnly="True"
 | 
					                        IsReadOnly="True"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,7 +43,6 @@
 | 
				
			||||||
                        Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
 | 
					                        Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
 | 
				
			||||||
                        HorizontalAlignment="Right"
 | 
					                        HorizontalAlignment="Right"
 | 
				
			||||||
                        Command="{Binding BtnCloseCommand}"
 | 
					                        Command="{Binding BtnCloseCommand}"
 | 
				
			||||||
                        IsEnabled="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CloseBtn}"
 | 
					 | 
				
			||||||
                        ToolTip="关闭"
 | 
					                        ToolTip="关闭"
 | 
				
			||||||
                    >
 | 
					                    >
 | 
				
			||||||
                    <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
 | 
					                    <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
 | 
				
			||||||
| 
						 | 
					@ -179,15 +178,11 @@
 | 
				
			||||||
                    <Button
 | 
					                    <Button
 | 
				
			||||||
                            Margin="2"
 | 
					                            Margin="2"
 | 
				
			||||||
                            Style="{StaticResource MaterialDesignRaisedAccentButton}"                           
 | 
					                            Style="{StaticResource MaterialDesignRaisedAccentButton}"                           
 | 
				
			||||||
                            Visibility="{Binding Status,Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnVisible}"
 | 
					 | 
				
			||||||
                            materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
					 | 
				
			||||||
                            materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
					 | 
				
			||||||
                            Content="销毁"
 | 
					                            Content="销毁"
 | 
				
			||||||
                            Command="{Binding DestoryEmptyCommand}">
 | 
					                            Command="{Binding DestoryEmptyCommand}">
 | 
				
			||||||
                    </Button>
 | 
					                    </Button>
 | 
				
			||||||
                    <Button
 | 
					                    <Button
 | 
				
			||||||
                            Margin="2"
 | 
					                            Margin="2"
 | 
				
			||||||
                            Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CancelBtn}"
 | 
					 | 
				
			||||||
                            Style="{StaticResource MaterialDesignRaisedButton}"
 | 
					                            Style="{StaticResource MaterialDesignRaisedButton}"
 | 
				
			||||||
                            Background="Orange"
 | 
					                            Background="Orange"
 | 
				
			||||||
                            BorderBrush="Orange"
 | 
					                            BorderBrush="Orange"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,6 +101,6 @@
 | 
				
			||||||
            ToolTip="报警状态"
 | 
					            ToolTip="报警状态"
 | 
				
			||||||
            Content="打开"
 | 
					            Content="打开"
 | 
				
			||||||
            materialDesign:ToggleButtonAssist.OnContent="关闭" />
 | 
					            materialDesign:ToggleButtonAssist.OnContent="关闭" />
 | 
				
			||||||
        <Button Grid.Row="4" Grid.ColumnSpan="2"  Content="保存" Command="{Binding SaveCommand}" IsEnabled="{Binding BtnIsEnable}" />
 | 
					        <Button Grid.Row="4" Grid.ColumnSpan="3"  Content="保存" Command="{Binding SaveCommand}" IsEnabled="{Binding BtnIsEnable}" />
 | 
				
			||||||
    </Grid>
 | 
					    </Grid>
 | 
				
			||||||
</UserControl>
 | 
					</UserControl>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue