liuwf 1 year ago
parent 594a73c4b3
commit cde5e5dd0e

@ -1,4 +1,5 @@
using Jc.SnowId; using Jc.SnowId;
using Khd.Core.Domain.Dto.TaskType;
using Khd.Core.Domain.Models; using Khd.Core.Domain.Models;
using Khd.Core.EntityFramework; using Khd.Core.EntityFramework;
using Khd.Core.Library; using Khd.Core.Library;

@ -455,7 +455,7 @@ namespace Khd.Core.Wcs.Wcs
dbContext.Update(item); dbContext.Update(item);
lock (SystemData.outStockLock) lock (SystemData.outStockLock)
{ {
bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 11 && t.taskType == StaticTaskType.FiveAccessoryOut).Any(); bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 11 && (t.taskType == StaticTaskType.FiveAccessoryOut || t.taskType == StaticTaskType.FiveAccessoryStorage || t.taskType == StaticTaskType.FiveAccessoryRemove) ).Any();
int taskCount = dbContext.WcsTask.Where(t => t.nextPointId == 11 && t.taskType == StaticTaskType.FiveAccessoryIn).Count(); int taskCount = dbContext.WcsTask.Where(t => t.nextPointId == 11 && t.taskType == StaticTaskType.FiveAccessoryIn).Count();
if ((!hasTask && item.ud3 == "1") || (taskCount >= 6))//如果CTU当前任务数量很多取消预执行任务,或者出库的任务都生成了入库任务 if ((!hasTask && item.ud3 == "1") || (taskCount >= 6))//如果CTU当前任务数量很多取消预执行任务,或者出库的任务都生成了入库任务
{ {

@ -56,7 +56,7 @@
CanUserResizeRows="False" CanUserResizeRows="False"
Focusable="False" Focusable="False"
HeadersVisibility="Column" HeadersVisibility="Column"
IsReadOnly="True"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
RowHeaderWidth="0" RowHeaderWidth="0"
SelectionMode="Single" FontSize="16" SelectionMode="Single" FontSize="16"
@ -80,7 +80,10 @@
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTextColumn Header="库存数量" Binding="{Binding StockAmount}" ElementStyle="{StaticResource dgCell}" Width="110*"/> <DataGridTextColumn Header="库存数量" Binding="{Binding StockAmount}" ElementStyle="{StaticResource dgCell}" Width="110*"/>
<DataGridTextColumn Header="实际数量" Binding="{Binding RealAmount}" ElementStyle="{StaticResource dgCell}" Width="110*"/> <DataGridTextColumn Header="实际数量" Binding="{Binding RealAmount}" IsReadOnly="False" ElementStyle="{StaticResource dgCell}" Width="110*"/>
<DataGridTemplateColumn Header="操作" Width="100*"> <DataGridTemplateColumn Header="操作" Width="100*">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>

@ -132,7 +132,7 @@ namespace Khd.Core.Wpf.TaskForm
StockAmount = t.Sum(n => n.StockAmount), StockAmount = t.Sum(n => n.StockAmount),
LocationCode = wcsTask.currPointNo, LocationCode = wcsTask.currPointNo,
MaterialId = t.Key, MaterialId = t.Key,
RealAmount = t.Sum(n => n.RealAmount), RealAmount = (t.Sum(n => n.RealAmount)).ToString(),
}); });
this.InventoryDataGrid.Items.Refresh(); this.InventoryDataGrid.Items.Refresh();
if (wmsInventoryCheckDetails.Count == 0) if (wmsInventoryCheckDetails.Count == 0)
@ -188,13 +188,16 @@ namespace Khd.Core.Wpf.TaskForm
if (this.InventoryDataGrid.SelectedItem != null) if (this.InventoryDataGrid.SelectedItem != null)
{ {
dynamic item = this.InventoryDataGrid.SelectedItem; dynamic item = this.InventoryDataGrid.SelectedItem;
long materialId = item.MaterialId; UpdateStockAmount updateStockAmount = new UpdateStockAmount(_host, item.MaterialBatch);
string containerNo = item.ContainerNo; updateStockAmount.ShowDialog();
string materialName = item.MaterialName;
string locationCode = item.LocationCode;
//long materialId = item.MaterialId;
GetData(item.ContainerNo); //string containerNo = txtInBox.Text;
//string materialName = item.MaterialName;
//string locationCode = item.LocationCode;
//string realAmount = item.RealAmount;
//GetData(txtInBox.Text);
} }
} }

Loading…
Cancel
Save