EntrustOrderView.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <Window x:Class="Muchinfo.MTPClient.Trade.Views.EntrustOrderView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:border="clr-namespace:Muchinfo.WPF.Controls.Border;assembly=Client.WPF.Controls"
  5. xmlns:controls="clr-namespace:Muchinfo.WPF.Controls;assembly=Client.WPF.Controls"
  6. xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  7. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  8. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  9. xmlns:resources="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  10. xmlns:views="clr-namespace:Muchinfo.MTPClient.Trade.Views"
  11. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  12. xmlns:zoom="clr-namespace:Muchinfo.WPF.Controls.Zoom;assembly=Client.WPF.Controls"
  13. x:Name="openOrderWindow"
  14. Title="{Binding TradeViewModel.WinTitle,
  15. Mode=OneWay}"
  16. MinWidth="660"
  17. MinHeight="330"
  18. Closed="openOrderWindow_Closed"
  19. SizeToContent="Height"
  20. Style="{DynamicResource DialogWindowStyle}"
  21. WindowStartupLocation="CenterOwner">
  22. <i:Interaction.Triggers>
  23. <i:EventTrigger EventName="SizeChanged">
  24. <i:InvokeCommandAction Command="{Binding SizeChangedCommand}" />
  25. </i:EventTrigger>
  26. </i:Interaction.Triggers>
  27. <Window.Resources>
  28. <converters:StringToVisibilityConverter x:Key="stringToVisibilityConverter" />
  29. <converters:RelationModeConverter x:Key="relationModeConverter" />
  30. <converters:RelationPModeConverter x:Key="relationPModeConverter" />
  31. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  32. <!-- 交割商品LIST -->
  33. <DataTemplate x:Key="deliveryGoodsInfoTemplate">
  34. <Grid Margin="2">
  35. <StackPanel Orientation="Horizontal">
  36. <StackPanel Margin="5,5">
  37. <StackPanel Height="25"
  38. Margin="0,5"
  39. Background="{DynamicResource AcountGridHeadBackground}">
  40. <TextBlock Margin="5,5,0,0"
  41. Foreground="{DynamicResource AcountGridHeadForeground}"
  42. TextWrapping="Wrap">
  43. <Run Text="{x:Static resources:Client_Resource.DeliveryOrderView_DeliveryGoods}" />
  44. <Run Text=":" />
  45. <Run Text="{Binding DeliveryGoodsNameDisplay, Mode=OneWay}" ToolTip="{Binding DeliveryGoodsNameCodeToolTip}" />
  46. </TextBlock>
  47. </StackPanel>
  48. <!-- 单位【仓单商品】 -->
  49. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  50. <Run Text="{x:Static resources:Client_Resource.Moduel_Unit}" />
  51. <Run Text=":" />
  52. <Run Text="{Binding goodsUnitName}" />
  53. </TextBlock>
  54. <!-- 差价升贴水 -->
  55. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  56. <Run Text="{x:Static resources:Client_Resource.DeliveryOrderView_DeliveryPriceMove}" />
  57. <Run Text=":" />
  58. <Run Text="{Binding Deliverypricemove}" />
  59. </TextBlock>
  60. <!--
  61. 品牌
  62. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  63. <Run Text="{x:Static resources:Client_Resource.Moduel_Brand}"></Run>
  64. <Run Text=":"></Run>
  65. <Run Text="{Binding BrandList}"></Run>
  66. </TextBlock>
  67. -->
  68. <!--
  69. 等级
  70. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  71. <Run Text="{x:Static resources:Client_Resource.Moduel_Level}"></Run>
  72. <Run Text=":"></Run>
  73. <Run Text="{Binding RankList}"></Run>
  74. </TextBlock>
  75. -->
  76. <!--
  77. 存储仓库
  78. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  79. <Run Text="{x:Static resources:Client_Resource.DeliveryWarehouse_WareHouseId}"></Run>
  80. <Run Text=":"></Run>
  81. <Run Text="{Binding WarehouseList}"></Run>
  82. </TextBlock>
  83. -->
  84. <!-- 兑换系数 -->
  85. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  86. <Run Text="{x:Static resources:Client_Resource.EntrustOrderView_Conversion}" />
  87. <Run Text=":" />
  88. <Run Text="{Binding Conversion}" />
  89. </TextBlock>
  90. <!-- 商品配比 -->
  91. <TextBlock Margin="5,2"
  92. Foreground="{DynamicResource MainForegroundBrush}"
  93. Visibility="{Binding RelationMode,
  94. Converter={StaticResource relationPModeConverter}}">
  95. <Run Text="{x:Static resources:Client_Resource.EntrustOrderView_GoodsScale}" />
  96. <Run Text=":" />
  97. <Run Text="{Binding GoodsScale}" />
  98. </TextBlock>
  99. <!--
  100. 合约单位
  101. <TextBlock Margin="5,2" Foreground="{DynamicResource MainForegroundBrush}">
  102. <Run Text="{x:Static resources:Client_Resource.Content_AgreeUnit}" />
  103. <Run Text=":" />
  104. <Run Text="{Binding AgreeUnit}" />
  105. <Run Text="{Binding goodsUnitName}" />
  106. </TextBlock>
  107. -->
  108. <!--
  109. 关联商品代号
  110. <TextBlock Margin="5,5"
  111. Foreground="{DynamicResource MainForegroundBrush}"
  112. Visibility="{Binding RelationGoodsCode,
  113. Converter={StaticResource stringToVisibilityConverter}}">
  114. <Run Text="{x:Static resources:Client_Resource.EntrustOrderView_RelationGoodsCode}" />
  115. <Run Text=":" />
  116. <Run Text="{Binding RelationGoodsCode}" />
  117. </TextBlock>
  118. -->
  119. <!-- 关联商品名称/代号 -->
  120. <TextBlock Margin="5,2"
  121. Foreground="{DynamicResource MainForegroundBrush}"
  122. Visibility="{Binding RelationGoodsName,
  123. Converter={StaticResource stringToVisibilityConverter}}">
  124. <Run Text="{x:Static resources:Client_Resource.EntrustOrderView_RelationGoodsName}" />
  125. <Run Text=":" />
  126. <Run Text="{Binding RelationGoodsNameCodeDisplay, Mode=OneWay}" ToolTip="{Binding RelationGoodsNameCodeDisplay}" />
  127. </TextBlock>
  128. </StackPanel>
  129. </StackPanel>
  130. </Grid>
  131. </DataTemplate>
  132. </Window.Resources>
  133. <!--
  134. <xctk:BusyIndicator BusyContent="{Binding BusyTips,
  135. Mode=OneWay}"
  136. Foreground="Black"
  137. IsBusy="{Binding IsBusy,
  138. Mode=OneWay}">
  139. -->
  140. <Grid x:Name="contentGrid">
  141. <Grid.RowDefinitions>
  142. <RowDefinition Height="Auto" />
  143. <RowDefinition Height="Auto" />
  144. </Grid.RowDefinitions>
  145. <Grid.ColumnDefinitions>
  146. <ColumnDefinition />
  147. <ColumnDefinition Width="30" />
  148. </Grid.ColumnDefinitions>
  149. <views:OrderContent Margin="35,24,0,0" Visibility="{Binding TradeViewModel.IsNormalModel, Converter={StaticResource BooleanToVisibilityConverter}}" />
  150. <views:SPSLView Margin="35,24,0,0"
  151. HorizontalAlignment="Center"
  152. Visibility="{Binding TradeViewModel.IsSPSLModel,
  153. Converter={StaticResource BooleanToVisibilityConverter}}" />
  154. <CheckBox x:Name="IsPopupOpen"
  155. Grid.RowSpan="2"
  156. Grid.Column="1"
  157. HorizontalAlignment="Center"
  158. VerticalAlignment="Center"
  159. IsChecked="{Binding IsChecked_IsPopupOpen}"
  160. Style="{DynamicResource OrderDeliveryCheckBoxStyle}"
  161. Visibility="{Binding IsVisibilityGoodsOfPAndX,
  162. Converter={StaticResource ToVisibilityConverter}}">
  163. <TextBlock Text="{x:Static resources:Client_Resource.EntrustOrderView_DeliveryGoodsInfo}" TextWrapping="Wrap" />
  164. </CheckBox>
  165. <Separator Grid.Row="1"
  166. Grid.ColumnSpan="2"
  167. Margin="20,5"
  168. VerticalAlignment="Top"
  169. BorderBrush="{DynamicResource DialogWindowSeparatorBottom}"
  170. Style="{DynamicResource ThinSeparatorStyle}"
  171. Visibility="{Binding ShowOkCancel,
  172. Converter={StaticResource BooleanToVisibilityConverter}}" />
  173. <!-- 确定 -->
  174. <StackPanel Grid.Row="1"
  175. Grid.ColumnSpan="2"
  176. MinHeight="80"
  177. HorizontalAlignment="Center"
  178. Orientation="Horizontal"
  179. Visibility="{Binding ShowOkCancel,
  180. Converter={StaticResource BooleanToVisibilityConverter}}">
  181. <Button x:Name="btnOKCommand"
  182. Width="82"
  183. Height="26"
  184. Command="{Binding OKCommand}"
  185. CommandParameter="{Binding ElementName=openOrderWindow}"
  186. Content="{x:Static resources:Client_Resource.Button_Confirm}"
  187. IsEnabled="{Binding OKButtonEnabled}"
  188. Style="{DynamicResource CommonButtonStyle}"
  189. TabIndex="26" />
  190. <Button Width="82"
  191. Height="26"
  192. Margin="60,0,0,0"
  193. Command="{Binding CancelCommand}"
  194. CommandParameter="{Binding ElementName=openOrderWindow}"
  195. Content="{x:Static resources:Client_Resource.Button_Cancel}"
  196. Style="{DynamicResource CommonButtonStyle}"
  197. TabIndex="27" />
  198. </StackPanel>
  199. <Button Grid.Row="2"
  200. Grid.ColumnSpan="2"
  201. Margin="0,0,10,10"
  202. HorizontalAlignment="Right"
  203. VerticalAlignment="Bottom"
  204. Content="{x:Static resources:Client_Resource.EntrustOrderFrame_SetTrade}"
  205. Style="{DynamicResource TextButtonStyle}"
  206. Visibility="Collapsed" />
  207. <controls:PopubEx x:Name="DeliveryPopup"
  208. Width="270"
  209. AllowsTransparency="True"
  210. IsOpen="{Binding IsChecked_IsPopupOpen}"
  211. Placement="Custom"
  212. PlacementTarget="{Binding ElementName=openOrderWindow}">
  213. <Border BorderThickness="0">
  214. <Grid Background="{DynamicResource DialogWindowBackground}">
  215. <Grid.RowDefinitions>
  216. <RowDefinition Height="Auto" />
  217. <RowDefinition Height="Auto" />
  218. <RowDefinition MaxHeight="100" />
  219. <RowDefinition MaxHeight="120" />
  220. </Grid.RowDefinitions>
  221. <!--
  222. <TextBlock Margin="10,0,0,0"
  223. VerticalAlignment="Center"
  224. Foreground="{StaticResource TextBrush_Common}">
  225. <Run Text="{x:Static resources:Client_Resource.EntrustOrderView_DeliveryGoodsInfo_PropertyIs}" />
  226. <Run Text="{Binding PDeliveryGoodsName}" />
  227. <Run Text="{Binding BelowDeliveryInfoTips}" />
  228. </TextBlock>
  229. -->
  230. <ListBox x:Name="ListBox_DeliveryGoodsInfo"
  231. Grid.Row="1"
  232. Background="{DynamicResource DialogWindowBackground}"
  233. BorderThickness="0"
  234. ItemContainerStyle="{DynamicResource NoticeListBoxItemStyle}"
  235. ItemTemplate="{StaticResource deliveryGoodsInfoTemplate}"
  236. ItemsSource="{Binding GoodsOfPandXInfoList}"
  237. Visibility="{Binding PDeliveryGoodsName,
  238. Converter={StaticResource relationModeConverter}}" />
  239. <dataGrid:MuchinfoDataGrid x:Name="RelationPerformConfigDataGrid"
  240. Grid.Row="2"
  241. MaxHeight="100"
  242. Margin="12,5"
  243. HorizontalAlignment="Stretch"
  244. ItemsSource="{Binding RelationPerformConfigList,
  245. Mode=OneWay}"
  246. ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  247. ScrollViewer.VerticalScrollBarVisibility="Auto"
  248. SelectionMode="Single"
  249. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  250. <DataGrid.Columns>
  251. <!-- N -->
  252. <DataGridTextColumn Width="Auto"
  253. MinWidth="100"
  254. Binding="{Binding Performday}"
  255. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  256. Header="{x:Static resources:Client_Resource.Content_N}" />
  257. <!-- 支付比例 -->
  258. <DataGridTextColumn Width="Auto"
  259. MinWidth="120"
  260. Binding="{Binding PerformratioDisplay}"
  261. ElementStyle="{DynamicResource DataGridTextColumnStyle}"
  262. Header="{x:Static resources:Client_Resource.Content_PayPercent}" />
  263. </DataGrid.Columns>
  264. </dataGrid:MuchinfoDataGrid>
  265. <!-- 提示信息 -->
  266. <StackPanel Grid.Row="3"
  267. Margin="12,5"
  268. Orientation="Vertical">
  269. <Border BorderBrush="{DynamicResource AcountGridHeadForeground}" BorderThickness="0,1,0,0" />
  270. <TextBlock Margin="0,12,0,0"
  271. Foreground="{DynamicResource AcountGridHeadForeground}"
  272. Text="{x:Static resources:Client_Resource.EntrustOrderView_DeliveryRelationTips}"
  273. TextWrapping="Wrap" />
  274. <TextBlock Margin="0,12,0,0"
  275. Foreground="{DynamicResource AcountGridHeadForeground}"
  276. Text="{x:Static resources:Client_Resource.EntrustOrderView_DeliveryRelationGoodsScaleTips}"
  277. TextWrapping="Wrap"
  278. Visibility="{Binding IsVisibility_GoodsScale}" />
  279. </StackPanel>
  280. </Grid>
  281. </Border>
  282. </controls:PopubEx>
  283. </Grid>
  284. <!-- </xctk:BusyIndicator> -->
  285. </Window>