|
|
@@ -37,8 +37,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel |
|
|
|
VisibilityBtn1 = Visibility.Hidden; |
|
|
|
VisibilityBtn2 = Visibility.Visible; |
|
|
|
VisibilityBtn3 = Visibility.Hidden; |
|
|
|
GVL_SmallStation.GetInstance.ManualIssueRecipe = false; |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,AGV送托盘完成"); |
|
|
|
}); |
|
|
|
}, () => CanManualGetTray()); |
|
|
|
Test2Command = new RelayCommand(() => |
|
|
|
{ |
|
|
|
ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX4.0", PlcVarType = PlcVarType.Bool, Value = true }); |
|
|
@@ -147,12 +148,16 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel |
|
|
|
//MessageNotify.GetInstance.ShowUserLog($"手动点击按钮,清除所有手动配料完成信号"); |
|
|
|
//NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"清除所有手动配料完成信号"); |
|
|
|
}); |
|
|
|
CancelRecipeCommand = new RelayCommand(() => { |
|
|
|
CancelRecipeCommand = new RelayCommand(() => |
|
|
|
{ |
|
|
|
string cancelRecipeCode = CancelRecipeCode.Trim(); |
|
|
|
if (!String.IsNullOrEmpty(cancelRecipeCode) &&MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) { |
|
|
|
if (Json<RemoteRecipeDataColl>.Data.Recipes != null) { |
|
|
|
if (!String.IsNullOrEmpty(cancelRecipeCode) && MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) |
|
|
|
{ |
|
|
|
if (Json<RemoteRecipeDataColl>.Data.Recipes != null) |
|
|
|
{ |
|
|
|
int index = Array.FindIndex(Json<RemoteRecipeDataColl>.Data.Recipes.ToArray(), p => p.RecipeCode == cancelRecipeCode); |
|
|
|
if (index >= 0) { |
|
|
|
if (index >= 0) |
|
|
|
{ |
|
|
|
GVL_SmallStation.GetInstance.Order_Cancel = true; |
|
|
|
GVL_SmallStation.GetInstance.Order_CancelRecipeCode = cancelRecipeCode; |
|
|
|
MessageNotify.GetInstance.ShowUserLog($"手动删除订单【{cancelRecipeCode}】。"); |
|
|
@@ -163,10 +168,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
CompletedNumResetCommand = new RelayCommand(() => { |
|
|
|
if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?",DialogType.Warning)) |
|
|
|
CompletedNumResetCommand = new RelayCommand(() => |
|
|
|
{ |
|
|
|
if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?", DialogType.Warning)) |
|
|
|
{ |
|
|
|
GVL_SmallStation.GetInstance.RecipeDosingCompleNum = 0; |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", "配方完成数目清零成功!"); |
|
|
@@ -368,5 +374,15 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel |
|
|
|
public string _CancelRecipeCode { get; set; } |
|
|
|
|
|
|
|
private static Visibility _VisibilityBtn3 = Visibility.Hidden; |
|
|
|
|
|
|
|
//延迟10s后才可以执行手动点击送托盘完成操作。 |
|
|
|
private bool CanManualGetTray() |
|
|
|
{ |
|
|
|
if (Delay.GetInstance("CanManualGetTray").Start(GVL_SmallStation.GetInstance.ManualIssueRecipe,10)) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |