Files
SamplePreSystem-CS/SamplePreSystem.UI/Views/SampleManager/chirld/NewSampleWindow.xaml

194 lines
6.6 KiB
Plaintext
Raw Normal View History

2026-04-30 11:34:41 +08:00
<local:BaseWindow
x:Class="SamplePre.UIWpf.SampleManager.chirld.NewSampleWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SamplePre.UIWpf.BaseWindows"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="样品管理"
Width="400"
Height="350"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center" Text="样品类型:" />
<ComboBox
x:Name="cmbSampleType"
Grid.Row="0"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
DisplayMemberPath="data_type"
ItemsSource="{Binding SampleTypeDict}"
SelectedItem="{Binding SelectSampleType}"
SelectedValuePath="id" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
Text="检样名:" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding TubeInput.item_name}" />
<TextBlock
Grid.Row="2"
VerticalAlignment="Center"
Text="执行标准:" />
<!--<ComboBox x:Name="cmbStandard" Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding StandardList}"
DisplayMemberPath="standard_name"
SelectedValuePath="id"
SelectedItem="{Binding SelectStandard}"
Width="250" Height="30" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>-->
<!-- 多选下拉框,选择后在上方显示选中内容 -->
<StackPanel
Grid.Row="2"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Orientation="Vertical">
<!-- 显示已选中的内容 -->
<TextBox
x:Name="txtSelectedStandards"
Width="250"
Height="30"
materialDesign:HintAssist.Hint="已选执行标准"
FontSize="13"
IsReadOnly="True" />
<!-- 多选下拉框 -->
<ComboBox
x:Name="cmbDataType"
Width="250"
Height="30"
Margin="0,-30,0,0"
ItemsSource="{Binding StandardList}">
<!-- 覆盖上去,视觉一体 -->
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox
Margin="4,2"
Click="ckbStand_Click"
Content="{Binding standard_name}"
IsChecked="{Binding IsSelected, Mode=TwoWay}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<!--<ComboBox x:Name="cmbDataType" ItemsSource="{Binding StandardList}"
Grid.Row="2" Grid.Column="1"
Width="250" Height="30"
materialDesign:HintAssist.Hint="请选择执行标准" >
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox x:Name="ckbStand" Click="ckbStand_Click" Content="{Binding standard_name}" IsChecked="{Binding IsSelected, Mode=TwoWay}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>-->
<TextBlock
Grid.Row="3"
VerticalAlignment="Center"
Text="样品编号:" />
<TextBox
Grid.Row="3"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding TubeInput.qrcode}" />
<TextBlock
Grid.Row="4"
VerticalAlignment="Center"
Text="样品数量:" />
<TextBox
Grid.Row="4"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding TubeInput.tube_count}" />
<TextBlock
Grid.Row="5"
VerticalAlignment="Center"
Text="录入人员:" />
<ComboBox
x:Name="cmbParamType"
Grid.Row="5"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding TubeInput.input_user}">
<ComboBoxItem Content="人员1" />
<ComboBoxItem Content="人员2" />
<ComboBoxItem Content="人员3" />
</ComboBox>
</Grid>
<StackPanel
Grid.Row="1"
Margin="0,10,0,0"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnOK"
Width="80"
Margin="5"
Command="{Binding BtnOKClickCommand}"
Content="确定" />
<Button
x:Name="btnCancel"
Width="80"
Margin="5"
Click="btnCancel_Click"
Content="取消" />
</StackPanel>
</Grid>
</local:BaseWindow>