|
@@ -5,8 +5,11 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:local="clr-namespace:UniformMaterialManagementSystem.Views"
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:behavoirs="clr-namespace:UniformMaterialManagementSystem.Behaviors"
|
|
|
xmlns:utils="clr-namespace:UniformMaterialManagementSystem.Utils"
|
|
|
xmlns:converters="clr-namespace:UniformMaterialManagementSystem.Converters"
|
|
|
+ xmlns:fdg="http://FilterDataGrid.Control.com/2024"
|
|
|
+ xmlns:custom="clr-namespace:UniformMaterialManagementSystem.Custom"
|
|
|
mc:Ignorable="d"
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
<UserControl.Resources>
|
|
@@ -34,26 +37,27 @@
|
|
|
|
|
|
<!-- 列标题模板:必须在列标题样式引用之前定义 -->
|
|
|
<ControlTemplate x:Key="CustomColumnHeaderTemplate" TargetType="DataGridColumnHeader">
|
|
|
- <!-- 模板中给列标题最外层加一层边框:BorderThickness 分别设置 左 上 右 下 的边框宽度 -->
|
|
|
- <Border BorderThickness="0 0 1 1"
|
|
|
- BorderBrush="Black">
|
|
|
+ <!-- BorderThickness 分别设置左,上,右,下的边框宽度。 -->
|
|
|
+ <Border BorderThickness="0, 0, 1, 1" BorderBrush="Black">
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition />
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <ContentPresenter Grid.Column="0"
|
|
|
- HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
- <!-- 排序按钮 -->
|
|
|
+ <!-- 重定义控件模板,在 Style 中设置的居中属性会被覆盖,所以在这里也需要设置居中 -->
|
|
|
+ <ContentPresenter Grid.Column="0"
|
|
|
+ HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
+ <!-- 列排序图标 -->
|
|
|
<Path x:Name="SortArrow"
|
|
|
- Grid.Column="1"
|
|
|
- Margin="0,0,5,0"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Data="M 0 0 L 10 0 L 5 5 Z"
|
|
|
- Fill="Gray"
|
|
|
- Visibility="Collapsed" />
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="0,0,5,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Data="M 0 0 L 10 0 L 5 5 Z"
|
|
|
+ Fill="Gray"
|
|
|
+ Visibility="Collapsed" />
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
+ <!-- 列排序按钮 -->
|
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="SortDirection" Value="Ascending">
|
|
|
<Setter TargetName="SortArrow" Property="Data" Value="M 0 5 L 10 5 L 5 0 Z" />
|
|
@@ -126,6 +130,7 @@
|
|
|
</Style.Triggers>
|
|
|
</Style>
|
|
|
|
|
|
+ <!-- todo 为什么必须设置文本列样式之后才能居中,单元格设置不起作用? -->
|
|
|
<!-- 单元格样式 -->
|
|
|
<Style x:Key="CustomCellStyle" TargetType="DataGridCell"
|
|
|
BasedOn="{StaticResource {x:Type DataGridCell}}">
|
|
@@ -149,17 +154,24 @@
|
|
|
<Setter Property="TextAlignment" Value="Center" />
|
|
|
</Style>
|
|
|
|
|
|
+ <!-- 文本列编辑状态居左 -->
|
|
|
+ <Style x:Key="TextColumnEditingStyle" TargetType="TextBox">
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
<!-- 复选框列居中 -->
|
|
|
<Style x:Key="CheckBoxColumnElementStyle" TargetType="CheckBox">
|
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
+ <Setter Property="Padding" Value="0, 5, 0, 5" />
|
|
|
</Style>
|
|
|
|
|
|
<!-- TextBlock 一般用来展示文本,TextBox 一般用于输入文本 -->
|
|
|
<!-- TextBlock 样式 -->
|
|
|
<Style x:Key="CustomTextBlockStyle" TargetType="TextBlock">
|
|
|
<Setter Property="Width" Value="100" />
|
|
|
- <Setter Property="Height" Value="30" />
|
|
|
+ <Setter Property="Height" Value="20" />
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
<Setter Property="TextAlignment" Value="Right" />
|
|
@@ -167,7 +179,7 @@
|
|
|
</Style>
|
|
|
|
|
|
<!-- Label 比 TextBlock 更复杂,但可以方便的设置边框 -->
|
|
|
- <!-- Label 样式 -->
|
|
|
+ <!-- Label 样式:有边框 -->
|
|
|
<Style x:Key="CustomLabelStyle" TargetType="Label">
|
|
|
<Setter Property="BorderBrush" Value="LightGray" />
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
@@ -178,7 +190,19 @@
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
- <Setter Property="Margin" Value="5" />
|
|
|
+ <Setter Property="Margin" Value="0 5 0 5" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <!-- TextBox :输入框 -->
|
|
|
+ <Style x:Key="CustomTextBoxStyle" TargetType="TextBox">
|
|
|
+ <Setter Property="BorderBrush" Value="Gray" />
|
|
|
+ <Setter Property="BorderThickness" Value="1" />
|
|
|
+ <Setter Property="Width" Value="200" />
|
|
|
+ <Setter Property="Height" Value="30" />
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="Margin" Value="0 5 0 5" />
|
|
|
</Style>
|
|
|
|
|
|
<!-- 转换器 -->
|
|
@@ -189,501 +213,457 @@
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="2*" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <!-- 检验申请列表 -->
|
|
|
- <Grid Grid.Row="0" Grid.Column="0">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <!-- todo 查询工具栏
|
|
|
- 直接 DataGrid 每列都可以筛选,+ 三列选择筛选,删除关键字查询 -->
|
|
|
- <Border Grid.Row="0"
|
|
|
- BorderBrush="Gray"
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <!-- 发货单工具栏 -->
|
|
|
+ <Border x:Name="toolBarDelivery"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1">
|
|
|
+ <ToolBar Background="White"
|
|
|
+ ToolBarTray.IsLocked="True">
|
|
|
+ <Button Content="新增发货单"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Add_Square_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding AddDeliveryCommand}" />
|
|
|
+ <Button Content="删除发货单"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Delete_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding DeleteDeliveryCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=fdgDelivery}" />
|
|
|
+ <Separator />
|
|
|
+ <Button Content="保存"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Save_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding SaveCommand}" />
|
|
|
+
|
|
|
+ <!--<WrapPanel Orientation="Horizontal">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="检验申请编号:"
|
|
|
+ Width="90"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+
|
|
|
+ <custom:AutoCompleteBox x:Name="autoListBoxNo"
|
|
|
+ Background="White"
|
|
|
+ Width="275"
|
|
|
+ Margin="0 2 0 2"
|
|
|
+ ItemsSource="{Binding InspectApplyNos}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="产品名称:"
|
|
|
+ Width="90"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <custom:AutoCompleteBox x:Name="autoListBoxMate"
|
|
|
+ Background="White"
|
|
|
+ Width="275"
|
|
|
+ Margin="0 2 0 2"
|
|
|
+ ItemsSource="{Binding ProductNames}"
|
|
|
+ SelectedItem="{Binding SelectedProductName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <Button Content="查询"
|
|
|
+ Margin="5 0 5 0"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Search_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding QueryCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=autoListBoxNo}">
|
|
|
+ </Button>
|
|
|
+ </WrapPanel>-->
|
|
|
+ </ToolBar>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 发货单主表:主表不允许编辑,只能选择一行后编辑信息 -->
|
|
|
+ <!-- todo 控件的高度为空,不能这么绑定:
|
|
|
+ MaxHeight="{Binding Path=Width,ElementName=dataGridDeliveryDetail}"
|
|
|
+ 行标题:RowHeaderStyle="{StaticResource CustomRowHeaderStyle}" -->
|
|
|
+ <fdg:FilterDataGrid x:Name="fdgDelivery"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ FilterLanguage="SimplifiedChinese"
|
|
|
+ Background="White"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ behavoirs:DataGridBehavior.RowNumbers="True"
|
|
|
+ SelectionMode="Single"
|
|
|
+ SelectionUnit="FullRow"
|
|
|
+ HeadersVisibility="All"
|
|
|
+ ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
+ RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
+ RowStyle="{StaticResource CustomRowStyle}"
|
|
|
+ CellStyle="{StaticResource CustomCellStyle}"
|
|
|
+ IsReadOnly="True"
|
|
|
+ MinHeight="100"
|
|
|
+ SelectedItem="{Binding CurrDeliveryReceipt, Mode=TwoWay}"
|
|
|
+ ItemsSource="{Binding DeliveryReceipts, Mode=TwoWay}">
|
|
|
+
|
|
|
+ <!-- DataGrid 事件 -->
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <!-- 选择行切换事件 -->
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <!-- 绑定命令 -->
|
|
|
+ <!--<b:InvokeCommandAction Command="{Binding DeliverySelectionChangedCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=fdgDelivery}" />-->
|
|
|
+
|
|
|
+ <!-- 调用方法:传递事件参数 -->
|
|
|
+ <!-- TargetObject="{Binding }" 表示目标对象是当前的数据上下文,事件被触发时调用数据上下文的指定方法;指定的方法不需要绑定命令,参数必须与事件的参数一致 -->
|
|
|
+ <!--<b:CallMethodAction TargetObject="{Binding }"
|
|
|
+ MethodName="DeliverySelectionChanged" />-->
|
|
|
+
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+
|
|
|
+ <!-- todo 为什么只能设置为绝对宽度,比例宽度列标题不显示? -->
|
|
|
+ <!-- todo 检查下数据库字段,添加检验申请和合同编号字段等 -->
|
|
|
+ <!-- 数据结构 -->
|
|
|
+ <fdg:FilterDataGrid.Columns>
|
|
|
+ <fdg:FilterDataGridTextColumn Header="检验申请编号" Width="300"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ApplyNo}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="合同编号" Width="200"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ContractNo}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="产品名称" Width="200"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ProductName}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="生产企业" Width="200"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding CompanyName}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="接收单位" Width="200"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ReceivedCompanyName}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="批次号" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding BatchNo}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="发运包数" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ShippedPackets}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="发运数量" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ShippedQty}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="发运时间" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ShippedDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="发运承办人" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ShippedMan}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="联系电话" Width="100"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Binding="{Binding ShippedTel}" />
|
|
|
+ </fdg:FilterDataGrid.Columns>
|
|
|
+ </fdg:FilterDataGrid>
|
|
|
+
|
|
|
+ <!-- todo 拖动限制:左右拖动至少留出检验申请/发货单的一部分,上下拖动至少;留出主表列标题/子表工具栏+列标题 -->
|
|
|
+ <!-- 水平拖动分割线 -->
|
|
|
+ <GridSplitter Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Height="5" HorizontalAlignment="Stretch" />
|
|
|
+
|
|
|
+ <!-- todo 设置 StackPanel 高度超出范围时自动拉伸 -->
|
|
|
+ <!-- 发货单信息 -->
|
|
|
+ <StackPanel x:Name="panelInfo"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Background="White"
|
|
|
+ Orientation="Vertical"
|
|
|
+ CanVerticallyScroll="True"
|
|
|
+ VerticalAlignment="Stretch">
|
|
|
+
|
|
|
+ <!-- 表头信息 -->
|
|
|
+ <Border Grid.Row="0" Grid.Column="0"
|
|
|
+ BorderBrush="Gray"
|
|
|
BorderThickness="1">
|
|
|
- <ToolBar Background="White"
|
|
|
- ToolBarTray.IsLocked="True">
|
|
|
- <TextBlock Text="产品名称: " />
|
|
|
- <TextBlock Text="生产企业: " />
|
|
|
- <TextBlock Text="批号: " />
|
|
|
- <Button Content="btn查询"></Button>
|
|
|
- <TextBlock Text="关键字:" />
|
|
|
- <Button Content="btn关键字查询" />
|
|
|
- </ToolBar>
|
|
|
+ <Grid Background="White">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Label Grid.Column="0"
|
|
|
+ BorderBrush="Gray" BorderThickness="1 0 1 0"
|
|
|
+ Width="100"
|
|
|
+ Content="表头信息"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Padding="5" />
|
|
|
+
|
|
|
+ <WrapPanel Grid.Column="1"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <!-- 产品名称 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="产品名称:" Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label x:Name="lblMaterial"
|
|
|
+ Content="{Binding CurrDeliveryReceipt.ProductName}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 生产企业 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="生产企业:" Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.CompanyName}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </WrapPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
</Border>
|
|
|
|
|
|
- <!-- 检验申请数据 -->
|
|
|
- <DataGrid x:Name="dataGridApply"
|
|
|
- Grid.Row="1"
|
|
|
- Background="White"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- SelectionMode="Single"
|
|
|
- SelectionUnit="FullRow"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- IsReadOnly="True"
|
|
|
- ItemsSource="{Binding InspectApplies, Mode=TwoWay}">
|
|
|
- <!-- DataGrid 事件 -->
|
|
|
- <b:Interaction.Triggers>
|
|
|
- <!-- 选择行切换事件 -->
|
|
|
- <b:EventTrigger EventName="SelectionChanged">
|
|
|
- <b:InvokeCommandAction Command="{Binding ApplySelectionChangedCommand}"
|
|
|
- CommandParameter="{Binding ElementName=dataGridApply}" />
|
|
|
- </b:EventTrigger>
|
|
|
- </b:Interaction.Triggers>
|
|
|
-
|
|
|
- <!-- 数据结构 -->
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="检验申请编号" Width="300"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding ApplyNo}" />
|
|
|
- <DataGridTextColumn Header="检验类别" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding InspCategory}" />
|
|
|
- <DataGridTextColumn Header="产品名称" Width="300"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding ProductName}" />
|
|
|
- <DataGridTextColumn Header="生产企业" Width="300"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding Company}" />
|
|
|
- <DataGridTextColumn Header="报检数量" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding InspQuantity}" />
|
|
|
- <DataGridTextColumn Header="生产开始日期" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding StartProductDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridTextColumn Header="生产结束日期" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding EndProductDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridTextColumn Header="申请检验时间" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding InspDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridCheckBoxColumn Header="检验报告生成状态" Width="100"
|
|
|
- ElementStyle="{StaticResource CheckBoxColumnElementStyle}"
|
|
|
- Binding="{Binding ReportStatus}" />
|
|
|
- <DataGridTextColumn Header="申请收到时间" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding ApplyReceiveDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridTextColumn Header="申请人" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding ApplyUser}" />
|
|
|
- <DataGridTextColumn Header="工作年度" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding Year}" />
|
|
|
- <DataGridTextColumn Header="申请检验准备情况说明" Width="300"
|
|
|
- Binding="{Binding ApplyDescription}">
|
|
|
- <!-- 文本默认不换行,但多行文本依然会自动加宽行高,设置行样式之后行高固定 -->
|
|
|
- <!--<DataGridTextColumn.ElementStyle>
|
|
|
- <Style>
|
|
|
- <Setter Property="TextBlock.TextWrapping" Value="NoWrap" />
|
|
|
- </Style>
|
|
|
- </DataGridTextColumn.ElementStyle>-->
|
|
|
- </DataGridTextColumn>
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
-
|
|
|
- <!-- 检验申请 - 合同信息 -->
|
|
|
- <DataGrid x:Name="dataGridContract"
|
|
|
- Grid.Row="2"
|
|
|
- Background="White"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- SelectionMode="Single"
|
|
|
- SelectionUnit="FullRow"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- IsReadOnly="True"
|
|
|
- ItemsSource="{Binding InspectApplyContracts, Mode=TwoWay}">
|
|
|
- <!-- DataGrid 事件 -->
|
|
|
- <b:Interaction.Triggers>
|
|
|
- <!-- 选择行切换事件 -->
|
|
|
- <b:EventTrigger EventName="SelectionChanged">
|
|
|
- <b:InvokeCommandAction Command="{Binding ContractSelectionChangedCommand}"
|
|
|
- CommandParameter="{Binding ElementName=dataGridContract}" />
|
|
|
- </b:EventTrigger>
|
|
|
- </b:Interaction.Triggers>
|
|
|
-
|
|
|
- <!-- 数据结构 -->
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="采购机构" Width="200"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding PurchaseCompany}" />
|
|
|
- <DataGridTextColumn Header="合同编号" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding ContractNo}" />
|
|
|
- <!-- todo 字段是 string 类型的? -->
|
|
|
- <DataGridTextColumn Header="合同签订时间" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding SigningDate, StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridTextColumn Header="合同数量" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding InspectQty}" />
|
|
|
- <DataGridTextColumn Header="可报检数量" Width="100"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Binding="{Binding UnInspectQty}" />
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
-
|
|
|
- </Grid>
|
|
|
-
|
|
|
- <!-- 垂直拖动分割线 -->
|
|
|
- <GridSplitter Grid.Column="1" Grid.Row="0" Width="5" HorizontalAlignment="Stretch"/>
|
|
|
-
|
|
|
- <!-- 发货单页面 -->
|
|
|
- <Grid Grid.Row="0" Grid.Column="4">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <!-- 发货单工具栏 -->
|
|
|
- <Border x:Name="toolBarDelivery"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="0"
|
|
|
- Grid.ColumnSpan="2"
|
|
|
- BorderBrush="Gray"
|
|
|
+ <!-- 合同信息 -->
|
|
|
+ <Border Grid.Row="1" Grid.Column="0"
|
|
|
+ BorderBrush="Gray"
|
|
|
BorderThickness="1">
|
|
|
- <ToolBar Background="White"
|
|
|
- ToolBarTray.IsLocked="True">
|
|
|
- <Button Content="新增发货单"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Add_Circle_32}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
- Command="{Binding AddDeliveryCommand}">
|
|
|
- <Button.CommandParameter>
|
|
|
- <MultiBinding Converter="{StaticResource MultiParamConverter}">
|
|
|
- <Binding ElementName="dataGridContract" />
|
|
|
- <Binding ElementName="dataGridDelivery" />
|
|
|
- </MultiBinding>
|
|
|
- </Button.CommandParameter>
|
|
|
- </Button>
|
|
|
- <Button Content="删除发货单"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Delete_32}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- <Separator />
|
|
|
- <Button Content="保存"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Save_32}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- <Separator />
|
|
|
- <Button Content="导出回执单"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Arrow_Square_Down_24}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
-
|
|
|
- </ToolBar>
|
|
|
+ <Grid Background="White">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Label Grid.Column="0"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1 0 1 0"
|
|
|
+ Width="100"
|
|
|
+ Content="合同信息"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center" />
|
|
|
+
|
|
|
+ <WrapPanel Grid.Column="1"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <!-- 合同编号 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="合同编号:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ContractNo}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 采购机构 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="采购机构:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.PurchaseCompanyName}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 合同数量 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="合同数量:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ContractQty}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- todo 日期格式设置不生效 -->
|
|
|
+ <!-- 合同时间 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="合同时间:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ContractSigningDate, StringFormat='yyyy:MM:dd'}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 检验合格数量、剩余数量 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="检验合格数量:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <!-- 非保存列;重复设置 Width、TextAligment 属性,直接设置的值覆盖 Style 的值 -->
|
|
|
+ <TextBlock Text="{Binding CurrDeliveryReceipt.InspQty}"
|
|
|
+ Width="50"
|
|
|
+ Foreground="Red"
|
|
|
+ TextAlignment="Left"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <TextBlock Text="可发运数量:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <TextBlock Text="{Binding CurrDeliveryReceipt.RemainQty}"
|
|
|
+ Width="50"
|
|
|
+ Foreground="Red"
|
|
|
+ TextAlignment="Left"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </WrapPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
</Border>
|
|
|
|
|
|
- <!-- 发货单主表 -->
|
|
|
- <DataGrid x:Name="dataGridDelivery"
|
|
|
- Grid.Row="1"
|
|
|
- Grid.Column="0"
|
|
|
- Grid.ColumnSpan="2"
|
|
|
- Background="White"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- SelectionMode="Single"
|
|
|
- SelectionUnit="FullRow"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- IsReadOnly="True"
|
|
|
- MinHeight="100"
|
|
|
- MaxHeight="{Binding Path=Width,ElementName=dataGridApply}"
|
|
|
- ItemsSource="{Binding DeliveryReceipts, Mode=TwoWay}">
|
|
|
- <!-- 数据结构 -->
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="产品名称" Width="2*"
|
|
|
- Binding="{Binding MaterialName}" />
|
|
|
- <DataGridTextColumn Header="生产企业" Width="2*"
|
|
|
- Binding="{Binding CompanyName}" />
|
|
|
- <DataGridTextColumn Header="接收单位" Width="2*"
|
|
|
- Binding="{Binding ReceivedCompanyName}" />
|
|
|
- <DataGridTextColumn Header="批次号" Width="*"
|
|
|
- Binding="{Binding BatchNo}" />
|
|
|
- <DataGridTextColumn Header="发运包数" Width="*"
|
|
|
- Binding="{Binding ShippedPackets}" />
|
|
|
- <DataGridTextColumn Header="发运数量" Width="*"
|
|
|
- Binding="{Binding ShippedQty}" />
|
|
|
- <DataGridTextColumn Header="发运时间" Width="*"
|
|
|
- Binding="{Binding ShippedDate,StringFormat='yyyy/MM/dd'}" />
|
|
|
- <DataGridTextColumn Header="发运承办人" Width="*"
|
|
|
- Binding="{Binding ShippedMan}" />
|
|
|
- <DataGridTextColumn Header="联系电话" Width="*"
|
|
|
- Binding="{Binding ShippedTel}" />
|
|
|
- </DataGrid.Columns>
|
|
|
- </DataGrid>
|
|
|
-
|
|
|
- <!-- todo 拖动限制:左右拖动至少留出检验申请/发货单的一部分,上下拖动至少;留出主表列标题/子表工具栏+列标题 -->
|
|
|
- <!-- 水平拖动分割线 -->
|
|
|
- <GridSplitter Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Height="5" HorizontalAlignment="Stretch" />
|
|
|
-
|
|
|
- <!-- todo 设置 StackPanel 高度超出范围时自动拉伸 -->
|
|
|
- <!-- 发货单信息
|
|
|
- DataContext="{Binding CurrDeliveryReceipt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" -->
|
|
|
- <StackPanel x:Name="panelInfo"
|
|
|
- Grid.Row="3"
|
|
|
- Grid.Column="0"
|
|
|
- Grid.RowSpan="2"
|
|
|
- Background="White"
|
|
|
- Orientation="Vertical"
|
|
|
- CanVerticallyScroll="True"
|
|
|
- VerticalAlignment="Stretch">
|
|
|
-
|
|
|
- <!-- 表头信息 -->
|
|
|
- <Border Grid.Row="0" BorderBrush="Gray" BorderThickness="1">
|
|
|
- <Grid Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <Label Grid.Column="0"
|
|
|
- BorderBrush="Gray" BorderThickness="1 0 1 0"
|
|
|
- Content="表头信息"
|
|
|
- FontWeight="Bold"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- VerticalContentAlignment="Center" />
|
|
|
-
|
|
|
- <WrapPanel Grid.Column="1"
|
|
|
- Orientation="Horizontal">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="产品名称:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label x:Name="lblMaterial"
|
|
|
- Content="{Binding CurrDeliveryReceipt.MaterialName}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="生产企业:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.CompanyName}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- </WrapPanel>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 合同信息 -->
|
|
|
- <Border Grid.Row="1"
|
|
|
- BorderBrush="Gray" BorderThickness="1">
|
|
|
- <Grid Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <Label Grid.Column="0"
|
|
|
- BorderBrush="Gray" BorderThickness="1 0 1 0"
|
|
|
- Content="合同信息"
|
|
|
- FontWeight="Bold"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- VerticalContentAlignment="Center" />
|
|
|
-
|
|
|
- <WrapPanel Grid.Column="1"
|
|
|
- Orientation="Horizontal">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="采购机构:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ProductCompanyName}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="合同编号:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ContractNo}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="合同数量:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ContractQty}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <!-- 重复设置 Width、TextAligment 属性,直接设置的值覆盖 Style 的值 -->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="检验合格数量:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <TextBlock Text="1000"
|
|
|
- Width="50"
|
|
|
- Foreground="Red"
|
|
|
- TextAlignment="Left"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <!-- todo 不包含本次 -->
|
|
|
- <TextBlock Text="剩余数量:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <TextBlock Text="800"
|
|
|
- Width="50"
|
|
|
- Foreground="Red"
|
|
|
- TextAlignment="Left"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="合同时间:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ContractSigningDate}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- </WrapPanel>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 发运信息 -->
|
|
|
- <Border Grid.Row="2"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1">
|
|
|
- <Grid Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <Label Grid.Column="0"
|
|
|
- BorderBrush="Gray" BorderThickness="1 0 1 0"
|
|
|
- Content="发运信息"
|
|
|
- FontWeight="Bold"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- VerticalContentAlignment="Center" />
|
|
|
-
|
|
|
- <WrapPanel Grid.Column="1"
|
|
|
+ <!-- 发运信息 -->
|
|
|
+ <Border Grid.Row="3" Grid.Column="0" Grid.RowSpan="2"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1">
|
|
|
+ <Grid Background="White">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Label Grid.Column="0"
|
|
|
+ BorderBrush="Gray" BorderThickness="1 0 1 0"
|
|
|
+ Width="100"
|
|
|
+ Content="发运信息"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center" />
|
|
|
+
|
|
|
+ <WrapPanel Grid.Column="1"
|
|
|
Orientation="Horizontal">
|
|
|
- <!-- todo FontSize 默认 12? -->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="接收单位:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ReceivedCompanyName}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="批次号:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.BatchNo}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="发运包数:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ShippedPackets}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="发运数量:"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <Label Content="{Binding CurrDeliveryReceipt.ShippedQty}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="*发运时间:"
|
|
|
- Foreground="Black"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <!--<Label Content="{Binding CurrDeliveryReceipt.ShippedDate}"
|
|
|
- Style="{StaticResource CustomLabelStyle}" />-->
|
|
|
- <DatePicker Width="200" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="发运承办人:"
|
|
|
- Foreground="Black"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <TextBox Width="200"
|
|
|
- Height="30"
|
|
|
- FontSize="14"
|
|
|
- HorizontalContentAlignment="Center"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1"
|
|
|
- Margin="10"
|
|
|
- Text="{Binding CurrDeliveryReceipt.ShippedMan, Mode=TwoWay}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="联系电话:"
|
|
|
- Foreground="Black"
|
|
|
- Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
- <TextBox Width="200"
|
|
|
- Height="30"
|
|
|
- FontSize="14"
|
|
|
- HorizontalContentAlignment="Center"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1"
|
|
|
- Margin="10"
|
|
|
- Text="{Binding CurrDeliveryReceipt.ShippedTel, Mode=TwoWay}" />
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- </WrapPanel>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- </Border>
|
|
|
-
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <!-- 发货单明细工具栏 -->
|
|
|
- <Border Grid.Row="3"
|
|
|
- Grid.Column="1"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1"
|
|
|
- Height="{Binding Path=ActualHeight,ElementName=toolBarDelivery}">
|
|
|
- <ToolBar Background="White"
|
|
|
- ToolBarTray.IsLocked="True">
|
|
|
- <Button Content="新增"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Add_Circle_32}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- <Button Content="删除"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Delete_32}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- <Separator />
|
|
|
- <Button Content="导入"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Arrow_Turn_Right_Down_48}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- <Button Content="导出"
|
|
|
- Tag="{x:Static utils:RegularFontUtil.Arrow_Turn_Right_48}"
|
|
|
- Template="{StaticResource CustomToolBarButtomTemplate}" />
|
|
|
- </ToolBar>
|
|
|
+ <!-- todo FontSize 默认 12? -->
|
|
|
+ <!-- 接收单位 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="接收单位:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ReceivedCompanyName}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 批次号 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="批次号:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.BatchNo}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 发运包数 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="发运包数:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ShippedPackets}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 发运数量 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="发运数量:"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <Label Content="{Binding CurrDeliveryReceipt.ShippedQty}"
|
|
|
+ Style="{StaticResource CustomLabelStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- todo 设置日期显示格式(需要修改Template,暂时不修改)减少日期选择框的 Padding(内部间距),选择按钮居右 -->
|
|
|
+ <!-- 发运时间 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="*发运时间:"
|
|
|
+ Foreground="Black"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <DatePicker Width="200"
|
|
|
+ Text="{Binding CurrDeliveryReceipt.ShippedDate, Mode=TwoWay}"
|
|
|
+ SelectedDateFormat="Short"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Height="{Binding ElementName=lblMaterial, Path=Height}"
|
|
|
+ FontSize="14" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 发运承办人 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="发运承办人:"
|
|
|
+ Foreground="Black"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <TextBox Text="{Binding CurrDeliveryReceipt.ShippedMan, Mode=TwoWay}"
|
|
|
+ Style="{StaticResource CustomTextBoxStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+ <!-- 联系电话 -->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="联系电话:"
|
|
|
+ Foreground="Black"
|
|
|
+ Style="{StaticResource CustomTextBlockStyle}" />
|
|
|
+ <TextBox Text="{Binding CurrDeliveryReceipt.ShippedTel, Mode=TwoWay}"
|
|
|
+ Style="{StaticResource CustomTextBoxStyle}" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </WrapPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
</Border>
|
|
|
|
|
|
- <!-- 底部显示合计行? -->
|
|
|
- <DataGrid x:Name="dataGridDeliveryDetail"
|
|
|
- Grid.Row="4"
|
|
|
- Grid.Column="1"
|
|
|
- Background="White"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- SelectionMode="Single"
|
|
|
- SelectionUnit="CellOrRowHeader"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- ItemsSource="{Binding DeliveryDetails, Mode=TwoWay}">
|
|
|
- <!-- 数据结构 -->
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="序号" Width="*" />
|
|
|
- <DataGridTextColumn Header="材料包号" Width="*" />
|
|
|
- <DataGridTextColumn Header="数量" Width="*" />
|
|
|
- </DataGrid.Columns>
|
|
|
- </DataGrid>
|
|
|
- </Grid>
|
|
|
-
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 发货单明细工具栏 -->
|
|
|
+ <Border Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1"
|
|
|
+ Height="{Binding Path=ActualHeight,ElementName=toolBarDelivery}">
|
|
|
+ <ToolBar Background="White"
|
|
|
+ ToolBarTray.IsLocked="True">
|
|
|
+ <Button Content="新增"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Add_Circle_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding AddDetailCommand}" />
|
|
|
+ <Button Content="删除"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Delete_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding DeleteDetailCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=dataGridDeliveryDetail}" />
|
|
|
+ <Separator />
|
|
|
+ <!-- Arrow_Turn_Right_48 -->
|
|
|
+ <Button Content="导入"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Arrow_Circle_Down_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding ImportDetailCommand}" />
|
|
|
+ <Button Content="导出"
|
|
|
+ Tag="{x:Static utils:RegularFontUtil.Arrow_Circle_Up_32}"
|
|
|
+ Template="{StaticResource CustomToolBarButtomTemplate}"
|
|
|
+ Command="{Binding ExportDetailCommand}" />
|
|
|
+ </ToolBar>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- todo 没有行的时候左边不显示行标题,必须有行之后才会出现行标题,列宽会变化 -->
|
|
|
+ <!-- todo 底部显示合计行?不用筛选,排序即可 -->
|
|
|
+ <fdg:FilterDataGrid x:Name="dataGridDeliveryDetail"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Background="White"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ SelectionMode="Single"
|
|
|
+ SelectionUnit="FullRow"
|
|
|
+ ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
+ RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
+ RowStyle="{StaticResource CustomRowStyle}"
|
|
|
+ CellStyle="{StaticResource CustomCellStyle}"
|
|
|
+ ItemsSource="{Binding CurrDeliveryReceipt.DeliveryReceiptDetails, Mode=TwoWay}">
|
|
|
+
|
|
|
+ <!-- DataGrid 事件 -->
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <!-- 选择行切换事件 -->
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <b:InvokeCommandAction Command="{Binding DetailSelectionChangedCommand}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+
|
|
|
+ <!-- 数据结构 -->
|
|
|
+ <fdg:FilterDataGrid.Columns>
|
|
|
+ <!--<DataGridTextColumn Header="序号" Width="*" />-->
|
|
|
+ <fdg:FilterDataGridCheckBoxColumn Header=" " Width="50"
|
|
|
+ ElementStyle="{StaticResource CheckBoxColumnElementStyle}"
|
|
|
+ EditingElementStyle="{StaticResource CheckBoxColumnElementStyle}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="材料包号" Width="*"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingStyle}"
|
|
|
+ Binding="{Binding PacketNo, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <fdg:FilterDataGridTextColumn Header="发运数量" Width="*"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingStyle}"
|
|
|
+ Binding="{Binding ShippedQuantity, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ </fdg:FilterDataGrid.Columns>
|
|
|
+ </fdg:FilterDataGrid>
|
|
|
</Grid>
|
|
|
|
|
|
</UserControl>
|