@ -2,6 +2,7 @@
using Admin.Core.IService ;
using Admin.Core.IService ;
using Admin.Core.Model ;
using Admin.Core.Model ;
using Admin.Core.Model.ViewModels ;
using Admin.Core.Model.ViewModels ;
using Admin.Core.Service ;
using Admin.Core.Socket ;
using Admin.Core.Socket ;
using Aucma.Core.PrintTo.Models ;
using Aucma.Core.PrintTo.Models ;
using Aucma.Core.PrintTo.Views ;
using Aucma.Core.PrintTo.Views ;
@ -53,11 +54,7 @@ namespace Aucma.Core.PrintTo.ViewModels
private async void InitializeAsync ( )
private async void InitializeAsync ( )
{
{
await Task . Run ( ( ) = >
await LoadData ( ) ;
{
Task . WaitAll ( LoadData ( ) ) ;
} ) ;
}
}
#region 加载DataGrid数据
#region 加载DataGrid数据
@ -88,8 +85,8 @@ namespace Aucma.Core.PrintTo.ViewModels
order . LinerAmount = item . LinerAmount ;
order . LinerAmount = item . LinerAmount ;
order . BoxAmount = item . BoxAmount ;
order . BoxAmount = item . BoxAmount ;
order . ErrorNum = item . ErrorAmount ;
order . ErrorNum = item . ErrorAmount ;
order . LinerCodeNum = item . LinerAmount;
order . LinerCodeNum = item . Print LinerAmount;
order . BoxCodeNum = item . BoxAmount;
order . BoxCodeNum = item . Print BoxAmount;
order . PrintName = item . PrintName ;
order . PrintName = item . PrintName ;
order . CompleteAmount = item . CompleteAmount ;
order . CompleteAmount = item . CompleteAmount ;
datalist . Add ( order ) ;
datalist . Add ( order ) ;
@ -250,7 +247,12 @@ namespace Aucma.Core.PrintTo.ViewModels
type = 1 ;
type = 1 ;
}
}
//查询当前数据库当前已经打印的数量
//查询当前数据库当前已经打印的数量
var printBarCodeList = await _printBarCodeServices . QueryAsync ( d = > d . OrderCode = = order_code & & d . PrintBarType = = type ) ;
var printBarCodeList = await _printBarCodeServices . QueryAsync ( d = > d . OrderCode = = order_code & & d . PrintBarType = = type ) ;
foreach ( var item in printBarCodeList )
{
await _printBarCodeServices . DeleteByIdAsync ( item . ObjId ) ;
}
if ( printBarCodeList ! = null & & printBarCodeList . Count ! = 0 )
if ( printBarCodeList ! = null & & printBarCodeList . Count ! = 0 )
{
{
//计算剩余数量
//计算剩余数量