Browse Source

1

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
4b142236e2
  1. 22
      BBWY.Client/APIServices/QiKu/PackTaskService.cs
  2. 6
      BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs
  3. 6
      BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
  4. 8
      BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
  5. 4
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  6. 4
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs

22
BBWY.Client/APIServices/QiKu/PackTaskService.cs

@ -27,7 +27,7 @@ namespace BBWY.Client.APIServices
public ApiResponse<SearchTaskListResponse> GetTaskList(string skuId = null, string taskId = null, public ApiResponse<SearchTaskListResponse> SearchTaskList(string skuId = null, string taskId = null,
TaskState? TaskState = null, TaskState? TaskState = null,
int pageIndex = 1, int pageIndex = 1,
@ -36,15 +36,6 @@ namespace BBWY.Client.APIServices
) )
{ {
if (taskId != null && !string.IsNullOrEmpty(taskId.Trim()))
{
return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new
{
TaskId = taskId,
ShopId = globalContext.User.Shop.ShopId.ToString()
}, null, HttpMethod.Post);
}
return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new
{ {
@ -56,7 +47,7 @@ namespace BBWY.Client.APIServices
ShopId = globalContext.User.Shop.ShopId.ToString() ShopId = globalContext.User.Shop.ShopId.ToString()
}, null, HttpMethod.Post); }, null, HttpMethod.Post);
} }
public ApiResponse<SearchTaskListResponse> GetWareHouseList(string WayBillNo = null, string SourceExpressName = null, string departmentName = null, string skuId = null, string taskId = null, public ApiResponse<SearchTaskListResponse> SearchTaskList(string WayBillNo = null, string SourceExpressName = null, string departmentName = null, string skuId = null, string taskId = null,
TaskState? TaskState = null, TaskState? TaskState = null,
string ShopName = null, string ShopName = null,
@ -64,14 +55,7 @@ namespace BBWY.Client.APIServices
int pageSize = 10 int pageSize = 10
) )
{ {
if (taskId != null && !string.IsNullOrEmpty(taskId.Trim()))
{
return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new
{
TaskId = taskId
}, null, HttpMethod.Post);
}
return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new return SendRequest<SearchTaskListResponse>(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new
{ {
DepartmentName = departmentName, DepartmentName = departmentName,
@ -96,7 +80,7 @@ namespace BBWY.Client.APIServices
} }
public ApiResponse<ProductSkuResponse> GetProductSku(string skuId) public ApiResponse<ProductSkuResponse> SearchProduct(string skuId)
{ {
HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost); HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost);

6
BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs

@ -419,7 +419,7 @@ namespace BBWY.Client.Models
Brand = productApiResponse.Data.Items[0].BrandName; Brand = productApiResponse.Data.Items[0].BrandName;
} }
var productSku = packTaskService.GetProductSku(skuid); var productSku = packTaskService.SearchProduct(skuid);
if (productSku == null || !productSku.Success) if (productSku == null || !productSku.Success)
{ {
@ -452,6 +452,10 @@ namespace BBWY.Client.Models
BarCodeModel = new BarCodeModel(); BarCodeModel = new BarCodeModel();
IsSetBarCode = true; IsSetBarCode = true;
} }
if (BarCodeModel.LabelModel== BarcodeLabelModel.)
{
BarCodeModel.LabelModel = BarcodeLabelModel.;
}
BarCodeModel.Brand = Brand; BarCodeModel.Brand = Brand;
if (!string.IsNullOrEmpty(BrandName)) if (!string.IsNullOrEmpty(BrandName))
BarCodeModel.BrandName = BrandName; BarCodeModel.BrandName = BrandName;

6
BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs

@ -872,7 +872,7 @@ namespace BBWY.Client.ViewModels.PackTask
Brand = productApiResponse.Data.Items[0].BrandName; Brand = productApiResponse.Data.Items[0].BrandName;
} }
var productSku = packTaskService.GetProductSku(searchSkuId); var productSku = packTaskService.SearchProduct(searchSkuId);
if (productSku == null || !productSku.Success) if (productSku == null || !productSku.Success)
{ {
IsLoading = false; IsLoading = false;
@ -943,6 +943,10 @@ namespace BBWY.Client.ViewModels.PackTask
BarCodeModel = new BarCodeModel(); BarCodeModel = new BarCodeModel();
IsSetBarCode = true; IsSetBarCode = true;
} }
if (BarCodeModel.LabelModel == BarcodeLabelModel.)
{
BarCodeModel.LabelModel = BarcodeLabelModel.;
}
BarCodeModel.Brand = Brand; BarCodeModel.Brand = Brand;
if (!string.IsNullOrEmpty(BrandName)) if (!string.IsNullOrEmpty(BrandName))
BarCodeModel.BrandName = BrandName; BarCodeModel.BrandName = BrandName;

8
BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs

@ -446,7 +446,7 @@ namespace BBWY.Client.ViewModels.PackTask
Brand = productApiResponse.Data.Items[0].BrandName; Brand = productApiResponse.Data.Items[0].BrandName;
} }
var productSku = packTaskService.GetProductSku(skuid); var productSku = packTaskService.SearchProduct(skuid);
if (productSku == null || !productSku.Success || productSku.Data == null) if (productSku == null || !productSku.Success || productSku.Data == null)
return; return;
if (TaskId <= 0) if (TaskId <= 0)
@ -476,6 +476,9 @@ namespace BBWY.Client.ViewModels.PackTask
{ {
BarCodeModel = new BarCodeModel(); BarCodeModel = new BarCodeModel();
} }
if (BarCodeModel.LabelModel == BarcodeLabelModel.)
BarCodeModel.LabelModel = BarcodeLabelModel.;
BarCodeModel.Brand = Brand; BarCodeModel.Brand = Brand;
if (!string.IsNullOrEmpty(BrandName)) if (!string.IsNullOrEmpty(BrandName))
BarCodeModel.BrandName = BrandName; BarCodeModel.BrandName = BrandName;
@ -757,7 +760,8 @@ namespace BBWY.Client.ViewModels.PackTask
res = packTaskService.CreateTask(createTaskModel); res = packTaskService.CreateTask(createTaskModel);
} }
if(res == null) { if (res == null)
{
MessageBox.Show("未知错误"); MessageBox.Show("未知错误");
return; return;
} }

4
BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs

@ -522,7 +522,7 @@ namespace BBWY.Client.ViewModels.PackTask
try try
{ {
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据 PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
var datas = packTaskService.GetTaskList(SearchSkuId, SearchTaskId, this.TaskState, var datas = packTaskService.SearchTaskList(SearchSkuId, SearchTaskId, this.TaskState,
PageIndex, PageSize); PageIndex, PageSize);
if (datas != null && datas.Data != null && datas.Success) if (datas != null && datas.Data != null && datas.Success)
{ {
@ -581,6 +581,8 @@ namespace BBWY.Client.ViewModels.PackTask
if (item.BarCodeDTO != null && item.BarCodeDTO.Id > 0) if (item.BarCodeDTO != null && item.BarCodeDTO.Id > 0)
{ {
data.BarCodeModel = item.BarCodeDTO; data.BarCodeModel = item.BarCodeDTO;
if (data.BarCodeModel.LabelModel == BarcodeLabelModel.)
data.BarCodeModel.LabelModel = BarcodeLabelModel.;
} }
if (item.Cers != null) if (item.Cers != null)
{ {

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

@ -1343,7 +1343,7 @@ namespace BBWY.Client.ViewModels.PackTask
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据 PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
var datas = packTaskService.GetWareHouseList(SearchWayBillNo, SearchExpressName, SearchDepartment, SearchSkuId, SearchTaskId, this.TaskState, SearchShopName, var datas = packTaskService.SearchTaskList(SearchWayBillNo, SearchExpressName, SearchDepartment, SearchSkuId, SearchTaskId, this.TaskState, SearchShopName,
PageIndex, PageSize); PageIndex, PageSize);
if (datas != null && datas.Data != null && datas.Success) if (datas != null && datas.Data != null && datas.Success)
{ {
@ -1410,6 +1410,8 @@ namespace BBWY.Client.ViewModels.PackTask
{ {
data.BarCodeModel = item.BarCodeDTO; data.BarCodeModel = item.BarCodeDTO;
if (data.BarCodeModel.LabelModel == BarcodeLabelModel.)
data.BarCodeModel.LabelModel = BarcodeLabelModel.;
} }
if (item.Cers != null) if (item.Cers != null)

Loading…
Cancel
Save