核对去接药品效期(手麻无效期字段)
This commit is contained in:
parent
007572e5c6
commit
a60c914fc5
|
@ -277,7 +277,7 @@ namespace DM_Weight
|
|||
//containerRegistry.RegisterForNavigation<FridgeWindow, FridgeWindowViewModel>();
|
||||
////只有一个冰箱抽屉设置页面
|
||||
//containerRegistry.RegisterForNavigation<FridgeOnlyWindow, FridgeOnlyWindowViewModel>();
|
||||
//绑定药箱套餐
|
||||
//药箱绑定
|
||||
containerRegistry.RegisterForNavigation<BindBoxPackageWindow, BindBoxPackageWindowViewModel>();
|
||||
//药箱设置
|
||||
containerRegistry.RegisterForNavigation<SettingBoxWindow, SettingBoxWindowViewModel>();
|
||||
|
@ -287,6 +287,9 @@ namespace DM_Weight
|
|||
//温湿度记录
|
||||
containerRegistry.RegisterForNavigation<WSDRecordWindow, WSDRecordWindowViewModel>();
|
||||
|
||||
containerRegistry.RegisterForNavigation<SetMenuWindow, SetMenuWindowViewModel>();
|
||||
containerRegistry.RegisterDialog<AddNewMenuDialog>();
|
||||
containerRegistry.RegisterForNavigation<AddNewMenuDialog, AddNewMenuDialogViewModel>();
|
||||
#endregion
|
||||
|
||||
// 设备记录页面
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DM_Weight.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 药品套餐表
|
||||
/// </summary>
|
||||
[SugarTable("box_menu")]
|
||||
public class BoxMenu
|
||||
{
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(ColumnName ="name")]
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(ColumnName ="drug_id")]
|
||||
public string DrugId { get;set; }
|
||||
[SugarColumn(ColumnName ="base_quantity")]
|
||||
public int BaseQuantity { get; set; }
|
||||
[Navigate(NavigateType.ManyToOne, nameof(DrugId))]
|
||||
public DrugInfo DrugInfo { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
using DM_Weight.Models;
|
||||
using DM_Weight.util;
|
||||
using Prism.Events;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Regions;
|
||||
using Prism.Services.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DM_Weight.ViewModels
|
||||
{
|
||||
public class AddNewMenuDialogViewModel : BindableBase, IDialogAware, IRegionMemberLifetime
|
||||
{
|
||||
public bool KeepAlive => false;
|
||||
|
||||
public string Title => "添加套餐";
|
||||
private List<DrugInfo>? _drugInfos;
|
||||
|
||||
public List<DrugInfo>? DrugInfos
|
||||
{
|
||||
get => _drugInfos;
|
||||
set => SetProperty(ref _drugInfos, value);
|
||||
}
|
||||
public static AddNewMenuDialogViewModel vm;
|
||||
|
||||
IEventAggregator _eventAggregator;
|
||||
public AddNewMenuDialogViewModel(IEventAggregator eventAggregator)
|
||||
{
|
||||
_eventAggregator = eventAggregator;
|
||||
vm = this;
|
||||
}
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
|
||||
public bool CanCloseDialog()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsNavigationTarget(NavigationContext navigationContext)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnDialogClosed()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnDialogOpened(IDialogParameters parameters)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
private void GetAllDrugInfos()
|
||||
{
|
||||
//var list = SqlSugarHelper.Db.Queryable<DrugInfo>().Includes<DrugManuNo>(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
|
||||
//DrugInfos = list;
|
||||
string str = "SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,d.manufactory,d.max_stock,CONCAT(drug_name,' / ',drug_spec,' / ',manufactory) as drug_name_spec FROM `drug_info` d";
|
||||
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||
//DrugInfos_PY = list;
|
||||
}
|
||||
|
||||
public void UpdateComboBoxItems(string text)
|
||||
{
|
||||
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
||||
d.manufactory,d.max_stock,CONCAT(drug_name,' / ',drug_spec,' / ',manufactory) as drug_name_spec FROM `drug_info` d";
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||
return;
|
||||
}
|
||||
if (DrugInfos != null)
|
||||
{
|
||||
DrugInfos.Clear();
|
||||
}
|
||||
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).Where(di => di.DrugName.Contains(text) || di.PyCode.Contains(text)).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
using DM_Weight.Models;
|
||||
using DM_Weight.util;
|
||||
using Prism.Commands;
|
||||
using Prism.Ioc;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Regions;
|
||||
using Prism.Services.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Channels;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DM_Weight.ViewModels
|
||||
{
|
||||
public class SetMenuWindowViewModel : BindableBase, INavigationAware, IRegionMemberLifetime
|
||||
{
|
||||
public bool KeepAlive => false;
|
||||
|
||||
private List<BoxMenu> _menuList;
|
||||
public List<BoxMenu> MenuList { get=>_menuList; set=>SetProperty(ref _menuList,value); }
|
||||
IDialogService _dialogService;
|
||||
public SetMenuWindowViewModel(IDialogService dialogService)
|
||||
{
|
||||
_dialogService = dialogService;
|
||||
}
|
||||
public bool IsNavigationTarget(NavigationContext navigationContext)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnNavigatedFrom(NavigationContext navigationContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnNavigatedTo(NavigationContext navigationContext)
|
||||
{
|
||||
RequestData();
|
||||
}
|
||||
public void RequestData()
|
||||
{
|
||||
MenuList?.Clear();
|
||||
var list = SqlSugarHelper.Db.Queryable<BoxMenu>()
|
||||
//.Includes(cl => cl.channelStocks, cs => cs.DrugInfo,di=>di.drugBase)
|
||||
.Includes(cs => cs.DrugInfo).ToList();
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
MenuList = list;
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuList = null;
|
||||
}
|
||||
}
|
||||
public DelegateCommand BindingAddMenu
|
||||
{
|
||||
get => new DelegateCommand(() =>
|
||||
{
|
||||
DialogParameters dialogParameters=new DialogParameters();
|
||||
DialogServiceExtensions.ShowDialogHost(_dialogService, "AddNewMenuDialog", dialogParameters, DoDialogResult, "RootDialog");
|
||||
});
|
||||
}
|
||||
private void DoDialogResult(IDialogResult dialogResult)
|
||||
{
|
||||
RequestData();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -191,7 +191,7 @@
|
|||
DisplayMemberBinding="{Binding _OrderDetail.Quantity}"
|
||||
Header="数量"/>-->
|
||||
|
||||
<GridViewColumn Width="80" Header="药品名称">
|
||||
<GridViewColumn Width="100" Header="药品名称">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="DrugInfo.DrugName" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
||||
|
@ -205,13 +205,13 @@
|
|||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Width="80" Header="药品效期">
|
||||
<!--<GridViewColumn Width="80" Header="药品效期">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="SetEffDate" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Width="30" Header="数量">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -236,7 +236,7 @@
|
|||
</ListView.Resources>
|
||||
<ListView.View>
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource st}">
|
||||
<GridViewColumn Width="80"
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding DrugName}"
|
||||
Header="药品名称"/>
|
||||
<GridViewColumn Width="30"
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
DisplayMemberBinding="{Binding _OrderDetail.Quantity}"
|
||||
Header="数量"/>-->
|
||||
|
||||
<GridViewColumn Width="80" Header="药品名称">
|
||||
<GridViewColumn Width="100" Header="药品名称">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="DrugInfo.DrugName" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
||||
|
@ -215,13 +215,13 @@
|
|||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Width="80" Header="药品效期">
|
||||
<!--<GridViewColumn Width="80" Header="药品效期">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="SetEffDate" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Width="30" Header="数量">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -246,7 +246,7 @@
|
|||
</ListView.Resources>
|
||||
<ListView.View>
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource st}">
|
||||
<GridViewColumn Width="80"
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding DrugName}"
|
||||
Header="药品名称"/>
|
||||
<GridViewColumn Width="30"
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
<UserControl x:Class="DM_Weight.Views.Dialog.AddNewMenuDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DM_Weight.Views.Dialog"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="st" TargetType="GridViewColumnHeader">
|
||||
<Style.Setters>
|
||||
<Setter Property="Height">
|
||||
<Setter.Value>55</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>#31ccec</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>white</Setter.Value>
|
||||
</Setter>
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid Margin="6">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="#03a9f4" Grid.Row="0">
|
||||
<TextBlock VerticalAlignment="Center" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" Margin="16 4 16 4" Style="{StaticResource MaterialDesignHeadline5TextBlock}" Text="{Binding Title}" />
|
||||
<Button
|
||||
Style="{StaticResource MaterialDesignIconForegroundButton}"
|
||||
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding BtnCloseCommand}"
|
||||
ToolTip="关闭" Cursor="Hand"
|
||||
>
|
||||
<materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
|
||||
</Button>
|
||||
</Grid>
|
||||
<StackPanel Margin="0 6 0 0" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<ComboBox
|
||||
Margin="0 0 6 0"
|
||||
Grid.Column="0"
|
||||
materialDesign:HintAssist.Hint="药品名称/拼音码"
|
||||
IsEditable="True"
|
||||
ItemsSource="{Binding DrugInfos}"
|
||||
SelectedItem="{Binding DrugInfo}"
|
||||
DisplayMemberPath="drug_name_spec" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
|
||||
/>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Text="{Binding BaseQuantity}"
|
||||
materialDesign:HintAssist.Hint="药品基数"
|
||||
Margin="16 0 32 6" Width="100"
|
||||
Style="{StaticResource MaterialDesignTextBoxBase}"/>
|
||||
<Button
|
||||
Margin="6 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="添加"
|
||||
Content="添加"
|
||||
Command="{Binding BindingDrug}"/>
|
||||
<Button
|
||||
Margin="6 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="删除"
|
||||
Content="删除"
|
||||
Command="{Binding RemoveBinding}" />
|
||||
<Button Margin="6 0 6 6"
|
||||
Content="关闭"
|
||||
Command="{Binding BtnCloseCommand}"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}" />
|
||||
<Button
|
||||
Margin="0 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="刷新"
|
||||
Command="{Binding Query}"
|
||||
Content="{materialDesign:PackIcon Refresh}"/>
|
||||
</StackPanel>
|
||||
<ListView
|
||||
Padding="0 6 0 0" Grid.Row="2"
|
||||
ItemsSource="{Binding MenuList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
|
||||
materialDesign:DataGridAssist.ColumnHeaderPadding="10"
|
||||
materialDesign:ListViewAssist.ListViewItemPadding="13">
|
||||
<ListView.Resources>
|
||||
<Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Style>
|
||||
</ListView.Resources>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="200"
|
||||
DisplayMemberBinding="{Binding DrugInfo.DrugName}"
|
||||
Header="药品名称"/>
|
||||
<GridViewColumn Width="200"
|
||||
DisplayMemberBinding="{Binding DrugInfo.Manufactory}"
|
||||
Header="厂家"/>
|
||||
<GridViewColumn Width="200"
|
||||
DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"
|
||||
Header="规格"/>
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding BaseQuantity}"
|
||||
Header="药品基数"/>
|
||||
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<materialDesign:Snackbar
|
||||
Background="{Binding SnackbarBackground}"
|
||||
MessageQueue="{Binding SnackbarMessageQueue}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,47 @@
|
|||
using DM_Weight.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace DM_Weight.Views.Dialog
|
||||
{
|
||||
/// <summary>
|
||||
/// AddNewMenuDialog.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class AddNewMenuDialog : UserControl
|
||||
{
|
||||
AddNewMenuDialogViewModel vms;
|
||||
public AddNewMenuDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
vms = AddNewMenuDialogViewModel.vm;
|
||||
}
|
||||
/// <summary>
|
||||
/// 药品名称触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ComboBox_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
ComboBox comboBox = sender as ComboBox;
|
||||
vms.UpdateComboBoxItems(comboBox.Text);
|
||||
if (this.vms.DrugInfos.Count > 0)
|
||||
{
|
||||
comboBox.IsDropDownOpen = true;
|
||||
}
|
||||
TextBox textBox = (TextBox)comboBox.Template.FindName("PART_EditableTextBox", comboBox);
|
||||
textBox.SelectionStart = textBox.Text.Length;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
<UserControl x:Class="DM_Weight.Views.SetMenuWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:local="clr-namespace:DM_Weight.Views"
|
||||
mc:Ignorable="d" >
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="st" TargetType="GridViewColumnHeader">
|
||||
<Style.Setters>
|
||||
<Setter Property="Height">
|
||||
<Setter.Value>55</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>#31ccec</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>white</Setter.Value>
|
||||
</Setter>
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="2" Margin="6">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<!--<ComboBox
|
||||
Margin="0 0 6 0"
|
||||
Grid.Column="0"
|
||||
materialDesign:HintAssist.Hint="药品名称/拼音码"
|
||||
IsEditable="True"
|
||||
ItemsSource="{Binding DrugInfos}"
|
||||
SelectedItem="{Binding DrugInfo}"
|
||||
DisplayMemberPath="drug_name_spec" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
|
||||
/>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Text="{Binding BaseQuantity}"
|
||||
materialDesign:HintAssist.Hint="药品基数"
|
||||
Margin="16 0 32 6" Width="100"
|
||||
Style="{StaticResource MaterialDesignTextBoxBase}"/>-->
|
||||
<Button
|
||||
Margin="6 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="新建套餐"
|
||||
Content="新建套餐"
|
||||
Command="{Binding BindingAddMenu}"/>
|
||||
<Button
|
||||
Margin="6 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="移除药品"
|
||||
Content="移除药品"
|
||||
Command="{Binding RemoveMenu}" />
|
||||
<Button
|
||||
Margin="0 0 6 6"
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
ToolTip="刷新"
|
||||
Command="{Binding Query}"
|
||||
Content="{materialDesign:PackIcon Refresh}"/>
|
||||
</StackPanel>
|
||||
<ListView
|
||||
Padding="0 6 0 0" Grid.Row="1"
|
||||
ItemsSource="{Binding MenuList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
|
||||
materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
|
||||
materialDesign:DataGridAssist.ColumnHeaderPadding="10"
|
||||
materialDesign:ListViewAssist.ListViewItemPadding="13">
|
||||
<ListView.Resources>
|
||||
<Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Style>
|
||||
</ListView.Resources>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding Name}"
|
||||
Header="套餐"/>
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding DrugInfo.DrugName}"
|
||||
Header="药品名称"/>
|
||||
<GridViewColumn Width="200"
|
||||
DisplayMemberBinding="{Binding DrugInfo.Manufactory}"
|
||||
Header="厂家"/>
|
||||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"
|
||||
Header="规格"/>
|
||||
<GridViewColumn Width="80"
|
||||
DisplayMemberBinding="{Binding BaseQuantity}"
|
||||
Header="药品基数"/>
|
||||
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<materialDesign:Snackbar
|
||||
Background="{Binding SnackbarBackground}"
|
||||
MessageQueue="{Binding SnackbarMessageQueue}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace DM_Weight.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// SetMenuWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SetMenuWindow : UserControl
|
||||
{
|
||||
public SetMenuWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue