DryHoldDetailView.xaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <UserControl x:Class="Muchinfo.MTPClient.Delivery.Views.DryHoldDetailView"
  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:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  12. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  13. x:Name="DryHoldDetailViewWindow"
  14. DataContext="{Binding DeliveryHolder,
  15. Source={StaticResource Locator}}"
  16. mc:Ignorable="d">
  17. <UserControl.Resources>
  18. <converters:eDoneDeliveryOrderStatusToVisibility x:Key="eDoneDeliveryOrderStatusConverter" />
  19. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  20. <converters:eDoneDeliveryOrderAppealToEnable x:Key="statusToAppealIsEnabled" />
  21. <converters:NumToGoodsIsEnabledConvert x:Key="countGoodsIsEnabledConvert" />
  22. <converters:NumToTicketIsEnabledConvert x:Key="countTicketIsEnabledConvert" />
  23. <converters:NumToButtonIsEnabledConvert x:Key="countButtonIsEnabledConvert" />
  24. </UserControl.Resources>
  25. <xctk:BusyIndicator BusyContent="{x:Static resource:Client_Resource.Content_UpdateBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  26. <Grid>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="Auto" />
  29. <RowDefinition />
  30. </Grid.RowDefinitions>
  31. <StackPanel Margin="0,4" Orientation="Horizontal">
  32. <TextBlock Margin="10,0"
  33. VerticalAlignment="Center"
  34. Foreground="{DynamicResource TextBlockForeground}"
  35. Text="{x:Static resource:Client_Resource.Content_Date}" />
  36. <DatePicker Width="120"
  37. HorizontalAlignment="Stretch"
  38. VerticalAlignment="Center"
  39. CalendarStyle="{DynamicResource CalendarStyle}"
  40. SelectedDate="{Binding StartTime,
  41. Mode=TwoWay}"
  42. TabIndex="7">
  43. <DatePicker.Resources>
  44. <Style TargetType="DatePickerTextBox">
  45. <Setter Property="IsReadOnly" Value="True" />
  46. <Setter Property="IsEnabled" Value="False" />
  47. </Style>
  48. </DatePicker.Resources>
  49. </DatePicker>
  50. <TextBlock Margin="5,0"
  51. VerticalAlignment="Center"
  52. Foreground="{DynamicResource TextBlockForeground}"
  53. Text="{x:Static resource:Client_Resource.Content_To}" />
  54. <DatePicker Width="120"
  55. HorizontalAlignment="Stretch"
  56. VerticalAlignment="Center"
  57. CalendarStyle="{DynamicResource CalendarStyle}"
  58. SelectedDate="{Binding EndTime,
  59. Mode=TwoWay}"
  60. TabIndex="7">
  61. <DatePicker.Resources>
  62. <Style TargetType="DatePickerTextBox">
  63. <Setter Property="IsReadOnly" Value="True" />
  64. <Setter Property="IsEnabled" Value="False" />
  65. </Style>
  66. </DatePicker.Resources>
  67. </DatePicker>
  68. <Button Width="70"
  69. Height="26"
  70. Margin="10,0"
  71. VerticalAlignment="Center"
  72. Command="{Binding RefreshCommand}"
  73. Content="{x:Static resource:Client_Resource.Button_Search}"
  74. Style="{DynamicResource CommonButtonStyle}" />
  75. <Button Width="70"
  76. Height="26"
  77. Margin="0,0"
  78. VerticalAlignment="Center"
  79. Command="{Binding ResetCommand}"
  80. Content="{x:Static resource:Client_Resource.InputTradePassWordView_Reset}"
  81. Style="{DynamicResource CommonButtonStyle}" />
  82. </StackPanel>
  83. <dataGrid:MuchinfoDataGrid x:Name="DeliveryDataGrid"
  84. Grid.Row="1"
  85. ItemsSource="{Binding ItemOrders}"
  86. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  87. SelectedItem="{Binding SelectEntrustOrder}"
  88. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  89. <DataGrid.Columns>
  90. <DataGridTextColumn Width="Auto"
  91. MinWidth="140"
  92. Binding="{Binding AccountID}"
  93. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  94. Header="{x:Static resource:Client_Resource.Report_TaAccount}" />
  95. <!-- 交割单号 -->
  96. <DataGridTextColumn Width="Auto"
  97. MinWidth="140"
  98. Binding="{Binding DeliveryId}"
  99. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  100. Header="{x:Static resource:Client_Resource.Delivery_holderNumber}" />
  101. <!-- 仓单商品 -->
  102. <DataGridTextColumn Width="Auto"
  103. MinWidth="140"
  104. Binding="{Binding DeliveryGoodsNameDisplay}"
  105. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  106. Header="{x:Static resource:Client_Resource.NDeliveryOrderView_WarehouseGoods}" />
  107. <!-- 交割数量 -->
  108. <DataGridTextColumn Width="Auto"
  109. MinWidth="130"
  110. Binding="{Binding DeliveryQty}"
  111. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  112. Header="{x:Static resource:Client_Resource.Delivery_holderQty}" />
  113. <!--
  114. 交割均价
  115. <DataGridTextColumn Width="Auto"
  116. MinWidth="100"
  117. Binding="{Binding DeliveryPrice}"
  118. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  119. Header="{x:Static resource:Client_Resource.Delivery_holderPrice}" />
  120. -->
  121. <!-- 交割总货款 -->
  122. <DataGridTextColumn Width="Auto"
  123. MinWidth="100"
  124. Binding="{Binding DeliveryTotalAmount}"
  125. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  126. Header="{x:Static resource:Client_Resource.Delivery_DeliveryTotalGoodsAmount}" />
  127. <!--
  128. 差价款
  129. <DataGridTextColumn Width="Auto"
  130. MinWidth="100"
  131. Binding="{Binding PriceMoveAmount}"
  132. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  133. Header="{x:Static resource:Client_Resource.DeliveryOrderView_FreezePriceMoveMoney}" />
  134. -->
  135. <!--
  136. 升贴水
  137. <DataGridTextColumn Width="Auto"
  138. MinWidth="100"
  139. Binding="{Binding DeliveryPriceMoveAmount}"
  140. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  141. Header="{x:Static resource:Client_Resource.Moduel_PriceMove}" />
  142. -->
  143. <!--
  144. 交割总金额
  145. <DataGridTextColumn Width="Auto"
  146. MinWidth="100"
  147. Binding="{Binding DeliveryTotalAmount}"
  148. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  149. Header="{x:Static resource:Client_Resource.Delivery_DeliveryTotalAmount}" />
  150. -->
  151. <!-- 交割税款 -->
  152. <!--
  153. <DataGridTextColumn Width="Auto"
  154. MinWidth="100"
  155. Binding="{Binding Tax}"
  156. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  157. Header="{x:Static resource:Client_Resource.Content_DeliveryTax}" />
  158. -->
  159. <!--
  160. 手续费
  161. <DataGridTextColumn Width="Auto"
  162. MinWidth="100"
  163. Binding="{Binding DeliveryCharge}"
  164. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  165. Header="{x:Static resource:Client_Resource.Content_Charge}" />
  166. -->
  167. <!-- 交割时间 -->
  168. <DataGridTextColumn Width="Auto"
  169. MinWidth="140"
  170. Binding="{Binding DeliveryTime,
  171. StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"
  172. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  173. Header="{x:Static resource:Client_Resource.Delivery_Time}" />
  174. <!--
  175. 交割结算盈亏=(最新价-持仓价)【交割算法:最新价-时才有此字段】
  176. <DataGridTextColumn Width="Auto"
  177. MinWidth="100"
  178. Binding="{Binding DeliveryBalancePL}"
  179. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  180. Header="{x:Static resource:Client_Resource.Delivery_BalancePL}" />
  181. -->
  182. <!--
  183. 履约截止时间
  184. <DataGridTextColumn Width="Auto"
  185. MinWidth="140"
  186. Binding="{Binding ContractTimeDisplay}"
  187. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  188. Header="{x:Static resource:Client_Resource.Delivery_ContractTime}" />
  189. -->
  190. <!--
  191. 申报单号
  192. <DataGridTextColumn Width="Auto"
  193. MinWidth="100"
  194. Binding="{Binding BuyOrderId}"
  195. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  196. Header="{x:Static resource:Client_Resource.Delivery_BuyOrderId}" />
  197. -->
  198. <!--
  199. 关联仓单号
  200. <DataGridTextColumn Width="Auto"
  201. MinWidth="100"
  202. Binding="{Binding WRCodeGroupDisplay}"
  203. CellStyle="{StaticResource DataGridCellColumnStyleToolTip}"
  204. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  205. Header="{x:Static resource:Client_Resource.Delivery_RelationWRCode}" />
  206. -->
  207. <!-- 状态 -->
  208. <DataGridTextColumn Width="Auto"
  209. MinWidth="100"
  210. Binding="{Binding DeliveryStatusDisplay}"
  211. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  212. Header="{x:Static resource:Client_Resource.Content_State}" />
  213. <!-- 操作 -->
  214. <DataGridTemplateColumn>
  215. <DataGridTemplateColumn.Header>
  216. <TextBlock Text="{x:Static resource:Client_Resource.Content_Operation}" />
  217. </DataGridTemplateColumn.Header>
  218. <DataGridTemplateColumn.CellTemplate>
  219. <DataTemplate>
  220. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  221. <!-- 查看详细 -->
  222. <Button Height="20"
  223. Margin="10,0,0,0"
  224. Command="{Binding Path=DataContext.SeeMoreDetailCommand,
  225. RelativeSource={RelativeSource Mode=FindAncestor,
  226. AncestorLevel=3,
  227. AncestorType={x:Type Grid}}}"
  228. CommandParameter="{Binding Path=SelectedItem,
  229. ElementName=DeliveryDataGrid}"
  230. Content="{x:Static resource:Client_Resource.Content_SeeMoreDetail}"
  231. Padding="10,2"
  232. Style="{DynamicResource ButtonWithBorderStyle}" />
  233. <!-- 确认货票 (暂时屏蔽)MTP2.0
  234. <StackPanel Visibility="{Binding IsNeedComfrim, Converter={StaticResource BooleanToVisibilityConverter}}">
  235. <Button Height="20"
  236. Margin="10,0,0,0"
  237. Command="{Binding Path=DataContext.ComfirmGoodsTicketsCommand,
  238. RelativeSource={RelativeSource Mode=FindAncestor,
  239. AncestorLevel=3,
  240. AncestorType={x:Type Grid}}}"
  241. CommandParameter="{Binding }"
  242. Content="{Binding ConfirmRemark}"
  243. Padding="10,2"
  244. Style="{DynamicResource ButtonWithBorderStyle}" />
  245. </StackPanel>-->
  246. <!-- 申诉 (暂时屏蔽) -->
  247. <!--
  248. <Button Margin="10,0,0,0"
  249. Command="{Binding Path=DataContext.AppealCommand,
  250. RelativeSource={RelativeSource Mode=FindAncestor,
  251. AncestorLevel=3,
  252. AncestorType={x:Type Grid}}}"
  253. CommandParameter="{Binding Path=SelectedItem,ElementName=DeliveryDataGrid}"
  254. Padding="10,2"
  255. Height="20"
  256. IsEnabled="{Binding DeliveryStatus_ContractTime, Converter={StaticResource statusToAppealIsEnabled}}"
  257. Visibility="{Binding DeliveryStatus_ContractTime, Converter={StaticResource eDoneDeliveryOrderStatusConverter}}"
  258. Content="{x:Static resource:Client_Resource.Content_Appeal}"
  259. Style="{DynamicResource ButtonWithBorderStyle}" />
  260. -->
  261. <!--
  262. 确认货
  263. <CheckBox x:Name="cbXh_Goods" IsEnabled="{Binding pValue_hValue_countNum,Converter={StaticResource countGoodsIsEnabledConvert}}" Visibility="{Binding DeliveryStatus, Converter={StaticResource eDoneDeliveryOrderStatusConverter}}" VerticalAlignment="Center" Content="{x:Static resource:Client_Resource.DryHoldDetailView_Confirm_Goods}" IsChecked="{Binding IsGoodsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource mtpCheckBoxStyle}">
  264. <i:Interaction.Triggers>
  265. <i:EventTrigger EventName="Checked">
  266. <i:InvokeCommandAction Command="{Binding DataContext.SelectGoodsCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh_Goods}"/>
  267. </i:EventTrigger>
  268. <i:EventTrigger EventName="Unchecked">
  269. <i:InvokeCommandAction Command="{Binding DataContext.UnSelectGoodsCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh_Goods}"/>
  270. </i:EventTrigger>
  271. </i:Interaction.Triggers>
  272. </CheckBox>
  273. -->
  274. <!--
  275. 确认票
  276. <CheckBox x:Name="cbXh_Ticket" IsEnabled="{Binding pValue_hValue_countNum,Converter={StaticResource countTicketIsEnabledConvert}}" Visibility="{Binding DeliveryStatus, Converter={StaticResource eDoneDeliveryOrderStatusConverter}}" Margin="10,0,0,0" VerticalAlignment="Center" Content="{x:Static resource:Client_Resource.DryHoldDetailView_Confirm_Ticket}" IsChecked="{Binding IsTicketSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource mtpCheckBoxStyle}">
  277. <i:Interaction.Triggers>
  278. <i:EventTrigger EventName="Checked">
  279. <i:InvokeCommandAction Command="{Binding DataContext.SelectTicketCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh_Ticket}"/>
  280. </i:EventTrigger>
  281. <i:EventTrigger EventName="Unchecked">
  282. <i:InvokeCommandAction Command="{Binding DataContext.UnSelectTicketCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh_Ticket}"/>
  283. </i:EventTrigger>
  284. </i:Interaction.Triggers>
  285. </CheckBox>
  286. -->
  287. <!--
  288. <Button Margin="10,0,0,0" IsEnabled="{Binding pValue_hValue_countNum,Converter={StaticResource countButtonIsEnabledConvert}}" Visibility="{Binding DeliveryStatus, Converter={StaticResource eDoneDeliveryOrderStatusConverter}}"
  289. Command="{Binding Path=DataContext.ConfirmPayCommand,
  290. RelativeSource={RelativeSource Mode=FindAncestor,
  291. AncestorLevel=3,
  292. AncestorType={x:Type Grid}}}"
  293. CommandParameter="{Binding Path=SelectedItem,ElementName=DeliveryDataGrid}"
  294. Padding="5,2,5,0"
  295. Content="{x:Static resource:Client_Resource.Content_ConfirmPay}"
  296. Style="{DynamicResource ButtonWithBorderStyle}" />
  297. -->
  298. </StackPanel>
  299. </DataTemplate>
  300. </DataGridTemplateColumn.CellTemplate>
  301. </DataGridTemplateColumn>
  302. </DataGrid.Columns>
  303. <DataGrid.ContextMenu>
  304. <ContextMenu>
  305. <MenuItem Command="{Binding RefreshCommand}"
  306. Header="{x:Static resource:Client_Resource.Button_Refresh}"
  307. IsEnabled="True"
  308. Style="{DynamicResource CommonMenuItem}" />
  309. </ContextMenu>
  310. </DataGrid.ContextMenu>
  311. </dataGrid:MuchinfoDataGrid>
  312. </Grid>
  313. </xctk:BusyIndicator>
  314. </UserControl>