From 0ac78b4cf25a7b660c636d58495be187763bffe4 Mon Sep 17 00:00:00 2001
From: "506583276@qq.com" <506583276@qq.com>
Date: Wed, 14 Jun 2023 21:50:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=AE=B6=E5=B0=81?=
=?UTF-8?q?=E7=AE=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BBWY.Client/APIServices/LogisticsService.cs | 4 +
BBWY.Client/APIServices/SealBoxService.cs | 141 ++++++
BBWY.Client/App.xaml.cs | 4 +-
BBWY.Client/Helpers/MyPrintHelper.cs | 4 +-
.../BatchUpdateSealBoxConfiguredRequest.cs | 39 ++
.../Request/SetSealBoxConfiguredRequest.cs | 61 +++
.../SealBox/GetWareSealBoxResponse.cs | 88 ++++
.../SealBox/SealBoxConfiguredResponse.cs | 17 +
.../SealBox/SealBoxPackStateCountResponse.cs | 18 +
.../SealBox/SealBoxWaitConfigureResponse.cs | 16 +
.../UpdateSealBoxConfiguredResponse.cs | 12 +
BBWY.Client/Models/Enums.cs | 9 +
BBWY.Client/Models/PackTask/PackTaskModel.cs | 11 +-
BBWY.Client/Models/PackTask/SealBoxModel.cs | 7 +-
.../Models/SealBox/SealBoxConfigureModel.cs | 78 ++++
.../Models/SealBox/SealBoxConfiguredModel.cs | 62 +++
.../SealBox/SealBoxWaitConfigureModel.cs | 39 ++
.../UpdateSealBoxConfiguredTaskModel.cs | 43 ++
.../PackTask/PublishTaskViewModel.cs | 2 +-
.../ViewModels/PackTask/TaskListViewModel.cs | 404 +++++++++++++-----
.../PackTask/WareHouseListViewModel.cs | 61 +--
.../QiKu/PackSkuSplitConfigViewModel.cs | 2 +-
.../SealBox/SealBoxConfigureViewModel.cs | 304 +++++++++++++
BBWY.Client/ViewModels/ViewModelLocator.cs | 26 +-
.../PackSkuSplitCountAndStoreWindow.xaml.cs | 13 +-
.../Views/PackTask/PublishTaskWindow.xaml.cs | 12 +-
BBWY.Client/Views/PackTask/TaskList.xaml | 41 +-
.../Views/PackTask/TaskListControl.xaml | 27 +-
BBWY.Client/Views/PackTask/WareHouseList.xaml | 6 +-
.../Views/SealBox/SealBoxConfigureWindow.xaml | 202 +++++++++
.../SealBox/SealBoxConfigureWindow.xaml.cs | 44 ++
.../SealBox/SealBoxConfiguredControl.xaml | 232 +++++++++-
.../SealBox/SealBoxWaitConfigureControl.xaml | 233 ++++------
.../Views/SealBox/SetSealBoxWindow.xaml | 6 +-
.../Views/SealBox/SetSealBoxWindow.xaml.cs | 4 +-
.../Views/SealBox/ShopSealBoxListControl.xaml | 89 ++++
.../SealBox/ShopSealBoxListControl.xaml.cs | 26 ++
.../UpdateSealBoxConfiguredWindow.xaml | 105 +++++
.../UpdateSealBoxConfiguredWindow.xaml.cs | 26 ++
.../Views/SealBox/WaitSealBoxControl.xaml | 2 +-
40 files changed, 2168 insertions(+), 352 deletions(-)
create mode 100644 BBWY.Client/APIServices/SealBoxService.cs
create mode 100644 BBWY.Client/Models/APIModel/Request/BatchUpdateSealBoxConfiguredRequest.cs
create mode 100644 BBWY.Client/Models/APIModel/Request/SetSealBoxConfiguredRequest.cs
create mode 100644 BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs
create mode 100644 BBWY.Client/Models/APIModel/Response/SealBox/SealBoxConfiguredResponse.cs
create mode 100644 BBWY.Client/Models/APIModel/Response/SealBox/SealBoxPackStateCountResponse.cs
create mode 100644 BBWY.Client/Models/APIModel/Response/SealBox/SealBoxWaitConfigureResponse.cs
create mode 100644 BBWY.Client/Models/APIModel/Response/SealBox/UpdateSealBoxConfiguredResponse.cs
create mode 100644 BBWY.Client/Models/SealBox/SealBoxConfigureModel.cs
create mode 100644 BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs
create mode 100644 BBWY.Client/Models/SealBox/SealBoxWaitConfigureModel.cs
create mode 100644 BBWY.Client/Models/SealBox/UpdateSealBoxConfiguredTaskModel.cs
create mode 100644 BBWY.Client/ViewModels/SealBox/SealBoxConfigureViewModel.cs
create mode 100644 BBWY.Client/Views/SealBox/SealBoxConfigureWindow.xaml
create mode 100644 BBWY.Client/Views/SealBox/SealBoxConfigureWindow.xaml.cs
create mode 100644 BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml
create mode 100644 BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml.cs
create mode 100644 BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml
create mode 100644 BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml.cs
diff --git a/BBWY.Client/APIServices/LogisticsService.cs b/BBWY.Client/APIServices/LogisticsService.cs
index fc6e67ff..86fc40a6 100644
--- a/BBWY.Client/APIServices/LogisticsService.cs
+++ b/BBWY.Client/APIServices/LogisticsService.cs
@@ -21,6 +21,10 @@ namespace BBWY.Client.APIServices
}, null, HttpMethod.Post);
}
+ ///
+ /// 获取仓库列表
+ ///
+ ///
public ApiResponse> GetStoreList()
{
return SendRequest>(globalContext.BBYWApiHost, "api/vender/GetStoreHouseList", new
diff --git a/BBWY.Client/APIServices/SealBoxService.cs b/BBWY.Client/APIServices/SealBoxService.cs
new file mode 100644
index 00000000..d5a263c6
--- /dev/null
+++ b/BBWY.Client/APIServices/SealBoxService.cs
@@ -0,0 +1,141 @@
+using BBWY.Client.Models.APIModel;
+using BBWY.Client.Models.APIModel.Response.PackTask;
+using BBWY.Client.Views.PackTask;
+using BBWY.Common.Http;
+using BBWY.Common.Models;
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Text;
+
+namespace BBWY.Client.APIServices
+{
+ public class SealBoxService : BaseApiService, IDenpendency
+ {
+ public SealBoxService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
+ {
+ }
+
+
+ public ApiResponse GetSealBoxWaitConfigureList(string SkuId, string TaskId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetSealBoxWaitConfigureList",
+ new
+ {
+ ShopId = globalContext.User.Shop.ShopId.ToString(),
+ TaskId = TaskId,
+ SkuId = SkuId,
+ SpuId,
+ PageSize,
+ PageIndex,
+ }
+ , null, HttpMethod.Post);
+ }
+
+
+ public ApiResponse GetSealBoxPackStateCount()
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetSealBoxPackStateCount",
+ new
+ {
+ ShopId = globalContext.User.Shop.ShopId.ToString(),
+ }
+ , null, HttpMethod.Post);
+ }
+
+ public ApiResponse SetSealBoxConfigured(SetSealBoxConfiguredRequest setSealBoxConfiguredRequest)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/SetSealBoxConfigured",
+ setSealBoxConfiguredRequest
+ , null, HttpMethod.Post);
+ }
+
+ public ApiResponse GetSealBoxConfiguredList(string SkuId, string TaskId, string shopId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetSealBoxConfiguredList",
+ new
+ {
+ ShopId = shopId,
+ TaskId = TaskId,
+ SkuId = SkuId,
+ SpuId,
+ PageSize,
+ PageIndex,
+ }
+ , null, HttpMethod.Post);
+ }
+
+
+ public ApiResponse GetUpdateSealBoxConfigured(long SealBoxId, long[] TaskIds)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetUpdateSealBoxConfigured",
+ new
+ {
+ SealBoxId,
+ TaskIds
+ }
+ , null, HttpMethod.Post);
+ }
+
+
+ public ApiResponse BatchUpdateSealBoxConfigured(BatchUpdateSealBoxConfiguredRequest batchUpdateSealBoxConfiguredRequest)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/BatchUpdateSealBoxConfigured",
+ batchUpdateSealBoxConfiguredRequest
+ , null, HttpMethod.Post);
+ }
+
+ public ApiResponse GetWareSealBoxList(string ShopName, long? TaskId, string SkuId, int? PageIndex, int? PageSize)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetWareSealBoxList",
+ new
+ {
+ ShopName,
+ TaskId,
+ SkuId,
+ PageIndex,
+ PageSize
+ }
+ , null, HttpMethod.Post);
+ }
+
+
+
+ public ApiResponse WareCompeteSealBox(long SealBoxId, int? BoxCount)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/WareCompeteSealBox",
+ new
+ {
+ SealBoxId,
+ BoxCount
+ }
+ , null, HttpMethod.Post);
+ }
+ ///
+ /// 获取待落仓列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ApiResponse SearchWaitFallWareList(string ShopName = null, long? TaskId = null, string SkuId = null, int PageIndex = 1
+ , int PageSize = 10)
+ {
+ return SendRequest(globalContext.QKApiHost, $"api/SealBox/SearchWaitFallWareList",
+ new
+ {
+ ShopName,
+ TaskId,
+ SkuId,
+ PageIndex,
+ PageSize
+ }
+ , null, HttpMethod.Post);
+ }
+
+
+
+ }
+}
diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs
index 88b79fe5..e111aba8 100644
--- a/BBWY.Client/App.xaml.cs
+++ b/BBWY.Client/App.xaml.cs
@@ -1,6 +1,7 @@
using BBWY.Client.Models;
using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.PackTask;
+using BBWY.Client.ViewModels.SealBox;
using BBWY.Common.Extensions;
using BBWY.Common.Http;
using BBWY.Common.Models;
@@ -122,7 +123,8 @@ namespace BBWY.Client
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
-
+ serviceCollection.AddTransient();
+ serviceCollection.AddTransient();
//serviceCollection.AddScoped();
#region 注册拳探SDK相关类
diff --git a/BBWY.Client/Helpers/MyPrintHelper.cs b/BBWY.Client/Helpers/MyPrintHelper.cs
index 4d2cb7a1..7058d3c0 100644
--- a/BBWY.Client/Helpers/MyPrintHelper.cs
+++ b/BBWY.Client/Helpers/MyPrintHelper.cs
@@ -696,10 +696,10 @@ namespace BBWY.Client.Helpers
//{
// title = title.Substring(0,5);
//}
- totalCount += sealBoxModel.SealBoxSkus[i].SkuCount;
+ totalCount += sealBoxModel.SealBoxSkus[i].WareHourseSkuCount;
sheet2.GetRow(i + 6).GetCell(1).SetCellValue($"名称:{title}");
sheet2.GetRow(i + 6).GetCell(2).SetCellValue($"SKU:{sealBoxModel.SealBoxSkus[i].SkuId}");
- sheet2.GetRow(i + 6).GetCell(3).SetCellValue($"数量:{sealBoxModel.SealBoxSkus[i].SkuCount}");
+ sheet2.GetRow(i + 6).GetCell(3).SetCellValue($"数量:{sealBoxModel.SealBoxSkus[i].WareHourseSkuCount}");
}
sheet2.GetRow(25).GetCell(1).SetCellValue(totalCount);
diff --git a/BBWY.Client/Models/APIModel/Request/BatchUpdateSealBoxConfiguredRequest.cs b/BBWY.Client/Models/APIModel/Request/BatchUpdateSealBoxConfiguredRequest.cs
new file mode 100644
index 00000000..642e94b4
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Request/BatchUpdateSealBoxConfiguredRequest.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class BatchUpdateSealBoxConfiguredRequest
+ {
+ ///
+ /// 判断当前的封箱任务是否 是带封箱状态
+ ///
+ public long SealBoxId { get; set; }
+
+ public string ShopId { get; set; }
+
+ public IList UpdateSealBoxConfiguredDatas { get; set; }
+
+ }
+ public class UpdateSealBoxConfiguredDataRequest
+ {
+ public long TaskId { get; set; }
+
+ ///
+ /// sku总量任务量
+ ///
+ public int SkuCount { get; set; }
+
+ public IList SealBoxConfiguredWareHourseRequests { get; set; }
+ }
+
+ public class SealBoxConfiguredWareHourseRequest : WareHourseData
+ {
+ ///
+ ///待封箱 = 0, 待落仓 = 1, 待完结 = 2
+ ///
+ public PositionState? WareState { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/BBWY.Client/Models/APIModel/Request/SetSealBoxConfiguredRequest.cs b/BBWY.Client/Models/APIModel/Request/SetSealBoxConfiguredRequest.cs
new file mode 100644
index 00000000..5c9882e9
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Request/SetSealBoxConfiguredRequest.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class SetSealBoxConfiguredRequest
+ {
+ ///
+ /// 店铺id
+ ///
+ public string ShopId { get; set; }
+
+ public IList SetSealBoxConfiguredDatas { get; set; }
+
+ }
+
+
+ public class SetSealBoxConfiguredData
+ {
+ ///
+ /// 任务Id
+ ///
+ public long TaskId { get; set; }
+
+ ///
+ /// sku
+ ///
+ public string SkuId { get; set; }
+
+ ///
+ /// sku总量任务量(校对)
+ ///
+ public int TotalCount { get; set; }
+ ///
+ /// 仓库去向
+ ///
+ public IList WareHourseDatas { get; set; }
+
+ }
+ public class WareHourseData
+ {
+ ///
+ /// 仓库id
+ ///
+ public string WareId { get; set; }
+ ///
+ /// 仓库名称
+ ///
+ public string WareName { get; set; }
+ ///
+ /// 数量
+ ///
+ public int Count { get; set; }
+ ///
+ /// 入仓类型 (京仓=0 云仓=1,商家仓=2,聚水潭=3)
+ ///
+ public WareType WareType { get; set; }
+
+ }
+}
diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs
new file mode 100644
index 00000000..df433a54
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class GetWareSealBoxResponse
+ {
+ ///
+ /// 数量
+ ///
+ public int TotalCount { get; set; }
+
+ ///
+ /// 分箱列表
+ ///
+ public List WaitSealBoxModels { get; set; }
+ }
+
+ public class WareSealBoxData
+ {
+ public long SealBoxId { get; set; }
+ ///
+ /// 店铺Id
+ ///
+ public string ShopId { get; set; }
+ ///
+ /// 仓库Id(同一个店铺 唯一)
+ ///
+ public string WareId { get; set; }
+ ///
+ /// 店铺名称
+ ///
+ public string ShopName { get; set; }
+ ///
+ /// 仓库名
+ ///
+ public string WareName { get; set; }
+
+ ///
+ /// 团队名称
+ ///
+ public string DepartmentName { get; set; }
+
+ ///
+ /// 对接人(同团队下)
+ ///
+ public List AcceptUserNames { get; set; }
+
+ ///
+ /// 封箱sku列表
+ ///
+ public List SealBoxSkus { get; set; }
+
+ }
+
+ public class WareSealBoxSku
+ {
+ ///
+ /// 任务Id
+ ///
+ public long TaskId { get; set; }
+ ///
+ /// 图片链接
+ ///
+ public string Logo { get; set; }
+ ///
+ /// skuid
+ ///
+ public string SkuId { get; set; }
+ ///
+ /// sku标题
+ ///
+ public string SkuTitle { get; set; }
+ ///
+ /// 品名
+ ///
+ public string BrandName { get; set; }
+ ///
+ /// 货号
+ ///
+ public string ProductNo { get; set; }
+ ///
+ /// (分箱的仓库的sku产品数量)
+ ///
+ public int WareHourseSkuCount { get; set; }
+ }
+}
diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxConfiguredResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxConfiguredResponse.cs
new file mode 100644
index 00000000..34801c7d
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxConfiguredResponse.cs
@@ -0,0 +1,17 @@
+using BBWY.Client.Models.SealBox;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class SealBoxConfiguredResponse
+ {
+ public int TotalCount { get; set; }
+
+ public IList SealBoxConfiguredModels { get; set; }
+ }
+
+
+
+}
diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxPackStateCountResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxPackStateCountResponse.cs
new file mode 100644
index 00000000..6ff5c867
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxPackStateCountResponse.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class SealBoxPackStateCountResponse
+ {
+ ///
+ /// 封箱 待配置数
+ ///
+ public int SealBoxWaitConfigureCount { get; set; }
+ ///
+ ///封箱 已配置数
+ ///
+ public int SealBoxConfiguredCount { get; set; }
+ }
+}
diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxWaitConfigureResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxWaitConfigureResponse.cs
new file mode 100644
index 00000000..f89ee0b2
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Response/SealBox/SealBoxWaitConfigureResponse.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class SealBoxWaitConfigureResponse
+ {
+ public int TotalCount { get; set; }
+
+ public IList SealBoxWaitConfigureModels { get; set; }
+
+ }
+
+
+}
diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/UpdateSealBoxConfiguredResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/UpdateSealBoxConfiguredResponse.cs
new file mode 100644
index 00000000..7c3c1e05
--- /dev/null
+++ b/BBWY.Client/Models/APIModel/Response/SealBox/UpdateSealBoxConfiguredResponse.cs
@@ -0,0 +1,12 @@
+using BBWY.Client.Models.SealBox;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models.APIModel
+{
+ public class UpdateSealBoxConfiguredResponse
+ {
+ public IList UpdateSealBoxConfiguredTaskDatas { get; set; }
+ }
+}
diff --git a/BBWY.Client/Models/Enums.cs b/BBWY.Client/Models/Enums.cs
index 10791c88..c42da767 100644
--- a/BBWY.Client/Models/Enums.cs
+++ b/BBWY.Client/Models/Enums.cs
@@ -484,4 +484,13 @@
{
待封箱, 待落仓, 待完结
}
+
+ ///
+ /// 封箱配置状态
+ ///
+ public enum SealBoxConfigureType
+ {
+ 已配置=0,
+ 待配置=1
+ }
}
diff --git a/BBWY.Client/Models/PackTask/PackTaskModel.cs b/BBWY.Client/Models/PackTask/PackTaskModel.cs
index 96ed9782..f42edc2a 100644
--- a/BBWY.Client/Models/PackTask/PackTaskModel.cs
+++ b/BBWY.Client/Models/PackTask/PackTaskModel.cs
@@ -54,20 +54,15 @@ namespace BBWY.Client.Models
private void UpdateTask()
{
- ViewModelLocator viewModel = new ViewModelLocator();
- var publicTaskViewModel = viewModel.PublishTask;
-
- if (publicTaskViewModel.ReflashWindow == null)
- publicTaskViewModel.ReflashWindow = ReflashTask;
-
+
if (!this.OrderId.IsNullOrEmpty())
{
System.Windows.MessageBox.Show("暂不支持修改采购组的任务");
return;
}
- publicTaskViewModel.InitData(this);
- PublishTaskWindow publish = new PublishTaskWindow();
+
+ PublishTaskWindow publish = new PublishTaskWindow(ReflashTask, this);
publish.Show();
//CreatePackTask create = new CreatePackTask();
diff --git a/BBWY.Client/Models/PackTask/SealBoxModel.cs b/BBWY.Client/Models/PackTask/SealBoxModel.cs
index 248d85e5..d9afe1e1 100644
--- a/BBWY.Client/Models/PackTask/SealBoxModel.cs
+++ b/BBWY.Client/Models/PackTask/SealBoxModel.cs
@@ -7,7 +7,10 @@ namespace BBWY.Client.Models.PackTask
{
public class SealBoxModel
{
-
+ ///
+ /// /封箱id
+ ///
+ public long SealBoxId { get; set; }
///
/// 店铺Id
///
@@ -38,7 +41,7 @@ namespace BBWY.Client.Models.PackTask
///
/// 封箱sku列表
///
- public List SealBoxSkus { get; set; }
+ public List SealBoxSkus { get; set; }
///
diff --git a/BBWY.Client/Models/SealBox/SealBoxConfigureModel.cs b/BBWY.Client/Models/SealBox/SealBoxConfigureModel.cs
new file mode 100644
index 00000000..eb384976
--- /dev/null
+++ b/BBWY.Client/Models/SealBox/SealBoxConfigureModel.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Text;
+
+namespace BBWY.Client.Models.SealBox
+{
+ public class SealBoxConfigureModel : NotifyObject
+ {
+
+
+ ///
+ /// skuid
+ ///
+ public string SkuId { get; set; }
+ ///
+ /// 任务id
+ ///
+ public long TaskId { get; set; }
+ ///
+ /// sku任务数
+ ///
+ public int SkuCount { get; set; }
+
+ ///
+ /// sku图片
+ ///
+ public string Logo { get; set; }
+
+ private int splitCount;
+ ///
+ /// 份数
+ ///
+ public int SplitCount { get=>splitCount; set {Set(ref splitCount,value); } }
+
+ private ObservableCollection wareHourseDatas = new ObservableCollection();
+ ///
+ /// 装箱配置列表
+ ///
+ public ObservableCollection WareHourseDatas { get => wareHourseDatas; set { Set(ref wareHourseDatas, value); } }
+
+ }
+ ///
+ /// 封箱配置 装箱配置
+ ///
+ public class SealBoxConfigureWareHourseModel : NotifyObject
+ {
+ private int index;
+
+ public int Index { get => index; set { Set(ref index, value); } }
+
+ private int count;
+
+ public int Count { get=>count; set {Set(ref count,value); } }
+
+ private string wareId;
+
+ public string WareId { get => wareId; set { Set(ref wareId, value); } }
+
+
+ private string wareName;
+
+ public string WareName { get => wareName; set { Set(ref wareName, value); } }
+
+
+ private WareType? wareType;
+
+ public WareType? WareType { get => wareType; set { Set(ref wareType, value); } }
+
+ ///
+ ///待封箱 = 0, 待落仓 = 1, 待完结 = 2
+ ///
+ public PositionState? WareState { get; set; }
+
+
+
+ }
+}
diff --git a/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs b/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs
new file mode 100644
index 00000000..64acda27
--- /dev/null
+++ b/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs
@@ -0,0 +1,62 @@
+using BBWY.Client.Models.APIModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Text;
+
+namespace BBWY.Client.Models.SealBox
+{
+ public class SealBoxConfiguredModel:NotifyObject
+ {
+ ///
+ /// 封箱id
+ ///
+ public long SealBoxId { get; set; }
+
+ ///
+ /// 箱子总数量
+ ///
+ public int SealBoxTotalCount { get; set; }
+
+ ///
+ /// 仓库名称
+ ///
+ public string WareName { get; set; }
+
+ ///
+ /// 仓库任务列表
+ ///
+ public ObservableCollection SealBoxConfigureTasks { get; set; }
+ }
+ public class SealBoxConfigureTask:NotifyObject
+ {
+ ///
+ /// skuid
+ ///
+ public string SkuId { get; set; }
+ ///
+ /// 任务id
+ ///
+ public long TaskId { get; set; }
+ ///
+ /// 仓库sku任务数
+ ///
+ public int WareHourseCount { get; set; }
+ ///
+ /// sku名称
+ ///
+ public string SkuName { get; set; }
+ ///
+ /// sku图片
+ ///
+ public string Logo { get; set; }
+ /////
+ ///// 预计完成时间
+ /////
+ //public DateTime? PreCompletedTime { get; set; }
+ /////
+ ///// 任务状态
+ /////
+ //public TaskState? TaskState { get; set; }
+ }
+}
diff --git a/BBWY.Client/Models/SealBox/SealBoxWaitConfigureModel.cs b/BBWY.Client/Models/SealBox/SealBoxWaitConfigureModel.cs
new file mode 100644
index 00000000..22bd2083
--- /dev/null
+++ b/BBWY.Client/Models/SealBox/SealBoxWaitConfigureModel.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Client.Models
+{
+ public class SealBoxWaitConfigureModel : NotifyObject
+ {
+ ///
+ /// skuid
+ ///
+ public string SkuId { get; set; }
+ ///
+ /// 任务id
+ ///
+ public long TaskId { get; set; }
+ ///
+ /// sku任务数
+ ///
+ public int SkuCount { get; set; }
+ ///
+ /// sku名称
+ ///
+ public string SkuName { get; set; }
+ ///
+ /// sku图片
+ ///
+ public string Logo { get; set; }
+ ///
+ /// 预计完成时间
+ ///
+ public DateTime? PreCompletedTime { get; set; }
+ ///
+ /// 任务状态
+ ///
+ public TaskState? TaskState { get; set; }
+
+ }
+}
diff --git a/BBWY.Client/Models/SealBox/UpdateSealBoxConfiguredTaskModel.cs b/BBWY.Client/Models/SealBox/UpdateSealBoxConfiguredTaskModel.cs
new file mode 100644
index 00000000..bc56a9ab
--- /dev/null
+++ b/BBWY.Client/Models/SealBox/UpdateSealBoxConfiguredTaskModel.cs
@@ -0,0 +1,43 @@
+using BBWY.Client.Models.APIModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Text;
+
+namespace BBWY.Client.Models.SealBox
+{
+ public class UpdateSealBoxConfiguredTaskModel:NotifyObject
+ {
+ public string Logo { get; set; }
+
+ public string SkuId { get; set; }
+
+ public long TaskId { get; set; }
+ ///
+ /// 采购数量
+ ///
+ public int SkuCount { get; set; }
+ public string SkuName { get; set; }
+
+ private int taskWareCount;
+ ///
+ /// 份数
+ ///
+ public int TaskWareCount { get => taskWareCount; set { Set(ref taskWareCount, value); } }
+
+
+
+ private ObservableCollection wareHourseDatas;
+
+ public ObservableCollection WareHourseDatas { get => wareHourseDatas; set { Set(ref wareHourseDatas, value); } }
+ }
+ public class UpdateSealBoxWareHourseModel:WareHourseData
+ {
+
+
+ ///
+ ///待封箱 = 0, 待落仓 = 1, 待完结 = 2
+ ///
+ public PositionState? WareState { get; set; }
+ }
+}
diff --git a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
index eae1740d..8f26bbbb 100644
--- a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
@@ -19,7 +19,7 @@ using System.Windows.Input;
namespace BBWY.Client.ViewModels.PackTask
{
- public class PublishTaskViewModel : BaseVM, IDenpendency
+ public class PublishTaskViewModel : BaseVM
{
#region 属性
diff --git a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
index 98c12fa2..aec0236a 100644
--- a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
@@ -23,6 +23,10 @@ using Newtonsoft.Json;
using BBWY.Client.Models.APIModel.Response.PackTask;
using BBWY.Client.Models.PackTask;
using WebSocketSharp;
+using BBWY.Client.Models.APIModel;
+using BBWY.Client.Views.SealBox;
+using BBWY.Client.Models.SealBox;
+using BBWY.Client.ViewModels.SealBox;
namespace BBWY.Client.ViewModels.PackTask
{
@@ -36,25 +40,36 @@ namespace BBWY.Client.ViewModels.PackTask
#region 属性绑定
+ private string sealBoxWaitConfigureCount;
+ ///
+ /// 封箱 待配置数
+ ///
+ public string SealBoxWaitConfigureCount { get => sealBoxWaitConfigureCount; set { Set(ref sealBoxWaitConfigureCount, value); } }
- //private SealBoxConfigureType sealBoxConfigureType;
- /////
- ///// 封箱配置状态
- /////
- //public SealBoxConfigureType SealBoxConfigureType { get; set; }
+ private string sealBoxConfiguredCount;
+ ///
+ ///封箱 已配置数
+ ///
+ public string SealBoxConfiguredCount { get => sealBoxConfiguredCount; set { Set(ref sealBoxConfiguredCount, value); } }
+
+ private SealBoxConfigureType sealBoxConfigureType;
+ ///
+ /// 封箱配置状态
+ ///
+ public SealBoxConfigureType SealBoxConfigureType { get => sealBoxConfigureType; set { Set(ref sealBoxConfigureType, value); } }
- //private ObservableCollection sealBoxWaitConfigureList;
- /////
- ///// 封箱待配置列表
- /////
- //public ObservableCollection SealBoxWaitConfigureList { get => sealBoxWaitConfigureList; set { Set(ref sealBoxWaitConfigureList, value); } }
+ private ObservableCollection sealBoxWaitConfigureList;
+ ///
+ /// 封箱待配置列表
+ ///
+ public ObservableCollection SealBoxWaitConfigureList { get => sealBoxWaitConfigureList; set { Set(ref sealBoxWaitConfigureList, value); } }
- //private ObservableCollection sealBoxConfiguredList;
- /////
- ///// 封箱已配置列表
- /////
- //public ObservableCollection SealBoxConfiguredList { get => sealBoxConfiguredList; set { Set(ref sealBoxConfiguredList, value); } }
+ private ObservableCollection sealBoxConfiguredList;
+ ///
+ /// 封箱已配置列表
+ ///
+ public ObservableCollection SealBoxConfiguredList { get => sealBoxConfiguredList; set { Set(ref sealBoxConfiguredList, value); } }
///
/// 查询时间段
@@ -160,7 +175,7 @@ namespace BBWY.Client.ViewModels.PackTask
-
+ private readonly SealBoxService sealBoxService;
private readonly PackTaskService packTaskService;
WorkProcessService workProcessService;
public int? taskStatus { get; set; }
@@ -175,7 +190,7 @@ namespace BBWY.Client.ViewModels.PackTask
- public TaskListViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService)
+ public TaskListViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService, SealBoxService sealBoxService)
{
this.globalContext = globalContext;
this.productService = productService;
@@ -186,6 +201,14 @@ namespace BBWY.Client.ViewModels.PackTask
PackTaskList = new ObservableCollection();//初始化数据
SetTaskStateCommand = new RelayCommand(SetTaskState);
+
+ SetSealBoxConfigureTypeCommand = new RelayCommand(s =>
+ {
+ PageIndex = 1;
+ SealBoxConfigureType = s;
+ Task.Factory.StartNew(() => SearchTaskList());
+ });
+
CreateTaskCommand = new RelayCommand(CreateTask);
SearchTaskCommand = new RelayCommand(() =>
{
@@ -200,35 +223,91 @@ namespace BBWY.Client.ViewModels.PackTask
OpenSkuDetailCommand = new RelayCommand