浏览代码

原料名称修改

master
pry 1年前
父节点
当前提交
4aae58c745
共有 1 个文件被更改,包括 0 次插入63 次删除
  1. +0
    -63
      BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs

+ 0
- 63
BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs 查看文件

@@ -23,38 +23,6 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
//ActionManage.GetInstance.CancelRegister("LocalRecipeEdit");

//ActionManage.GetInstance.Register(new Action<object>((o) =>
//{
// if (o is NewRemoteRecipeModel nrr)
// {
// var res1 = AllRawMaterial.FirstOrDefault(p => p.Equals(nrr));
// if (res1 != null)
// {
// if (res1.RawMaterialType == "小料")
// {
// var res = Json<DevicePar>.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == res1.RawMaterialLocation);
// if (res != null && !string.IsNullOrEmpty(res.RawMaterialName))
// {
// var temp = Json<DevicePar>.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<DevicePar>.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == res1.RawMaterialLocation);
// if (res != null)
// {
// res1.RawMaterialName = res.RawMaterialName;
// }
// }
// }
// }

//}), "ChangeNotify", true);

ActionManage.GetInstance.Register(new Action<object>((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<DevicePar>.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<DevicePar>.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == item.RawMaterialLocation);
// if (res != null && !string.IsNullOrEmpty(res.RawMaterialName))
// {
// var temp = Json<DevicePar>.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<DevicePar>.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == item.RawMaterialLocation);
// if (res != null)
// {
// item.RawMaterialName = res.RawMaterialName;
// }
//}


AllRawMaterial.Add(item);
}
foreach (var item1 in rm.WindSend)


正在加载...
取消
保存