NDeliveryOrderView.xaml 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <Window x:Class="Muchinfo.MTPClient.Delivery.Views.NDeliveryOrderView"
  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=Client.Infrastructure"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  7. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  8. xmlns:ignore="http://www.galasoft.ch/ignore"
  9. xmlns:controls="clr-namespace:Muchinfo.WPF.Controls;assembly=Client.WPF.Controls"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:resources="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  12. xmlns:validations="clr-namespace:Muchinfo.MTPClient.Infrastructure.ValidationRules;assembly=Client.Infrastructure"
  13. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  14. xmlns:local="clr-namespace:Muchinfo.MTPClient.Delivery.Utilities"
  15. x:Name="NDeliveryOrderViewWindow"
  16. Title="{Binding Title}"
  17. MinHeight="350"
  18. ShowInTaskbar="False"
  19. SizeToContent="WidthAndHeight"
  20. Style="{DynamicResource DialogWindowStyle}"
  21. WindowStartupLocation="CenterOwner"
  22. mc:Ignorable="d ignore">
  23. <Window.Resources>
  24. <converters:IntToVisibilityConverter x:Key="ZeroOrNotVisibilityConverter" />
  25. <converters:BuyOrSellConvert x:Key="EnumBooleanConvert" />
  26. <converters:StringToIntConverter x:Key="stringToIntConvert" />
  27. <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  28. <DataTemplate x:Key="GoodsDatatTemplate">
  29. <TextBlock>
  30. <Run Text="{Binding Name}" />
  31. <Run Text=" " />
  32. <Run Text="{Binding GoodsCode}" />
  33. </TextBlock>
  34. </DataTemplate>
  35. <Style x:Key="TextBlockCommon" TargetType="TextBlock">
  36. <Setter Property="VerticalAlignment" Value="Center" />
  37. <Setter Property="Foreground" Value="{DynamicResource AcountGridHeadForeground}" />
  38. <Setter Property="Margin" Value="10,0,0,0" />
  39. </Style>
  40. <ControlTemplate x:Key="ErrorTemplate">
  41. <!--
  42. <Border BorderBrush="Red" BorderThickness="1">
  43. <AdornedElementPlaceholder/>
  44. </Border>
  45. -->
  46. <DockPanel>
  47. <AdornedElementPlaceholder />
  48. <TextBlock FontSize="20" Foreground="Red">*</TextBlock>
  49. </DockPanel>
  50. </ControlTemplate>
  51. <Style TargetType="TextBlock">
  52. <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ErrorTemplate}" />
  53. <Style.Triggers>
  54. <Trigger Property="Validation.HasError" Value="True">
  55. <Setter Property="Foreground" Value="Red" />
  56. <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}" />
  57. </Trigger>
  58. </Style.Triggers>
  59. </Style>
  60. </Window.Resources>
  61. <xctk:BusyIndicator BusyContent="{Binding BusyContent}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  62. <Grid Margin="20,10">
  63. <Grid.RowDefinitions>
  64. <RowDefinition />
  65. <RowDefinition Height="Auto" />
  66. <RowDefinition Height="Auto" />
  67. </Grid.RowDefinitions>
  68. <StackPanel Orientation="Vertical">
  69. <Grid>
  70. <Grid.RowDefinitions>
  71. <RowDefinition />
  72. <RowDefinition />
  73. <RowDefinition Height="Auto" />
  74. <RowDefinition Height="Auto" />
  75. <RowDefinition />
  76. <RowDefinition />
  77. <RowDefinition Height="Auto" />
  78. <RowDefinition Height="Auto" />
  79. <RowDefinition />
  80. <RowDefinition />
  81. <RowDefinition />
  82. <RowDefinition />
  83. <RowDefinition />
  84. <RowDefinition />
  85. </Grid.RowDefinitions>
  86. <Grid.ColumnDefinitions>
  87. <ColumnDefinition />
  88. <ColumnDefinition />
  89. <ColumnDefinition />
  90. <ColumnDefinition />
  91. <ColumnDefinition />
  92. <ColumnDefinition />
  93. </Grid.ColumnDefinitions>
  94. <Border Grid.Row="0"
  95. Grid.ColumnSpan="5"
  96. BorderBrush="{DynamicResource BorderBrush_Common}"
  97. BorderThickness="1">
  98. <StackPanel Grid.Row="0"
  99. Grid.ColumnSpan="5"
  100. Height="25"
  101. Background="{DynamicResource AcountGridHeadBackground}"
  102. Orientation="Horizontal">
  103. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  104. <!-- 交易商品名称title -->
  105. <TextBlock Width="145"
  106. Style="{StaticResource TextBlockCommon}"
  107. Text="{x:Static resources:Client_Resource.DeliveryOrderView_DeclareGoods}" />
  108. </Border>
  109. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  110. <!-- 价格 title -->
  111. <TextBlock Width="{Binding ActualWidth,
  112. ElementName=AvailPriceContent}"
  113. Style="{StaticResource TextBlockCommon}"
  114. Text="{x:Static resources:Client_Resource.Content_Price}" />
  115. </Border>
  116. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  117. <!-- 可用数量 title -->
  118. <TextBlock Width="{Binding ActualWidth,
  119. ElementName=AvailQtyContent}"
  120. Style="{StaticResource TextBlockCommon}"
  121. Text="{x:Static resources:Client_Resource.Content_AvailQty}" />
  122. </Border>
  123. <!-- 申报数量 title -->
  124. <TextBlock MinWidth="100"
  125. Style="{StaticResource TextBlockCommon}"
  126. Text="{x:Static resources:Client_Resource.Content_DeliveryQty}" />
  127. </StackPanel>
  128. </Border>
  129. <Border Grid.Row="1"
  130. Grid.ColumnSpan="5"
  131. BorderBrush="{DynamicResource BorderBrush_Common}"
  132. BorderThickness="1,0,1,1">
  133. <StackPanel Margin="0,0,0,2" Orientation="Horizontal" Height="25">
  134. <!-- 交易商品名称-content -->
  135. <TextBlock x:Name="XGoods"
  136. Width="145"
  137. Margin="10,0,0,0"
  138. VerticalAlignment="Center"
  139. IsEnabled="False"
  140. Padding="20,0,0,0"
  141. TextAlignment="Left">
  142. <Run Text="{Binding DisplayXGoods, Mode=OneWay}" />
  143. </TextBlock>
  144. <TextBlock x:Name="AvailPriceContent"
  145. MinWidth="80"
  146. Margin="10,0,0,0"
  147. VerticalAlignment="Center"
  148. IsEnabled="False"
  149. Padding="20,0,0,0"
  150. TextAlignment="Left">
  151. <Run Text="{Binding XPriceFormat, Mode=OneWay}" />
  152. </TextBlock>
  153. <!-- 可用数量 content -->
  154. <TextBlock x:Name="AvailQtyContent"
  155. MinWidth="100"
  156. Margin="10,0,0,0"
  157. VerticalAlignment="Center"
  158. IsEnabled="False"
  159. Padding="20,0,0,0"
  160. TextAlignment="Left">
  161. <Run Text="{Binding AvailHoldQty, Mode=OneWay}" />
  162. </TextBlock>
  163. <!-- 申报数量 content -->
  164. <TextBlock x:Name="DeclareQtyContent"
  165. MinWidth="100"
  166. Margin="10,0,0,0"
  167. VerticalAlignment="Center"
  168. IsEnabled="False"
  169. Padding="20,0,0,0"
  170. TextAlignment="Left">
  171. <Run Text="{Binding DeliveryCount, Mode=OneWay}" />
  172. <Run Text="{Binding DeliveryCountCalcAlgrithm, Mode=OneWay}" />
  173. </TextBlock>
  174. </StackPanel>
  175. </Border>
  176. <Border Grid.Row="3"
  177. Grid.ColumnSpan="5"
  178. BorderBrush="{DynamicResource BorderBrush_Common}"
  179. BorderThickness="1" Visibility="{Binding IsVisibility_P}">
  180. <StackPanel Grid.Row="3"
  181. Grid.ColumnSpan="5"
  182. Height="25"
  183. Background="{DynamicResource AcountGridHeadBackground}"
  184. Orientation="Horizontal">
  185. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  186. <!-- 交易商品名称title -->
  187. <TextBlock Width="145"
  188. Style="{StaticResource TextBlockCommon}"
  189. Text="{x:Static resources:Client_Resource.DeliveryOrderView_RelationGoodsName}" />
  190. </Border>
  191. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  192. <!-- 价格 title -->
  193. <TextBlock Width="{Binding ActualWidth,
  194. ElementName=P1AvailPriceContent}"
  195. Style="{StaticResource TextBlockCommon}"
  196. Text="{x:Static resources:Client_Resource.Content_Price}" />
  197. </Border>
  198. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  199. <!-- 可用数量 title -->
  200. <TextBlock Width="{Binding ActualWidth,
  201. ElementName=RelationGoodsHoldQty_content}"
  202. Style="{StaticResource TextBlockCommon}"
  203. Text="{x:Static resources:Client_Resource.Content_AvailQty}" />
  204. </Border>
  205. <!-- 申报数量 title -->
  206. <TextBlock Width="{Binding ActualWidth,
  207. ElementName=RelationNumContent}"
  208. Style="{StaticResource TextBlockCommon}"
  209. Text="{x:Static resources:Client_Resource.Content_DeliveryQty}" />
  210. </StackPanel>
  211. </Border>
  212. <Border Grid.Row="4"
  213. Grid.ColumnSpan="5"
  214. BorderBrush="{DynamicResource BorderBrush_Common}"
  215. BorderThickness="1,0,1,1" Visibility="{Binding IsVisibility_Type1}">
  216. <StackPanel Grid.Row="4"
  217. Grid.ColumnSpan="5"
  218. Height="25"
  219. Margin="0,0,0,2"
  220. Orientation="Horizontal">
  221. <!-- 交易商品名称-content -->
  222. <TextBlock x:Name="PGoods1"
  223. Width="145"
  224. Margin="10,0,0,0"
  225. VerticalAlignment="Center"
  226. IsEnabled="False"
  227. Padding="20,0,0,0"
  228. TextAlignment="Left">
  229. <Run Text="{Binding P1GoodsName, Mode=OneWay}" />
  230. </TextBlock>
  231. <TextBlock x:Name="P1AvailPriceContent"
  232. MinWidth="80"
  233. Margin="10,0,0,0"
  234. HorizontalAlignment="Left"
  235. VerticalAlignment="Center"
  236. IsEnabled="False"
  237. Padding="20,0,0,0"
  238. TextAlignment="Left">
  239. <Run Text="{Binding RelationGoodsHoldPriceFormat, Mode=OneWay}" />
  240. </TextBlock>
  241. <!-- 可用数量 content -->
  242. <TextBlock x:Name="RelationGoodsHoldQty_content"
  243. MinWidth="100"
  244. Margin="10,0,0,0"
  245. HorizontalAlignment="Left"
  246. VerticalAlignment="Center"
  247. IsEnabled="False"
  248. Padding="20,0,0,0"
  249. TextAlignment="Left">
  250. <Run Text="{Binding RelationGoodsHoldQtyDisp, Mode=OneWay}" />
  251. </TextBlock>
  252. <!-- 申报数量 content -->
  253. <TextBlock x:Name="RelationNumContent"
  254. MinWidth="100"
  255. Margin="10,0"
  256. VerticalAlignment="Center"
  257. IsEnabled="False"
  258. Padding="20,0,0,0"
  259. TextAlignment="Left">
  260. <TextBlock.Style>
  261. <Style TargetType="TextBlock">
  262. <Style.Triggers>
  263. <DataTrigger Binding="{Binding IsError_RelationDeliveryCount}" Value="true">
  264. <Setter Property="Foreground" Value="{DynamicResource TextBrush_Common}" />
  265. </DataTrigger>
  266. </Style.Triggers>
  267. </Style>
  268. </TextBlock.Style>
  269. <!-- 数据验证 -->
  270. <Run Text="{Binding RelationDeliveryCountDisp, Mode=OneWay}" />
  271. <Run Text="{Binding RelationDeliveryCountCalcAlgrithm, Mode=OneWay}" />
  272. </TextBlock>
  273. </StackPanel>
  274. </Border>
  275. <Border Grid.Row="5"
  276. Grid.ColumnSpan="5"
  277. BorderBrush="{DynamicResource BorderBrush_Common}"
  278. BorderThickness="1,0,1,1" Visibility="{Binding IsVisibility_Type2}">
  279. <StackPanel Grid.Row="5"
  280. Grid.ColumnSpan="5"
  281. Height="25"
  282. Margin="0,0,0,2"
  283. Orientation="Horizontal">
  284. <!-- 交易商品名称-content -->
  285. <TextBlock x:Name="PGoods2"
  286. Width="145"
  287. Margin="10,0,0,0"
  288. VerticalAlignment="Center"
  289. IsEnabled="False"
  290. Padding="20,0,0,0"
  291. TextAlignment="Left">
  292. <Run Text="{Binding P2GoodsName, Mode=OneWay}" />
  293. </TextBlock>
  294. <TextBlock x:Name="P2AvailPriceContent"
  295. MinWidth="80"
  296. Margin="10,0,0,0"
  297. HorizontalAlignment="Left"
  298. VerticalAlignment="Center"
  299. IsEnabled="False"
  300. Padding="20,0,0,0"
  301. TextAlignment="Left">
  302. <Run Text="{Binding RelationGoodsHoldPriceFormat2, Mode=OneWay}" />
  303. </TextBlock>
  304. <!-- 可用数量 content -->
  305. <TextBlock x:Name="RelationGoodsHoldQty_content2"
  306. MinWidth="100"
  307. Margin="10,0,0,0"
  308. HorizontalAlignment="Left"
  309. VerticalAlignment="Center"
  310. IsEnabled="False"
  311. Padding="20,0,0,0"
  312. TextAlignment="Left">
  313. <Run Text="{Binding RelationGoodsHoldQty2Disp, Mode=OneWay}" />
  314. </TextBlock>
  315. <!-- 申报数量 content -->
  316. <TextBlock x:Name="RelationNumContent2"
  317. MinWidth="100"
  318. Margin="10,0"
  319. VerticalAlignment="Center"
  320. IsEnabled="False"
  321. Padding="20,0,0,0"
  322. TextAlignment="Left">
  323. <TextBlock.Style>
  324. <Style TargetType="TextBlock">
  325. <Style.Triggers>
  326. <DataTrigger Binding="{Binding IsError_RelationDeliveryCount2}" Value="true">
  327. <Setter Property="Foreground" Value="{DynamicResource TextBrush_Common}" />
  328. </DataTrigger>
  329. </Style.Triggers>
  330. </Style>
  331. </TextBlock.Style>
  332. <!-- 数据验证 -->
  333. <Run Text="{Binding RelationDeliveryCountDisp2, Mode=OneWay}" />
  334. <Run Text="{Binding RelationDeliveryCountCalcAlgrithm2, Mode=OneWay}" />
  335. </TextBlock>
  336. </StackPanel>
  337. </Border>
  338. <Border Grid.Row="6"
  339. Grid.ColumnSpan="5"
  340. BorderBrush="{DynamicResource BorderBrush_Common}"
  341. BorderThickness="1"
  342. >
  343. <StackPanel Grid.Row="6"
  344. Grid.ColumnSpan="5"
  345. Height="25"
  346. Background="{DynamicResource AcountGridHeadBackground}"
  347. Orientation="Horizontal"
  348. >
  349. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  350. <!-- 交割商品 title -->
  351. <TextBlock Width="145"
  352. Style="{StaticResource TextBlockCommon}"
  353. Text="{x:Static resources:Client_Resource.NDeliveryOrderView_WarehouseGoods}" />
  354. </Border>
  355. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  356. <!-- 价格 title -->
  357. <TextBlock Width="{Binding ActualWidth,
  358. ElementName=DeliveryPriceContent}"
  359. Style="{StaticResource TextBlockCommon}"
  360. Text="{x:Static resources:Client_Resource.Content_Price}" />
  361. </Border>
  362. <Border BorderBrush="{DynamicResource BorderBrush_Common}" BorderThickness="0,0,1,0">
  363. <!-- 点选数量 title -->
  364. <TextBlock Width="100"
  365. Style="{StaticResource TextBlockCommon}"
  366. Text="点选数量" />
  367. </Border>
  368. <!-- 预估货款 title -->
  369. <TextBlock Width="145"
  370. Style="{StaticResource TextBlockCommon}"
  371. Text="预估货款" />
  372. </StackPanel>
  373. </Border>
  374. <Border Grid.Row="7"
  375. Grid.ColumnSpan="5"
  376. BorderBrush="{DynamicResource BorderBrush_Common}"
  377. BorderThickness="1,0,1,1"
  378. >
  379. <StackPanel Grid.Row="7"
  380. Grid.ColumnSpan="5"
  381. Height="25"
  382. Margin="0,0,0,2"
  383. Orientation="Horizontal"
  384. >
  385. <!-- 交割商品-content -->
  386. <TextBlock x:Name="DeliveryGoods"
  387. Width="145"
  388. Margin="10,0,0,0"
  389. VerticalAlignment="Center"
  390. IsEnabled="False"
  391. Padding="20,0,0,0"
  392. TextAlignment="Left">
  393. <Run Text="{Binding DeliveryGoodsNameCode, Mode=OneWay}" />
  394. </TextBlock>
  395. <TextBlock x:Name="DeliveryPriceContent"
  396. MinWidth="80"
  397. Margin="10,0"
  398. VerticalAlignment="Center"
  399. IsEnabled="False"
  400. Padding="20,0,0,0"
  401. TextAlignment="Left">
  402. <Run Text="{Binding DeliveryPriceFormat, Mode=OneWay}" />
  403. </TextBlock>
  404. <!-- 交割数量 content -->
  405. <TextBlock MinWidth="100"
  406. Margin="10,0"
  407. VerticalAlignment="Center"
  408. IsEnabled="False"
  409. Padding="20,0,0,0"
  410. TextAlignment="Left">
  411. <Run Text="{Binding DeliveryNumDisplay, Mode=OneWay}" />
  412. <Run Text="{Binding DeliveryAgreeUnitType, Mode=OneWay}" />
  413. </TextBlock>
  414. </StackPanel>
  415. </Border>
  416. <TextBlock Grid.Row="8"
  417. Grid.ColumnSpan="5"
  418. Height="20"
  419. Margin="0,20,0,0">
  420. <Run Text="交割要素信息:" />
  421. <Run Text="{Binding DeliveryFactor, Mode=OneWay}" />
  422. </TextBlock>
  423. <StackPanel Grid.Row="9"
  424. Grid.ColumnSpan="5"
  425. Margin="0,0,0,0"
  426. Orientation="Vertical" Visibility="{Binding IsVisibility_BtnSearch}">
  427. <StackPanel
  428. Margin="0,10"
  429. Orientation="Horizontal">
  430. <!-- 全部仓库 -->
  431. <ComboBox Grid.Row="1"
  432. Grid.Column="1"
  433. Width="125"
  434. HorizontalAlignment="Left"
  435. VerticalAlignment="Center"
  436. ItemsSource="{Binding DeliveryWarehouseList}"
  437. SelectedItem="{Binding SelectedWareHouse,
  438. Mode=TwoWay}" SelectedValuePath="Key" DisplayMemberPath="Value"
  439. Style="{DynamicResource SimpleComboBoxStyle}" Visibility="{Binding IsVisibility_WareHouse}">
  440. <i:Interaction.Triggers>
  441. <i:EventTrigger EventName="SelectionChanged">
  442. <i:InvokeCommandAction Command="{Binding WarehouseSelectionChanged}" />
  443. </i:EventTrigger>
  444. </i:Interaction.Triggers>
  445. </ComboBox>
  446. <!-- 全部品牌 -->
  447. <ComboBox Grid.Row="1"
  448. Grid.Column="2"
  449. Width="125"
  450. Margin="10,0"
  451. HorizontalAlignment="Left"
  452. VerticalAlignment="Center"
  453. ItemsSource="{Binding DeliveryBrandList}"
  454. SelectedItem="{Binding SelectedBrand,
  455. Mode=TwoWay}" SelectedValuePath="Key" DisplayMemberPath="Value"
  456. Style="{DynamicResource SimpleComboBoxStyle}" Visibility="{Binding IsVisibility_Brand}">
  457. <i:Interaction.Triggers>
  458. <i:EventTrigger EventName="SelectionChanged">
  459. <i:InvokeCommandAction Command="{Binding BrandSelectionChanged}" />
  460. </i:EventTrigger>
  461. </i:Interaction.Triggers>
  462. </ComboBox>
  463. <!-- 全部品质 -->
  464. <ComboBox Grid.Row="1"
  465. Grid.Column="3"
  466. Width="125"
  467. Margin="0,0,10,0"
  468. HorizontalAlignment="Left"
  469. VerticalAlignment="Center"
  470. ItemsSource="{Binding DeliveryQualityList}"
  471. SelectedItem="{Binding SelectedQuality,
  472. Mode=TwoWay}" SelectedValuePath="Key" DisplayMemberPath="Value"
  473. Style="{DynamicResource SimpleComboBoxStyle}" Visibility="{Binding IsVisibility_Quality}">
  474. <i:Interaction.Triggers>
  475. <i:EventTrigger EventName="SelectionChanged">
  476. <i:InvokeCommandAction Command="{Binding QualitySelectionChanged}" />
  477. </i:EventTrigger>
  478. </i:Interaction.Triggers>
  479. </ComboBox>
  480. <!-- 全部规格 -->
  481. <ComboBox Grid.Row="1"
  482. Grid.Column="4"
  483. Width="125"
  484. Margin="0,0,10,0"
  485. HorizontalAlignment="Left"
  486. VerticalAlignment="Center"
  487. ItemsSource="{Binding DeliverySpeciList}"
  488. SelectedItem="{Binding SelectedSpeci,
  489. Mode=TwoWay}" SelectedValuePath="Key" DisplayMemberPath="Value"
  490. Style="{DynamicResource SimpleComboBoxStyle}" Visibility="{Binding IsVisibility_Spec}">
  491. <i:Interaction.Triggers>
  492. <i:EventTrigger EventName="SelectionChanged">
  493. <i:InvokeCommandAction Command="{Binding SpeciSelectionChanged}" />
  494. </i:EventTrigger>
  495. </i:Interaction.Triggers>
  496. </ComboBox>
  497. <Button Width="82"
  498. Height="26"
  499. Command="{Binding SearchCommand}"
  500. CommandParameter="{Binding FilterList}"
  501. Content="{x:Static resources:Client_Resource.Content_Query}"
  502. Style="{DynamicResource CommonButtonStyle}" Visibility="{Binding IsVisibility_BtnSearch}" />
  503. </StackPanel>
  504. <xctk:BusyIndicator
  505. BusyContent="{x:Static resources:Client_Resource.Content_GetBusy}"
  506. IsBusy="{Binding IsBusyWR,
  507. Mode=TwoWay}">
  508. <dataGrid:MuchinfoDataGrid
  509. Margin="0"
  510. EnableRowVirtualization="False"
  511. ItemsSource="{Binding WrPairDetailsListEx}"
  512. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  513. SelectedItem="{Binding CurrentSelectedWhRecieptEx,
  514. UpdateSourceTrigger=PropertyChanged}"
  515. Style="{DynamicResource AccountMuchinfoDataGridStyleXS}" >
  516. <DataGrid.Resources>
  517. <local:BindingProxy x:Key="proxy" Data="{Binding}"></local:BindingProxy>
  518. </DataGrid.Resources>
  519. <DataGrid.Columns>
  520. <!-- 选择CheckBox -->
  521. <DataGridTemplateColumn Width="Auto"
  522. MinWidth="50"
  523. Header="{x:Static resources:Client_Resource.Delivery_Choice}">
  524. <DataGridTemplateColumn.CellTemplate>
  525. <DataTemplate>
  526. <StackPanel HorizontalAlignment="Center"
  527. VerticalAlignment="Center"
  528. Orientation="Horizontal">
  529. <CheckBox x:Name="cbXh"
  530. VerticalAlignment="Center"
  531. IsChecked="{Binding IsSelected,
  532. Mode=TwoWay,
  533. UpdateSourceTrigger=PropertyChanged}"
  534. Style="{DynamicResource mtpCheckBoxStyle}">
  535. <i:Interaction.Triggers>
  536. <i:EventTrigger EventName="Checked">
  537. <i:InvokeCommandAction Command="{Binding DataContext.SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding}" />
  538. </i:EventTrigger>
  539. <i:EventTrigger EventName="Unchecked">
  540. <i:InvokeCommandAction Command="{Binding DataContext.UnSelectCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding}" />
  541. </i:EventTrigger>
  542. </i:Interaction.Triggers>
  543. </CheckBox>
  544. </StackPanel>
  545. </DataTemplate>
  546. </DataGridTemplateColumn.CellTemplate>
  547. </DataGridTemplateColumn>
  548. <!-- 存储仓库 -->
  549. <DataGridTextColumn Width="Auto"
  550. MinWidth="100"
  551. Binding="{Binding WarehouseName}"
  552. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  553. Header="{x:Static resources:Client_Resource.Content_Warehouse}"
  554. SortMemberPath="StorePlace" Visibility="{Binding Data.IsVisibility_WareHouse,Source={StaticResource proxy}}" />
  555. <!-- 品牌 -->
  556. <DataGridTextColumn Width="Auto"
  557. MinWidth="70"
  558. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  559. Header="{x:Static resources:Client_Resource.Moduel_Brand}"
  560. SortMemberPath="Brand" Visibility="{Binding Data.IsVisibility_Brand,Source={StaticResource proxy}}" Binding="{Binding BrandName}" />
  561. <!-- 等级-品质 -->
  562. <DataGridTextColumn Width="Auto"
  563. MinWidth="60"
  564. Binding="{Binding QualityName}"
  565. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  566. Header="{x:Static resources:Client_Resource.Moduel_Level}"
  567. SortMemberPath="Rank" Visibility="{Binding Data.IsVisibility_Quality,Source={StaticResource proxy}}" />
  568. <DataGridTextColumn Width="Auto"
  569. MinWidth="60"
  570. Binding="{Binding SpecName}"
  571. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  572. Header="{x:Static resources:Client_Resource.Moduel_Spec}"
  573. SortMemberPath="Rank" Visibility="{Binding Data.IsVisibility_Spec,Source={StaticResource proxy}}" />
  574. <!-- 升贴水 -->
  575. <DataGridTextColumn Width="Auto"
  576. MinWidth="50"
  577. Binding="{Binding PriceMove}"
  578. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  579. Header="{x:Static resources:Client_Resource.Moduel_PriceMove}"
  580. SortMemberPath="DeliveryPriceMoveDisplay" />
  581. <DataGridTextColumn Width="Auto"
  582. MinWidth="50"
  583. Binding="{Binding WRUserName}"
  584. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  585. Header="{x:Static resources:Client_Resource.HOLDERNAME}" />
  586. <!-- 数量 -->
  587. <DataGridTextColumn Width="Auto"
  588. MinWidth="80"
  589. Binding="{Binding RestQty}"
  590. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  591. Header="{x:Static resources:Client_Resource.Content_LotNum}"
  592. SortMemberPath="EnableQty" />
  593. <!-- 选择数量 -->
  594. <DataGridTemplateColumn Width="250"
  595. Header="{x:Static resources:Client_Resource.Delivery_ChoiceNum}">
  596. <DataGridTemplateColumn.CellTemplate>
  597. <DataTemplate>
  598. <StackPanel HorizontalAlignment="Left"
  599. VerticalAlignment="Center"
  600. Orientation="Horizontal">
  601. <Border Margin="2">
  602. <TextBlock>
  603. <Run Text="{Binding Data.StandardQty, Mode=OneWay,Source={StaticResource proxy}}" />
  604. <Run Text=" * " />
  605. </TextBlock>
  606. </Border>
  607. <Border Margin="2"
  608. BorderBrush="Red"
  609. BorderThickness="{Binding IsError}">
  610. <controls:DecimalNumBox x:Name="SelectQty"
  611. Width="80"
  612. Increment="{Binding DataContext.MinMultiple,ElementName=NDeliveryOrderViewWindow}"
  613. DecimalCount="2"
  614. IsEnabled="{Binding IsEnable}"
  615. KeyDown="SelectQty_KeyDown"
  616. Maximum="{Binding MaximunQty}"
  617. Text="{Binding SelectQty,
  618. UpdateSourceTrigger=PropertyChanged}"
  619. Watermark="请输入">
  620. <i:Interaction.Triggers>
  621. <i:EventTrigger EventName="ValueChanged">
  622. <i:InvokeCommandAction Command="{Binding DataContext.SelectQtyTextChangedCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding}" />
  623. </i:EventTrigger>
  624. </i:Interaction.Triggers>
  625. </controls:DecimalNumBox>
  626. </Border>
  627. <Border Margin="2">
  628. <TextBlock>
  629. <Run Text=" = " />
  630. <Run Text="{Binding SelectedQty, Mode=OneWay}" />
  631. </TextBlock>
  632. </Border>
  633. </StackPanel>
  634. </DataTemplate>
  635. </DataGridTemplateColumn.CellTemplate>
  636. </DataGridTemplateColumn>
  637. </DataGrid.Columns>
  638. </dataGrid:MuchinfoDataGrid>
  639. </xctk:BusyIndicator>
  640. </StackPanel>
  641. </Grid>
  642. </StackPanel>
  643. <StackPanel Grid.Row="1"
  644. Margin="0,5"
  645. HorizontalAlignment="Center"
  646. VerticalAlignment="Center">
  647. <TextBlock HorizontalAlignment="Left"
  648. VerticalAlignment="Center"
  649. Foreground="{DynamicResource TextBrush_Common}">
  650. <Run Text="{Binding ShowErrorInfo}" />
  651. </TextBlock>
  652. </StackPanel>
  653. <StackPanel Grid.Row="2"
  654. Margin="0,5"
  655. HorizontalAlignment="Center"
  656. VerticalAlignment="Center"
  657. Orientation="Horizontal">
  658. <Button Width="82"
  659. Height="26"
  660. Command="{Binding OKCommand}"
  661. CommandParameter="{Binding ElementName=NDeliveryOrderViewWindow}"
  662. Content="{x:Static resources:Client_Resource.Button_Confirm}"
  663. IsEnabled="{Binding OKButtonEnabled}"
  664. Style="{DynamicResource CommonButtonStyle}"
  665. TabIndex="6" />
  666. <Button Width="82"
  667. Height="26"
  668. Margin="60,0,0,0"
  669. Command="{Binding CancelCommand}"
  670. CommandParameter="{Binding ElementName=NDeliveryOrderViewWindow}"
  671. Content="{x:Static resources:Client_Resource.Button_Cancel}"
  672. Style="{DynamicResource CommonButtonStyle}"
  673. TabIndex="7" />
  674. </StackPanel>
  675. </Grid>
  676. </xctk:BusyIndicator>
  677. </Window>