Browse Source

新增 齐库打包端数据

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
5bc9ce7b36
  1. 24
      BBWY.Client/APIServices/QiKu/PackTaskService.cs
  2. 92
      BBWY.Client/APIServices/QiKu/PackUserService.cs
  3. 10
      BBWY.Client/App.xaml.cs
  4. 2
      BBWY.Client/GlobalContext.cs
  5. 98
      BBWY.Client/Models/APIModel/Response/PackUser/SearchPackerSalaryResponse.cs
  6. 169
      BBWY.Client/Models/APIModel/Response/PackUser/SearchPackerTaskResponse.cs
  7. 9
      BBWY.Client/Models/Enums.cs
  8. 43
      BBWY.Client/Models/PackUser/PackerTaskModel.cs
  9. 2
      BBWY.Client/ViewModels/BaseVM.cs
  10. 24
      BBWY.Client/ViewModels/MainViewModel.cs
  11. 9
      BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs
  12. 12
      BBWY.Client/ViewModels/PackTask/PackServiceViewModel.cs
  13. 2
      BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs
  14. 34
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  15. 212
      BBWY.Client/ViewModels/PackerTask/PackerSalaryViewModel.cs
  16. 666
      BBWY.Client/ViewModels/PackerTask/PackerTaskViewModel.cs
  17. 7
      BBWY.Client/ViewModels/TotalPackTask/PackUserSalaryViewModel.cs
  18. 20
      BBWY.Client/ViewModels/ViewModelLocator.cs
  19. 2
      BBWY.Client/Views/PackTask/PackDetailWindow.xaml
  20. 42
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml
  21. 83
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml.cs
  22. 50
      BBWY.Client/Views/PackerTask/AddOneItemWeightWindow.xaml
  23. 76
      BBWY.Client/Views/PackerTask/AddOneItemWeightWindow.xaml.cs
  24. 585
      BBWY.Client/Views/PackerTask/PackerPackCompletedControl.xaml
  25. 245
      BBWY.Client/Views/PackerTask/PackerPackCompletedControl.xaml.cs
  26. 282
      BBWY.Client/Views/PackerTask/PackerSalaryControl.xaml
  27. 26
      BBWY.Client/Views/PackerTask/PackerSalaryControl.xaml.cs
  28. 116
      BBWY.Client/Views/PackerTask/PackerTaskList.xaml
  29. 26
      BBWY.Client/Views/PackerTask/PackerTaskList.xaml.cs
  30. 582
      BBWY.Client/Views/PackerTask/PackerWaitPackageControl.xaml
  31. 245
      BBWY.Client/Views/PackerTask/PackerWaitPackageControl.xaml.cs
  32. 2
      BBWY.Client/Views/SealBox/SetSealBoxPolicyWindow.xaml
  33. 12
      BBWY.Client/Views/TotalPackTask/PackUserSalaryList.xaml.cs
  34. 126
      BBWY.JDSDK/Request/EclpStockQueryStockRequest.cs
  35. 55
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs
  36. 10
      BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs
  37. 27
      BBWY.Server.Model/Dto/Request/JD/GetStockNumByWareHouseNoRequest.cs
  38. 9
      BBWY.Server.Model/Enums.cs
  39. 8
      BBWY.Test/JDBaoBiaoAPITest.cs
  40. 28
      JD.API/Controllers/PlatformSDKController.cs

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

@ -56,7 +56,8 @@ namespace BBWY.Client.APIServices
int pageIndex = 1,
int pageSize = 10,
string SkuTitle = null,
string SpuTitle = null
string SpuTitle = null,
string PackUserName=null
)
{
@ -74,7 +75,8 @@ namespace BBWY.Client.APIServices
WayBillNo = WayBillNo,
SourceExpressName = SourceExpressName,
spuId,
orderSn
orderSn,
PackUserName
}, null, HttpMethod.Post);
}
@ -173,17 +175,17 @@ namespace BBWY.Client.APIServices
}
/// <summary>
/// 获取打包人员列表
/// </summary>
/// <returns></returns>
public ApiResponse<PackUser[]> GetPackMembers()
{
///// <summary>
///// 获取打包人员列表
///// </summary>
///// <returns></returns>
//public ApiResponse<PackUser[]> GetPackMembers()
//{
return SendRequest<PackUser[]>(globalContext.QKApiHost, "api/PackTask/SearchPackMembers", null
, null, HttpMethod.Get);
// return SendRequest<PackUser[]>(globalContext.QKApiHost, "api/PackTask/SearchPackMembers", null
// , null, HttpMethod.Get);
}
//}
//public ApiResponse<ShopTotalResponse> ShopTotal(string skuId = null, string taskId = null,
// DateTime? startTime = null,

92
BBWY.Client/APIServices/QiKu/PackUserService.cs

@ -0,0 +1,92 @@
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel;
using BBWY.Client.Models.PackTask;
using BBWY.Common.Http;
using BBWY.Common.Models;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
namespace BBWY.Client.APIServices.QiKu
{
public class PackUserService : BaseApiService, IDenpendency
{
public PackUserService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
{
// globalContext.User.Id = 1668426942564536320;
}
public ApiResponse<SearchPackerTaskResponse> SearchPackerTask(PackTaskState? PackTaskState, string WayBillNo = null, string SourceExpressName = null, string departmentName = null, string skuId = null, string taskId = null,
string spuId = null, string orderSn = null,
string ShopName = null,
int pageIndex = 1,
int pageSize = 10,
string SkuTitle = null,
string SpuTitle = null)
{
return SendRequest<SearchPackerTaskResponse>(globalContext.QKApiHost, $"api/PackUser/SearchPackerTask",
new
{
PackTaskState,
WayBillNo,
SourceExpressName,
departmentName,
skuId,
taskId,
spuId,
orderSn,
ShopName,
pageIndex,
pageSize,
SkuTitle,
SpuTitle,
UserId = globalContext.User.Id.ToString(),
}
, null, HttpMethod.Post);
}
public ApiResponse<object> CompletedPackTask(long TaskId, decimal OneSkuWeight)
{
return SendRequest<object>(globalContext.QKApiHost, $"api/PackUser/CompletedPackTask",
new
{
TaskId,
OneSkuWeight
}
, null, HttpMethod.Post);
}
public ApiResponse<SearchPackerSalaryResponse> SearchPackerSalary(DateTime? StartTime, DateTime? EndTime, int pageIndex = 1,
int pageSize = 10)
{
return SendRequest<SearchPackerSalaryResponse>(globalContext.QKApiHost, $"api/PackUser/SearchPackerSalary",
new
{
UserId = globalContext.User.Id.ToString(),
StartTime,
EndTime,
pageIndex,
pageSize
}
, null, HttpMethod.Post);
}
/// <summary>
/// 获取打包人员列表
/// </summary>
/// <returns></returns>
public ApiResponse<PackUser[]> GetPackMembers()
{
return SendRequest<PackUser[]>(globalContext.QKApiHost, "api/PackUser/GetPackerList", null
, null, HttpMethod.Get);
}
}
}

10
BBWY.Client/App.xaml.cs

@ -62,12 +62,18 @@ namespace BBWY.Client
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjI3NDg2MDI0Mjk0NzMxNzc2IiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNTE2OTc0MjUwNTQyNTAxODg4IiwiZXhwIjoxNzI0NTY1ODU5fQ._ezJmsvaStab8nDPB7qeoc2aakWfhHbeqq_X_RQsc4s";
//小叶
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA3NDY1MDMzNDIwODAwIiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MjYyMTkyMDZ9.AYGBxDtX7PD8O6NOzUhRurOEJynSzoRzZpuK7RUKCKg";
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA3NDY1MDMzNDIwODAwIiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MjYyMTkyMDZ9.AYGBxDtX7PD8O6NOzUhRurOEJynSzoRzZpuK7RUKCKg";
//齐越陈默
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjI0OTUxNjgzNTc2NTAwMjI0IiwidGVhbUlkIjoiMTYyMDM0MjAxNDcwNjk3ODgxNiIsInNvblRlYW1JZHMiOiIxNjIwMzQyMDE0NzA2OTc4ODE2LDE2MjAzNDQxNDA4NTAwMDgwNjQsMTQxMDk1NTYwNDYxMjA5MTkwNCIsImV4cCI6MTcyNDkxNDM5M30.tIgo70tzRxZyUQkX1Jsh9I4ySciX0VC9HMMOoTnwVtM";
#else
//包装组
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMzk1NzA4MjA4NjU1MzcyMjg4IiwidGVhbUlkIjoiMTcxODU0MTA2MzM5NzgzODg0OCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MzAyODcxNjh9.lpiLJjP0prtQgZZfpG0NN6n60LNKstbFCJc-nLgb62A";
//齐越琳琳
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjY4NDI2OTQyNTY0NTM2MzIwIiwidGVhbUlkIjoiMTUxNjcxNTM3MjQ0NTcwMDA5NiIsInNvblRlYW1JZHMiOiIxNzE4NTQxMDYzMzk3ODM4ODQ4LDE1MTY3MTUzNzI0NDU3MDAwOTYiLCJleHAiOjE3MzAyODcxNjh9.6vXadZWQfhnxbR3320RloKv3LqqbNdZ7wDDfO3tY_5U";
#else
//var uid = e.Args.Count() > 0 ? e.Args.LastOrDefault(args => args.StartsWith("uid:")) : string.Empty;
//if (string.IsNullOrEmpty(uid))
//{

2
BBWY.Client/GlobalContext.cs

@ -13,7 +13,7 @@ namespace BBWY.Client
{
ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10192";
ClientVersion = "10193";
}
private User user;

98
BBWY.Client/Models/APIModel/Response/PackUser/SearchPackerSalaryResponse.cs

@ -0,0 +1,98 @@
using GalaSoft.MvvmLight.Command;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
namespace BBWY.Client.Models.APIModel
{
public class SearchPackerSalaryResponse
{
/// <summary>
/// 总天数
/// </summary>
public int TotalCount { get; set; }
/// <summary>
/// 日薪列表
/// </summary>
public List<PackerDaySalary> PackerDaySalaries { get; set; }
/// <summary>
/// 总工资
/// </summary>
public decimal TotalSalary { get; set; }
/// <summary>
/// 总任务数
/// </summary>
public int TotalTaskCount { get; set; }
/// <summary>
/// 总件数
/// </summary>
public int TotalSkuItemCount { get; set; }
}
public class PackerDaySalary : NotifyObject
{
public PackerDaySalary()
{
HideCommand = new RelayCommand(Hide);
}
private void Hide()
{
IsHide = !IsHide;
}
public ICommand HideCommand { get; set; }
private bool isHide=true;
public bool IsHide { get => isHide; set { Set(ref isHide, value); } }
/// <summary>
/// 日期
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// 花名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 当日总日新
/// </summary>
public decimal DaySalary { get; set; }
/// <summary>
/// 当日任务量
/// </summary>
public int DayTaskCount { get; set; }
/// <summary>
/// 当日总件数
/// </summary>
public int DayTaskSkuItemCount { get; set; }
/// <summary>
/// 日薪明细列表
/// </summary>
public List<PackerTaskSalary> PackerTaskSalaries { get; set; }
}
public class PackerTaskSalary
{
/// <summary>
/// 任务收益
/// </summary>
public decimal TaskSalary { get; set; }
/// <summary>
/// 任务id
/// </summary>
public long TaskId { get; set; }
/// <summary>
/// 任务件数
/// </summary>
public int TaskSkuItemCount { get; set; }
}
}

169
BBWY.Client/Models/APIModel/Response/PackUser/SearchPackerTaskResponse.cs

@ -0,0 +1,169 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Controls;
namespace BBWY.Client.Models.APIModel
{
public class SearchPackerTaskResponse
{
/// <summary>
/// 任务总量
/// </summary>
public int TotalCount { get; set; }
/// <summary>
/// 包装员任务数据
/// </summary>
public List<PackerTaskData> Items { get; set; }
/// <summary>
/// 待包装数
/// </summary>
public string WaitPackCount { get; set; }
}
public class PackerTaskData:NotifyObject
{
/// <summary>
/// 图片链接
/// </summary>
public string Logo { get; set; }
/// <summary>
/// 任务id
/// </summary>
public long TaskId { get; set; }
/// <summary>
/// 任务状态
/// </summary>
public TaskState? TaskState { get; set; }
/// <summary>
/// 任务状态
/// </summary>
public PackTaskState? PackTaskState { get; set; }
/// <summary>
/// 货号品名
/// </summary>
public string BrandName { get; set; }
/// <summary>
/// skuid
/// </summary>
public string SkuId { get; set; }
/// <summary>
/// SKU标题
/// </summary>
public string SkuName { get; set; }
/// <summary>
/// 打包类型(单件=0,多件=1)
/// </summary>
public int PackType { get; set; }
/// <summary>
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
/// </summary>
public int BasicPack { get; set; }
/// <summary>
/// 包装员收益
/// </summary>
public decimal PackerFee { get; set; }
/// <summary>
/// 合格证位置(外部包装=0,产品包装=1)
/// </summary>
public CertificatePosition? CertificatePosition { get; set; }
/// <summary>
/// sku配件名称
/// </summary>
public string SkuGoodsTitle { get; set; }
/// <summary>
/// 配件数
/// </summary>
public int GoodsNumber { get; set; }
/// <summary>
/// 条形码数据
/// </summary>
public BarCodeModel BarCodeDTO { get; set; }
/// <summary>
/// 合格证数据
/// </summary>
public CertificateModel[] Cers { get; set; }
/// <summary>
/// 设置打包时间
/// </summary>
public DateTime? SetPackUserTaskTime { get; set; }
/// <summary>
/// 打包完成时间(超时时间)
/// </summary>
public DateTime? PackCompletionOverTime { get; set; }
/// <summary>
/// 打包完成时间
/// </summary>
public DateTime? PackCompletionTime { get; set; }
/// <summary>
/// 打包超时备注消息
/// </summary>
public string PackOverTimeMarkMsg { get; set; }
///// 备注消息列表
///// </summary>
//public string ShowMarkMessage { get; set; }
/// <summary>
/// 打包任务数
/// </summary>
[DefaultValue(0)]
public int? PackCount { get; set; }
/// <summary>
/// 工序套餐名称
/// </summary>
public string ProcessComboName { get; set; }
///// <summary>
///// 工序套餐任务量
///// </summary>
//public int ProcessComboTaskCount { get; set; }
/// <summary>
/// 任务耗材信息
/// </summary>
public string TaskConsumableMsg { get; set; }
/// <summary>
/// 消息列表
/// </summary>
public List<MarkMessageModel> MarkMessageModelList { get; set; }
}
public class MarkMessageModel
{
public string MarkMessage { get; set; }
public DateTime? CreateTime { get; set; }
public string UserName { get; set; }
}
}

9
BBWY.Client/Models/Enums.cs

@ -568,4 +568,13 @@
= 1, = 2
}
/// <summary>
/// 打包人任务状态(待包装 = 1, 已完成 = 2)
/// </summary>
public enum PackTaskState
{
= 1, = 2
}
}

43
BBWY.Client/Models/PackUser/PackerTaskModel.cs

@ -0,0 +1,43 @@
using BBWY.Client.Models.APIModel;
using System;
using System.Collections.Generic;
using System.Text;
namespace BBWY.Client.Models.PackUser
{
public class PackerTaskModel: PackerTaskData
{
private string packRemainTime;
/// <summary>
/// 打包剩余时间
/// </summary>
public string PackRemainTime { get => packRemainTime; set { Set(ref packRemainTime, value); } }
private bool isPackOverTime;
public bool IsPackOverTime { get => isPackOverTime; set { Set(ref isPackOverTime, value); } }
private bool showSendMsg = false;
/// <summary>
/// 展示留言信息
/// </summary>
public bool ShowSendMsg { get => showSendMsg; set { Set(ref showSendMsg, value); } }
private string taskMarkMsg;
/// <summary>
/// 展示留言信息
/// </summary>
public string TaskMarkMsg { get => taskMarkMsg; set { Set(ref taskMarkMsg, value); } }
private bool showMoreMsg = false;
/// <summary>
/// 展示留言信息
/// </summary>
public bool ShowMoreMsg { get => showMoreMsg; set { Set(ref showMoreMsg, value); } }
}
}

2
BBWY.Client/ViewModels/BaseVM.cs

@ -21,7 +21,7 @@ namespace BBWY.Client.ViewModels
VMId = Guid.NewGuid();
LoadCommand = new RelayCommand(Load);
UnloadCommand = new RelayCommand(Unload);
CopyTextCommand = new RelayCommand<object>(s =>
{
try

24
BBWY.Client/ViewModels/MainViewModel.cs

@ -127,7 +127,23 @@ namespace BBWY.Client.ViewModels
/// </summary>
private void CreateMenu()
{
if (this.packDepartment.Contains(GlobalContext.User.TeamName) || packDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
if (GlobalContext.User.TeamName == "包装组"|| packDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains("包装组")))
{
App.Current.Dispatcher.Invoke(() =>
{
MenuList.Add(new MenuModel()
{
Name = "齐库打包端",
ChildList = new List<MenuModel>()
{
new MenuModel(){ Name="包装任务",Url="/Views/PackerTask/PackerTaskList.xaml" },
new MenuModel(){ Name="收益账单",Url="/Views/PackerTask/PackerSalaryControl.xaml" }
}
});
});
}
else if (this.packDepartment.Contains(GlobalContext.User.TeamName) || packDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
{
App.Current.Dispatcher.Invoke(() =>
@ -319,7 +335,7 @@ namespace BBWY.Client.ViewModels
var res = packTaskExpressService.GetExpressNameList();
if (res.Success)
{
GlobalContext.ExpressNameList= res.Data;
GlobalContext.ExpressNameList = res.Data;
}
}
catch (Exception ex)
@ -345,7 +361,7 @@ namespace BBWY.Client.ViewModels
if (GlobalContext.User.TeamName == "刷单组" || this.packDepartment.Contains(GlobalContext.User.TeamName) || packDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)) ||
if (GlobalContext.User.TeamName == "包装组"|| GlobalContext.User.TeamName == "刷单组" || this.packDepartment.Contains(GlobalContext.User.TeamName) || packDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)) ||
managerDepartment.Contains(GlobalContext.User.TeamName) ||
managerDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
{
@ -411,7 +427,7 @@ namespace BBWY.Client.ViewModels
if (this.packDepartment.Contains(GlobalContext.User.TeamName))
return;
if (GlobalContext.User.TeamName == "刷单组")
if (GlobalContext.User.TeamName == "包装组"||GlobalContext.User.TeamName == "刷单组")
return;
App.Current.Dispatcher.Invoke(() =>

9
BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs

@ -516,6 +516,9 @@ namespace BBWY.Client.ViewModels.PackTask
public ICommand SetCustomProcessPriceCommand { get; set; }
readonly PackTaskService packTaskService;
readonly PackUserService packUserService;
readonly PackDetailService packDetailService;
readonly ProcessService processService;
private ObservableCollection<PackItemModel> increateList = new ObservableCollection<PackItemModel>();
@ -612,7 +615,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
public PackDetailViewModel(PackTaskService packTaskService, PackDetailService packDetailService, ProcessService processService)//, long taskId
public PackDetailViewModel(PackTaskService packTaskService, PackDetailService packDetailService, ProcessService processService, PackUserService packUserService)//, long taskId
{
this.processService = processService;
this.packTaskService = packTaskService;
@ -625,7 +628,7 @@ namespace BBWY.Client.ViewModels.PackTask
SetAllCountCommand = new RelayCommand<object>(SetAllCount);
SetCustomProcessPriceCommand = new RelayCommand(SetCustomProcessPrice);
AddPackUserCommand = new RelayCommand(AddPackUser);
this.packUserService = packUserService;
}
private void AddPackUser()
@ -692,7 +695,7 @@ namespace BBWY.Client.ViewModels.PackTask
LoadList = new List<PackItemModel>();
Task task = Task.Factory.StartNew(() =>
{
var resMember = this.packTaskService.GetPackMembers();//成员表
var resMember = this.packUserService.GetPackMembers();//成员表
if (resMember.Success)
{
MemberList = new ObservableCollection<PackUser>();

12
BBWY.Client/ViewModels/PackTask/PackServiceViewModel.cs

@ -1,6 +1,7 @@
using AutoMapper;
using AutoMapper.Internal;
using BBWY.Client.APIServices;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.Helpers;
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel.Request;
@ -229,7 +230,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
public PackServiceViewModel(PackTaskService packTaskService, ConsumableService consumableService, PackDetailService packDetailService)//, long taskId
public PackServiceViewModel(PackTaskService packTaskService, ConsumableService consumableService, PackDetailService packDetailService, PackUserService packUserService)//, long taskId
{
//TaskId = taskId;
this.consumableService = consumableService;
@ -245,12 +246,13 @@ namespace BBWY.Client.ViewModels.PackTask
AddConsumableCommand = new RelayCommand(AddConsumable);
UpLoadPackCommand = new RelayCommand<object>(UpLoadPack);
SetAllCountCommand = new RelayCommand<object>(SetAllCount);
this.packUserService = packUserService;
//加载数据
//LoadPackDatas();
}
readonly PackUserService packUserService;
/// <summary>
/// 加载任务数据
/// </summary>
@ -270,7 +272,7 @@ namespace BBWY.Client.ViewModels.PackTask
LoadList = new List<PackItemModel>();
Task task = Task.Factory.StartNew(() =>
{
var resMember = this.packTaskService.GetPackMembers();//成员表
var resMember = this.packUserService.GetPackMembers();//成员表
if (resMember.Success)
{
MemberList = new ObservableCollection<PackUser>();
@ -403,7 +405,7 @@ namespace BBWY.Client.ViewModels.PackTask
IncrementProcessList.Add(new PackItemModel()
{
MemberList = MemberList,
PackServiceList = PackServiceList.Copy(),
PackServiceList = PackServiceList?.Copy(),
ItemCount = item.ItemCount,
ItemName = item.ItemName,
SelectId = item.SelectId,
@ -425,7 +427,7 @@ namespace BBWY.Client.ViewModels.PackTask
BasicPackProcessList.Add(new PackItemModel()
{
MemberList = MemberList,
PackServiceList = BasicPackServiceList.Copy(),
PackServiceList = BasicPackServiceList?.Copy(),
ItemCount = item.ItemCount,
ItemName = item.ItemName,
SelectId = item.SelectId,

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

@ -787,7 +787,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
else
{
distributionMode = Models.DistributionMode.;
DistributionMode = Models.DistributionMode.;
}

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

@ -289,6 +289,8 @@ namespace BBWY.Client.ViewModels.PackTask
Set(ref searchWayBillNo, value);
}
}
private string searchExpressName;
public string SearchExpressName
{
@ -298,6 +300,16 @@ namespace BBWY.Client.ViewModels.PackTask
}
}
private string searchPackUserName;
public string SearchPackUserName
{
get => searchPackUserName; set
{
Set(ref searchPackUserName, value);
}
}
public string fallWareWaitConfigureCount;
public string FallWareWaitConfigureCount { get => fallWareWaitConfigureCount; set { Set(ref fallWareWaitConfigureCount, value); } }
@ -448,6 +460,14 @@ namespace BBWY.Client.ViewModels.PackTask
private int pageSize = 10;
private int orderCount;//总数量
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } }
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } }
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } }
private bool isLoading;
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
private Visibility tipVisitity;
/// <summary>
///
@ -527,18 +547,6 @@ namespace BBWY.Client.ViewModels.PackTask
public string WaitTransportCount { get => waitTransportCount; set { Set(ref waitTransportCount, value); } }
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } }
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } }
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } }
private bool isLoading;
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
public string searchDepartment;
public string SearchDepartment
{
@ -1764,7 +1772,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
var datas = packTaskService.SearchTaskList(SearchWayBillNo, SearchExpressName, SearchDepartment, SearchSkuId, SearchTaskId, SearchSpuId, SearchOrderSn, this.TaskState, SearchShopName,
PageIndex, PageSize, SearchSkuTitle, SearchSpuTitle);
PageIndex, PageSize, SearchSkuTitle, SearchSpuTitle, SearchPackUserName);
stopwatch.Stop();
App.Current.Dispatcher.BeginInvoke(new Action(() =>
{

212
BBWY.Client/ViewModels/PackerTask/PackerSalaryViewModel.cs

@ -0,0 +1,212 @@
using BBWY.Client.APIServices;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.Models.APIModel;
using BBWY.Common.Models;
using BBWY.Controls;
using GalaSoft.MvvmLight.Command;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace BBWY.Client.ViewModels.PackerTask
{
public class PackerSalaryViewModel:BaseVM,IDenpendency
{
public PackUserService packUserService;
public PackTaskService packTaskService;
private bool isLoading;
private DateTime startTime;
private DateTime endTime;
private int pageIndex = 1;
private int pageSize = 20;
private int orderCount;
private List<PackerDaySalary> packUserSalaryList;
private string searchUserName;
/// <summary>
/// 总工资
/// </summary>
public decimal totalSalary;
/// <summary>
/// 总任务数
/// </summary>
public int totalTaskCount;
/// <summary>
/// 总件数
/// </summary>
public int totalSkuItemCount;
public int TotalTaskCount { get => totalTaskCount; set { Set(ref totalTaskCount, value); } }
public int TotalSkuItemCount { get => totalSkuItemCount; set { Set(ref totalSkuItemCount, value); } }
public decimal TotalSalary { get => totalSalary; set { Set(ref totalSalary, value); } }
public string SearchUserName { get => searchUserName; set { Set(ref searchUserName, value); } }
public List<PackerDaySalary> PackUserSalaryList { get => packUserSalaryList; set { Set(ref packUserSalaryList, value); } }
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
public DateTime StartTime { get => startTime; set { Set(ref startTime, value); } }
public DateTime EndTime { get => endTime; set { Set(ref endTime, value); } }
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } }
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } }
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } }
public ICommand SearchPackUserSalaryCommand { get; set; }
public ICommand ExportCommand { get; set; }
public ICommand OrderPageIndexChangedCommand { get; set; }
public ICommand SetSearchDateCommand { get; set; }
public PackerSalaryViewModel(PackTaskService packTaskService, PackUserService packUserService)
{
this.packTaskService = packTaskService;
OrderPageIndexChangedCommand = new RelayCommand<PageArgs>(p =>
{
LoadOrder(p.PageIndex);
});
SearchPackUserSalaryCommand = new RelayCommand(SearchPackUserSalary);
StartTime = DateTime.Now;
EndTime = DateTime.Now;
SearchPackUserSalary();
SetSearchDateCommand = new RelayCommand<int>(d =>
{
EndTime = d == 1 ? DateTime.Now.Date.AddDays(-1) : DateTime.Now;
StartTime = DateTime.Now.Date.AddDays(d * -1);
PageIndex = 1;
Task.Factory.StartNew(() => LoadOrder(1)); //点击日期查询订单
});
ExportCommand = new RelayCommand(Export);
this.packUserService = packUserService;
LoadOrder(1);
}
private void LoadOrder(int pageIndex)
{
PageIndex = pageIndex;
SearchPackUserSalary();
}
private void SearchPackUserSalary()
{
PackUserSalaryList = new List<PackerDaySalary> ();
Task.Factory.StartNew(() =>
{
IsLoading = true;
try
{
var res = packUserService.SearchPackerSalary(StartTime.Date, EndTime.Date, PageIndex, PageSize);
if (res != null && res.Success)
{
OrderCount = res.Data.TotalCount;
TotalSalary = res.Data.TotalSalary;
TotalSkuItemCount = res.Data.TotalSkuItemCount;
TotalTaskCount = res.Data.TotalTaskCount;
App.Current.Dispatcher.Invoke(() =>
{
PackUserSalaryList = res.Data.PackerDaySalaries;
});
//foreach (var packUserSalary in res.Data.PackUserSalaries)
//{
// App.Current.Dispatcher.Invoke(() =>
// {
// PackUserSalaryList.Add(packUserSalary);
// });
//}
}
else
{
App.Current.Dispatcher.Invoke(() =>
{
PackUserSalaryList = new List<PackerDaySalary>();
});
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
IsLoading = false;
});
}
private void Export()
{
SaveFileDialog save = new SaveFileDialog();
save.Filter = "csv files(*.csv)|*.csv";
var result = save.ShowDialog();
if (result == null || !result.Value)
{
return;
}
string fileName = save.FileName;
Task.Factory.StartNew(() =>
{
IsLoading = true;
var res = packTaskService.TotalPackUserSalary(SearchUserName, StartTime, EndTime, 0, 0);//获取全部数据
if (res.Success)
{
//string title = "任务ID,日期,是否结清,部门,店铺,对接人,sku名称,sku数量,增值服务,打包服务,耗材服务,原价,促销折扣,结算价格,对接备注";
List<string> exportList = new List<string>();
string title = "日期,花名,总收益";
if (res.Data.TotalCount > 0)
{
foreach (var item in res.Data.PackUserSalaries[0].IncomeItems)
{
title += $",{item.Name}";
}
exportList.Add(title);
foreach (var packUserSalary in res.Data.PackUserSalaries)
{
List<string> rowList = new List<string>();
rowList.Add(packUserSalary.Date.ToString("yyyy-MM-dd"));
rowList.Add(packUserSalary.PackUserName);
rowList.Add(packUserSalary.TotalIncome.ToString("0.00"));
foreach (var incomeItem in packUserSalary.IncomeItems)
{
rowList.Add(incomeItem.TotalPrice.ToString());
}
exportList.Add(string.Join(",", rowList));
}
}
//var excelList = res.Data.ShopTotals.Select(x => x.ToString()).ToList();
//excelList.Insert(0, title);
System.IO.File.WriteAllLines(fileName, exportList, Encoding.UTF8);
}
IsLoading = false;
});
}
}
}

666
BBWY.Client/ViewModels/PackerTask/PackerTaskViewModel.cs

@ -0,0 +1,666 @@
using BBWY.Client.APIServices;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.Extensions;
using BBWY.Client.Helpers;
using BBWY.Client.Models;
using BBWY.Client.Models.PackUser;
using BBWY.Client.Views.BillCorrection;
using BBWY.Client.Views.PackerTask;
using BBWY.Client.Views.PackTask;
using BBWY.Client.Views.TaskOverTime;
using BBWY.Common.Models;
using BBWY.Controls;
using GalaSoft.MvvmLight.Command;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace BBWY.Client.ViewModels.PackerTask
{
public class PackerTaskViewModel : BaseVM, IDenpendency
{
#region 属性
private ObservableCollection<string> selectTitleList = new ObservableCollection<string> {
"SKU名称","标题"
};
public ObservableCollection<string> SelectTitleList { get => selectTitleList; set { Set(ref selectTitleList, value); } }
private ObservableCollection<string> selectExpressList = new ObservableCollection<string> {
"物流单号","物流公司名称"
};
public ObservableCollection<string> SelectExpressList { get => selectExpressList; set { Set(ref selectExpressList, value); } }
private ObservableCollection<string> selectSkuList = new ObservableCollection<string> {
"SKU","SPU"
};
public ObservableCollection<string> SelectSkuList { get => selectSkuList; set { Set(ref selectSkuList, value); } }
private ObservableCollection<string> selectIdList = new ObservableCollection<string> {
"任务ID","拳探订单号"
};
public ObservableCollection<string> SelectIdList { get => selectIdList; set { Set(ref selectIdList, value); } }
private ObservableCollection<string> selectShopList = new ObservableCollection<string> {
"店铺","部门"
};
public ObservableCollection<string> SelectShopList { get => selectShopList; set { Set(ref selectShopList, value); } }
private string waitPackCount;
/// <summary>
/// 待包装任务量
/// </summary>
public string WaitPackCount { get => waitPackCount; set { Set(ref waitPackCount, value); } }
//private string packCompletedCount;
//public string PackCompletedCount { get => packCompletedCount; set { Set(ref packCompletedCount, value); } }
private PackTaskState? packTaskState;
/// <summary>
/// 任务包装状态
/// </summary>
public PackTaskState? PackTaskState { get => packTaskState; set { Set(ref packTaskState, value); } }
private int pageIndex = 1;
private int pageSize = 10;
private int orderCount;//总数量
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } }
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } }
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } }
private bool isLoading;
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
public string searchDepartment;
public string SearchDepartment
{
get => searchDepartment; set
{
Set(ref searchDepartment, value);
}
}
public string searchSpuTitle;
public string SearchSpuTitle
{
get => searchSpuTitle; set
{
Set(ref searchSpuTitle, value);
}
}
public string searchSkuTitle;
public string SearchSkuTitle
{
get => searchSkuTitle; set
{
Set(ref searchSkuTitle, value);
}
}
/// <summary>
/// 查询Sku
/// </summary>
private string searchSkuId;
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } }
/// <summary>
/// 查询Spu
/// </summary>
private string searchSpuId;
public string SearchSpuId { get => searchSpuId; set { Set(ref searchSpuId, value); } }
/// <summary>
/// 查询拳探订单号
/// </summary>
private string searchOrderSn;
public string SearchOrderSn { get => searchOrderSn; set { Set(ref searchOrderSn, value); } }
/// <summary>
/// 查询名称
/// </summary>
private string selectTitle = "SKU名称";
public string SelectTitle
{
get => selectTitle;
set
{
Set(ref selectTitle, value);
OnSelectTitleChanged(SelectTitle);
}
}
private void OnSelectTitleChanged(string SelectTitle)
{
if (SelectTitle == "SKU名称")
{
SearchSpuTitle = null;
}
if (SelectTitle == "标题")
{
SearchSkuTitle = null;
}
}
/// <summary>
/// 查询店铺
/// </summary>
private string selectShop = "店铺";
public string SelectShop
{
get => selectShop;
set
{
Set(ref selectShop, value);
OnSelectShopChanged(selectShop);
}
}
private string searchShopName;
public string SearchShopName
{
get => searchShopName; set
{
Set(ref searchShopName, value);
}
}
private void OnSelectShopChanged(string selectShop)
{
if (selectShop == "店铺")
{
SearchDepartment = null;
}
if (selectShop == "部门")
{
SearchShopName = null;
}
}
private string searchExpressName;
public string SearchExpressName
{
get => searchExpressName; set
{
Set(ref searchExpressName, value);
}
}
/// <summary>
/// 查询物流
/// </summary>
private string selectExpress= "物流单号";
public string SelectExpress
{
get => selectExpress;
set
{
Set(ref selectExpress, value);
OnSelectExpressChanged(SelectExpress);
}
}
private string searchWayBillNo;
public string SearchWayBillNo
{
get => searchWayBillNo; set
{
Set(ref searchWayBillNo, value);
}
}
private void OnSelectExpressChanged(string SelectExpress)
{
if (SelectExpress == "物流单号")
{
SearchExpressName = null;
}
if (SelectExpress == "物流公司名称")
{
SearchWayBillNo = null;
}
}
/// <summary>
/// 查询物流
/// </summary>
private string selectTaskId = "任务ID";
public string SelectTaskId
{
get => selectTaskId;
set
{
Set(ref selectTaskId, value);
OnSelectTaskIdChanged(SelectTaskId);
}
}
/// <summary>
/// 查询任务id
/// </summary>
private string searchTaskId;
public string SearchTaskId
{
get => searchTaskId; set
{
Set(ref searchTaskId, value);
}
}
private void OnSelectTaskIdChanged(string SelectTaskId)
{
if (SelectTaskId == "任务ID")
{
SearchOrderSn = null;
}
if (SelectTaskId == "拳探订单号")
{
SearchTaskId = null;
}
}
/// <summary>
/// 查询sku
/// </summary>
private string selectSku = "SKU";
public string SelectSku
{
get => selectSku;
set
{
Set(ref selectSku, value);
OnSelectSkuChanged(SelectSku);
}
}
private void OnSelectSkuChanged(string SelectSku)
{
if (SelectSku == "SKU")
{
SearchSpuId = null;
}
if (SelectSku == "SPU")
{
SearchSkuId = null;
}
}
/// <summary>
/// 查询拳探订单号
/// </summary>
private ObservableCollection<PackerTaskModel> packerTaskModelList;
public ObservableCollection<PackerTaskModel> PackerTaskModelList { get => packerTaskModelList; set { Set(ref packerTaskModelList, value); } }
#endregion
/// <summary>
/// 构造函数
/// </summary>
public PackerTaskViewModel(PackUserService packUserService, PackTaskService packTaskService, MarkMessageService markMessageService, GlobalContext globalContext)
{
this.packUserService = packUserService;
SetTaskStateCommand = new RelayCommand(SetTaskState);
PackerTaskModelList = new ObservableCollection<PackerTaskModel>();
OpenSkuDetailCommand = new RelayCommand<object>(OpenSkuDetail);
SearchTaskCommand = new RelayCommand(() =>
{
PageIndex = 1;
SearchTaskList();
});
TaskPageIndexChangedCommand = new RelayCommand<PageArgs>(p =>
{
LoadIndex(p.PageIndex);
});
SubmitOverTimeMarkMsgCommand = new RelayCommand<object>(SubmitOverTimeMarkMsg);
this.packTaskService = packTaskService;
LookBarCommand = new RelayCommand<BarCodeModel>(LookBar);
LookCerCommand = new RelayCommand<CertificateModel[]>(LookCer);
CompletedPackTaskCommand = new RelayCommand<long>(CompletedPackTask);
PackTaskState = Models.PackTaskState.;
SetTaskState();
PackTaskMarkMessageCommand = new RelayCommand<long>(PackTaskMarkMessage);
AppendMarkMessageCommand = new RelayCommand<long>(AppendMarkMessage);
this.markMessageService = markMessageService;
this.globalContext = globalContext;
ShowMoreMessageCommand = new RelayCommand<long>(ShowMoreMessage);
}
private void ShowMoreMessage(long taskId)
{
var model = PackerTaskModelList?.SingleOrDefault(p => p.TaskId == taskId);
if (model != null)
{
model.ShowMoreMsg = !model.ShowMoreMsg;
}
}
MarkMessageService markMessageService;
GlobalContext globalContext;
private void AppendMarkMessage(long taskId)
{
var model = PackerTaskModelList?.SingleOrDefault(p => p.TaskId == taskId);
if (model != null)
{
var res = markMessageService.AppendMarkMessage(taskId, model.TaskMarkMsg,globalContext.User.Name);
if (res == null)
{
return;
}
if (!res.Success)
{
MessageBox.Show(res.Msg);
return;
}
model.TaskMarkMsg = string.Empty;
model.ShowSendMsg = false;
ReflashTask();
}
}
private void PackTaskMarkMessage(long taskId)
{
var model = PackerTaskModelList?.SingleOrDefault(p => p.TaskId == taskId);
if (model!=null)
{
model.ShowSendMsg = !model.ShowSendMsg;
}
}
private void CompletedPackTask(long taskId)
{
AddOneItemWeightWindow addOneItemWeightWindow = new AddOneItemWeightWindow(ReflashTask,packUserService,taskId);
addOneItemWeightWindow.ShowDialog();
}
#region 方法
PackUserService packUserService;
PackTaskService packTaskService;
/// <summary>
/// 提交超时原因
/// </summary>
public ICommand SubmitOverTimeMarkMsgCommand { get; set; }
/// <summary>
/// 打开图片链接
/// </summary>
public ICommand OpenSkuDetailCommand { get; set; }
public ICommand SearchTaskCommand { get; set; }
/// <summary>
/// 页面改变事件
/// </summary>
public ICommand TaskPageIndexChangedCommand { get; set; }
public ICommand LookCerCommand { get; set; }
public ICommand LookBarCommand { get; set; }
public ICommand SetTaskStateCommand { get; set; }
public ICommand CompletedPackTaskCommand { get; set; }
public ICommand PackTaskMarkMessageCommand { get; set; }
public ICommand AppendMarkMessageCommand { get; set; }
public ICommand ShowMoreMessageCommand { get; set; }
public void SetTaskState()
{
PageIndex = 1;
SearchTaskList();
}
/// <summary>
/// 查看合格证
/// </summary>
private void LookCer(CertificateModel[] CertificateModel)
{
if (CertificateModel == null)
{
new TipsWindow("该任务无设置合格证信息,无法查看!").ShowDialog();
return;
}
LookCerWindow lookCerWindow = new LookCerWindow(CertificateModel);
lookCerWindow.ShowDialog();
}
/// <summary>
/// 查看条形码
/// </summary>
private void LookBar(BarCodeModel BarCodeModel)
{
if (BarCodeModel == null)
{
new TipsWindow("该任务无设置条形码信息,无法查看!").ShowDialog();
return;
}
LookBarCodeWindow look = new LookBarCodeWindow();
look.SetData(BarCodeModel.Copy());
look.Show();
}
private void LoadIndex(int pageIndex)
{
PageIndex = pageIndex;//
SearchTaskList();
}
private Thread packOverTimeThread = null;
bool IsStartThread = false;
private void SearchTaskList()
{
if (IsLoading)
{
return;
}
IsLoading = true;
IsStartThread = false;
Task.Factory.StartNew(() =>
{
var res = packUserService.SearchPackerTask(PackTaskState: PackTaskState, WayBillNo: SearchWayBillNo, SourceExpressName: SearchExpressName,
departmentName: SearchDepartment, SearchSkuId, SearchTaskId, SearchSpuId, SearchOrderSn, SearchShopName, PageIndex, PageSize, SearchSkuTitle, SearchSpuTitle);
if (res.Success)
{
WaitPackCount = res.Data.WaitPackCount;
OrderCount = res.Data.TotalCount;
PackerTaskModelList = new ObservableCollection<PackerTaskModel>();
res.Data.Items.ForEach(item =>
{
var data = JsonConvert.DeserializeObject<PackerTaskModel>(JsonConvert.SerializeObject(item));
if (PackTaskState== Models.PackTaskState.)
{
if (item.PackCompletionOverTime<item.PackCompletionTime)//超时
{
data.IsPackOverTime = true;
data.PackRemainTime = OverTimeHelper.GetTimeString(item.PackCompletionTime.Value.Subtract(item.PackCompletionOverTime.Value));
}
else
{
data.IsPackOverTime = false;
data.PackRemainTime = OverTimeHelper.GetTimeString(item.PackCompletionTime.Value.Subtract(item.SetPackUserTaskTime.Value));
}
}
App.Current.Dispatcher.Invoke(() =>
{
PackerTaskModelList.Add(data);
});
});
if (PackTaskState == Models.PackTaskState.)
{
var packCompletedTasks = PackerTaskModelList.Where(p => p.TaskState == Models.TaskState. && p.PackCompletionOverTime != null).ToList();
if (packCompletedTasks.Count() > 0)
{
packOverTimeThread = new Thread(() =>
{
IsStartThread = true;
while (IsStartThread)
{
App.Current.Dispatcher.BeginInvoke(new Action(() =>
{
foreach (var item in packCompletedTasks)
{
var datetime = item.PackCompletionOverTime.Value.Subtract(DateTime.Now);
if (datetime.TotalMilliseconds > 0)
{
item.IsPackOverTime = false;
item.PackRemainTime = OverTimeHelper.GetTimeString(datetime);
}
else
{
item.IsPackOverTime = true;
item.PackRemainTime = OverTimeHelper.GetTimeString(datetime);
}
}
}));
Thread.Sleep(1000);
}
});
//任务倒计时数据
packOverTimeThread.IsBackground = true;
packOverTimeThread.Start();
}
}
}
else
{
MessageBox.Show(res?.Msg ?? "未知错误");
}
IsLoading = false;
});
}
private void OpenSkuDetail(object param)
{
var paramList = (object[])param;
var skuId = paramList.Last().ToString();
var url = $"https://item.jd.com/{skuId}.html";
try
{
System.Diagnostics.Process.Start("explorer.exe", url);
}
catch (Exception ex)
{
Clipboard.SetText(url);
System.Windows.MessageBox.Show($"{ex.Message}\r\n调用浏览器失败,网页链接已复制到剪切板,请手动打开浏览器访问", "提示");
}
}
private void SubmitOverTimeMarkMsg(object param)
{
var paramList = (object[])param;
var id = (long)paramList[0];
var markMsg = paramList[1]?.ToString();
var overTimeTaskType = Models.OverTimeTaskType.;
SubmitOverTimeMarkMsgWindow submitOverTimeMarkMsgWindow = new SubmitOverTimeMarkMsgWindow(overTimeTaskType, id, markMsg, packTaskService, ReflashTask);
submitOverTimeMarkMsgWindow.ShowDialog();
}
public void ReflashTask()//刷新界面
{
SearchTaskList();
}
#endregion
}
}

7
BBWY.Client/ViewModels/TotalPackTask/PackUserSalaryViewModel.cs

@ -1,4 +1,5 @@
using BBWY.Client.APIServices;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.Models.APIModel;
using BBWY.Client.Models.PackTask;
using BBWY.Common.Models;
@ -19,6 +20,7 @@ namespace BBWY.Client.ViewModels.TotalPackTask
{
public class PackUserSalaryViewModel : BaseVM, IDenpendency
{
public PackUserService packUserService;
public PackTaskService packTaskService;
private bool isLoading;
private DateTime startTime;
@ -54,10 +56,10 @@ namespace BBWY.Client.ViewModels.TotalPackTask
public ICommand SetSearchDateCommand { get; set; }
public PackUserSalaryViewModel(PackTaskService packTaskService)
public PackUserSalaryViewModel(PackTaskService packTaskService, PackUserService packUserService)
{
this.packTaskService = packTaskService;
this.packUserService = packUserService;
OrderPageIndexChangedCommand = new RelayCommand<PageArgs>(p =>
{
LoadOrder(p.PageIndex);
@ -76,6 +78,7 @@ namespace BBWY.Client.ViewModels.TotalPackTask
Task.Factory.StartNew(() => LoadOrder(1)); //点击日期查询订单
});
ExportCommand = new RelayCommand(Export);
}
private void LoadOrder(int pageIndex)

20
BBWY.Client/ViewModels/ViewModelLocator.cs

@ -1,4 +1,5 @@
using BBWY.Client.Models;
using BBWY.Client.ViewModels.PackerTask;
using BBWY.Client.ViewModels.PackTask;
using BBWY.Client.ViewModels.SealBox;
using BBWY.Client.ViewModels.TotalPackTask;
@ -394,6 +395,25 @@ namespace BBWY.Client.ViewModels
}
}
public PackerTaskViewModel PackerTaskVM
{
get
{
using var s = sp.CreateScope();
return s.ServiceProvider.GetRequiredService<PackerTaskViewModel>();
}
}
public PackerSalaryViewModel PackerSalaryVM
{
get
{
using var s = sp.CreateScope();
return s.ServiceProvider.GetRequiredService<PackerSalaryViewModel>();
}
}
//public ShopSealBoxListViewModel ShopSealBoxListVM
//{
// get

2
BBWY.Client/Views/PackTask/PackDetailWindow.xaml

@ -458,7 +458,7 @@
<TextBox Margin="1" BorderThickness="0" VerticalContentAlignment="Center" Grid.Column="3" Height="30" Text="{Binding TaskCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
<c:BButton Foreground="Blue" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch"
Command="{Binding DeleteServiceCommand}"
Visibility="{Binding DataContext.IsConsumableTypeListEnable,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}},Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"
Visibility="{Binding DataContext.IsConsumableTypeListEnable,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}},Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBox}}, Path=ItemsSource}" Content="删除" Grid.Column="4"/>
<Border HorizontalAlignment="Left" Margin="-1 0 0 0" Grid.Column="1" Width="1" Background="{StaticResource Border.Brush}"/>

42
BBWY.Client/Views/PackTask/WaitPackageControl.xaml

@ -47,6 +47,13 @@
</StackPanel>
<StackPanel Background="Black" Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="1185,14,0,0" Width="150">
<c:BTextBox x:Name="tbUserName" Text="{Binding SearchPackUserName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextChanged="tbUserName_TextChanged" Width="150" Height="30" ></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBoxUserName" SelectionChanged="tipBoxUserName_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="54"/>
@ -142,6 +149,21 @@
</StackPanel>
</Border>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="20,0,0,0">
<StackPanel Orientation="Horizontal">
<Label Width="125" Content="包装员" BorderThickness="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<!--<c:BTextBox Width="150" Text="{Binding SearchPackUserName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索" BorderThickness="1 0 0 0" />-->
</UniformGrid>
</StackPanel>
</Border>
<c:BButton Content="搜索" Width="94" Height="30" VerticalAlignment="Stretch" Margin="10,0,0,0"
Command="{Binding SearchTaskCommand}"
@ -511,18 +533,22 @@
</Path>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 10 0 0 ">
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis">
<TextBlock.ToolTip>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 10 0 0 ">
<TextBlock VerticalAlignment="Center" Text="包装员:" Margin="16,0,0,0" />
<c:BButton Content="{Binding PackUser}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding PackUser}"
Margin=" 5,0,7,0">
<c:BButton.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<TextBlock Text="{Binding PackUser}"/>
</ToolTip>
</TextBlock.ToolTip>
<Run Text="包装员:"/>
<Run Text="{Binding PackUser}"/>
</TextBlock>
</c:BButton.ToolTip>
</c:BButton>
</StackPanel>
</StackPanel>

83
BBWY.Client/Views/PackTask/WaitPackageControl.xaml.cs

@ -1,4 +1,6 @@
using BBWY.Client.Helpers;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.APIServices;
using BBWY.Client.Helpers;
using BBWY.Client.Models.PackTask;
using BBWY.Client.ViewModels;
using BBWY.Common.Models;
@ -29,6 +31,85 @@ namespace BBWY.Client.Views.PackTask
{
InitializeComponent();
this.Loaded += Load;
this.Loaded += PackUserSalaryList_Loaded;
}
PackUserService packUserService;
private void PackUserSalaryList_Loaded(object sender, RoutedEventArgs e)
{
var packUserSalaryViewModel = new ViewModelLocator().PackUserSalary;
packTaskService = packUserSalaryViewModel.packTaskService;
packUserService = packUserSalaryViewModel.packUserService;
var packUser = packUserService.GetPackMembers();
if (packUser != null && packUser.Success) users = packUser.Data.Select(p => p.UserName).ToList();
}
List<string> users = new List<string>();
PackTaskService packTaskService;
private void tbUserName_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
var textBoxt = (TextBox)sender;
//创建一个ListBox
if (tipBoxUserName != null && tipBoxUserName.Items.Count > 0)
{
tipBoxUserName.Items.Clear();
}
if (users.Count <= 0)
{
var packUser = packUserService.GetPackMembers();
if (packUser != null && packUser.Success) users = packUser.Data.Select(p => p.UserName).ToList();
}
if (string.IsNullOrEmpty(textBoxt.Text))
{
tipBoxUserName.Visibility = Visibility.Collapsed;
return;
}
foreach (var department in users)
{
if (department.Contains(textBoxt.Text))
{
ListBoxItem item = new ListBoxItem();
Label lb = new Label();
lb.Content = department;
item.Content = lb;
tipBoxUserName.Items.Add(item);
}
}
tipBoxUserName.Visibility = Visibility.Visible;
}
catch (Exception)
{
}
}
private void tipBoxUserName_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;
tbUserName.Text = content.Content.ToString();
tipBoxUserName.Visibility = Visibility.Collapsed;
}
catch (Exception)
{
}
}
GlobalContext globalContext;

50
BBWY.Client/Views/PackerTask/AddOneItemWeightWindow.xaml

@ -0,0 +1,50 @@
<c:BWindow x:Class="BBWY.Client.Views.PackerTask.AddOneItemWeightWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BBWY.Client.Views.PackerTask"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
WindowStartupLocation="CenterScreen"
CloseButtonVisibility="Visible"
xmlns:hc="https://handyorg.github.io/handycontrol"
CloseButtonColor="{StaticResource WindowButtonColor}"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
Width="384" Height="200" ResizeMode="NoResize"
RightButtonGroupMargin="0,5,5,0">
<!--CloseButtonColor="{StaticResource WindowButtonColor}" -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="39"/>
<RowDefinition/>
<RowDefinition Height="36"/>
</Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Button.Background}">
<TextBlock Text="提示" HorizontalAlignment="Left" Foreground="White" VerticalAlignment="Center" Margin="20 0 0 0"/>
</Border>
<Grid Grid.Row="1" Margin="50 20 50 20">
<Grid Grid.Row="0" Height="30">
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Height="30" >
<Label HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="单件重量:"/>
<StackPanel Orientation="Horizontal">
<c:BTextBox Height="30" Width="150" Text="{Binding Weigth}" BorderThickness="1" />
<Label Content="kg" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="50" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/>
<DockPanel Grid.Row="2">
<c:BButton Background="{StaticResource Button.Background}" Name="btn_ok" DockPanel.Dock="Right" Content="确定" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="btn_ok_Click" />
<c:BButton Foreground="{StaticResource Button.Background}" Name="btn_cancel" Grid.Row="2" Style="{StaticResource LinkButton}" Content="取消" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="btn_cancel_Click" />
</DockPanel>
</Grid>
</c:BWindow>

76
BBWY.Client/Views/PackerTask/AddOneItemWeightWindow.xaml.cs

@ -0,0 +1,76 @@
using BBWY.Client.APIServices.QiKu;
using BBWY.Controls;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackerTask
{
/// <summary>
/// AddOneItemWeightWindow.xaml 的交互逻辑
/// </summary>
public partial class AddOneItemWeightWindow : BWindow
{
public AddOneItemWeightWindow(Action completePack, PackUserService packUserService, long taskId)
{
InitializeComponent();
this.DataContext = this;
CompletePack = completePack;
this.packUserService = packUserService;
TaskId = taskId;
}
PackUserService packUserService;
private Action CompletePack { get;set;}
private long TaskId;
private string weigth;
public string Weigth { get => weigth; set { Set(ref weigth, value); } }
private void btn_ok_Click(object sender, RoutedEventArgs e)
{
decimal oneItemWeight = 0;
try
{
oneItemWeight = decimal.Parse(Weigth.Trim());
if (oneItemWeight<=0)
{
MessageBox.Show("重量不能低于0");
return;
}
var res = packUserService.CompletedPackTask(TaskId, oneItemWeight);
if (res.Success)
{
CompletePack?.Invoke();
this.Close();
}
else
{
MessageBox.Show(res?.Msg);
return;
}
}
catch (Exception ex)
{
MessageBox.Show("重量输入有误");
}
}
private void btn_cancel_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}

585
BBWY.Client/Views/PackerTask/PackerPackCompletedControl.xaml

@ -0,0 +1,585 @@
<UserControl x:Class="BBWY.Client.Views.PackerTask.PackerPackCompletedControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding PackerTaskVM,Source={StaticResource Locator}}"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1500">
<UserControl.Resources>
<ResourceDictionary>
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="cmodel:StorageType"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/>
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/>
<ctr:WaybillNoConverter x:Key="waybillConverter"/>
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/>
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1" Height="30"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="54"/>
<RowDefinition Height="45"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch" Panel.ZIndex="999" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Height="30" >
<StackPanel.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</StackPanel.Resources>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="110" VerticalContentAlignment="Center" ItemsSource="{Binding SelectIdList}" HorizontalContentAlignment="Center" Text="{Binding SelectTaskId ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="任务ID" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=任务ID:Visible:Collapsed}"
/>
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="拳探订单号" Text="{Binding SearchOrderSn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=拳探订单号:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectSkuList}" HorizontalContentAlignment="Center" Text="{Binding SelectSku ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
<c:BTextBox Width="150" WaterRemark="SKUID" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SKU:Visible:Collapsed}"
/>
<c:BTextBox Width="150" WaterRemark="SPUID" Text="{Binding SearchSpuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SPU:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectShopList}" HorizontalContentAlignment="Center" Text="{Binding SelectShop ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
</UniformGrid>
</StackPanel>
</Border>
<!--<TextBlock Text="部门: " VerticalAlignment="Center" Margin="16,0,2,0"/>
<c:BTextBox Visibility="Hidden" Width="150" Height="30" ></c:BTextBox>
<TextBlock x:Name="textblock_shop" Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" />-->
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectExpressList}" Text="{Binding SelectExpress }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchWayBillNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="精准搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流单号:Visible:Collapsed}"
/>
<c:BTextBox Width="150" Text="{Binding SearchExpressName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流公司名称:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Grid Grid.Column="1" Grid.Row="1" Margin="5,0,0,0" >
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Margin="1">
<ComboBox Width="100" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectTitleList}" Text="{Binding SelectTitle }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchSkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=SKU名称:Visible:Collapsed}"
/>
<c:BTextBox Width="150" Text="{Binding SearchSpuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=标题:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Grid>
<c:BButton Content="搜索" Width="94" Height="30" VerticalAlignment="Stretch" Margin="10,0,0,0"
Command="{Binding SearchTaskCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
</StackPanel>
</Grid>
<Border Height="1" Grid.Row="1" Margin="0 10 0 0" Background="{StaticResource Border.Brush}" VerticalAlignment="Top"/>
<Grid Grid.Row="1" Margin="0 10 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<TextBlock Text="商品信息" 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="包装组合类型" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="打包需求" Grid.Column="5" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="包装配件" Grid.Column="6" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="合格证位置" Grid.Column="7" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="合格证.条形码" Grid.Column="8" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="9" Style="{StaticResource middleTextBlock}"/>
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>-->
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
</Grid>
<!--ItemsSource="{Binding OrderList}"-->
<ListBox x:Name="listbox_order"
Grid.Row="2"
ItemsSource="{Binding PackerTaskModelList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,1,1,0"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
MinHeight="100">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition MinHeight="90"/>
</Grid.RowDefinitions>
<Grid Background="#F2F2F2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition MinWidth="140"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11">
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" />
<c:BButton Content="{Binding TaskId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}"
CommandParameter="{Binding TaskId}"
Margin=" 5,0,7,0"/>
<Label Width="90" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding PackTaskState}"
Foreground="White" Background="{Binding PackTaskState,Converter={StaticResource enumToColorConverter} , ConverterParameter={x:Type cmodel:TaskState} }" Margin="25,0,0,0"
/>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition />
<!--<ColumnDefinition />-->
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="80" DecodePixelWidth="80"
VerticalAlignment="Top" Margin="11,9,0,10"
Cursor="Hand">
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="SkuId"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BAsyncImage>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,12,0,10">
<StackPanel Orientation="Horizontal">
<TextBlock Text="SKU:"/>
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding SkuId}"
Margin=" 5,0,0,11"/>
</StackPanel>
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis" Margin="0 0 10 0">
<TextBlock.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<TextBlock Text="{Binding SkuName}"/>
</ToolTip>
</TextBlock.ToolTip>
<Run Text="SKU名称:"/>
<Run Text="{Binding SkuName}"/>
</TextBlock>
<TextBlock Foreground="{StaticResource Text.Gray}" TextWrapping="Wrap" Margin="0,11 ">
<Run Text="品名:"/>
<Run Text="{Binding BrandName}"/>
</TextBlock>
</StackPanel>
</Grid>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/>
<Grid Grid.Column="1" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock x:Name="txt_storeName"
Text="{Binding PackCount}"
TextWrapping="Wrap"
HorizontalAlignment="Center"
/>
</StackPanel>
</Grid>
<Grid Grid.Column="2">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Collapsed:Visible}">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding PackRemainTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=false:Visible:Collapsed}"
>
<TextBlock Text="用时: " />
<TextBlock Text="{Binding PackRemainTime}"/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}">
<StackPanel Orientation="Horizontal"
>
<TextBlock Foreground="Red" Text="超时: "/>
<TextBlock Foreground="Red" Text="{Binding PackRemainTime}"/>
</StackPanel>
</StackPanel>
<c:BButton Margin="0 10 0 0" Content="{Binding PackOverTimeMarkMsg ,Converter={StaticResource objConverter},ConverterParameter=#null:提交备注:修改备注}" Style="{StaticResource LinkButton}"
CommandParameter="{Binding TaskId}"
>
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.SubmitOverTimeMarkMsgCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="TaskId"/>
<Binding Path="PackOverTimeMarkMsg"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BButton>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="3" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding PackerFee,StringFormat=0.00}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="4" >
<StackPanel VerticalAlignment="Center" >
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="组合类型:"/>
<TextBlock Text="{Binding PackType}"/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="配件数量:"/>
<TextBlock Text="{Binding GoodsNumber}"/>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="5" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Left">
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="工序:"/>
<TextBlock Text="{Binding ProcessComboName}"/>
</StackPanel>
<Grid Margin="10,5" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock TextWrapping="Wrap">
<Run Text="耗材:"/>
<Run Text="{Binding TaskConsumableMsg}"/>
</TextBlock>
</Grid>
</StackPanel>
</Grid>
<Grid Grid.Column="6" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding SkuGoodsTitle}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="7" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding CertificatePosition}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="8" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="条形码:"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding BarCodeDTO,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}">
<c:BButton x:Name="btn_lookBarCode" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.LookBarCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" CommandParameter="{Binding BarCodeDTO}"/>
</StackPanel>
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding BarCodeDTO,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}"
/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="合格证:"/>
<StackPanel Orientation="Horizontal"
Visibility="{Binding Cers,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}"
>
<StackPanel Orientation="Horizontal"
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Collapsed:Visible}"
>
<c:BButton x:Name="btn_lookCer" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" CommandParameter="{Binding Cers}"/>
</StackPanel>
<TextBlock Text="无需合格证" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Visible:Collapsed}"
/>
</StackPanel>
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding Cers,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}"
/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="9" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}" >
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="完成"
CommandParameter="{Binding}"
Command="{Binding DataContext.CompletedPackTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
/>
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="任务备注"
CommandParameter="{Binding}"
Command="{Binding DataContext.CompletedPackTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
/>
</StackPanel>
</StackPanel>
</Grid>
<!-- Visibility="{Binding ShowMarkMessage,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"-->
<!--<DockPanel Grid.Row="1" Grid.ColumnSpan="6" Visibility="{Binding MarkMessageModelList,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}" Margin="10 0 0 0">
<c:BButton Margin="10 0 0 0" Content="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:∨:∧}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30"
Command="{Binding DataContext.ShowMoreMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}"/>
<ListBox x:Name="listbox_message" Grid.Row="2" Margin="10 0 0 0"
ItemsSource="{Binding MarkMessageModelList}" Height="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:30:*}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0,0,0,0"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_message,Converter={StaticResource widthConverter},ConverterParameter=-0}" MinHeight="30">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Left" Text="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
<TextBlock HorizontalAlignment="Left" Text=" "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding UserName}"/>
<TextBlock HorizontalAlignment="Left" Text=" : "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding MarkMessage}" Foreground="Red"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>-->
<Grid Grid.Row="1" Grid.ColumnSpan="6" Visibility="{Binding MarkMessageModelList,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}" Margin="10 0 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<c:BButton Margin="0" Panel.ZIndex="100" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="2" Background="Transparent"
Command="{Binding DataContext.ShowMoreMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}"/>
<c:BButton Margin="0" Content="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:∨:∧}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30"
/>
<ListBox Grid.Column="1" x:Name="listbox_message" Grid.Row="2" Margin=" 0"
ItemsSource="{Binding MarkMessageModelList}" Height="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:30:*}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0,0,0,0"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_message,Converter={StaticResource widthConverter},ConverterParameter=-0}" MinHeight="30">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Left" Text="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
<TextBlock HorizontalAlignment="Left" Text=" "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding UserName}"/>
<TextBlock HorizontalAlignment="Left" Text=" : "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding MarkMessage}" Foreground="Red"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Border Width="1" Grid.Row="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/>
<TextBlock Grid.Row="1" Grid.Column="6" Grid.ColumnSpan="6"
Visibility="{Binding PackOverTimeMarkMsg,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5 5 0 5" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" >
<Run Text="超时原因:"/>
<Run Text="{Binding PackOverTimeMarkMsg}" Foreground="Red" />
</TextBlock>
<Border Grid.Row="1" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/>
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>-->
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>-->
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
</Grid>
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
</UserControl>

245
BBWY.Client/Views/PackerTask/PackerPackCompletedControl.xaml.cs

@ -0,0 +1,245 @@
using BBWY.Client.Helpers;
using BBWY.Client.Models.PackTask;
using BBWY.Client.ViewModels;
using BBWY.Common.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using WebSocketSharp;
namespace BBWY.Client.Views.PackerTask
{
/// <summary>
/// PackerPackCompletedControl.xaml 的交互逻辑
/// </summary>
public partial class PackerPackCompletedControl : UserControl
{
public PackerPackCompletedControl()
{
InitializeComponent();
this.Loaded += Load;
}
GlobalContext globalContext;
public void LoadShops(GlobalContext globalContext)
{
this.globalContext = globalContext;
shops = globalContext.User.ShopList.Select(s => s.ShopName).ToList();
departments = globalContext.User.DepartmentList.Select(s => s.Name).ToList();
}
private void Load(object sender, RoutedEventArgs e)
{
try
{
var model = (App.Current.Resources["Locator"] as ViewModelLocator).Main;
LoadShops(model.GlobalContext);
}
catch
{
}
}
public string QKApiHost { get; set; }
public void SelectionChangeCommand(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;
tb.Text = content.Content.ToString();
tipBox.Visibility = Visibility.Collapsed;
}
catch (Exception)
{
}
}
List<string> departments = new List<string>();
List<string> shops = new List<string>();
private void tb_TextChanged(object sender, TextChangedEventArgs e)
{
if (tipBox != null)
try
{
var textBoxt = (TextBox)sender;
//创建一个ListBox
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
if (departments.Count <= 0)
{
if (QKApiHost.IsNullOrEmpty()) QKApiHost = "http://qiku.qiyue666.com";
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)
{
if (res.Data != null && res.Data.Any())
{
foreach (var department in res.Data)
{
if (!departments.Contains(department.DePartmentName))
{
departments.Add(department.DePartmentName);
}
}
}
}
}
if (string.IsNullOrEmpty(textBoxt.Text))
{
tipBox.Visibility = Visibility.Collapsed;
return;
}
foreach (var department in departments)
{
if (department.Contains(textBoxt.Text))
{
ListBoxItem item = new ListBoxItem();
Label lb = new Label();
lb.Content = department;
item.Content = lb;
tipBox.Items.Add(item);
}
}
tipBox.Visibility = Visibility.Visible;
}
catch (Exception)
{
}
}
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);
}
}
if (tipBoxShop != null)
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)
{
}
}
private void tb_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
}
catch (Exception)
{
}
}
private void tbShop_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
}
catch (Exception)
{
}
}
}
}

282
BBWY.Client/Views/PackerTask/PackerSalaryControl.xaml

@ -0,0 +1,282 @@
<UserControl x:Class="BBWY.Client.Views.PackerTask.PackerSalaryControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BBWY.Client.Views.PackerTask"
mc:Ignorable="d"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
Background="White"
DataContext="{Binding PackerSalaryVM,Source={StaticResource Locator}}"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
d:DesignHeight="450" d:DesignWidth="1000"
>
<UserControl.Resources>
<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>
</UserControl.Resources>
<Grid>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,0">
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Height="100" Panel.ZIndex="999">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" Height="30">
<StackPanel.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="IsReadOnly" Value="True"/>
</Style>
</StackPanel.Resources>
<TextBlock Text="下单时间" VerticalAlignment="Center" Margin="5,0,0,0"/>
<DatePicker SelectedDate="{Binding StartTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
<DatePicker SelectedDate="{Binding EndTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,0,0,5" Height="30">
<c:BButton Content="今天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d0}"/>
<c:BButton Content="昨天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d1}"/>
<c:BButton Content="近3天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d3}"/>
<c:BButton Content="近7天" Width="50" Height="24" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d7}"/>
<c:BButton Content="近15天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d15}"/>
<c:BButton Content="近30天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d30}"/>
</StackPanel>
<Grid Grid.Column="1" Grid.RowSpan="1" Margin="10 5 10 0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="搜索" Width="100" VerticalAlignment="Stretch" Margin="5,5,0,5" Command="{Binding SearchPackUserSalaryCommand}"
Background="#8080ff" BorderThickness="0" Foreground="White"/>
<!--<Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1"
Background="#02a7f0" BorderThickness="0" Foreground="White"/>-->
</Grid>
<Grid Grid.Column="2" Grid.RowSpan="3" Margin="50 0 0 0" Background="{StaticResource Button.Background}" Width="450"
Visibility="{Binding OrderCount,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}"
>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" >
<TextBlock Text="包装收益" Foreground="White"/>
<TextBlock Text="{Binding TotalSalary,StringFormat='0.00'}" Foreground="White" FontSize="20" FontWeight="Bold"/>
</StackPanel>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" Margin="10 0 0 0" Grid.Column="1">
<TextBlock Text="总任务量" Foreground="White"/>
<TextBlock Text="{Binding TotalTaskCount}" Foreground="White" FontSize="20" FontWeight="Bold"/>
</StackPanel>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" Margin="10 0 0 0" Grid.Column="2">
<TextBlock Text="总件数" Foreground="White"/>
<TextBlock Text="{Binding TotalSkuItemCount}" Foreground="White" FontSize="20" FontWeight="Bold"/>
</StackPanel>
<TextBlock HorizontalAlignment="Left" Foreground="White" Grid.Row="1" Grid.ColumnSpan="3" Margin="20 0 0 0">
<Run Text="统计区间:"/>
<Run Text="{Binding StartTime,StringFormat=yyyy-MM-dd}"/>
<Run Text="至"/>
<Run Text="{Binding EndTime,StringFormat=yyyy-MM-dd}"/>
</TextBlock>
</Grid>
</Grid>
<Grid Grid.Row="1" Width="555" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="#ebeef5" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<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="任务数" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="件数" Grid.Column="5" Style="{StaticResource middleTextBlock}"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="0" />
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1" />
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2" />
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3" />
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4" />
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5" />
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5" />
<Border Height="1" VerticalAlignment="Top" Grid.ColumnSpan="18" Background="{StaticResource Border.Brush}" Grid.Row="0"/>
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="18" Background="{StaticResource Border.Brush}" Grid.Row="0"/>
</Grid>
<ListBox x:Name="listbox_order"
Grid.Row="1"
ItemsSource="{Binding PackUserSalaryList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,0,1,1"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Background="White" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<c:BButton Grid.Column="0" Panel.ZIndex="100" Background="Transparent" HorizontalAlignment="Stretch" BorderThickness="0" Grid.ColumnSpan="6" Command="{Binding HideCommand}" CommandParameter="{Binding}"/>
<Border Margin="8" Grid.Row="1" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" >
<c:BButton HorizontalAlignment="Center" Grid.Column="0" Content="{Binding IsHide ,Converter={StaticResource objConverter},ConverterParameter=True:+:-}" Style="{StaticResource LinkButton}" Foreground="{StaticResource Border.Brush}" HorizontalContentAlignment="Center" />
</Border>
<TextBlock Text="{Binding Date,StringFormat=yyyy-MM-dd}" Grid.Column="1" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="{Binding UserName}" Grid.Column="2" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="{Binding DaySalary}" Grid.Column="3" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="{Binding DayTaskCount}" Grid.Column="4" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="{Binding DayTaskSkuItemCount}" Grid.Column="5" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4" Grid.Row="0"/>
</Grid>
<Border Height="1" VerticalAlignment="Bottom" Background="{StaticResource Border.Brush}" Grid.Column="4" Grid.Row="0"/>
<ListBox Name="listbox_orerSku" Grid.Row="1" Visibility="{Binding IsHide ,Converter={StaticResource objConverter},ConverterParameter=True:Collapsed:Visible}"
ItemsSource="{Binding PackerTaskSalaries}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0,0,0,0"
Foreground="{StaticResource Text.Color}"
>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinHeight="35" Width="{Binding ActualWidth,ElementName=listbox_orerSku}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" Grid.Row="0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4" Grid.Row="0"/>
<TextBlock Text="{Binding TaskSalary}" Grid.Column="3" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
<StackPanel Orientation="Horizontal" Grid.Column="4" Grid.Row="1" HorizontalAlignment="Center">
<TextBlock VerticalAlignment="Center" Text="ID:" Margin="16,0,0,0" />
<c:BButton Content="{Binding TaskId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding TaskId}"
Margin=" 5,0,7,0"/>
</StackPanel>
<TextBlock Text="{Binding TaskSkuItemCount}" Grid.Column="5" Grid.Row="1" Style="{StaticResource middleTextBlock}"/>
</Grid>
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<c:PageControl PageIndex="{Binding PageIndex}"
PageSize="{Binding PageSize}"
RecordCount="{Binding OrderCount}"
Grid.Row="3"
HorizontalAlignment="Left">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnPageIndexChanged">
<b:InvokeCommandAction Command="{Binding OrderPageIndexChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:PageControl>
</Grid>
</Grid>
</UserControl>

26
BBWY.Client/Views/PackerTask/PackerSalaryControl.xaml.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackerTask
{
/// <summary>
/// PackerSalaryControl.xaml 的交互逻辑
/// </summary>
public partial class PackerSalaryControl : UserControl
{
public PackerSalaryControl()
{
InitializeComponent();
}
}
}

116
BBWY.Client/Views/PackerTask/PackerTaskList.xaml

@ -0,0 +1,116 @@
<Page x:Class="BBWY.Client.Views.PackerTask.PackerTaskList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BBWY.Client.Views.PackerTask"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding PackerTaskVM,Source={StaticResource Locator}}"
mc:Ignorable="d" Background="White"
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" />
</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>-->
</Page.Resources>
<Grid>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,5">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
<!---->
</Grid.RowDefinitions>
<StackPanel Grid.RowSpan="1" HorizontalAlignment="Left" Orientation="Horizontal">
<!--<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" Content="全部" Command="{Binding SetTaskStateCommand}"
IsChecked="{Binding PackTaskState,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=#null:True:False}"
/>-->
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待包装}" Content="待包装" Tag="{Binding WaitPackCount,Mode=TwoWay}"
IsChecked="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.已完成}" Content="已完成"
IsChecked="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=已完成:True:False}"
/>
</StackPanel>
<Border Grid.Row="2" Margin="0,0,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0" />
<Grid Grid.Row="1" Margin="0,5,0,0">
<local:PackerWaitPackageControl Visibility="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}"/>
<local:PackerPackCompletedControl Visibility="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=已完成:Visible:Collapsed}"/>
</Grid>
<c:PageControl PageIndex="{Binding PageIndex,Mode=TwoWay}"
PageSize="{Binding PageSize,Mode=TwoWay}"
RecordCount="{Binding OrderCount,Mode=TwoWay}"
Grid.Row="2"
HorizontalAlignment="Left" Width="auto">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnPageIndexChanged">
<b:InvokeCommandAction Command="{Binding TaskPageIndexChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:PageControl>
</Grid>
</Grid>
</Page>

26
BBWY.Client/Views/PackerTask/PackerTaskList.xaml.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackerTask
{
/// <summary>
/// PackerTaskList.xaml 的交互逻辑
/// </summary>
public partial class PackerTaskList : Page
{
public PackerTaskList()
{
InitializeComponent();
}
}
}

582
BBWY.Client/Views/PackerTask/PackerWaitPackageControl.xaml

@ -0,0 +1,582 @@
<UserControl x:Class="BBWY.Client.Views.PackerTask.PackerWaitPackageControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BBWY.Client.Views.PackerTask"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding PackerTaskVM,Source={StaticResource Locator}}"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1500">
<UserControl.Resources>
<ResourceDictionary>
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="cmodel:StorageType"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/>
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/>
<ctr:WaybillNoConverter x:Key="waybillConverter"/>
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/>
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1" Height="30"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="54"/>
<RowDefinition Height="45"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch" Panel.ZIndex="999" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Height="30" >
<StackPanel.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</StackPanel.Resources>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="110" VerticalContentAlignment="Center" ItemsSource="{Binding SelectIdList}" HorizontalContentAlignment="Center" Text="{Binding SelectTaskId ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="任务ID" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=任务ID:Visible:Collapsed}"
/>
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="拳探订单号" Text="{Binding SearchOrderSn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=拳探订单号:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectSkuList}" HorizontalContentAlignment="Center" Text="{Binding SelectSku ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
<c:BTextBox Width="150" WaterRemark="SKUID" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SKU:Visible:Collapsed}"
/>
<c:BTextBox Width="150" WaterRemark="SPUID" Text="{Binding SearchSpuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SPU:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectShopList}" HorizontalContentAlignment="Center" Text="{Binding SelectShop ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
</UniformGrid>
</StackPanel>
</Border>
<!--<TextBlock Text="部门: " VerticalAlignment="Center" Margin="16,0,2,0"/>
<c:BTextBox Visibility="Hidden" Width="150" Height="30" ></c:BTextBox>
<TextBlock x:Name="textblock_shop" Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" />-->
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectExpressList}" Text="{Binding SelectExpress }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchWayBillNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="精准搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流单号:Visible:Collapsed}"
/>
<c:BTextBox Width="150" Text="{Binding SearchExpressName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流公司名称:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Border>
<Grid Grid.Column="1" Grid.Row="1" Margin="5,0,0,0" >
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Margin="1">
<ComboBox Width="100" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectTitleList}" Text="{Binding SelectTitle }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchSkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=SKU名称:Visible:Collapsed}"
/>
<c:BTextBox Width="150" Text="{Binding SearchSpuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=标题:Visible:Collapsed}"
/>
</UniformGrid>
</StackPanel>
</Grid>
<c:BButton Content="搜索" Width="94" Height="30" VerticalAlignment="Stretch" Margin="10,0,0,0"
Command="{Binding SearchTaskCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
</StackPanel>
</Grid>
<Border Height="1" Grid.Row="1" Margin="0 10 0 0" Background="{StaticResource Border.Brush}" VerticalAlignment="Top"/>
<Grid Grid.Row="1" Margin="0 10 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<TextBlock Text="商品信息" 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="包装组合类型" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="打包需求" Grid.Column="5" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="包装配件" Grid.Column="6" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="合格证位置" Grid.Column="7" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="合格证.条形码" Grid.Column="8" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="9" Style="{StaticResource middleTextBlock}"/>
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>-->
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
</Grid>
<!--ItemsSource="{Binding OrderList}"-->
<ListBox x:Name="listbox_order"
Grid.Row="2"
ItemsSource="{Binding PackerTaskModelList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,1,1,0"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
MinHeight="100">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition MinHeight="90"/>
</Grid.RowDefinitions>
<Grid Background="#F2F2F2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition MinWidth="140"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11">
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" />
<c:BButton Content="{Binding TaskId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}"
CommandParameter="{Binding TaskId}"
Margin=" 5,0,7,0"/>
<Label Width="90" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding PackTaskState}"
Foreground="White" Background="{Binding PackTaskState,Converter={StaticResource enumToColorConverter} , ConverterParameter={x:Type cmodel:TaskState} }" Margin="25,0,0,0"
/>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition />
<!--<ColumnDefinition />-->
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="80" DecodePixelWidth="80"
VerticalAlignment="Top" Margin="11,9,0,10"
Cursor="Hand">
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="SkuId"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BAsyncImage>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,12,0,10">
<StackPanel Orientation="Horizontal">
<TextBlock Text="SKU:"/>
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding SkuId}"
Margin=" 5,0,0,11"/>
</StackPanel>
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis" Margin="0 0 10 0">
<TextBlock.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<TextBlock Text="{Binding SkuName}"/>
</ToolTip>
</TextBlock.ToolTip>
<Run Text="SKU名称:"/>
<Run Text="{Binding SkuName}"/>
</TextBlock>
<TextBlock Foreground="{StaticResource Text.Gray}" TextWrapping="Wrap" Margin="0,11 ">
<Run Text="品名:"/>
<Run Text="{Binding BrandName}"/>
</TextBlock>
</StackPanel>
</Grid>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/>
<Grid Grid.Column="1" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock x:Name="txt_storeName"
Text="{Binding PackCount}"
TextWrapping="Wrap"
HorizontalAlignment="Center"
/>
</StackPanel>
</Grid>
<Grid Grid.Column="2">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding PackRemainTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=false:Visible:Collapsed}"
>
<TextBlock Text="剩余: " />
<TextBlock Text="{Binding PackRemainTime}"/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}">
<StackPanel Orientation="Horizontal"
>
<TextBlock Foreground="Red" Text="超时: "/>
<TextBlock Foreground="Red" Text="{Binding PackRemainTime}"/>
</StackPanel>
</StackPanel>
<c:BButton Margin="0 10 0 0" Content="{Binding PackOverTimeMarkMsg ,Converter={StaticResource objConverter},ConverterParameter=#null:提交备注:修改备注}" Style="{StaticResource LinkButton}"
CommandParameter="{Binding TaskId}"
>
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.SubmitOverTimeMarkMsgCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="TaskId"/>
<Binding Path="PackOverTimeMarkMsg"/>
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BButton>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="3" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding PackerFee,StringFormat=0.00}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="4" >
<StackPanel VerticalAlignment="Center" >
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="组合类型:"/>
<TextBlock Text="{Binding PackType}"/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="配件数量:"/>
<TextBlock Text="{Binding GoodsNumber}"/>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="5" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Left">
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="工序:"/>
<TextBlock Text="{Binding ProcessComboName}"/>
</StackPanel>
<Grid Margin="10,5" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock TextWrapping="Wrap">
<Run Text="耗材:"/>
<Run Text="{Binding TaskConsumableMsg}"/>
</TextBlock>
</Grid>
</StackPanel>
</Grid>
<Grid Grid.Column="6" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding SkuGoodsTitle}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="7" >
<TextBlock Style="{StaticResource middleTextBlock}"
Text="{Binding CertificatePosition}"
TextWrapping="Wrap"
/>
</Grid>
<Grid Grid.Column="8" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="条形码:"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding BarCodeDTO,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}">
<c:BButton x:Name="btn_lookBarCode" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.LookBarCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" CommandParameter="{Binding BarCodeDTO}"/>
</StackPanel>
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding BarCodeDTO,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}"
/>
</StackPanel>
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Text="合格证:"/>
<StackPanel Orientation="Horizontal"
Visibility="{Binding Cers,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}"
>
<StackPanel Orientation="Horizontal"
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Collapsed:Visible}"
>
<c:BButton x:Name="btn_lookCer" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" CommandParameter="{Binding Cers}"/>
</StackPanel>
<TextBlock Text="无需合格证" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Visible:Collapsed}"
/>
</StackPanel>
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0"
Visibility="{Binding Cers,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}"
/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Column="9" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}" >
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="完成"
CommandParameter="{Binding TaskId}"
Command="{Binding DataContext.CompletedPackTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
/>
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="{Binding ShowSendMsg,Converter={StaticResource objConverter},ConverterParameter=False:任务备注:取消备注}"
CommandParameter="{Binding TaskId}"
Command="{Binding DataContext.PackTaskMarkMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
/>
</StackPanel>
</StackPanel>
</Grid>
<!-- Visibility="{Binding ShowMarkMessage,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"-->
<Grid Grid.Row="1" Grid.ColumnSpan="6" Visibility="{Binding MarkMessageModelList,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}" Margin="10 0 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<c:BButton Margin="0" Panel.ZIndex="100" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="2" Background="Transparent"
Command="{Binding DataContext.ShowMoreMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}"/>
<c:BButton Margin="0" Content="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:∨:∧}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30"
/>
<ListBox Grid.Column="1" x:Name="listbox_message" Grid.Row="2" Margin=" 0"
ItemsSource="{Binding MarkMessageModelList}" Height="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:30:*}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="0,0,0,0"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_message,Converter={StaticResource widthConverter},ConverterParameter=-0}" MinHeight="30">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Left" Text="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
<TextBlock HorizontalAlignment="Left" Text=" "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding UserName}"/>
<TextBlock HorizontalAlignment="Left" Text=" : "/>
<TextBlock HorizontalAlignment="Left" Text="{Binding MarkMessage}" Foreground="Red"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Border Width="1" Grid.Row="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/>
<TextBlock Grid.Row="1" Grid.Column="6" Grid.ColumnSpan="6"
Visibility="{Binding PackOverTimeMarkMsg,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5 5 0 5" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" >
<Run Text="超时原因:"/>
<Run Text="{Binding PackOverTimeMarkMsg}" Foreground="Red" />
</TextBlock>
<Grid Grid.Row="3" Grid.ColumnSpan="100" MinHeight="40" Visibility="{Binding ShowSendMsg,Converter={StaticResource objConverter},ConverterParameter=false:Collapsed:Visible}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition MinWidth="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/>
<c:BTextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="9" Height="30" Margin="5 0 0 0" Text="{Binding TaskMarkMsg}"/>
<c:BButton Grid.Column="10" Content="提交备注" Width="80" Command="{Binding DataContext.AppendMarkMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding TaskId}"/>
</Grid>
<Border Grid.Row="1" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/>
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>-->
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>-->
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12" Margin="-1 0 0 0"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/>
</Grid>
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
</UserControl>

245
BBWY.Client/Views/PackerTask/PackerWaitPackageControl.xaml.cs

@ -0,0 +1,245 @@
using BBWY.Client.Helpers;
using BBWY.Client.Models.PackTask;
using BBWY.Client.ViewModels;
using BBWY.Common.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using WebSocketSharp;
namespace BBWY.Client.Views.PackerTask
{
/// <summary>
/// PackerWaitPackageControl.xaml 的交互逻辑
/// </summary>
public partial class PackerWaitPackageControl : UserControl
{
public PackerWaitPackageControl()
{
InitializeComponent();
this.Loaded += Load;
}
GlobalContext globalContext;
public void LoadShops(GlobalContext globalContext)
{
this.globalContext = globalContext;
shops = globalContext.User.ShopList.Select(s => s.ShopName).ToList();
departments = globalContext.User.DepartmentList.Select(s => s.Name).ToList();
}
private void Load(object sender, RoutedEventArgs e)
{
try
{
var model = (App.Current.Resources["Locator"] as ViewModelLocator).Main;
LoadShops(model.GlobalContext);
}
catch
{
}
}
public string QKApiHost { get; set; }
public void SelectionChangeCommand(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;
tb.Text = content.Content.ToString();
tipBox.Visibility = Visibility.Collapsed;
}
catch (Exception)
{
}
}
List<string> departments = new List<string>();
List<string> shops = new List<string>();
private void tb_TextChanged(object sender, TextChangedEventArgs e)
{
if (tipBox != null)
try
{
var textBoxt = (TextBox)sender;
//创建一个ListBox
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
if (departments.Count <= 0)
{
if (QKApiHost.IsNullOrEmpty()) QKApiHost = "http://qiku.qiyue666.com";
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)
{
if (res.Data != null && res.Data.Any())
{
foreach (var department in res.Data)
{
if (!departments.Contains(department.DePartmentName))
{
departments.Add(department.DePartmentName);
}
}
}
}
}
if (string.IsNullOrEmpty(textBoxt.Text))
{
tipBox.Visibility = Visibility.Collapsed;
return;
}
foreach (var department in departments)
{
if (department.Contains(textBoxt.Text))
{
ListBoxItem item = new ListBoxItem();
Label lb = new Label();
lb.Content = department;
item.Content = lb;
tipBox.Items.Add(item);
}
}
tipBox.Visibility = Visibility.Visible;
}
catch (Exception)
{
}
}
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);
}
}
if (tipBoxShop != null)
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)
{
}
}
private void tb_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
}
catch (Exception)
{
}
}
private void tbShop_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
}
catch (Exception)
{
}
}
}
}

2
BBWY.Client/Views/SealBox/SetSealBoxPolicyWindow.xaml

@ -188,7 +188,7 @@ Foreground="{StaticResource Text.Color}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="SKU:"/>
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
CommandParameter="{Binding SkuId}"
/>
</StackPanel>

12
BBWY.Client/Views/TotalPackTask/PackUserSalaryList.xaml.cs

@ -1,4 +1,5 @@
using BBWY.Client.APIServices;
using BBWY.Client.APIServices.QiKu;
using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.TotalPackTask;
using System;
@ -27,12 +28,15 @@ namespace BBWY.Client.Views.TotalPackTask
InitializeComponent();
this.Loaded += PackUserSalaryList_Loaded;
}
PackUserService packUserService;
private void PackUserSalaryList_Loaded(object sender, RoutedEventArgs e)
{
var packUserSalaryViewModel = new ViewModelLocator().PackUserSalary;
var packUserSalaryViewModel = new ViewModelLocator().PackUserSalary;
packTaskService = packUserSalaryViewModel.packTaskService;
var packUser = packTaskService.GetPackMembers();
packUserService = packUserSalaryViewModel.packUserService;
var packUser = packUserService.GetPackMembers();
if (packUser != null && packUser.Success) users = packUser.Data.Select(p => p.UserName).ToList();
}
List<string> users =new List<string>();
@ -52,7 +56,7 @@ namespace BBWY.Client.Views.TotalPackTask
if (users.Count <= 0)
{
var packUser = packTaskService.GetPackMembers();
var packUser = packUserService.GetPackMembers();
if (packUser != null && packUser.Success) users = packUser.Data.Select(p => p.UserName).ToList();
}

126
BBWY.JDSDK/Request/EclpStockQueryStockRequest.cs

@ -6,85 +6,49 @@ namespace Jd.Api.Request
{
public class EclpStockQueryStockRequest : JdRequestBase<EclpStockQueryStockResponse>
{
public string
deptNo
{get; set;}
public string
warehouseNo
{get; set;}
public string
stockStatus
{get; set;}
public string
stockType
{get; set;}
public string
goodsNo
{get; set;}
public string
currentPage
{get; set;}
public string
pageSize
{get; set;}
public string
returnZeroStock
{get; set;}
public string
returnIsvLotattrs
{get; set;}
public string
goodsLevel
{get; set;}
public string
isvSku
{get; set;}
public string
sellerGoodsSign
{get; set;}
public override string ApiName
{
get{return "jingdong.eclp.stock.queryStock";}
}
protected override void PrepareParam(IDictionary<String, Object> parameters)
{
parameters.Add("deptNo", this. deptNo
);
parameters.Add("warehouseNo", this. warehouseNo
);
parameters.Add("stockStatus", this. stockStatus
);
parameters.Add("stockType", this. stockType
);
parameters.Add("goodsNo", this. goodsNo
);
parameters.Add("currentPage", this. currentPage
);
parameters.Add("pageSize", this. pageSize
);
parameters.Add("returnZeroStock", this. returnZeroStock
);
parameters.Add("returnIsvLotattrs", this. returnIsvLotattrs
);
parameters.Add("goodsLevel", this. goodsLevel
);
parameters.Add("isvSku", this. isvSku
);
parameters.Add("sellerGoodsSign", this. sellerGoodsSign
);
}
public string deptNo { get; set; }
public string warehouseNo { get; set; }
//public string stockStatus { get; set; }
public int stockType { get; set; }
//public string goodsNo { get; set; }
public int currentPage { get; set; }
//public string pageSize { get; set; }
//public string returnZeroStock { get; set; }
//public string returnIsvLotattrs { get; set; }
//public string goodsLevel { get; set; }
//public string isvSku { get; set; }
//public string sellerGoodsSign{get; set;}
public override string ApiName
{
get { return "jingdong.eclp.stock.queryStock"; }
}
protected override void PrepareParam(IDictionary<String, Object> parameters)
{
parameters.Add("deptNo", this.deptNo);
parameters.Add("warehouseNo", this.warehouseNo);
//parameters.Add("stockStatus", this.stockStatus);
parameters.Add("stockType", this.stockType);
//parameters.Add("goodsNo", this.goodsNo);
parameters.Add("currentPage", this.currentPage);
//parameters.Add("pageSize", this.pageSize);
//parameters.Add("returnZeroStock", this.returnZeroStock);
//parameters.Add("returnIsvLotattrs", this.returnIsvLotattrs);
//parameters.Add("goodsLevel", this.goodsLevel);
//parameters.Add("isvSku", this.isvSku);
//parameters.Add("sellerGoodsSign", this.sellerGoodsSign);
}
}
}
@ -92,6 +56,6 @@ namespace Jd.Api.Request

55
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -939,7 +939,7 @@ namespace BBWY.Server.Business
throw new BusinessException($"获取主商品品牌失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
if (res.Json == null)
res.Json = JObject.Parse(res.Body);
brandName = res.Json["jingdong_ware_read_findWareById_responce"]["ware"].Value<string>("brandName");
brandName = res.Json["jingdong_ware_read_findWareById_responce"]["ware"].Value<string>("brandName");
}
#endregion
@ -1636,5 +1636,58 @@ namespace BBWY.Server.Business
res.Json = JObject.Parse(res.Body);
return res.Json;
}
/// <summary>
/// 获取事业部方法
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public override JToken QueryDept(PlatformRequest request)
{
var jdClient = GetJdClient(request.AppKey, request.AppSecret);
EclpMasterQueryDeptRequest req = new EclpMasterQueryDeptRequest();
// req.deptNos = ;
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.Json == null)
res.Json = JObject.Parse(res.Body);
return res.Json;
}
public override JToken GetStockNumByWareHouseNo(GetStockNumByWareHouseNoRequest request)
{
var jdClient = GetJdClient(request.AppKey, request.AppSecret);
EclpStockQueryStockRequest req = new EclpStockQueryStockRequest();
req.deptNo = request.DeptNo;
req.warehouseNo = request.WareHouseNo;
//req.stockStatus = ;
if (request.StockType != null)
req.stockType = (int)request.StockType.Value;//仓库类型状态
//req.goodsNo = ;
if (request.CurrentPage != null)
req.currentPage = request.CurrentPage.Value;
// req.pageSize = "100";
//req.returnZeroStock = ;
//req.returnIsvLotattrs = ;
//req.goodsLevel = ;
//req.isvSku = ;
//req.sellerGoodsSign = ;
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.Json == null)
res.Json = JObject.Parse(res.Body);
return res.Json;
}
}
}

10
BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs

@ -266,5 +266,15 @@ namespace BBWY.Server.Business
{
throw new NotImplementedException();
}
public virtual JToken QueryDept(PlatformRequest request)
{
throw new NotImplementedException();
}
public virtual JToken GetStockNumByWareHouseNo(GetStockNumByWareHouseNoRequest request)
{
throw new NotImplementedException();
}
}
}

27
BBWY.Server.Model/Dto/Request/JD/GetStockNumByWareHouseNoRequest.cs

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Text;
using static BBWY.Server.Model.Enums;
namespace BBWY.Server.Model.Dto.Request.JD
{
public class GetStockNumByWareHouseNoRequest : PlatformRequest
{
/// <summary>
/// 京东事业部编码
/// </summary>
public string DeptNo { get; set; }
/// <summary>
/// 仓库编号
/// </summary>
public string WareHouseNo { get; set; }
/// <summary>
/// 仓库状态类型(可销售=1, 采购在途 = 23,在途库存=8) 默认查全部
/// </summary>
public StockState? StockType { get; set; }
/// <summary>
/// 当前页码 (100条1页 从1开始) (默认第1页)
/// </summary>
public int? CurrentPage { get; set; }
}
}

9
BBWY.Server.Model/Enums.cs

@ -379,5 +379,14 @@
{
= 0, = 1, = 2
}
/// <summary>
/// 库存类型状态(可销售=1, 待退品=2, 商家预留=3 ,仓库锁定=4, 临期锁定=5 ,盘点锁定=6,内配出锁定=7,在途库存=8,VMI锁定=9,质押类型 =10,过期锁定类型=11,过期锁定类型=12,门店专享类型-b2b2c项目=13,耗材=14,TC在途可售=15,ERP在途可售=16,业务锁定=17,物权变更锁定=18,物权变更中库存=19,流转单在途=20,越库库存类型=21,待质押库存类型=22,采购在途=23)
/// </summary>
public enum StockState
{
= 1, 退 = 2, = 3, = 4, = 5, = 6, = 7, = 8, VMI锁定 = 9, = 10, = 11, = 14, TC在途可售 = 15, ERP在途可售 = 16, = 17, = 18, = 19, = 20, = 21, = 22, = 23
}
}
}

8
BBWY.Test/JDBaoBiaoAPITest.cs

@ -513,9 +513,9 @@ namespace BBWY.Test
//req.goodsNo = ;
req.currentPage = "1";
req.currentPage = 1;
req.pageSize = "100";
//req.pageSize = 100;
//req.returnZeroStock = ;
@ -691,9 +691,9 @@ namespace BBWY.Test
//req.goodsNo = ;
req.currentPage ="1" ;
req.currentPage =1 ;
req.pageSize = "100";
//req.pageSize = "100";
//req.returnZeroStock = ;

28
JD.API/Controllers/PlatformSDKController.cs

@ -2,6 +2,7 @@
using BBWY.Server.Model;
using BBWY.Server.Model.Dto;
using BBWY.Server.Model.Dto.Request.JD;
using Jd.Api.Request;
using JD.API.Filters;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
@ -429,9 +430,34 @@ namespace JD.API.API.Controllers
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
public virtual JToken GetOrderCouponDetail([FromBody] QueryOrderCouponDetailRequest request)
public JToken GetOrderCouponDetail([FromBody] QueryOrderCouponDetailRequest request)
{
return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetOrderCouponDetail(request);
}
/// <summary>
/// 查询店铺事业部信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
public JToken QueryDept([FromBody] PlatformRequest request)
{
return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).QueryDept(request);
}
/// <summary>
/// 通过仓库id 获取对应的sku库存状态数据()
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
public JToken GetStockNumByWareHouseNo([FromBody] GetStockNumByWareHouseNoRequest request)
{
return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetStockNumByWareHouseNo(request);
}
}
}

Loading…
Cancel
Save