|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using GalaSoft.MvvmLight;
|
|
|
|
|
using GalaSoft.MvvmLight.Command;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using SlnMesnac.Business;
|
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
@ -46,6 +47,10 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
_palletStowBusiness = App.ServiceProvider.GetService<PalletStowBusiness>();
|
|
|
|
|
_prodCompletionBusiness = App.ServiceProvider.GetService<ProdCompletionBusiness>();
|
|
|
|
|
|
|
|
|
|
DeletePalletCommand = new RelayCommand<string>(DeletePallet);
|
|
|
|
|
|
|
|
|
|
DeleteBarCodeCommand = new RelayCommand<string> (DeleteBarCode);
|
|
|
|
|
|
|
|
|
|
var palletTask = App.ServiceProvider.GetService<List<RealPalletTask>>();
|
|
|
|
|
|
|
|
|
|
RefreshPalletTaskDataGrid(palletTask);
|
|
|
|
@ -84,6 +89,14 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 事件定义
|
|
|
|
|
|
|
|
|
|
public RelayCommand<string> DeletePalletCommand { get;set; }
|
|
|
|
|
|
|
|
|
|
public RelayCommand<string> DeleteBarCodeCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新托盘队列信息
|
|
|
|
|
/// </summary>
|
|
|
|
@ -109,5 +122,23 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
BarCodeTaskDataGrid.Add(task);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 移除托盘队列信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="palletCode"></param>
|
|
|
|
|
private void DeletePallet(string palletCode)
|
|
|
|
|
{
|
|
|
|
|
_palletStowBusiness.RemovePalletInfo(palletCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 移除小包条码队列信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="barCode"></param>
|
|
|
|
|
private void DeleteBarCode(string barCode)
|
|
|
|
|
{
|
|
|
|
|
_prodCompletionBusiness.RemoveBarCode(barCode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|