change - 计划维护与型号设置页面进行整合

dev
wenjy 1 year ago
parent 82f6d76ce7
commit a7115aa432

@ -404,6 +404,9 @@
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj"
},
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\Aucma.Core.SheetMetalTasks.csproj": {
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\Aucma.Core.SheetMetalTasks.csproj"
},
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.Tasks\\Aucma.Core.Tasks.csproj": {
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.Tasks\\Aucma.Core.Tasks.csproj"
}
@ -1288,6 +1291,73 @@
}
}
},
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\Aucma.Core.SheetMetalTasks.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\Aucma.Core.SheetMetalTasks.csproj",
"projectName": "Aucma.Core.SheetMetalTasks",
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\Aucma.Core.SheetMetalTasks.csproj",
"packagesPath": "C:\\Users\\Lenovo\\.nuget\\packages\\",
"outputPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.SheetMetalTasks\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\开发工具\\Visual Studio 2019\\Shared\\NuGetPackages",
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\Lenovo\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {},
"https://nuget.cnblogs.com/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {
"E:\\桌面\\AUCMA_SCADA\\Admin.Core.IService\\Admin.Core.IService.csproj": {
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Admin.Core.IService\\Admin.Core.IService.csproj"
},
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.HwPLc\\Aucma.Core.HwPLc.csproj": {
"projectPath": "E:\\桌面\\AUCMA_SCADA\\Aucma.Core.HwPLc\\Aucma.Core.HwPLc.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.202\\RuntimeIdentifierGraph.json"
}
}
},
"E:\\桌面\\AUCMA_SCADA\\Aucma.Core.Tasks\\Aucma.Core.Tasks.csproj": {
"version": "1.0.0",
"restore": {

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "HsMojseCVmTxRPG4iGkEf/2OvAGUxYsYPY9resKB+wCYzU12wwdfiUulJ6iIYjBrrvQkt9KbYTYesAxpAJXRFg==",
"dgSpecHash": "oueLDU8mph/io26ibzbAU2Safbv54NrQ8WqJvAmB9aLYgFXhEN4xok5NM5DszLqoABq3v4dCPlE3x27fEGmkcQ==",
"success": true,
"projectFilePath": "E:\\桌面\\AUCMA_SCADA\\Admin.Core.Api\\Admin.Core.Api.csproj",
"expectedPackageFiles": [

@ -174,7 +174,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
public void AddPlan(string objId)
{
int shiftType = 1;//当班是1
SplitPlanView plan = new SplitPlanView(objId, shiftType,"");
SplitPlanView plan = new SplitPlanView(objId, shiftType,"","");
plan.Show();
}

@ -540,8 +540,11 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
var info = SelectedDataItem as OldBoxFoamTypeModel;
if (info != null)
{
SelectType selectType = new SelectType(info.ObjId.ToString(),info.Boxtype);
selectType.ShowDialog();
//SelectType selectType = new SelectType(info.ObjId.ToString(),info.Boxtype);
//selectType.ShowDialog();
SplitPlanView splitPlanView = new SplitPlanView("1", 1, info.Boxtype,info.ObjId.ToString());
splitPlanView.ShowDialog();
}
}

@ -71,7 +71,6 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
QueryCommand = new RelayCommand(searchData);
SaveCommand = new RelayCommand(updateDirection);
deleteCommand = new RelayCommand(deleteModel);
SetPlanInfoCommand = new RelayCommand(SetPlanInfo);
spaceCodes = spaceCode;
this.SearchText = boxType;
MouseClickCommand = new RelayCommand<object>(MouseClick);
@ -276,25 +275,5 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
}
}
/// <summary>
/// 维护计划
/// </summary>
private async void SetPlanInfo()
{
if (string.IsNullOrEmpty(spaceCodes))
{
MessageBox.Show("请至少选择一个型号!");
return;
}
if (string.IsNullOrEmpty(PlanInfo.MaterialCode))
{
MessageBox.Show("请至少选择一个型号!");
return;
}
SplitPlanView splitPlanView = new SplitPlanView("1", 1,PlanInfo.MaterialCode);
splitPlanView.ShowDialog();
}
}
}

@ -17,6 +17,8 @@ using Admin.Core.Common;
using Aucma.Core.OldBoxFoam.Common;
using Aucma.Core.OldBoxFoam.Models;
using Aucma.Core.OldBoxFoam.Views;
using Admin.Core.Model.Model_New;
using Admin.Core.Service;
namespace Aucma.Core.OldBoxFoam.ViewModels
{
@ -26,15 +28,22 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
protected readonly IProductPlanInfoServices? _productPlanInfoServices;
//protected readonly ISmTaskExecutionServices? _smTaskExecutionServices;
protected readonly IExecutePlanInfoServices? _executePlanInfoServices;
protected readonly IOldBoxFoamTypeServices _oldBoxFoamTypeServices;
protected readonly IBoxFoamPlanServices? _boxFoamPlanServices;
private AppConfigHelper appConfig = new AppConfigHelper();
private string materialCodeSearchText = string.Empty;
private string boxTypeSearchText = string.Empty;
private string spaceCodes = string.Empty;
public SplitPlanViewModel(string objId, int shiftType, string materialCode)
public SplitPlanViewModel(string objId, int shiftType, string boxType,string spaceCode)
{
this.materialCodeSearchText = materialCode;
this.boxTypeSearchText = boxType;
this.spaceCodes = spaceCode;
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
_executePlanInfoServices = App.ServiceProvider.GetService<IExecutePlanInfoServices>();
_oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
_boxFoamPlanServices = App.ServiceProvider.GetService<IBoxFoamPlanServices>();
Task.WaitAll(LoadData());
//加载快捷方式
SaveSearchCriteria();
@ -51,9 +60,9 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
string station = Appsettings.app("StationInfo", "StationCode"); ;
var planlist = await _productPlanInfoServices.QueryAsync(d => d.ProductLineCode.Equals(station));
if (!string.IsNullOrEmpty(materialCodeSearchText))
if (!string.IsNullOrEmpty(boxTypeSearchText))
{
planlist = planlist.Where(x=>x.MaterialCode == materialCodeSearchText).ToList();
planlist = planlist.Where(x=>x.MaterialName.Contains(boxTypeSearchText)).ToList();
}
var execList = await _executePlanInfoServices.QueryAsync(d => d.ProductLineCode.Equals(station));
@ -352,9 +361,11 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
var info = SelectedDataItem as ProductPlanInfoModel;
if (info != null)
{
info.PlanType = _radioButtonStatus;
QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
quantityIssuedWindow.ShowDialog();
//info.PlanType = _radioButtonStatus;
//QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
//quantityIssuedWindow.ShowDialog();
PlanInfo = info;
}
}
@ -440,7 +451,128 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
{
_radioButtonStatus = 3;
}
}
}
#endregion
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);
}
[RelayCommand]
private void KeypadButton(object obj)
{
var info = obj as string;
TransmitAmount += info;
}
/// <summary>
/// 清除
/// </summary>
[RelayCommand]
private void ClearTransmitAmount()
{
string amount = _TransmitAmount.ToString();
if (amount.Length > 0)
{
TransmitAmount = amount.Substring(0, amount.Length - 1);
}
}
/// <summary>
/// 设置货道物料型号
/// </summary>
[RelayCommand]
private async void SaveMaterialCodeBySpaceInfo()
{
if (string.IsNullOrEmpty(spaceCodes))
{
MessageBox.Show("请至少选择一个型号!");
return;
}
// 查询货道信息
List<OldBoxFoamType> spaceList = await _oldBoxFoamTypeServices.QueryAsync();
OldBoxFoamType space = spaceList.Where(x => x.ObjId == int.Parse(spaceCodes)).FirstOrDefault();
space.MaterialCode = PlanInfo.MaterialCode;
space.MaterialName = PlanInfo.MaterialName;
bool result = await _oldBoxFoamTypeServices.UpdateAsync(space);
if (result)
{
MessageBox.Show("型号设置成功");
}
}
/// <summary>
/// 保存数据
/// </summary>
[RelayCommand]
private async void AddPlanInfo()
{
if (string.IsNullOrEmpty(TransmitAmount))
{
MessageBox.Show("请输入下达的计划数量,不允许为空!!!");
return;
}
var productPlanInfo = _planInfo;
if (_planInfo != null)
{
BoxFoamPlan plan = new BoxFoamPlan();
plan.MaterialCode = _planInfo.MaterialCode;
plan.MaterialName = _planInfo.MaterialName;
plan.PlanAmount = Convert.ToInt32(TransmitAmount);
plan.ProductLineCode = "CX_01";
plan.StationCode = "1105";
plan.UpdateTime = DateTime.Now;
plan.CreateTime = DateTime.Now;
plan.OrderCode = _planInfo.OrderCode;
plan.PlanCode = _planInfo.PlanCode;
plan.ShiftType = 1;
var result = _boxFoamPlanServices.AddAsync(plan).Result;
if (result >= 0)
{
MessageBox.Show("计划添加成功!", "系统提醒");
WeakReferenceMessenger.Default.Send<string>("RefreshTask");//刷新任务界面
if (!string.IsNullOrEmpty(spaceCodes))
{
// 查询货道信息
List<OldBoxFoamType> spaceList = await _oldBoxFoamTypeServices.QueryAsync();
OldBoxFoamType space = spaceList.Where(x => x.ObjId == int.Parse(spaceCodes)).FirstOrDefault();
space.MaterialCode = PlanInfo.MaterialCode;
space.MaterialName = PlanInfo.MaterialName;
await _oldBoxFoamTypeServices.UpdateAsync(space);
}
}
else
{
MessageBox.Show("任务添加失败!", "系统提醒");
}
}
}
/// <summary>
/// 关闭
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
private void CloseWindow(object parameter)
{
var window = parameter as Window;
if (window != null)
{
window.Close();
}
}
}
}

@ -29,7 +29,7 @@ namespace Aucma.Core.OldBoxFoam.Views
private void Button_Click(object sender, RoutedEventArgs e)
{
SplitPlanView type = new SplitPlanView("1",1,"");
SplitPlanView type = new SplitPlanView("1",1,"","");
type.ShowDialog();
}
}

@ -184,8 +184,7 @@
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保 存" FontSize="20" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="120" />
<Button Content="维护计划" FontSize="20" Command="{Binding SetPlanInfoCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="20,0,10,0" Height="50" Width="120"/>
</StackPanel>
</Grid>
</Border>

@ -6,9 +6,9 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Background="#1152AC"
Title="计划维护" FontFamily="Microsoft YaHei" Height="700" Width="900"
Title="计划维护" FontFamily="Microsoft YaHei" Height="900" Width="1500"
d:DesignHeight="800" WindowStartupLocation="CenterScreen"
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="True" >
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="False" Name="window">
<Window.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
@ -121,84 +121,129 @@
</Style>
</Window.Resources>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Margin="1,1,5,5" >
<TextBlock Text="添加计划" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Margin="1,0,5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5" VerticalAlignment="Center">
<Label Content="产品型号" VerticalAlignment="Center" Foreground="White" FontSize="18" />
<TextBox x:Name="queryParam" PreviewMouseDoubleClick="queryParam_PreviewMouseDoubleClick_1" Text="{Binding Search, Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>
<Button Content="查 询" Command="{Binding QueryPlanCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" Margin="5 0" />
<Button Content="重 置" Command="{Binding ResetCommand}" Margin="5 0" />
<Button Content="配 置" Command="{Binding SearchCriteriaSetCommand}" Margin="5 0" />
</WrapPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Margin="1,1,5,5" >
<TextBlock Text="计划维护" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Margin="1,0,5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5" VerticalAlignment="Center">
<Label Content="产品型号" VerticalAlignment="Center" Foreground="White" FontSize="18" />
<TextBox x:Name="queryParam" PreviewMouseDoubleClick="queryParam_PreviewMouseDoubleClick_1" Text="{Binding Search, Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>
<Button Content="查 询" Command="{Binding QueryPlanCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" Margin="5 0" />
<Button Content="重 置" Command="{Binding ResetCommand}" Margin="5 0" />
<Button Content="配 置" Command="{Binding SearchCriteriaSetCommand}" Margin="5 0" />
</WrapPanel>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.15*"/>
<ColumnDefinition Width="*"/>
</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}">
<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="12" Foreground="#FFFFFF"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</WrapPanel>
</Grid>
</Border>
<UniformGrid Grid.Row="2" Margin="5" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
<UniformGrid Grid.Row="1" Margin="5" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
ColumnHeaderHeight="35" x:Name="dgvMH" FontSize="20"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" VerticalAlignment="Stretch"
BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" SelectedItem="{Binding SelectedDataItem}" MouseLeftButtonDown="dgvMH_MouseLeftButtonDown_1">
<!--ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanCode}" Header="MES工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn Binding="{Binding OrderCode}" Header="SAP计划编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="60" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanCode}" Header="MES工单编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn Binding="{Binding OrderCode}" Header="SAP计划编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BeginTime,StringFormat=\{0:MM-dd HH:mm\}}" Header="开始时间" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,0,10,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,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="180"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,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="180"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
<TextBlock Text="计划编号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox Text="{Binding PlanInfo.PlanCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
<TextBlock Text="下达数量:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox Text="{Binding TransmitAmount}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
</StackPanel>
<Border Grid.Row="5" BorderBrush="Black" BorderThickness="0" Margin="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="129.19"/>
<ColumnDefinition/>
</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="120"/>
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<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="120" />
<Button Grid.Row="3" Grid.Column="2" Content="清除" FontSize="18" Margin="2,2" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Command="{Binding ClearTransmitAmountCommand}" Height="70" Width="120" />
</Grid>
</Border>
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保存型号" FontSize="20" Command="{Binding SaveMaterialCodeBySpaceInfoCommand}" Foreground="white" Margin="0,0,10,0" Height="50" Width="110" />
<Button Content="下达计划" FontSize="20" Command="{Binding AddPlanInfoCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="10,0,10,0" Height="50" Width="110" />
<Button Content="取 消" FontSize="20" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF0033" BorderBrush="#FF0033" Foreground="white" Margin="10,0,0,0" Height="50" Width="110" />
</StackPanel>
</Grid>
</Border>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BeginTime,StringFormat=\{0:MM-dd HH:mm\}}" Header="开始时间" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Window>

@ -1,5 +1,6 @@
using Aucma.Core.OldBoxFoam.Common;
using Aucma.Core.OldBoxFoam.ViewModels;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using System.Windows;
using System.Windows.Input;
@ -13,10 +14,10 @@ namespace Aucma.Core.OldBoxFoam.Views
{
private SplitPlanViewModel planInfoEditViewModel = null;
public SplitPlanView(string objId,int shiftType,string materialCode)
public SplitPlanView(string objId,int shiftType,string boxType,string spaceCode)
{
InitializeComponent();
planInfoEditViewModel = new SplitPlanViewModel(objId, shiftType, materialCode);
planInfoEditViewModel = new SplitPlanViewModel(objId, shiftType, boxType, spaceCode);
this.DataContext = planInfoEditViewModel;
WeakReferenceMessenger.Default.Register<object>(this,Recive);
}
@ -45,5 +46,6 @@ namespace Aucma.Core.OldBoxFoam.Views
{
CommHelper.OpenOsk();
}
}
}

Loading…
Cancel
Save