You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
3.1 KiB
C#
132 lines
3.1 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace Aucma.Core.BoxFoaming.ViewModels
|
|
{
|
|
public partial class RealTimeInventoryPageViewModel : ObservableObject
|
|
{
|
|
public RealTimeInventoryPageViewModel()
|
|
{
|
|
LoadMedth();
|
|
|
|
Thread thread = new Thread(() =>
|
|
{
|
|
|
|
});
|
|
|
|
thread.Start();
|
|
}
|
|
|
|
private void LoadMedth()
|
|
{
|
|
for (int i = 6; i >= 1; i--)
|
|
{
|
|
Shapes.Add(new SpaceDto()
|
|
{
|
|
spaceCode = i + "#",
|
|
spaceStock = i,
|
|
onTheWay = i,
|
|
totalAmount = i + i,
|
|
materialType = "",
|
|
inStoreFlag = 1,
|
|
outStoreFlag = 2,
|
|
unusualFlag = 2,
|
|
isFlag = 1,
|
|
onlyOne = 1,
|
|
spaceType = 1
|
|
});
|
|
}
|
|
}
|
|
|
|
#region 初始化
|
|
private ObservableCollection<SpaceDto> _space = new ObservableCollection<SpaceDto>();
|
|
public ObservableCollection<SpaceDto> Shapes
|
|
{
|
|
get { return _space; }
|
|
set
|
|
{
|
|
_space = value;
|
|
OnPropertyChanged();//属性通知
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
[RelayCommand]
|
|
private void Update(object obj)
|
|
{
|
|
string info = obj as string;
|
|
MessageBox.Show("编号:" + info);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 货道信息
|
|
/// </summary>
|
|
public class SpaceDto
|
|
{
|
|
|
|
/// <summary>
|
|
/// 货道编号
|
|
/// </summary>
|
|
public string spaceCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// 在库数量
|
|
/// </summary>
|
|
public int spaceStock { get; set; }
|
|
|
|
/// <summary>
|
|
/// 货道类型
|
|
/// </summary>
|
|
public int spaceType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 在途数量
|
|
/// </summary>
|
|
public int onTheWay { get; set; }
|
|
|
|
/// <summary>
|
|
/// 合计数量
|
|
/// </summary>
|
|
public int totalAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 物料型号
|
|
/// </summary>
|
|
public string materialType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 入库状态
|
|
/// </summary>
|
|
public int inStoreFlag { get; set; }
|
|
|
|
/// <summary>
|
|
/// 出库状态
|
|
/// </summary>
|
|
public int outStoreFlag { get; set; }
|
|
|
|
/// <summary>
|
|
/// 异常状态
|
|
/// </summary>
|
|
public int unusualFlag { get; set; }
|
|
|
|
/// <summary>
|
|
/// 禁用状态
|
|
/// </summary>
|
|
public int isFlag { get; set; }
|
|
|
|
/// <summary>
|
|
/// 出一个
|
|
/// </summary>
|
|
public int onlyOne { get; set; }
|
|
|
|
}
|
|
}
|