liulb@mesnac.com 1 year ago
commit 0f406eeb8e

@ -301,6 +301,36 @@
祖级列表
</summary>
</member>
<member name="T:Admin.Core.Model.BaseMaterialInfo">
<summary>
成品信息
</summary>
</member>
<member name="P:Admin.Core.Model.BaseMaterialInfo.ObjId">
<summary>
主键标识
</summary>
</member>
<member name="P:Admin.Core.Model.BaseMaterialInfo.MaterialCode">
<summary>
物料编号
</summary>
</member>
<member name="P:Admin.Core.Model.BaseMaterialInfo.MaterialName">
<summary>
物料名称
</summary>
</member>
<member name="P:Admin.Core.Model.BaseMaterialInfo.InboundDirection">
<summary>
入库方向-A/B
</summary>
</member>
<member name="P:Admin.Core.Model.BaseMaterialInfo.MaterialType">
<summary>
物料sap类型FERT成品
</summary>
</member>
<member name="T:Admin.Core.Model.Model_New.BaseOrderInfo">
<summary>
SAP订单信息

@ -0,0 +1,12 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
namespace Admin.Core.IRepository
{
/// <summary>
/// IBaseBomInfoRepository
/// </summary>
public interface IBaseMaterialInfoRepository : IBaseRepository<BaseMaterialInfo>
{
}
}

@ -0,0 +1,16 @@
using Admin.Core.IService;
using Admin.Core.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IService
{
/// <summary>
/// IBaseMaterialInfoServices
/// </summary>
public interface IBaseMaterialInfoServices : IBaseServices<BaseMaterialInfo>
{
public Task<List<BaseMaterialInfo>> query();
}
}

@ -1,5 +1,6 @@
using Admin.Core.IService;
using Admin.Core.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IService
@ -39,5 +40,7 @@ namespace Admin.Core.IService
/// <param name="spaceInfo"></param>
/// <returns></returns>
Task<bool> UpdateSpaceInfo(BaseSpaceInfo spaceInfo);
}
}

@ -0,0 +1,45 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Model
{
/// <summary>
/// 成品信息
/// </summary>
[SugarTable("BASE_MATERIALINFO", "AUCMA_MES")]
public class BaseMaterialInfo
{
/// <summary>
/// 主键标识
///</summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int ObjId { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_CODE")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_NAME")]
public string MaterialName { get; set; }
/// <summary>
/// 入库方向-A/B
/// </summary>
[SugarColumn(ColumnName = "INBOUND_DIRECTION")]
public string InboundDirection { get; set; }
/// <summary>
/// 物料sap类型FERT成品
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_TYPE")]
public string MaterialType { get; set; }
}
}

@ -0,0 +1,16 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Admin.Core.Repository;
namespace Admin.Core.IRepository
{
/// <summary>
/// OrderBomInfoRepository
/// </summary>
public class BaseMaterialInfoRepository : BaseRepository<BaseMaterialInfo>, IBaseMaterialInfoRepository
{
public BaseMaterialInfoRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -0,0 +1,39 @@
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using log4net;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.IdentityModel.Logging;
using NPOI.SS.Formula.Functions;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.Service
{
public class BaseMaterialInfoServices : BaseServices<BaseMaterialInfo>, IBaseMaterialInfoServices
{
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BaseMaterialInfoServices));
private readonly IBaseRepository<BaseMaterialInfo> _dal;
private readonly IBaseMaterialInfoRepository _baseMaterialInfoRepository;
public BaseMaterialInfoServices(IBaseRepository<BaseMaterialInfo> dal, IBaseMaterialInfoRepository baseMaterialInfoRepository)
{
this._dal = dal;
base.BaseDal = dal;
_baseMaterialInfoRepository = baseMaterialInfoRepository;
}
/// <summary>
/// 1.查出BASE_MATERIALINFO中存在的成品类型
/// </summary>
public async Task<List<BaseMaterialInfo>> query()
{
List<BaseMaterialInfo> list = await _baseMaterialInfoRepository.QueryAsync(x => x.MaterialType == "FERT");
return list;
}
}
}

@ -13,6 +13,7 @@ using System.Linq;
using log4net;
using StackExchange.Profiling.Internal;
using Admin.Core.Model.Sys;
using Admin.Core.Model.ViewModels;
namespace Admin.Core.Service
{
@ -200,10 +201,9 @@ namespace Admin.Core.Service
logHelper.Error("更新货道信息异常", ex);
}
return result;
}
}
#endregion
}
}

@ -29,6 +29,8 @@ using SqlSugar;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Admin.Core.Model.ViewModels;
using System.Windows.Media;
using System.Drawing;
using Brushes = System.Windows.Media.Brushes;
/*
*
*/
@ -47,7 +49,6 @@ namespace Aucma.Core.CodeBinding.ViewModels
MvCodeHelper.ReceiveCode1Event += receiveCode1;
MvCodeHelper.ReceiveCode2Event += receiveCode2;
// var list = _codeBindingRecordServices.FirstAsync().Result;
LoadData();
// 程序运行 5 秒后添加新数据项
@ -96,6 +97,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
column.DataLabels = true;
column.Title = "型号";
column.Values = achievement;
column.Foreground = Brushes.White;
ModelStatistics.Add(column);
ProductionHourList = chartList;
}
@ -303,11 +305,12 @@ namespace Aucma.Core.CodeBinding.ViewModels
// 1.数据库查询各个工序质检结果,不合格报警
// 2.查询条码绑定记录表绑定SN码
// 2.查询条码绑定记录表(内胆箱壳绑定就应该插入记录)绑定SN码
List<CodeBindingRecord> list = await _codeBindingRecordServices.QueryAsync(x=> x.BoxCode==code1);
CodeBindingRecord record = list.FirstOrDefault();
// List<CodeBindingRecord> list = await _codeBindingRecordServices.QueryByTime();
// CodeBindingRecord record = list.FirstOrDefault();
record.BoxName = "去别的数据库查询";
record.ProductCode = code2;
record.RecordTime2 = System.DateTime.Now;
record.BindingResult = "成功";

@ -73,7 +73,7 @@
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
<lvc:CartesianChart Series="{Binding ModelStatistics, UpdateSourceTrigger=PropertyChanged}" Margin="5" Foreground="White">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15"/>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15" />
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.ProductOffLine.Models
{
public class DirectionEditModel
{
/// <summary>
/// 序号
/// </summary>
public int No { get; set; }
/// <summary>
/// 物料成品主键
/// </summary>
public int ObjId { get; set; }
/// <summary>
/// 物料编号
/// </summary>
public string? MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string? MaterialName { get; set; }
/// <summary>
/// 货道编号
/// </summary>
public string? SpaceCode { get; set; }
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.ProductOffLine.Models
{
public class SelectQualityModel
{
/// <summary>
/// 序号
/// </summary>
public int No { get; set; }
/// <summary>
/// 物料成品主键
/// </summary>
public int ObjId { get; set; }
/// <summary>
/// 物料编号
/// </summary>
public string? MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string? MaterialName { get; set; }
/// <summary>
/// 货道编号
/// </summary>
public string? SpaceCode { get; set; }
}
}

@ -0,0 +1,105 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Service;
using Aucma.Core.ProductOffLine.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
namespace Aucma.Core.ProductOffLine.ViewModels
{
public partial class DirectionEditViewModel : ObservableObject
{
public ICommand QueryCommand { get; set; }
public ICommand SaveCommand { get; set; }
private readonly IBaseMaterialInfoServices? _baseMaterialInfoServices;
public DirectionEditViewModel() {
_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
QueryCommand = new RelayCommand(ExecuteQuery);
SaveCommand = new RelayCommand(ExecuteSave);
Init();
}
/// <summary>
/// 3.查询BASE_MATERIALINFO表存在的成品类型以供修改
/// </summary>
public void Init()
{
ExecuteQuery();
}
private async void ExecuteQuery()
{
MaterialDataGrid.Clear();
// 处理查询按钮点击事件
// 1.先查出BASE_MATERIALINFO中存在但BASE_SPACEINFO不存在的成品类型(说明该类型未分配货道)
List<BaseMaterialInfo> materialInfoList = await _baseMaterialInfoServices.query();
int count = 0;
Application.Current.Dispatcher.Invoke(() =>
{
foreach (BaseMaterialInfo materialInfo in materialInfoList)
{
MaterialDataGrid.Add(new DirectionEditModel() { No = ++count, ObjId = materialInfo.ObjId, MaterialCode = materialInfo.MaterialCode, MaterialName = materialInfo.MaterialName, SpaceCode = materialInfo.InboundDirection });
}
});
}
private async void ExecuteSave()
{
List<BaseMaterialInfo> list = new List<BaseMaterialInfo>();
// 处理保存按钮点击事件
foreach (DirectionEditModel item in MaterialDataGrid)
{
if ((!"A".Equals(item.SpaceCode) && !"B".Equals(item.SpaceCode)))
{
MessageBox.Show("产品编号:" + item.MaterialCode + " 产品型号:" + item.MaterialName + " 入库方向必须为A或B");
return;
}
list.Add(new BaseMaterialInfo()
{
ObjId = item.ObjId,
MaterialCode = item.MaterialCode,
MaterialName = item.MaterialName,
InboundDirection = item.SpaceCode,
MaterialType = "FERT"
});
}
bool result = await _baseMaterialInfoServices.UpdateAsync(list);
if(result)
{
MessageBox.Show("保存成功");
}
else
{
MessageBox.Show("保存失败");
}
}
#region 初始化datagrid
private ObservableCollection<DirectionEditModel> materialDataGrid = new ObservableCollection<DirectionEditModel>();
public ObservableCollection<DirectionEditModel> MaterialDataGrid
{
get { return materialDataGrid; }
set
{
materialDataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
}
}

@ -51,6 +51,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
MvCodeHelper.ReceiveCodeEvent += ReceiveCode;
// test33();
ReceiveCode("12345", 1);
StartPlcTimer();
InitEveryDayMethod();
test2();
@ -75,7 +76,6 @@ namespace Aucma.Core.ProductOffLine.ViewModels
private void readPlcStatus(object source, System.Timers.ElapsedEventArgs e)
{
startGrab();
}
/// <summary>
/// 读取开启扫码信号
@ -275,13 +275,12 @@ namespace Aucma.Core.ProductOffLine.ViewModels
/// 扫描的条码处理
/// </summary>
/// <param name="code"></param>
/// <param name="direction">扫码器方向1左边分A库2右边分B库</param>
/// <param name="direction">扫码器方向</param>
private async void ReceiveCode(string code, int scannerNo)
{
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA
//条码系统返回校验数据
// string result = await _productOffLineServices.QueryChecked(code);
string result = "Y@1104@16160030000000910780@000010034895@@ @000000@000000009000000807@BCD-160C,家电下乡@@BCD-160C@皓月白-家电下乡@161601300@160@1-00版@家电下乡产品@默认@2010-09-01";
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA 返回校验数据
// string result = await _productOffLineServices.QueryChecked(code);
string result = "Y@1104@16160030000000910780@000010034895@@ @000000@000000009000000807@BCD-160C,家电下乡@@BCD-160C@皓月白-家电下乡@161601300@160@1-00版@家电下乡产品@默认@2010-09-01";
// 如果校验失败,下发报警
if ("N".Equals(result.Substring(0, 1)))
{

@ -1,5 +1,6 @@
using Admin.Core.Model;
using Aucma.Core.ProductOffLine.Models;
using Aucma.Core.ProductOffLine.Views;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
@ -7,34 +8,66 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
namespace Aucma.Core.ProductOffLine.ViewModels
{
public partial class QualityPageViewModel : ObservableObject
{
public QualityPageViewModel() { LoadData(); }
public QualityPageViewModel() {
AutoDirectionCommand = new RelayCommand(DirectionEdit);
SelectQualityCommand = new RelayCommand(SelectQuality);
init();
LoadData();
}
public void init()
{
}
List<MaterialComplateInfo> materialComplateInfos = new List<MaterialComplateInfo>();
#region 加载DataGrid数据
private void LoadData()
#region 参数定义
/// <summary>
/// 自动方向设置
/// </summary>
public RelayCommand AutoDirectionCommand { get; set; }
private void DirectionEdit()
{
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});
DirectionEditView directionEditView = new DirectionEditView();
directionEditView.ShowDialog();
}
/// <summary>
/// 质检项目设置
/// </summary>
public RelayCommand SelectQualityCommand { get; set; }
private void SelectQuality()
{
SelectQualityView selectQualityView = new SelectQualityView();
selectQualityView.ShowDialog();
}
/// <summary>
/// 分垛模式(自动模式,手动模式)SelectedMaterialType.content.tostring()
/// </summary>
/// private string _selectedMaterialType;
private string _selectedMaterialType;
public string SelectedMaterialType
{
get { return _selectedMaterialType; }
set
{
if (_selectedMaterialType != value)
{
_selectedMaterialType = value;
SetProperty(ref _selectedMaterialType, value);
}
}
}
#endregion
#region 初始化datagrid
private ObservableCollection<MaterialComplateInfo> materialDataGrid = new ObservableCollection<MaterialComplateInfo>();
@ -49,6 +82,25 @@ namespace Aucma.Core.ProductOffLine.ViewModels
}
#endregion
#endregion
#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 });
}
#endregion
#region 查询
/// <summary>
/// 查询

@ -0,0 +1,70 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Service;
using Aucma.Core.ProductOffLine.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
namespace Aucma.Core.ProductOffLine.ViewModels
{
public partial class SelectQualityViewModel : ObservableObject
{
public ICommand QueryCommand { get; set; }
public ICommand SaveCommand { get; set; }
private readonly IBaseMaterialInfoServices? _baseMaterialInfoServices;
public SelectQualityViewModel() {
_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
QueryCommand = new RelayCommand(ExecuteQuery);
SaveCommand = new RelayCommand(ExecuteSave);
Init();
}
/// <summary>
/// 3.查询BASE_MATERIALINFO表存在的成品类型以供修改
/// </summary>
public void Init()
{
}
private async void ExecuteQuery()
{
}
private async void ExecuteSave()
{
}
#region 初始化datagrid
private ObservableCollection<DirectionEditModel> materialDataGrid = new ObservableCollection<DirectionEditModel>();
public ObservableCollection<DirectionEditModel> MaterialDataGrid
{
get { return materialDataGrid; }
set
{
materialDataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
}
}

@ -0,0 +1,62 @@
<Window x:Class="Aucma.Core.ProductOffLine.Views.DirectionEditView"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="自动方向设置" Height="650" Width="900" 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>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="87*"/>
<ColumnDefinition Width="803*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Grid.Column="2">
<Button Content="刷 新" Command="{Binding QueryCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" />
<Button Content="保 存" Command="{Binding SaveCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" Margin="50 0 0 0"/>
</StackPanel>
<!--计划列表-->
<Border Grid.Row="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="1,1,5,5" Grid.ColumnSpan="2">
<DataGrid Name="dataGrid" ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}" MouseLeftButtonDown="dataGrid_MouseLeftButtonDown">
<!-- 表头剧中-->
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center">
</Setter>
<Setter Property="Background" Value="Transparent" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="产品编号" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding SpaceCode}" Header="入库方向" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>
</Window>

@ -0,0 +1,25 @@
using Aucma.Core.ProductOffLine.ViewModels;
using System.Windows;
using System.Windows.Input;
namespace Aucma.Core.ProductOffLine.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class DirectionEditView : Window
{
public DirectionEditView()
{
InitializeComponent();
this.DataContext = new DirectionEditViewModel();
}
private void dataGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
// planInfoEditViewModel.MouseClick(sender);
}
}
}

@ -6,8 +6,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="SCADA" Height="1080" Width="1920" Icon="/Assets/images/Icon.png"
WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" Topmost="True"
>
WindowState="Maximized" WindowStyle="SingleBorderWindow" ResizeMode="CanResize" Topmost="True">
<Window.Background>
<ImageBrush ImageSource="/Assets/images/background.jpg" />
</Window.Background>

@ -14,120 +14,82 @@
<!--列头标题栏样式-->
<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="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="30"/>
<Setter Property="FontSize" Value="14"/>
</Style>
</UserControl.Resources>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="5">
<Border Grid.Row="0" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="分垛质检配置" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<TextBlock Text="分垛模式设置:" Margin="10 0" Foreground="Gray" FontSize="15" VerticalAlignment="Center"/>
<Grid Grid.Row="0">
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="基本配置" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
<!--<Button x:Name="btn1" Content="入库记录" HorizontalAlignment="Left" Margin="37,13,0,0" Grid.Row="1" VerticalAlignment="Top" RenderTransformOrigin="0.204,0.551" Background="#FF1752E1"/>
<Button x:Name="btn2" Content="入库统计" HorizontalAlignment="Left" Margin="135,13,0,0" Grid.Row="1" VerticalAlignment="Top" RenderTransformOrigin="0.204,0.551" Background="#FF384E83" />-->
<!--<Border x:Name="border1" Grid.Row="1" Visibility="Visible" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="1,50,5,5">
<Grid Margin="10,5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Text="开始时间" Margin="10 0" Foreground="Gray" FontSize="15" VerticalAlignment="Center"/>
<DatePicker
x:Name="BeginTime"
Width="200" Margin="10 0" Text="2023-10-09"
materialDesign:CalendarAssist.IsHeaderVisible="False"
materialDesign:HintAssist.Hint="开始日期">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
</Binding.ValidationRules>
</Binding>
</DatePicker.SelectedDate>
</DatePicker>
<TextBlock Text="结束时间" Margin="10 0" Foreground="Gray" FontSize="15" VerticalAlignment="Center"/>
<DatePicker
x:Name="EndTime" Margin="10 0" Text="2023-10-09"
Width="200"
materialDesign:CalendarAssist.IsHeaderVisible="False"
materialDesign:HintAssist.Hint="结束日期">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
</Binding.ValidationRules>
</Binding>
</DatePicker.SelectedDate>
</DatePicker>
<Button Margin="10 0"
Content="查询" Command="{Binding ExecQueryCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}"
ToolTip="Resource name: MaterialDesignRaisedSecondaryDarkButton">
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource QueryConvert}">
<Binding ElementName="BeginTime" Path="Text"/>
<Binding ElementName="EndTime" Path="Text"/>
</MultiBinding>
</Button.CommandParameter>
</Button>
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid Grid.Row="0" ItemsSource="{Binding MaterialDataGrid}" Background="#00000000"
ColumnHeaderHeight="35"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
<Grid Grid.Row="1">
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="分垛模式选择:" Margin="10 0" Foreground="White" FontSize="15" VerticalAlignment="Center"/>
<ComboBox Text="{Binding MaterialTypeCombox}" SelectedItem="{Binding SelectedMaterialType}" Width="100" Margin="5 0 0 0" VerticalAlignment="Center" FontSize="15" Foreground="White">
<ComboBoxItem Content="手动模式" IsSelected="True" Foreground="Blue" />
<ComboBoxItem Content="自动模式" Foreground="Blue"/>
</ComboBox>
<Border Margin="100 0 0 0">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="手动方向设置:" Foreground="White" FontSize="15" VerticalAlignment="Center"/>
<RadioButton Content="A库" Margin="5 0" Foreground="White"/>
<RadioButton Content="B库" Margin="5 0" Foreground="White" />
</WrapPanel>
</Border>
<Button Content="自动方向设置" Command="{Binding AutoDirectionCommand}" Margin="100,0,0,0" Background="Blue" Foreground="White" />
<Button Content="质检项设置" Command="{Binding SelectQualityCommand}" Background="Blue" Foreground="White" Width="120" VerticalAlignment="Top" HorizontalAlignment="Left"/>
</WrapPanel>
</Grid>
<Grid Grid.Row="2">
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,1,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="质检数据" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
<Grid Grid.Row="3">
<DataGrid Name="qualityGrid" ItemsSource="{Binding QualityDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="Gray" >
--><!-- 表头剧中--><!--
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center">
</Setter>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}" >
<!-- 表头剧中-->
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center">
</Setter>
<Setter Property="Background" Value="Transparent" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" />
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="订单号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料型号" Width="3*" />
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="物料编码" Width="3*" />
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="扫描时间" Width="2*" />
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
</Grid>
</Border>-->
<Style TargetType="DataGridCell">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="产品条码" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="产品名称" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="内胆预装检漏" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="成品检漏" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding SpaceCode}" Header="终检" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
</Border>
</UserControl>

@ -0,0 +1,43 @@
<Window x:Class="Aucma.Core.ProductOffLine.Views.SelectQualityView"
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.ProductOffLine.Views"
mc:Ignorable="d"
Title="质检项目设置" Height="650" Width="900" 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>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="87*"/>
<ColumnDefinition Width="803*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Grid.Column="2">
<Button Content="刷 新" Command="{Binding QueryCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" />
<Button Content="保 存" Command="{Binding SaveCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" Margin="50 0 0 0"/>
</StackPanel>
<!--计划列表-->
<Border Grid.Row="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="1,1,5,5" Grid.ColumnSpan="2">
<DataGrid x:Name="dataShow" ItemsSource="{Binding Items}" AutoGenerateColumns="False" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF">
</DataGrid>
</Border>
</Grid>
</Border>
</Window>

@ -0,0 +1,29 @@
using Aucma.Core.ProductOffLine.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace Aucma.Core.ProductOffLine.Views
{
/// <summary>
/// SelectQuality.xaml 的交互逻辑
/// </summary>
public partial class SelectQualityView : Window
{
public SelectQualityView()
{
InitializeComponent();
this.DataContext = new SelectQualityViewModel();
}
}
}

@ -121,8 +121,8 @@
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" />
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="订单号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料型号" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="产品条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="3*" />
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="物料编码" Width="3*" />
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="扫描时间" Width="2*" />
</DataGrid.Columns>

Loading…
Cancel
Save