|
|
|
|
@ -1434,6 +1434,9 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
private void btnBearConfirmBox_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
MessageBoxResult messageBoxResult = HandyControl.Controls.MessageBox.Show("是否确认捡料完成?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
|
|
|
|
|
if (messageBoxResult == MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
//剩余出库单
|
|
|
|
|
int count = OutTaskNumber.Items.Count;
|
|
|
|
|
@ -1454,8 +1457,8 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
if (count > 0)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxResult messageBoxResult = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
|
|
|
|
|
if (messageBoxResult == MessageBoxResult.Yes)
|
|
|
|
|
MessageBoxResult messageBoxResult1 = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
|
|
|
|
|
if (messageBoxResult1 == MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
WcsTask wcsTask = CoreMapper.Map<WcsTask>(wcsCmd);
|
|
|
|
|
wcsTask.taskStatus = 0;
|
|
|
|
|
@ -1473,7 +1476,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
baseEquip.ud3 = null;
|
|
|
|
|
dbContext.Update(baseEquip);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1504,6 +1507,8 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
HandyControl.Controls.MessageBox.Success("背负式Agv任务确认完成成功");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
HandyControl.Controls.MessageBox.Error(ex.Message);
|
|
|
|
|
@ -2440,13 +2445,14 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
using var scope = _host.Services.CreateScope();
|
|
|
|
|
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
|
|
|
|
|
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text))
|
|
|
|
|
{
|
|
|
|
|
using var scope = _host.Services.CreateScope();
|
|
|
|
|
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
|
|
|
|
|
|
|
|
|
|
var wmsRawStock = dbContext.WmsRawStock
|
|
|
|
|
.FirstOrDefault(t => t.instockBatch == txtOutBarCode.Text && t.palletInfoCode == txtOutBox.Text);
|
|
|
|
|
if (wmsRawStock == null)
|
|
|
|
|
@ -2472,7 +2478,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
if (mesBaseBarcodeInfo != null)
|
|
|
|
|
{
|
|
|
|
|
WmsRawOutstock? wmsRawOutstock = dbContext.WmsRawOutstock
|
|
|
|
|
.Where(t => t.materialId == mesBaseBarcodeInfo.materialId && t.realOutstockAmount < t.outstockAmount && t.saleOrderId == (mesBaseBarcodeInfo.saleOrderId == null ? 0 : mesBaseBarcodeInfo.saleOrderId)).FirstOrDefault();
|
|
|
|
|
.Where(t => t.materialId == mesBaseBarcodeInfo.materialId && t.realOutstockAmount < t.outstockAmount && t.saleOrderId == (mesBaseBarcodeInfo.saleOrderId == null ? 0 : mesBaseBarcodeInfo.saleOrderId) && t.endStationCode == baseEquip.endStationCode).FirstOrDefault();
|
|
|
|
|
if (wmsRawOutstock != null)
|
|
|
|
|
{
|
|
|
|
|
wmsRawOutstock.realOutstockAmount += outScan;
|
|
|
|
|
@ -2527,7 +2533,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
// 没有申请单
|
|
|
|
|
// 如果选中了出库单,并且无需要出库的申请单,则禁止出库
|
|
|
|
|
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(baseEquip.endStationCode))
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "申请单里该条码无需出库!";
|
|
|
|
|
|