liulb@mesnac.com 11 months ago
parent 7d68a3ad51
commit cf85055ea4

@ -9,6 +9,7 @@ using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using NPOI.Util;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@ -164,7 +165,7 @@ namespace Aucma.Core.PrintTo.ViewModels
/// 打印
/// </summary>
[RelayCommand]
private void Print(string obj)
private async void Print(string obj)
{
if (string.IsNullOrEmpty(obj))
{
@ -184,7 +185,7 @@ namespace Aucma.Core.PrintTo.ViewModels
}
if (SelectedCells.PlanAmount < PrintAmount)
{
MessageBox.Show("打印数量能高于计划数量!", "系统提醒");
MessageBox.Show("打印数量能高于计划数量!", "系统提醒");
return;
}
if (printType==0)
@ -193,6 +194,7 @@ namespace Aucma.Core.PrintTo.ViewModels
return;
}
try
{
string order_code = SelectedCells.OrderCode;
@ -202,8 +204,34 @@ namespace Aucma.Core.PrintTo.ViewModels
//string material_name = SelectedCells.MaterialName;
int standard_amount = PrintAmount;
string printName = SelectedCells.PrintName;
PrintIsEnabled = "False";
int type = 0;
if (printType == 500)
{
type = 2;
}
if (printType == 200)
{
type = 1;
}
var list= await _printBarCodeServices.QueryAsync(d => d.OrderCode == order_code&&d.PrintBarType== printType);
if (list!=null||list.Count!= 0)
{
int num= list.Count;//已经打印数量
int residue= SelectedCells.PlanAmount - num;//剩余打印数量
if (residue == standard_amount)
{
MessageBox.Show("订单数量已经打印到规定订单数量!", "系统提醒");
return;
}
if ((residue- standard_amount)< 1)
{
MessageBox.Show("订单数量已经打印到规定订单数量!", "系统提醒");
return;
}
}
//更新打印名称
var baseOrder = _baseOrderInfoServices.FirstAsync(d => d.OrderCode == order_code).Result;
if (string.IsNullOrEmpty(baseOrder.PrintName))

@ -235,7 +235,7 @@
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;打印数量" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Slider x:Name="PlanAmount" FontSize="18" Minimum="0" Maximum="500" BorderBrush="White" Value="{Binding PrintAmount,Mode=TwoWay}" Foreground="White" Height="30" VerticalContentAlignment="Center"
HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"/>
<!--<TextBlock Text="1~500" Width="60" Margin="10 0 0 0" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />-->
<TextBlock Text="{Binding SelectedItem.PlanAmount, ElementName=dgvMH}" />
</WrapPanel>
<Border Grid.Row="5" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Width="420" >
<StackPanel >

@ -177,7 +177,11 @@ namespace Aucma.Core.ProductOffLine.Business
// Thread.Sleep(1000);
// MaterialBarScanEvent("33160030000000910780", "192.168.1.20");
}
/// <summary>
/// 开始扫码约我处理
/// </summary>
/// <param name="code"></param>
/// <param name="scannerIp"></param>
public void MaterialBarScan(string code, string scannerIp)
{
Task.Run(() =>
@ -1083,6 +1087,14 @@ namespace Aucma.Core.ProductOffLine.Business
#endregion
/// <summary>
/// 验证条码是否是包含特征
/// </summary>
/// <param name="packagBarCode">成品码</param>
/// <param name="SNCode">包装码</param>
public void check(string packagBarCode, string SNCode)
{
}
}
}

@ -109,9 +109,9 @@ namespace Aucma.Core.TemperatureTask
PostToMes(query);
Console.WriteLine($"【{DateTime.Now}】保存测温数据成功!保存数量:{query.Count}");
} }
}
}
Console.WriteLine($"【{DateTime.Now}】测温数据同步成功!数量:{query.Count}");
}
catch (Exception ex)
{

Loading…
Cancel
Save