TakaDeliveryGoodsApplyView.xaml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <Window x:Class="Muchinfo.MTPClient.Delivery.Views.TakaDeliveryGoodsApplyView"
  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: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. x:Name="TakaDeliveryGoodsApplyWindow"
  13. Title="{Binding Title}"
  14. Width="820"
  15. MouseLeftButtonDown="drag_MouseLeftButtonDown"
  16. ShowInTaskbar="False"
  17. SizeToContent="Height"
  18. Style="{DynamicResource DialogWindowStyle}"
  19. WindowStartupLocation="CenterOwner"
  20. mc:Ignorable="d ignore">
  21. <Window.Resources>
  22. <converters:WRStatusToIsEnabledConvert x:Key="wrStatusToIsEnabledConvert" />
  23. <converters:BuyOrSellConvert x:Key="EnumBooleanConvert" />
  24. <DataTemplate x:Key="WarehouseComboBoxItemTemplate">
  25. <TextBlock>
  26. <Run Text="{Binding WareHouseName}" />
  27. </TextBlock>
  28. </DataTemplate>
  29. </Window.Resources>
  30. <xctk:BusyIndicator BusyContent="{x:Static resource:Client_Resource.Content_UpdateBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  31. <Grid>
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="10" />
  34. <RowDefinition Height="40" />
  35. <RowDefinition MaxHeight="150" />
  36. <RowDefinition />
  37. <RowDefinition />
  38. <RowDefinition Height="50" />
  39. <RowDefinition Height="10" />
  40. </Grid.RowDefinitions>
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="20" />
  43. <ColumnDefinition />
  44. <ColumnDefinition />
  45. <ColumnDefinition />
  46. <ColumnDefinition Width="20" />
  47. </Grid.ColumnDefinitions>
  48. <!-- 存储仓库 -->
  49. <StackPanel Grid.Row="1"
  50. Grid.Column="1"
  51. Grid.ColumnSpan="2"
  52. Orientation="Horizontal">
  53. <TextBlock HorizontalAlignment="Left"
  54. VerticalAlignment="Center"
  55. Text="{x:Static resource:Client_Resource.Content_Storage}" />
  56. <ComboBox Width="165"
  57. HorizontalAlignment="Left"
  58. VerticalAlignment="Center"
  59. DisplayMemberPath="WareHouseName"
  60. ItemsSource="{Binding WarehouseList}"
  61. SelectedItem="{Binding CurrentWarehouse,
  62. Mode=TwoWay}"
  63. Style="{DynamicResource SimpleComboBoxStyle}">
  64. <i:Interaction.Triggers>
  65. <i:EventTrigger EventName="SelectionChanged">
  66. <i:InvokeCommandAction Command="{Binding WarehouseSelectionChangedCommand}" />
  67. </i:EventTrigger>
  68. </i:Interaction.Triggers>
  69. </ComboBox>
  70. <!--<TextBlock HorizontalAlignment="Left"
  71. VerticalAlignment="Center">
  72. <Run Text=" " />
  73. <Run Foreground="{StaticResource TextBrush_Common}" Text="{x:Static resource:Client_Resource.TakaDeliveryGoodsApplyView_OnlyCanTakeSameDeliveryGoods}" />
  74. </TextBlock>-->
  75. </StackPanel>
  76. <dataGrid:MuchinfoDataGrid Grid.Row="2"
  77. Grid.Column="1"
  78. Grid.ColumnSpan="3"
  79. ItemsSource="{Binding AllTakaDeliveryGoodsOrderList}"
  80. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  81. ScrollViewer.VerticalScrollBarVisibility="Auto"
  82. Style="{DynamicResource AccountMuchinfoDataGridStyle}">
  83. <DataGrid.Columns>
  84. <!-- 选择CheckBox -->
  85. <DataGridTemplateColumn Width="Auto"
  86. MinWidth="50"
  87. Header="{x:Static resource:Client_Resource.Delivery_Choice}">
  88. <DataGridTemplateColumn.CellTemplate>
  89. <DataTemplate>
  90. <StackPanel HorizontalAlignment="Center"
  91. VerticalAlignment="Center"
  92. Orientation="Horizontal">
  93. <CheckBox x:Name="cbXh"
  94. VerticalAlignment="Center"
  95. IsEnabled="{Binding IsEnabled,
  96. Mode=TwoWay,
  97. UpdateSourceTrigger=PropertyChanged}"
  98. IsChecked="{Binding IsSelected,
  99. Mode=TwoWay,
  100. UpdateSourceTrigger=PropertyChanged}"
  101. Style="{DynamicResource mtpCheckBoxStyle}"
  102. Visibility="{Binding CanTakeGoods}">
  103. <i:Interaction.Triggers>
  104. <i:EventTrigger EventName="Checked">
  105. <i:InvokeCommandAction Command="{Binding DataContext.SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh}" />
  106. </i:EventTrigger>
  107. <i:EventTrigger EventName="Unchecked">
  108. <i:InvokeCommandAction Command="{Binding DataContext.UnSelectCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding IsChecked, ElementName=cbXh}" />
  109. </i:EventTrigger>
  110. </i:Interaction.Triggers>
  111. </CheckBox>
  112. <!-- <Label Content="{Binding Xh}" FontSize="14"/> -->
  113. </StackPanel>
  114. </DataTemplate>
  115. </DataGridTemplateColumn.CellTemplate>
  116. </DataGridTemplateColumn>
  117. <!-- 仓单号 -->
  118. <DataGridTextColumn Width="Auto"
  119. MinWidth="80"
  120. Binding="{Binding WRCode}"
  121. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  122. Header="{x:Static resource:Client_Resource.DeliveryWarehouse_WRCode}" />
  123. <!--
  124. 仓单类型
  125. <DataGridTextColumn Width="Auto"
  126. MinWidth="50"
  127. Binding="{Binding WRTypeDisplay}"
  128. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  129. Header="{x:Static resource:Client_Resource.Delivery_WRType}" />
  130. -->
  131. <!-- 仓单商品 -->
  132. <DataGridTextColumn Width="Auto"
  133. MinWidth="100"
  134. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  135. Header="{x:Static resource:Client_Resource.DeliveryOrderView_DeliveryGoods}">
  136. <DataGridTextColumn.Binding>
  137. <MultiBinding StringFormat="{}{0}/{1}">
  138. <Binding Path="DeliveryGoodsCode" />
  139. <Binding Path="DeliveryGoodsName" />
  140. </MultiBinding>
  141. </DataGridTextColumn.Binding>
  142. </DataGridTextColumn>
  143. <!-- 存储仓库NEW -->
  144. <DataGridTextColumn Width="Auto"
  145. MinWidth="80"
  146. Binding="{Binding WareHouseName}"
  147. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  148. Header="{x:Static resource:Client_Resource.DeliveryWarehouse_WareHouseId}" />
  149. <!-- 品质 -->
  150. <DataGridTextColumn Width="Auto"
  151. MinWidth="50"
  152. Binding="{Binding Rank}"
  153. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  154. Header="{x:Static resource:Client_Resource.Moduel_Level}" />
  155. <!-- 品牌 -->
  156. <DataGridTextColumn Width="Auto"
  157. MinWidth="50"
  158. Binding="{Binding Brand}"
  159. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  160. Header="{x:Static resource:Client_Resource.Moduel_Brand}" />
  161. <!-- 单位 -->
  162. <DataGridTextColumn Width="Auto"
  163. MinWidth="50"
  164. Binding="{Binding GoodsUnitIdDisplay}"
  165. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  166. Header="{x:Static resource:Client_Resource.Moduel_Unit}" />
  167. <!-- 规格 -->
  168. <DataGridTextColumn Width="Auto"
  169. MinWidth="50"
  170. Binding="{Binding Spec}"
  171. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  172. Header="{x:Static resource:Client_Resource.Moduel_Spec}" />
  173. <!-- 可用数量 GAI -->
  174. <DataGridTextColumn Width="Auto"
  175. MinWidth="50"
  176. Binding="{Binding AvlQty}"
  177. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  178. Header="{x:Static resource:Client_Resource.Content_Quantifiable}" />
  179. <!--
  180. 冻结数量
  181. <DataGridTextColumn Width="Auto"
  182. MinWidth="100"
  183. Binding="{Binding FreezeQty}"
  184. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  185. Header="{x:Static resource:Client_Resource.Content_FreezingNumber}" />
  186. -->
  187. <!--
  188. 兑付数量
  189. <DataGridTextColumn Width="Auto"
  190. MinWidth="100"
  191. Binding="{Binding PayQty}"
  192. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  193. Header="{x:Static resource:Client_Resource.Content_PayNumber}" />
  194. -->
  195. <!--
  196. 库位
  197. <DataGridTextColumn Width="Auto"
  198. MinWidth="100"
  199. Binding="{Binding StorePlace}"
  200. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  201. Header="{x:Static resource:Client_Resource.Moduel_StorePlace}" />
  202. -->
  203. <!--
  204. 货值金额
  205. <DataGridTextColumn Width="Auto"
  206. MinWidth="80"
  207. Binding="{Binding StoreAmount}"
  208. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  209. Header="{x:Static resource:Client_Resource.Delivery_StoreAmount}" />
  210. -->
  211. <!--
  212. 仓储费
  213. <DataGridTextColumn Width="Auto"
  214. MinWidth="80"
  215. Binding="{Binding StoreCharge}"
  216. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  217. Header="{x:Static resource:Client_Resource.Delivery_StoreCharge}" />
  218. -->
  219. <!--
  220. 仓储起始时间
  221. <DataGridTextColumn Width="Auto"
  222. MinWidth="140"
  223. Binding="{Binding StoreStartDisplay,
  224. StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"
  225. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  226. Header="{x:Static resource:Client_Resource.Delivery_StoreStart}" />
  227. -->
  228. <!--
  229. 仓储结束时间
  230. <DataGridTextColumn Width="Auto"
  231. MinWidth="140"
  232. Binding="{Binding StoreEndDisplay,
  233. StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"
  234. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  235. Header="{x:Static resource:Client_Resource.Delivery_StoreEnd}" />
  236. -->
  237. <!-- 状态 ZHENGCANG -->
  238. <DataGridTextColumn Width="Auto"
  239. MinWidth="140"
  240. Binding="{Binding StatusDisplay}"
  241. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  242. Header="{x:Static resource:Client_Resource.Content_State}" />
  243. </DataGrid.Columns>
  244. </dataGrid:MuchinfoDataGrid>
  245. <StackPanel Grid.Row="4"
  246. Grid.Column="1"
  247. Grid.ColumnSpan="3"
  248. Margin="0,15">
  249. <!-- N模式交割收货信息填写 -->
  250. <StackPanel Grid.Row="10"
  251. Grid.ColumnSpan="5"
  252. Margin="0,20,0,10"
  253. Orientation="Horizontal">
  254. <TextBlock VerticalAlignment="Center" Text="{x:Static resource:Client_Resource.NDeliveryOrderView_BelowIsGetGoodsPersonInfoTips}" />
  255. <RadioButton Margin="20,0"
  256. VerticalAlignment="Center"
  257. Content="{x:Static resource:Client_Resource.Delivery_TakeGoods_Self}"
  258. IsChecked="{Binding TakeGoodsWay,
  259. ConverterParameter=1,
  260. Converter={StaticResource EnumBooleanConvert}}"
  261. Style="{DynamicResource RadioButtonStyle}"
  262. TabIndex="6" />
  263. <RadioButton x:Name="expressRadio"
  264. Margin="20,0"
  265. VerticalAlignment="Center"
  266. Content="{x:Static resource:Client_Resource.Delivery_TakeGoods_Express}"
  267. IsChecked="{Binding TakeGoodsWay,
  268. ConverterParameter=2,
  269. Converter={StaticResource EnumBooleanConvert}}"
  270. Style="{DynamicResource RadioButtonStyle}"
  271. TabIndex="5" />
  272. </StackPanel>
  273. <Grid>
  274. <Grid.ColumnDefinitions>
  275. <ColumnDefinition Width="110" />
  276. <ColumnDefinition Width="49" />
  277. <ColumnDefinition Width="61" />
  278. <ColumnDefinition Width="Auto" />
  279. <ColumnDefinition />
  280. </Grid.ColumnDefinitions>
  281. <Grid.RowDefinitions>
  282. <RowDefinition />
  283. <RowDefinition />
  284. </Grid.RowDefinitions>
  285. <Border Grid.ColumnSpan="5"
  286. BorderBrush="{DynamicResource BorderBrush_Common}"
  287. BorderThickness="1" />
  288. <Border Margin="10,0,0,2"
  289. BorderBrush="{DynamicResource BorderBrush_Common}"
  290. BorderThickness="0,0,1,0">
  291. <!-- 收货人 title -->
  292. <TextBlock Width="100"
  293. Style="{DynamicResource TextBlockCommon}"
  294. Text="{x:Static resource:Client_Resource.Content_Consignee}" />
  295. </Border>
  296. <Border Grid.Column="1"
  297. Grid.ColumnSpan="2"
  298. BorderBrush="{DynamicResource BorderBrush_Common}"
  299. BorderThickness="0,0,1,0">
  300. <!-- 联系电话 title -->
  301. <TextBlock Width="100"
  302. Style="{DynamicResource TextBlockCommon}"
  303. Text="{x:Static resource:Client_Resource.TakaDeliveryGoodsApplyViewModel_PhoneNum}" />
  304. </Border>
  305. <Border Grid.Column="3"
  306. BorderBrush="{DynamicResource BorderBrush_Common}"
  307. BorderThickness="0,0,1,0">
  308. <!-- 身份证号 title -->
  309. <TextBlock Width="145"
  310. Style="{DynamicResource TextBlockCommon}"
  311. Text="{x:Static resource:Client_Resource.Content_IDCardNum}" />
  312. </Border>
  313. <!-- 收货地址 title -->
  314. <TextBlock Grid.Column="4"
  315. Style="{DynamicResource TextBlockCommon}"
  316. Text="{x:Static resource:Client_Resource.TakaDeliveryGoodsApplyViewModel_RecieveAddress}"
  317. Visibility="{Binding IsChecked,
  318. ElementName=expressRadio,
  319. Converter={StaticResource BooleanToVisibilityConverter}}" />
  320. <Border Grid.Row="1"
  321. Grid.ColumnSpan="5"
  322. Margin="0,0,0,0.687"
  323. BorderBrush="{DynamicResource BorderBrush_Common}"
  324. BorderThickness="1,0,1,1" />
  325. <!-- 收货人-content -->
  326. <TextBox Grid.Row="1"
  327. Width="100"
  328. Margin="0,1,0,1.687"
  329. HorizontalAlignment="Left"
  330. VerticalAlignment="Center"
  331. HorizontalContentAlignment="Left"
  332. IsEnabled="True"
  333. MaxLength="20"
  334. Style="{DynamicResource RectangleTextBox}"
  335. TabIndex="3"
  336. Text="{Binding RecievePerson}"
  337. TextAlignment="Left" />
  338. <!-- 联系电话 content -->
  339. <TextBox Grid.Row="1"
  340. Grid.Column="1"
  341. Grid.ColumnSpan="2"
  342. Width="100"
  343. Margin="5,1,5,1.687"
  344. VerticalAlignment="Center"
  345. HorizontalContentAlignment="Left"
  346. IsEnabled="True"
  347. MaxLength="11"
  348. Style="{DynamicResource RectangleTextBox}"
  349. TabIndex="4"
  350. Text="{Binding PhoneNum}"
  351. TextAlignment="Left" />
  352. <TextBox Grid.Row="1"
  353. Grid.Column="3"
  354. Width="145"
  355. Margin="0,0,10,2.687"
  356. VerticalAlignment="Center"
  357. HorizontalContentAlignment="Left"
  358. IsEnabled="True"
  359. Style="{DynamicResource RectangleTextBox}"
  360. TabIndex="4"
  361. Text="{Binding IdCardNum}"
  362. TextAlignment="Left" />
  363. <!-- 收货地址 content -->
  364. <TextBox Grid.Row="1"
  365. Grid.Column="4"
  366. MinWidth="240"
  367. Margin="0,2,0,0.687"
  368. VerticalAlignment="Center"
  369. HorizontalContentAlignment="Left"
  370. IsEnabled="True"
  371. MaxLength="128"
  372. Style="{DynamicResource RectangleTextBox}"
  373. TabIndex="5"
  374. Text="{Binding RecieveAddress}"
  375. TextAlignment="Left"
  376. Visibility="{Binding IsChecked,
  377. ElementName=expressRadio,
  378. Converter={StaticResource BooleanToVisibilityConverter}}" />
  379. </Grid>
  380. <!--
  381. <Grid>
  382. <Grid.RowDefinitions>
  383. <RowDefinition />
  384. <RowDefinition />
  385. <RowDefinition />
  386. </Grid.RowDefinitions>
  387. <Grid.ColumnDefinitions>
  388. <ColumnDefinition Width="80" />
  389. <ColumnDefinition />
  390. <ColumnDefinition />
  391. <ColumnDefinition />
  392. <ColumnDefinition />
  393. <ColumnDefinition />
  394. </Grid.ColumnDefinitions>
  395. <TextBlock Grid.Row="0"
  396. Grid.Column="0"
  397. Margin="0,20,0,5"
  398. HorizontalAlignment="Right"
  399. Text="{x:Static resource:Client_Resource.Text_Consignee}" />
  400. <TextBox Grid.Row="0"
  401. MaxLength="20"
  402. Grid.Column="1"
  403. Margin="0,20,0,5"
  404. Text="{Binding RecievePerson}" />
  405. <TextBlock Grid.Row="0"
  406. Grid.Column="2"
  407. Grid.ColumnSpan="1"
  408. Margin="5,10,0,0"
  409. HorizontalAlignment="Left"
  410. VerticalAlignment="Center"
  411. Foreground="{StaticResource TextBrush_Common}"
  412. Text="*" />
  413. <TextBlock Grid.Row="1"
  414. Grid.Column="0"
  415. Margin="0,10,0,5"
  416. HorizontalAlignment="Right"
  417. Text="{x:Static resource:Client_Resource.MessageBoxSend_ContactInformation}" />
  418. <TextBox Grid.Row="1"
  419. MaxLength="11"
  420. Grid.Column="1"
  421. Margin="0,10,0,5"
  422. Text="{Binding PhoneNum}" />
  423. <TextBlock Grid.Row="1"
  424. Grid.Column="2"
  425. Grid.ColumnSpan="1"
  426. Margin="5,5,0,0"
  427. HorizontalAlignment="Left"
  428. VerticalAlignment="Center"
  429. Foreground="{StaticResource TextBrush_Common}"
  430. Text="*" />
  431. <TextBlock Grid.Row="2"
  432. Grid.Column="0"
  433. Margin="0,10,0,5"
  434. HorizontalAlignment="Right"
  435. Text="{x:Static resource:Client_Resource.Text_Address}" />
  436. <TextBox Grid.Row="2"
  437. Grid.Column="1"
  438. MaxLength="128"
  439. Grid.ColumnSpan="3"
  440. Margin="0,10,0,5"
  441. Text="{Binding RecieveAddress}" />
  442. <TextBlock Grid.Row="2"
  443. Grid.Column="4"
  444. Grid.ColumnSpan="1"
  445. Margin="5,5,0,0"
  446. HorizontalAlignment="Left"
  447. VerticalAlignment="Center"
  448. Foreground="{StaticResource TextBrush_Common}"
  449. Text="*" />
  450. </Grid>
  451. -->
  452. </StackPanel>
  453. <!-- 提交按钮 -->
  454. <StackPanel Grid.Row="5"
  455. Grid.ColumnSpan="4"
  456. HorizontalAlignment="Center"
  457. VerticalAlignment="Center"
  458. Orientation="Horizontal">
  459. <Button Width="82"
  460. Height="26"
  461. Command="{Binding OKCommand}"
  462. CommandParameter="{Binding ElementName=TakaDeliveryGoodsApplyWindow}"
  463. Content="{x:Static resource:Client_Resource.Button_Submit}"
  464. IsEnabled="{Binding OKButtonEnabled}"
  465. Style="{DynamicResource CommonButtonStyle}" />
  466. <Button Width="82"
  467. Height="26"
  468. Margin="60,0,0,0"
  469. Command="{Binding CancelCommand}"
  470. CommandParameter="{Binding ElementName=TakaDeliveryGoodsApplyWindow}"
  471. Content="{x:Static resource:Client_Resource.Button_Cancel}"
  472. Style="{DynamicResource CommonButtonStyle}" />
  473. </StackPanel>
  474. </Grid>
  475. </xctk:BusyIndicator>
  476. </Window>