master
liuwf 1 year ago
parent 24dbc80a04
commit c86803c4fd

@ -418,7 +418,7 @@ namespace Khd.Core.Wcs.Wcs
} }
else if (item.taskType == StaticTaskType.FiveAccessoryIn)//入库任务 else if (item.taskType == StaticTaskType.FiveAccessoryIn)//入库任务
{ {
bool haveOut = taskList.Where(t => t.taskType == StaticTaskType.FiveAccessoryOut).Where(t => t.taskStatus != 6).Any(); bool haveOut = taskList.Where(t => item.taskType == StaticTaskType.FiveAccessoryOut || item.taskType == StaticTaskType.FiveAccessoryStorage || item.taskType == StaticTaskType.FiveAccessoryRemove).Where(t => t.taskStatus != 6).Any();
if (!haveOut && CtuWaitLogic()) if (!haveOut && CtuWaitLogic())
{ {
BaseEquip startEquip = StaticData.BaseEquip.First(t => t.objid == item.currPointId); BaseEquip startEquip = StaticData.BaseEquip.First(t => t.objid == item.currPointId);

@ -2044,8 +2044,8 @@
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="开始盘点" Style="{StaticResource ButtonPrimary}" FontSize="15" Width="90" Height="55" Click="StartInventory" VerticalAlignment="Center" HorizontalAlignment="Center"/> <Button Content="{Binding StartContent}" Style="{StaticResource ButtonPrimary}" IsEnabled="{Binding StartEnable}" FontSize="15" Width="90" Height="55" Click="StartInventory" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button Content="结束盘点" Style="{StaticResource ButtonPrimary}" Margin="5 0 0 0" FontSize="15" Width="90" Height="55" Click="StartInventory" VerticalAlignment="Center" HorizontalAlignment="Center"/> <Button Content="结束盘点" Style="{StaticResource ButtonPrimary}" IsEnabled="{Binding EndEnable}" Margin="5 0 0 0" FontSize="15" Width="90" Height="55" Click="EndInventory" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button Content="详情" Style="{StaticResource ButtonPrimary}" Margin="5 0 0 0" FontSize="15" Width="90" Height="55" Click="OpenInventoryDetails" VerticalAlignment="Center" HorizontalAlignment="Center"/> <Button Content="详情" Style="{StaticResource ButtonPrimary}" Margin="5 0 0 0" FontSize="15" Width="90" Height="55" Click="OpenInventoryDetails" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>

@ -2917,7 +2917,7 @@ namespace Khd.Core.Wpf.Form
} }
//所有满足条件的需要盘库的库位 //所有满足条件的需要盘库的库位
var wmsBaseLocations = dbContext.WmsBaseLocation var wmsBaseLocations = dbContext.WmsBaseLocation
.Where(t => t.ContainerStatus == "1") .Where(t => t.ContainerStatus == "1" && t.warehouseId==512)
.Where(t => t.locationStatus == "1") .Where(t => t.locationStatus == "1")
.OrderBy(t => t.locRow) .OrderBy(t => t.locRow)
.ThenBy(t => t.locColumn) .ThenBy(t => t.locColumn)
@ -3023,6 +3023,7 @@ namespace Khd.Core.Wpf.Form
RealAmount = rawItem.totalAmount, RealAmount = rawItem.totalAmount,
InventoryCount = 0, InventoryCount = 0,
LocationCode = rawItem.locationCode, LocationCode = rawItem.locationCode,
MaterialBatch = rawItem.instockBatch,
StockId = 1, StockId = 1,
StockType = "1", StockType = "1",
MaterialId = rawItem.materialId, MaterialId = rawItem.materialId,
@ -3065,12 +3066,41 @@ namespace Khd.Core.Wpf.Form
GetInvertoryData(); GetInvertoryData();
} }
/// <summary> /// <summary>
/// 查看盘点详情界面 /// 结束盘点
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void OpenInventoryDetails(object sender, RoutedEventArgs e) private void EndInventory(object sender, RoutedEventArgs e)
{
try
{
dynamic wmsInventoryCheck = this.InventoryMaterial.SelectedItem;
long inventoryCheckId = wmsInventoryCheck.InventoryCheckId;
using var scope = _host.Services.CreateScope();
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
var InventoryCheck = dbContext.WmsInventoryCheck
.Where(t => t.InventoryCheckId == inventoryCheckId).FirstOrDefault();
if (InventoryCheck.CheckStatus != "2")
{
InventoryCheck.CheckStatus = "2";
InventoryCheck.EndTime = DateTime.Now;
}
dbContext.WmsInventoryCheck.Update(InventoryCheck);
dbContext.SaveChanges();
GetInvertoryData();
}catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
}
/// <summary>
/// 查看盘点详情界面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OpenInventoryDetails(object sender, RoutedEventArgs e)
{ {
dynamic wmsInventoryCheck = this.InventoryMaterial.SelectedItem; dynamic wmsInventoryCheck = this.InventoryMaterial.SelectedItem;
long inventoryCheckId = wmsInventoryCheck.InventoryCheckId; long inventoryCheckId = wmsInventoryCheck.InventoryCheckId;
@ -3598,6 +3628,7 @@ namespace Khd.Core.Wpf.Form
BasePlcpoint basePlcpoint = SystemData.BasePlcpoints.First(t => t.plcpointNo == "canReceive"); BasePlcpoint basePlcpoint = SystemData.BasePlcpoints.First(t => t.plcpointNo == "canReceive");
SystemData.PlcDic[1].WriteToPoint(basePlcpoint.plcpointAddress, "1", basePlcpoint.plcpointLength.ToString()); SystemData.PlcDic[1].WriteToPoint(basePlcpoint.plcpointAddress, "1", basePlcpoint.plcpointLength.ToString());
MsgText.Text = "一键收料发送成功"; MsgText.Text = "一键收料发送成功";
HandyControl.Controls.MessageBox.Show("一键收料发送成功!");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -4328,6 +4359,10 @@ namespace Khd.Core.Wpf.Form
UpdateBy = t.UpdateBy, UpdateBy = t.UpdateBy,
UpdateTime = t.UpdateTime, UpdateTime = t.UpdateTime,
WarehouseId = t.WarehouseId, WarehouseId = t.WarehouseId,
StartContent = t.CheckStatus == "0" ? "开始盘点" : "继续盘点",
StartEnable = t.CheckStatus == "2" ? false : true,
EndEnable = t.CheckStatus == "2" ? false : true,
}); });
this.InventoryMaterial.Items.Refresh(); this.InventoryMaterial.Items.Refresh();

@ -33,8 +33,9 @@
<RowDefinition Height="10*"/> <RowDefinition Height="10*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="5"> <StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="请选择容器编号:" FontSize="30" Foreground="White" VerticalAlignment="Center"/> <TextBlock Text="请扫描容器编号:" FontSize="30" Foreground="White" VerticalAlignment="Center"/>
<ComboBox x:Name="ContainerCodeBox" IsEditable="True" DisplayMemberPath="containerNo" Style="{StaticResource ComboBoxExtend}" Width="300" hc:InfoElement.Placeholder="容器编码" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Necessary="True" FontSize="30" /> <!--<ComboBox x:Name="ContainerCodeBox" IsEditable="True" DisplayMemberPath="containerNo" Style="{StaticResource ComboBoxExtend}" Width="300" hc:InfoElement.Placeholder="容器编码" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Necessary="True" FontSize="30" />-->
<hc:TextBox x:Name="txtInBox" hc:InfoElement.ShowClearButton="True" FontSize="20" TextChanged="txtInBox_TextChanged" Width="300" Background="White" HorizontalAlignment="Left" VerticalAlignment="Center" Height="50" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="4"/>
<Button x:Name="SearchBtn" Content="搜索" FontSize="30" Height="50" Foreground="White" Width="100" Background="#2196F3" Margin="10,0,0,0" Click="SearchBtn_Click"/> <Button x:Name="SearchBtn" Content="搜索" FontSize="30" Height="50" Foreground="White" Width="100" Background="#2196F3" Margin="10,0,0,0" Click="SearchBtn_Click"/>
<Button Content="编辑" FontSize="30" Height="50" Foreground="White" Width="100" Background="#2196F3" Margin="10,0,0,0" Click="EditBtn_Click"/> <Button Content="编辑" FontSize="30" Height="50" Foreground="White" Width="100" Background="#2196F3" Margin="10,0,0,0" Click="EditBtn_Click"/>
</StackPanel> </StackPanel>
@ -62,11 +63,13 @@
Visibility="Visible" Visibility="Visible"
> >
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="库位号" Binding="{Binding LocationCode}" ElementStyle="{StaticResource dgCell}" Width="200*"/> <DataGridTextColumn Header="库位号" Binding="{Binding LocationCode}" ElementStyle="{StaticResource dgCell}" Width="150*"/>
<DataGridTextColumn Header="料箱号" Binding="{Binding ContainerNo}" ElementStyle="{StaticResource dgCell}" Width="200*"/> <!--<DataGridTextColumn Header="料箱号" Binding="{Binding ContainerNo}" ElementStyle="{StaticResource dgCell}" Width="200*"/>-->
<DataGridTextColumn Header="物料编码" Binding="{Binding MaterialId}" ElementStyle="{StaticResource dgCell}" Width="120*"/> <DataGridTextColumn Header="物料编码" Binding="{Binding MaterialId}" ElementStyle="{StaticResource dgCell}" Width="80*"/>
<DataGridTextColumn Header="物料条码" Binding="{Binding MaterialBatch}" ElementStyle="{StaticResource dgCell}" Width="180*"/>
<DataGridTextColumn Header="物料规格" Binding="{Binding MaterialSpec}" ElementStyle="{StaticResource dgCell}" Width="150*"/>
<DataGridTemplateColumn <DataGridTemplateColumn
Width="350*" Width="250*"
CanUserSort="False" CanUserSort="False"
Header="物料描述" Header="物料描述"
IsReadOnly="True" > IsReadOnly="True" >
@ -76,12 +79,12 @@
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTextColumn Header="库存数量" Binding="{Binding StockAmount}" ElementStyle="{StaticResource dgCell}" Width="120*"/> <DataGridTextColumn Header="库存数量" Binding="{Binding StockAmount}" ElementStyle="{StaticResource dgCell}" Width="110*"/>
<DataGridTextColumn Header="实际数量" Binding="{Binding RealAmount}" ElementStyle="{StaticResource dgCell}" Width="120*"/> <DataGridTextColumn Header="实际数量" Binding="{Binding RealAmount}" ElementStyle="{StaticResource dgCell}" Width="110*"/>
<DataGridTemplateColumn Header="操作"> <DataGridTemplateColumn Header="操作" Width="100*">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Button Content="编辑" Foreground="White" Width="75" Background="#2196F3" Click="EditBtn_Click"/> <Button Content="编辑" Foreground="White" Width="100" Background="#2196F3" Click="EditBtn_Click"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>

@ -1,11 +1,17 @@
using Khd.Core.Domain.Models; using Khd.Core.Domain.Models;
using Khd.Core.EntityFramework; using Khd.Core.EntityFramework;
using Khd.Core.Wpf.Scan;
using Khd.Core.Wpf.TaskForm.Inventory; using Khd.Core.Wpf.TaskForm.Inventory;
using Masuit.Tools.Logging;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace Khd.Core.Wpf.TaskForm namespace Khd.Core.Wpf.TaskForm
{ {
@ -14,30 +20,79 @@ namespace Khd.Core.Wpf.TaskForm
/// </summary> /// </summary>
public partial class InventoryTaskForm : Window public partial class InventoryTaskForm : Window
{ {
private readonly IHost _host; private readonly IHost _host;
public InventoryTaskForm(IHost host) public InventoryTaskForm(IHost host)
{ {
InitializeComponent(); InitializeComponent();
_host = host; _host = host;
Thread scanThread = new Thread(ScanMessage);
scanThread.IsBackground = true;
scanThread.Start();
} }
private void Window_Loaded(object sender, RoutedEventArgs e)
private void ScanMessage()
{
while (true)
{
try
{
if (SystemData.isUpdate)
{
if (!string.IsNullOrEmpty(SystemData.message))
{
Dispatcher.Invoke(() =>
{
var focusedElement = FocusManager.GetFocusedElement(this);
if (focusedElement is TextBox textBox)
{
textBox.Text = SystemData.message;
SystemData.isUpdate = false;
}
});
}
}
}
catch (Exception ex)
{
LogManager.Error(ex);
}
Thread.Sleep(500);
}
}
private void txtInBox_TextChanged(object sender, RoutedEventArgs e)
{
if(txtInBox.Text.Length == 15)
{
GetData(txtInBox.Text);
}
else
{
this.InventoryDataGrid.ItemsSource = null;
}
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
try try
{ {
using var scope = _host.Services.CreateScope(); using var scope = _host.Services.CreateScope();
var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>(); var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
var wcsTasks = dbContext.WcsTask.Where(t => t.taskType == 100 && t.taskStatus == 6).ToList(); var wcsTasks = dbContext.WcsTask.Where(t => t.taskType == 100 && t.taskStatus == 6).ToList();
if (wcsTasks.Count > 0) //if (wcsTasks.Count > 0)
{ //{
this.ContainerCodeBox.ItemsSource = wcsTasks.Distinct(); // this.ContainerCodeBox.ItemsSource = wcsTasks.Distinct();
} //}
else //else
{ //{
HandyControl.Controls.MessageBox.Show("未找到盘库已完成的小车任务!"); // HandyControl.Controls.MessageBox.Show("未找到盘库已完成的小车任务!");
this.Close(); // this.Close();
} //}
} }
catch catch
{ {
@ -45,19 +100,23 @@ namespace Khd.Core.Wpf.TaskForm
} }
} }
private void GetData() private void GetData(string containerNo)
{ {
if (this.ContainerCodeBox.SelectedItem is WcsTask task)
{
using var scope = _host.Services.CreateScope(); using var scope = _host.Services.CreateScope();
var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>(); var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
var wcsTask = dbContext.WcsTask var wcsTask = dbContext.WcsTask
.Where(t => t.taskType == 100) .Where(t => t.taskType == 100)
.Where(t => t.containerNo == task.containerNo).FirstOrDefault(); .Where(t => t.containerNo == containerNo).FirstOrDefault();
if (wcsTask != null) if (wcsTask != null)
{ {
WmsInventoryCheck check = dbContext.WmsInventoryCheck.Where(x => x.CheckStatus == "1").FirstOrDefault();
if (check == null)
{
HandyControl.Controls.MessageBox.Show("当前无正在执行的盘库任务");
return;
}
var wmsInventoryCheckDetails = dbContext.WmsInventoryCheckDetail var wmsInventoryCheckDetails = dbContext.WmsInventoryCheckDetail
.Where(t => t.InventoryCheckId == wcsTask.orderId) .Where(t => t.InventoryCheckId == check.InventoryCheckId)
.Where(t => t.LocationCode == wcsTask.currPointNo) .Where(t => t.LocationCode == wcsTask.currPointNo)
.Where(t => t.CheckStatus == "1") .Where(t => t.CheckStatus == "1")
.ToList(); .ToList();
@ -66,8 +125,10 @@ namespace Khd.Core.Wpf.TaskForm
this.InventoryDataGrid.ItemsSource = wmsInventoryCheckDetails.GroupBy(t => t.MaterialId).Select(t => this.InventoryDataGrid.ItemsSource = wmsInventoryCheckDetails.GroupBy(t => t.MaterialId).Select(t =>
new new
{ {
ContainerNo = wcsTask.containerNo, //ContainerNo = wcsTask.containerNo,
MaterialName = mesBaseMaterialInfos.FirstOrDefault(m => m.MaterialId == t.Key)?.MaterialSpec, MaterialBatch = t.FirstOrDefault(n => n.MaterialId == t.Key)?.MaterialBatch,
MaterialSpec = mesBaseMaterialInfos.FirstOrDefault(m => m.MaterialId == t.Key)?.MaterialSpec,
MaterialName = mesBaseMaterialInfos.FirstOrDefault(m => m.MaterialId == t.Key)?.MaterialName,
StockAmount = t.Sum(n => n.StockAmount), StockAmount = t.Sum(n => n.StockAmount),
LocationCode = wcsTask.currPointNo, LocationCode = wcsTask.currPointNo,
MaterialId = t.Key, MaterialId = t.Key,
@ -78,20 +139,51 @@ namespace Khd.Core.Wpf.TaskForm
{ {
HandyControl.Controls.MessageBox.Show("该料箱为空料箱"); HandyControl.Controls.MessageBox.Show("该料箱为空料箱");
} }
}
} }
else else
{ {
HandyControl.Controls.MessageBox.Show("请先选择料箱号!"); HandyControl.Controls.MessageBox.Show("请扫描盘库任务里面的料箱");
} }
} }
private void SearchBtn_Click(object sender, RoutedEventArgs e) private void SearchBtn_Click(object sender, RoutedEventArgs e)
{ {
GetData();
} }
private void EditBtn_Click(object sender, RoutedEventArgs e) private void EditBtn_Click(object sender, RoutedEventArgs e)
{
//if (this.InventoryDataGrid.SelectedItem != null)
//{
// dynamic item = this.InventoryDataGrid.SelectedItem;
// long materialId = item.MaterialId;
// string containerNo = item.ContainerNo;
// string materialName = item.MaterialName;
// string locationCode = item.LocationCode;
// InventoryTaskEditForm editForm = new InventoryTaskEditForm(_host, materialId, containerNo, materialName, locationCode, this);
// this.Hide();
// editForm.ShowDialog();
// GetData();
//}
//else
//{
// if (this.ContainerCodeBox.SelectedItem is WcsTask task)
// {
// InventoryTaskEditForm editForm = new InventoryTaskEditForm(_host, 0, task.containerNo, "", task.currPointNo, this);
// this.Hide();
// editForm.ShowDialog();
// GetData();
// }
// else
// {
// HandyControl.Controls.MessageBox.Show("请先选择料箱号!");
// }
//}
}
private void Update_Click(object sender, RoutedEventArgs e)
{ {
if (this.InventoryDataGrid.SelectedItem != null) if (this.InventoryDataGrid.SelectedItem != null)
{ {
@ -100,25 +192,10 @@ namespace Khd.Core.Wpf.TaskForm
string containerNo = item.ContainerNo; string containerNo = item.ContainerNo;
string materialName = item.MaterialName; string materialName = item.MaterialName;
string locationCode = item.LocationCode; string locationCode = item.LocationCode;
InventoryTaskEditForm editForm = new InventoryTaskEditForm(_host, materialId, containerNo, materialName, locationCode, this);
this.Hide(); GetData(item.ContainerNo);
editForm.ShowDialog();
GetData();
}
else
{
if (this.ContainerCodeBox.SelectedItem is WcsTask task)
{
InventoryTaskEditForm editForm = new InventoryTaskEditForm(_host, 0, task.containerNo, "", task.currPointNo, this);
this.Hide();
editForm.ShowDialog();
GetData();
}
else
{
HandyControl.Controls.MessageBox.Show("请先选择料箱号!");
}
} }
} }
} }
} }

@ -39,12 +39,12 @@
<TextBox x:Name="SearchTxt" Width="200" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" /> <TextBox x:Name="SearchTxt" Width="200" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" />
<Button x:Name="SearchButton" Foreground="White" Background="Blue" Content="搜 索" FontSize="20" Margin="20 0 25 0" Height="50" Width="100" Click="SearchButton_Click"/> <Button x:Name="SearchButton" Foreground="White" Background="Blue" Content="搜 索" FontSize="20" Margin="20 0 25 0" Height="50" Width="100" Click="SearchButton_Click"/>
<TextBlock Text="选中物料" Foreground="White" FontSize="25" Margin="0 0 25 0" VerticalAlignment="Center"/> <!--<TextBlock Text="选中物料" Foreground="White" FontSize="25" Margin="0 0 25 0" VerticalAlignment="Center"/>
<TextBox x:Name="SelectMaterialId" Width="50" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" IsReadOnly="True"/> <TextBox x:Name="SelectMaterialId" Width="50" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" IsReadOnly="True"/>
<TextBox x:Name="SelectMaterialName" Width="200" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" IsReadOnly="True"/> <TextBox x:Name="SelectMaterialName" Width="200" Height="40" Margin="5,0,0,0" VerticalAlignment="Center" IsReadOnly="True"/>-->
<Button x:Name="ClearButton" Foreground="White" Background="Blue" Content="清除" FontSize="20" Margin="20 0 25 0" Height="50" Width="100" Click="ClearButton_Click" /> <!--<Button x:Name="ClearButton" Foreground="White" Background="Blue" Content="清除" FontSize="20" Margin="20 0 25 0" Height="50" Width="100" Click="ClearButton_Click" />-->
<Button x:Name="CreateInventoryTask" Foreground="White" Background="DarkGreen" Content="创建盘库任务" FontSize="20" Margin="200 0 25 0" Height="50" Width="200" Click="CreateInventoryTask_Click" /> <Button x:Name="CreateInventoryTask" Foreground="White" Background="DarkGreen" Content="创建盘库任务" FontSize="20" Margin="200 0 25 0" Height="50" Width="200" Click="CreateInventoryTask_Click" />

@ -1,5 +1,6 @@
using Khd.Core.Domain.Models; using Khd.Core.Domain.Models;
using Khd.Core.EntityFramework; using Khd.Core.EntityFramework;
using Khd.Core.Wpf.dto;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
@ -106,15 +107,7 @@ namespace Khd.Core.Wpf.WindowPage
public string materialSpec { get; set; } public string materialSpec { get; set; }
} }
private void ClearButton_Click(object sender, RoutedEventArgs e)
{
// 如果没有选中项则清空TextBox的内容
SelectMaterialId.Text = string.Empty;
SelectMaterialName.Text = string.Empty;
SearchTxt.Text = string.Empty;
Init();
}
private void CreateInventoryTask_Click(object sender, RoutedEventArgs e) private void CreateInventoryTask_Click(object sender, RoutedEventArgs e)
{ {
@ -128,7 +121,7 @@ namespace Khd.Core.Wpf.WindowPage
int locationCount = 0; int locationCount = 0;
if(itemsControlItems.Count == 0) if(itemsControlItems.Count == 0)
{ {
locationCount = dbContext.WmsBaseLocation.Where(t => t.warehouseId == 512 && t.ContainerStatus == "1").Count(); locationCount = dbContext.WmsBaseLocation.Where(t => t.warehouseId == 512 && t.ContainerStatus == "1" && t.locationStatus=="1").Count();
} }
else else
{ {
@ -150,6 +143,7 @@ namespace Khd.Core.Wpf.WindowPage
{ {
Orders.ForEach(t => Orders.ForEach(t =>
{ {
t.EndTime = DateTime.Now;
t.CheckStatus = "2"; t.CheckStatus = "2";
}); });
dbContext.UpdateRange(Orders); dbContext.UpdateRange(Orders);

Loading…
Cancel
Save