|
|
|
@ -4,6 +4,7 @@ using Admin.Core.Model;
|
|
|
|
|
using Admin.Core.Model.Model_New;
|
|
|
|
|
using Admin.Core.Service;
|
|
|
|
|
using Aucma.Core.OldBoxFoam;
|
|
|
|
|
using Aucma.Core.OldBoxFoam.Views;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using log4net;
|
|
|
|
@ -41,6 +42,9 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
public RelayCommand QueryCommand { get; set; }
|
|
|
|
|
public RelayCommand deleteCommand { get; set; }
|
|
|
|
|
public RelayCommand SaveCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
public RelayCommand SetPlanInfoCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
private string storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");//泡前库code
|
|
|
|
|
|
|
|
|
|
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BaseSpaceInfoServices));
|
|
|
|
@ -59,7 +63,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public SelectTypeViewModel(string spaceCode)
|
|
|
|
|
public SelectTypeViewModel(string spaceCode,string boxType)
|
|
|
|
|
{
|
|
|
|
|
//_baseSpaceInfoServices = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
|
|
|
|
|
_oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
|
|
|
|
@ -67,16 +71,22 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
QueryCommand = new RelayCommand(searchData);
|
|
|
|
|
SaveCommand = new RelayCommand(updateDirection);
|
|
|
|
|
deleteCommand = new RelayCommand(deleteModel);
|
|
|
|
|
SetPlanInfoCommand = new RelayCommand(SetPlanInfo);
|
|
|
|
|
spaceCodes = spaceCode;
|
|
|
|
|
this.SearchText = boxType;
|
|
|
|
|
MouseClickCommand = new RelayCommand<object>(MouseClick);
|
|
|
|
|
materialDataGrid = new ObservableCollection<BaseMaterialInfo>();
|
|
|
|
|
Console.WriteLine(spaceCode);
|
|
|
|
|
Load();
|
|
|
|
|
Load(boxType);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public async void Load()
|
|
|
|
|
public async void Load(string boxType)
|
|
|
|
|
{
|
|
|
|
|
var infos = await _baseMaterialInfoServices.QueryAsync(x => x.MaterialSubclass == "200");
|
|
|
|
|
if (!string.IsNullOrEmpty(boxType))
|
|
|
|
|
{
|
|
|
|
|
infos = infos.Where(x=>x.MaterialName.Contains(boxType)).ToList();
|
|
|
|
|
}
|
|
|
|
|
MaterialDataGrid.Clear();
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
@ -262,8 +272,29 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Load();
|
|
|
|
|
Load("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 维护计划
|
|
|
|
|
/// </summary>
|
|
|
|
|
private async void SetPlanInfo()
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(spaceCodes))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请至少选择一个型号!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(PlanInfo.MaterialCode))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请至少选择一个型号!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SplitPlanView splitPlanView = new SplitPlanView("1", 1,PlanInfo.MaterialCode);
|
|
|
|
|
splitPlanView.ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|