Browse Source

1

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
08141112f5
  1. 13
      BBWY.Client/APIServices/PackPurchaseTaskService.cs
  2. 39
      BBWY.Client/APIServices/PackTaskService.cs
  3. 9
      BBWY.Client/Extensions/CopyExtensions.cs
  4. 4
      BBWY.Client/Models/APIModel/Response/PackPurchaseTask/QualityTaskResponse.cs
  5. 30
      BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuCountsResponse.cs
  6. 169
      BBWY.Client/Models/APIModel/Response/PackTask/SearchTaskListResponse.cs
  7. 29
      BBWY.Client/Models/Enums.cs
  8. 21
      BBWY.Client/Models/PackTask/PackTaskModel.cs
  9. 16
      BBWY.Client/ViewModels/MainViewModel.cs
  10. 14
      BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
  11. 13
      BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
  12. 14
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  13. 195
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  14. 64
      BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs
  15. 8
      BBWY.Client/Views/PackTask/PackTaskTotal.xaml
  16. 306
      BBWY.Client/Views/PackTask/WareHouseList.xaml
  17. 145
      BBWY.Client/Views/PackTask/WareHouseList.xaml.cs
  18. 281
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml
  19. 20
      BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs
  20. 40
      BBWY.Client/Views/QualityTask/QualityWindow.xaml

13
BBWY.Client/APIServices/PackPurchaseTaskService.cs

@ -1,4 +1,5 @@
using BBWY.Client.Models.APIModel;
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel;
using BBWY.Client.Models.APIModel.Request;
using BBWY.Client.Models.APIModel.Response.PackPurchaseTask;
using BBWY.Client.Models.APIModel.Response.PackTask;
@ -103,5 +104,15 @@ namespace BBWY.Client.APIServices
return SendRequest<bool>(globalContext.QKApiHost, $"api/PackPurchaseTask/CompeteQualityTask", competeQualityTask, null, HttpMethod.Post);
}
public ApiResponse<BarCodeModel> SearchBarCode(string skuId)
{
return SendRequest<BarCodeModel>(globalContext.QKApiHost, $"api/Barcode/SearchBarCodeBySkuId?skuId={skuId}", null, null, HttpMethod.Get);
}
}
}

39
BBWY.Client/APIServices/PackTaskService.cs

@ -1,5 +1,6 @@
using BBWY.Client.Helpers;
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel;
using BBWY.Client.Models.APIModel.Request;
using BBWY.Client.Models.APIModel.Response.PackTask;
using BBWY.Client.Models.PackTask;
@ -35,6 +36,18 @@ namespace BBWY.Client.APIServices
)
{
if (taskId!=null&&!string.IsNullOrEmpty(taskId.Trim()))
{
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/SearchNewPackTaskList", new
{
TaskId = taskId,
ShopId = globalContext.User.Shop.ShopId.ToString()
}, null, HttpMethod.Post);
}
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/SearchNewPackTaskList", new
{
@ -49,17 +62,24 @@ namespace BBWY.Client.APIServices
ShopId = globalContext.User.Shop.ShopId.ToString()
}, null, HttpMethod.Post);
}
public ApiResponse<PackTaskResultResponse> GetWareHouseList(int? isWorry = null, string departmentName = null, string skuId = null, string taskId = null,
public ApiResponse<SearchTaskListResponse> GetWareHouseList(int? isWorry = null, string departmentName = null, string skuId = null, string taskId = null,
DateTime? startTime = null,
DateTime? endTime = null,
TaskState? availability = null,
int? taskStatus = null,
PackTaskState? TaskState = null,
string ShopName = null,
int pageIndex = 1,
int pageSize = 10
)
{
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/SearchNewPackTaskList", new
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
{
IsWorry = isWorry,
DepartmentName = departmentName,
@ -67,10 +87,10 @@ namespace BBWY.Client.APIServices
TaskId = taskId,
StartTime = startTime,
EndTime = endTime,
Availability = availability,
TaskStatus = taskStatus,
TaskState = TaskState,
PageIndex = pageIndex,
PageSize = pageSize
PageSize = pageSize,
ShopName = ShopName,
}, null, HttpMethod.Post);
}
@ -242,6 +262,9 @@ namespace BBWY.Client.APIServices
userId = globalContext.User.Id.ToString(),
}, null, HttpMethod.Post);
}
}
public class AddConsumableRequest
{

9
BBWY.Client/Extensions/CopyExtensions.cs

@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System;
namespace BBWY.Client.Extensions
{
@ -9,4 +10,12 @@ namespace BBWY.Client.Extensions
return JsonConvert.DeserializeObject<T>(JsonConvert.SerializeObject(p));
}
}
public static class EnumExtension
{
public static T ToEnum<T>(this string value)
{
return (T)Enum.Parse(typeof(T), value);
}
}
}

4
BBWY.Client/Models/APIModel/Response/PackPurchaseTask/QualityTaskResponse.cs

@ -113,5 +113,9 @@ namespace BBWY.Client.Models.APIModel.Response.PackPurchaseTask
/// 数量
/// </summary>
public int Count { get; set; }
/// <summary>
/// 仓库类型
/// </summary>
public WareType? WareType { get; set; }
}
}

30
BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuCountsResponse.cs

@ -6,13 +6,35 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
{
public class ProductSkuCountsResponse
{
/// <summary>
/// 已到货(质检)
/// </summary>
public int ArrivedCount { get; set; }
/// <summary>
/// 未到货
/// </summary>
public int NoArrivedCount { get; set; }
/// <summary>
/// 部分到货
/// </summary>
public int SomeArrivedCount { get; set; }
/// <summary>
/// 加急数量
/// </summary>
public int WorryCount { get; set; }
/// <summary>
/// 待打包数
/// </summary>
public int? WaitPackCount { get; set; }
/// <summary>
/// 带封箱数
/// </summary>
public int? WaitSealBox { get; set; }
/// <summary>
/// 待出库数
/// </summary>
public int? WaitOutbound { get; set; }
}
}

169
BBWY.Client/Models/APIModel/Response/PackTask/SearchTaskListResponse.cs

@ -0,0 +1,169 @@
using BBWY.Client.Models.APIModel.Response.PackPurchaseTask;
using BBWY.Client.Models.APIModel.Response.PackTask;
using System;
using System.Collections.Generic;
using System.Text;
namespace BBWY.Client.Models.APIModel
{
public class SearchTaskListResponse
{
/// <summary>
/// 查询总数据(判断总页数)
/// </summary>
public int TotalCount { get; set; }
/// <summary>
/// 页面返回的数据
/// </summary>
public PackTaskData[] Items { get; set; }
}
public class PackTaskData
{
/// <summary>
/// 图片链接
/// </summary>
public string Logo { get; set; }
/// <summary>
/// 任务id
/// </summary>
public long TaskId { get; set; }
/// <summary>
/// 需求方创建日期
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 任务状态
/// </summary>
public PackTaskState TaskState { get; set; }
/// <summary>
/// 需求方团队
/// </summary>
public string DepartmentName { get; set; }
/// <summary>
/// 需求方店铺
/// </summary>
public string ShopName { get; set; }
/// <summary>
/// 货号
/// </summary>
public string ProductItemNum { get; set; }
/// <summary>
/// 货号品名
/// </summary>
public string BrandName { get; set; }
/// <summary>
/// 对接人
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 打包人
/// </summary>
public string[] PackUserName { get; set; }
/// <summary>
/// skuid
/// </summary>
public string SkuId { get; set; }
/// <summary>
/// SKU标题
/// </summary>
public string SkuName { get; set; }
/// <summary>
/// sku数量
/// </summary>
public int SkuCount { get; set; }
/// <summary>
/// 打包类型(单件=0,多件=1)
/// </summary>
public int PackType { get; set; }
/// <summary>
/// 落仓(本地仓=0,齐越仓=1,京东仓=2,聚水潭=3)
/// </summary>
public string PositionType { get; set; }
/// <summary>
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
/// </summary>
public int BasicPack { get; set; }
/// <summary>
/// 增量1()
/// </summary>
public string Increment1 { get; set; }
/// <summary>
/// 到货情况(待收货=0,部分收货=1,已到货=2)
/// </summary>
public int Availability { get; set; }
/// <summary>
/// 服务费用数据
/// </summary>
public FeesItemResponse FeesItemResponse { get; set; }
/// <summary>
/// 合格证位置(外部包装=0,产品包装=1)
/// </summary>
public int? CertificatePosition { get; set; }
/// <summary>
/// sku配件名称
/// </summary>
public string SkuGoodsTitle { get; set; }
/// <summary>
/// 配件数
/// </summary>
public int GoodsNumber { get; set; }
/// <summary>
/// 注意事项(对接备注)
/// </summary>
public string MarkMessage { get; set; }
/// <summary>
/// 条形码数据
/// </summary>
public BarCodeModel BarCodeDTO { get; set; }
/// <summary>
/// 合格证数据
/// </summary>
public CertificateModel[] Cers { get; set; }
/// <summary>
/// 是否加急
/// </summary>
public int IsWorry { get; set; }
/// <summary>
/// 品牌
/// </summary>
public string Brand { get; set; }
public string OrderId { get; set; }
/// <summary>
///分箱情况
/// </summary>
public WareHourseDTO[] WareHourses { get; set; }
}
}

29
BBWY.Client/Models/Enums.cs

@ -209,9 +209,9 @@
}
/// <summary>
/// 快递到货情况
/// </summary>
///// <summary>
///// 快递到货情况
///// </summary>
public enum TaskState
{
= 0,
@ -221,6 +221,24 @@
= 4,
= 5
}
/// <summary>
/// 仓库打包任务状态
/// </summary>
public enum PackTaskState
{
= 0,
= 1,
= 2,//已到货
= 3,
= 4,
= 5,
= 6,
= 7
}
/// <summary>
/// 打包类型
/// </summary>
@ -422,4 +440,9 @@
{
= 0, = 1
}
public enum WareType
{
= 0, = 1, = 2, = 3
}
}

21
BBWY.Client/Models/PackTask/PackTaskModel.cs

@ -1,6 +1,7 @@
using BBWY.Client.APIServices;
using BBWY.Client.Models.APIModel.Response.PackTask;
using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.PackTask;
using BBWY.Client.Views.PackTask;
using BBWY.Client.Views.QualityTask;
using GalaSoft.MvvmLight.Command;
@ -95,8 +96,11 @@ namespace BBWY.Client.Models
//加载数据
ViewModelLocator viewModelLocator = new ViewModelLocator();
var qualityViewModel = viewModelLocator.QualityTask;
if (qualityViewModel.ReflashWindow == null)
qualityViewModel.ReflashWindow = ReflashTask;
//qualityViewModel.TaskCount = SkuCount;
// qualityViewModel.TaskId = TaskId;
// qualityViewModel.TaskId = TaskId;
qualityViewModel.OrderId = OrderId;
qualityViewModel.SkuId = SkuId;
qualityViewModel.SearchSku(this);
@ -122,12 +126,16 @@ namespace BBWY.Client.Models
serviceViewModel.OrderId= OrderId;
serviceViewModel.SkuId =SkuId ;
serviceViewModel.LoadPackDatas();
serviceViewModel.SetAllFees = new Action<FeesItemResponse, List<string>>((feesItem, packUsers) =>
{
FeesItemResponse = feesItem;
PackUser = string.Join("\r\n", packUsers);
FeesItemResponse.DiscountAllFees = feesItem.disCount * feesItem.AllFees;
IsShowFees = feesItem.AllFees > 0 ? true : false;
if (ReflashTask != null) ReflashTask();
});
service.Show();
}
@ -334,6 +342,13 @@ namespace BBWY.Client.Models
public TaskStateType TaskStatus { get => taskStatus; set { Set(ref taskStatus, value); } }
private PackTaskState taskState;
/// <summary>
/// 打包仓库任务状态
/// </summary>
public PackTaskState TaskState { get => taskState; set { Set(ref taskState, value); } }
private PackType packType;
/// <summary>
/// 打包类型(单件=0,多件=1)
@ -377,11 +392,11 @@ namespace BBWY.Client.Models
public Increment Increment2 { get => increment2; set { Set(ref increment2, value); } }
private PositionType positionType;
private string positionType;
/// <summary>
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
/// </summary>
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } }
public string PositionType { get => positionType; set { Set(ref positionType, value); } }

16
BBWY.Client/ViewModels/MainViewModel.cs

@ -31,6 +31,7 @@ namespace BBWY.Client.ViewModels
private bool showWB2RuntimeDownloadPanel;
private double wb2DownloadProgress;
private IList<string> managerDepartment;
private IList<string> packDepartment;
private WebView2Manager w2m;
public GlobalContext GlobalContext { get; set; }
public IList<MenuModel> MenuList { get; set; }
@ -91,6 +92,9 @@ namespace BBWY.Client.ViewModels
{
this.w2m = w2m;
this.managerDepartment = new List<string>() { "董事办", "财务部", "技术部", "总经办" };
this.packDepartment = new List<string>() { "打包组" ,"发货组" , "仓储部" };
this.httpClientFactory = httpClientFactory;
this.mdsApiService = mdsApiService;
this.logisticsService = logisticsService;
@ -119,7 +123,7 @@ namespace BBWY.Client.ViewModels
/// </summary>
private void CreateMenu()
{
if (GlobalContext.User.TeamName == "打包组" || GlobalContext.User.TeamName == "发货组" || GlobalContext.User.TeamName == "仓储部")
if (this.packDepartment.Contains(GlobalContext.User.TeamName))
{
App.Current.Dispatcher.Invoke(() =>
@ -268,13 +272,10 @@ namespace BBWY.Client.ViewModels
CreateMenu();
if (GlobalContext.User.TeamName == "打包组" || GlobalContext.User.TeamName == "发货组" || GlobalContext.User.TeamName == "仓储部")
{
return;
}
IList<Department> departmentList = null;
if (GlobalContext.User.TeamName == "刷单组" ||
if (GlobalContext.User.TeamName == "刷单组" || this.packDepartment.Contains(GlobalContext.User.TeamName) ||
managerDepartment.Contains(GlobalContext.User.TeamName) ||
managerDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
{
@ -346,6 +347,9 @@ namespace BBWY.Client.ViewModels
}
GlobalContext.User.DepartmentList = departmentList;
if (this.packDepartment.Contains(GlobalContext.User.TeamName))
return;
if (GlobalContext.User.TeamName == "刷单组")
return;

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

@ -1,5 +1,6 @@
using BarcodeLib;
using BBWY.Client.APIServices;
using BBWY.Client.Extensions;
using BBWY.Client.Helpers;
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel.Request;
@ -426,7 +427,7 @@ namespace BBWY.Client.ViewModels.PackTask
return;
}
SaveTask = "保存";
Logo = model.ItemList[0].Logo;
Logo = model.ItemList[0].Logo.Copy();
SearchSkuId = model.SkuId;
SkuId = model.SkuId;
SkuCount = model.SkuCount;
@ -443,7 +444,12 @@ namespace BBWY.Client.ViewModels.PackTask
GoodsNumber = model.GoodsNumber;
Availability = model.Availability;
IsWorry = model.IsWorry;
PositionType = model.PositionType;
if (string.IsNullOrEmpty(model.OrderId))
{
PositionType = model.PositionType.ToEnum<PositionType>();
}
PackType = model.PackType;
BasicPack = model.BasicPack;
IsNeedBarCode = model.BarCodeModel == null ? Need. : Need.;
@ -789,7 +795,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
if (!string.IsNullOrEmpty(BrandName))
foreach (var item in CertificateModel) item.BrandName = BrandName;
//CertificateModel.Foreach(c=>c.BrandName = BrandName) ;
//CertificateModel.Foreach(c=>c.BrandName = BrandName) ;
SetCerWindow setCerWindow = new SetCerWindow();
setCerWindow.LoadData(CertificateModel, packTaskService, spuCertificateModel, IsSetSpuCertificate);
setCerWindow.SaveResult = s =>
@ -905,7 +911,7 @@ namespace BBWY.Client.ViewModels.PackTask
new TipsWindow("请设置合格证模板").Show();
return;
}
createTaskModel.CerId =string.Join(",", CertificateModel.Select(c=>c.Id));//
createTaskModel.CerId = string.Join(",", CertificateModel.Select(c => c.Id));//
}
ApiResponse<object> res = null;
if (TaskId > 0)//修改界面

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

@ -1,4 +1,5 @@
using BBWY.Client.APIServices;
using BBWY.Client.Extensions;
using BBWY.Client.Models;
using BBWY.Client.Models.PackTask;
using BBWY.Client.Views.PackTask;
@ -624,7 +625,15 @@ namespace BBWY.Client.ViewModels.PackTask
GoodsNumber = model.GoodsNumber;
Availability = model.Availability;
IsWorry = model.IsWorry;
PositionType = model.PositionType;
try
{
PositionType = model.PositionType.ToEnum<PositionType>();//多个仓库异常
}
catch
{
}
PackType = model.PackType;
BasicPack = model.BasicPack;
IsNeedBarCode = model.BarCodeModel == null ? Need. : Need.;
@ -694,7 +703,7 @@ namespace BBWY.Client.ViewModels.PackTask
var createTaskModel = new Models.APIModel.Request.CreateTaskRequest
{
ProductNo = ProductNo,
Logo = Logo,
Logo = Logo.Replace( "200x200", "80x80"),
SkuName = SkuName,
TaskId = TaskId,
BrandName = BrandName,

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

@ -275,6 +275,18 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
public void SearchTaskList()
{
try
{
if (SearchTaskId != null && !string.IsNullOrEmpty(SearchTaskId.Trim()))
Convert.ToInt64(SearchTaskId);
}
catch
{
System.Windows.MessageBox.Show("任务id必须为数字");
return;
}
IsLoading = true;
Task.Factory.StartNew(() =>
{
@ -314,7 +326,7 @@ namespace BBWY.Client.ViewModels.PackTask
MarkMessage = item.MarkMessage,
PackType = (PackType)item.PackType,
PositionType = (PositionType)item.PositionType,
PositionType = ((PositionType)item.PositionType).ToString(),
SkuCount = item.SkuCount,
SkuTitle = item.SkuGoodsTitle,
TaskId = item.TaskId,

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

@ -18,6 +18,7 @@ using HandyControl.Controls;
using System.Windows;
using System.Collections;
using NPOI.SS.Formula.Functions;
using GalaSoft.MvvmLight.Messaging;
namespace BBWY.Client.ViewModels.PackTask
{
@ -35,6 +36,20 @@ namespace BBWY.Client.ViewModels.PackTask
private DateTime endTime;
public DateTime EndTime { get => endTime; set { Set(ref endTime, value); } }
private string searchShopName;
public string SearchShopName
{
get => searchShopName; set
{
Set(ref searchShopName, value);
}
}
/// <summary>
/// 查询任务id
/// </summary>
@ -53,11 +68,11 @@ namespace BBWY.Client.ViewModels.PackTask
private string searchSkuId;
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } }
public TaskState? taskState;
public PackTaskState? taskState;
/// <summary>
/// 任务状态
/// </summary>
public TaskState? TaskState
public PackTaskState? TaskState
{
get => taskState; private set
{
@ -78,25 +93,46 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary>
/// 未到货数量
/// </summary>
public int NoArrivedCount { get => noArrivedCount; set { Set(ref noArrivedCount, value); } }
private int noArrivedCount;
private int someArrivedCount;
public string NoArrivedCount { get => noArrivedCount; set { Set(ref noArrivedCount, value); } }
private string noArrivedCount;
private string someArrivedCount;
/// <summary>
/// 部分到货数量
/// </summary>
public int SomeArrivedCount { get => someArrivedCount; set { Set(ref someArrivedCount, value); } }
private int worryCount;
public string SomeArrivedCount { get => someArrivedCount; set { Set(ref someArrivedCount, value); } }
private string worryCount;
/// <summary>
/// 加急数
/// </summary>
public int WorryCount { get => worryCount; set { Set(ref worryCount, value); } }
public string WorryCount { get => worryCount; set { Set(ref worryCount, value); } }
private int arrivedCount;
private string arrivedCount;
/// <summary>
/// 已到货数量
/// </summary>
public int ArrivedCount { get => arrivedCount; set { Set(ref arrivedCount, value); } }
public string ArrivedCount { get => arrivedCount; set { Set(ref arrivedCount, value); } }
private string waitPackCount;
/// <summary>
/// 待打包数
/// </summary>
public string WaitPackCount { get => waitPackCount; set { Set(ref waitPackCount, value); } }
private string waitSealBox;
/// <summary>
/// 带封箱数
/// </summary>
public string WaitSealBox { get => waitSealBox; set { Set(ref waitSealBox, value); } }
private string waitOutbound;
/// <summary>
/// 待出库数
/// </summary>
public string WaitOutbound { get => waitOutbound; set { Set(ref waitOutbound, value); } }
//private int totalCount;
///// <summary>
///// 全部数量
@ -146,13 +182,19 @@ namespace BBWY.Client.ViewModels.PackTask
private readonly WorkProcessService workProcessService;
private readonly PackTaskService packTaskService;
private readonly IncreateServiceService increateServiceService;
public WareHouseListViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService, ProductService productService, BatchPurchaseService batchPurchaseService)
public GlobalContext globalContext;
public WareHouseListViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService, ProductService productService, BatchPurchaseService batchPurchaseService, GlobalContext globalContext)
{
this.globalContext = globalContext;
this.packTaskService = packTaskService;
this.consumableService = consumableService;
//Messenger.Default.Send(globalContext, "AcceptGlobalContext");
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
SetTaskStateCommand = new RelayCommand<TaskState?>(SetTaskState);
SetTaskStateCommand = new RelayCommand<PackTaskState?>(SetTaskState);
SearchTaskCommand = new RelayCommand(() =>
{
@ -184,11 +226,15 @@ namespace BBWY.Client.ViewModels.PackTask
SetTaskStatusCommand = new RelayCommand<object>(SetTaskStatus);
//加载数据
SetTaskState(Models.TaskState.);
SetTaskState(null);
this.workProcessService = workProcessService;
this.increateServiceService = increateServiceService;
this.productService = productService;
this.batchPurchaseService = batchPurchaseService;
}
#region 事件绑定
@ -224,52 +270,57 @@ namespace BBWY.Client.ViewModels.PackTask
BatchPurchaseService batchPurchaseService;
public void SetTaskStatus(object obj )
public void SetTaskStatus(object obj)
{
var objList = (object[])obj;
long taskId = (long)objList[0];
string orderId=(string)objList[1];
string orderId = (string)objList[1];
///修改完成
var model = packTaskService.UpdateTaskStatus(taskId, 1,orderId);
var model = packTaskService.UpdateTaskStatus(taskId, 1, orderId);
if (model != null && model.Success)
SearchTaskList();
}
public void SetTaskState(TaskState? taskState)
public void SetTaskState(PackTaskState? taskState)
{
IsWorry = null;
TaskState = null;
taskStatus = null;
switch (taskState)
{
case null:
break;
case Models.TaskState.:
case Models.TaskState.: //未完成的数据
case Models.TaskState.:
TaskState = taskState;
taskStatus = 0;
break;
case Models.TaskState.: //所有数据
break;
case Models.TaskState.:
taskStatus = 1;
break;
case Models.TaskState.:
taskStatus = 0;
IsWorry = 1;
break;
default:
break;
}
TaskState = taskState;
SearchTaskList();
}
//public void SetTaskState(TaskState? taskState)
//{
// IsWorry = null;
// TaskState = null;
// taskStatus = null;
// switch (taskState)
// {
// case null:
// break;
// case Models.TaskState.已到货:
// case Models.TaskState.部分到货: //未完成的数据
// case Models.TaskState.未到货:
// TaskState = taskState;
// taskStatus = 0;
// break;
// case Models.TaskState.全部: //所有数据
// break;
// case Models.TaskState.已完成:
// taskStatus = 1;
// break;
// case Models.TaskState.加急:
// taskStatus = 0;
// IsWorry = 1;
// break;
// default:
// break;
// }
// SearchTaskList();
//}
/// <summary>
@ -277,11 +328,33 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
public void SearchTaskList()
{
try
{
if (SearchTaskId != null && !string.IsNullOrEmpty(SearchTaskId.Trim()))
Convert.ToInt64(SearchTaskId);
}
catch
{
System.Windows.MessageBox.Show("任务id必须为数字");
return;
}
//string shopId = null;
//if (!string.IsNullOrEmpty(SearchShopName))
//{
// var searchShop = globalContext.User.ShopList.FirstOrDefault(g => g.ShopName == SearchShopName);
// if (searchShop != null) shopId = searchShop.ShopId.ToString();
//}
IsLoading = true;
Task.Factory.StartNew(() =>
{
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
var datas = packTaskService.GetWareHouseList(IsWorry, SearchDepartment, SearchSkuId, SearchTaskId, StartTime, EndTime, (this.TaskState), taskStatus,
var datas = packTaskService.GetWareHouseList(IsWorry, SearchDepartment, SearchSkuId, SearchTaskId, StartTime, EndTime, (this.TaskState), SearchShopName,
PageIndex, PageSize);
if (datas != null && datas.Data != null && datas.Success)
{
@ -299,7 +372,6 @@ namespace BBWY.Client.ViewModels.PackTask
GoodsNumber = item.GoodsNumber,
Increment1 = item.Increment1,
Increment2 = (Increment)item.Increment2,
ItemList = new List<SkuMessage>() { new SkuMessage
{ BrandName = item.BrandName,
GoodsNo = item.ProductItemNum, Logo= item.Logo,
@ -309,14 +381,13 @@ namespace BBWY.Client.ViewModels.PackTask
} },
MarkMessage = item.MarkMessage,
PackType = (PackType)item.PackType,
PositionType = (PositionType)item.PositionType,
TaskState = item.TaskState,
PositionType = item.PositionType,
SkuCount = item.SkuCount,
SkuTitle = item.SkuGoodsTitle,
TaskId = item.TaskId,
TaskStatus = (TaskStateType)item.TaskStatus,
EndTime = item.CreateTime,
OrderId= item.OrderId,
OrderId = item.OrderId,
SkuId = item.SkuId,
SkuName = item.SkuName,
@ -327,12 +398,14 @@ namespace BBWY.Client.ViewModels.PackTask
data.BarCodeModel = item.BarCodeDTO;
}
if (item.cers != null)
if (item.Cers != null)
{
data.CertificateModel = item.cers;
data.CertificateModel = item.Cers;
}
data.ReflashTask = ReflashTask;
if (item.FeesItemResponse != null)
{
data.FeesItemResponse = item.FeesItemResponse;
@ -379,10 +452,13 @@ namespace BBWY.Client.ViewModels.PackTask
{
App.Current.Dispatcher.Invoke(() =>
{
ArrivedCount = packTaskResult.Data.ArrivedCount;
NoArrivedCount = packTaskResult.Data.NoArrivedCount;
SomeArrivedCount = packTaskResult.Data.SomeArrivedCount;
WorryCount = packTaskResult.Data.WorryCount;
ArrivedCount = packTaskResult.Data.ArrivedCount.ToString();
NoArrivedCount = packTaskResult.Data.NoArrivedCount.ToString();
SomeArrivedCount = packTaskResult.Data.SomeArrivedCount.ToString();
WorryCount = packTaskResult.Data.WorryCount.ToString();
WaitOutbound = packTaskResult.Data.WaitOutbound?.ToString();
WaitPackCount = packTaskResult.Data.WaitPackCount?.ToString();
WaitSealBox = packTaskResult.Data.WaitSealBox?.ToString();
});
}
}
@ -391,6 +467,11 @@ namespace BBWY.Client.ViewModels.PackTask
PageIndex = pageIndex;//
SearchTaskList();
}
public void ReflashTask()//刷新界面
{
SearchTaskList();
}
private void OpenSkuDetail(object param)
{

64
BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs

@ -96,7 +96,7 @@ namespace BBWY.Client.ViewModels
private ObservableCollection<string> preCompeteTimeDayList = new ObservableCollection<string> {
"今天"
};
public ObservableCollection<string> PreCompeteTimeDayList { get => preCompeteTimeDayList; set { Set(ref preCompeteTimeDayList, value); } }
@ -106,6 +106,11 @@ namespace BBWY.Client.ViewModels
};
public ObservableCollection<string> PreCompeteTimeHourList { get => preCompeteTimeHourList; set { Set(ref preCompeteTimeHourList, value); } }
//
public string preCompeteTimeDay;
public string PreCompeteTimeDay { get => preCompeteTimeDay; set { Set(ref preCompeteTimeDay, value); } }
public string preCompeteTimeHour;
public string PreCompeteTimeHour { get => preCompeteTimeHour; set { Set(ref preCompeteTimeHour, value); } }
@ -367,7 +372,6 @@ namespace BBWY.Client.ViewModels
SetCertificateCommand = new RelayCommand<PurchaseSku>(SetCertificate);
LookBarCommand = new RelayCommand(LookBar);
LookCerCommand = new RelayCommand<CertificateModel>(LookCer);
//SearchSkuCommand = new RelayCommand<object>(SearchSku);
CompeteQualityTaskCommand = new RelayCommand<object>(CompeteQualityTask);
IncreateList = new ObservableCollection<IncreateModel>();
foreach (var item in increates)
@ -381,10 +385,7 @@ namespace BBWY.Client.ViewModels
this.purchaseService = purchaseService;
this.packTaskService = packTaskService;
#if DEBUG
//Test();
#endif
}
@ -422,9 +423,6 @@ namespace BBWY.Client.ViewModels
IsNeedBar = IsNeedBarCode == Need.,
IsNeedCer = IsNeedCertificateModel == Need.,
TaskId = TaskId
};
if (IsNeedBarCode == Need.)
{
@ -457,7 +455,10 @@ namespace BBWY.Client.ViewModels
}
int hour = Convert.ToInt32(PreCompeteTimeHour.Replace("点前", ""));
request.PreCompeteTime = DateTime.Now.Date.AddHours(hour);
var date = Convert.ToDateTime(PreCompeteTimeDay);
request.PreCompeteTime = date.AddHours(hour);
var competeRes = packPurchaseTaskService.CompeteQualityTask(request);
@ -478,8 +479,14 @@ namespace BBWY.Client.ViewModels
, BarCodeModel);
batchPrint.ShowDialog();
if (ReflashWindow != null) ReflashWindow();
var window = obj as BWindow;
window.Close();
}
@ -490,18 +497,22 @@ namespace BBWY.Client.ViewModels
{
return;
}
//if (TaskId > 0 && string.IsNullOrEmpty(SpuId))//修改界面刷新配置数据
//{
// SearchSku(SkuId);
//}
if (BarCodeModel == null)
{
BarCodeModel = new BarCodeModel();
BarCodeModel.ProductNo = ProductNo;
BarCodeModel.Brand = Brand;
BarCodeModel.SkuId = SkuId;
BarCodeModel.SkuName = SkuName;
var resCode = packPurchaseTaskService.SearchBarCode(SkuId);
if (resCode==null)
{
BarCodeModel = new BarCodeModel();
BarCodeModel.ProductNo = ProductNo;
BarCodeModel.Brand = Brand;
BarCodeModel.SkuId = SkuId;
BarCodeModel.SkuName = SkuName;
}
else
{
BarCodeModel = resCode.Data;
}
}
if (!string.IsNullOrEmpty(BrandName))
BarCodeModel.BrandName = BrandName;
@ -586,13 +597,14 @@ namespace BBWY.Client.ViewModels
{
InitData();
TaskId = model.TaskId;
OrderId =model.OrderId;
SkuId = model.SkuId;
SkuName = model.ItemList[0].SkuName;
Logo = model.ItemList[0].Logo.Replace("80x80", "200x200").Replace("200x200", "150x150");
BrandName = model.ItemList[0].BrandName;
SkuCount = model.SkuCount;
brand = model.Brand;
ProductNo = model.ProductNo;
MarkMessage = model.MarkMessage;
@ -648,7 +660,7 @@ namespace BBWY.Client.ViewModels
}
var list = purchaseService.GetPurchaseSkuBasicInfo(item.PurchaseProductId);
if (list == null)
if (list == null&&!list.Success)
{
PurchaseSkuList.Add(item); continue;
}
@ -683,6 +695,16 @@ namespace BBWY.Client.ViewModels
{
PurchaseSkuList = new ObservableCollection<PurchaseSku>();
WareHourseList = new ObservableCollection<WareHourseDTO>();
PreCompeteTimeDayList = new ObservableCollection<string>();
var date = DateTime.Now.Date;
for (int i = 0; i < 7; i++)
{
PreCompeteTimeDayList.Add(date.AddDays(i).ToString("yyyy-MM-dd"));
}
PreCompeteTimeDay = date.ToString("yyyy-MM-dd");
IsSetBarCode = true;
SkuTitle = "";
BrandName = "";

8
BBWY.Client/Views/PackTask/PackTaskTotal.xaml

@ -121,8 +121,8 @@
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="130"/>
<ColumnDefinition Width="130"/>
<ColumnDefinition MinWidth="130"/>
<ColumnDefinition MinWidth="130"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="60"/>
@ -193,8 +193,8 @@
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="130"/>
<ColumnDefinition Width="130"/>
<ColumnDefinition MinWidth="130"/>
<ColumnDefinition MinWidth="130"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="60"/>

306
BBWY.Client/Views/PackTask/WareHouseList.xaml

@ -14,13 +14,52 @@
d:DesignHeight="450" d:DesignWidth="2048"
Title="TaskList">
<Page.Resources>
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<!--<Setter Property="Content" Value="{Binding ElementName=txt,Path=Text}"/>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" />
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Tag}" Foreground="{StaticResource Text.Pink}" Margin="5 0 0 0" />
<sys:Int32 x:Key="d0">0</sys:Int32>
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<sys:Int32 x:Key="d0">0</sys:Int32>
<sys:Int32 x:Key="d1">1</sys:Int32>
<sys:Int32 x:Key="d3">2</sys:Int32>
<sys:Int32 x:Key="d7">6</sys:Int32>
<sys:Int32 x:Key="d15">14</sys:Int32>
<sys:Int32 x:Key="d30">29</sys:Int32>
<sys:Int32 x:Key="d30">29</sys:Int32>-->
</Page.Resources>
<Grid>
@ -30,6 +69,12 @@
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="1230,15,0,0">
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,0">
@ -40,7 +85,7 @@
<RowDefinition Height="30"/>
<!---->
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Panel.ZIndex="999" Margin="0,5,0,0" Width="1100">
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Panel.ZIndex="999" Margin="0,5,0,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
@ -58,7 +103,14 @@
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark=""/>
<TextBlock Text="SKU:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Text="部门:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<TextBlock Text="部门: " VerticalAlignment="Center" Margin="16,0,2,0"/>
<c:BTextBox Width="150" Height="30" TextChanged="tb_TextChanged" ></c:BTextBox>
<TextBlock Text="物流单号:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchWayBillNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="物流单号"/>
<TextBlock Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"/>
</StackPanel>
<Grid Grid.Column="1" >
@ -74,229 +126,29 @@
</Grid>
<StackPanel Grid.Row="1" Grid.RowSpan="1" HorizontalAlignment="Left" Orientation="Horizontal">
<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" IsChecked="True" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.全部}" >
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="全部"/>
</TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已到货}" >
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="已到货"/>
<Run Text="{Binding ArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}" />
</TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.部分到货}" >>
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="部分到货"/>
<Run Text="{Binding SomeArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}" />
</TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.未到货}" >
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="未到货"/>
<Run Text="{Binding NoArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}" />
</TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.加急}" >
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="加急"/>
<Run Text="{Binding WorryCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}" />
</TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" >
<RadioButton.Style >
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBlock Text="已完成" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</RadioButton.Style>
</RadioButton>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" IsChecked="True" Content="全部" Command="{Binding SetTaskStateCommand}" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.未到货}" Content="未到货" Tag="{Binding NoArrivedCount,Mode=TwoWay}" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.部分到货}" Content="部分到货" Tag="{Binding SomeArrivedCount,Mode=TwoWay}"/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待质检}" Tag="{Binding ArrivedCount,Mode=TwoWay}" Content="待质检" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待打包}" Content="待打包" Tag="{Binding WaitPackCount,Mode=TwoWay}"/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待封箱}" Content="待封箱" Tag="{Binding WaitSealBox,Mode=TwoWay}"/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待出库}" Content="待出库" Tag="{Binding WaitOutbound,Mode=TwoWay}"/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.已完成}" Content="已完成" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.已取消}" Content="已取消" />

145
BBWY.Client/Views/PackTask/WareHouseList.xaml.cs

@ -1,6 +1,8 @@
using BBWY.Client.Helpers;
using BBWY.Client.Models.PackTask;
using BBWY.Client.ViewModels;
using BBWY.Common.Models;
using GalaSoft.MvvmLight.Messaging;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using System;
@ -33,38 +35,81 @@ namespace BBWY.Client.Views.PackTask
{
InitializeComponent();
//Messenger.Default.Register<GlobalContext>(this,"AcceptGlobalContext", g => { globalContext = g; LoadShops(g); });
this.Loaded += Load;
// this.Unloaded += WareHouseList_Unloaded;
// GlobalContext.User.DepartmentList
}
//private void WareHouseList_Unloaded(object sender, RoutedEventArgs e)
//{
// Messenger.Default.Unregister("AcceptGlobalContext");
//}
GlobalContext globalContext;
public void LoadShops(GlobalContext globalContext)
{
this.globalContext = globalContext;
shops = globalContext.User.ShopList.Select(s => s.ShopName).ToList();
}
private void Load(object sender, RoutedEventArgs e)
{
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true);
var Configuration = builder.Build();
QKApiHost = Configuration.GetSection("QKApiHost").Value;
HttpClientHelper helper = new HttpClientHelper(QKApiHost);
try
{
var model = new ViewModelLocator().Main;
LoadShops(model.GlobalContext);
}
catch
{
}
string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据
var data = helper.Get(url);
var res = JsonConvert.DeserializeObject<ApiResponse<UserDepartment[]>>(data);
//创建一个ListBoxIem
if (res.Success)
try
{
if (res.Data != null && res.Data.Count() > 0)
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true);
var Configuration = builder.Build();
QKApiHost = Configuration.GetSection("QKApiHost").Value;
HttpClientHelper helper = new HttpClientHelper(QKApiHost);
string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据
var data = helper.Get(url);
var res = JsonConvert.DeserializeObject<ApiResponse<UserDepartment[]>>(data);
//创建一个ListBoxIem
if (res.Success)
{
foreach (var department in res.Data)
if (res.Data != null && res.Data.Count() > 0)
{
if (!departments.Contains(department.DePartmentName))
foreach (var department in res.Data)
{
departments.Add(department.DePartmentName);
if (!departments.Contains(department.DePartmentName))
{
departments.Add(department.DePartmentName);
}
}
}
}
}
catch (Exception)
{
}
}
public string QKApiHost {get;set;}
public string QKApiHost { get; set; }
public void SelectionChangeCommand(object sender, SelectionChangedEventArgs e)
{
try
@ -86,10 +131,9 @@ namespace BBWY.Client.Views.PackTask
}
}
List<string> departments = new List<string>();
List<string> shops = new List<string>();
private void tb_TextChanged(object sender, TextChangedEventArgs e)
{
try
@ -155,5 +199,72 @@ namespace BBWY.Client.Views.PackTask
}
}
private void tbShop_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
var textBoxt = (TextBox)sender;
//创建一个ListBox
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
if (shops.Count <= 0)
{
if (globalContext != null)
LoadShops(globalContext);
}
if (string.IsNullOrEmpty(textBoxt.Text))
{
tipBoxShop.Visibility = Visibility.Collapsed;
return;
}
foreach (var department in shops)
{
if (department.Contains(textBoxt.Text))
{
ListBoxItem item = new ListBoxItem();
Label lb = new Label();
lb.Content = department;
item.Content = lb;
tipBoxShop.Items.Add(item);
}
}
tipBoxShop.Visibility = Visibility.Visible;
}
catch (Exception)
{
}
}
private void tipBoxShop_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
var list = (ListBox)sender;
if (list.Items.Count <= 0)
{
return;
}
var value = (ListBoxItem)list.SelectedValue;
var content = (Label)value.Content;
tbShop.Text = content.Content.ToString();
tipBoxShop.Visibility = Visibility.Collapsed;
}
catch (Exception)
{
}
}
}
}

281
BBWY.Client/Views/PackTask/WareHouseListControl.xaml

@ -43,9 +43,10 @@
<ColumnDefinition/>
<ColumnDefinition Width="120"/>
<ColumnDefinition/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="SKU数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="到货情况" Grid.Column="2" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="组合类型" Grid.Column="3" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="SKU配件商品" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
@ -56,6 +57,8 @@
<TextBlock Text="注意事项/对接备注" Grid.Column="9" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="服务 耗材费用" Grid.Column="10" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="打包员" Grid.Column="11" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="12" Style="{StaticResource middleTextBlock}"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/>
@ -70,6 +73,7 @@
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="9"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="10"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="11"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
</Grid>
<!--ItemsSource="{Binding OrderList}"-->
<ListBox x:Name="listbox_order"
@ -101,6 +105,7 @@
<ColumnDefinition/>
<ColumnDefinition Width="120"/>
<ColumnDefinition/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11">
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" />
@ -111,7 +116,7 @@
CommandParameter="{Binding TaskId}"
Margin=" 5,0,7,0"/>
<Label Width="70" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskStatus}" Foreground="White" Background="{Binding TaskStatus,Converter={StaticResource objConverter} , ConverterParameter=未完成:#facd91:#02a7f0 }" Margin="5,0,0,0"/>
<Label Width="70" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskState}" Foreground="White" Background="{Binding TaskState,Converter={StaticResource objConverter} , ConverterParameter=已完成:#02a7f0:#facd91 }" Margin="5,0,0,0"/>
<TextBlock VerticalAlignment="Center" Text="部门:" Margin="14,0,0,0" />
<c:BButton Content="{Binding DepartmentName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
@ -122,20 +127,7 @@
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptName}" Margin="5,0,0,0" />
</StackPanel>
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" VerticalAlignment="Center" Content="完成" >
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.SetTaskStatusCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="TaskId" />
<Binding Path="OrderId"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BButton>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
@ -151,6 +143,7 @@
<ColumnDefinition/>
<ColumnDefinition Width="120"/>
<ColumnDefinition/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding ItemList}"
Style="{StaticResource NoScrollViewListBoxStyle}"
@ -198,15 +191,15 @@
<Run Text="{Binding BrandName}"/>
</TextBlock>
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis">
<TextBlock.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<TextBlock Text="{Binding ShopName}"/>
</ToolTip>
</TextBlock.ToolTip>
<Run Text="店铺:"/>
<Run Text="{Binding ShopName}"/>
</TextBlock>
<StackPanel Orientation="Horizontal">
<TextBlock Text="店铺:"/>
<c:BButton Content="{Binding ShopName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}"
CommandParameter="{Binding ShopName}"
Margin=" 5,0,7,0"/>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="20,11,0,5">
@ -345,7 +338,7 @@
</StackPanel>
</Grid>
<Grid Grid.Column="10" >
<Grid Grid.Column="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
@ -369,223 +362,22 @@
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<local:FeesExcelControl IsWareHouse="True" FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
/>
<!--<Grid Height="100" >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Border Background="#F2F2F2" Grid.RowSpan="2" Grid.ColumnSpan="17"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="13" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="16" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Right" BorderBrush="#D7D7D7" Grid.Column="16" Grid.Row="0" Grid.RowSpan="3" BorderThickness="0,0,1,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="4" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="15" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/>
<TextBlock Width="84" Text="任务ID" TextAlignment="Center" Grid.Column="0" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="增值服务" Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="打包服务" Grid.Column="4" Grid.ColumnSpan="9" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="打包耗材" Grid.Column="13" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Width="101" TextAlignment="Center" Text="总计" Grid.Column="16" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Grid Grid.Column="1" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAcceptGoods,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="收货、卸货" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.AcceptGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="2" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsSendGoods, StringFormat={}{0:F0} ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="装箱、送货" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.SendGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="3" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsRuturnGoods ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="退货质检" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.RuturnGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="4" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsBasicPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="基础包装费" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Row="1" Text="{Binding FeesItemTypeDTO.BasicPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="5" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsBoxPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="箱子包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.BoxPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="6" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsExpressPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="快递袋包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.ExpressPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="7" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsExpressCloseSideFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="快递袋封边" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.ExpressCloseSideFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="8" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirPaperPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="气泡纸包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.AirPaperPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="9" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirBagPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="气泡袋包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.AirBagPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="10" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsPOPBagPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="POP袋" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.POPBagPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="11" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsTapePackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="胶带工序" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.TapePackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="12" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsIncreateGoods ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="增量配件" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.IncreateGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="13" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsPaperBox ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
<Run Text="{Binding FeesItemTypeDTO.BoxNumber ,Converter={StaticResource intToStringConverter},ConverterParameter=号纸箱}"/>
</TextBlock>
<TextBlock Text="{Binding FeesItemTypeDTO.PaperBoxNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="14" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirPaper ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="气泡纸" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.AirPaperNo, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="15" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsTape ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="胶带" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.TapeNo, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<TextBlock Text="{Binding TaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding FeesItemTypeDTO.AllPackFees, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="16" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>-->
</ToolTip>
</Path.ToolTip>
</Path>
</StackPanel>
<Grid Grid.Row="1" >
<Grid Grid.Row="1" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|已取消:Collapsed:Visible}">
<Border Grid.Row="0" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
>
<c:BButton HorizontalAlignment="Center" Height="20" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Grid.Row="1" Content="设置"
Command="{Binding SetServiceCommand}"
Visibility="Visible" />
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="10 0 0 0 " VerticalAlignment="Center" Grid.Row="1" Content="质检"
Command="{Binding QualityTaskCommand}"
/>
<!--Visibility="{Binding Availability,Converter={StaticResource objConverter},ConverterParameter=已到货:Visible:Collapsed}"-->
</StackPanel>
@ -602,6 +394,32 @@
/>
</StackPanel>
</Grid>
<Grid Grid.Column="12" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="10 0 0 0 " VerticalAlignment="Center" Grid.Row="1" Content="质检"
Command="{Binding QualityTaskCommand}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待质检:Visible:Collapsed}"
/>
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Content="完成"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待封箱:Visible:Collapsed}"
>
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.SetTaskStatusCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="TaskId" />
<Binding Path="OrderId"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BButton>
</StackPanel>
</Grid>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/>
@ -617,6 +435,7 @@
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="10"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="11"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="13"/>
</Grid>
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>

20
BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs

@ -75,7 +75,12 @@ namespace BBWY.Client.Views.QualityTask
private void save_btn_Click(object sender, RoutedEventArgs e)
{
if (PackCerState== PackCerState.)
{
if (SaveResult != null) SaveResult(CertificateModel, PackCerState);
this.Close();
return;
}
if (string.IsNullOrEmpty(CertificateModel.ExcuteStander)
|| string.IsNullOrEmpty(CertificateModel.Shader) || string.IsNullOrEmpty(CertificateModel.BrandName)
|| string.IsNullOrEmpty(CertificateModel.Brand) || string.IsNullOrEmpty(CertificateModel.ProductShop)
@ -100,14 +105,7 @@ namespace BBWY.Client.Views.QualityTask
MessageBox.Show("适用年龄不能为空");
return;
}
var standers = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries);
var resData = packTaskService.SaveCer(new CerRequest
{
Brand = CertificateModel.Brand,
@ -125,20 +123,14 @@ namespace BBWY.Client.Views.QualityTask
GoodsNumber = CertificateModel.GoodsNumber,
ProduceDate = CertificateModel.ProduceDate,
PurchaseSkuId = CertificateModel.PurchaseSkuId,
});
if (resData == null || !resData.Success)
{
return;
}
CertificateModel.Id = resData.Data;
if (SaveResult != null) SaveResult(CertificateModel, PackCerState);
this.Close();
}
}

40
BBWY.Client/Views/QualityTask/QualityWindow.xaml

@ -139,15 +139,13 @@
<UniformGrid Columns="3" Margin="45 0 0 0" Height="30">
<TextBlock Text="预计完成时间: " VerticalAlignment="Center"/>
<Border BorderBrush="{StaticResource Border.Brush}" Height="30" BorderThickness="1">
<hc:ComboBox BorderThickness="0">
<ComboBoxItem IsSelected="True" Content="今天" />
<hc:ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeDayList}" SelectedIndex="0" Text="{Binding PreCompeteTimeDay}">
</hc:ComboBox>
</Border>
<Border BorderBrush="{StaticResource Border.Brush}" Height="30" Margin="10 0 0 0" BorderThickness="1">
<hc:ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeHourList}" SelectedIndex="0" Text="{Binding PreCompeteTimeHour}">
<!--<ComboBoxItem IsSelected="True" Content="12点前" />
<ComboBoxItem IsSelected="True" Content="18点前" />
<ComboBoxItem IsSelected="True" Content="21点前" />-->
</hc:ComboBox>
</Border>
</UniformGrid>
@ -197,24 +195,6 @@
</ListBox.ItemTemplate>
</ListBox>
<!--<Grid Height="90" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="20 10 0 0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.Row="0"/>
<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.Row="1"/>
<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.Row="2"/>
<Border Height="1" VerticalAlignment="Bottom" Background="{StaticResource Border.Brush}" Grid.Row="2"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.RowSpan="3"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.RowSpan="3"/>
<TextBlock Grid.Row="0" Text="第1份" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Grid.Row="1" Text="10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Grid.Row="2" Margin="10 0 10 0" Text="京东仓1111111111111111111111111111" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>-->
@ -225,7 +205,7 @@
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
ItemsSource="{Binding PurchaseSkuList,Mode=TwoWay}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0" Visibility="{Binding OrderId,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
BorderThickness="0" Visibility="{Binding OrderId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
@ -330,7 +310,7 @@
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
ItemsSource="{Binding PurchaseSkuList,Mode=TwoWay}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0" Visibility="{Binding OrderId,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"
BorderThickness="0" Visibility="{Binding OrderId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
@ -344,12 +324,12 @@
<StackPanel Orientation="Horizontal" Height="150">
<Border Margin="20 0 0 0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="150" Width="150">
<StackPanel Orientation="Vertical">
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="30 " Margin="20 50 20 30">
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="30 " Margin="10 50 10 30">
<TextBlock Text="{Binding CerDTO.GoodsNumber,StringFormat=配件{0}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<StackPanel Margin="20 0 0 0" Height="25" VerticalAlignment="Bottom" Orientation="Horizontal">
<StackPanel Margin="10 0 0 0" Height="25" VerticalAlignment="Bottom" Orientation="Horizontal">
<TextBlock Text="合格证: " VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal"
@ -376,9 +356,11 @@
Visibility="{Binding IsNeedCer, Converter={StaticResource objConverter}, ConverterParameter=true:Collapsed:Visible }">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }">
<c:BButton Content="无需合格证" Style="{StaticResource LinkButton}" Height="15" Margin="5 0 0 0"
<TextBlock Text="无需合格证" Height="15" Margin="0 0 0 0"
/>
<!--<c:BButton Content="无需合格证" Style="{StaticResource LinkButton}" Height="15" Margin="5 0 0 0"
CommandParameter="{Binding PurchaseSkuId}"
Command="{Binding DataContext. LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/>
Command="{Binding DataContext. LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/>-->
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" CommandParameter="{Binding }"
Command="{Binding DataContext.SetCertificateCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
/>

Loading…
Cancel
Save