diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs index 6536e92c..939a5a9e 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs @@ -23,38 +23,6 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel { //ActionManage.GetInstance.CancelRegister("LocalRecipeEdit"); - //ActionManage.GetInstance.Register(new Action((o) => - //{ - // if (o is NewRemoteRecipeModel nrr) - // { - // var res1 = AllRawMaterial.FirstOrDefault(p => p.Equals(nrr)); - // if (res1 != null) - // { - // if (res1.RawMaterialType == "小料") - // { - // var res = Json.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == res1.RawMaterialLocation); - // if (res != null && !string.IsNullOrEmpty(res.RawMaterialName)) - // { - // var temp = Json.Data.BomMaterial.FirstOrDefault(p => p.MaterialCode == res.RawMaterialName); - // if (temp != null && !string.IsNullOrEmpty(temp.MaterialName)) - // { - // res1.RawMaterialName = temp.MaterialName; - // } - // } - // } - // else if (res1.RawMaterialType == "粉料") - // { - // var res = Json.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == res1.RawMaterialLocation); - // if (res != null) - // { - // res1.RawMaterialName = res.RawMaterialName; - // } - // } - // } - // } - - //}), "ChangeNotify", true); - ActionManage.GetInstance.Register(new Action((o) => { if (o != null && o is RemoteRecipeData rm) @@ -64,15 +32,6 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel TrayNum = rm.TrayCode; foreach (var item in rm.RawMaterial) { - //AllRawMaterial.Add(new RemoteRecipeRawMaterial() - //{ - // RawMaterialType = item.RawMaterialType, - // RawMaterialName = item.RawMaterialName, - // RawMaterialWeight = item.RawMaterialWeight, - // RawMaterialLocation = item.RawMaterialLocation, - // RawMaterialBarrelNum = item.RawMaterialBarrelNum, - //}); - var res = Json.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == item.RawMaterialLocation); if (res != null && !string.IsNullOrEmpty(res.RawMaterialName)) { @@ -82,28 +41,6 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel item.RawMaterialName = temp.MaterialName; } } - //if (item.RawMaterialType == "小料") - //{ - // var res = Json.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == item.RawMaterialLocation); - // if (res != null && !string.IsNullOrEmpty(res.RawMaterialName)) - // { - // var temp = Json.Data.BomMaterial.FirstOrDefault(p => p.MaterialCode == res.RawMaterialName); - // if (temp != null && !string.IsNullOrEmpty(temp.MaterialName)) - // { - // item.RawMaterialName = temp.MaterialName; - // } - // } - //} - //else if (item.RawMaterialType == "粉料") - //{ - // var res = Json.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == item.RawMaterialLocation); - // if (res != null) - // { - // item.RawMaterialName = res.RawMaterialName; - // } - //} - - AllRawMaterial.Add(item); } foreach (var item1 in rm.WindSend)