Browse Source

Merge branch 'master' of http://code.qiyue666.com/pengcong001/bbwy

AddValidOverTime
sanji 2 years ago
parent
commit
1dc805ec2d
  1. 18
      BBWY.Client/APIServices/QiKu/SealBoxService.cs
  2. 2
      BBWY.Client/GlobalContext.cs
  3. 2
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  4. 23
      BBWY.Client/Views/SealBox/SealBoxPrintDetailsWindow.xaml.cs

18
BBWY.Client/APIServices/QiKu/SealBoxService.cs

@ -119,6 +119,21 @@ namespace BBWY.Client.APIServices
}
, null, HttpMethod.Post);
}
/// <summary>
/// 完成打印封箱明细
/// </summary>
/// <param name="SealBoxId"></param>
/// <returns></returns>
public ApiResponse<object> WareCompetePrintSealBox(long SealBoxId)
{
return SendRequest<object>(globalContext.QKApiHost, $"api/SealBox/WareCompetePrintSealBox?SealBoxId={SealBoxId}",
null, null, HttpMethod.Get);
}
/// <summary>
/// 仓库端获取待落仓列表
/// </summary>
@ -276,7 +291,8 @@ namespace BBWY.Client.APIServices
public ApiResponse<GetWareWaitCompletedResponse> GetWareWaitCompletedList(string shopId, string ShopName, long? TaskId, string SkuId, long? sealBoxId, int? PageIndex, int? PageSize)
{
return SendRequest<GetWareWaitCompletedResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareWaitCompletedList",
new {
new
{
shopId,
PageIndex,
PageSize,

2
BBWY.Client/GlobalContext.cs

@ -13,7 +13,7 @@ namespace BBWY.Client
{
ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10202";
ClientVersion = "10203";
}

2
BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs

@ -1107,7 +1107,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
var model = (SealBoxModel)obj;
SealBoxPrintDetailsWindow printDetailsWindow = new SealBoxPrintDetailsWindow(model);
SealBoxPrintDetailsWindow printDetailsWindow = new SealBoxPrintDetailsWindow(model, sealBoxService);
printDetailsWindow.ShowDialog();
}

23
BBWY.Client/Views/SealBox/SealBoxPrintDetailsWindow.xaml.cs

@ -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++)//打印份数

Loading…
Cancel
Save