|
|
|
@ -8,6 +8,8 @@ using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Aucma.Core.Palletiz.Views;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using static Aucma.Core.Palletiz.ViewModels.StatisticsPageViewModel;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* 成品分垛入库首页信息
|
|
|
|
@ -24,6 +26,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
|
|
|
|
|
new InStoreBusiness().Init();
|
|
|
|
|
SelectTypeViewModel.RefreshPageEvent += Init;
|
|
|
|
|
StatisticsPageViewModel.CountInstoreEvent += CountInstore;
|
|
|
|
|
this.inStoreBusiness = App.ServiceProvider.GetService<InStoreBusiness>();
|
|
|
|
|
InStoreBusiness.RefreshMsgEvent += RefreshMsg;
|
|
|
|
|
InStoreBusiness.RefreshProductInfoEvent += RefreshProductInfo;
|
|
|
|
@ -31,7 +34,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"{obj};设置");
|
|
|
|
|
BaseSpaceInfo space = inStoreBusiness.GetSpaceinfosById(obj);
|
|
|
|
|
if(space != null )
|
|
|
|
|
if (space != null)
|
|
|
|
|
{
|
|
|
|
|
SelectType direct = new SelectType(space);
|
|
|
|
|
direct.ShowDialog();
|
|
|
|
@ -41,10 +44,16 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Init();
|
|
|
|
|
InStoreAmount = inStoreAmount + "19";
|
|
|
|
|
|
|
|
|
|
InStoreTaskContent = new StatisticsPageView();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CountInstore(int count)
|
|
|
|
|
{
|
|
|
|
|
InStoreAmount = "入库数量:";
|
|
|
|
|
InStoreAmount = inStoreAmount + count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 参数定义
|
|
|
|
|
|
|
|
|
|
public string productSNCode = string.Empty;
|
|
|
|
@ -160,9 +169,10 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
OrderCode = orderCode;
|
|
|
|
|
ProductScanTime = DateTime.Now.ToString();
|
|
|
|
|
}
|
|
|
|
|
private void Init()
|
|
|
|
|
private async Task Init()
|
|
|
|
|
{
|
|
|
|
|
await Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var info = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
info = info.OrderByDescending(x => x.ObjId).ToList();
|
|
|
|
|
if (info != null)
|
|
|
|
@ -181,25 +191,33 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var info2 = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
info2 = info2.OrderBy(x => x.ObjId).ToList();
|
|
|
|
|
if (info2 != null)
|
|
|
|
|
{
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
|
if (spaceItemsB.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
spaceItemsB.Clear();
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in info2)
|
|
|
|
|
{
|
|
|
|
|
spaceItemsB.Add(item);
|
|
|
|
|
}
|
|
|
|
|
AreaB_SpaceInfo = spaceItemsB;
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var info2 = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
//info2 = info2.OrderBy(x => x.ObjId).ToList();
|
|
|
|
|
//if (info2 != null)
|
|
|
|
|
//{
|
|
|
|
|
// App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
|
// {
|
|
|
|
|
// if (spaceItemsB.Count > 0)
|
|
|
|
|
// {
|
|
|
|
|
// spaceItemsB.Clear();
|
|
|
|
|
// }
|
|
|
|
|
// foreach (var item in info2)
|
|
|
|
|
// {
|
|
|
|
|
// spaceItemsB.Add(item);
|
|
|
|
|
// }
|
|
|
|
|
// AreaB_SpaceInfo = spaceItemsB;
|
|
|
|
|
// }));
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|