|
|
@ -1,4 +1,5 @@ |
|
|
|
using BBWY.Client.Models.APIModel; |
|
|
|
using BBWY.Client.APIServices; |
|
|
|
using BBWY.Client.Models.APIModel; |
|
|
|
using BBWY.Client.Models.PackTask; |
|
|
|
using BBWY.Controls; |
|
|
|
using NPOI.Util; |
|
|
@ -8,6 +9,7 @@ using System.Collections.ObjectModel; |
|
|
|
using System.Drawing.Printing; |
|
|
|
using System.IO; |
|
|
|
using System.Reflection; |
|
|
|
using System.Security.Cryptography.X509Certificates; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Windows; |
|
|
@ -26,12 +28,13 @@ namespace BBWY.Client.Views.SealBox |
|
|
|
/// </summary>
|
|
|
|
public partial class SealBoxPrintDetailsWindow : BWindow |
|
|
|
{ |
|
|
|
public SealBoxPrintDetailsWindow(SealBoxModel sealBox) |
|
|
|
public SealBoxPrintDetailsWindow(SealBoxModel sealBox, SealBoxService sealBoxService) |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
InitPrintList(); |
|
|
|
SealBoxModel = sealBox.Copy(); |
|
|
|
this.DataContext = this; |
|
|
|
this.sealBoxService = sealBoxService; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 打印机列表
|
|
|
@ -44,6 +47,8 @@ namespace BBWY.Client.Views.SealBox |
|
|
|
//BarcodeImage = MyPrintHelper.GetBarcodeImage(SkuId, 300, 60);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PrintList = new ObservableCollection<string>(); |
|
|
|
var printingNames = PrinterSettings.InstalledPrinters;//获取本机的打印机数据
|
|
|
|
int index = -1; |
|
|
@ -98,12 +103,26 @@ namespace BBWY.Client.Views.SealBox |
|
|
|
public string WareName { get; set; } |
|
|
|
|
|
|
|
public long SealBoxId { get; set; } |
|
|
|
|
|
|
|
SealBoxService sealBoxService; |
|
|
|
private void BButton_Click(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
int limitIndex = 15;//单页限制数量
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var res = sealBoxService.WareCompetePrintSealBox(SealBoxModel.SealBoxId); |
|
|
|
|
|
|
|
if (res ==null|| !res.Success) |
|
|
|
{ |
|
|
|
MessageBox.Show(res?.Msg); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Task.Factory.StartNew(() => |
|
|
|
{ |
|
|
|
for (int i = 0; i < PrintCount; i++)//打印份数
|
|
|
|