You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
358 lines
20 KiB
XML
358 lines
20 KiB
XML
<Window x:Class="Sln.Wcs.UI.Page.BasicInfo.MaterialInfo.MaterialEditWindow"
|
|
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"
|
|
mc:Ignorable="d"
|
|
Title="编辑物料"
|
|
Height="500" Width="520"
|
|
WindowStyle="None"
|
|
AllowsTransparency="True"
|
|
Background="Transparent"
|
|
ResizeMode="NoResize"
|
|
ShowInTaskbar="False"
|
|
WindowStartupLocation="CenterOwner">
|
|
<Window.Resources>
|
|
<!-- 标题样式 -->
|
|
<Style x:Key="TitleStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#ECF0F1"/>
|
|
<Setter Property="FontSize" Value="20"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Margin" Value="0,0,0,20"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
</Style>
|
|
|
|
<!-- 标签样式(左侧标题) -->
|
|
<Style x:Key="LabelStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#B0B0B0"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="MinWidth" Value="70"/>
|
|
</Style>
|
|
|
|
<!-- 输入框样式 -->
|
|
<Style x:Key="FormTextBoxStyle" TargetType="TextBox">
|
|
<Setter Property="Background" Value="#0D0D18"/>
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
<Setter Property="BorderBrush" Value="#3A3A4A"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="10,8"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Padding="{TemplateBinding Padding}">
|
|
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsFocused" Value="True">
|
|
<Setter Property="BorderBrush" Value="#2196F3"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 下拉框样式 -->
|
|
<Style x:Key="FormComboBoxStyle" TargetType="ComboBox">
|
|
<Setter Property="Background" Value="#0D0D18"/>
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
<Setter Property="BorderBrush" Value="#3A3A4A"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="10,8"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<Grid>
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="30"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ContentPresenter Grid.Column="0" x:Name="ContentSite"
|
|
Margin="10,0,30,0"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Left"
|
|
Content="{TemplateBinding SelectionBoxItem}"
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
<ToggleButton Grid.ColumnSpan="2" x:Name="ToggleButton" ClickMode="Press" Focusable="False"
|
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Background="Transparent" BorderThickness="0">
|
|
<ToggleButton.Template>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Background="Transparent"/>
|
|
</ControlTemplate>
|
|
</ToggleButton.Template>
|
|
</ToggleButton>
|
|
<Path Grid.Column="1" x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Data="M 0 0 L 6 6 L 12 0 Z" Fill="#B0B0B0"/>
|
|
</Grid>
|
|
</Border>
|
|
<Popup x:Name="Popup" AllowsTransparency="True" IsOpen="{TemplateBinding IsDropDownOpen}" PopupAnimation="Slide"
|
|
Placement="Bottom" Focusable="False">
|
|
<Border x:Name="DropDown" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
Background="#1A1A2E" BorderBrush="#3A3A4A" BorderThickness="1" CornerRadius="4" Margin="0,2,0,0">
|
|
<ScrollViewer Margin="4">
|
|
<StackPanel IsItemsHost="True"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="#2196F3"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDropDownOpen" Value="True">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="#2196F3"/>
|
|
<Setter TargetName="Arrow" Property="Data" Value="M 0 6 L 6 0 L 12 6 Z"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 下拉项样式 -->
|
|
<Style TargetType="ComboBoxItem">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
<Setter Property="Padding" Value="10,8"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" CornerRadius="2">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#252540"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#2196F3"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 确认按钮样式 -->
|
|
<Style x:Key="ConfirmBtnStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="#2196F3"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Padding" Value="28,10"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6" Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#42A5F5"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#1976D2"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 取消按钮样式 -->
|
|
<Style x:Key="CancelBtnStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="#3A3A4A"/>
|
|
<Setter Property="Foreground" Value="#B0B0B0"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Padding" Value="28,10"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6" Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#4A4A5A"/>
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#2A2A3A"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 关闭按钮样式 -->
|
|
<Style x:Key="CloseBtnStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#B0B0B0"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="Width" Value="30"/>
|
|
<Setter Property="Height" Value="30"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="4">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#3D3D5C"/>
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Border Background="#1A1A2E" CornerRadius="8" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="20" ShadowDepth="3" Opacity="0.5"/>
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 标题栏 -->
|
|
<Grid Grid.Row="0" Background="#252540" Margin="-1,-1,-1,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="编辑物料" Foreground="#ECF0F1" FontSize="16" FontWeight="SemiBold"
|
|
VerticalAlignment="Center" Margin="16,12"/>
|
|
<Button Grid.Column="1" Content="✕" Style="{StaticResource CloseBtnStyle}" Click="BtnClose_Click" Margin="0,0,8,0"/>
|
|
</Grid>
|
|
|
|
<!-- 表单内容 -->
|
|
<StackPanel Grid.Row="1" Margin="24,16,24,24" Width="450" HorizontalAlignment="Center">
|
|
|
|
<!-- 第一行:物料编号 + 物料名称 -->
|
|
<Grid Margin="0,0,0,16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="24"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="物料编号" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="2" x:Name="TxtMaterialCode" Style="{StaticResource FormTextBoxStyle}"/>
|
|
|
|
<TextBlock Grid.Column="4" Text="物料名称" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="6" x:Name="TxtMaterialName" Style="{StaticResource FormTextBoxStyle}"/>
|
|
</Grid>
|
|
|
|
<!-- 第二行:物料类型 + 物料条码 -->
|
|
<Grid Margin="0,0,0,16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="24"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="物料类型" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="2" x:Name="TxtMaterialType" Style="{StaticResource FormTextBoxStyle}"/>
|
|
|
|
<TextBlock Grid.Column="4" Text="物料条码" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="6" x:Name="TxtMaterialBarcode" Style="{StaticResource FormTextBoxStyle}"/>
|
|
</Grid>
|
|
|
|
<!-- 第三行:最短存放周期 + 最长存放周期 -->
|
|
<Grid Margin="0,0,0,16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="24"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="最短周期(天)" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="2" x:Name="TxtMinStorageCycle" Style="{StaticResource FormTextBoxStyle}"/>
|
|
|
|
<TextBlock Grid.Column="4" Text="最长周期(天)" Style="{StaticResource LabelStyle}"/>
|
|
<TextBox Grid.Column="6" x:Name="TxtMaxStorageCycle" Style="{StaticResource FormTextBoxStyle}"/>
|
|
</Grid>
|
|
|
|
<!-- 第四行:是否标识 -->
|
|
<Grid Margin="0,0,0,16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="24"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="是否标识" Style="{StaticResource LabelStyle}"/>
|
|
<ComboBox Grid.Column="2" x:Name="CmbIsFlag" Style="{StaticResource FormComboBoxStyle}">
|
|
<ComboBoxItem Content="请选择" IsSelected="True"/>
|
|
<ComboBoxItem Content="是" Tag="1"/>
|
|
<ComboBoxItem Content="否" Tag="0"/>
|
|
</ComboBox>
|
|
|
|
<TextBlock Grid.Column="4" Text="" Style="{StaticResource LabelStyle}" Visibility="Hidden"/>
|
|
<TextBox Grid.Column="6" Style="{StaticResource FormTextBoxStyle}" Visibility="Hidden"/>
|
|
</Grid>
|
|
|
|
<!-- 第五行:备注 -->
|
|
<Grid Margin="0,0,0,24">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="备注" Style="{StaticResource LabelStyle}" VerticalAlignment="Top" Margin="0,8,0,0"/>
|
|
<TextBox Grid.Column="2" x:Name="TxtRemark" Style="{StaticResource FormTextBoxStyle}" Height="60" TextWrapping="Wrap" AcceptsReturn="True" VerticalContentAlignment="Top"/>
|
|
</Grid>
|
|
|
|
<!-- 按钮区域 -->
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="取消" Style="{StaticResource CancelBtnStyle}" Click="BtnCancel_Click" Margin="0,0,12,0"/>
|
|
<Button Content="确认" Style="{StaticResource ConfirmBtnStyle}" Click="BtnConfirm_Click"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Window> |