终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

517 lines
24 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.MorkCL.View.AddRawMaterialView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MorkCL.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
  10. Name="物料参数"
  11. mc:Ignorable="d">
  12. <UserControl.DataContext>
  13. <vm:AddRawMaterialViewModel />
  14. </UserControl.DataContext>
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="1*" />
  25. <RowDefinition Height="1*" />
  26. </Grid.RowDefinitions>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="1.3*" />
  29. <ColumnDefinition Width="1*" />
  30. </Grid.ColumnDefinitions>
  31. <!--#region 辅料-->
  32. <pry:ImageBorder Margin="15" />
  33. <Grid Margin="20">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="50" />
  36. <RowDefinition Height="40" />
  37. <RowDefinition Height="1*" />
  38. </Grid.RowDefinitions>
  39. <DockPanel LastChildFill="False">
  40. <TextBlock
  41. Margin="20,0"
  42. HorizontalAlignment="Center"
  43. Text="辅料参数设置" />
  44. <Button
  45. Margin="30,0"
  46. Command="{Binding AddMaterialCommand}"
  47. CommandParameter="辅料"
  48. Content="新增辅料数据"
  49. DockPanel.Dock="Right" />
  50. </DockPanel>
  51. <!--#region 表格标题栏设置-->
  52. <Grid
  53. Grid.Row="1"
  54. Margin="0,10,0,0"
  55. Background="#ff0C255F">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Width="330" />
  58. <ColumnDefinition />
  59. <ColumnDefinition />
  60. <ColumnDefinition Width="80" />
  61. <ColumnDefinition Width="80" />
  62. </Grid.ColumnDefinitions>
  63. <TextBlock
  64. Grid.Column="0"
  65. Style="{StaticResource TitleTextblockStyle}"
  66. Text="ID" />
  67. <Grid Grid.Column="1">
  68. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
  69. <Border
  70. BorderBrush="{StaticResource bordColor}"
  71. BorderThickness="1,0,1,0"
  72. Cursor="SizeWE" />
  73. </Grid>
  74. <TextBlock
  75. Grid.Column="2"
  76. Style="{StaticResource TitleTextblockStyle}"
  77. Text="位置" />
  78. <Grid Grid.Column="3">
  79. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
  80. <Border
  81. BorderBrush="{StaticResource bordColor}"
  82. BorderThickness="1,0,1,0"
  83. Cursor="SizeWE" />
  84. </Grid>
  85. <Grid Grid.Column="4">
  86. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
  87. <Border
  88. BorderBrush="{StaticResource bordColor}"
  89. BorderThickness="1,0,1,0"
  90. Cursor="SizeWE" />
  91. </Grid>
  92. <Border
  93. Grid.ColumnSpan="10"
  94. BorderBrush="{StaticResource bordColor}"
  95. BorderThickness="1,0,1,0" />
  96. </Grid>
  97. <!--#endregion-->
  98. <!--#region 表格数据显示设置-->
  99. <Grid Grid.Row="2">
  100. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  101. <ItemsControl ItemsSource="{Binding Accessories}">
  102. <ItemsControl.ItemTemplate>
  103. <DataTemplate>
  104. <Grid Name="gr" Height="30">
  105. <Grid.ColumnDefinitions>
  106. <ColumnDefinition Width="330" />
  107. <ColumnDefinition />
  108. <ColumnDefinition />
  109. <ColumnDefinition Width="80" />
  110. <ColumnDefinition Width="80" />
  111. </Grid.ColumnDefinitions>
  112. <TextBox
  113. Grid.Column="0"
  114. IsReadOnly="True"
  115. Style="{StaticResource DataShowTextBoxStyle}"
  116. Text="{Binding Id}"
  117. TextAlignment="Center" />
  118. <Grid Grid.Column="1">
  119. <TextBox
  120. MinWidth="150"
  121. IsReadOnly="True"
  122. Style="{StaticResource DataShowTextBoxStyle}"
  123. Text="{Binding Name}"
  124. TextAlignment="Center" />
  125. <Border
  126. BorderBrush="{StaticResource bordColor}"
  127. BorderThickness="1,0,1,0"
  128. Cursor="SizeWE" />
  129. </Grid>
  130. <TextBox
  131. Grid.Column="2"
  132. Height="30"
  133. MinWidth="150"
  134. IsReadOnly="True"
  135. Style="{StaticResource DataShowTextBoxStyle}"
  136. Text="{Binding Loc}"
  137. TextAlignment="Center" />
  138. <Grid Grid.Column="3">
  139. <Button
  140. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  141. CommandParameter="{Binding}"
  142. Content="编辑"
  143. FontSize="16"
  144. Style="{StaticResource IssueRecipeButtonStyle}" />
  145. <Border
  146. BorderBrush="{StaticResource bordColor}"
  147. BorderThickness="1,0,1,0"
  148. Cursor="SizeWE" />
  149. </Grid>
  150. <Grid Grid.Column="4">
  151. <Button
  152. Command="{Binding DataContext.RemoveAccessoryCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  153. CommandParameter="{Binding Id}"
  154. Content="删除"
  155. FontSize="16"
  156. Style="{StaticResource ControlButtonStyle}" />
  157. <Border
  158. BorderBrush="{StaticResource bordColor}"
  159. BorderThickness="1,0,1,0"
  160. Cursor="SizeWE" />
  161. </Grid>
  162. <Border
  163. Grid.ColumnSpan="10"
  164. BorderBrush="{StaticResource bordColor}"
  165. BorderThickness="1,0,1,1" />
  166. </Grid>
  167. <DataTemplate.Triggers>
  168. <Trigger Property="IsMouseOver" Value="true">
  169. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  170. </Trigger>
  171. </DataTemplate.Triggers>
  172. </DataTemplate>
  173. </ItemsControl.ItemTemplate>
  174. </ItemsControl>
  175. </ScrollViewer>
  176. </Grid>
  177. <!--#endregion-->
  178. </Grid>
  179. <!--#endregion-->
  180. <!--#region 调料-->
  181. <pry:ImageBorder Grid.Row="1" Margin="15" />
  182. <Grid Grid.Row="1" Margin="20">
  183. <Grid.RowDefinitions>
  184. <RowDefinition Height="50" />
  185. <RowDefinition Height="40" />
  186. <RowDefinition Height="1*" />
  187. </Grid.RowDefinitions>
  188. <DockPanel LastChildFill="False">
  189. <TextBlock
  190. Margin="20,0"
  191. HorizontalAlignment="Center"
  192. Text="调料参数设置" />
  193. <Button
  194. Margin="30,0"
  195. Command="{Binding AddMaterialCommand}"
  196. CommandParameter="调料"
  197. Content="新增调料数据"
  198. DockPanel.Dock="Right" />
  199. </DockPanel>
  200. <!--#region 表格标题栏设置-->
  201. <Grid
  202. Grid.Row="1"
  203. Margin="0,10,0,0"
  204. Background="#ff0C255F">
  205. <Grid.ColumnDefinitions>
  206. <ColumnDefinition Width="330" />
  207. <ColumnDefinition />
  208. <ColumnDefinition />
  209. <ColumnDefinition Width="80" />
  210. <ColumnDefinition Width="80" />
  211. </Grid.ColumnDefinitions>
  212. <TextBlock
  213. Grid.Column="0"
  214. Style="{StaticResource TitleTextblockStyle}"
  215. Text="ID" />
  216. <Grid Grid.Column="1">
  217. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
  218. <Border
  219. BorderBrush="{StaticResource bordColor}"
  220. BorderThickness="1,0,1,0"
  221. Cursor="SizeWE" />
  222. </Grid>
  223. <TextBlock
  224. Grid.Column="2"
  225. Style="{StaticResource TitleTextblockStyle}"
  226. Text="位置" />
  227. <Grid Grid.Column="3">
  228. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
  229. <Border
  230. BorderBrush="{StaticResource bordColor}"
  231. BorderThickness="1,0,1,0"
  232. Cursor="SizeWE" />
  233. </Grid>
  234. <Grid Grid.Column="4">
  235. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
  236. <Border
  237. BorderBrush="{StaticResource bordColor}"
  238. BorderThickness="1,0,1,0"
  239. Cursor="SizeWE" />
  240. </Grid>
  241. <Border
  242. Grid.ColumnSpan="10"
  243. BorderBrush="{StaticResource bordColor}"
  244. BorderThickness="1,0,1,0" />
  245. </Grid>
  246. <!--#endregion-->
  247. <!--#region 表格数据显示设置-->
  248. <Grid Grid.Row="2">
  249. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  250. <ItemsControl ItemsSource="{Binding Seasonings}">
  251. <ItemsControl.ItemTemplate>
  252. <DataTemplate>
  253. <Grid Name="gr" Height="30">
  254. <Grid.ColumnDefinitions>
  255. <ColumnDefinition Width="330" />
  256. <ColumnDefinition />
  257. <ColumnDefinition />
  258. <ColumnDefinition Width="80" />
  259. <ColumnDefinition Width="80" />
  260. </Grid.ColumnDefinitions>
  261. <TextBox
  262. Grid.Column="0"
  263. IsReadOnly="True"
  264. Style="{StaticResource DataShowTextBoxStyle}"
  265. Text="{Binding Id}"
  266. TextAlignment="Center" />
  267. <Grid Grid.Column="1">
  268. <TextBox
  269. MinWidth="150"
  270. IsReadOnly="True"
  271. Style="{StaticResource DataShowTextBoxStyle}"
  272. Text="{Binding Name}"
  273. TextAlignment="Center" />
  274. <Border
  275. BorderBrush="{StaticResource bordColor}"
  276. BorderThickness="1,0,1,0"
  277. Cursor="SizeWE" />
  278. </Grid>
  279. <TextBox
  280. Grid.Column="2"
  281. Height="30"
  282. MinWidth="150"
  283. IsReadOnly="True"
  284. Style="{StaticResource DataShowTextBoxStyle}"
  285. Text="{Binding Loc}"
  286. TextAlignment="Center" />
  287. <Grid Grid.Column="3">
  288. <Button
  289. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  290. CommandParameter="{Binding}"
  291. Content="编辑"
  292. FontSize="16"
  293. Style="{StaticResource IssueRecipeButtonStyle}" />
  294. <Border
  295. BorderBrush="{StaticResource bordColor}"
  296. BorderThickness="1,0,1,0"
  297. Cursor="SizeWE" />
  298. </Grid>
  299. <Grid Grid.Column="4">
  300. <Button
  301. Command="{Binding DataContext.RemoveSeasoningCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  302. CommandParameter="{Binding Id}"
  303. Content="删除"
  304. FontSize="16"
  305. Style="{StaticResource ControlButtonStyle}" />
  306. <Border
  307. BorderBrush="{StaticResource bordColor}"
  308. BorderThickness="1,0,1,0"
  309. Cursor="SizeWE" />
  310. </Grid>
  311. <Border
  312. Grid.ColumnSpan="10"
  313. BorderBrush="{StaticResource bordColor}"
  314. BorderThickness="1,0,1,1" />
  315. </Grid>
  316. <DataTemplate.Triggers>
  317. <Trigger Property="IsMouseOver" Value="true">
  318. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  319. </Trigger>
  320. </DataTemplate.Triggers>
  321. </DataTemplate>
  322. </ItemsControl.ItemTemplate>
  323. </ItemsControl>
  324. </ScrollViewer>
  325. </Grid>
  326. <!--#endregion-->
  327. </Grid>
  328. <!--#endregion-->
  329. <!--#region 原料-->
  330. <pry:ImageBorder
  331. Grid.RowSpan="2"
  332. Grid.Column="1"
  333. Margin="15" />
  334. <Grid
  335. Grid.RowSpan="2"
  336. Grid.Column="1"
  337. Margin="20">
  338. <Grid.RowDefinitions>
  339. <RowDefinition Height="50" />
  340. <RowDefinition Height="40" />
  341. <RowDefinition Height="1*" />
  342. </Grid.RowDefinitions>
  343. <DockPanel LastChildFill="False">
  344. <TextBlock
  345. Margin="20,0"
  346. HorizontalAlignment="Center"
  347. Text="主料参数设置" />
  348. <Button
  349. Margin="30,0"
  350. Command="{Binding AddMaterialCommand}"
  351. CommandParameter="主料"
  352. Content="新增主料数据"
  353. DockPanel.Dock="Right" />
  354. </DockPanel>
  355. <!--#region 表格标题栏设置-->
  356. <Grid
  357. Grid.Row="1"
  358. Margin="0,10,0,0"
  359. Background="#ff0C255F">
  360. <Grid.ColumnDefinitions>
  361. <ColumnDefinition Width="330" />
  362. <ColumnDefinition />
  363. <ColumnDefinition Width="80" />
  364. <ColumnDefinition Width="80" />
  365. </Grid.ColumnDefinitions>
  366. <TextBlock
  367. Grid.Column="0"
  368. Style="{StaticResource TitleTextblockStyle}"
  369. Text="ID" />
  370. <Grid Grid.Column="1">
  371. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
  372. <Border
  373. BorderBrush="{StaticResource bordColor}"
  374. BorderThickness="1,0,1,0"
  375. Cursor="SizeWE" />
  376. </Grid>
  377. <Grid Grid.Column="2">
  378. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
  379. <Border
  380. BorderBrush="{StaticResource bordColor}"
  381. BorderThickness="1,0,1,0"
  382. Cursor="SizeWE" />
  383. </Grid>
  384. <Grid Grid.Column="3">
  385. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
  386. <Border
  387. BorderBrush="{StaticResource bordColor}"
  388. BorderThickness="1,0,1,0"
  389. Cursor="SizeWE" />
  390. </Grid>
  391. <Border
  392. Grid.ColumnSpan="10"
  393. BorderBrush="{StaticResource bordColor}"
  394. BorderThickness="1,0,1,0" />
  395. </Grid>
  396. <!--#endregion-->
  397. <!--#region 表格数据显示设置-->
  398. <Grid Grid.Row="2">
  399. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  400. <ItemsControl ItemsSource="{Binding Ingredients}">
  401. <ItemsControl.ItemTemplate>
  402. <DataTemplate>
  403. <Grid Name="gr" Height="30">
  404. <Grid.ColumnDefinitions>
  405. <ColumnDefinition Width="330" />
  406. <ColumnDefinition />
  407. <ColumnDefinition Width="80" />
  408. <ColumnDefinition Width="80" />
  409. </Grid.ColumnDefinitions>
  410. <TextBox
  411. Grid.Column="0"
  412. IsReadOnly="True"
  413. Style="{StaticResource DataShowTextBoxStyle}"
  414. Text="{Binding Id}"
  415. TextAlignment="Center" />
  416. <Grid Grid.Column="1">
  417. <TextBox
  418. MinWidth="100"
  419. IsReadOnly="True"
  420. Style="{StaticResource DataShowTextBoxStyle}"
  421. Text="{Binding Name}"
  422. TextAlignment="Center" />
  423. <Border
  424. BorderBrush="{StaticResource bordColor}"
  425. BorderThickness="1,0,1,0"
  426. Cursor="SizeWE" />
  427. </Grid>
  428. <Grid Grid.Column="2">
  429. <Button
  430. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  431. CommandParameter="{Binding}"
  432. Content="编辑"
  433. FontSize="16"
  434. Style="{StaticResource IssueRecipeButtonStyle}" />
  435. <Border
  436. BorderBrush="{StaticResource bordColor}"
  437. BorderThickness="1,0,1,0"
  438. Cursor="SizeWE" />
  439. </Grid>
  440. <Grid Grid.Column="3">
  441. <Button
  442. Command="{Binding DataContext.RemoveIngreditentCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  443. CommandParameter="{Binding Id}"
  444. Content="删除"
  445. FontSize="16"
  446. Style="{StaticResource ControlButtonStyle}" />
  447. <Border
  448. BorderBrush="{StaticResource bordColor}"
  449. BorderThickness="1,0,1,0"
  450. Cursor="SizeWE" />
  451. </Grid>
  452. <Border
  453. Grid.ColumnSpan="10"
  454. BorderBrush="{StaticResource bordColor}"
  455. BorderThickness="1,0,1,1" />
  456. </Grid>
  457. <DataTemplate.Triggers>
  458. <Trigger Property="IsMouseOver" Value="true">
  459. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  460. </Trigger>
  461. </DataTemplate.Triggers>
  462. </DataTemplate>
  463. </ItemsControl.ItemTemplate>
  464. </ItemsControl>
  465. </ScrollViewer>
  466. </Grid>
  467. <!--#endregion-->
  468. </Grid>
  469. <!--#endregion-->
  470. </Grid>
  471. </UserControl>