From d58a2fefae46a7e1ef5211f3f4056f83d26cc820 Mon Sep 17 00:00:00 2001
From: "506583276@qq.com" <506583276@qq.com>
Date: Mon, 26 Jun 2023 21:02:34 +0800
Subject: [PATCH] 1
---
BBWY.Client/BBWYAppSettings.json | 2 +-
.../PackTask/PackTaskResultResponse.cs | 417 ++++--------------
.../Models/BatchPurchase/BatchPublishTask.cs | 2 +-
BBWY.Client/Models/Enums.cs | 2 +-
.../PackTask/CreatePackTaskViewModel.cs | 2 +-
.../PackTask/PublishTaskViewModel.cs | 36 +-
.../QualityTask/QualityViewModel.cs | 9 +-
.../Views/PackTask/PublishTaskWindow.xaml | 14 +-
.../Views/PackTask/SetCerWindow.xaml.cs | 21 +
.../Views/PackTask/TaskListControl.xaml | 54 ++-
.../Views/PackTask/WareHouseListControl.xaml | 18 +-
11 files changed, 206 insertions(+), 371 deletions(-)
diff --git a/BBWY.Client/BBWYAppSettings.json b/BBWY.Client/BBWYAppSettings.json
index f6dee4d4..e1b3dcff 100644
--- a/BBWY.Client/BBWYAppSettings.json
+++ b/BBWY.Client/BBWYAppSettings.json
@@ -5,5 +5,5 @@
"JOSApiHost": "",
"1688ApiHost": "",
"QKApiHost": "http://localhost:8080"
- //"QKApiHost": "http://qiku.qiyue666.com"
+ //"QKApiHost": "http://qiku.qiyue666.com"
}
\ No newline at end of file
diff --git a/BBWY.Client/Models/APIModel/Response/PackTask/PackTaskResultResponse.cs b/BBWY.Client/Models/APIModel/Response/PackTask/PackTaskResultResponse.cs
index 8f37c71a..1ffffef6 100644
--- a/BBWY.Client/Models/APIModel/Response/PackTask/PackTaskResultResponse.cs
+++ b/BBWY.Client/Models/APIModel/Response/PackTask/PackTaskResultResponse.cs
@@ -6,429 +6,168 @@ using WebSocketSharp;
namespace BBWY.Client.Models.APIModel.Response.PackTask
{
- public class PackTaskResultResponse
- {
- ///
- /// 查询总数据(判断总页数)
- ///
- public int TotalCount { get; set; }
-
- ///
- /// 页面返回的数据
- ///
- public GetPackTaskDTO[] Items { get; set; }
- }
- public class GetPackTaskDTO
- {
- ///
- /// SKU标题
- ///
- public string SkuName { get; set; }
- ///
- /// 图片链接
- ///
- public string Logo { get; set; }
- ///
- /// 任务id
- ///
- public long TaskId { get; set; }
-
- ///
- /// 需求方创建日期
- ///
- public DateTime CreateTime { get; set; }
-
- ///
- /// 任务状态(未完成=0,已完成=1,)
- ///
- public int TaskStatus { get; set; }
-
- ///
- /// 需求方团队
- ///
- public string DepartmentName { get; set; }
-
- ///
- /// 需求方店铺
- ///
- public string ShopName { get; set; }
-
- ///
- /// 货号
- ///
- public string ProductItemNum { get; set; }
-
- ///
- /// 货号品名
- ///
- public string BrandName { get; set; }
-
- ///
- /// 对接人
- ///
- public string UserName { get; set; }
-
- ///
- /// 打包人
- ///
- public string[] PackUserName { get; set; }
-
- ///
- /// skuid
- ///
- public string SkuId { get; set; }
-
- ///
- /// sku数量
- ///
- public int SkuCount { get; set; }
- ///
- /// 打包类型(单件=0,多件=1)
- ///
- public int PackType { get; set; }
-
- ///
- /// 落仓(商家仓=0,云仓=1,京仓=2,3=聚水潭)
- ///
- public int PositionType { get; set; }
-
- ///
- /// 基础包装(快递袋=0,纸箱=1,麻袋=2)
- ///
- public int BasicPack { get; set; }
-
- ///
- /// 增量1()
- ///
- public string Increment1 { get; set; }
-
- ///
- /// 增量2()
- ///
- public int? Increment2 { get; set; }
-
- ///
- /// 工序道数
- ///
- public int? ProcessCount { get; set; }
-
- ///
- /// 到货情况(待收货=0,部分收货=1,已到货=2)
- ///
- public int Availability { get; set; }
-
- //todo: 条形码数据 合格证数据
-
- /////
- ///// 打包费用
- /////
- //public FeesItemTypeDTO FeesItemTypeDTO { get; set; }
- ///
- ///
- ///
- public FeesItemResponse FeesItemResponse { get; set; }
- ///
- /// 合格证位置(外部包装=0,产品包装=1)
- ///
- public int? CertificatePosition { get; set; }
-
- ///
- /// 箱子耗材(自带=0,4-13号纸箱=1-10,)
- ///
- public int? BoxConsumables { get; set; }
-
- ///
- /// sku配件名称
- ///
- public string SkuGoodsTitle { get; set; }
-
- ///
- /// 配件数
- ///
- public int GoodsNumber { get; set; }
-
- ///
- /// 气泡纸耗材(长=0,宽=1)
- ///
- public int? AirConsumables { get; set; }
-
- ///
- /// 注意事项(对接备注)
- ///
- public string MarkMessage { get; set; }
-
- public BarCodeModel BarCodeDTO { get; set; }
- public CertificateModel[] cers { get; set; }
- ///
- /// 是否加急
- ///
- public int IsWorry { get; set; }
-
-
- ///
- /// 品牌
- ///
- public string Brand { get; set; }
- public string OrderId { get; set; }
- }
-
- //public class FeesItemTypeDTO :NotifyObject
+ //public class PackTaskResultResponse
//{
-
-
- // private bool isPaperBox;
- // public bool IsPaperBox { get => isPaperBox; set { Set(ref isPaperBox, value); } }
-
- // private bool isBoxNumber;
- // public bool IsBoxNumber { get => isBoxNumber; set { Set(ref isBoxNumber, value); } }
-
- // private bool isAcceptGoods;
- // public bool IsAcceptGoods { get=>isAcceptGoods; set { Set(ref isAcceptGoods, value); } }
-
-
- // private bool isSendGoods;
// ///
- // /// 装箱 送货
+ // /// 查询总数据(判断总页数)
// ///
- // public bool IsSendGoods { get=> isSendGoods; set { Set(ref isSendGoods, value); } }
+ // public int TotalCount { get; set; }
- // private bool isRuturnGoods;
// ///
- // /// 退货质检
+ // /// 页面返回的数据
// ///
- // public bool IsRuturnGoods { get => isRuturnGoods; set { Set(ref isRuturnGoods, value); } }
-
- // private bool isUpdatePack;
+ // public GetPackTaskDTO[] Items { get; set; }
+ //}
+ //public class GetPackTaskDTO
+ //{
// ///
- // /// 更换包装
+ // /// SKU标题
// ///
- // public bool IsUpdatePack { get => isUpdatePack; set { Set(ref isUpdatePack, value); } }
-
- // private bool isUnpacking;
+ // public string SkuName { get; set; }
// ///
- // /// 拆套
+ // /// 图片链接
// ///
- // public bool IsUnpacking { get => isUnpacking; set { Set(ref isUnpacking, value); } }
-
- // private bool isBasicPackFees;
+ // public string Logo { get; set; }
// ///
- // /// 基础包装费
+ // /// 任务id
// ///
- // public bool IsBasicPackFees { get => isBasicPackFees; set { Set(ref isBasicPackFees, value); } }
+ // public long TaskId { get; set; }
- // private bool isBoxPackFees;
// ///
- // /// 箱子包装费
+ // /// 需求方创建日期
// ///
- // public bool IsBoxPackFees { get => isBoxPackFees; set { Set(ref isBoxPackFees, value); } }
+ // public DateTime CreateTime { get; set; }
- // private bool isExpressPackFees;
// ///
- // /// 快递袋包装费
+ // /// 任务状态(未完成=0,已完成=1,)
// ///
- // public bool IsExpressPackFees { get => isExpressPackFees; set { Set(ref isExpressPackFees, value); } }
+ // public int TaskStatus { get; set; }
- // private bool isExpressCloseSideFees;
// ///
- // /// 快递袋封边
+ // /// 需求方团队
// ///
- // public bool IsExpressCloseSideFees { get => isExpressCloseSideFees; set { Set(ref isExpressCloseSideFees, value); } }
+ // public string DepartmentName { get; set; }
- // private bool isAirPaperPackFees;
// ///
- // /// 气泡纸包装费
+ // /// 需求方店铺
// ///
- // public bool IsAirPaperPackFees { get => isAirPaperPackFees; set { Set(ref isAirPaperPackFees, value); } }
+ // public string ShopName { get; set; }
- // private bool isAirBagPackFees;
// ///
- // /// 气泡袋包装费
+ // /// 货号
// ///
- // public bool IsAirBagPackFees { get => isAirBagPackFees; set { Set(ref isAirBagPackFees, value); } }
+ // public string ProductItemNum { get; set; }
- // private bool isPOPBagPackFees;
// ///
- // /// POP包装费
+ // /// 货号品名
// ///
- // public bool IsPOPBagPackFees { get => isPOPBagPackFees; set { Set(ref isPOPBagPackFees, value); } }
+ // public string BrandName { get; set; }
- // private bool isTapePackFees;
// ///
- // /// 胶带工序
+ // /// 对接人
// ///
- // public bool IsTapePackFees { get => isTapePackFees; set { Set(ref isTapePackFees, value); } }
+ // public string UserName { get; set; }
- // private bool isIncreateGoods;
// ///
- // ///增量配件
+ // /// 打包人
// ///
- // public bool IsIncreateGoods { get => isIncreateGoods; set { Set(ref isIncreateGoods, value); } }
+ // public string[] PackUserName { get; set; }
-
-
- // private bool isAirPaper;
// ///
- // /// 气泡纸
+ // /// skuid
// ///
- // public bool IsAirPaper { get => isAirPaper; set { Set(ref isAirPaper, value); } }
+ // public string SkuId { get; set; }
- // private bool isTape;
// ///
- // /// 胶带
+ // /// sku数量
// ///
- // public bool IsTape { get => isTape; set { Set(ref isTape, value); } }
-
- // public void SetAllVisitity()
- // {
- // IsPaperBox = SetVisitity( PaperBox);
- // IsBoxNumber = SetVisitity(Convert.ToDecimal(BoxNumber) );
-
- // IsAcceptGoods = SetVisitity(AcceptGoods);
- // IsSendGoods = SetVisitity(SendGoods);
- // IsRuturnGoods = SetVisitity(RuturnGoods);
- // IsUpdatePack = SetVisitity(UpdatePack);
- // IsUnpacking = SetVisitity(Unpacking);
-
-
- // IsBasicPackFees = SetVisitity(BasicPackFees);
- // IsBoxPackFees = SetVisitity(BoxPackFees );
- // IsExpressPackFees = SetVisitity(ExpressPackFees);
- // IsExpressCloseSideFees = SetVisitity(ExpressCloseSideFees );
- // IsAirPaperPackFees = SetVisitity(AirPaperPackFees);
- // IsAirBagPackFees = SetVisitity(AirBagPackFees);
- // IsPOPBagPackFees = SetVisitity(POPBagPackFees);
- // IsTapePackFees = SetVisitity(TapePackFees);
- // IsIncreateGoods = SetVisitity(IncreateGoods);
- // IsAirPaper = SetVisitity(AirPaper);
- // IsTape = SetVisitity(Tape);
- // }
-
- // private bool SetVisitity( decimal? item )
- // {
- // if (item != null )
- // {
- // return false;
- // }
- // else
- // {
- // return true;// 无数据隐藏
- // }
- // }
-
-
+ // public int SkuCount { get; set; }
// ///
- // /// 箱子价格
+ // /// 打包类型(单件=0,多件=1)
// ///
- // public decimal? PaperBox { get; set; }
- // public decimal PaperBoxNo { get; set; }
+ // public int PackType { get; set; }
// ///
- // /// 第几号箱子
+ // /// 落仓(商家仓=0,云仓=1,京仓=2,3=聚水潭)
// ///
- // public int BoxNumber { get; set; }
+ // public int PositionType { get; set; }
// ///
- // /// 收货 卸货
+ // /// 基础包装(快递袋=0,纸箱=1,麻袋=2)
// ///
- // public decimal? AcceptGoods { get; set; }
- // public decimal AcceptGoodsNo { get; set; }
+ // public int BasicPack { get; set; }
// ///
- // /// 装箱 送货
+ // /// 增量1()
// ///
- // public decimal? SendGoods { get; set; }
- // public decimal SendGoodsNo { get; set; }
+ // public string Increment1 { get; set; }
- // ///
- // /// 退货质检
- // ///
- // public decimal? RuturnGoods { get; set; }
- // public decimal RuturnGoodsNo { get; set; }
// ///
- // /// 更换包装
+ // /// 工序道数
// ///
- // public decimal? UpdatePack { get; set; }
- // public decimal UpdatePackNo { get; set; }
+ // public int? ProcessCount { get; set; }
// ///
- // /// 拆套
+ // /// 到货情况(待收货=0,部分收货=1,已到货=2)
// ///
- // public decimal? Unpacking { get; set; }
- // public decimal UnpackingNo { get; set; }
-
+ // public int Availability { get; set; }
+ // //todo: 条形码数据 合格证数据
+ // /////
+ // ///// 打包费用
+ // /////
+ // //public FeesItemTypeDTO FeesItemTypeDTO { get; set; }
// ///
- // /// 基础包装费
+ // ///
// ///
- // public decimal? BasicPackFees { get; set; }
- // public decimal BasicPackFeesNo { get; set; }
-
- // ///
- // /// 箱子包装费
- // ///
- // public decimal? BoxPackFees { get; set; }
- // public decimal BoxPackFeesNo { get; set; }
- // ///
- // /// 快递袋包装费
- // ///
- // public decimal? ExpressPackFees { get; set; }
- // public decimal ExpressPackFeesNo { get; set; }
- // ///
- // /// 快递袋封边
- // ///
- // public decimal? ExpressCloseSideFees { get; set; }
- // public decimal ExpressCloseSideFeesNo { get; set; }
- // ///
- // /// 气泡纸包装费
- // ///
- // public decimal? AirPaperPackFees { get; set; }
- // public decimal AirPaperPackFeesNo { get; set; }
+ // public FeesItemResponse FeesItemResponse { get; set; }
// ///
- // /// 气泡袋包装费
+ // /// 合格证位置(外部包装=0,产品包装=1)
// ///
- // public decimal? AirBagPackFees { get; set; }
- // public decimal AirBagPackFeesNo { get; set; }
+ // public int? CertificatePosition { get; set; }
+
// ///
- // /// POP包装费
+ // /// 箱子耗材(自带=0,4-13号纸箱=1-10,)
// ///
- // public decimal? POPBagPackFees { get; set; }
- // public decimal POPBagPackFeesNo { get; set; }
+ // public int? BoxConsumables { get; set; }
+
// ///
- // /// 胶带工序
+ // /// sku配件名称
// ///
- // public decimal? TapePackFees { get; set; }
- // public decimal TapePackFeesNo { get; set; }
+ // public string SkuGoodsTitle { get; set; }
+
// ///
- // ///增量配件
+ // /// 配件数
// ///
- // public decimal? IncreateGoods { get; set; }
- // public decimal IncreateGoodsNo { get; set; }
+ // public int GoodsNumber { get; set; }
// ///
- // /// 气泡纸
+ // /// 气泡纸耗材(长=0,宽=1)
// ///
- // public decimal? AirPaper { get; set; }
- // public decimal AirPaperNo { get; set; }
+ // public int? AirConsumables { get; set; }
+
// ///
- // /// 胶带
+ // /// 注意事项(对接备注)
// ///
- // public decimal? Tape { get; set; }
- // public decimal TapeNo { get; set; }
-
+ // public string MarkMessage { get; set; }
+ // public BarCodeModel BarCodeDTO { get; set; }
+ // public CertificateModel[] cers { get; set; }
// ///
- // /// 打包消耗的总费用(总数量)
+ // /// 是否加急
// ///
- // public decimal AllPackFees { get; set; }
+ // public int IsWorry { get; set; }
+
// ///
- // /// 总费用(单价)
+ // /// 品牌
// ///
- // public decimal TotalFees { get; set; }
-
+ // public string Brand { get; set; }
+ // public string OrderId { get; set; }
//}
+
}
diff --git a/BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs b/BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs
index 48e8f88d..beca9a95 100644
--- a/BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs
+++ b/BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs
@@ -472,7 +472,7 @@ namespace BBWY.Client.Models
BasicPack = (BasicPack)config.BasicPack;
// Availability = (Availability)config.Availability;
MarkMessage = config.MarkMessage;
- CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无 : (CertificatePosition)config.CertificatePosition.Value;
+ CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无需合格证 : (CertificatePosition)config.CertificatePosition.Value;
// Increment1 = config.Increment1;
string[] increateDatas = config.Increment1.Split(',');
diff --git a/BBWY.Client/Models/Enums.cs b/BBWY.Client/Models/Enums.cs
index 8fb1852f..ecb2ce73 100644
--- a/BBWY.Client/Models/Enums.cs
+++ b/BBWY.Client/Models/Enums.cs
@@ -283,7 +283,7 @@
{
外部包装 = 0,
产品包装 = 1,
- 无 = 2
+ 无需合格证 = 2
}
public enum Increment
diff --git a/BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs b/BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
index c1bd7658..322fe04d 100644
--- a/BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
@@ -977,7 +977,7 @@ namespace BBWY.Client.ViewModels.PackTask
BasicPack = (BasicPack)config.BasicPack;
//Availability = (Availability)config.Availability;
MarkMessage = config.MarkMessage;
- CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无 : (CertificatePosition)config.CertificatePosition.Value;
+ CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无需合格证 : (CertificatePosition)config.CertificatePosition.Value;
string[] increateDatas = config.Increment1.Split(',');
bool isSelected = false;
diff --git a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
index 8f26bbbb..9991e3a3 100644
--- a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
@@ -60,7 +60,7 @@ namespace BBWY.Client.ViewModels.PackTask
private ObservableCollection certificatePositionList = new ObservableCollection {
- "无","外部包装","产品包装"
+ "无需合格证","外部包装","产品包装"
};
public ObservableCollection CertificatePositionList { get => certificatePositionList; set { Set(ref certificatePositionList, value); } }
@@ -424,6 +424,8 @@ namespace BBWY.Client.ViewModels.PackTask
return;
SkuId = skuid;
+
+
ApiResponse productApiResponse = null;
var skuResponse = productService.GetProductSkuList(string.Empty, skuid);
if (skuResponse.Success)
@@ -453,8 +455,11 @@ namespace BBWY.Client.ViewModels.PackTask
if (TaskId <= 0)
BrandName = productSku.Data.BrandName;
CertificateModel = productSku.Data.Cers;
+
+ IsSetCertificate = false;
if (CertificateModel == null)
{
+ IsSetCertificate = true;
CertificateModel = new CertificateModel[] {
new CertificateModel{ }
};
@@ -483,11 +488,9 @@ namespace BBWY.Client.ViewModels.PackTask
if (TaskId <= 0)
{
-
-
IsNeedBarCode = Need.需要;
IsSetBarCode = true;
- IsSetCertificate = true;
+
}
if (productSku.Data.PackConfig != null&&TaskId<=0)
{
@@ -498,14 +501,14 @@ namespace BBWY.Client.ViewModels.PackTask
BasicPack = (BasicPack)config.BasicPack;
//Availability = (TaskState)config.Availability;
MarkMessage = config.MarkMessage;
- CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无 : (CertificatePosition)config.CertificatePosition.Value;
+ CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无需合格证 : (CertificatePosition)config.CertificatePosition.Value;
// Increment1 = config.Increment1;
string[] increateDatas = config.Increment1.Split(',');
IsNeedBarCode = config.NeedBar ? Need.需要 : Need.不需要;
IsNeedCertificateModel = config.NeedCer ? Need.需要 : Need.不需要;
IsSetBarCode = !config.NeedBar;
- IsSetCertificate = !config.NeedCer;
+ //IsSetCertificate = config.CertificatePosition== (int)CertificatePosition.无需合格证;
bool isSelected = false;
foreach (var item in increates)
@@ -578,6 +581,9 @@ namespace BBWY.Client.ViewModels.PackTask
SpuId = string.Empty;
if (model == null)
{
+ Availability = Availability.未到货;
+
+ CertificatePosition = CertificatePosition.外部包装;
SaveTask = "发布";
TaskId = 0;
Logo = string.Empty;
@@ -712,7 +718,6 @@ namespace BBWY.Client.ViewModels.PackTask
SkuId = SkuId,
CreateTime = DateTime.Now,
Increment1 = increateStr,
- //Increment2 = (int)Increment2,
CertificatePosition = (int)CertificatePosition,
PackType = (int)PackType,
MarkMessage = MarkMessage,
@@ -724,6 +729,7 @@ namespace BBWY.Client.ViewModels.PackTask
ShopId = globalContext.User.Shop.ShopId.ToString(),
NeedBar = IsNeedBarCode == Need.需要,
NeedCer = IsNeedCertificateModel == Need.需要
+
//IsWorry = IsWorry
};
@@ -736,15 +742,16 @@ namespace BBWY.Client.ViewModels.PackTask
}
createTaskModel.BarCodeId = BarCodeModel.Id;
}
- if (IsNeedCertificateModel == Need.需要)
+ if (CertificatePosition != CertificatePosition.无需合格证)
{
if (CertificateModel == null || IsSetCertificate || CertificateModel.Count() <= 0)
{
- new TipsWindow("请设置合格证模板").Show();
+ MessageBox.Show ("请设置合格证模板","提示");
return;
}
createTaskModel.CerId = string.Join(",", CertificateModel.Where(c => c.Id > 0).Select(c => c.Id));//
}
+
ApiResponse