master
liuwf 1 year ago
parent cb4c8283db
commit db8a89c885

@ -2325,14 +2325,6 @@
Width="*" Width="*"
ElementStyle="{StaticResource dgCell}" ElementStyle="{StaticResource dgCell}"
/> />
<!--<DataGridTextColumn
Header="箱体携带数量"
Binding="{Binding thisOutAmount}"
ElementStyle="{StaticResource dgCell}"
Width="3*"
/>-->
<DataGridTemplateColumn <DataGridTemplateColumn
Width="3*" Width="3*"
CanUserSort="False" CanUserSort="False"
@ -2345,8 +2337,6 @@
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
</DataGrid.Columns> </DataGrid.Columns>
<DataGrid.CellStyle> <DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}"> <Style TargetType="{x:Type DataGridCell}">
@ -2360,7 +2350,7 @@
<Style TargetType="{x:Type DataGridRow}"> <Style TargetType="{x:Type DataGridRow}">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" /> <Setter Property="Foreground" Value="White" />
<Setter Property="Height" Value="Auto" />
</Style> </Style>
</DataGrid.RowStyle> </DataGrid.RowStyle>
<DataGrid.RowHeaderStyle> <DataGrid.RowHeaderStyle>

@ -335,7 +335,8 @@ namespace Khd.Core.Wpf.Form
} }
LocationsControl.ItemsSource = locations; LocationsControl.ItemsSource = locations;
}catch (Exception ex) }
catch (Exception ex)
{ {
MessageBox.Show(ex.Message); MessageBox.Show(ex.Message);
} }
@ -1451,7 +1452,8 @@ namespace Khd.Core.Wpf.Form
{ {
if (wcsCmd.taskType == 32)//领料 if (wcsCmd.taskType == 32)//领料
{ {
if(count>) if (count > 0)
{
MessageBoxResult messageBoxResult = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information); MessageBoxResult messageBoxResult = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
if (messageBoxResult == MessageBoxResult.Yes) if (messageBoxResult == MessageBoxResult.Yes)
{ {
@ -1464,7 +1466,7 @@ namespace Khd.Core.Wpf.Form
dbContext.Add(wcsTaskLog); dbContext.Add(wcsTaskLog);
dbContext.Add(wcsTask); dbContext.Add(wcsTask);
} }
else if (messageBoxResult == MessageBoxResult.Cancel) else
{ {
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10); BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
baseEquip.endStationCode = string.Empty; baseEquip.endStationCode = string.Empty;
@ -1473,6 +1475,18 @@ namespace Khd.Core.Wpf.Form
dbContext.SaveChanges(); dbContext.SaveChanges();
return; return;
} }
}
else
{
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
baseEquip.endStationCode = string.Empty;
baseEquip.ud3 = null;
dbContext.Update(baseEquip);
dbContext.SaveChanges();
return;
}
if (wcsCmd.taskStatus == 3) if (wcsCmd.taskStatus == 3)
{ {
wcsCmd.taskStatus = 4; wcsCmd.taskStatus = 4;
@ -2426,6 +2440,9 @@ namespace Khd.Core.Wpf.Form
{ {
try try
{ {
if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text)) if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text))
{ {
using var scope = _host.Services.CreateScope(); using var scope = _host.Services.CreateScope();
@ -2508,6 +2525,15 @@ namespace Khd.Core.Wpf.Form
} }
else else
{ {
// 没有申请单
// 如果选中了出库单,并且无需要出库的申请单,则禁止出库
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
if (!string.IsNullOrEmpty(baseEquip.endStationCode))
{
scanOutMsg.Text = "申请单里该条码无需出库!";
return;
}
if (mesBaseBarcodeInfo.PurchaseOrderId == null) if (mesBaseBarcodeInfo.PurchaseOrderId == null)
{ {
wmsRawStock.totalAmount -= outScan; wmsRawStock.totalAmount -= outScan;

Loading…
Cancel
Save