40 changed files with 3927 additions and 145 deletions
@ -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); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -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; } |
||||
|
} |
||||
|
} |
@ -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; } |
||||
|
} |
||||
|
} |
@ -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); } } |
||||
|
} |
||||
|
} |
@ -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; |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -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
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -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> |
@ -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(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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> |
@ -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) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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> |
@ -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(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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> |
@ -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(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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> |
||||
|
|
@ -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) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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; } |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue