liuwf 1 year ago
parent 01477ab160
commit 1a28d863cc

@ -44,7 +44,7 @@ namespace Khd.Core.Wpf.WindowPage
positionLayerTxt.Text = location.layerNum.ToString();
locationTxt.Text = location.locationCode;
palletTxt.Text = location.containerCode;
txtStatus.Text = getStatus(location.locationStatus);
if (location.warehouseId == 512 || location.warehouseId == 311 || location.warehouseId == 511)
{
@ -52,6 +52,8 @@ namespace Khd.Core.Wpf.WindowPage
var stockList = await dbContext.WmsRawStock.Where(x => x.palletInfoCode == location.containerCode && x.palletInfoCode != null).ToListAsync();
if (stockList != null && stockList.Count > 0)
{
txtStatus.Text = getStatus(location.locationStatus) + ",有库存";
// 获取所有库存物料 ID
var materialIds = stockList.Select(stock => stock.materialId).Distinct().ToList();
var materialInfos = await dbContext.MesBaseMaterialInfo
@ -75,12 +77,18 @@ namespace Khd.Core.Wpf.WindowPage
StockDataGrid.ItemsSource = stockDetails;
}
else
{
txtStatus.Text = getStatus(location.locationStatus) + ",无库存";
}
}
else
{
var stockList = await dbContext.WmsProductStock.Where(x => x.palletInfoCode == location.containerCode && x.palletInfoCode != null).ToListAsync();
if (stockList != null && stockList.Count > 0)
{
txtStatus.Text = getStatus(location.locationStatus) + ",有库存";
// 获取所有库存物料 ID
var materialIds = stockList.Select(stock => stock.productId).Distinct().ToList();
var materialInfos = await dbContext.MesBaseMaterialInfo
@ -104,6 +112,11 @@ namespace Khd.Core.Wpf.WindowPage
StockDataGrid.ItemsSource = stockDetails;
}
else
{
txtStatus.Text = getStatus(location.locationStatus) + ",无库存";
}
}
}

Loading…
Cancel
Save