DeliveryEntructOrderView.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <UserControl x:Class="Muchinfo.MTPClient.Delivery.Views.DeliveryEntructOrderView"
  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:dataPager="clr-namespace:Muchinfo.DataPager;assembly=Client.DataPager"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  11. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  12. DataContext="{Binding DeliveryEntruct,
  13. Source={StaticResource Locator}}"
  14. mc:Ignorable="d">
  15. <UserControl.Resources>
  16. <converters:DeliveryOrderStatusToStringConverter x:Key="deliveryOrderStatusToStringConverter" />
  17. <converters:DeliveryOrderStatusToBooleanConverter x:Key="deliveryOrderStatusToBooleanConverter" />
  18. </UserControl.Resources>
  19. <xctk:BusyIndicator BusyContent="{x:Static resource:Client_Resource.Content_UpdateBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="Auto" />
  23. <RowDefinition />
  24. <!-- <RowDefinition Height="30" /> -->
  25. </Grid.RowDefinitions>
  26. <StackPanel Margin="0,4" Orientation="Horizontal">
  27. <TextBlock Margin="10,0"
  28. VerticalAlignment="Center"
  29. Foreground="{DynamicResource TextBlockForeground}"
  30. Text="{x:Static resource:Client_Resource.Content_Date}" />
  31. <DatePicker Width="120"
  32. HorizontalAlignment="Stretch"
  33. VerticalAlignment="Center"
  34. CalendarStyle="{DynamicResource CalendarStyle}"
  35. SelectedDate="{Binding StartTime,
  36. Mode=TwoWay}"
  37. TabIndex="7" >
  38. <DatePicker.Resources>
  39. <Style TargetType="DatePickerTextBox">
  40. <Setter Property="IsReadOnly" Value="True" />
  41. <Setter Property="IsEnabled" Value="False" />
  42. </Style>
  43. </DatePicker.Resources>
  44. </DatePicker>
  45. <TextBlock Margin="5,0"
  46. VerticalAlignment="Center"
  47. Foreground="{DynamicResource TextBlockForeground}"
  48. Text="{x:Static resource:Client_Resource.Content_To}" />
  49. <DatePicker Width="120"
  50. HorizontalAlignment="Stretch"
  51. VerticalAlignment="Center"
  52. CalendarStyle="{DynamicResource CalendarStyle}"
  53. SelectedDate="{Binding EndTime,
  54. Mode=TwoWay}"
  55. TabIndex="7" >
  56. <DatePicker.Resources>
  57. <Style TargetType="DatePickerTextBox">
  58. <Setter Property="IsReadOnly" Value="True" />
  59. <Setter Property="IsEnabled" Value="False" />
  60. </Style>
  61. </DatePicker.Resources>
  62. </DatePicker>
  63. <Button Width="70"
  64. Height="26"
  65. Margin="10,0"
  66. VerticalAlignment="Center"
  67. Command="{Binding RefreshCommand}"
  68. Content="{x:Static resource:Client_Resource.Button_Search}"
  69. Style="{DynamicResource CommonButtonStyle}" />
  70. <Button Width="70"
  71. Height="26"
  72. Margin="0,0"
  73. VerticalAlignment="Center"
  74. Command="{Binding ResetCommand}"
  75. Content="{x:Static resource:Client_Resource.InputTradePassWordView_Reset}"
  76. Style="{DynamicResource CommonButtonStyle}" />
  77. </StackPanel>
  78. <Button Grid.Row="0"
  79. Width="100"
  80. Height="26"
  81. Margin="10,0"
  82. HorizontalAlignment="Right"
  83. VerticalAlignment="Center"
  84. Command="{Binding DeliveryCommand}"
  85. Content="{x:Static resource:Client_Resource.DeliveryOrderView_DeliveryApplyPlus}"
  86. Style="{DynamicResource CommonButtonStyle}" />
  87. <dataGrid:MuchinfoDataGrid x:Name="DeliveryDataGrid"
  88. Grid.Row="1"
  89. ItemsSource="{Binding AllOrders}"
  90. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  91. SelectedItem="{Binding SelectEntrustOrder,
  92. Mode=TwoWay}"
  93. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  94. <DataGrid.Columns>
  95. <DataGridTextColumn Width="Auto"
  96. MinWidth="140"
  97. Binding="{Binding DeliveryOrderId}"
  98. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  99. Header="{x:Static resource:Client_Resource.Delivery_OrderNumber}" />
  100. <!-- 发起方式
  101. <DataGridTextColumn Width="Auto"
  102. MinWidth="100"
  103. Binding="{Binding SponsorDisplay}"
  104. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  105. Header="{x:Static resource:Client_Resource.Delivery_ApplyType}" />-->
  106. <!-- 交易商品名称 -->
  107. <DataGridTextColumn Width="Auto"
  108. MinWidth="100"
  109. Binding="{Binding GOODSNAME}"
  110. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  111. Header="{x:Static resource:Client_Resource.DeliveryOrderView_TradeGoods}" />
  112. <!-- 交割商品名称 详细中显示
  113. <DataGridTextColumn Width="Auto"
  114. MinWidth="100"
  115. Binding="{Binding DeliveryGoodsNameDisplay}"
  116. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  117. Header="{x:Static resource:Client_Resource.DeliveryOrderView_DeliveryGoods}" />-->
  118. <!-- 买卖 -->
  119. <DataGridTextColumn Width="Auto"
  120. MinWidth="80"
  121. Binding="{Binding StrDirection}"
  122. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  123. Header="{x:Static resource:Client_Resource.Moduel_Direction}"
  124. SortMemberPath="StrOpenDirection" />
  125. <!-- 申报价格 -->
  126. <DataGridTextColumn Width="Auto"
  127. MinWidth="100"
  128. Binding="{Binding OrderPriceDisplay}"
  129. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  130. Header="{x:Static resource:Client_Resource.Delivery_OrderPrice}" />
  131. <!-- 申报手数 -->
  132. <DataGridTextColumn Width="Auto"
  133. MinWidth="100"
  134. Binding="{Binding OrderQty}"
  135. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  136. Header="{x:Static resource:Client_Resource.Delivery_OrderQty}" />
  137. <!-- 交割数量 详细中显示
  138. <DataGridTextColumn Width="Auto"
  139. MinWidth="100"
  140. Binding="{Binding AgreeUintQtyDisplay}"
  141. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  142. Header="{x:Static resource:Client_Resource.Delivery_holderQty}" />-->
  143. <!-- 成交手数 = orderQty-cancelQty -->
  144. <DataGridTextColumn Width="Auto"
  145. MinWidth="100"
  146. Binding="{Binding DealQtyDisplay}"
  147. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  148. Header="{x:Static resource:Client_Resource.Delivery_DealQtyDisplay}" />
  149. <!-- 成交交割数量 =成交手数/兑换系数*交割合约单位 详细中显示
  150. <DataGridTextColumn Width="Auto"
  151. MinWidth="100"
  152. Binding="{Binding DealDeliveryQtyDisplay}"
  153. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  154. Header="{x:Static resource:Client_Resource.Delivery_DealDeliveryQtyDisplay}" />-->
  155. <!-- 申报类型
  156. <DataGridTextColumn Width="Auto"
  157. MinWidth="100"
  158. Binding="{Binding OrderTypeDisplay}"
  159. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  160. Header="{x:Static resource:Client_Resource.Delivery_ApplyType}" />-->
  161. <!-- 关联交易商品 详细中显示
  162. <DataGridTextColumn Width="Auto"
  163. MinWidth="100"
  164. Binding="{Binding RGOODSNAMEDisplay}"
  165. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  166. Header="{x:Static resource:Client_Resource.Delivery_RGOODSNAME}" />-->
  167. <!-- 关联商品价格 详细中显示
  168. <DataGridTextColumn Width="Auto"
  169. MinWidth="100"
  170. Binding="{Binding relOrderPriceDisplay}"
  171. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  172. Header="{x:Static resource:Client_Resource.Delivery_relOrderPrice}" />-->
  173. <!--
  174. 配对成功数量NEW
  175. <DataGridTextColumn Width="Auto"
  176. MinWidth="140"
  177. Binding="{Binding OrderQtyDisplay}"
  178. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  179. Header="{x:Static resource:Client_Resource.Delivery_MatchedSuccessQty}" />
  180. -->
  181. <!--
  182. 配对失败数量NEW
  183. <DataGridTextColumn Width="Auto"
  184. MinWidth="140"
  185. Binding="{Binding MatchFailureQty}"
  186. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  187. Header="{x:Static resource:Client_Resource.Delivery_MatchedFailureQty}" />
  188. -->
  189. <!-- 申报来源NEW
  190. <DataGridTextColumn Width="Auto"
  191. MinWidth="100"
  192. Binding="{Binding OrderFromDisplay}"
  193. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  194. Header="{x:Static resource:Client_Resource.Delivery_ApplySource}" />-->
  195. <!-- 可配对时间NEW -->
  196. <!--
  197. <DataGridTextColumn Width="Auto"
  198. MinWidth="140"
  199. Binding="{Binding MatchTimeDisplay}"
  200. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  201. Header="{x:Static resource:Client_Resource.Delivery_CanMatchedTime}" />
  202. -->
  203. <!-- 交易货款 详细中显示
  204. <DataGridTextColumn Width="Auto"
  205. MinWidth="100"
  206. Binding="{Binding OrderAmountDisplay}"
  207. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  208. Header="{x:Static resource:Client_Resource.Delivery_ORDERAMOUNT}" />-->
  209. <!-- 关联交易货款 详细中显示
  210. <DataGridTextColumn Width="Auto"
  211. MinWidth="100"
  212. Binding="{Binding relOrderAmountDisplay}"
  213. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  214. Header="{x:Static resource:Client_Resource.Delivery_relOrderAmount}" />-->
  215. <!-- 差价款 详细中显示
  216. <DataGridTextColumn Width="Auto"
  217. MinWidth="100"
  218. Binding="{Binding PriceMoveAmountDisplay}"
  219. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  220. Header="{x:Static resource:Client_Resource.Content_PriceMoveAmount}" />-->
  221. <!-- 手续费 详细中显示
  222. <DataGridTextColumn Width="Auto"
  223. MinWidth="100"
  224. Binding="{Binding DeliveryCharge}"
  225. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  226. Header="{x:Static resource:Client_Resource.Content_DeliveryCharge}" />-->
  227. <!-- 税费 详细中显示
  228. <DataGridTextColumn Width="Auto"
  229. MinWidth="100"
  230. Binding="{Binding FreezeTaxDisplay}"
  231. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  232. Header="{x:Static resource:Client_Resource.Content_FreezeTax}" />-->
  233. <!-- 冻结资金 -->
  234. <DataGridTextColumn Width="Auto"
  235. MinWidth="100"
  236. Binding="{Binding FreezeAmountDisplay}"
  237. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  238. Header="{x:Static resource:Client_Resource.Delivery_FreezonAmount}" />
  239. <!-- 申报时间 -->
  240. <DataGridTextColumn Width="Auto"
  241. MinWidth="140"
  242. Binding="{Binding OrderTimeDisplay}"
  243. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  244. Header="{x:Static resource:Client_Resource.Delivery_OrderTime}" />
  245. <DataGridTextColumn Width="Auto"
  246. MinWidth="100"
  247. Binding="{Binding AuditRemarkDisplay}"
  248. CellStyle="{StaticResource DataGridCellColumnStyleToolTip}"
  249. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  250. Header="{x:Static resource:Client_Resource.Delivery_AuditRemark}" />
  251. <!-- 交割状态NEW -->
  252. <DataGridTextColumn Width="Auto"
  253. MinWidth="100"
  254. Binding="{Binding OrderStatusDisplay}"
  255. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  256. Header="{x:Static resource:Client_Resource.Moduel_Status}" />
  257. <DataGridTemplateColumn>
  258. <DataGridTemplateColumn.Header>
  259. <TextBlock Text="{x:Static resource:Client_Resource.Content_Operation}" />
  260. </DataGridTemplateColumn.Header>
  261. <DataGridTemplateColumn.CellTemplate>
  262. <DataTemplate>
  263. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  264. <Button Height="20"
  265. Command="{Binding Path=DeliveryEntruct.CancelOrMatchCommand,
  266. Source={StaticResource Locator}}"
  267. Content="{Binding OrderStatus,
  268. Converter={StaticResource deliveryOrderStatusToStringConverter}}"
  269. Padding="10,2"
  270. Style="{DynamicResource ButtonWithBorderStyle}"
  271. Visibility="{Binding CanCanceled}" />
  272. <!-- 查看详细 -->
  273. <Button Height="20"
  274. Margin="10,0,0,0"
  275. Command="{Binding Path=DeliveryEntruct.SeeMoreDetailCommand,
  276. Source={StaticResource Locator}}"
  277. CommandParameter="{Binding Path=SelectedItem,
  278. ElementName=DeliveryDataGrid}"
  279. Content="{x:Static resource:Client_Resource.Content_SeeMoreDetail}"
  280. Padding="10,2"
  281. Style="{DynamicResource ButtonWithBorderStyle}" />
  282. </StackPanel>
  283. </DataTemplate>
  284. </DataGridTemplateColumn.CellTemplate>
  285. </DataGridTemplateColumn>
  286. </DataGrid.Columns>
  287. <DataGrid.ContextMenu>
  288. <ContextMenu>
  289. <MenuItem Command="{Binding CancelCammand}"
  290. Header="{x:Static resource:Client_Resource.Button_Cancellation}"
  291. Style="{DynamicResource CommonMenuItem}" />
  292. <MenuItem Command="{Binding RefreshCommand}"
  293. Header="{x:Static resource:Client_Resource.Button_Refresh}"
  294. IsEnabled="True"
  295. Style="{DynamicResource CommonMenuItem}" />
  296. </ContextMenu>
  297. </DataGrid.ContextMenu>
  298. </dataGrid:MuchinfoDataGrid>
  299. <!-- 分页控件 -->
  300. <!--
  301. <dataPager:MuchinfoPager Grid.Row="2"
  302. HorizontalAlignment="Right"
  303. Command="{Binding NextPageSearchCommand,
  304. Mode=TwoWay}"
  305. ItemCount="{Binding ItemCount,
  306. Mode=TwoWay}"
  307. PageSize="{Binding PageSize}"
  308. Style="{DynamicResource PagerStyle}"
  309. PageIndex="{Binding PageIndex,
  310. Mode=TwoWay}" />
  311. -->
  312. </Grid>
  313. </xctk:BusyIndicator>
  314. </UserControl>