|
|
|
@ -3,6 +3,7 @@ using Admin.Core.Model.Model_New;
|
|
|
|
|
using Admin.Core.Service;
|
|
|
|
|
using Aucma.Core.OldBoxFoam;
|
|
|
|
|
using Aucma.Core.OldBoxFoam.Models;
|
|
|
|
|
using Aucma.Core.OldBoxFoam.Views;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
|
|
@ -15,7 +16,7 @@ using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -25,13 +26,30 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
protected IOldBoxFoamTypeServices? _boxFoamTypeServices;
|
|
|
|
|
public RoadKindPageViewModel()
|
|
|
|
|
{
|
|
|
|
|
// 设置型号
|
|
|
|
|
SubmitCommand = new RelayCommand<string>(obj => SubmitCommandExecute(obj));
|
|
|
|
|
_boxFoamPlanServices = App.ServiceProvider.GetService<IBoxFoamPlanServices>();
|
|
|
|
|
_boxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
|
|
|
|
|
SelectTypeViewModel.RefreshPageEvent += InitData;
|
|
|
|
|
InitData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public RelayCommand<string> SubmitCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
private void SubmitCommandExecute(string spaceCode)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
SelectType type = new SelectType(spaceCode);
|
|
|
|
|
type.ShowDialog();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void InitData()
|
|
|
|
|
{
|
|
|
|
|
Shapes.Clear();
|
|
|
|
|
List<OldBoxFoamType> list = await _boxFoamTypeServices.QueryAsync();
|
|
|
|
|
if (list == null) return;
|
|
|
|
|
foreach(OldBoxFoamType item in list)
|
|
|
|
|