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. 16
      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,
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
{
@ -56,7 +47,7 @@ namespace BBWY.Client.APIServices
ShopId = globalContext.User.Shop.ShopId.ToString()
}, 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,
string ShopName = null,
@ -64,14 +55,7 @@ namespace BBWY.Client.APIServices
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
{
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);

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

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

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

@ -446,7 +446,7 @@ namespace BBWY.Client.ViewModels.PackTask
Brand = productApiResponse.Data.Items[0].BrandName;
}
var productSku = packTaskService.GetProductSku(skuid);
var productSku = packTaskService.SearchProduct(skuid);
if (productSku == null || !productSku.Success || productSku.Data == null)
return;
if (TaskId <= 0)
@ -476,6 +476,9 @@ namespace BBWY.Client.ViewModels.PackTask
{
BarCodeModel = new BarCodeModel();
}
if (BarCodeModel.LabelModel == BarcodeLabelModel.)
BarCodeModel.LabelModel = BarcodeLabelModel.;
BarCodeModel.Brand = Brand;
if (!string.IsNullOrEmpty(BrandName))
BarCodeModel.BrandName = BrandName;
@ -489,7 +492,7 @@ namespace BBWY.Client.ViewModels.PackTask
IsSetBarCode = true;
}
if (productSku.Data.PackConfig != null&&TaskId<=0)
if (productSku.Data.PackConfig != null && TaskId <= 0)
{
var config = productSku.Data.PackConfig;
SkuTitle = config.SkuGoodsTitle;
@ -611,7 +614,7 @@ namespace BBWY.Client.ViewModels.PackTask
return;
}
SaveTask = "保存";
Logo = model.ItemList[0].Logo.Replace("80x80","200x200");
Logo = model.ItemList[0].Logo.Replace("80x80", "200x200");
SearchSkuId = model.SkuId;
SkuId = model.SkuId;
SkuCount = model.SkuCount;
@ -741,7 +744,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
if (CertificateModel == null || IsSetCertificate || CertificateModel.Count() <= 0)
{
MessageBox.Show ("请设置合格证模板","提示");
MessageBox.Show("请设置合格证模板", "提示");
return;
}
createTaskModel.CerId = string.Join(",", CertificateModel.Where(c => c.Id > 0).Select(c => c.Id));//
@ -757,11 +760,12 @@ namespace BBWY.Client.ViewModels.PackTask
res = packTaskService.CreateTask(createTaskModel);
}
if(res == null) {
if (res == null)
{
MessageBox.Show("未知错误");
return;
}
if (!res .Success)
if (!res.Success)
{
MessageBox.Show(res.Msg);
return;

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

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

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

@ -1343,7 +1343,7 @@ namespace BBWY.Client.ViewModels.PackTask
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);
if (datas != null && datas.Data != null && datas.Success)
{
@ -1410,6 +1410,8 @@ namespace BBWY.Client.ViewModels.PackTask
{
data.BarCodeModel = item.BarCodeDTO;
if (data.BarCodeModel.LabelModel == BarcodeLabelModel.)
data.BarCodeModel.LabelModel = BarcodeLabelModel.;
}
if (item.Cers != null)

Loading…
Cancel
Save