change - 组装计划查询修改

collectionStore
wenjy 1 year ago
parent fa9c36e797
commit 31d68b1a95

Binary file not shown.

@ -73,12 +73,20 @@ namespace Aucma.Scada.Business
/// </summary> /// </summary>
/// <param name="productLineCode"></param> /// <param name="productLineCode"></param>
/// <returns></returns> /// <returns></returns>
public List<ProductPlanInfo> GetProductPlanInfosByProductLineCode() public List<ProductPlanInfo> GetProductPlanInfosByProductLineCode(string orderCode)
{ {
List<ProductPlanInfo> productPlanInfos = null; List<ProductPlanInfo> productPlanInfos = null;
try try
{ {
productPlanInfos = _productPlanInfoService.GetProductPlanInfosByProductLineCode(appConfig.stationCode); productPlanInfos = _productPlanInfoService.GetProductPlanInfosByProductLineCode(appConfig.stationCode);
if(productPlanInfos.Count>0 )
{
if(!string.IsNullOrEmpty(orderCode))
{
productPlanInfos = productPlanInfos.Where(x=>x.orderCode.Contains(orderCode)).ToList();
}
}
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -22,12 +22,12 @@
<TextBox Width="200" Height="25" Margin="10 0 0 0" Text="{Binding Search}" Foreground="Gray" VerticalAlignment="Center" FontSize="15"/> <TextBox Width="200" Height="25" Margin="10 0 0 0" Text="{Binding Search}" Foreground="Gray" VerticalAlignment="Center" FontSize="15"/>
<!--resourceStyle 413行修改边框颜色--> <!--resourceStyle 413行修改边框颜色-->
<TextBlock Text="产品型号" VerticalAlignment="Center" Foreground="Gray" FontSize="15" Margin="20,0,0,0"/> <!--<TextBlock Text="产品型号" VerticalAlignment="Center" Foreground="Gray" FontSize="15" Margin="20,0,0,0"/>
<ComboBox Text="{Binding MaterialTypeCombox}" Width="150" Height="25" Margin="10 0 0 0" Foreground="Black" VerticalAlignment="Center" FontSize="15"> <ComboBox Text="{Binding MaterialTypeCombox}" Width="150" Height="25" Margin="10 0 0 0" Foreground="Black" VerticalAlignment="Center" FontSize="15">
<ComboBoxItem Content="所有" IsSelected="True"/> <ComboBoxItem Content="所有" IsSelected="True"/>
<ComboBoxItem Content="SC232" /> <ComboBoxItem Content="SC232" />
<ComboBoxItem Content="SC485" /> <ComboBoxItem Content="SC485" />
</ComboBox> </ComboBox>-->
<Button Content="查询" Command="{Binding QueryCommand}" Style="{StaticResource BUTTON_AGREE}" Background="#007DFA" BorderBrush="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" Width="80" /> <Button Content="查询" Command="{Binding QueryCommand}" Style="{StaticResource BUTTON_AGREE}" Background="#007DFA" BorderBrush="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" Width="80" />
<Button Content="重置" Command="{Binding ResetCommand}" Style="{StaticResource BUTTON_AGREE}" Background="#007DFA" BorderBrush="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" Width="80" /> <Button Content="重置" Command="{Binding ResetCommand}" Style="{StaticResource BUTTON_AGREE}" Background="#007DFA" BorderBrush="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" Width="80" />

@ -140,11 +140,11 @@
<Border Grid.Row="0" BorderBrush="CadetBlue" BorderThickness="0,0,0,1"> <Border Grid.Row="0" BorderBrush="CadetBlue" BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0">
<TextBlock Text="物料条码" VerticalAlignment="Center" Foreground="Gray" FontSize="15"/> <TextBlock Text="物料条码" VerticalAlignment="Center" Foreground="Gray" FontSize="15"/>
<TextBox Width="200" Height="25" Margin="10 0 0 0" Text="{Binding Search}" Foreground="Gray" VerticalAlignment="Center" FontSize="15"/> <TextBox Width="150" Height="25" Margin="10 0 0 0" Text="{Binding Search}" Foreground="Gray" VerticalAlignment="Center" FontSize="15"/>
<!--resourceStyle 413行修改边框颜色--> <!--resourceStyle 413行修改边框颜色-->
<TextBlock Text="物料类型" VerticalAlignment="Center" Foreground="Gray" FontSize="15" Margin="20,0,0,0"/> <TextBlock Text="仓库类型" VerticalAlignment="Center" Foreground="Gray" FontSize="15" Margin="20,0,0,0"/>
<ComboBox Text="{Binding MaterialTypeCombox}" Width="200" Height="25" Margin="10 0 0 0" Foreground="Black" VerticalAlignment="Center" FontSize="15"> <ComboBox Text="{Binding MaterialTypeCombox}" Width="100" Height="25" Margin="10 0 0 0" Foreground="Black" VerticalAlignment="Center" FontSize="15">
<ComboBoxItem Content="所有" IsSelected="True"/> <ComboBoxItem Content="所有" IsSelected="True"/>
<ComboBoxItem Content="箱壳" /> <ComboBoxItem Content="箱壳" />
<ComboBoxItem Content="内胆" /> <ComboBoxItem Content="内胆" />

@ -1,4 +1,4 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "761197E72019FA48DD888520668F10CC0A0310CFF8A6F9336B14C0A351ACC259" #pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "638A8878353241AB42E35E5685925D9F0CFF05E8C4379C5912D6CA9388326C41"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
@ -81,14 +81,6 @@ namespace Aucma.Scada.UI {
#line hidden #line hidden
#line 82 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button logInfo;
#line default
#line hidden
#line 85 "..\..\MainWindow.xaml" #line 85 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button Minimized; internal System.Windows.Controls.Button Minimized;
@ -150,12 +142,9 @@ namespace Aucma.Scada.UI {
this.assemblyPlan = ((System.Windows.Controls.Button)(target)); this.assemblyPlan = ((System.Windows.Controls.Button)(target));
return; return;
case 6: case 6:
this.logInfo = ((System.Windows.Controls.Button)(target));
return;
case 7:
this.Minimized = ((System.Windows.Controls.Button)(target)); this.Minimized = ((System.Windows.Controls.Button)(target));
return; return;
case 8: case 7:
this.Exit = ((System.Windows.Controls.Button)(target)); this.Exit = ((System.Windows.Controls.Button)(target));
return; return;
} }

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E14629875FB628F7D746EDF2F700170786DE8BBCE34B9BA27F9EDF260682AFAA" #pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6870CE886CE3FFE090DC2219378B52EBB4CA146E642D78853D79C3946079A5B2"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E14629875FB628F7D746EDF2F700170786DE8BBCE34B9BA27F9EDF260682AFAA" #pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6870CE886CE3FFE090DC2219378B52EBB4CA146E642D78853D79C3946079A5B2"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InStoreInfo\InStoreInfoControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A05E59C5C19F8D68AD26227566090DA3164C037974EBC97A5B9A5093BEF8411F" #pragma checksum "..\..\..\..\Page\InStoreInfo\InStoreInfoControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C8ECCDA975C8C8811A376621E5A0A06C8522C6E28CCAE7D4A3032F92EEAA8235"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InStoreInfo\InStoreInfoControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A05E59C5C19F8D68AD26227566090DA3164C037974EBC97A5B9A5093BEF8411F" #pragma checksum "..\..\..\..\Page\InStoreInfo\InStoreInfoControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C8ECCDA975C8C8811A376621E5A0A06C8522C6E28CCAE7D4A3032F92EEAA8235"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。

@ -2,8 +2,13 @@
using Aucma.Scada.Model.domain; using Aucma.Scada.Model.domain;
using GalaSoft.MvvmLight; using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Command;
using HighWayIot.Config;
using SqlSugar;
using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
using System.Windows; using System.Windows;
using System.Windows.Documents;
namespace Aucma.Scada.UI.viewModel.AssemblyPlan namespace Aucma.Scada.UI.viewModel.AssemblyPlan
{ {
@ -16,10 +21,37 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
PlanInfoTransmitCommand = new RelayCommand(PlanInfoTransmit); PlanInfoTransmitCommand = new RelayCommand(PlanInfoTransmit);
MouseClickCommand = new RelayCommand<object>(MouseClick); MouseClickCommand = new RelayCommand<object>(MouseClick);
CloseWindowCommand = new RelayCommand<object>(t => CloseWindow(t)); CloseWindowCommand = new RelayCommand<object>(t => CloseWindow(t));
QueryCommand = new RelayCommand(Query);
ResetCommand = new RelayCommand(Reset);
Query(); Query();
} }
#region 参数定义 #region 参数定义
private string _search = string.Empty;
public string Search
{
get { return _search; }
set { _search = value; RaisePropertyChanged(nameof(Search)); }
}
/// <summary>
/// 下拉框
/// </summary>
public string _materialTypeCombox;
public string MaterialTypeCombox
{
get { return _materialTypeCombox; }
set
{
if (_materialTypeCombox != value)
{
_materialTypeCombox = value;
RaisePropertyChanged(() => MaterialTypeCombox);
}
}
}
/// <summary> /// <summary>
/// 生产计划编号 /// 生产计划编号
/// </summary> /// </summary>
@ -84,6 +116,10 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
public RelayCommand<object> MouseClickCommand { get; set; } public RelayCommand<object> MouseClickCommand { get; set; }
public RelayCommand<object> CloseWindowCommand { get; set; } public RelayCommand<object> CloseWindowCommand { get; set; }
public RelayCommand QueryCommand { get; set; }
public RelayCommand ResetCommand { get; set; }
#endregion #endregion
@ -93,19 +129,30 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
public void Query() public void Query()
{ {
var models = assemblyPlanBusiness.GetProductPlanInfosByProductLineCode(); List<ProductPlanInfo> planInfos = assemblyPlanBusiness.GetProductPlanInfosByProductLineCode(_search);
PlanInfoDataGrid = new ObservableCollection<ProductPlanInfo>(); PlanInfoDataGrid = new ObservableCollection<ProductPlanInfo>();
if (models != null) if (planInfos != null)
{ {
models.ForEach( planInfos.ForEach(
arg => arg =>
{ {
PlanInfoDataGrid.Add(arg); PlanInfoDataGrid.Add(arg);
}); });
} }
} }
/// <summary>
/// 重置
/// </summary>
public void Reset()
{
Search = string.Empty;
MaterialTypeCombox = string.Empty;
this.Query();
}
private void PlanInfoTransmit() private void PlanInfoTransmit()
{ {
bool result = assemblyPlanBusiness.PlanTransmitByProductPlan(_ProductPlanCode, _TransmitAmount); bool result = assemblyPlanBusiness.PlanTransmitByProductPlan(_ProductPlanCode, _TransmitAmount);

Loading…
Cancel
Save