Browse Source

shangchaun

一拖四味魔方配料系统
lyw 9 months ago
parent
commit
df4363e7a3
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      DosingSystem/ExcuteControl .cs

+ 13
- 8
DosingSystem/ExcuteControl .cs View File

@@ -631,14 +631,15 @@ namespace BPASmartClient.DosingSystem
{
App.Current.Dispatcher.Invoke(() =>
{
RecipeModel recipe = recipeProcesses?.ToList().Find(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum));
if (recipe.RecipStatus != "制作完成")

RecipeModel recipe = recipeProcesses?.ToList().Find(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum-1));
if (recipe!=null&& recipe.RecipStatus != "制作完成")
{
/*Json<OnRecipe>.Data.Recipes.RemoveAt(recipeProcesses.ToList().FindIndex(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum)));
Json<OnRecipe>.Save();*/
recipe.RecipStatus = "制作完成";
UserTreeCompelete.Insert(0, recipe);
recipeProcesses.RemoveAt(recipeProcesses.ToList().FindIndex(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum)));
recipeProcesses.RemoveAt(recipeProcesses.ToList().FindIndex(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum-1)));
}
});
}
@@ -675,11 +676,15 @@ namespace BPASmartClient.DosingSystem
App.Current.Dispatcher.Invoke(() =>
{
RecipeModel recipe = UserTreeWait?.ToList().Find(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum-1));
recipe.RecipStatus = "正在配料";
recipeProcesses.Insert(0, recipe);
/* Json<OnRecipe>.Data.Recipes.Insert(0, recipe);
Json<OnRecipe>.Save();*/
UserTreeWait.RemoveAt(UserTreeWait.ToList().FindIndex(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum-1)));
if (recipe!=null)
{
recipe.RecipStatus = "正在配料";
recipeProcesses.Insert(0, recipe);
/* Json<OnRecipe>.Data.Recipes.Insert(0, recipe);
Json<OnRecipe>.Save();*/
UserTreeWait.RemoveAt(UserTreeWait.ToList().FindIndex(a => a.RecipeName == RecipeNames.ElementAt(recipeNameNum - 1)));
}
});
}
}


Loading…
Cancel
Save