|
|
|
|
using Admin.Core.IService;
|
|
|
|
|
using Admin.Core.Model.Model_New;
|
|
|
|
|
using Admin.Core.Service;
|
|
|
|
|
using Aucma.Core.OldBoxFoam.Models;
|
|
|
|
|
using Aucma.Core.OldBoxFoam.Views;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 发泡计划
|
|
|
|
|
*
|
|
|
|
|
* */
|
|
|
|
|
public partial class RealRoadPageViewModel : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
protected readonly IBoxFoamPlanServices? _boxFoamPlanServices;
|
|
|
|
|
private IOldBoxFoamTypeServices? _oldBoxFoamTypeServices;
|
|
|
|
|
public RealRoadPageViewModel()
|
|
|
|
|
{
|
|
|
|
|
_boxFoamPlanServices = App.ServiceProvider.GetService<IBoxFoamPlanServices>();
|
|
|
|
|
_oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
|
|
|
|
|
InitData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void InitData()
|
|
|
|
|
{
|
|
|
|
|
List<OldBoxFoamType> list = await _oldBoxFoamTypeServices.QueryAsync();
|
|
|
|
|
foreach (OldBoxFoamType item in list)
|
|
|
|
|
{
|
|
|
|
|
ListItems.Add(new OldBoxFoamTypeModel()
|
|
|
|
|
{
|
|
|
|
|
ObjId = item.ObjId,
|
|
|
|
|
Local = item.Local,
|
|
|
|
|
Status = "1",
|
|
|
|
|
Storeamount = item.Storeamount,
|
|
|
|
|
MaterialCode = item.MaterialCode,
|
|
|
|
|
MaterialName=item.MaterialName,
|
|
|
|
|
Boxtype = item.Boxtype,
|
|
|
|
|
|
|
|
|
|
}); ;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 初始化datagrid
|
|
|
|
|
private ObservableCollection<OldBoxFoamTypeModel> listItems = new ObservableCollection<OldBoxFoamTypeModel>();
|
|
|
|
|
public ObservableCollection<OldBoxFoamTypeModel> ListItems
|
|
|
|
|
{
|
|
|
|
|
get { return listItems; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
listItems = value;
|
|
|
|
|
OnPropertyChanged();//属性通知
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 型号统计柱状图X轴日期
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 型号统计柱状图X轴日期
|
|
|
|
|
/// </summary>
|
|
|
|
|
private List<string> materialNameList;
|
|
|
|
|
|
|
|
|
|
public List<string> MaterialNameList
|
|
|
|
|
{
|
|
|
|
|
get { return materialNameList; }
|
|
|
|
|
set { materialNameList = value; }
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|