修改分垛入库部分内容

dev
liulb@mesnac.com 1 year ago
parent 5b58d8ca10
commit 24535b11e6

@ -84,9 +84,6 @@
<Compile Update="Views\PalletizPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\QuantityIssuedView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\SearchCriteriaView.xaml.cs">
<SubType>Code</SubType>
</Compile>

@ -19,9 +19,6 @@
<Page Update="Views\MainWindow.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\QuantityIssuedView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\SearchCriteriaView.xaml">
<SubType>Designer</SubType>
</Page>

@ -1,207 +0,0 @@
using Admin.Core.Common;
using Admin.Core.IService;
using Admin.Core.Model;
using Aucma.Core.Palletiz.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Aucma.Core.Palletiz.ViewModels
{
public partial class QuantityIssuedViewModel : ObservableObject
{
#region 刷新创建计划
/// <summary>
/// 刷新创建计划
/// </summary>
public delegate Task RefreshCretaePlanInfo();
public static event RefreshCretaePlanInfo RefreshCretaePlanInfoEvent;
#endregion
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(QuantityIssuedViewModel));
private IBaseBomInfoServices _bomInfoServices;
private IBaseSpaceDetailServices _spaceDetailServices;
protected readonly IExecutePlanInfoServices? _executePlanInfoServices;
protected readonly IProductPlanInfoServices? _productPlanInfoServices;
#region 构造函数
public QuantityIssuedViewModel(ProductPlanInfoModel productPlanInfo)
{
_bomInfoServices = App.ServiceProvider.GetService<IBaseBomInfoServices>();
_spaceDetailServices = App.ServiceProvider.GetService<IBaseSpaceDetailServices>();
_executePlanInfoServices = App.ServiceProvider.GetService<IExecutePlanInfoServices>();
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
PlanInfo = productPlanInfo;
}
#endregion
#region 属性
private ProductPlanInfoModel _PlanInfo = new ProductPlanInfoModel();
public ProductPlanInfoModel PlanInfo
{
get => _PlanInfo;
set => SetProperty(ref _PlanInfo, value);
}
private string _TransmitAmount = string.Empty;
public string TransmitAmount
{
get => _TransmitAmount;
set => SetProperty(ref _TransmitAmount, value);
}
#endregion
#region 下传计划
/// <summary>
/// 下传计划,前后板联动计划创建两条分别为前后板计划
/// </summary>
[RelayCommand]
private async Task PlanInfoTransmit()
{
if (string.IsNullOrEmpty(TransmitAmount))
{
MessageBox.Show("计划数量不能为空!", "系统提醒");
return;
}
if (PlanInfo.PlanAmount<=Convert.ToInt32(TransmitAmount))
{
MessageBox.Show("下发数量不能大于计划数量!", "系统提醒");
return;
}
//根据传入的订单号查询 前后板完成清理,如果数量超出给出提醒
var productPlanInfo = _PlanInfo;
if (productPlanInfo != null)
{
//下传到PLC
string stationCode = Appsettings.app("StationInfo", "StationCode");
var list = await _executePlanInfoServices.QueryAsync(d => d.ProductLineCode.Equals(stationCode));
ExecutePlanInfo task = new ExecutePlanInfo();
task.ExecutePlanCode = Guid.NewGuid().ToString();
task.ProductPlanCode = PlanInfo.PlanCode;
task.OrderCode = PlanInfo.OrderCode;
task.ProductLineCode = stationCode;//计划工位
task.TaskCode = GetMaxNum(PlanInfo.PlanCode);// DateTime.Now.ToString("yyMMddHHmmss");
task.MaterialCode = PlanInfo.MaterialCode;
task.MaterialName = PlanInfo.MaterialName;
if (list.Count == 0)
task.ExecuteOrder = 1;
if (list.Count != 0)
task.ExecuteOrder = list.Max(d => d.ExecuteOrder) + 1;
task.ExecuteMethod = 2;//不做要求,系统自动确定
task.PlanAmount = Convert.ToInt32(TransmitAmount);
task.CompleteAmount = 0;
task.CreatedTime = DateTime.Now;
task.BeginTime = DateTime.Now;
task.ExecuteStatus = 1;
task.PlanType = productPlanInfo.PlanType;
task.MaterialSpecificatons = productPlanInfo.MaterialSpecificatons;
var result = await _executePlanInfoServices.AddAsync(task);
if (result > 0)
{
var obj = await _productPlanInfoServices.FirstAsync(d => d.ProductLineCode == stationCode && d.OrderCode == PlanInfo.OrderCode);
var execPlanList= _executePlanInfoServices.QueryAsync(d=>d.OrderCode == PlanInfo.OrderCode).Result;
if (execPlanList.Count==0)
{
obj.BeginTime = DateTime.Now;
await _productPlanInfoServices.UpdateAsync(obj);
}
RefreshCretaePlanInfoEvent?.Invoke();
MessageBox.Show("计划下发成功!", "系统提醒");
}
else
{
MessageBox.Show("计划拆分失败,请检查后重试!", "系统提醒");
}
}
else
{
MessageBox.Show("生产计划获取失败,加载为空", "提示", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
return;
}
}
#endregion
#region 清除
/// <summary>
/// 清除
/// </summary>
[RelayCommand]
private void ClearTransmitAmount()
{
string amount = _TransmitAmount.ToString();
if (amount.Length > 0)
{
TransmitAmount = amount.Substring(0, amount.Length - 1);
}
}
#endregion
#region KeypadButton
[RelayCommand]
private void KeypadButton(object obj)
{
var info = obj as string;
TransmitAmount += info;
}
#endregion
#region 关闭
/// <summary>
/// 关闭
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
private void CloseWindow(object parameter)
{
var window = parameter as Window;
if (window != null)
{
window.Close();
}
}
#endregion
#region 获取最大值
/// <summary>
/// 获取最大值
/// </summary>
/// <param name="taskCode">MES编码</param>
/// <returns></returns>
public string GetMaxNum(string mesId)
{
try
{
List<int> tempList = new List<int>();
var list = _executePlanInfoServices.QueryAsync(d => d.TaskCode.Contains(mesId)).Result;
if (list.Count() == 0)
{
return mesId + "0001";
}
foreach (var item in list)
{
string code = item.TaskCode.Substring(item.TaskCode.Length - 4);
int num = Convert.ToInt32(code);
tempList.Add(num);
}
string maxStr = (tempList.Max() + 1).ToString();
string taskCode = mesId+ maxStr.PadLeft(6, '0');
return taskCode;
}
catch
{
return mesId + "0001";
}
}
#endregion
}
}

@ -14,6 +14,17 @@ namespace Aucma.Core.Palletiz.ViewModels
{
public partial class SearchCriteriaViewModel : ObservableObject
{
#region 更新完快捷方式查询刷新
/// <summary>
/// 更新完快捷方式查询刷新
/// </summary>
/// <returns></returns>
public delegate void RefreshConfigDelegate();
public static event RefreshConfigDelegate RefreshConfigDelegateEvent;
#endregion
private AppConfigHelper appConfig =new AppConfigHelper();
public SearchCriteriaViewModel()
{
@ -47,6 +58,7 @@ namespace Aucma.Core.Palletiz.ViewModels
appConfig.searchItems = items;
Init();
RefreshConfigDelegateEvent?.Invoke();
}
#endregion
@ -73,7 +85,7 @@ namespace Aucma.Core.Palletiz.ViewModels
{
Configurations.Add(item);
}
WeakReferenceMessenger.Default.Send<string>("RefreshSearchItems");//刷新窗口
WeakReferenceMessenger.Default.Send<string>("RefreshPalletizSearchItems");//刷新窗口
}
#endregion
}

@ -3,6 +3,7 @@ using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Service;
using Aucma.Core.Palletiz.Common;
using Aucma.Core.Palletiz.Views;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
@ -37,60 +38,27 @@ namespace Aucma.Core.Palletiz.ViewModels
public delegate void RefreshPage();
public static event RefreshPage RefreshPageEvent;
public RelayCommand QueryCommand { get; set; }
public RelayCommand deleteCommand { get; set; }
public RelayCommand SaveCommand { get; set; }
public RelayCommand SearchCriteriaSetCommand { get; set; }
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BaseSpaceInfoServices));
private readonly IBaseMaterialInfoServices? _baseMaterialInfoServices;
private readonly IBaseSpaceInfoServices _baseSpaceInfoServices;
public RelayCommand<object> MouseClickCommand { get; set; }
private string spaceCodes = string.Empty;
private AppConfigHelper appConfig = new AppConfigHelper();
public SelectTypeViewModel()
{
}
public SelectTypeViewModel(BaseSpaceInfo space)
{
_baseSpaceInfoServices = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
SpaceInfo = space;
QueryCommand = new RelayCommand(searchData);
SaveCommand = new RelayCommand(updateDirection);
deleteCommand = new RelayCommand(deleteModel);
SearchCriteriaSetCommand = new RelayCommand(SearchCriteriaSet);
MouseClickCommand = new RelayCommand<object>(MouseClick);
materialDataGrid = new ObservableCollection<BaseMaterialInfo>();
// SearchCriteriaViewModel.RefreshPageEvent += SaveSearchCriteria;
SearchCriteriaViewModel.RefreshConfigDelegateEvent += SaveSearchCriteria;
//加载快捷方式
SaveSearchCriteria();
Load(space);
Load(space);//加载货道
}
private BaseSpaceInfo spaceInfo = new BaseSpaceInfo();
public BaseSpaceInfo SpaceInfo
{
get { return spaceInfo; }
set => SetProperty(ref spaceInfo, value);
}
#region 快捷查询
/// <summary>
/// 快捷查询
@ -119,12 +87,17 @@ namespace Aucma.Core.Palletiz.ViewModels
}
#endregion
#region 加载快捷方式
/// <summary>
/// 加载快捷方式
/// </summary>
private void SaveSearchCriteria()
{
Configurations = new ObservableCollection<string>();
var searchItems = appConfig.searchItems;
var split = searchItems.Split('%');
Configurations.Clear();
foreach (var item in split)
{
if (!string.IsNullOrEmpty(item))
@ -132,12 +105,14 @@ namespace Aucma.Core.Palletiz.ViewModels
Configurations.Add(item);
}
}
}
}
#endregion
//11
#region 初始化加载数据
//初始化加载数据
public async void Load(BaseSpaceInfo space)
{
var infos = await _baseMaterialInfoServices.QueryAsync(x=>x.MaterialSubclass== "200");
var infos = await _baseMaterialInfoServices.QueryAsync(x => x.MaterialSubclass == "200");
MaterialDataGrid.Clear();
Application.Current.Dispatcher.Invoke(() =>
{
@ -158,37 +133,62 @@ namespace Aucma.Core.Palletiz.ViewModels
IsSelectedOptionB = true;
}
planInfo.MaterialCode = space.MaterialType;
planInfo.MaterialName = space.typeNameA;
planInfo.MaterialCode = space.MaterialType;
planInfo.MaterialName = space.typeNameA;
if (SelectedRotation == null)
{
SelectedRotation = new ComboBoxItem { Content = "0" };
}
if (SelectedRotation == null)
{
SelectedRotation = new ComboBoxItem { Content = "0" };
}
}
}
private ObservableCollection<BaseMaterialInfo> materialDataGrid;
#endregion
#region 初始化datagrid产品信息
/// <summary>
/// 初始化物料信息
/// </summary>
private ObservableCollection<BaseMaterialInfo> materialDataGrid = new ObservableCollection<BaseMaterialInfo>();
public ObservableCollection<BaseMaterialInfo> MaterialDataGrid
{
get { return materialDataGrid; }
set => SetProperty(ref materialDataGrid, value);
}
//111
#endregion
#region 货道信息
private BaseSpaceInfo spaceInfo = new BaseSpaceInfo();
public BaseSpaceInfo SpaceInfo
{
get { return spaceInfo; }
set => SetProperty(ref spaceInfo, value);
}
#endregion
#region 初始化下拉列表
/// <summary>
/// 初始化下拉列表
/// </summary>
private BaseMaterialInfo selectedDataItem;
public BaseMaterialInfo SelectedDataItem
{
get { return selectedDataItem; }
set => SetProperty(ref selectedDataItem, value);
}
#endregion
// 111
#region 鼠标双击事件
/// <summary>
/// 鼠标双击事件
/// </summary>
/// <param name="obj"></param>
public void MouseClick(object obj)
{
var info = SelectedDataItem;
if (info != null)
{
@ -197,6 +197,10 @@ namespace Aucma.Core.Palletiz.ViewModels
SpaceInfo.typeNameA = info.MaterialName;
}
}
#endregion
#region 单选框
/// <summary>
/// 单选框
/// </summary>
@ -206,26 +210,40 @@ namespace Aucma.Core.Palletiz.ViewModels
get { return selectedRotation; }
set
{
SetProperty(ref selectedRotation, value);
//selectedRotation = value;
//set => SetProperty(ref selectedRotation, value);
}
}
#endregion
#region 计划信息
private BaseMaterialInfo planInfo = new BaseMaterialInfo();
public BaseMaterialInfo PlanInfo
{
get { return planInfo; }
set => SetProperty(ref planInfo, value);
}
}
#endregion
#region 搜索框
/// <summary>
/// 搜索框
/// </summary>
private string searchText;
public string SearchText
{
get { return searchText; }
set => SetProperty(ref searchText, value);
}
#endregion
#region 快捷方式配置
/// <summary>
/// 快捷方式配置
/// </summary>
private ObservableCollection<string> _configurations = new ObservableCollection<string>();
public ObservableCollection<string> Configurations
{
@ -233,16 +251,20 @@ namespace Aucma.Core.Palletiz.ViewModels
set => SetProperty(ref _configurations, value);
}
#endregion
#region 搜索条件设置
/// <summary>
/// 搜索条件设置
/// </summary>
[RelayCommand]
public void SearchCriteriaSet()
{
// SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
// searchCriteriaWindow.ShowDialog();
SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
searchCriteriaWindow.ShowDialog();
}
#endregion
#region 单选框
private bool _isSelectedOptionA;
@ -286,9 +308,15 @@ namespace Aucma.Core.Palletiz.ViewModels
}
}
#endregion
private async void deleteModel()
#region 删除模型
/// <summary>
/// 删除模型
/// </summary>
[RelayCommand]
private void Delete()
{
try
{
@ -304,7 +332,7 @@ namespace Aucma.Core.Palletiz.ViewModels
updateOtherSpace(SpaceInfo);
}
bool result = await _baseSpaceInfoServices.UpdateSpaceInfo(spaceInfo);
bool result = _baseSpaceInfoServices.UpdateSpaceInfo(spaceInfo).Result;
if (result)
{
MessageBox.Show("清除型号成功!");
@ -319,11 +347,15 @@ namespace Aucma.Core.Palletiz.ViewModels
logHelper.Error(ex.Message.ToString());
}
}
#endregion
#region 给货道设置型号,转向角度等
/// <summary>
/// 给货道设置型号,转向角度等
/// </summary>
private async void updateDirection()
[RelayCommand]
private void Save()
{
try
{
@ -360,6 +392,9 @@ namespace Aucma.Core.Palletiz.ViewModels
logHelper.Error(ex.Message.ToString());
}
}
#endregion
#region 大产品占据两条货道,更新另一条货道
/// <summary>
/// 大产品占据两条货道,更新另一条货道
/// </summary>
@ -389,14 +424,18 @@ namespace Aucma.Core.Palletiz.ViewModels
_baseSpaceInfoServices.UpdateAsync(otherSpace);
}
}
#endregion
#region 条件查询型号
///<summary>
///条件查询型号
/// </summary>
private async void searchData()
[RelayCommand]
private async void Query()
{
if (!string.IsNullOrEmpty(searchText))
{
var infos =await _baseMaterialInfoServices.QueryAsync(x=>x.MaterialSubclass=="200" && (x.MaterialName.Contains(searchText) || x.MaterialCode.Contains(searchText)));
var infos = await _baseMaterialInfoServices.QueryAsync(x => x.MaterialSubclass == "200" && (x.MaterialName.Contains(searchText) || x.MaterialCode.Contains(searchText)));
MaterialDataGrid.Clear();
Application.Current.Dispatcher.Invoke(() =>
{
@ -411,5 +450,7 @@ namespace Aucma.Core.Palletiz.ViewModels
Load(null);
}
}
#endregion
}
}

@ -342,10 +342,9 @@ namespace Aucma.Core.Palletiz.ViewModels
if (info != null)
{
info.PlanType = _radioButtonStatus;
QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info);
quantityIssuedWindow.ShowDialog();
//QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info);
//quantityIssuedWindow.ShowDialog();
}
}
/// <summary>

@ -20,17 +20,7 @@ namespace Aucma.Core.Palletiz.ViewModels
#region 加载DataGrid数据
private void LoadData()
{
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 2, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 60, CompleteAmount = 40 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 3, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 4, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 40, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 5, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 30, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 6, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 20 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 7, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 10, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 8, ProductPlanCode = "8659452123", MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 9, ProductPlanCode = "8659452123", MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 80, CompleteAmount = 10 });
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 10, ProductPlanCode = "8659452123", MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10});
//MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
}
#endregion
@ -55,26 +45,18 @@ namespace Aucma.Core.Palletiz.ViewModels
[RelayCommand]
private void ExecQuery(object obj)
{
var result = (StatisticModel)obj;
if (string.IsNullOrEmpty(result.BeginTime))
{
MessageBox.Show("开始时间不能为空!");
return;
}
if (string.IsNullOrEmpty(result.EndTime))
{
MessageBox.Show("结束时间不能为空!");
return;
}
var beginTime = result.BeginTime;
var endTime = result.EndTime;
string result =(string)obj;
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
if (!string.IsNullOrEmpty(beginTime))
if (!string.IsNullOrEmpty(result))
{
MaterialDataGrid.Clear();
MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123", MaterialCode = "8659452123", MaterialName = "SC-AUCMA-可口可乐SC", PlanAmount = 50, CompleteAmount = 10 });
//foreach (MaterialComplateInfo info in materialDataGrid)
//{
// MaterialDataGrid.Add(info);
//}
}
else
{

@ -17,7 +17,7 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border Grid.Column="0" BorderBrush="#1254AB" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
@ -39,22 +39,22 @@
<TextBlock Text="所属仓库:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_A" Content="A 库" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Cursor="Hand" Click="btn_A_Click" >
</Button>
<Button x:Name="btn_B" Content="B 库" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20" Click="btn_B_Click">
<Button x:Name="btn_B" Content="B 库" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_B_Click">
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="目的货道:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_space1" Content="1" FontSize="18" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="0 0 10 0" Click="btn_space1_Click">
</Button>
<Button x:Name="btn_space2" Content="2" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10" Click="btn_space2_Click">
<Button x:Name="btn_space2" Content="2" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space2_Click">
</Button>
<Button x:Name="btn_space3" Content="3" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10" Click="btn_space3_Click">
<Button x:Name="btn_space3" Content="3" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space3_Click">
</Button>
<Button x:Name="btn_space4" Content="4" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10" Click="btn_space4_Click">
<Button x:Name="btn_space4" Content="4" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space4_Click">
</Button>
<Button x:Name="btn_space5" Content="5" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10" Click="btn_space5_Click">
<Button x:Name="btn_space5" Content="5" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space5_Click">
</Button>
<Button x:Name="btn_space6" Content="6" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10" Click="btn_space6_Click">
<Button x:Name="btn_space6" Content="6" FontSize="18" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="45" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space6_Click">
</Button>
</StackPanel>
@ -62,16 +62,16 @@
<TextBlock Text="货道分流:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_left" Content="左 道" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_left_Click" >
</Button>
<Button x:Name="btn_right" Content="右 道" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20" Click="btn_right_Click">
<Button x:Name="btn_right" Content="右 道" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_right_Click">
</Button>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="转向角度:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_range90" Content="90度" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_range90_Click" >
</Button>
<Button x:Name="btn_range180" Content="180度" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20" Click="btn_range180_Click">
<Button x:Name="btn_range180" Content="180度" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_range180_Click">
</Button>
<Button x:Name="btn_range270" Content="270度" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_range270_Click" >
<Button x:Name="btn_range270" Content="270度" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_range270_Click" >
</Button>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
@ -81,7 +81,7 @@
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 10 0">
<Button Content="保 存" FontSize="20" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
<Button Content="取 消" FontSize="20" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Foreground="white" Margin="10,0,0,0" Height="50" BorderBrush="#FF9900" Width="100" Click="Button_Click_1" />
</StackPanel>

@ -1,114 +0,0 @@
<Window x:Class="Aucma.Core.Palletiz.Views.QuantityIssuedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
mc:Ignorable="d"
Background="#1152AC"
FontFamily="Microsoft YaHei"
Title="下达数量"
Height="500" Width="700" Name="window"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Topmost="False">
<Border Margin="5" BorderBrush="#0288d1" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#0288d1" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="MES工单编号" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="planCode" FontSize="18" Text="{Binding PlanInfo.PlanCode}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="SAP计划编号" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="orderCode" FontSize="18" Text="{Binding PlanInfo.OrderCode}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;产品型号" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="materialCode" FontSize="18" Text="{Binding PlanInfo.MaterialName}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;产品简码" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="materialSpecificatons" FontSize="18" Text="{Binding PlanInfo.MaterialSpecificatons}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;计划数量" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox FontSize="18" Text="{Binding PlanInfo.PlanAmount}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;完成数量" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox FontSize="18" Text="{Binding PlanInfo.CompleteAmount}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Column="1" BorderBrush="#0288d1" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="9*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="下达数量" FontSize="18" Foreground="#FFFFFF" Margin="10,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="TransmitAmount" Style="{x:Null}" Background="#1152AC" VerticalContentAlignment="Center" FontSize="18" Text="{Binding TransmitAmount}" Foreground="#FFFFFF" BorderBrush="White" Width="150" Height="40" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<Border Grid.Row="1" BorderBrush="Black" BorderThickness="0" Margin="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Content="1" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100"/>
<Button Grid.Row="0" Grid.Column="1" Content="2" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="0" Grid.Column="2" Content="3" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="0" Content="4" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="1" Content="5" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="2" Content="6" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="0" Content="7" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="1" Content="8" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="2" Content="9" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="3" Grid.Column="0" Content="0" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Content="清除" FontSize="15" Margin="2,2" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Command="{Binding ClearTransmitAmountCommand}" Height="70" />
</Grid>
</Border>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="计划下达" Command="{Binding PlanInfoTransmitCommand}" Height="50" Width="140" />
<Button Content="取 消" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Margin="25,0,0,0" Height="50" BorderBrush="#FF9900" Width="140" />
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -1,26 +0,0 @@
using Aucma.Core.Palletiz.Models;
using Aucma.Core.Palletiz.ViewModels;
using System.Windows;
namespace Aucma.Core.Palletiz.Views
{
/// <summary>
/// QuantityIssuedView.xaml 的交互逻辑
/// </summary>
public partial class QuantityIssuedView : Window
{
private QuantityIssuedViewModel viewModel = null;
public QuantityIssuedView()
{
InitializeComponent();
this.TransmitAmount.Focus();
}
public QuantityIssuedView(ProductPlanInfoModel productPlanInfo)
{
InitializeComponent();
this.DataContext = new QuantityIssuedViewModel(productPlanInfo);
this.TransmitAmount.Focus();
}
}
}

@ -4,11 +4,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d" FontFamily="Microsoft YaHei" WindowStartupLocation="CenterScreen"
Name="window" Background="#1254AB" Height="1000" Width="1500">
<Window.Resources>
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
@ -91,155 +90,153 @@
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Grid.Column="0">
<TextBox Width="200" Style="{x:Null}" Height="25" Margin="10 0 0 0" Text="{Binding SearchText}" VerticalAlignment="Center" FontSize="18"/>
<Button Content="查 询" Command="{Binding QueryCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" Margin="5 0 10 0"/>
<Button Content="配 置" Command="{Binding SearchCriteriaSetCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Margin="10,0,0,0" FontSize="18" Height="30" Width="100" BorderThickness="1" />
<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBox Width="200" Style="{x:Null}" Height="30" Margin="10 0 0 0" Text="{Binding SearchText}" VerticalAlignment="Center" FontSize="18" />
<Button Content="查 询" Command="{Binding QueryCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" FontSize="16" Height="30" Width="100" Margin="5 0 10 0"/>
<Button Content="配 置" Command="{Binding SearchCriteriaSetCommand}" Background="#FF36B5C1" Margin="10,0,0,0" FontSize="16" Height="30" Width="100"/>
</StackPanel>
<!--快捷搜索型号-->
<Border Grid.Row="0" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="0">
<StackPanel Grid.Row="1" Orientation="Horizontal">
<StackPanel Grid.Column="0" VerticalAlignment="Center" Margin="10 0 0 0">
<TextBlock Text="快捷查询" VerticalAlignment="Center" Foreground="#FFFFFF" FontSize="18" />
</StackPanel>
<WrapPanel Grid.Column="1" VerticalAlignment="Center" Margin="0 5" >
<ItemsControl ItemsSource="{Binding Configurations}" Foreground="#FFFFFF">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton
Content="{Binding}"
Command="{Binding DataContext.RadioButtonCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
CommandParameter="{Binding}"
GroupName="MaterialTypeRadioButton"
Margin="25,0" FontSize="18" Foreground="#FFFFFF"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</WrapPanel>
</StackPanel>
<UniformGrid Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition />
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center" Margin="10 0 0 0">
<TextBlock Text="快捷查询" VerticalAlignment="Center" Foreground="#FFFFFF" FontSize="18" />
</StackPanel>
<WrapPanel Grid.Column="1" VerticalAlignment="Center" Margin="0 5" >
<ItemsControl ItemsSource="{Binding Configurations}" Foreground="#FFFFFF">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton
Content="{Binding}"
Command="{Binding DataContext.RadioButtonCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
CommandParameter="{Binding}"
GroupName="MaterialTypeRadioButton"
Margin="25,0" FontSize="18" Foreground="#FFFFFF"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</WrapPanel>
</Grid>
</Border>
<!--计划列表-->
<Border Grid.Row="1" Grid.Column="0" BorderThickness="0" CornerRadius="5" Margin="1,1,5,5" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Left" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedDataItem}" SelectionChanged="DataGrid_SelectionChanged">
<!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding MaterialCode}" Width="0.8*" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Width="3*" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
<!--计划列表-->
<Border Grid.Column="0" BorderThickness="4" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Left" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedDataItem}" SelectionChanged="DataGrid_SelectionChanged">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding MaterialCode}" Width="*" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Width="5*" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</Border>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
</Border>
<Border Grid.Column="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="货道编号:" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode1" Text="{Binding SpaceInfo.SpaceCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 20 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
<TextBlock Text="货道名称:" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode2" Text="{Binding SpaceInfo.SpaceName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品编码:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode" Text="{Binding PlanInfo.MaterialCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="500"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品型号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="MaterialName" Text="{Binding PlanInfo.MaterialName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="500"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="60,0,0,0" >
<!--单选框样式-->
<StackPanel.Resources>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Grid Width="20" Height="20">
<Ellipse x:Name="BulletRadio" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
</Grid>
</BulletDecorator.Bullet>
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="BulletRadio" Property="Fill" Value="Green"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Resources>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="货道编号:" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode1" Text="{Binding SpaceInfo.SpaceCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 20 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="货道名称:" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode2" Text="{Binding SpaceInfo.SpaceName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品编码:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode" Text="{Binding PlanInfo.MaterialCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品型号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="MaterialName" Text="{Binding PlanInfo.MaterialName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0" >
<!--单选框样式-->
<StackPanel.Resources>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Grid Width="20" Height="20">
<Ellipse x:Name="BulletRadio" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
</Grid>
</BulletDecorator.Bullet>
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="BulletRadio" Property="Fill" Value="Green"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Resources>
<TextBlock Text="是否占两道: " FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<RadioButton Content="是" GroupName="Direction" IsChecked="{Binding IsSelectedOptionA, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 0 0 " FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" />
<RadioButton Content="否" GroupName="Direction" IsChecked="{Binding IsSelectedOptionB, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 50 0 " FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="转向角度:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20"/>
<ComboBox x:Name="rotationComboBox" FontSize="20" SelectedItem="{Binding SelectedRotation}" Width="200" Height="40">
<ComboBox.Resources>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Foreground" Value="CadetBlue"/>
<Setter Property="Background" Value="CadetBlue"/>
</Style>
</ComboBox.Resources>
<ComboBoxItem Content="0" />
<ComboBoxItem Content="90" />
<ComboBoxItem Content="180" />
<ComboBoxItem Content="270" />
</ComboBox>
</StackPanel>
<TextBlock Text="是否占两道: " FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<RadioButton Content="是" GroupName="Direction" IsChecked="{Binding IsSelectedOptionA, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 0 0 " FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" />
<RadioButton Content="否" GroupName="Direction" IsChecked="{Binding IsSelectedOptionB, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 50 0 " FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" />
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="清除型号" FontSize="23" Command="{Binding deleteCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Margin="0,0,10,0" VerticalAlignment="Center" Height="70" Width="130" />
<Button Content="保 存" FontSize="23" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="20,0,10,0" Height="70" Width="130" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="转向角度:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10"/>
<ComboBox x:Name="rotationComboBox" FontSize="20" SelectedItem="{Binding SelectedRotation}" Width="350" Height="40">
<ComboBox.Resources>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Foreground" Value="CadetBlue"/>
<Setter Property="Background" Value="CadetBlue"/>
</Style>
</ComboBox.Resources>
<ComboBoxItem Content="0" />
<ComboBoxItem Content="90" />
<ComboBoxItem Content="180" />
<ComboBoxItem Content="270" />
</ComboBox>
</StackPanel>
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="清除型号" FontSize="23" Command="{Binding deleteCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" />
<Button Content="保 存" FontSize="23" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="20,0,10,0" Height="50" Width="130" />
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</UniformGrid>
</Grid>
</Border>

@ -29,7 +29,6 @@ namespace Aucma.Core.Palletiz.Views
viewModel = new SelectTypeViewModel(space);
this.DataContext = viewModel;
viewModel.closeEvent += closeWindow;
WeakReferenceMessenger.Default.Register<object>(this, Recive);
}
private void Recive(object recipient, object message)
{

@ -90,8 +90,9 @@
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Text="查询条件" Margin="10 0" Foreground="White" FontSize="18" VerticalAlignment="Center"/>
<Button Margin="10 0"
<TextBox x:Name="queryParam" Text="{Binding Search,Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="10 0 5 0"/>
<Button Content="查询" Margin="10 0" Command="{Binding ExecQueryCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}"/>
<!--<Button Margin="10 0"
Content="查询" Command="{Binding ExecQueryCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}"
@ -102,7 +103,7 @@
<Binding ElementName="EndTime" Path="Text"/>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Button>-->
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid Grid.Row="0" ItemsSource="{Binding MaterialDataGrid}"

@ -26,5 +26,6 @@ namespace Aucma.Core.Palletiz.Views
InitializeComponent();
this.DataContext = new StatisticsPageViewModel();
}
}
}

@ -14,6 +14,8 @@ namespace Aucma.Core.SheetMetal.ViewModels
{
public partial class SearchCriteriaViewModel : ObservableObject
{
private AppConfigHelper appConfig =new AppConfigHelper();
public SearchCriteriaViewModel()
{

Loading…
Cancel
Save