diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml
index 695093aa..1d73aa82 100644
--- a/Admin.Core.Api/Admin.Core.Model.xml
+++ b/Admin.Core.Api/Admin.Core.Model.xml
@@ -301,6 +301,36 @@
祖级列表
+
+
+ 成品信息
+
+
+
+
+ 主键标识
+
+
+
+
+ 物料编号
+
+
+
+
+ 物料名称
+
+
+
+
+ 入库方向-A/B
+
+
+
+
+ 物料sap类型,FERT成品
+
+
SAP订单信息
diff --git a/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs b/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs
new file mode 100644
index 00000000..4b1f9be3
--- /dev/null
+++ b/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs
@@ -0,0 +1,12 @@
+using Admin.Core.Model;
+using Admin.Core.Model.Model_New;
+
+namespace Admin.Core.IRepository
+{
+ ///
+ /// IBaseBomInfoRepository
+ ///
+ public interface IBaseMaterialInfoRepository : IBaseRepository
+ {
+ }
+}
\ No newline at end of file
diff --git a/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs b/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs
new file mode 100644
index 00000000..4d69709e
--- /dev/null
+++ b/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs
@@ -0,0 +1,16 @@
+using Admin.Core.IService;
+using Admin.Core.Model;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Admin.Core.IService
+{
+ ///
+ /// IBaseMaterialInfoServices
+ ///
+ public interface IBaseMaterialInfoServices : IBaseServices
+ {
+ public Task> query();
+
+ }
+}
\ No newline at end of file
diff --git a/Admin.Core.IService/IService_New/IBaseSpaceInfoServices.cs b/Admin.Core.IService/IService_New/IBaseSpaceInfoServices.cs
index 1dfaad60..b1d45314 100644
--- a/Admin.Core.IService/IService_New/IBaseSpaceInfoServices.cs
+++ b/Admin.Core.IService/IService_New/IBaseSpaceInfoServices.cs
@@ -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
///
///
Task UpdateSpaceInfo(BaseSpaceInfo spaceInfo);
+
+
}
}
\ No newline at end of file
diff --git a/Admin.Core.Model/Model_New/BaseMaterialInfo.cs b/Admin.Core.Model/Model_New/BaseMaterialInfo.cs
new file mode 100644
index 00000000..133873ee
--- /dev/null
+++ b/Admin.Core.Model/Model_New/BaseMaterialInfo.cs
@@ -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
+{
+ ///
+ /// 成品信息
+ ///
+ [SugarTable("BASE_MATERIALINFO", "AUCMA_MES")]
+ public class BaseMaterialInfo
+ {
+ ///
+ /// 主键标识
+ ///
+ [SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
+ public int ObjId { get; set; }
+
+ ///
+ /// 物料编号
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_CODE")]
+ public string MaterialCode { get; set; }
+
+ ///
+ /// 物料名称
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_NAME")]
+ public string MaterialName { get; set; }
+
+ ///
+ /// 入库方向-A/B
+ ///
+ [SugarColumn(ColumnName = "INBOUND_DIRECTION")]
+ public string InboundDirection { get; set; }
+ ///
+ /// 物料sap类型,FERT成品
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_TYPE")]
+ public string MaterialType { get; set; }
+ }
+}
diff --git a/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs b/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs
new file mode 100644
index 00000000..4efee93c
--- /dev/null
+++ b/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs
@@ -0,0 +1,16 @@
+using Admin.Core.Model;
+using Admin.Core.Model.Model_New;
+using Admin.Core.Repository;
+
+namespace Admin.Core.IRepository
+{
+ ///
+ /// OrderBomInfoRepository
+ ///
+ public class BaseMaterialInfoRepository : BaseRepository, IBaseMaterialInfoRepository
+ {
+ public BaseMaterialInfoRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/Admin.Core.Service/Service_New/BaseMaterialInfoServices.cs b/Admin.Core.Service/Service_New/BaseMaterialInfoServices.cs
new file mode 100644
index 00000000..2fdc417b
--- /dev/null
+++ b/Admin.Core.Service/Service_New/BaseMaterialInfoServices.cs
@@ -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, IBaseMaterialInfoServices
+ {
+ private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BaseMaterialInfoServices));
+ private readonly IBaseRepository _dal;
+ private readonly IBaseMaterialInfoRepository _baseMaterialInfoRepository;
+ public BaseMaterialInfoServices(IBaseRepository dal, IBaseMaterialInfoRepository baseMaterialInfoRepository)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ _baseMaterialInfoRepository = baseMaterialInfoRepository;
+ }
+
+ ///
+ /// 1.查出BASE_MATERIALINFO中存在的成品类型
+ ///
+ public async Task> query()
+ {
+ List list = await _baseMaterialInfoRepository.QueryAsync(x => x.MaterialType == "FERT");
+ return list;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Admin.Core.Service/Service_New/BaseSpaceInfoServices.cs b/Admin.Core.Service/Service_New/BaseSpaceInfoServices.cs
index d7b85453..ef277adf 100644
--- a/Admin.Core.Service/Service_New/BaseSpaceInfoServices.cs
+++ b/Admin.Core.Service/Service_New/BaseSpaceInfoServices.cs
@@ -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
-
-
+
}
}
\ No newline at end of file
diff --git a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs
index a4b115c7..f1b365dd 100644
--- a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs
+++ b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs
@@ -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 list = await _codeBindingRecordServices.QueryAsync(x=> x.BoxCode==code1);
CodeBindingRecord record = list.FirstOrDefault();
// List list = await _codeBindingRecordServices.QueryByTime();
// CodeBindingRecord record = list.FirstOrDefault();
+ record.BoxName = "去别的数据库查询";
record.ProductCode = code2;
record.RecordTime2 = System.DateTime.Now;
record.BindingResult = "成功";
diff --git a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml
index b5df0b42..70fdef81 100644
--- a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml
+++ b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml
@@ -73,7 +73,7 @@
-
+
diff --git a/Aucma.Core.ProductOffLine/Models/DirectionEditModel.cs b/Aucma.Core.ProductOffLine/Models/DirectionEditModel.cs
new file mode 100644
index 00000000..7b2ce133
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Models/DirectionEditModel.cs
@@ -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
+ {
+ ///
+ /// 序号
+ ///
+ public int No { get; set; }
+ ///
+ /// 物料成品主键
+ ///
+ public int ObjId { get; set; }
+ ///
+ /// 物料编号
+ ///
+ public string? MaterialCode { get; set; }
+ ///
+ /// 物料名称
+ ///
+ public string? MaterialName { get; set; }
+ ///
+ /// 货道编号
+ ///
+ public string? SpaceCode { get; set; }
+
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/Models/SelectQualityModel.cs b/Aucma.Core.ProductOffLine/Models/SelectQualityModel.cs
new file mode 100644
index 00000000..58caac2c
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Models/SelectQualityModel.cs
@@ -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
+ {
+ ///
+ /// 序号
+ ///
+ public int No { get; set; }
+ ///
+ /// 物料成品主键
+ ///
+ public int ObjId { get; set; }
+ ///
+ /// 物料编号
+ ///
+ public string? MaterialCode { get; set; }
+ ///
+ /// 物料名称
+ ///
+ public string? MaterialName { get; set; }
+ ///
+ /// 货道编号
+ ///
+ public string? SpaceCode { get; set; }
+
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/ViewModels/DirectionEditViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/DirectionEditViewModel.cs
new file mode 100644
index 00000000..b3065939
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/ViewModels/DirectionEditViewModel.cs
@@ -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();
+ QueryCommand = new RelayCommand(ExecuteQuery);
+ SaveCommand = new RelayCommand(ExecuteSave);
+ Init();
+ }
+ ///
+ /// 3.查询BASE_MATERIALINFO表存在的成品类型以供修改
+ ///
+ public void Init()
+ {
+ ExecuteQuery();
+ }
+
+
+ private async void ExecuteQuery()
+ {
+ MaterialDataGrid.Clear();
+ // 处理查询按钮点击事件
+ // 1.先查出BASE_MATERIALINFO中存在但BASE_SPACEINFO不存在的成品类型(说明该类型未分配货道)
+ List 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 list = new List();
+ // 处理保存按钮点击事件
+ 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 materialDataGrid = new ObservableCollection();
+ public ObservableCollection MaterialDataGrid
+ {
+ get { return materialDataGrid; }
+ set
+ {
+ materialDataGrid = value;
+ OnPropertyChanged();//属性通知
+ }
+ }
+ #endregion
+
+
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs
index 9ea1766b..21e732fc 100644
--- a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs
+++ b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs
@@ -51,6 +51,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
_productPlanInfoServices = App.ServiceProvider.GetService();
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();
-
}
///
/// 读取开启扫码信号
@@ -275,13 +275,12 @@ namespace Aucma.Core.ProductOffLine.ViewModels
/// 扫描的条码处理
///
///
- /// 扫码器方向,1左边分A库,2右边分B库
+ /// 扫码器方向
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)))
{
diff --git a/Aucma.Core.ProductOffLine/ViewModels/QualityPageViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/QualityPageViewModel.cs
index 00dcd7b5..87313fb2 100644
--- a/Aucma.Core.ProductOffLine/ViewModels/QualityPageViewModel.cs
+++ b/Aucma.Core.ProductOffLine/ViewModels/QualityPageViewModel.cs
@@ -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 materialComplateInfos = new List();
- #region 加载DataGrid数据
- private void LoadData()
+ #region 参数定义
+ ///
+ /// 自动方向设置
+ ///
+ 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();
+ }
+ ///
+ /// 质检项目设置
+ ///
+ public RelayCommand SelectQualityCommand { get; set; }
+ private void SelectQuality()
+ {
+ SelectQualityView selectQualityView = new SelectQualityView();
+ selectQualityView.ShowDialog();
+ }
+ ///
+ /// 分垛模式(自动模式,手动模式)SelectedMaterialType.content.tostring()
+ ///
+ /// 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 materialDataGrid = new ObservableCollection();
@@ -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 查询
///
/// 查询
diff --git a/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs
new file mode 100644
index 00000000..28227961
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs
@@ -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();
+ QueryCommand = new RelayCommand(ExecuteQuery);
+ SaveCommand = new RelayCommand(ExecuteSave);
+ Init();
+ }
+ ///
+ /// 3.查询BASE_MATERIALINFO表存在的成品类型以供修改
+ ///
+ public void Init()
+ {
+ }
+
+ private async void ExecuteQuery()
+ {
+
+ }
+
+ private async void ExecuteSave()
+ {
+
+ }
+
+ #region 初始化datagrid
+ private ObservableCollection materialDataGrid = new ObservableCollection();
+ public ObservableCollection MaterialDataGrid
+ {
+ get { return materialDataGrid; }
+ set
+ {
+ materialDataGrid = value;
+ OnPropertyChanged();//属性通知
+ }
+ }
+ #endregion
+
+
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml b/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml
new file mode 100644
index 00000000..793493f9
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml.cs b/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml.cs
new file mode 100644
index 00000000..e13be6f6
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Views/DirectionEditView.xaml.cs
@@ -0,0 +1,25 @@
+using Aucma.Core.ProductOffLine.ViewModels;
+using System.Windows;
+using System.Windows.Input;
+
+namespace Aucma.Core.ProductOffLine.Views
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class DirectionEditView : Window
+ {
+ public DirectionEditView()
+ {
+ InitializeComponent();
+ this.DataContext = new DirectionEditViewModel();
+ }
+
+ private void dataGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ // planInfoEditViewModel.MouseClick(sender);
+ }
+
+
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/Views/MainWindow.xaml b/Aucma.Core.ProductOffLine/Views/MainWindow.xaml
index 6f27624b..5d2a90b5 100644
--- a/Aucma.Core.ProductOffLine/Views/MainWindow.xaml
+++ b/Aucma.Core.ProductOffLine/Views/MainWindow.xaml
@@ -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">
diff --git a/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml b/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
index 03bb3b55..b4388364 100644
--- a/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
+++ b/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
@@ -14,120 +14,82 @@
-
+
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- -->
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml
new file mode 100644
index 00000000..2dbc3df8
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml.cs b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml.cs
new file mode 100644
index 00000000..d8543d80
--- /dev/null
+++ b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml.cs
@@ -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
+{
+ ///
+ /// SelectQuality.xaml 的交互逻辑
+ ///
+ public partial class SelectQualityView : Window
+ {
+ public SelectQualityView()
+ {
+ InitializeComponent();
+ this.DataContext = new SelectQualityViewModel();
+ }
+ }
+}
diff --git a/Aucma.Core.ProductOffLine/Views/StatisticsPageView.xaml b/Aucma.Core.ProductOffLine/Views/StatisticsPageView.xaml
index 2e38a72d..b7c1b289 100644
--- a/Aucma.Core.ProductOffLine/Views/StatisticsPageView.xaml
+++ b/Aucma.Core.ProductOffLine/Views/StatisticsPageView.xaml
@@ -121,8 +121,8 @@
-
-
+
+