CompleteOrderView.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <UserControl x:Class="Muchinfo.MTPClient.Account.Views.CompleteOrderView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Muchinfo.MTPClient.Infrastructure"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Muchinfo.WPF.Controls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Muchinfo.MTPClient.Resources"
  9. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  10. Background="{DynamicResource MuchinfoBrush5}"
  11. DataContext="{Binding CompleteOrders,
  12. Source={StaticResource Locator}}">
  13. <UserControl.Resources>
  14. <converters:DirectionConverter x:Key="DirectionConverter" />
  15. </UserControl.Resources>
  16. <xctk:BusyIndicator BusyContent="{x:Static resource:Muchinfo_Resource.Content_UpdateBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto" />
  20. <RowDefinition />
  21. </Grid.RowDefinitions>
  22. <StackPanel Margin="0,4"
  23. Background="{DynamicResource MuchinfoBrush2}"
  24. Orientation="Horizontal">
  25. <RadioButton Margin="25,0,0,0"
  26. VerticalAlignment="Center"
  27. Content="{x:Static resource:Muchinfo_Resource.Content_Now}"
  28. Foreground="{DynamicResource MainForegroundBrush}"
  29. IsChecked="{Binding RadioNow}" />
  30. <RadioButton Name="RadioCustom"
  31. Margin="25,0,10,0"
  32. VerticalAlignment="Center"
  33. Content="{x:Static resource:Muchinfo_Resource.Content_History}"
  34. Foreground="{DynamicResource MainForegroundBrush}"
  35. IsChecked="{Binding RadioCustom}" />
  36. <!-- <TextBlock Margin="10,0" Foreground="{DynamicResource MuchinfoBrush13}" VerticalAlignment="Center" Text="日期" /> -->
  37. <DatePicker Name="DatePicker1"
  38. Width="120"
  39. HorizontalAlignment="Stretch"
  40. VerticalAlignment="Center"
  41. CalendarStyle="{DynamicResource CalendarStyle}"
  42. IsEnabled="{Binding ElementName=RadioCustom,
  43. Path=IsChecked}"
  44. SelectedDate="{Binding StartDateTime,
  45. Mode=TwoWay}"
  46. TabIndex="7" />
  47. <TextBlock Margin="5,0"
  48. VerticalAlignment="Center"
  49. Foreground="{DynamicResource MuchinfoBrush13}"
  50. Text="{x:Static resource:Muchinfo_Resource.Content_To}" />
  51. <DatePicker Name="DatePicker2"
  52. Width="120"
  53. HorizontalAlignment="Stretch"
  54. VerticalAlignment="Center"
  55. CalendarStyle="{DynamicResource CalendarStyle}"
  56. IsEnabled="{Binding ElementName=RadioCustom,
  57. Path=IsChecked}"
  58. SelectedDate="{Binding EndDateTime,
  59. Mode=TwoWay}"
  60. TabIndex="7" />
  61. <Button Width="70"
  62. Height="26"
  63. Margin="10,0"
  64. VerticalAlignment="Center"
  65. Command="{Binding RefreshCommand}"
  66. Content="{x:Static resource:Muchinfo_Resource.Button_Search}"
  67. Style="{DynamicResource CommonButtonStyle}" />
  68. </StackPanel>
  69. <dataGrid:MuchinfoDataGrid Grid.Row="1"
  70. ItemsSource="{Binding CompleteOrders}"
  71. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  72. <DataGrid.Columns>
  73. <DataGridTextColumn Width="*"
  74. MinWidth="140"
  75. Binding="{Binding TradeID}"
  76. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  77. Header="{x:Static resource:Muchinfo_Resource.Content_OrderNumber}" />
  78. <DataGridTextColumn Width="*"
  79. MinWidth="70"
  80. Binding="{Binding GoodsName}"
  81. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  82. Header="{x:Static resource:Muchinfo_Resource.Content_Goods}" />
  83. <DataGridTextColumn Width="*"
  84. MinWidth="70"
  85. Binding="{Binding StrOpenDirection}"
  86. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  87. Header="{x:Static resource:Muchinfo_Resource.Content_StrOpenDirection}"
  88. SortMemberPath="StrOpenDirection" />
  89. <!--
  90. <DataGridTemplateColumn MinWidth="60"
  91. Header="买/卖"
  92. SortMemberPath="StrOpenDirection">
  93. <DataGridTemplateColumn.CellTemplate>
  94. <DataTemplate>
  95. <Grid>
  96. <TextBlock HorizontalAlignment="Stretch"
  97. Text="{Binding StrOpenDirection}"
  98. TextAlignment="{Binding OpenDirection,
  99. Converter={StaticResource DirectionConverter},
  100. Mode=OneTime}" />
  101. </Grid>
  102. </DataTemplate>
  103. </DataGridTemplateColumn.CellTemplate>
  104. </DataGridTemplateColumn>
  105. -->
  106. <DataGridTextColumn Width="*"
  107. MinWidth="50"
  108. Binding="{Binding OrderTypeDisc}"
  109. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  110. Header="{x:Static resource:Muchinfo_Resource.recource_OrderType}" />
  111. <DataGridTextColumn Width="*"
  112. MinWidth="70"
  113. Binding="{Binding Lot}"
  114. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  115. Header="{x:Static resource:Muchinfo_Resource.Content_Count}" />
  116. <DataGridTextColumn Width="*"
  117. MinWidth="70"
  118. Binding="{Binding CompletePrice}"
  119. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  120. Header="{x:Static resource:Muchinfo_Resource.Content_CompletePrice}" />
  121. <DataGridTextColumn Width="*"
  122. MinWidth="130"
  123. Binding="{Binding DisplayCompleteDate}"
  124. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  125. Header="{x:Static resource:Muchinfo_Resource.Content_DisplayCompleteDate}" />
  126. <DataGridTextColumn Width="*"
  127. MinWidth="140"
  128. Binding="{Binding RelateOrderID}"
  129. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  130. Header="{x:Static resource:Muchinfo_Resource.Content_RelateOrderID}" />
  131. <DataGridTextColumn Width="*"
  132. MinWidth="70"
  133. Binding="{Binding Charge}"
  134. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  135. Header="{x:Static resource:Muchinfo_Resource.Content_Charge}" />
  136. <DataGridTextColumn Width="*"
  137. MinWidth="70"
  138. Binding="{Binding StorageCharge}"
  139. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  140. Header="{x:Static resource:Muchinfo_Resource.Content_StorageCharge}"
  141. Visibility="Collapsed" />
  142. <!--
  143. <DataGridTextColumn Width="*"
  144. MinWidth="100"
  145. Binding="{Binding StrOrderTypeDirection}"
  146. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  147. Header="{x:Static resource:Muchinfo_Resource.Content_Remark}" />
  148. -->
  149. </DataGrid.Columns>
  150. <DataGrid.ContextMenu>
  151. <ContextMenu>
  152. <!--
  153. <MenuItem Command="{Binding DeliveryCommand}"
  154. Header="交收申请"
  155. IsEnabled="false" />
  156. -->
  157. <MenuItem Command="{Binding RefreshCommand}"
  158. Header="{x:Static resource:Muchinfo_Resource.MenuNamesRefresh}"
  159. Style="{DynamicResource CommonMenuItem}" />
  160. </ContextMenu>
  161. </DataGrid.ContextMenu>
  162. </dataGrid:MuchinfoDataGrid>
  163. </Grid>
  164. </xctk:BusyIndicator>
  165. </UserControl>