|
|
|
@ -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,20 +34,26 @@ 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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Init();
|
|
|
|
|
InStoreAmount = inStoreAmount + "19";
|
|
|
|
|
|
|
|
|
|
InStoreTaskContent = new StatisticsPageView();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CountInstore(int count)
|
|
|
|
|
{
|
|
|
|
|
InStoreAmount = "入库数量:";
|
|
|
|
|
InStoreAmount = inStoreAmount + count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 参数定义
|
|
|
|
|
|
|
|
|
|
public string productSNCode = string.Empty;
|
|
|
|
@ -55,12 +64,12 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string productModel = string.Empty;
|
|
|
|
|
public string productModel = string.Empty;
|
|
|
|
|
public string ProductModel
|
|
|
|
|
{
|
|
|
|
|
get { return this.productModel; }
|
|
|
|
|
set => SetProperty(ref productModel, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string orderCode = string.Empty;
|
|
|
|
@ -69,7 +78,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
get { return this.orderCode; }
|
|
|
|
|
set => SetProperty(ref orderCode, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string productScanTime = string.Empty;
|
|
|
|
@ -77,7 +86,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
get { return this.productScanTime; }
|
|
|
|
|
|
|
|
|
|
set => SetProperty(ref productScanTime, value);
|
|
|
|
|
set => SetProperty(ref productScanTime, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string msg = string.Empty;
|
|
|
|
@ -85,7 +94,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
get { return this.msg; }
|
|
|
|
|
set => SetProperty(ref msg, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public string inStoreAmount = "入库数量:";
|
|
|
|
|
public string InStoreAmount
|
|
|
|
@ -93,7 +102,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
get { return this.inStoreAmount; }
|
|
|
|
|
set => SetProperty(ref inStoreAmount, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public System.Windows.Controls.UserControl _content;
|
|
|
|
@ -104,7 +113,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
set => SetProperty(ref _content, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -116,7 +125,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
get { return _areaA_SpaceInfo; }
|
|
|
|
|
set => SetProperty(ref _areaA_SpaceInfo, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -128,7 +137,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
get { return _areaB_SpaceInfo; }
|
|
|
|
|
set => SetProperty(ref _areaB_SpaceInfo, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -160,46 +169,55 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
OrderCode = orderCode;
|
|
|
|
|
ProductScanTime = DateTime.Now.ToString();
|
|
|
|
|
}
|
|
|
|
|
private void Init()
|
|
|
|
|
private async Task Init()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var info = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
info = info.OrderByDescending(x => x.ObjId).ToList();
|
|
|
|
|
if (info != null)
|
|
|
|
|
await Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
|
var info = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
info = info.OrderByDescending(x => x.ObjId).ToList();
|
|
|
|
|
if (info != null)
|
|
|
|
|
{
|
|
|
|
|
if (spaceItems.Count > 0)
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
|
spaceItems.Clear();
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in info)
|
|
|
|
|
if (spaceItems.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
spaceItems.Clear();
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in info)
|
|
|
|
|
{
|
|
|
|
|
spaceItems.Add(item);
|
|
|
|
|
}
|
|
|
|
|
AreaA_SpaceInfo = spaceItems;
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var info2 = inStoreBusiness.GetBaseSpaceinfos("A");
|
|
|
|
|
info2 = info2.OrderBy(x => x.ObjId).ToList();
|
|
|
|
|
if (info2 != null)
|
|
|
|
|
{
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
|
spaceItems.Add(item);
|
|
|
|
|
}
|
|
|
|
|
AreaA_SpaceInfo = spaceItems;
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//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;
|
|
|
|
|
// }));
|
|
|
|
|
//}
|
|
|
|
|
if (spaceItemsB.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
spaceItemsB.Clear();
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in info2)
|
|
|
|
|
{
|
|
|
|
|
spaceItemsB.Add(item);
|
|
|
|
|
}
|
|
|
|
|
AreaB_SpaceInfo = spaceItemsB;
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|