change-分垛手动入库

dev
liuwf 10 months ago
parent 084ae8dc35
commit 987c3af80a

@ -14,11 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
<<<<<<< HEAD
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
=======
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+08f039f79c4354fdb0c81441e2a211c05029eb3e")]
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1,5 +1 @@
<<<<<<< HEAD
7d60a94dd38c10522cbfe4a021ccb6e9c5da0354
=======
fad90fcc3b6583900b74d5fd78b359c3c39898e3edc954e0d716ab6813336265
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769

@ -1,5 +1,3 @@
is_global = true
build_property.RootNamespace = Admin.Core.FrameWork
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.FrameWork\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.FrameWork\

@ -14,11 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
<<<<<<< HEAD
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
=======
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+08f039f79c4354fdb0c81441e2a211c05029eb3e")]
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1,5 +1 @@
<<<<<<< HEAD
0868e6bde5b49a65a126b91d794e990427a11761
=======
c0f6b19d433d08bad3492dc6a6ba63c6191efddb5b9b20d48fe13f4288ac8673
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769

@ -8,6 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.RealTimeService
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.RealTimeService\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.RealTimeService\

@ -106,7 +106,15 @@ namespace Admin.Core.Service
try
{
productOffline = _rep.Query(x => x.ProductSncode == snCode).First();
if (snCode.Length < 20)
{ //手动入库传的SN是产品型号,选取该型号最新一条记录
productOffline = _rep.FirstAsync(x => x.ProductCode == snCode).Result;
}
else
{
productOffline = _rep.Query(x => x.ProductSncode == snCode).First();
}
}
catch (Exception e)
{

@ -1,4 +1,5 @@
using Admin.Core.Common.Helper;
using Admin.Core.Common;
using Admin.Core.Common.Helper;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
@ -34,6 +35,11 @@ namespace Aucma.Core.Palletiz.Business
private readonly AppConfig _appConfig;
private AppConfig appConfig = new AppConfig();
public string storeCode = Appsettings.app("StoreInfo", "PalletizStoreCodeA");
private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
#region 委托事件
/// <summary>
@ -62,6 +68,7 @@ namespace Aucma.Core.Palletiz.Business
_appConfig = new AppConfig();
_spaceinfoService = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_offlineService = App.ServiceProvider.GetService<IProductOffLineServices>();
HandPalletizViewModel.HandSendEvent += InStore;
// string AA = ExtractNumber("FD01_012");
}
@ -109,9 +116,10 @@ namespace Aucma.Core.Palletiz.Business
/// 入库申请
/// </summary>
/// <param name="spaceArea">货道区域</param>
/// <param name="asciiStr"></param>
/// <param name="asciiStr">20位是正常扫码传输的条码,手动入库传的是人工选择的成品型号</param>
private void InStore(string spaceArea, string asciiStr)
{
RecordInStore recordInstore = new RecordInStore();
String msg = string.Empty;
try
{
@ -125,15 +133,7 @@ namespace Aucma.Core.Palletiz.Business
throw new ArgumentException($"入库申请处理异常:货道区域为空");
}
//if (asciiStr.Contains(";") && asciiStr.Length == BarcodeRef.Length)
//{
// string[] splitStr = asciiStr.Split(";");
// if (splitStr.Length > 1)
// {
// asciiStr = splitStr[1];
// }
//}
_offlineService.GetProductInfosBySnCode(asciiStr, out ProductOffline prodInfo);
@ -143,20 +143,51 @@ namespace Aucma.Core.Palletiz.Business
}
RefreshProductInfoEvent?.Invoke(asciiStr,prodInfo.ProductModel,prodInfo.ProductOrderNo);
GetSpaceInfoByMaterialType(spaceArea, prodInfo, out BaseSpaceInfo laseSpaceinfo,
out BaseSpaceInfo spaceinfo);
bool result = false;
SendInStoreTask(asciiStr,spaceinfo, ref result,Convert.ToInt32(prodInfo.ProductMasterModel),ref msg);
SendInStoreTask(asciiStr,spaceinfo, ref result,Convert.ToInt32(prodInfo.ProductMasterModel),ref msg,out int range);
if (!result)
#region 添加入库记录
recordInstore.StoreCode = storeCode;
recordInstore.StoreArea = spaceArea;
recordInstore.SpaceCode = spaceinfo.SpaceCode;
recordInstore.MaterialType = spaceinfo.MaterialType;
recordInstore.MaterialCode = spaceinfo.MaterialType;
recordInstore.InStoreTime = DateTime.Now;
recordInstore.BarCodeCode = asciiStr;
recordInstore.MaterialName = prodInfo.ProductName;
recordInstore.InStoreAmount = range ;
recordInstore.IsFlag = 0;
recordInstore.CreatedTime = DateTime.Now;
if (asciiStr.Length < 20)
{
recordInstore.EntryPattern = 1;
}
else
{
recordInstore.EntryPattern = 0;
}
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
#endregion
if (!result)
{
msg = msg + "放行失败";
RefreshMsgEvent?.Invoke(msg);
throw new ArgumentException($"入库申请处理异常:入库任务下发至PLC失败");
}
else
{
msg = msg + "放行成功";
RefreshMsgEvent?.Invoke(msg);
List<BaseSpaceInfo> spaceinfos = new List<BaseSpaceInfo>();
@ -169,14 +200,18 @@ namespace Aucma.Core.Palletiz.Business
spaceinfos.Add(spaceinfo);
_spaceinfoService.UpdateSpaceInfo(spaceinfos);
}
}
catch (Exception e)
{
msg =$"入库逻辑处理异常:{e.Message}";
RefreshMsgEvent?.Invoke(msg);
}
}
/// <summary>
/// 通过物料型号获取货道信息
/// </summary>
@ -292,8 +327,10 @@ namespace Aucma.Core.Palletiz.Business
/// <param name="spaceinfo"></param>
/// <param name="result"></param>
/// <exception cref="ArgumentException"></exception>
private void SendInStoreTask(string asciiStr, BaseSpaceInfo spaceinfo, ref bool result,int prodWeight,ref string msg)
private void SendInStoreTask(string asciiStr, BaseSpaceInfo spaceinfo, ref bool result,int prodWeight,ref string msg,out int rangeResult)
{
int spinFlag = -1;
rangeResult = 0;
if (plcCon == null)
{
throw new ArgumentException($"下发入库任务至PLC逻辑异常:Plc连接为空");
@ -304,23 +341,9 @@ namespace Aucma.Core.Palletiz.Business
bool isFlag = true;
int spaceCode = StringChange.ParseToInt(spaceinfo.SpaceCode);
int spinFlag =JudgeRotation(spaceCode, prodWeight);
//int spinFlag = 3; // 转180度发1不转发3
//if (prodWeight < 140)
//{
// if (spaceCode % 2 != 0) //偶数 转180°
// {
// spinFlag = 1; //4
// }
//}
//else if (prodWeight >= 140)
//{
// if (spaceCode % 2 == 0) //偶数 转180°
// {
// spinFlag = 1; //4
// }
//}
if(spinFlag == -1)
spinFlag =JudgeRotation(spaceCode, prodWeight, out int ranges);
rangeResult = ranges;
if (spinFlag == -1)
{
msg = $"成品码:{asciiStr},仓库区域:{spaceinfo.SpaceArea},匹配货道:{spaceinfo.SpaceCode};旋转角度匹配失败,请先设置该型号旋转规则!";
RefreshMsgEvent?.Invoke(msg);
@ -328,9 +351,14 @@ namespace Aucma.Core.Palletiz.Business
}
msg = $"成品码:{asciiStr},仓库区域:{spaceinfo.SpaceArea},匹配货道:{spaceinfo.SpaceCode};旋转:{(spinFlag == 3 ? "0°" : "180°")};下发plc放行信号";
RefreshMsgEvent?.Invoke(msg);
DateTime startTime = DateTime.Now;
while (isFlag)
{
if((DateTime.Now - startTime).TotalSeconds > 15)
{
result = false;
return;
}
bool answerFlag = _plc.ReadBool("B1000");
if (answerFlag)
@ -338,7 +366,8 @@ namespace Aucma.Core.Palletiz.Business
isFlag = false;
}
Task.Delay(1000 * 2).Wait();
Task.Delay(500).Wait();
}
if (spaceinfo.SpaceArea == "A")
@ -368,7 +397,7 @@ namespace Aucma.Core.Palletiz.Business
/// </summary>
/// <param name="prodWeight"></param>
/// <returns></returns>
public int JudgeRotation(int spaceCode,int prodWeight)
public int JudgeRotation(int spaceCode,int prodWeight, out int ranges)
{
try
{
@ -379,11 +408,13 @@ namespace Aucma.Core.Palletiz.Business
{
if (spaceCode % 2 == 0) // 偶数货道
{
return range.EvenSpaceRange == 0 ? 3 : 1;
ranges = range.EvenSpaceRange;
return RangeToInt(range.EvenSpaceRange);
}
else
{
return range.OddSpaceRange == 0 ? 3 : 1;
ranges = range.OddSpaceRange;
return RangeToInt(range.OddSpaceRange);
}
}
}
@ -392,8 +423,22 @@ namespace Aucma.Core.Palletiz.Business
{
Console.WriteLine("JudgeRotation"+ex.Message);
}
ranges = 0;
return -1;
}
public int RangeToInt(int range)
{
int result = -1;
switch (range) {
case 0: result = 3; break;
case 90: result = 1; break;
case 180: result = 4; break;
case 270: result = 2; break;
}
return result;
}
/// <summary>
/// 提取货道号
/// </summary>

@ -1,16 +1,19 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service;
using Aucma.Core.Palletiz.Business;
using Aucma.Core.Palletiz.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Elasticsearch.Net.Specification.MachineLearningApi;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Forms;
using System.Windows;
namespace Aucma.Core.Palletiz.ViewModels
{
@ -18,115 +21,143 @@ namespace Aucma.Core.Palletiz.ViewModels
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(HandPalletizViewModel));
public static StackInfoModel tempStackInfo = new StackInfoModel();
private readonly IBaseSpaceInfoServices _baseSpaceInfoServices;
private readonly IBaseSpaceInfoServices _baseSpaceInfoServices;
private readonly IRecordInStoreServices _recordInstoreServices;
private readonly ICodeBindingRecordServices? _codeBindingRecordServices;
/// <summary>
/// 手动入库委托
/// </summary>
public delegate void HandSend(string spaceArea, string asciiStr);
public static event HandSend? HandSendEvent;
public HandPalletizViewModel()
{
_baseSpaceInfoServices = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
Range = 1;
SpaceNo ="001";
PromptInfo("请选择信息下传......", "White");
_codeBindingRecordServices = App.ServiceProvider.GetService<ICodeBindingRecordServices>();
init();
}
#region 分垛信息下传
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Save()
public void init()
{
try
List<ProductAllModel> list = _codeBindingRecordServices.GetAllProductModel();
if (list == null || list.Count == 0) return;
list = list.OrderBy(x => x.ProductMasterModel).ToList();
MaterialDataGrid.Clear();
Application.Current.Dispatcher.Invoke(() =>
{
DialogResult cr = MessageBox.Show("是否确认下传分垛信息?", "系统提醒", MessageBoxButtons.OKCancel);
if (cr != DialogResult.OK)
foreach (ProductAllModel info in list)
{
return;
MaterialDataGrid.Add(info);
}
PromptInfo("分垛信息下传中......", "White");
});
}
int range = Range;
int spaceNo =Convert.ToInt32(SpaceNo);
if (spaceNo==0)
{
MessageBox.Show("请选择目的货道!","系统提醒");
return;
}
string hh = "FD01_" + SpaceNo;
Admin.Core.Model.BaseSpaceInfo spaceInfo = _baseSpaceInfoServices.FirstAsync(X => X.StoreCode.Contains("FD") && X.SpaceCode == "FD01_"+SpaceNo).Result;
if (spaceInfo == null)
{
MessageBox.Show("货道未创建!", "系统提醒");
return;
}
}
catch (Exception ex)
#region 鼠标双击事件
/// <summary>
/// 鼠标双击事件
/// </summary>
/// <param name="obj"></param>
public void MouseClick(object obj)
{
var info = SelectedDataItem;
if (info != null)
{
PromptInfo($"分垛信息下传失败:{ex.Message}", "Red");
ProductCode = info.ProductCode;
ProductModel = info.ProductModel;
}
}
#endregion
#region 提示信息
#endregion
private string? msgTxt;
public string? MsgTxt
#region 初始化下拉列表
/// <summary>
/// 初始化下拉列表
/// </summary>
private ProductAllModel selectedDataItem;
public ProductAllModel SelectedDataItem
{
get => msgTxt;
set => SetProperty(ref msgTxt, value);
get { return selectedDataItem; }
set => SetProperty(ref selectedDataItem, value);
}
#endregion
#region 字体颜色
private string? msgColor;
#region 分垛信息下传
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Save(Window window)
{
if (string.IsNullOrEmpty(ProductCode))
{
MessageBox.Show("请先选择产品型号");
return;
}
HandSendEvent?.Invoke("A", productCode);
MessageBox.Show("手动入库成功");
window.Close();
// 入库
}
public string? MsgColor
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Cancel(Window window)
{
get => msgColor;
set => SetProperty(ref msgColor, value);
window.Close();
}
#endregion
#region 提示信息
#region 初始化datagrid产品信息
/// <summary>
/// 提示信息
/// 初始化物料信息
/// </summary>
/// <param name="mesg">提示信息</param>
/// <param name="color">提示信息颜色</param>
public void PromptInfo(string mesg, string color)
private ObservableCollection<ProductAllModel> materialDataGrid = new ObservableCollection<ProductAllModel>();
public ObservableCollection<ProductAllModel> MaterialDataGrid
{
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
MsgTxt = mesg;
MsgColor = color;
}));
get { return materialDataGrid; }
set => SetProperty(ref materialDataGrid, value);
}
#endregion
#region 目的货道
private string spaceNo;
#region 选中条码
private string productCode;
public string SpaceNo
public string ProductCode
{
get => spaceNo;
set => SetProperty(ref spaceNo, value);
get => productCode;
set => SetProperty(ref productCode, value);
}
#endregion
#region 方向
private int range;
public int Range
#region 选中型号
private string productModel;
public string ProductModel
{
get => range;
set => SetProperty(ref range, value);
get => productModel;
set => SetProperty(ref productModel, value);
}
#endregion
}
}

@ -53,6 +53,10 @@ namespace Aucma.Core.Palletiz.ViewModels
_codeBindingRecordServices = App.ServiceProvider.GetService<ICodeBindingRecordServices>();
_offlineService = App.ServiceProvider.GetService<IProductOffLineServices>();
//_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
if (space == null)
{
SpaceInfo = new BaseSpaceInfo();
}
SpaceInfo = space;
SearchCriteriaViewModel.RefreshConfigDelegateEvent += SaveSearchCriteria;
@ -134,7 +138,7 @@ namespace Aucma.Core.Palletiz.ViewModels
{
MaterialDataGrid.Add(info);
}
});
});
// 加载页面单选框和下拉框
if (space != null)
{
@ -207,6 +211,7 @@ namespace Aucma.Core.Palletiz.ViewModels
if (info != null)
{
PlanInfo = info;
SpaceInfo.MaterialType = info.ProductCode;
SpaceInfo.typeNameA = info.ProductModel;
}

@ -1,6 +1,11 @@
using Aucma.Core.Palletiz.Models;
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 Elasticsearch.Net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@ -14,20 +19,41 @@ namespace Aucma.Core.Palletiz.ViewModels
public partial class StatisticsPageViewModel : ObservableObject
{
public StatisticsPageViewModel() { LoadData(); }
private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
List<MaterialComplateInfo> materialComplateInfos = new List<MaterialComplateInfo>();
public string storeCodeA = Appsettings.app("StoreInfo", "PalletizStoreCodeA");
public string storeCodeB = Appsettings.app("StoreInfo", "PalletizStoreCodeB");
#region 加载DataGrid数据
private void LoadData()
private async void LoadData()
{
try
{
List<RecordInStore> list = await _recordInstoreServices.QueryAsync(x => x.StoreCode == storeCodeA || x.StoreCode == storeCodeB);
if (list != null && list.Count > 0)
{
foreach (RecordInStore record in list)
{
MaterialDataGrid.Add(record);
}
}
}
catch (Exception ex)
{
Console.WriteLine("" + ex.Message.ToString());
}
//MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
}
#endregion
#region 初始化datagrid
private ObservableCollection<MaterialComplateInfo> materialDataGrid = new ObservableCollection<MaterialComplateInfo>();
public ObservableCollection<MaterialComplateInfo> MaterialDataGrid
private ObservableCollection<RecordInStore> materialDataGrid = new ObservableCollection<RecordInStore>();
public ObservableCollection<RecordInStore> MaterialDataGrid
{
get { return materialDataGrid; }
set

@ -5,96 +5,143 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei"
Title="手动分垛" Height="800" Width="800" Name="window" Background="White"
ResizeMode="NoResize" Topmost="True">
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
Title="手动分垛" Height="800" Width="1300" Name="window" Background="White"
ResizeMode="NoResize">
<Grid>
<Grid.ColumnDefinitions>
<Window.Resources>
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0" />
<Setter Property="Width" Value="30" />
</Style>
</Style.Resources>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="SmallChange" Value="1" />
</Style>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<!--<Setter Property="Height" Value="40"/>-->
<Setter Property="FontSize" Value="16"/>
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="48"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<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>
<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>
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="6*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="手动分垛" FontSize="25" Foreground="#FFFFFF" Margin="10,0,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0" Visibility="Collapsed">
<TextBlock Text="成品码:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<TextBox x:Name="txtBarCode" FontSize="20" Foreground="white" Height="50" Width="400" Style="{x:Null}" Margin="20 0" />
</StackPanel>
<StackPanel Grid.Row="1" 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_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 x:Name="btn_B" Content="B 库" FontSize="20" IsEnabled="False" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_B_Click"/>
</StackPanel>
<WrapPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<WrapPanel Height="50" Orientation="Horizontal" VerticalAlignment="Center" Margin="0 10 0 0">
<TextBlock Text="目的货道:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
</WrapPanel>
<TextBlock x:Name="btn_spaceTemp" Text="{Binding SpaceNo,Mode=TwoWay}" Visibility="Collapsed" />
<WrapPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5 0 0 0">
<Button x:Name="btn_space1" Content="1" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="0 0 10 0" Click="btn_space1_Click"/>
<Button x:Name="btn_space2" Content="2" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space2_Click"/>
<Button x:Name="btn_space3" Content="3" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space3_Click"/>
<Button x:Name="btn_space4" Content="4" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space4_Click"/>
<Button x:Name="btn_space5" Content="5" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space5_Click"/>
<Button x:Name="btn_space6" Content="6" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space6_Click"/>
<Button x:Name="btn_space7" Content="7" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space7_Click"/>
<Button x:Name="btn_space8" Content="8" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space8_Click"/>
<Border Grid.Row="1" 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 OrderCode}" Width="*" Header="订单编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding ProductCode}" Width="3*" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductName}" Width="5*" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductModel}" Width="3*" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductMasterModel}" Width="*" Header="产品大类" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</WrapPanel>
<WrapPanel Orientation="Horizontal" VerticalAlignment="Center" Height="50" Margin="140 5 0 0">
</Border>
<Grid Grid.Row="2">
<Label Content="产品编码:" Foreground="White" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0" />
<TextBox HorizontalAlignment="Left" Text="{Binding ProductCode}" Foreground="White" FontSize="22" Margin="230,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="266"/>
<Label Content="产品型号:" Foreground="White" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="530,0,0,0" />
<TextBox HorizontalAlignment="Left" Text="{Binding ProductModel}" Foreground="White" FontSize="22" Margin="660,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" Width="303"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 10 0">
<Button Content="确 认" FontSize="20" Command="{Binding SaveCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
<Button Content="取 消" FontSize="20" Command="{Binding CancelCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Foreground="white" Margin="10,0,0,0" Height="50" BorderBrush="#FF9900" Width="100" />
</StackPanel>
</Grid >
<Button x:Name="btn_space9" Content="9" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space9_Click"/>
<Button x:Name="btn_space10" Content="10" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space10_Click"/>
<Button x:Name="btn_space11" Content="11" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space11_Click"/>
<Button x:Name="btn_space12" Content="12" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space12_Click"/>
<Button x:Name="btn_space13" Content="13" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space13_Click"/>
<Button x:Name="btn_space14" Content="14" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space14_Click"/>
<!--<Button x:Name="btn_space15" Content="15" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space15_Click"/>
<Button x:Name="btn_space16" Content="16" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space16_Click"/>-->
</WrapPanel>
</WrapPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock x:Name="btn_RangeTemp" Text="{Binding Range,Mode=TwoWay}" />
<TextBlock Text="转向方向:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="Forward" Content="正向90" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_left_Click" />
<Button x:Name="Reverse" Content="逆向90" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0,0.5" Margin="20 0 20 0" Click="btn_right_Click"/>
<Button x:Name="Reverse180" Content="逆向180" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="115" RenderTransformOrigin="0,0.5" Margin="20 0 20 0" Click="btn_right180_Click"/>
<Button x:Name="Unchanged" Content="不 转" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0,0.5" Click="btn_unchanged_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0" Visibility="Collapsed">
<TextBlock Text="转向角度:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_range90" Content="90°" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_range90_Click" />
<Button x:Name="btn_range0" Content="0°" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_range0_Click"/>
</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" />
<TextBlock Text="{Binding MsgTxt}" Foreground="{Binding MsgColor,Mode=TwoWay}" FontWeight="Bold" FontSize="20" Width="400" Height="35"/>
</StackPanel>
<StackPanel Grid.Row="5" 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>
</Grid>
</Border>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -21,432 +21,22 @@ namespace Aucma.Core.Palletiz.Views
/// </summary>
public partial class HandPalletizView : Window
{
private string store = "A";
private int space = 1;
/// <summary>
/// 转向 1正向 2:反向 3:不变
/// </summary>
private int spaceDirection = 1;
/// <summary>
/// 转向角度 1 90
/// </summary>
private int range = 1;
HandPalletizViewModel viewModel = new HandPalletizViewModel();
public HandPalletizView()
{
InitializeComponent();
this.DataContext = new HandPalletizViewModel();
this.DataContext = viewModel;
}
#region 所属仓库选择
private void btn_A_Click(object sender, RoutedEventArgs e)
private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.btn_A.Background = Brushes.Lime;
this.btn_B.Background = Brushes.DarkCyan;
store = "A";
}
private void btn_B_Click(object sender, RoutedEventArgs e)
{
this.btn_A.Background = Brushes.DarkCyan;
this.btn_B.Background = Brushes.Lime;
store = "B";
}
#endregion
#region 目的货道选择
private void btn_space1_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.Lime;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "001";
}
private void btn_space2_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.Lime;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "002";
}
private void btn_space3_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.Lime;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "003";
}
private void btn_space4_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.Lime;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "004";
}
private void btn_space5_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.Lime;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "005";
}
private void btn_space6_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.Lime;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "006";
viewModel.MouseClick(sender);
}
private void btn_space7_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.Lime;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "007";
}
private void btn_space8_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.Lime;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "008";
}
private void btn_space9_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "009";
}
private void btn_space10_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "010";
}
private void btn_space11_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.Lime;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "011";
}
private void btn_space12_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.Lime;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "012";
}
private void btn_space13_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.Lime;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "013";
}
private void btn_space14_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.Lime;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "014";
}
private void btn_space15_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.Lime;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "015";
}
private void btn_space16_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.Lime;
this.btn_spaceTemp.Text = "016";
}
#endregion
#region 转向
private void btn_left_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.Lime;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "1";
}
private void btn_right_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "2";
}
private void btn_right180_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "4";
}
private void btn_unchanged_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.Lime;
this.btn_RangeTemp.Text = "3";
}
#endregion
#region 转向角度设置Brushes.DarkCyan
private void btn_range90_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.Lime;
btn_range0.Background = Brushes.DarkCyan;
//btn_range270.Background = Brushes.DarkCyan;
range = 90;
}
private void btn_range0_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.DarkCyan;
btn_range0.Background = Brushes.Lime;
// btn_range270.Background = Brushes.DarkCyan;
range = 0;
}
#endregion
private void Button_Click_1(object sender, RoutedEventArgs e)
{
this.window.Close();
}
}
}

@ -212,7 +212,7 @@
</Border>
</Grid>-->
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,0">
<Button Content="异常入库" FontSize="18" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="异常入库" FontSize="18" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0" Click="Minimized_Click"/>
<Button Content="转向设置" FontSize="18" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#5283D7" BorderBrush="#5283D7" Margin="0,0,10,0" Click="Exit_Click"/>
<Button Content="{Binding InStoreAmount}" FontSize="18" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="Transparent" Margin="0,0,10,0"/>
</StackPanel>

@ -33,5 +33,11 @@ namespace Aucma.Core.Palletiz.Views
SetRangeWindow window = new SetRangeWindow();
window.ShowDialog();
}
private void Minimized_Click(object sender, RoutedEventArgs e)
{
HandPalletizView window = new HandPalletizView();
window.ShowDialog();
}
}
}

@ -234,8 +234,9 @@
</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" />
<Button Content="手动入库" FontSize="23" Command="{Binding HandCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" Visibility="Collapsed"/>
<Button Content="清除型号" FontSize="23" Command="{Binding DeleteCommand}" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" />
<Button Content="保 存" FontSize="23" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="130" />
</StackPanel>
</Grid>
</Border>

@ -83,12 +83,16 @@
<Label Foreground="White" FontSize="20" Content="奇数货道旋转角度" HorizontalAlignment="Left" Margin="725,0,0,0" VerticalAlignment="Center"/>
<ComboBox x:Name="OddComboBox" SelectedItem="{Binding SelectedOddNumber, Mode=TwoWay, Converter={StaticResource StringToIntConverter}}" HorizontalAlignment="Left" Margin="915,34,0,0" VerticalAlignment="Top" Width="120" FontSize="25" Foreground="White">
<ComboBoxItem Content="0" Foreground="Blue"/>
<ComboBoxItem Content="90" Foreground="Blue"/>
<ComboBoxItem Content="180" Foreground="Blue" />
<ComboBoxItem Content="270" Foreground="Blue"/>
</ComboBox>
<Label Foreground="White" FontSize="20" Content="偶数货道旋转角度" HorizontalAlignment="Left" Margin="1089,0,0,0" VerticalAlignment="Center"/>
<ComboBox x:Name="EvenComboBox" SelectedItem="{Binding SelectedEvenNumber, Mode=TwoWay, Converter={StaticResource StringToIntConverter}}" HorizontalAlignment="Left" Margin="1298,0,0,0" Width="120" FontSize="25" Foreground="White">
<ComboBoxItem Content="0" Foreground="Blue"/>
<ComboBoxItem Content="90" Foreground="Blue"/>
<ComboBoxItem Content="180" Foreground="Blue" />
<ComboBoxItem Content="270" Foreground="Blue"/>
</ComboBox>

@ -7,8 +7,8 @@
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
xmlns:cvt="clr-namespace:Aucma.Core.Palletiz.ConvertTo"
mc:Ignorable="d" FontFamily="Microsoft YaHei"
d:DesignHeight="450"
d:DesignWidth="800">
d:DesignHeight="1000"
d:DesignWidth="1800">
<UserControl.Resources>
<cvt:MultiBindingConverter x:Key="QueryConvert"></cvt:MultiBindingConverter>
@ -106,19 +106,19 @@
</Button>-->
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid Grid.Row="0" ItemsSource="{Binding MaterialDataGrid}"
<DataGrid ItemsSource="{Binding MaterialDataGrid}"
ColumnHeaderHeight="45" FontSize="18"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="0.5*"/>
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="计划编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="3*" />
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="*" />
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="*" />
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" Visibility="Collapsed"/>
<DataGridTextColumn Binding="{Binding BarCodeCode}" Header="成品条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialType}" Header="成品型号" Width="3*" />
<DataGridTextColumn Binding="{Binding StoreArea}" Header="区域" Width="1*" />
<DataGridTextColumn Binding="{Binding InStoreAmount}" Header="旋转角度" Width="*" />
<DataGridTextColumn Binding="{Binding InStoreTime,StringFormat=\{0:yyyy-MM-dd HH:mm\}}" Header="入库时间" Width="2*" />
</DataGrid.Columns>
</DataGrid>

@ -15,7 +15,7 @@ namespace XamlGeneratedNamespace {
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.3.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "7.0.9.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {

@ -14,11 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
<<<<<<< HEAD
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
=======
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+08f039f79c4354fdb0c81441e2a211c05029eb3e")]
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769
[assembly: System.Reflection.AssemblyProductAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyTitleAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1,5 +1 @@
<<<<<<< HEAD
42cf648ef8280b16e9d1d1de3415777f5d872126
=======
1ed05d3a7db966fb4671d718249d9d84519ef6c2db9dded8bc345c3230d77c75
>>>>>>> 2448b63167118db0eb16b42f2000c5acb80d1769

@ -8,6 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = HwControlLib
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\HwControlLib\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\HwControlLib\

Loading…
Cancel
Save