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/SelectQualityViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs
index 64a5eddf..28227961 100644
--- a/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs
+++ b/Aucma.Core.ProductOffLine/ViewModels/SelectQualityViewModel.cs
@@ -9,10 +9,14 @@ 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;
@@ -23,6 +27,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
public ICommand QueryCommand { get; set; }
public ICommand SaveCommand { get; set; }
+
private readonly IBaseMaterialInfoServices? _baseMaterialInfoServices;
public SelectQualityViewModel() {
_baseMaterialInfoServices = App.ServiceProvider.GetService();
@@ -33,60 +38,20 @@ namespace Aucma.Core.ProductOffLine.ViewModels
///
/// 3.查询BASE_MATERIALINFO表存在的成品类型以供修改
///
- public void Init()
+ 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
@@ -100,6 +65,6 @@ namespace Aucma.Core.ProductOffLine.ViewModels
}
#endregion
-
+
}
}
diff --git a/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml b/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
index cbfeb0e8..1aa88eee 100644
--- a/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
+++ b/Aucma.Core.ProductOffLine/Views/QualityPageView.xaml
@@ -31,7 +31,7 @@
-
+
@@ -49,6 +49,7 @@
+
@@ -57,7 +58,36 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml
index c9888515..2dbc3df8 100644
--- a/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml
+++ b/Aucma.Core.ProductOffLine/Views/SelectQualityView.xaml
@@ -27,32 +27,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Foreground="#FFFFFF">
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 @@
-
-
+
+