终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

61 рядки
2.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPA.Helper;
  7. using System.Collections.Concurrent;
  8. using System.Collections.ObjectModel;
  9. using System.Windows;
  10. using BPA.Helper;
  11. using BPASmartClient.JXJFoodSmallStation.Model;
  12. using BPASmartClient.JXJFoodSmallStation.View;
  13. using BPASmartClient.CustomResource.UserControls;
  14. using BPASmartClient.CustomResource.UserControls.Model;
  15. using BPASmartClient.CustomResource.UserControls.Enum;
  16. using System.Windows.Media;
  17. using BPASmartClient.CustomResource.UserControls.MessageShow;
  18. using BPASmartClient.CustomResource.Pages.Model;
  19. using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
  20. using BPASmartClient.JXJFoodSmallStation.Model.GVL;
  21. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  22. {
  23. public class SiemensRecipeReceiveViewModel : NotifyBase
  24. {
  25. //ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
  26. public SiemensRecipeReceiveViewModel()
  27. {
  28. RemoteRecipes = Json<RemoteRecipeDataColl>.Data.RemoteRecipes;
  29. DetailsCommand = new BPARelayCommand<object>((o) =>
  30. {
  31. if (o != null && o is string cnt)
  32. {
  33. ActionManage.GetInstance.Send("CloseRecipeInfosView");
  34. RecipeInfosView nrv = new RecipeInfosView();
  35. var res = Json<RemoteRecipeDataColl>.Data.RemoteRecipes.FirstOrDefault(p => p.RecipeCode == cnt);
  36. if (res != null)
  37. {
  38. ActionManage.GetInstance.Send("RecipeInfo", res);
  39. nrv.Show();
  40. MessageNotify.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}");
  41. }
  42. }
  43. });
  44. ClearAllRecipe = new BPARelayCommand(() =>
  45. {
  46. if (MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有配方订单?"))
  47. {
  48. Json<RemoteRecipeDataColl>.Data.RemoteRecipes.Clear();
  49. MessageNotify.GetInstance.ShowUserLog($"手动清除所有配方。");
  50. }
  51. });
  52. }
  53. public BPARelayCommand<object> DetailsCommand { get; set; }
  54. public BPARelayCommand ClearAllRecipe { get; set; }
  55. public ObservableCollection<RecipeData> RemoteRecipes { get; set; }
  56. }
  57. }