NDeliveryEntructOrderView.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <UserControl x:Class="Muchinfo.MTPClient.Delivery.Views.NDeliveryEntructOrderView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:controls="clr-namespace:Muchinfo.WPF.Controls;assembly=Client.WPF.Controls"
  5. xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  10. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  11. DataContext="{Binding DeliveryEntruct,
  12. Source={StaticResource Locator}}"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <Style x:Key="TextBlockCommon" TargetType="TextBlock">
  16. <Setter Property="VerticalAlignment" Value="Center" />
  17. <Setter Property="HorizontalAlignment" Value="Center" />
  18. <Setter Property="TextAlignment" Value="Center" />
  19. <Setter Property="Foreground" Value="{DynamicResource AcountGridHeadForeground}" />
  20. <Setter Property="MinWidth" Value="100" />
  21. <!-- <Setter Property="Margin" Value="10,0,0,0"></Setter> -->
  22. </Style>
  23. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  24. <DataTemplate x:Key="DeliveryDetailDataTemlate">
  25. <Grid>
  26. <Grid.RowDefinitions>
  27. <RowDefinition />
  28. <RowDefinition />
  29. <RowDefinition />
  30. <RowDefinition />
  31. <RowDefinition />
  32. </Grid.RowDefinitions>
  33. <!-- 其他 -->
  34. <Border Grid.Row="0"
  35. MaxWidth="800"
  36. Margin="50,0,0,0"
  37. HorizontalAlignment="Left"
  38. BorderBrush="{DynamicResource BorderBrush_Common}"
  39. BorderThickness="1">
  40. <StackPanel Height="25"
  41. Background="{DynamicResource AcountGridHeadBackground}"
  42. Orientation="Horizontal">
  43. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  44. <!-- 商品名称title -->
  45. <TextBlock Width="{Binding ActualWidth,
  46. ElementName=GoodsNameContent}"
  47. MinWidth="145"
  48. Style="{StaticResource TextBlockCommon}"
  49. Text="{x:Static resource:Client_Resource.DeliveryOrderView_TradeGoods}" />
  50. </Border>
  51. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  52. <!-- 申报手数 title -->
  53. <TextBlock Width="{Binding ActualWidth,
  54. ElementName=GoodsDeliveryCountContent}"
  55. Style="{StaticResource TextBlockCommon}"
  56. Text="{x:Static resource:Client_Resource.Delivery_OrderQty}" />
  57. </Border>
  58. <!-- 交割结算价 title -->
  59. <TextBlock Width="{Binding ActualWidth,
  60. ElementName=GoodsDeliveryEndMoneyContent}"
  61. Style="{StaticResource TextBlockCommon}"
  62. Text="{x:Static resource:Client_Resource.Content_DeliveryEndMoney}" />
  63. </StackPanel>
  64. </Border>
  65. <Border Grid.Row="1"
  66. MaxWidth="800"
  67. Margin="50,0,0,0"
  68. HorizontalAlignment="Left"
  69. BorderBrush="{DynamicResource BorderBrush_Common}"
  70. BorderThickness="1,0,1,1">
  71. <StackPanel Height="25" Orientation="Horizontal">
  72. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  73. <!-- 主商品名称-content -->
  74. <TextBlock x:Name="GoodsNameContent"
  75. MinWidth="145"
  76. Style="{StaticResource TextBlockCommon}">
  77. <Run Text="{Binding XGoodsCode, Mode=OneWay}" />
  78. <Run Text="/" />
  79. <Run Text="{Binding XGoodsName, Mode=OneWay}" />
  80. </TextBlock>
  81. </Border>
  82. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  83. <!-- 申报手数 content -->
  84. <TextBlock x:Name="GoodsDeliveryCountContent"
  85. MinWidth="145"
  86. Style="{StaticResource TextBlockCommon}"
  87. Text="{Binding XDeliveryQty,
  88. Mode=OneWay}" />
  89. </Border>
  90. <!-- 交割结算价 content -->
  91. <TextBlock x:Name="GoodsDeliveryEndMoneyContent"
  92. MinWidth="145"
  93. Style="{StaticResource TextBlockCommon}"
  94. Text="{Binding XDeliveryPriceDisplay,
  95. Mode=OneWay}" />
  96. </StackPanel>
  97. </Border>
  98. <Border Grid.Row="2"
  99. MaxWidth="800"
  100. Margin="50,0,0,0"
  101. HorizontalAlignment="Left"
  102. BorderBrush="{DynamicResource BorderBrush_Common}"
  103. BorderThickness="1,0,1,1"
  104. Visibility="{Binding IsVisibility_RelationModeP}">
  105. <StackPanel Height="25" Orientation="Horizontal">
  106. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  107. <!-- 关联商品1名称-content -->
  108. <TextBlock MinWidth="145"
  109. Style="{StaticResource TextBlockCommon}"
  110. Text="{Binding PGoodsNameDisplay,
  111. Mode=OneWay}" />
  112. </Border>
  113. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  114. <!-- 申报手数 content -->
  115. <TextBlock MinWidth="145"
  116. Style="{StaticResource TextBlockCommon}"
  117. Text="{Binding PDeliveryQty,
  118. Mode=OneWay}" />
  119. </Border>
  120. <!-- 交割结算价 content -->
  121. <TextBlock MinWidth="145"
  122. Style="{StaticResource TextBlockCommon}"
  123. Text="{Binding PDeliveryPriceDisplay,
  124. Mode=OneWay}" />
  125. </StackPanel>
  126. </Border>
  127. <Border Grid.Row="3"
  128. MaxWidth="800"
  129. Margin="50,0,0,0"
  130. HorizontalAlignment="Left"
  131. BorderBrush="{DynamicResource BorderBrush_Common}"
  132. BorderThickness="1,0,1,1"
  133. Visibility="{Binding IsVisibility_RelationModeP2}">
  134. <StackPanel Height="25" Orientation="Horizontal">
  135. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  136. <!-- 关联商品名称2-content -->
  137. <TextBlock MinWidth="145"
  138. Style="{StaticResource TextBlockCommon}"
  139. Text="{Binding P2GoodsNameDisplay,
  140. Mode=OneWay}" />
  141. </Border>
  142. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  143. <!-- 申报手数 content -->
  144. <TextBlock MinWidth="145"
  145. Style="{StaticResource TextBlockCommon}"
  146. Text="{Binding P2DeliveryQty,
  147. Mode=OneWay}" />
  148. </Border>
  149. <!-- 交割结算价 content -->
  150. <TextBlock MinWidth="145"
  151. Style="{StaticResource TextBlockCommon}"
  152. Text="{Binding P2DeliveryPriceDisplay,
  153. Mode=OneWay}" />
  154. </StackPanel>
  155. </Border>
  156. </Grid>
  157. </DataTemplate>
  158. <converters:DeliveryOrderStatusToStringConverter x:Key="deliveryOrderStatusToStringConverter" />
  159. <converters:DeliveryOrderStatusToBooleanConverter x:Key="deliveryOrderStatusToBooleanConverter" />
  160. </UserControl.Resources>
  161. <xctk:BusyIndicator BusyContent="{x:Static resource:Client_Resource.Content_UpdateBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  162. <Grid>
  163. <Grid.RowDefinitions>
  164. <RowDefinition Height="Auto" />
  165. <RowDefinition />
  166. </Grid.RowDefinitions>
  167. <StackPanel Margin="0,4" Orientation="Horizontal">
  168. <TextBlock Margin="10,0"
  169. VerticalAlignment="Center"
  170. Foreground="{DynamicResource TextBlockForeground}"
  171. Text="{x:Static resource:Client_Resource.Content_Date}" />
  172. <DatePicker Width="120"
  173. HorizontalAlignment="Stretch"
  174. VerticalAlignment="Center"
  175. CalendarStyle="{DynamicResource CalendarStyle}"
  176. SelectedDate="{Binding StartTime,
  177. Mode=TwoWay}"
  178. TabIndex="7">
  179. <DatePicker.Resources>
  180. <Style TargetType="DatePickerTextBox">
  181. <Setter Property="IsReadOnly" Value="True" />
  182. <Setter Property="IsEnabled" Value="False" />
  183. </Style>
  184. </DatePicker.Resources>
  185. </DatePicker>
  186. <TextBlock Margin="5,0"
  187. VerticalAlignment="Center"
  188. Foreground="{DynamicResource TextBlockForeground}"
  189. Text="{x:Static resource:Client_Resource.Content_To}" />
  190. <DatePicker Width="120"
  191. HorizontalAlignment="Stretch"
  192. VerticalAlignment="Center"
  193. CalendarStyle="{DynamicResource CalendarStyle}"
  194. SelectedDate="{Binding EndTime,
  195. Mode=TwoWay}"
  196. TabIndex="7">
  197. <DatePicker.Resources>
  198. <Style TargetType="DatePickerTextBox">
  199. <Setter Property="IsReadOnly" Value="True" />
  200. <Setter Property="IsEnabled" Value="False" />
  201. </Style>
  202. </DatePicker.Resources>
  203. </DatePicker>
  204. <Button Width="70"
  205. Height="26"
  206. Margin="10,0"
  207. VerticalAlignment="Center"
  208. Command="{Binding RefreshCommand}"
  209. Content="{x:Static resource:Client_Resource.Button_Search}"
  210. Style="{DynamicResource CommonButtonStyle}" />
  211. <Button Width="70"
  212. Height="26"
  213. Margin="0,0"
  214. VerticalAlignment="Center"
  215. Command="{Binding ResetCommand}"
  216. Content="{x:Static resource:Client_Resource.InputTradePassWordView_Reset}"
  217. Style="{DynamicResource CommonButtonStyle}" />
  218. </StackPanel>
  219. <Button Grid.Row="0"
  220. Width="100"
  221. Height="26"
  222. Margin="10,0"
  223. HorizontalAlignment="Right"
  224. VerticalAlignment="Center"
  225. Command="{Binding DeliveryCommand}"
  226. Content="{x:Static resource:Client_Resource.DeliveryOrderView_DeliveryApplyPlus}"
  227. Style="{DynamicResource CommonButtonStyle}" Visibility="Collapsed" />
  228. <dataGrid:MuchinfoDataGrid x:Name="DeliveryDataGrid"
  229. Grid.Row="1"
  230. ItemsSource="{Binding AllOrders}"
  231. MouseDoubleClick="MuchinfoDataGrid_MouseDoubleClick"
  232. RowDetailsTemplate="{DynamicResource DeliveryDetailDataTemlate}"
  233. RowStyle="{DynamicResource DeliveryDetailDataGridRowStyle}"
  234. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  235. SelectedItem="{Binding SelectEntrustOrder,
  236. Mode=TwoWay}"
  237. Style="{DynamicResource AccountHolderSummaryDataGridStyle}">
  238. <DataGrid.Columns>
  239. <DataGridTextColumn Width="Auto"
  240. MinWidth="140"
  241. Binding="{Binding accountid}"
  242. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  243. Header="{x:Static resource:Client_Resource.Report_TaAccount}" />
  244. <!-- 申报单号 -->
  245. <DataGridTextColumn Width="Auto"
  246. MinWidth="140"
  247. Binding="{Binding DeliveryOrderId}"
  248. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  249. Header="{x:Static resource:Client_Resource.Delivery_OrderNumber}" />
  250. <!-- 仓单商品 -->
  251. <DataGridTextColumn Width="Auto"
  252. MinWidth="100"
  253. Binding="{Binding DeliveryGoodsNameDisplay}"
  254. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  255. Header="{x:Static resource:Client_Resource.NDeliveryOrderView_WarehouseGoods}" />
  256. <!-- 交割数量 -->
  257. <DataGridTextColumn Width="Auto"
  258. MinWidth="100"
  259. Binding="{Binding DeliveryQtyDisplay}"
  260. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  261. Header="{x:Static resource:Client_Resource.Delivery_holderQty}" />
  262. <!-- 申报时间 -->
  263. <DataGridTextColumn Width="Auto"
  264. MinWidth="140"
  265. Binding="{Binding OrderTimeDisplay}"
  266. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  267. Header="{x:Static resource:Client_Resource.Delivery_OrderTime}" />
  268. <!-- 状态 -->
  269. <DataGridTextColumn Width="Auto"
  270. MinWidth="100"
  271. Binding="{Binding OrderStatusDisplay}"
  272. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  273. Header="{x:Static resource:Client_Resource.Moduel_Status}" />
  274. </DataGrid.Columns>
  275. <DataGrid.ContextMenu>
  276. <ContextMenu>
  277. <MenuItem Command="{Binding RefreshCommand}"
  278. Header="{x:Static resource:Client_Resource.Button_Refresh}"
  279. IsEnabled="True"
  280. Style="{DynamicResource CommonMenuItem}" />
  281. </ContextMenu>
  282. </DataGrid.ContextMenu>
  283. </dataGrid:MuchinfoDataGrid>
  284. </Grid>
  285. </xctk:BusyIndicator>
  286. </UserControl>