100 changed files with 10211 additions and 2693 deletions
@ -0,0 +1,59 @@ |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.Views.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 |
|||
{ |
|||
public class ConsumableService : BaseApiService, IDenpendency |
|||
{ |
|||
public ConsumableService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
public ApiResponse<ConsuableRequest[]> SearchAll() |
|||
{ |
|||
return SendRequest<ConsuableRequest[]>(globalContext.QKApiHost, "api/Consumable/SearchAll", |
|||
null |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
public ApiResponse<object> Add(ConsuableRequest consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Add", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
public ApiResponse<object> Edit(ConsuableRequest consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Edit", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<object> Deleted(long id) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Deleted", |
|||
new |
|||
{ |
|||
id = id |
|||
} |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
public ApiResponse<ConsumableResponse> Search(ConsumableSearchRequest consumable) |
|||
{ |
|||
return SendRequest<ConsumableResponse>(globalContext.QKApiHost, "api/Consumable/Search", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
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 |
|||
{ |
|||
public class IncreateServiceService : BaseApiService, IDenpendency |
|||
{ |
|||
public IncreateServiceService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
public ApiResponse<IncreateServiceModel[]> SearchAll() |
|||
{ |
|||
return SendRequest<IncreateServiceModel[]>(globalContext.QKApiHost, "api/IncreateService/SearchAll", |
|||
null |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
public ApiResponse<object> Add(IncreateServiceModel consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/IncreateService/Add", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
public ApiResponse<object> Edit(IncreateServiceModel consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/IncreateService/Edit", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<object> Deleted(long id) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/IncreateService/Deleted", |
|||
new |
|||
{ |
|||
id = id |
|||
} |
|||
, null, HttpMethod.Get); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,340 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http; |
|||
using System.Runtime.Serialization; |
|||
using System.Windows.Documents; |
|||
|
|||
namespace BBWY.Client.APIServices |
|||
{ |
|||
public class PackTaskService : BaseApiService, IDenpendency |
|||
{ |
|||
|
|||
|
|||
|
|||
public PackTaskService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
|
|||
|
|||
public ApiResponse<PackTaskResultResponse> GetOrderList( string skuId = null, string taskId = null, |
|||
DateTime? startTime = null, |
|||
DateTime? endTime = null, |
|||
TaskState? availability = null, |
|||
int? taskStatus = null, |
|||
int pageIndex = 1, |
|||
int pageSize = 10 |
|||
|
|||
) |
|||
{ |
|||
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/GetPackTaskList", new |
|||
{ |
|||
|
|||
SkuId = skuId, |
|||
TaskId = taskId, |
|||
StartTime = startTime, |
|||
EndTime = endTime, |
|||
Availability = availability, |
|||
TaskStatus = taskStatus, |
|||
PageIndex = pageIndex, |
|||
PageSize = pageSize, |
|||
ShopId = globalContext.User.Shop.ShopId.ToString() |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
public ApiResponse<PackTaskResultResponse> GetWareHouseList(int? isWorry=null,string departmentName = null, string skuId = null, string taskId = null, |
|||
DateTime? startTime = null, |
|||
DateTime? endTime = null, |
|||
TaskState? availability = null, |
|||
int? taskStatus = null, |
|||
int pageIndex = 1, |
|||
int pageSize = 10 |
|||
|
|||
) |
|||
{ |
|||
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/GetPackTaskList", new |
|||
{ |
|||
IsWorry=isWorry, |
|||
DepartmentName = departmentName, |
|||
SkuId = skuId, |
|||
TaskId = taskId, |
|||
StartTime = startTime, |
|||
EndTime = endTime, |
|||
Availability = availability, |
|||
TaskStatus = taskStatus, |
|||
PageIndex = pageIndex, |
|||
PageSize = pageSize |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
public ApiResponse<ProductSkuCountsResponse> GetAllCount() |
|||
{ |
|||
return SendRequest<ProductSkuCountsResponse>(globalContext.QKApiHost, "api/PackTask/GetProductSkuCount", |
|||
new { ShopId = globalContext.User.Shop.ShopId.ToString() } |
|||
, null, HttpMethod.Get); |
|||
} |
|||
public ApiResponse<ProductSkuCountsResponse> GetWareAllCount() |
|||
{ |
|||
return SendRequest<ProductSkuCountsResponse>(globalContext.QKApiHost, "api/PackTask/GetProductSkuCount", |
|||
null |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<ProductSkuResponse> GetProductSku(string skuId) |
|||
{ |
|||
HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost); |
|||
|
|||
string url = $"{globalContext.QKApiHost}/api/PackTask/SearchProduct?skuId={skuId}&ShopId={globalContext.User.Shop.ShopId.ToString()}"; |
|||
var data = helper.Get(url); |
|||
|
|||
return JsonConvert.DeserializeObject<ApiResponse<ProductSkuResponse>>(data); |
|||
} |
|||
|
|||
public ApiResponse<object> CreateTask(CreateTaskRequest createTaskRequest) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/CreatePackTask", |
|||
createTaskRequest |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<object> UpdateTaskStatus(long id, int taskStatus) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/UpdatePackTaskStatus", new |
|||
{ |
|||
id, |
|||
taskStatus |
|||
|
|||
} |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<long> SaveBarCode(BarCodeRequest barCodeModel) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackTask/CommitBarCode", barCodeModel |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<long> SaveCer(CerRequest cerRequest) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackTask/CommitCer", cerRequest |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<PackUser[]> GetPackMembers() |
|||
{ |
|||
|
|||
return SendRequest<PackUser[]>(globalContext.QKApiHost, "api/PackTask/SearchPackMembers", null |
|||
, null, HttpMethod.Get); |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 获取任务的服务
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public ApiResponse<PackServiceResponse> GetTaskService(long taskId) |
|||
{ |
|||
return SendRequest<PackServiceResponse>(globalContext.QKApiHost, "api/PackTask/GetTaskService", new { TaskId = taskId } |
|||
, null, HttpMethod.Get); |
|||
} |
|||
/// <summary>
|
|||
/// 上传 更新任务的服务数据
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public ApiResponse<object> UploadService(UploadServiceRequest uploadService) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/UploadService", uploadService |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
//public ApiResponse<object> AddTaskPeople(long taskId, string packUserId, int FeesTypeId,
|
|||
// int FeesItemId, decimal PackNumber)
|
|||
//{
|
|||
|
|||
|
|||
|
|||
// return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/AddTaskPeople", new
|
|||
// {
|
|||
// taskId = taskId,
|
|||
// packUserId = packUserId,
|
|||
// FeesTypeId = FeesTypeId,
|
|||
// FeesItemId = FeesItemId,
|
|||
// PackNumber = PackNumber
|
|||
// }
|
|||
// , null, HttpMethod.Post);
|
|||
|
|||
//}
|
|||
|
|||
//public ApiResponse<object> AddTaskPeople(List<PackUserRequest> packUsers)
|
|||
//{
|
|||
// return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/AddTaskPeoples", packUsers
|
|||
// , null, HttpMethod.Post);
|
|||
//}
|
|||
|
|||
|
|||
//public ApiResponse<object> AddConsumables(long taskId, long[] consumableIds)
|
|||
//{
|
|||
// return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/AddConsumables", new AddConsumableRequest
|
|||
// {
|
|||
// TaskId= taskId,
|
|||
// ConsumableIds = consumableIds
|
|||
// }
|
|||
// , null, HttpMethod.Post);
|
|||
//}
|
|||
} |
|||
|
|||
public class AddConsumableRequest |
|||
{ |
|||
public long TaskId { get; set; } |
|||
public long[] ConsumableIds { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 上传服务
|
|||
/// </summary>
|
|||
public class UploadServiceRequest |
|||
{ |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
/// <summary>
|
|||
/// 耗材ids
|
|||
/// </summary>
|
|||
public string ConsumableIds { get; set; } |
|||
/// <summary>
|
|||
/// 耗材数量
|
|||
/// </summary>
|
|||
public string ConsumableNos { get; set; } |
|||
/// <summary>
|
|||
/// 工序ids
|
|||
/// </summary>
|
|||
public string WorkProcessIds { get; set; } |
|||
/// <summary>
|
|||
/// 工序数量
|
|||
/// </summary>
|
|||
public string WorkProcessNos { get; set; } |
|||
/// <summary>
|
|||
/// 增值服务ids
|
|||
/// </summary>
|
|||
public string IncreateServiceIds { get; set; } |
|||
/// <summary>
|
|||
/// 增值服务数量
|
|||
/// </summary>
|
|||
public string IncreateServiceNos { get; set; } |
|||
/// <summary>
|
|||
/// 任务单件费用
|
|||
/// </summary>
|
|||
public decimal SingleFees { get; set; } |
|||
/// <summary>
|
|||
/// 任务总费用
|
|||
/// </summary>
|
|||
public decimal AllFees { get; set; } |
|||
|
|||
|
|||
public PersonTaskModel[] PersonTaskModels { get; set; } |
|||
|
|||
//public IncreateMemberModel[] IncreateMembers { get; set; }
|
|||
|
|||
//public ProcessMemberModel[] ProcessMembers { get; set; }
|
|||
} |
|||
|
|||
public class PersonTaskModel |
|||
{ |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包人
|
|||
/// </summary>
|
|||
public string PackUserId { get; set; } |
|||
/// <summary>
|
|||
/// 增值服务ids
|
|||
/// </summary>
|
|||
public string IncreateServiceIds { get; set; } |
|||
/// <summary>
|
|||
/// 增值服务数量
|
|||
/// </summary>
|
|||
public string IncreateServiceNos { get; set; } |
|||
/// <summary>
|
|||
/// 工序ids
|
|||
/// </summary>
|
|||
public string WorkProcessIds { get; set; } |
|||
/// <summary>
|
|||
/// 工序数量
|
|||
/// </summary>
|
|||
public string WorkProcessNos { get; set; } |
|||
/// <summary>
|
|||
/// 总费用
|
|||
/// </summary>
|
|||
public decimal AllFees { get; set; } |
|||
/// <summary>
|
|||
/// 时间
|
|||
/// </summary>
|
|||
public DateTime CreateTime { get; set; } = DateTime.Now; |
|||
} |
|||
|
|||
|
|||
|
|||
public class ConsumableTaskModel |
|||
{ |
|||
public decimal Price { get; set; } |
|||
/// <summary>
|
|||
/// 耗材服务id
|
|||
/// </summary>
|
|||
public long ConsumableId { get; set; } |
|||
/// <summary>
|
|||
/// 耗材服务数量
|
|||
/// </summary>
|
|||
public int ConsumableCount { get; set; } |
|||
} |
|||
|
|||
public class IncreateMemberModel |
|||
{ |
|||
public decimal Price { get; set; } |
|||
|
|||
public string UserId { get; set; } |
|||
/// <summary>
|
|||
/// 增值服务Id
|
|||
/// </summary>
|
|||
public long IncreateId { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public int IncreateCount { get; set; } |
|||
|
|||
} |
|||
public class ProcessMemberModel |
|||
{ |
|||
public decimal Price { get; set; } |
|||
public string UserId { get; set; } |
|||
/// <summary>
|
|||
/// 工序服务Id
|
|||
/// </summary>
|
|||
public long ProcessId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工序服务数量
|
|||
/// </summary>
|
|||
public int ProcessCount { get; set; } |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
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 |
|||
{ |
|||
public class WorkProcessService : BaseApiService, IDenpendency |
|||
{ |
|||
public WorkProcessService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
public ApiResponse<WorkProcessModel[]> SearchAll() |
|||
{ |
|||
return SendRequest<WorkProcessModel[]>(globalContext.QKApiHost, "api/WorkProcess/SearchAll", |
|||
null |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
public ApiResponse<object> Add(WorkProcessModel consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/WorkProcess/Add", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
public ApiResponse<object> Edit(WorkProcessModel consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/WorkProcess/Edit", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<object> Deleted(long id) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/WorkProcess/Deleted", |
|||
new |
|||
{ |
|||
id = id |
|||
} |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
//public ApiResponse<ConsumableResponse> Search(ConsumableRequest consumable)
|
|||
//{
|
|||
// return SendRequest<ConsumableResponse>(globalContext.QKApiHost, "api/WorkProcess/Search",
|
|||
// consumable
|
|||
// , null, HttpMethod.Post);
|
|||
//}
|
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
using BBWY.Client.Models; |
|||
using EnumsNET; |
|||
using SixLabors.ImageSharp; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Globalization; |
|||
using System.Reflection; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Data; |
|||
|
|||
namespace BBWY.Client.Converters |
|||
{ |
|||
internal class EnumToColorConverter : IValueConverter |
|||
{ |
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
try |
|||
{ |
|||
if (value == null) return DependencyProperty.UnsetValue; |
|||
Assembly assem = Assembly.GetExecutingAssembly(); |
|||
Type type = assem.GetType(parameter.ToString()); |
|||
var enumName = Enum.Parse(type, value.ToString()); |
|||
if (value.ToString() == TaskState.已到货.GetName()) |
|||
{ |
|||
return "#C1FFC1"; |
|||
} |
|||
if (value.ToString() == "部分到货") |
|||
{ |
|||
return "#FFDEAD"; |
|||
} |
|||
if (value.ToString() == "未到货") |
|||
{ |
|||
return "#FFDAB9"; |
|||
|
|||
} |
|||
return enumName; |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
// Logger.Error(nameof(TemplateTypeConverter), e);
|
|||
return string.Empty; |
|||
} |
|||
} |
|||
|
|||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Globalization; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
|
|||
namespace BBWY.Client.Converters |
|||
{ |
|||
public class IntToStringConverter : IValueConverter |
|||
{ |
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
|
|||
if (value == null) { |
|||
return "4号箱子"; |
|||
} |
|||
if (value.ToString()=="0") |
|||
{ |
|||
return "自带"; |
|||
} |
|||
return value.ToString()+ parameter.ToString(); |
|||
|
|||
} |
|||
|
|||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Globalization; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
|
|||
namespace BBWY.Client.Converters |
|||
{ |
|||
public class StringToColorConvter : IValueConverter |
|||
{ |
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
|
|||
|
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
|
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,327 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Text; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWY.Client.Helpers |
|||
{ |
|||
public class BartenderHelper |
|||
{ |
|||
#region BarTender打印方法
|
|||
private static BarTender.Application btApp = new BarTender.Application(); |
|||
private static BarTender.Format btFormat = new BarTender.Format(); |
|||
public string TemplateFile { set; get; } |
|||
public string ErrorMsg { set; get; } |
|||
public bool Status { set; get; } |
|||
/// <summary>
|
|||
/// 使用 BarTender进行打印,批量打印
|
|||
/// </summary>
|
|||
/// <param name="labelName"> BarTender模板标签</param>
|
|||
/// <param name="labelParamsValuesList">打印数据</param>
|
|||
/// <param name="msg">回调消息</param>
|
|||
/// <param name="printQty">打印数量</param>
|
|||
/// <returns>打印OK true</returns>
|
|||
public bool BTPrint(string labelName, Dictionary<string, string> labelParamsValues, out string msg, int printQty = 1, string printer = "Deli DL-730C(NEW)") |
|||
{ |
|||
try |
|||
{ |
|||
bool checkLabelVar = true; |
|||
string tmpMsg = ""; |
|||
this.TemplateFile = labelName; |
|||
|
|||
if (!File.Exists(TemplateFile)) |
|||
{ |
|||
msg = "Error:Label File Not Exists" + TemplateFile; |
|||
this.ErrorMsg = msg; |
|||
return false; |
|||
} |
|||
if (!string.IsNullOrEmpty(printer)) |
|||
{ |
|||
bool printerFlag = false; |
|||
foreach (string sPrint in System.Drawing.Printing.PrinterSettings.InstalledPrinters)//获取所有打印机名称
|
|||
{ |
|||
if (sPrint.Equals(printer)) |
|||
{ |
|||
printerFlag = true; |
|||
} |
|||
} |
|||
|
|||
if (!printerFlag) |
|||
{ |
|||
msg = "Error:Printer Name Error"; |
|||
return false; |
|||
} |
|||
|
|||
|
|||
} |
|||
//找到打印模板的标签页
|
|||
btFormat = btApp.Formats.Open(labelName, false, ""); |
|||
if (!string.IsNullOrEmpty(printer)) |
|||
{ |
|||
btFormat.Printer = printer; |
|||
} |
|||
if (btApp != null) |
|||
{ |
|||
//btFormat.IdenticalCopiesOfLabel = printQty;
|
|||
//btFormat.PrintOut(true, false);
|
|||
|
|||
//取模板所有的值
|
|||
string strBT = btFormat.NamedSubStrings.GetAll("#", "$"); |
|||
|
|||
//将模板所有值进行拆分
|
|||
strBT = strBT.Substring(0, strBT.Length - 1); |
|||
string[] strBTValue = strBT.Split(new char[] { '$' }); |
|||
|
|||
//循环将模板的值写入lbldicVar中
|
|||
Dictionary<string, string> lbldicVar = new Dictionary<string, string>(); |
|||
for (int i = 0; i < strBTValue.Length; i++) |
|||
{ |
|||
string[] cc = strBTValue[i].Split(new char[] { '#' }); |
|||
|
|||
lbldicVar.Add(cc[0].ToString(), cc[1].ToString()); //0是模板的参数 1是参数值
|
|||
} |
|||
if (labelParamsValues.Count > 0) |
|||
{ |
|||
foreach (var item in lbldicVar) |
|||
{ |
|||
if (labelParamsValues.Count(q => q.Key.ToUpper() == item.Key.ToUpper()) == 0) |
|||
{ |
|||
tmpMsg = "数据源缺少参数: " + item.Key; |
|||
if (checkLabelVar) |
|||
{ |
|||
this.ErrorMsg = tmpMsg; |
|||
checkLabelVar = false; |
|||
} |
|||
else |
|||
{ |
|||
this.ErrorMsg = this.ErrorMsg + (char)10 + tmpMsg; |
|||
} |
|||
} |
|||
} |
|||
if (!checkLabelVar) |
|||
{ |
|||
msg = this.ErrorMsg; |
|||
this.Status = false; |
|||
return false; |
|||
} |
|||
foreach (var param in labelParamsValues.Keys) |
|||
{ |
|||
if (lbldicVar.Keys.Count(q => q.ToUpper() == param.ToUpper()) > 0) |
|||
{ |
|||
var labvar = lbldicVar.Keys.First(q => q.ToUpper() == param.ToUpper()); |
|||
|
|||
if (string.IsNullOrEmpty(labelParamsValues[param])) |
|||
{ |
|||
tmpMsg = "数据源参数值为空:" + labvar; |
|||
if (checkLabelVar) |
|||
{ |
|||
this.ErrorMsg = tmpMsg; |
|||
checkLabelVar = false; |
|||
} |
|||
else |
|||
{ |
|||
this.ErrorMsg = this.ErrorMsg + (char)10 + tmpMsg; |
|||
} |
|||
} |
|||
btFormat.SetNamedSubStringValue(param, labelParamsValues[param]); |
|||
} |
|||
} |
|||
if (!checkLabelVar) |
|||
{ |
|||
msg = this.ErrorMsg; |
|||
this.Status = false; |
|||
return false; |
|||
} |
|||
btFormat.IdenticalCopiesOfLabel = printQty; |
|||
|
|||
//第二个false设置打印时是否跳出打印属性
|
|||
btFormat.PrintOut(true, false); |
|||
//退出是是否保存标签
|
|||
btFormat.Close(BarTender.BtSaveOptions.btSaveChanges); |
|||
//lblDoc.FormFeed();
|
|||
msg = "OK"; |
|||
this.ErrorMsg = msg; |
|||
this.Status = true; |
|||
return true; |
|||
} |
|||
else |
|||
{ |
|||
msg = "Print Data is null"; |
|||
this.ErrorMsg = msg; |
|||
this.Status = false; |
|||
return false; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
msg = "Error:CodeSoft Application can't boot up"; |
|||
this.ErrorMsg = msg; |
|||
this.Status = false; |
|||
return false; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
msg = ex.Message + ex.InnerException; |
|||
this.ErrorMsg = msg; |
|||
this.Status = false; |
|||
return false; |
|||
} |
|||
finally |
|||
{ |
|||
if (btApp != null) |
|||
{ |
|||
btApp.Quit(BarTender.BtSaveOptions.btSaveChanges);//界面退出时同步退出bartender进程
|
|||
//lblApp.Documents.CloseAll(true);
|
|||
//lblDoc = null;
|
|||
} |
|||
GC.Collect(); |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 数据库调用打印
|
|||
/// <summary>
|
|||
/// 打印从文本数据库中打
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public bool BTPrintByDataBase(string path, string filePath, string printer = "") |
|||
{ |
|||
|
|||
try |
|||
{ |
|||
BarTender.Application btapp; |
|||
BarTender.Format btformat; |
|||
btapp = new BarTender.Application(); |
|||
btformat = btapp.Formats.Open(path, false, ""); |
|||
BarTender.Database database = btformat.Databases.GetDatabase(1); |
|||
if (!string.IsNullOrEmpty(printer)) |
|||
{ |
|||
btformat.Printer = printer; |
|||
} |
|||
|
|||
database.TextFile.FileName = filePath; |
|||
|
|||
//database.SQLStatement += $" where printID='{printId}' order by RIGHT(Var1,7)";//填写SQL语句附加条件
|
|||
//database.Password = VSLoginInfo.SQLPassword;
|
|||
//database.User = VSLoginInfo.SQLUser;
|
|||
btformat.PrintOut(false, false); //第二个参数设置是否跳出打印属性;
|
|||
btapp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);//退出时同步退出bartender进程(SQL条件会改变,不更新模板信息)
|
|||
|
|||
} |
|||
catch |
|||
{ |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 打印从文本数据库中打
|
|||
/// </summary>
|
|||
/// <param name="templatepath">模板地址</param>
|
|||
/// <param name="dataLine">数据行,一行一个标签,第一行为标题,多列逗号分割</param>
|
|||
/// <returns></returns>
|
|||
public bool BTPrintByDataBase(string templatepath, List<string> dataLine, string printer = "") |
|||
{ |
|||
|
|||
try |
|||
{ |
|||
BarTender.Application btapp; |
|||
BarTender.Format btformat; |
|||
btapp = new BarTender.Application(); |
|||
var filepath = WriteLog(dataLine, "", Guid.NewGuid().ToString()); |
|||
btformat = btapp.Formats.Open(templatepath, false, ""); |
|||
BarTender.Database database = btformat.Databases.GetDatabase(1); |
|||
if (!string.IsNullOrEmpty(printer)) |
|||
{ |
|||
btformat.Printer = printer; |
|||
} |
|||
database.TextFile.FileName = filepath; |
|||
|
|||
//database.SQLStatement += $" where printID='{printId}' order by RIGHT(Var1,7)";//填写SQL语句附加条件
|
|||
//database.Password = VSLoginInfo.SQLPassword;
|
|||
//database.User = VSLoginInfo.SQLUser;
|
|||
btformat.PrintOut(false, false); //第二个参数设置是否跳出打印属性;
|
|||
btapp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);//退出时同步退出bartender进程(SQL条件会改变,不更新模板信息)
|
|||
|
|||
} |
|||
catch |
|||
{ |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
/// <summary>
|
|||
/// 写文本
|
|||
/// </summary>
|
|||
/// <param name="logStr"></param>
|
|||
public static string WriteLog(List<string> lines, string fileDirectory = "", string guid = "") |
|||
{ |
|||
|
|||
try |
|||
{ |
|||
string path1 = Environment.CurrentDirectory + Path.Combine("/printFile/") + fileDirectory; |
|||
if (!Directory.Exists(path1)) |
|||
{ |
|||
//创建索引目录
|
|||
Directory.CreateDirectory(path1); |
|||
} |
|||
string path = path1 + "/" + DateTime.Now.ToString("yyyy-MM-dd") + guid + ".txt"; |
|||
FileStream stream = null; |
|||
if (File.Exists(path)) |
|||
{ |
|||
File.Delete(path); |
|||
} |
|||
stream = new FileStream(path, FileMode.Create); |
|||
|
|||
StreamWriter writer = new StreamWriter(stream); |
|||
for (var i = 0; i < lines.Count; i++) |
|||
{ |
|||
writer.Write(lines[i] + Environment.NewLine); |
|||
|
|||
} |
|||
writer.Flush(); |
|||
writer.Close(); |
|||
stream.Close(); |
|||
return path; |
|||
} |
|||
catch |
|||
{ |
|||
} |
|||
finally |
|||
{ |
|||
|
|||
} |
|||
return ""; |
|||
} |
|||
#endregion
|
|||
public static void ExportToFile(string btFileName, Dictionary<string, string> data) |
|||
{ |
|||
//BarTender.Application btApp = new BarTender.Application();
|
|||
//BarTender.Format btFormat;
|
|||
|
|||
btFormat = btApp.Formats.Open(btFileName); |
|||
|
|||
foreach (var key in data.Keys) |
|||
{ |
|||
|
|||
btFormat.SetNamedSubStringValue(key, data[key]); |
|||
} |
|||
|
|||
|
|||
//btFormat.SaveAs(btFileName, true);
|
|||
|
|||
btFormat.ExportToFile(@"E:/temp.jpg", "jpg", BarTender.BtColors.btColors24Bit, BarTender.BtResolution.btResolutionPrinter, BarTender.BtSaveOptions.btSaveChanges); |
|||
btFormat.Close(BarTender.BtSaveOptions.btSaveChanges); |
|||
btApp.Quit(BarTender.BtSaveOptions.btSaveChanges); |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,122 @@ |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http.Headers; |
|||
using System.Net.Http; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Helpers |
|||
{ |
|||
public class HttpClientHelper |
|||
{ |
|||
public HttpClientHelper(string baseAddr) |
|||
{ |
|||
this.BaseAddr = baseAddr; |
|||
} |
|||
public string BaseAddr { get; set; } |
|||
|
|||
public string Get(string Url) |
|||
{ |
|||
HttpClient client = new HttpClient(); |
|||
//设置 API的 基地址
|
|||
client.BaseAddress = new Uri(BaseAddr); |
|||
//设置 默认请求头ACCEPT
|
|||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); |
|||
//发送GET请求
|
|||
HttpResponseMessage msg = client.GetAsync(Url).Result; |
|||
//判断结果是否成功
|
|||
if (msg.IsSuccessStatusCode) |
|||
{ |
|||
//返回响应结果
|
|||
return msg.Content.ReadAsStringAsync().Result; |
|||
} |
|||
//返回空字符串,表示响应错误
|
|||
return ""; |
|||
} |
|||
|
|||
public string Delete(string Url) |
|||
{ |
|||
HttpClient client = new HttpClient(); |
|||
//设置 API的 基地址
|
|||
client.BaseAddress = new Uri(BaseAddr); |
|||
//设置 默认请求头ACCEPT
|
|||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); |
|||
//发送GET请求
|
|||
HttpResponseMessage msg = client.DeleteAsync(Url).Result; |
|||
//判断结果是否成功
|
|||
if (msg.IsSuccessStatusCode) |
|||
{ |
|||
//返回响应结果
|
|||
return msg.Content.ReadAsStringAsync().Result; |
|||
} |
|||
//返回空字符串,表示响应错误
|
|||
return ""; |
|||
} |
|||
public string Post(string Url, string JsonData) |
|||
{ |
|||
HttpClient client = new HttpClient(); |
|||
//设置 API的 基地址
|
|||
client.BaseAddress = new Uri(BaseAddr); |
|||
//设置 默认请求头ACCEPT
|
|||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); |
|||
//设置消息体
|
|||
HttpContent content = new StringContent(JsonData); |
|||
content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); |
|||
//发送Post请求
|
|||
HttpResponseMessage msg = client.PostAsync(Url, content).Result; |
|||
//判断结果是否成功
|
|||
if (msg.IsSuccessStatusCode) |
|||
{ |
|||
//返回响应结果
|
|||
return msg.Content.ReadAsStringAsync().Result; |
|||
} |
|||
//返回空字符串,表示响应错误
|
|||
return ""; |
|||
} |
|||
|
|||
public string Put(string Url, string JsonData) |
|||
{ |
|||
HttpClient client = new HttpClient(); |
|||
//设置 API的 基地址
|
|||
client.BaseAddress = new Uri(BaseAddr); |
|||
//设置 默认请求头ACCEPT
|
|||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); |
|||
//设置消息体
|
|||
HttpContent content = new StringContent(JsonData); |
|||
content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); |
|||
//发送Post请求
|
|||
HttpResponseMessage msg = client.PutAsync(Url, content).Result; |
|||
//判断结果是否成功
|
|||
if (msg.IsSuccessStatusCode) |
|||
{ |
|||
//返回响应结果
|
|||
return msg.Content.ReadAsStringAsync().Result; |
|||
} |
|||
//返回空字符串,表示响应错误
|
|||
return ""; |
|||
} |
|||
|
|||
public T Request<T>(string type, string url, object data = null) |
|||
{ |
|||
string json = JsonConvert.SerializeObject(data); |
|||
string result = ""; |
|||
switch (type) |
|||
{ |
|||
case "Get": |
|||
result = Get(url); |
|||
break; |
|||
case "Post": |
|||
result = Post(url, json); |
|||
break; |
|||
case "Put": |
|||
result = Put(url, json); |
|||
break; |
|||
case "Delete": |
|||
result = Delete(url); |
|||
break; |
|||
} |
|||
return JsonConvert.DeserializeObject<T>(result); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
public class BarCodeRequest |
|||
{ |
|||
|
|||
|
|||
///// <summary>
|
|||
///// 条形码id
|
|||
///// </summary>
|
|||
//public long Id { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuId(条形码号=POP+SkuId)
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条形码模板
|
|||
/// </summary>
|
|||
public BarcodeLabelModel LabelModel { get; set; } |
|||
|
|||
///// <summary>
|
|||
///// 型号
|
|||
///// </summary>
|
|||
//public string ModelNo { get; set; }
|
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
public class CerRequest |
|||
{ |
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 材质
|
|||
/// </summary>
|
|||
public string Shader { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行标准
|
|||
/// </summary>
|
|||
public string ExcuteStander { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 生产商
|
|||
/// </summary>
|
|||
public string ProductShop { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 地址
|
|||
/// </summary>
|
|||
public string ProductAdress { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 型号(货号)
|
|||
/// </summary>
|
|||
public string ProductNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否含3cLogo(0是 ,1否)
|
|||
/// </summary>
|
|||
public int IsLogo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编号
|
|||
/// </summary>
|
|||
public string FactoryNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证模板
|
|||
/// </summary>
|
|||
public int LabelModel { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,68 @@ |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.Views.PackTask; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
|
|||
public class ConsumableResponse |
|||
{ |
|||
public int OrderCount { get; set; } |
|||
public ConsumableModel[] Consumables { get; set; } |
|||
} |
|||
|
|||
public class ConsumableSearchRequest |
|||
{ |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
public string Name { get; set; } |
|||
/// <summary>
|
|||
/// 页面1
|
|||
/// </summary>
|
|||
public int? PageIndex { get; set; } |
|||
/// <summary>
|
|||
/// 单页数量
|
|||
/// </summary>
|
|||
public int? PageSize { get; set; } |
|||
} |
|||
|
|||
public class ConsuableRequest |
|||
{ |
|||
/// <summary>
|
|||
/// id
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
public string Name { get; set; } |
|||
/// <summary>
|
|||
/// 价格
|
|||
/// </summary>
|
|||
public decimal Price { get; set; } |
|||
/// <summary>
|
|||
/// 重量
|
|||
/// </summary>
|
|||
public double? Weigth { get; set; } |
|||
/// <summary>
|
|||
/// 长度
|
|||
/// </summary>
|
|||
public double? Length { get; set; } |
|||
/// <summary>
|
|||
/// 宽度
|
|||
/// </summary>
|
|||
public double? Width { get; set; } |
|||
/// <summary>
|
|||
/// 高度
|
|||
/// </summary>
|
|||
public double? Heigth { get; set; } |
|||
/// <summary>
|
|||
/// 备注
|
|||
/// </summary>
|
|||
public string Remark { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,92 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
public class CreateTaskRequest |
|||
{ |
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
/// <summary>
|
|||
/// sku数量
|
|||
/// </summary>
|
|||
public int SkuCount { get; set; } |
|||
/// <summary>
|
|||
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
|||
/// </summary>
|
|||
public int Availability { get; set; } |
|||
/// <summary>
|
|||
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
|||
/// </summary>
|
|||
public int PositionType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public int PackType { get; set; } |
|||
/// <summary>
|
|||
/// 配件数量
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
/// <summary>
|
|||
/// sku配件名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public int BasicPack { get; set; } |
|||
/// <summary>
|
|||
/// 增量耗材
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
/// <summary>
|
|||
/// 增量耗材
|
|||
/// </summary>
|
|||
public int Increment2 { get; set; } |
|||
|
|||
//条形码 合格证数据
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 注意事项
|
|||
/// </summary>
|
|||
public string MarkMessage { get; set; } |
|||
/// <summary>
|
|||
/// 店铺
|
|||
/// </summary>
|
|||
public string ShopId { get; set; } |
|||
/// <summary>
|
|||
/// 需求方创建日期
|
|||
/// </summary>
|
|||
public DateTime CreateTime { get; set; } |
|||
/// <summary>
|
|||
/// 对接人
|
|||
/// </summary>
|
|||
public string UserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
///条形码Id
|
|||
/// </summary>
|
|||
public long? BarCodeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证Id
|
|||
/// </summary>
|
|||
public long? CertificateId { get; set; } |
|||
/// <summary>
|
|||
/// 合格证位置
|
|||
/// </summary>
|
|||
public int? CertificatePosition { get; set; } |
|||
|
|||
public Worry IsWorry { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
public class PackUserRequest |
|||
{ |
|||
public long TaskId { get; set; } |
|||
public string PackUserId { get; set; } |
|||
public int FeesItemId { get; set; } |
|||
public int FeesTypeId { get; set; } |
|||
public decimal PackNumber { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// 服务数据展示
|
|||
/// </summary>
|
|||
public class FeesItemResponse : NotifyObject |
|||
{ |
|||
private List<ServiceItemResponse> serviceList = new List<ServiceItemResponse>(); |
|||
|
|||
public List<ServiceItemResponse> ServiceList { get => serviceList; set { Set(ref serviceList, value); } } |
|||
|
|||
public decimal AllFees { get=> allFees; set { Set(ref allFees, value); } } |
|||
private decimal allFees; |
|||
|
|||
public decimal SingleFees { get => singleFees; set { Set(ref singleFees, value); } } |
|||
private decimal singleFees; |
|||
|
|||
|
|||
public decimal TaskId { get => taskId; set { Set(ref taskId, value); } } |
|||
private decimal taskId; |
|||
} |
|||
|
|||
public enum ServiceType |
|||
{ |
|||
增值服务 = 0, |
|||
打包服务 = 1, |
|||
耗材服务 = 2 |
|||
} |
|||
|
|||
public class ServiceItemResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 0增值服务 1打包服务 2耗材服务
|
|||
/// </summary>
|
|||
public ServiceType ServiceType { get; set; } |
|||
/// <summary>
|
|||
/// 服务项目
|
|||
/// </summary>
|
|||
public string ItemName { get; set; } |
|||
/// <summary>
|
|||
/// 价格
|
|||
/// </summary>
|
|||
public decimal? ItemPrice { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public int? ItemCount { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
using BBWY.Client.Models.PackTask; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
public class PackServiceResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 增值服务数据
|
|||
/// </summary>
|
|||
public List<PackItemModelResponse> IncreateList { get; set; } |
|||
/// <summary>
|
|||
///工序服务数据
|
|||
/// </summary>
|
|||
public List<PackItemModelResponse> PackList { get; set; } |
|||
/// <summary>
|
|||
/// 耗材服务数据
|
|||
/// </summary>
|
|||
public List<PackItemModelResponse> ConsumableServiceList { get; set; } |
|||
} |
|||
|
|||
public class PackItemModelResponse |
|||
{ |
|||
|
|||
public string ItemName { get; set; } |
|||
/// <summary>
|
|||
/// Member.userId
|
|||
/// </summary>
|
|||
public string SelectUserId { get; set; } |
|||
/// <summary>
|
|||
/// 选中的服务Id
|
|||
/// </summary>
|
|||
public long SelectId { get; set; } |
|||
/// <summary>
|
|||
/// 用户名
|
|||
/// </summary>
|
|||
public string MemberName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public int ItemCount { get; set; } |
|||
} |
|||
|
|||
} |
@ -0,0 +1,423 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows.Automation.Peers; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
public class PackTaskResultResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 查询总数据(判断总页数)
|
|||
/// </summary>
|
|||
public int TotalCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 页面返回的数据
|
|||
/// </summary>
|
|||
public GetPackTaskDTO[] Items { get; set; } |
|||
} |
|||
public class GetPackTaskDTO |
|||
{ |
|||
/// <summary>
|
|||
/// SKU标题
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
/// <summary>
|
|||
/// 图片链接
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 需求方创建日期
|
|||
/// </summary>
|
|||
public DateTime CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 任务状态(未完成=0,已完成=1,)
|
|||
/// </summary>
|
|||
public int TaskStatus { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 需求方团队
|
|||
/// </summary>
|
|||
public string DepartmentName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 需求方店铺
|
|||
/// </summary>
|
|||
public string ShopName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductItemNum { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 对接人
|
|||
/// </summary>
|
|||
public string UserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包人
|
|||
/// </summary>
|
|||
public string[] PackUserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku数量
|
|||
/// </summary>
|
|||
public int SkuCount { get; set; } |
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public int PackType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
|||
/// </summary>
|
|||
public int PositionType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public int BasicPack { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 增量1()
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 增量2()
|
|||
/// </summary>
|
|||
public int? Increment2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工序道数
|
|||
/// </summary>
|
|||
public int? ProcessCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
|||
/// </summary>
|
|||
public int Availability { get; set; } |
|||
|
|||
//todo: 条形码数据 合格证数据
|
|||
|
|||
///// <summary>
|
|||
///// 打包费用
|
|||
///// </summary>
|
|||
//public FeesItemTypeDTO FeesItemTypeDTO { get; set; }
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
public FeesItemResponse FeesItemResponse { get; set; } |
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public int? CertificatePosition { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 箱子耗材(自带=0,4-13号纸箱=1-10,)
|
|||
/// </summary>
|
|||
public int? BoxConsumables { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku配件名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 气泡纸耗材(长=0,宽=1)
|
|||
/// </summary>
|
|||
public int? AirConsumables { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
public string MarkMessage { get; set; } |
|||
|
|||
public BarCodeModel BarCodeDTO { get; set; } |
|||
public CertificateModel certificate { get; set; } |
|||
} |
|||
|
|||
//public class FeesItemTypeDTO :NotifyObject
|
|||
//{
|
|||
|
|||
|
|||
// private bool isPaperBox;
|
|||
// public bool IsPaperBox { get => isPaperBox; set { Set(ref isPaperBox, value); } }
|
|||
|
|||
// private bool isBoxNumber;
|
|||
// public bool IsBoxNumber { get => isBoxNumber; set { Set(ref isBoxNumber, value); } }
|
|||
|
|||
// private bool isAcceptGoods;
|
|||
// public bool IsAcceptGoods { get=>isAcceptGoods; set { Set(ref isAcceptGoods, value); } }
|
|||
|
|||
|
|||
// private bool isSendGoods;
|
|||
// /// <summary>
|
|||
// /// 装箱 送货
|
|||
// /// </summary>
|
|||
// public bool IsSendGoods { get=> isSendGoods; set { Set(ref isSendGoods, value); } }
|
|||
|
|||
// private bool isRuturnGoods;
|
|||
// /// <summary>
|
|||
// /// 退货质检
|
|||
// /// </summary>
|
|||
// public bool IsRuturnGoods { get => isRuturnGoods; set { Set(ref isRuturnGoods, value); } }
|
|||
|
|||
// private bool isUpdatePack;
|
|||
// /// <summary>
|
|||
// /// 更换包装
|
|||
// /// </summary>
|
|||
// public bool IsUpdatePack { get => isUpdatePack; set { Set(ref isUpdatePack, value); } }
|
|||
|
|||
// private bool isUnpacking;
|
|||
// /// <summary>
|
|||
// /// 拆套
|
|||
// /// </summary>
|
|||
// public bool IsUnpacking { get => isUnpacking; set { Set(ref isUnpacking, value); } }
|
|||
|
|||
// private bool isBasicPackFees;
|
|||
// /// <summary>
|
|||
// /// 基础包装费
|
|||
// /// </summary>
|
|||
// public bool IsBasicPackFees { get => isBasicPackFees; set { Set(ref isBasicPackFees, value); } }
|
|||
|
|||
// private bool isBoxPackFees;
|
|||
// /// <summary>
|
|||
// /// 箱子包装费
|
|||
// /// </summary>
|
|||
// public bool IsBoxPackFees { get => isBoxPackFees; set { Set(ref isBoxPackFees, value); } }
|
|||
|
|||
// private bool isExpressPackFees;
|
|||
// /// <summary>
|
|||
// /// 快递袋包装费
|
|||
// /// </summary>
|
|||
// public bool IsExpressPackFees { get => isExpressPackFees; set { Set(ref isExpressPackFees, value); } }
|
|||
|
|||
// private bool isExpressCloseSideFees;
|
|||
// /// <summary>
|
|||
// /// 快递袋封边
|
|||
// /// </summary>
|
|||
// public bool IsExpressCloseSideFees { get => isExpressCloseSideFees; set { Set(ref isExpressCloseSideFees, value); } }
|
|||
|
|||
// private bool isAirPaperPackFees;
|
|||
// /// <summary>
|
|||
// /// 气泡纸包装费
|
|||
// /// </summary>
|
|||
// public bool IsAirPaperPackFees { get => isAirPaperPackFees; set { Set(ref isAirPaperPackFees, value); } }
|
|||
|
|||
// private bool isAirBagPackFees;
|
|||
// /// <summary>
|
|||
// /// 气泡袋包装费
|
|||
// /// </summary>
|
|||
// public bool IsAirBagPackFees { get => isAirBagPackFees; set { Set(ref isAirBagPackFees, value); } }
|
|||
|
|||
// private bool isPOPBagPackFees;
|
|||
// /// <summary>
|
|||
// /// POP包装费
|
|||
// /// </summary>
|
|||
// public bool IsPOPBagPackFees { get => isPOPBagPackFees; set { Set(ref isPOPBagPackFees, value); } }
|
|||
|
|||
// private bool isTapePackFees;
|
|||
// /// <summary>
|
|||
// /// 胶带工序
|
|||
// /// </summary>
|
|||
// public bool IsTapePackFees { get => isTapePackFees; set { Set(ref isTapePackFees, value); } }
|
|||
|
|||
// private bool isIncreateGoods;
|
|||
// /// <summary>
|
|||
// ///增量配件
|
|||
// /// </summary>
|
|||
// public bool IsIncreateGoods { get => isIncreateGoods; set { Set(ref isIncreateGoods, value); } }
|
|||
|
|||
|
|||
|
|||
// private bool isAirPaper;
|
|||
// /// <summary>
|
|||
// /// 气泡纸
|
|||
// /// </summary>
|
|||
// public bool IsAirPaper { get => isAirPaper; set { Set(ref isAirPaper, value); } }
|
|||
|
|||
// private bool isTape;
|
|||
// /// <summary>
|
|||
// /// 胶带
|
|||
// /// </summary>
|
|||
// public bool IsTape { get => isTape; set { Set(ref isTape, value); } }
|
|||
|
|||
// public void SetAllVisitity()
|
|||
// {
|
|||
// IsPaperBox = SetVisitity( PaperBox);
|
|||
// IsBoxNumber = SetVisitity(Convert.ToDecimal(BoxNumber) );
|
|||
|
|||
// IsAcceptGoods = SetVisitity(AcceptGoods);
|
|||
// IsSendGoods = SetVisitity(SendGoods);
|
|||
// IsRuturnGoods = SetVisitity(RuturnGoods);
|
|||
// IsUpdatePack = SetVisitity(UpdatePack);
|
|||
// IsUnpacking = SetVisitity(Unpacking);
|
|||
|
|||
|
|||
// IsBasicPackFees = SetVisitity(BasicPackFees);
|
|||
// IsBoxPackFees = SetVisitity(BoxPackFees );
|
|||
// IsExpressPackFees = SetVisitity(ExpressPackFees);
|
|||
// IsExpressCloseSideFees = SetVisitity(ExpressCloseSideFees );
|
|||
// IsAirPaperPackFees = SetVisitity(AirPaperPackFees);
|
|||
// IsAirBagPackFees = SetVisitity(AirBagPackFees);
|
|||
// IsPOPBagPackFees = SetVisitity(POPBagPackFees);
|
|||
// IsTapePackFees = SetVisitity(TapePackFees);
|
|||
// IsIncreateGoods = SetVisitity(IncreateGoods);
|
|||
// IsAirPaper = SetVisitity(AirPaper);
|
|||
// IsTape = SetVisitity(Tape);
|
|||
// }
|
|||
|
|||
// private bool SetVisitity( decimal? item )
|
|||
// {
|
|||
// if (item != null )
|
|||
// {
|
|||
// return false;
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// return true;// 无数据隐藏
|
|||
// }
|
|||
// }
|
|||
|
|||
|
|||
// /// <summary>
|
|||
// /// 箱子价格
|
|||
// /// </summary>
|
|||
// public decimal? PaperBox { get; set; }
|
|||
// public decimal PaperBoxNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 第几号箱子
|
|||
// /// </summary>
|
|||
// public int BoxNumber { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 收货 卸货
|
|||
// /// </summary>
|
|||
// public decimal? AcceptGoods { get; set; }
|
|||
// public decimal AcceptGoodsNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 装箱 送货
|
|||
// /// </summary>
|
|||
// public decimal? SendGoods { get; set; }
|
|||
// public decimal SendGoodsNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 退货质检
|
|||
// /// </summary>
|
|||
// public decimal? RuturnGoods { get; set; }
|
|||
// public decimal RuturnGoodsNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 更换包装
|
|||
// /// </summary>
|
|||
// public decimal? UpdatePack { get; set; }
|
|||
// public decimal UpdatePackNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 拆套
|
|||
// /// </summary>
|
|||
// public decimal? Unpacking { get; set; }
|
|||
// public decimal UnpackingNo { get; set; }
|
|||
|
|||
|
|||
|
|||
// /// <summary>
|
|||
// /// 基础包装费
|
|||
// /// </summary>
|
|||
// public decimal? BasicPackFees { get; set; }
|
|||
// public decimal BasicPackFeesNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 箱子包装费
|
|||
// /// </summary>
|
|||
// public decimal? BoxPackFees { get; set; }
|
|||
// public decimal BoxPackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 快递袋包装费
|
|||
// /// </summary>
|
|||
// public decimal? ExpressPackFees { get; set; }
|
|||
// public decimal ExpressPackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 快递袋封边
|
|||
// /// </summary>
|
|||
// public decimal? ExpressCloseSideFees { get; set; }
|
|||
// public decimal ExpressCloseSideFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 气泡纸包装费
|
|||
// /// </summary>
|
|||
// public decimal? AirPaperPackFees { get; set; }
|
|||
// public decimal AirPaperPackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 气泡袋包装费
|
|||
// /// </summary>
|
|||
// public decimal? AirBagPackFees { get; set; }
|
|||
// public decimal AirBagPackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// POP包装费
|
|||
// /// </summary>
|
|||
// public decimal? POPBagPackFees { get; set; }
|
|||
// public decimal POPBagPackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 胶带工序
|
|||
// /// </summary>
|
|||
// public decimal? TapePackFees { get; set; }
|
|||
// public decimal TapePackFeesNo { get; set; }
|
|||
// /// <summary>
|
|||
// ///增量配件
|
|||
// /// </summary>
|
|||
// public decimal? IncreateGoods { get; set; }
|
|||
// public decimal IncreateGoodsNo { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 气泡纸
|
|||
// /// </summary>
|
|||
// public decimal? AirPaper { get; set; }
|
|||
// public decimal AirPaperNo { get; set; }
|
|||
// /// <summary>
|
|||
// /// 胶带
|
|||
// /// </summary>
|
|||
// public decimal? Tape { get; set; }
|
|||
// public decimal TapeNo { get; set; }
|
|||
|
|||
|
|||
// /// <summary>
|
|||
// /// 打包消耗的总费用(总数量)
|
|||
// /// </summary>
|
|||
// public decimal AllPackFees { get; set; }
|
|||
|
|||
// /// <summary>
|
|||
// /// 总费用(单价)
|
|||
// /// </summary>
|
|||
// public decimal TotalFees { get; set; }
|
|||
|
|||
//}
|
|||
|
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
public class ProductSkuCountsResponse |
|||
{ |
|||
|
|||
public int ArrivedCount { get; set; } |
|||
|
|||
public int NoArrivedCount { get; set; } |
|||
|
|||
public int SomeArrivedCount { get; set; } |
|||
|
|||
public int WorryCount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
|
|||
public class ProductSkuResponse |
|||
{ |
|||
/// <summary>
|
|||
/// skuId
|
|||
/// </summary>
|
|||
public string Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 图片链接
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
/// <summary>
|
|||
/// SKU标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品id
|
|||
/// </summary>
|
|||
public long ShopId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductItemNum { get; set; } |
|||
/// <summary>
|
|||
/// spuId
|
|||
/// </summary>
|
|||
public string ProductId { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public BarCodeModel BarCodeModel { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 合格证信息
|
|||
/// </summary>
|
|||
public CertificateModel Certificate { get; set; } |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,60 @@ |
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 条形码
|
|||
/// </summary>
|
|||
public class BarCodeModel:NotifyObject |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 条形码id
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
|
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get=>brand; set { Set(ref brand, value); } } |
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
|||
|
|||
|
|||
private string producNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get => producNo; set { Set(ref producNo, value); } } |
|||
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { Set(ref skuName, value); } } |
|||
|
|||
|
|||
private string skuId; |
|||
/// <summary>
|
|||
/// skuId(条形码号=POP+SkuId)
|
|||
/// </summary>
|
|||
public string SkuId { get => skuId; set { Set(ref skuId, value); } } |
|||
|
|||
|
|||
private string modelNo; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
public string ModelNo { get => modelNo; set { Set(ref modelNo, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 模板标签
|
|||
/// </summary>
|
|||
public BarcodeLabelModel LabelModel { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class BarLabelModel |
|||
{ |
|||
/// <summary>
|
|||
/// 选中的模板
|
|||
/// </summary>
|
|||
public BarcodeLabelModel BarcodeLabelModel { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 模板数据
|
|||
/// </summary>
|
|||
Dictionary<string,string> Data =new Dictionary<string,string>(); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,89 @@ |
|||
using System; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public class CertificateModel : NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 合格证id
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { Set(ref brand, value); } } |
|||
|
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
|||
|
|||
private string shader; |
|||
/// <summary>
|
|||
/// 材质
|
|||
/// </summary>
|
|||
public string Shader { get => shader; set { Set(ref shader, value); } } |
|||
|
|||
private string excuteStander; |
|||
/// <summary>
|
|||
/// 执行标准
|
|||
/// </summary>
|
|||
public string ExcuteStander { get => excuteStander; set { Set(ref excuteStander, value); } } |
|||
|
|||
private string productShop; |
|||
/// <summary>
|
|||
/// 生产商
|
|||
/// </summary>
|
|||
public string ProductShop { get => productShop; set { Set(ref productShop, value); } } |
|||
|
|||
private string productAdress; |
|||
/// <summary>
|
|||
/// 地址
|
|||
/// </summary>
|
|||
public string ProductAdress { get => productAdress; set { Set(ref productAdress, value); } } |
|||
|
|||
private string productNo; |
|||
/// <summary>
|
|||
/// 型号(货号)
|
|||
/// </summary>
|
|||
public string ProductNo { get => productNo; set { Set(ref productNo, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 生产日期
|
|||
/// </summary>
|
|||
public DateTime ProductDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 经销商
|
|||
/// </summary>
|
|||
public string Reseller { get; set; } |
|||
|
|||
private int isLogo; |
|||
/// <summary>
|
|||
/// 是否含3cLogo(0没有 ,1有)
|
|||
/// </summary>
|
|||
public int IsLogo { get => isLogo; set { Set(ref isLogo, value); } } |
|||
|
|||
private string factoryNumber; |
|||
/// <summary>
|
|||
/// 工厂编号
|
|||
/// </summary>
|
|||
public string FactoryNumber { get => factoryNumber; set { Set(ref factoryNumber, value); } } |
|||
|
|||
private CertificateLabelModel labelModel; |
|||
public CertificateLabelModel LabelModel { get => labelModel; set { Set(ref labelModel, value); } } |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
using BBWY.Client.ViewModels; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Common.Models; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Resources; |
|||
using System.Text; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media.TextFormatting; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class ConsumableModel : BaseVM, IDenpendency |
|||
{ |
|||
public ConsumableService consumableService; |
|||
public ICommand EditConsumableCommand { get; set; } |
|||
public ICommand DeletedConsumableCommand { get; set; } |
|||
public ICommand SaveConsumableCommand { get; set; } |
|||
public Action ReflashDatas { get; set; } |
|||
|
|||
public ConsumableModel(ConsumableService consumableService) |
|||
{ |
|||
this.consumableService = consumableService; |
|||
EditConsumableCommand = new RelayCommand(EditConsumable); |
|||
|
|||
DeletedConsumableCommand = new RelayCommand<ObservableCollection<ConsumableModel>>(DeletedConsumable); |
|||
SaveConsumableCommand = new RelayCommand<object>(SaveConsumable); |
|||
} |
|||
|
|||
|
|||
public void SaveConsumable(object obj) |
|||
{ |
|||
if (string.IsNullOrEmpty(Name)) |
|||
{ |
|||
new TipsWindow("耗材品名不能为空!").Show(); |
|||
return; |
|||
} |
|||
|
|||
if (this.Price == null) |
|||
{ |
|||
new TipsWindow("价格不能为空!").Show(); |
|||
return; |
|||
} |
|||
ApiResponse<object> res = null; |
|||
if (Id > 0) |
|||
{ |
|||
res = consumableService.Edit(new ConsuableRequest |
|||
{ |
|||
Id = Id, |
|||
Heigth = Heigth, |
|||
Length = Length, |
|||
Name = Name, |
|||
Price = Price.Value, |
|||
Remark = Remark, |
|||
Weigth = Weigth, |
|||
Width = Width |
|||
}); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
res = consumableService.Add(new ConsuableRequest |
|||
{ |
|||
|
|||
Heigth = Heigth, |
|||
Length = Length, |
|||
Name = Name, |
|||
Price = Price.Value, |
|||
Remark = Remark, |
|||
Weigth = Weigth, |
|||
Width = Width |
|||
}); |
|||
|
|||
} |
|||
|
|||
if (res != null && res.Success) |
|||
{ |
|||
var win = obj as System.Windows.Window; |
|||
if (ReflashDatas != null) ReflashDatas(); |
|||
win.Close(); |
|||
} |
|||
else |
|||
{ |
|||
new TipsWindow(res.Msg).Show(); |
|||
} |
|||
} |
|||
|
|||
public void DeletedConsumable(ObservableCollection<ConsumableModel> list) |
|||
{ |
|||
var res = consumableService.Deleted(Id); |
|||
if (res.Success) |
|||
{ |
|||
list.Remove(this); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
public void EditConsumable() |
|||
{ |
|||
EditConsumable add = new EditConsumable(this); |
|||
add.Show(); |
|||
} |
|||
|
|||
private long id; |
|||
public long Id { get => id; set { Set(ref id, value); } } |
|||
private string name; |
|||
public string Name { get => name; set { Set(ref name, value); } } |
|||
private decimal? price; |
|||
public decimal? Price { get => price; set { Set(ref price, value); } } |
|||
private double? weigth; |
|||
public double? Weigth { get => weigth; set { Set(ref weigth, value); } } |
|||
private double? length; |
|||
public double? Length { get => length; set { Set(ref length, value); } } |
|||
private double? width; |
|||
public double? Width { get => width; set { Set(ref width, value); } } |
|||
private double? heigth; |
|||
public double? Heigth { get => heigth; set { Set(ref heigth, value); } } |
|||
private string remark; |
|||
public string Remark { get => remark; set { Set(ref remark, value); } } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 收费明细表
|
|||
/// </summary>
|
|||
public class FeesDetailModel : NotifyObject |
|||
{ |
|||
public long Id { get; set; } |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费分类id(格式 [1,2,2,1])
|
|||
/// </summary>
|
|||
public string FeesTypeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费项目id(格式 [1,2,2,1])
|
|||
/// </summary>
|
|||
public string FeesItemId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费小计(格式 [1,2,2,1])
|
|||
/// </summary>
|
|||
public string SingleFees { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
///收费项
|
|||
/// </summary>
|
|||
public class FeesItemModel : NotifyObject |
|||
{ |
|||
public long Id { get; set; } |
|||
/// <summary>
|
|||
/// 分类id
|
|||
/// </summary>
|
|||
public int TypeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 项目id
|
|||
/// </summary>
|
|||
public int ItemId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费价格
|
|||
/// </summary>
|
|||
public decimal FeesPrice { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class IncreateModel:NotifyObject |
|||
{ |
|||
private string increateName; |
|||
public string IncreateName { get => increateName; set { Set(ref increateName, value); } } |
|||
private bool isSelected; |
|||
public bool IsSelected { get => isSelected; set { Set(ref isSelected, value); } } |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return IncreateName; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class IncreateServiceModel |
|||
{ |
|||
public long Id { get; set; } |
|||
public string ServiceName { get; set; } |
|||
|
|||
public decimal ServicePrice { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
using BBWY.Client.APIServices; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class PackItemModel : NotifyObject |
|||
{ |
|||
private string itemName; |
|||
public string ItemName { get => itemName; set { Set(ref itemName, value); } } |
|||
|
|||
private string selectUserId; |
|||
/// <summary>
|
|||
/// Member.userId
|
|||
/// </summary>
|
|||
public string SelectUserId { get => selectUserId; set { Set(ref selectUserId, value); } } |
|||
|
|||
private long selectId; |
|||
/// <summary>
|
|||
/// 选中的Id
|
|||
/// </summary>
|
|||
public long SelectId { get => selectId; set { Set(ref selectId, value); } } |
|||
|
|||
private string memberName; |
|||
public string MemberName { get => memberName; set { Set(ref memberName, value); } } |
|||
|
|||
private int itemCount; |
|||
public int ItemCount { get => itemCount; set { Set(ref itemCount, value); } } |
|||
|
|||
|
|||
public ObservableCollection<IncreateServiceModel> IncreateServiceList { get; set; } |
|||
public ObservableCollection<PackUser> MemberList { get; set; } |
|||
|
|||
public ObservableCollection<ConsumableModel> ConsumableList { get; set; } |
|||
public ObservableCollection<WorkProcessModel> PackServiceList { get; set; } |
|||
/// <summary>
|
|||
/// 设置列表的 是否编辑属性
|
|||
/// </summary>
|
|||
public bool IsEnable { get; set; } |
|||
|
|||
public ICommand DeleteServiceCommand { get; set; } |
|||
|
|||
public PackItemModel(ObservableCollection<IncreateServiceModel> IncreateServiceList=null, |
|||
ObservableCollection<PackUser> MemberList=null, |
|||
ObservableCollection<ConsumableModel> ConsumableList=null, |
|||
ObservableCollection<WorkProcessModel> PackServiceList=null |
|||
) |
|||
{ |
|||
|
|||
DeleteServiceCommand = new RelayCommand<ObservableCollection<PackItemModel>>(DeleteService); |
|||
this. IncreateServiceList = IncreateServiceList; |
|||
this.PackServiceList = PackServiceList; |
|||
this.MemberList = MemberList; |
|||
this.ConsumableList = ConsumableList; |
|||
} |
|||
|
|||
private void DeleteService(ObservableCollection<PackItemModel> list) |
|||
{ |
|||
list.Remove(this); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,502 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.ViewModels; |
|||
using BBWY.Client.Views.PackTask; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
using System.Drawing; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 打包任务 数据绑定
|
|||
/// </summary>
|
|||
public class PackTaskModel : BaseVM |
|||
{ |
|||
|
|||
private bool isShowFees; |
|||
public bool IsShowFees { get => isShowFees; set { Set(ref isShowFees, value); } } |
|||
|
|||
private long id; |
|||
|
|||
public long Id { get => id; set { Set(ref id, value); } } |
|||
private readonly PackTaskService packTaskService; |
|||
WorkProcessService workProcessService; |
|||
public ICommand SetTaskStatusCommand { get; set; } |
|||
public ICommand PrintBarcodeCommand { get; set; } |
|||
|
|||
public ICommand PrintCerCommand { get; set; } |
|||
public ICommand LookCerCommand { get; set; } |
|||
public ICommand LookBarCommand { get; set; } |
|||
public ICommand SetServiceCommand { get; set; } |
|||
IncreateServiceService increateServiceService; |
|||
public ConsumableService consumableService; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public PackTaskModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService) |
|||
{ |
|||
|
|||
SetTaskStatusCommand = new RelayCommand<long>(SetTaskStatus); |
|||
PrintBarcodeCommand = new RelayCommand(PrintBarcode); |
|||
PrintCerCommand = new RelayCommand(PrintCer); |
|||
LookBarCommand = new RelayCommand(LookBar); |
|||
LookCerCommand = new RelayCommand(LookCer); |
|||
SetServiceCommand = new RelayCommand(SetService); |
|||
this.packTaskService = packTaskService; |
|||
this.consumableService = consumableService; |
|||
this.workProcessService = workProcessService; |
|||
this.increateServiceService = increateServiceService; |
|||
} |
|||
|
|||
private void SetService() |
|||
{ |
|||
//加载数据
|
|||
|
|||
ServiceWindow service = new ServiceWindow(packTaskService, TaskId, SkuCount, consumableService, workProcessService, increateServiceService);//设置
|
|||
service.model.SetAllFees = new Action<FeesItemResponse, List<string>>((feesItem, packUsers) => |
|||
{ |
|||
FeesItemResponse = feesItem; |
|||
PackUser = string.Join("\r\n", packUsers); |
|||
IsShowFees = feesItem.AllFees > 0 ? true : false; |
|||
}); |
|||
service.Show(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查看合格证
|
|||
/// </summary>
|
|||
private void LookCer() |
|||
{ |
|||
if (CertificateModel == null) |
|||
{ |
|||
new TipsWindow("该任务无设置合格证信息,无法查看!").ShowDialog(); |
|||
return; |
|||
} |
|||
LookCerWindow lookCerWindow = new LookCerWindow(CertificateModel); |
|||
lookCerWindow.Show(); |
|||
} |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 查看条形码
|
|||
/// </summary>
|
|||
private void LookBar() |
|||
{ |
|||
if (BarCodeModel == null) |
|||
{ |
|||
new TipsWindow("该任务无设置条形码信息,无法查看!").ShowDialog(); |
|||
return; |
|||
} |
|||
LookBarCodeWindow look = new LookBarCodeWindow(new BarCodeModel |
|||
{ |
|||
Brand = BarCodeModel.Brand, |
|||
BrandName = BarCodeModel.BrandName, |
|||
LabelModel = BarCodeModel.LabelModel, |
|||
ProductNo = BarCodeModel.ProductNo, |
|||
SkuId = BarCodeModel.SkuId, |
|||
SkuName = BarCodeModel.SkuName |
|||
}); |
|||
look.Show(); |
|||
} |
|||
|
|||
private void PrintCer() |
|||
{ |
|||
if (CertificateModel == null) |
|||
{ |
|||
new TipsWindow("该任务无设置合格证信息,无法打印!").ShowDialog(); |
|||
return; |
|||
} |
|||
PrintWindow printWindow = new PrintWindow(); |
|||
printWindow.LabelName = CertificateModel.LabelModel.ToString();//加载模板信息
|
|||
|
|||
printWindow.certificateModel = certificateModel; |
|||
printWindow.LoadData(); |
|||
printWindow.Datas = LoadCerLabelModels(); |
|||
printWindow.Show(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 打印条形码
|
|||
/// </summary>
|
|||
private void PrintBarcode() |
|||
{ |
|||
if (BarCodeModel == null) |
|||
{ |
|||
new TipsWindow("该任务无设置条形码信息,无法打印!").ShowDialog(); |
|||
return; |
|||
} |
|||
|
|||
PrintWindow printWindow = new PrintWindow(); |
|||
printWindow.LabelName = BarCodeModel.LabelModel.ToString();//加载模板信息
|
|||
printWindow.barCodeModel = new BarCodeModel |
|||
{ |
|||
Brand = BarCodeModel.Brand, |
|||
BrandName = BarCodeModel.BrandName, |
|||
LabelModel = BarCodeModel.LabelModel, |
|||
ProductNo = BarCodeModel.ProductNo, |
|||
SkuId = BarCodeModel.SkuId, |
|||
SkuName = BarCodeModel.SkuName |
|||
}; |
|||
printWindow.LoadData(); |
|||
printWindow.Datas = LoadBarLabelModels(); |
|||
printWindow.Show(); |
|||
} |
|||
|
|||
public void SetTaskStatus(long taskId) |
|||
{ |
|||
|
|||
if (this.TaskStatus == TaskStateType.已完成) |
|||
{ |
|||
return; |
|||
|
|||
} |
|||
///修改完成
|
|||
var model = packTaskService.UpdateTaskStatus(taskId, 1); |
|||
if (model != null && model.Success) |
|||
{ |
|||
this.TaskStatus = TaskStateType.已完成; |
|||
new TipsWindow("修改成功").Show(); |
|||
} |
|||
} |
|||
|
|||
public Dictionary<string, string> LoadBarLabelModels() |
|||
{ |
|||
Dictionary<string, string> data = new Dictionary<string, string>(); |
|||
data.Add("pinming", $"品名: {BarCodeModel.BrandName}"); |
|||
data.Add("guige", $"规格: {BarCodeModel.SkuName}"); |
|||
data.Add("pop", $"POP{BarCodeModel.SkuId}"); |
|||
switch (BarCodeModel.LabelModel) |
|||
{ |
|||
case BarcodeLabelModel.barstander: |
|||
data.Add("pinpai", $"品牌: {BarCodeModel.Brand}"); |
|||
data.Add("xinghao", $"型号: {BarCodeModel.ProductNo}"); |
|||
return data; |
|||
case BarcodeLabelModel.barsimplify: |
|||
return data; |
|||
default: |
|||
break; |
|||
} |
|||
return data; |
|||
} |
|||
|
|||
public Dictionary<string, string> LoadCerLabelModels() |
|||
{ |
|||
Dictionary<string, string> data = new Dictionary<string, string>(); |
|||
data.Add("pinming", $"品名: {CertificateModel.BrandName}"); |
|||
data.Add("pinpai", $"品牌: {CertificateModel.Brand}"); |
|||
data.Add("xinghao", $"型号: {CertificateModel.ProductNo}"); |
|||
data.Add("dizhi", $"地址: {CertificateModel.ProductAdress}"); |
|||
data.Add("caizhi", $"材质: {CertificateModel.Shader}"); |
|||
data.Add("changshang", $"生产商: {CertificateModel.ProductShop}"); |
|||
|
|||
|
|||
switch (CertificateModel.IsLogo) |
|||
{ |
|||
case 0://无图
|
|||
data.Add("gongchangid", $"无"); |
|||
break; |
|||
case 1://有图
|
|||
data.Add("gongchangid", $"{CertificateModel.FactoryNumber}"); |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
|
|||
string[] excutes = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.Append("执行标准: "); |
|||
for (int i = 0; i < excutes.Count(); i++) |
|||
{ |
|||
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|||
{ |
|||
sb.Append("\r\n").Append(" "); |
|||
} |
|||
sb.Append(excutes[i]).Append(" "); |
|||
} |
|||
sb.Remove(sb.Length - 3, 3); |
|||
|
|||
|
|||
data.Add("biaozhun", sb.ToString()); |
|||
|
|||
|
|||
|
|||
return data; |
|||
} |
|||
|
|||
|
|||
private DateTime endTime; |
|||
/// <summary>
|
|||
/// 提交时间
|
|||
/// </summary>
|
|||
public DateTime EndTime { get => endTime; set { Set(ref endTime, value); } } |
|||
|
|||
|
|||
private long taskId; |
|||
/// <summary>
|
|||
/// 绑定数据
|
|||
/// </summary>
|
|||
public long TaskId { get => taskId; set { Set(ref taskId, value); } } |
|||
|
|||
|
|||
private string departmentName; |
|||
/// <summary>
|
|||
/// 部门名称
|
|||
/// </summary>
|
|||
public string DepartmentName { get => departmentName; set { Set(ref departmentName, value); } } |
|||
|
|||
|
|||
private string acceptName; |
|||
/// <summary>
|
|||
/// 对接人
|
|||
/// </summary>
|
|||
public string AcceptName { get => acceptName; set { Set(ref acceptName, value); } } |
|||
|
|||
|
|||
private int skuCount; |
|||
/// <summary>
|
|||
/// sku数量
|
|||
/// </summary>
|
|||
public int SkuCount { get => skuCount; set { Set(ref skuCount, value); } } |
|||
|
|||
|
|||
private TaskState availability; |
|||
/// <summary>
|
|||
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
|||
/// </summary>
|
|||
public TaskState Availability { get => availability; set { Set(ref availability, value); } } |
|||
|
|||
|
|||
|
|||
private TaskStateType taskStatus; |
|||
/// <summary>
|
|||
/// 任务状态(未完成=0,已完成=1)
|
|||
/// </summary>
|
|||
public TaskStateType TaskStatus { get => taskStatus; set { Set(ref taskStatus, value); } } |
|||
|
|||
|
|||
private PackType packType; |
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public PackType PackType { get => packType; set { Set(ref packType, value); } } |
|||
|
|||
|
|||
private int goodsNumber; |
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get => goodsNumber; set { Set(ref goodsNumber, value); } } |
|||
|
|||
|
|||
private string skuTitle; |
|||
/// <summary>
|
|||
/// sku配件商品名称
|
|||
/// </summary>
|
|||
public string SkuTitle { get => skuTitle; set { Set(ref skuTitle, value); } } |
|||
|
|||
|
|||
private BasicPack basicPack; |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public BasicPack BasicPack { get => basicPack; set { Set(ref basicPack, value); } } |
|||
|
|||
|
|||
|
|||
private string increment1; |
|||
/// <summary>
|
|||
/// 增量1()
|
|||
/// </summary>
|
|||
public string Increment1 { get => increment1; set { Set(ref increment1, value); } } |
|||
|
|||
|
|||
private Increment increment2; |
|||
/// <summary>
|
|||
/// 增量2()
|
|||
/// </summary>
|
|||
public Increment Increment2 { get => increment2; set { Set(ref increment2, value); } } |
|||
|
|||
|
|||
private PositionType positionType; |
|||
/// <summary>
|
|||
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
|||
/// </summary>
|
|||
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } } |
|||
|
|||
|
|||
|
|||
|
|||
#region 条形码数据
|
|||
/// <summary>
|
|||
/// 条形码id
|
|||
/// </summary>
|
|||
public long BarCodeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标签模板
|
|||
/// </summary>
|
|||
public BarcodeLabelModel LabelModel { get; set; } |
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { Set(ref brand, value); } } |
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
|||
|
|||
|
|||
private string producNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get => producNo; set { Set(ref producNo, value); } } |
|||
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { Set(ref skuName, value); } } |
|||
|
|||
|
|||
private string skuId; |
|||
/// <summary>
|
|||
/// skuId(条形码号=POP+SkuId)
|
|||
/// </summary>
|
|||
public string SkuId { get => skuId; set { Set(ref skuId, value); } } |
|||
|
|||
|
|||
private string modelNo; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
public string ModelNo { get => modelNo; set { Set(ref modelNo, value); } } |
|||
#endregion
|
|||
|
|||
|
|||
private BarCodeModel barCodeModel; |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public BarCodeModel BarCodeModel { get => barCodeModel; set { Set(ref barCodeModel, value); } } |
|||
|
|||
private CertificateModel certificateModel; |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public CertificateModel CertificateModel { get => certificateModel; set { Set(ref certificateModel, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
private CertificatePosition certificatePosition; |
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public CertificatePosition CertificatePosition { get => certificatePosition; set { Set(ref certificatePosition, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
private string markMessage; |
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
public string MarkMessage { get => markMessage; set { Set(ref markMessage, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 服务收费 (单个任务id 消耗的总费用)
|
|||
/// </summary>
|
|||
private decimal feesMoney; |
|||
/// <summary>
|
|||
/// 服务收费 (单个任务id 消耗的总费用)
|
|||
/// </summary>
|
|||
public decimal FeesMoney { get => feesMoney; set { Set(ref feesMoney, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 打包员
|
|||
/// </summary>
|
|||
private string packUser; |
|||
/// <summary>
|
|||
/// 打包员
|
|||
/// </summary>
|
|||
public string PackUser { get => packUser; set { Set(ref packUser, value); } } |
|||
|
|||
//public FeesItemTypeDTO FeesItemTypeDTO { get; set; }
|
|||
|
|||
|
|||
private FeesItemResponse feesItemResponse; |
|||
|
|||
public FeesItemResponse FeesItemResponse { get => feesItemResponse; set { Set(ref feesItemResponse, value); } } |
|||
|
|||
public IList<SkuMessage> ItemList { get; set; } |
|||
} |
|||
|
|||
public class SkuMessage : NotifyObject |
|||
{ |
|||
private long id; |
|||
|
|||
public long Id { get => id; set { Set(ref id, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 店铺Sku图链接
|
|||
/// </summary>
|
|||
private string logo; |
|||
/// <summary>
|
|||
/// 店铺Sku图链接
|
|||
/// </summary>
|
|||
public string Logo { get => logo; set { Set(ref logo, value); } } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 采购Sku名称
|
|||
/// </summary>
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// 采购Sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { Set(ref skuName, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 货号品名(手写上传)
|
|||
/// </summary>
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 货号品名(手写上传)
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 需求方店铺id
|
|||
/// </summary>
|
|||
private string shopName; |
|||
/// <summary>
|
|||
/// 需求方店铺id
|
|||
/// </summary>
|
|||
public string ShopName { get => shopName; set { Set(ref shopName, value); } } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
private string goodsNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string GoodsNo { get => goodsNo; set { Set(ref goodsNo, value); } } |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class PackUser |
|||
{ |
|||
/// <summary>
|
|||
/// 用户Id
|
|||
/// </summary>
|
|||
public string Id { get; set; } |
|||
/// <summary>
|
|||
/// 用户名
|
|||
/// </summary>
|
|||
public string UserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 团队Id
|
|||
/// </summary>
|
|||
public string DepartmentId { get; set; } |
|||
/// <summary>
|
|||
/// 用户名(花名)
|
|||
/// </summary>
|
|||
public string UserNick { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 个人任务打包情况
|
|||
/// </summary>
|
|||
public class TaskPersonModel : NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包人
|
|||
/// </summary>
|
|||
public string UserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包数量(格式 1,2,2,1 )
|
|||
/// </summary>
|
|||
public string PackNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费分类id(格式 [1,2,2,1])
|
|||
/// </summary>
|
|||
public string FeesTypeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费项目id(格式 [1,2,2,1] )
|
|||
/// </summary>
|
|||
public string FeesItemId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 单项小计 (格式 [5,2,2,2])
|
|||
/// </summary>
|
|||
public string SingleFees { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 总费用
|
|||
/// </summary>
|
|||
public decimal AllFees { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// 团队名
|
|||
/// </summary>
|
|||
/// <param name="Id">团队id</param>
|
|||
/// <param name="DePartmentName">团队名称</param>
|
|||
public class UserDepartment |
|||
{ |
|||
|
|||
public string Id { get; set; } |
|||
public string DePartmentName { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
using System; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 个人收入情况
|
|||
/// </summary>
|
|||
public class UserFeesModel : NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
/// <summary>
|
|||
/// 成员id
|
|||
/// </summary>
|
|||
public string UserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收费
|
|||
/// </summary>
|
|||
public decimal Fees { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 日期
|
|||
/// </summary>
|
|||
public DateTime DateTime { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class WorkProcessModel |
|||
{ |
|||
public long Id { get; set; } |
|||
/// <summary>
|
|||
/// 工序名称
|
|||
/// </summary>
|
|||
public string ProcessName { get; set; } |
|||
/// <summary>
|
|||
/// 价格
|
|||
/// </summary>
|
|||
public decimal ProcessPrice { get; set; } |
|||
} |
|||
} |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,148 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using GalaSoft.MvvmLight.Messaging; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class ConsumableViewModel : BaseVM, IDenpendency |
|||
{ |
|||
|
|||
|
|||
|
|||
private bool isOpenAdd = true; |
|||
public bool IsOpenAdd { get => isOpenAdd; set { Set(ref isOpenAdd, value); } } |
|||
|
|||
|
|||
private int pageIndex = 1; |
|||
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
|||
|
|||
private int pageSize = 10; |
|||
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
|||
|
|||
private int orderCount;//总数量
|
|||
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } } |
|||
|
|||
private bool isLoading; |
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
private string searchName; |
|||
public string SearchName { get => searchName; set { Set(ref searchName, value); } } |
|||
|
|||
public ConsumableModel ConsumableModel { get => consumableModel; set { Set(ref consumableModel, value); } } |
|||
|
|||
private ConsumableModel consumableModel; |
|||
|
|||
|
|||
private ObservableCollection<ConsumableModel> consumableList; |
|||
public ObservableCollection<ConsumableModel> ConsumableList { get => consumableList; set { Set(ref consumableList, value); } } |
|||
|
|||
|
|||
public ICommand TaskPageIndexChangedCommand { get; set; } |
|||
public ICommand AddConsumableCommand { get; set; } |
|||
public ICommand SearchConsumableCommand { get; set; } |
|||
private readonly ConsumableService consumableService; |
|||
|
|||
|
|||
|
|||
|
|||
// public Action ReflashDatas { get; set; }
|
|||
|
|||
public ConsumableViewModel(ConsumableService consumableService) |
|||
{ |
|||
|
|||
|
|||
this.consumableService = consumableService; |
|||
ConsumableModel = new ConsumableModel(consumableService); |
|||
// ConsumableModel.ReflashDatas = ReflashDatas;
|
|||
ConsumableList = new ObservableCollection<ConsumableModel>(); |
|||
AddConsumableCommand = new RelayCommand(AddConsumable); |
|||
SearchConsumableCommand = new RelayCommand(SearchConsumable); |
|||
TaskPageIndexChangedCommand = new RelayCommand<PageArgs>(p => |
|||
{ |
|||
LoadIndex(p.PageIndex); |
|||
}); |
|||
} |
|||
private void LoadIndex(int pageIndex) |
|||
{ |
|||
PageIndex = pageIndex;//
|
|||
SearchConsumable(); |
|||
} |
|||
|
|||
|
|||
private void SearchConsumable() |
|||
{ |
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
isLoading = true; |
|||
var res = consumableService.Search(new Models.APIModel.Request.ConsumableSearchRequest |
|||
{ |
|||
Name = searchName, |
|||
PageIndex = PageIndex, |
|||
PageSize = PageSize, |
|||
}); |
|||
if (res.Success) |
|||
{ |
|||
ConsumableList = new ObservableCollection<ConsumableModel>(); |
|||
if (res.Data != null && res.Data.Consumables != null && res.Data.Consumables.Count() > 0) |
|||
{ |
|||
OrderCount = res.Data.OrderCount; |
|||
foreach (var item in res.Data.Consumables) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
ConsumableList.Add(new ConsumableModel(consumableService) |
|||
{ |
|||
Heigth = item.Heigth, |
|||
Id = item.Id, |
|||
Name = item.Name, |
|||
Length = item.Length, |
|||
Price = item.Price, |
|||
Remark = item.Remark, |
|||
Weigth = item.Weigth, |
|||
Width = item.Width |
|||
|
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
|
|||
isLoading = false; |
|||
}); |
|||
|
|||
|
|||
} |
|||
|
|||
private void AddConsumable() |
|||
{ |
|||
//ConsumableModel = new ConsumableModel(consumableService);
|
|||
//IsOpenAdd = true;
|
|||
var model = new ConsumableModel(consumableService) |
|||
{ //ReflashDatas = ReflashDatas
|
|||
|
|||
}; |
|||
|
|||
model.ReflashDatas = new Action(() => |
|||
{ |
|||
SearchConsumable(); |
|||
Messenger.Default.Send(true); |
|||
}); |
|||
|
|||
EditConsumable add = new EditConsumable(model); |
|||
add.ShowDialog(); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,807 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Common.Trigger; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using GalaSoft.MvvmLight.Messaging; |
|||
using NPOI.Util; |
|||
using Org.BouncyCastle.Asn1.Crmf; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media.TextFormatting; |
|||
using System.Windows.Navigation; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class CreatePackTaskViewModel : BaseVM |
|||
{ |
|||
private bool isLoading = false; |
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
private Worry isWorry; |
|||
/// <summary>
|
|||
/// 是否加急
|
|||
/// </summary>
|
|||
public Worry IsWorry { get => isWorry; set { Set(ref isWorry, value); } } |
|||
|
|||
|
|||
private DelayTrigger delayTrigger; |
|||
private string searchIncrementKeyWord; |
|||
/// <summary>
|
|||
/// 增量耗材查询关键字
|
|||
/// </summary>
|
|||
public string SearchIncrementKeyWord |
|||
{ |
|||
get => searchIncrementKeyWord; set |
|||
{ |
|||
if (Set(ref searchIncrementKeyWord, value)) |
|||
{ |
|||
delayTrigger.SetKey(value); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
private ObservableCollection<IncreateModel> increateList; |
|||
/// <summary>
|
|||
/// 增量耗材查询关键字
|
|||
/// </summary>
|
|||
public ObservableCollection<IncreateModel> IncreateList { get => increateList; set { Set(ref increateList, value); } } |
|||
|
|||
private string searchSkuId; |
|||
/// <summary>
|
|||
/// skuId
|
|||
/// </summary>
|
|||
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 店铺Sku图链接
|
|||
/// </summary>
|
|||
private string logo; |
|||
/// <summary>
|
|||
/// 店铺Sku图链接
|
|||
/// </summary>
|
|||
public string Logo { get => logo; set { Set(ref logo, value); } } |
|||
|
|||
|
|||
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// 采购Sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { Set(ref skuName, value); } } |
|||
|
|||
|
|||
private long barCodeId; |
|||
/// <summary>
|
|||
/// 条形码id
|
|||
/// </summary>
|
|||
public long BarCodeId { get => barCodeId; set { Set(ref barCodeId, value); } } |
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { Set(ref brand, value); } } |
|||
|
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名(手写上传)
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 需求方店铺id
|
|||
/// </summary>
|
|||
private string shopName; |
|||
/// <summary>
|
|||
/// 需求方店铺id
|
|||
/// </summary>
|
|||
public string ShopName { get => shopName; set { Set(ref shopName, value); } } |
|||
|
|||
|
|||
private string modelNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ModelNo { get => modelNo; set { Set(ref modelNo, value); } } |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
private string productNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get => productNo; set { Set(ref productNo, value); } } |
|||
|
|||
private int goodsNumber; |
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get => goodsNumber; set { Set(ref goodsNumber, value); } } |
|||
|
|||
private DateTime endTime; |
|||
/// <summary>
|
|||
/// 提交时间
|
|||
/// </summary>
|
|||
public DateTime EndTime { get => endTime; set { Set(ref endTime, value); } } |
|||
|
|||
|
|||
private long taskId; |
|||
/// <summary>
|
|||
/// 绑定数据
|
|||
/// </summary>
|
|||
public long TaskId { get => taskId; set { Set(ref taskId, value); } } |
|||
|
|||
|
|||
private string departmentName; |
|||
/// <summary>
|
|||
/// 部门名称
|
|||
/// </summary>
|
|||
public string DepartmentName { get => departmentName; set { Set(ref departmentName, value); } } |
|||
|
|||
|
|||
private string acceptName; |
|||
/// <summary>
|
|||
/// 对接人
|
|||
/// </summary>
|
|||
public string AcceptName { get => acceptName; set { Set(ref acceptName, value); } } |
|||
|
|||
|
|||
private int skuCount; |
|||
/// <summary>
|
|||
/// sku数量
|
|||
/// </summary>
|
|||
public int SkuCount { get => skuCount; set { Set(ref skuCount, value); } } |
|||
|
|||
|
|||
private TaskState availability; |
|||
/// <summary>
|
|||
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
|||
/// </summary>
|
|||
public TaskState Availability { get => availability; set { Set(ref availability, value); } } |
|||
|
|||
|
|||
|
|||
private int taskStatus; |
|||
/// <summary>
|
|||
/// 任务状态(已完成=0,未完成=1)
|
|||
/// </summary>
|
|||
public int TaskStatus { get => taskStatus; set { Set(ref taskStatus, value); } } |
|||
|
|||
|
|||
private PackType packType; |
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public PackType PackType { get => packType; set { Set(ref packType, value); } } |
|||
|
|||
private string skuTitle; |
|||
/// <summary>
|
|||
/// sku配件商品名称
|
|||
/// </summary>
|
|||
public string SkuTitle { get => skuTitle; set { Set(ref skuTitle, value); } } |
|||
|
|||
|
|||
private BasicPack basicPack; |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public BasicPack BasicPack { get => basicPack; set { Set(ref basicPack, value); } } |
|||
|
|||
|
|||
|
|||
private Increment increment1; |
|||
/// <summary>
|
|||
/// 增量1()
|
|||
/// </summary>
|
|||
public Increment Increment1 { get => increment1; set { Set(ref increment1, value); } } |
|||
|
|||
|
|||
private Increment increment2; |
|||
/// <summary>
|
|||
/// 增量2()
|
|||
/// </summary>
|
|||
public Increment Increment2 { get => increment2; set { Set(ref increment2, value); } } |
|||
|
|||
|
|||
private PositionType positionType; |
|||
/// <summary>
|
|||
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
|||
/// </summary>
|
|||
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } } |
|||
|
|||
private string isNeedBarCode; |
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public string IsNeedBarCode { get => isNeedBarCode; set { Set(ref isNeedBarCode, value); } } |
|||
|
|||
|
|||
private string isNeedCertificateModel; |
|||
/// <summary>
|
|||
/// 是否需要条形码
|
|||
/// </summary>
|
|||
public string IsNeedCertificateModel { get => isNeedCertificateModel; set { Set(ref isNeedCertificateModel, value); } } |
|||
|
|||
|
|||
|
|||
|
|||
private BarCodeModel barCodeModel; |
|||
/// <summary>
|
|||
/// 条形码
|
|||
/// </summary>
|
|||
public BarCodeModel BarCodeModel { get => barCodeModel; set { Set(ref barCodeModel, value); } } |
|||
|
|||
|
|||
private bool isSetBarCode; |
|||
/// <summary>
|
|||
/// 设置显示(条形码)
|
|||
/// </summary>
|
|||
public bool IsSetBarCode { get => isSetBarCode; set { Set(ref isSetBarCode, value); } } |
|||
|
|||
private bool isSetCertificate; |
|||
/// <summary>
|
|||
/// 设置显示(合格证)
|
|||
/// </summary>
|
|||
public bool IsSetCertificate { get => isSetCertificate; set { Set(ref isSetCertificate, value); } } |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
private CertificateModel certificateModel; |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public CertificateModel CertificateModel { get => certificateModel; set { Set(ref certificateModel, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
private CertificatePosition certificatePosition; |
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public CertificatePosition CertificatePosition { get => certificatePosition; set { Set(ref certificatePosition, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
private string markMessage; |
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
public string MarkMessage { get => markMessage; set { Set(ref markMessage, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 服务收费 (单个任务id 消耗的总费用)
|
|||
/// </summary>
|
|||
private decimal feesMoney; |
|||
/// <summary>
|
|||
/// 服务收费 (单个任务id 消耗的总费用)
|
|||
/// </summary>
|
|||
public decimal FeesMoney { get => feesMoney; set { Set(ref feesMoney, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 打包员
|
|||
/// </summary>
|
|||
private string packUser; |
|||
/// <summary>
|
|||
/// 打包员
|
|||
/// </summary>
|
|||
public string PackUser { get => packUser; set { Set(ref packUser, value); } } |
|||
|
|||
private string printName; |
|||
/// <summary>
|
|||
/// 选中的打印机名称
|
|||
/// </summary>
|
|||
public string PrintName { get => printName; set { Set(ref printName, value); } } |
|||
|
|||
private List<string> printNames; |
|||
/// <summary>
|
|||
/// 选中的打印机名称
|
|||
/// </summary>
|
|||
public List<string> PrintNames { get => printNames; set { Set(ref printNames, value); } } |
|||
|
|||
private int printNums; |
|||
/// <summary>
|
|||
/// 打印数
|
|||
/// </summary>
|
|||
public int PrintNums { get => printNums; set { Set(ref printNums, value); } } |
|||
|
|||
|
|||
private readonly PackTaskService packTaskService; |
|||
private readonly GlobalContext globalContext; |
|||
private readonly ProductService productService; |
|||
|
|||
|
|||
private string AccepUserId = "";//对接人
|
|||
public ICommand SetBarCodeCommand { get; set; } |
|||
public ICommand SetCertificateCommand { get; set; } |
|||
public ICommand SearchSkuCommand { get; set; } |
|||
public ICommand CreateTaskCommand { get; set; } |
|||
public ICommand SaveCerCommand { get; set; } |
|||
public ICommand SaveBarCodeCommand { get; set; } |
|||
|
|||
public ICommand BarLabelCheckCommand { get; set; } |
|||
public ICommand CerLabelCheckCommand { get; set; } |
|||
|
|||
public ICommand LookBarCommand { get; set; } |
|||
public ICommand LookCerCommand { get; set; } |
|||
|
|||
|
|||
|
|||
public void InitData() |
|||
{ |
|||
|
|||
Logo = string.Empty; |
|||
SearchSkuId = ""; |
|||
SkuId = ""; |
|||
SkuCount = 0; |
|||
SkuName = string.Empty; |
|||
ProductNo= string.Empty; |
|||
Brand =string.Empty; |
|||
brandName = string.Empty; |
|||
this.MarkMessage = ""; |
|||
IsSetBarCode = true; |
|||
IsSetCertificate =true; |
|||
BarCodeModel = null; |
|||
CertificateModel = null; |
|||
SkuTitle= string.Empty; |
|||
GoodsNumber = 0; |
|||
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
|||
IncreateList = new ObservableCollection<IncreateModel>(); |
|||
foreach (var item in increates) |
|||
{ |
|||
IncreateList.Add(new IncreateModel |
|||
{ |
|||
IncreateName = item, |
|||
IsSelected = false |
|||
}); |
|||
} |
|||
} |
|||
|
|||
public CreatePackTaskViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService) |
|||
{ |
|||
Messenger.Default.Register<bool>(this, "InitData", message => { |
|||
|
|||
InitData(); |
|||
}); |
|||
//RaisePropertyChanged(string.Empty);
|
|||
//this.RaisePropertyChanged(nameof(CreatePackTaskViewModel));
|
|||
|
|||
this.productService = productService; |
|||
this.packTaskService = packTaskService; |
|||
|
|||
AccepUserId = globalContext.User.Id.ToString(); |
|||
|
|||
IsSetBarCode = true; |
|||
IsSetCertificate = true; |
|||
//数据库获取增量耗材数据
|
|||
|
|||
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
|||
IncreateList = new ObservableCollection<IncreateModel>(); |
|||
foreach (var item in increates) |
|||
{ |
|||
IncreateList.Add(new IncreateModel |
|||
{ |
|||
IncreateName = item, |
|||
IsSelected = false |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
//查询sku
|
|||
SearchSkuCommand = new RelayCommand(() => |
|||
{ |
|||
Task.Factory.StartNew(() => { SearchSku(); }); |
|||
|
|||
}); |
|||
CreateTaskCommand = new RelayCommand<object>(CreateTask); |
|||
this.globalContext = globalContext; |
|||
SetBarCodeCommand = new RelayCommand(SetBarCode); |
|||
SetCertificateCommand = new RelayCommand(SetCertificate); |
|||
SaveBarCodeCommand = new RelayCommand(SaveBarCode); |
|||
|
|||
SaveCerCommand = new RelayCommand(SaveCer); |
|||
BarLabelCheckCommand = new RelayCommand<BarcodeLabelModel>(BarLabelCheck); |
|||
CerLabelCheckCommand = new RelayCommand<CerHave3C>(CerLabelCheck); |
|||
|
|||
LookBarCommand = new RelayCommand(LookBar); |
|||
LookCerCommand = new RelayCommand(LookCer); |
|||
PrintNames = new List<string>(); |
|||
delayTrigger = new DelayTrigger(500); |
|||
delayTrigger.OnExecute = OnSearchIncreateKeyWordChanged; |
|||
BarLabelCheck(BarcodeLabelModel.barsimplify);//默认精简模式
|
|||
} |
|||
|
|||
|
|||
|
|||
private void OnSearchIncreateKeyWordChanged(string key) |
|||
{ |
|||
foreach (var s in this.IncreateList) |
|||
s.IsSelected = false; |
|||
|
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
this.IncreateList.Clear(); |
|||
|
|||
|
|||
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
|||
List<IncreateModel> keyWordShopList = new List<IncreateModel>(); |
|||
foreach (var item in increates) |
|||
{ |
|||
keyWordShopList.Add(new IncreateModel |
|||
{ |
|||
IncreateName = item, |
|||
IsSelected = false |
|||
}); |
|||
} |
|||
if (!string.IsNullOrEmpty(key.Trim())) |
|||
{ |
|||
keyWordShopList = keyWordShopList.Where(s => s.IncreateName.Contains(key)).ToList(); |
|||
|
|||
} |
|||
if (keyWordShopList.Count() > 0) |
|||
{ |
|||
foreach (var shop in keyWordShopList) |
|||
IncreateList.Add(shop); |
|||
} |
|||
|
|||
}); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查看合格证
|
|||
/// </summary>
|
|||
private void LookCer() |
|||
{ |
|||
LookCerWindow lookCerWindow = new LookCerWindow(CertificateModel); |
|||
lookCerWindow.Show(); |
|||
} |
|||
/// <summary>
|
|||
/// 查看条形码
|
|||
/// </summary>
|
|||
private void LookBar() |
|||
{ |
|||
LookBarCodeWindow look = new LookBarCodeWindow(new BarCodeModel |
|||
{ |
|||
Brand = Brand, |
|||
BrandName = BrandName, |
|||
LabelModel = LabelModel, |
|||
ProductNo = ProductNo, |
|||
SkuId = SkuId, |
|||
SkuName = SkuName |
|||
}); |
|||
look.Show(); |
|||
} |
|||
|
|||
private void CerLabelCheck(CerHave3C cer) |
|||
{ |
|||
CertificateModel.IsLogo = (int)cer; |
|||
} |
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="barcodeLabelModel"></param>
|
|||
/// <exception cref="NotImplementedException"></exception>
|
|||
private void BarLabelCheck(BarcodeLabelModel barcodeLabelModel) |
|||
{ |
|||
LabelModel = barcodeLabelModel; |
|||
|
|||
if (LabelModel == BarcodeLabelModel.barstander)//标准版 判断数据是否异常
|
|||
{ |
|||
if (string.IsNullOrEmpty(ProductNo) || ProductNo == "待填写") |
|||
{ |
|||
TipsWindow tips = new TipsWindow("该SKU无货号信息,将影响条形码打印\r\n请先设置好货号信息或调整打印模板类型"); |
|||
tips.ShowDialog(); |
|||
} |
|||
} |
|||
|
|||
//throw new NotImplementedException();
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 设置合格证
|
|||
/// </summary>
|
|||
private void SetCertificate() |
|||
{ |
|||
if (CertificateModel == null) |
|||
{ |
|||
new TipsWindow("请先查询Sku数据").ShowDialog(); |
|||
return; |
|||
} |
|||
CertificateModel.BrandName = BrandName; |
|||
setCerWindow = new SetCerWindow(); |
|||
setCerWindow.ShowDialog(); |
|||
//throw new NotImplementedException();
|
|||
} |
|||
/// <summary>
|
|||
/// 保存合格证
|
|||
/// </summary>
|
|||
private void SaveCer() |
|||
{ |
|||
if (string.IsNullOrEmpty(CertificateModel.ExcuteStander) || string.IsNullOrEmpty(CertificateModel.ProductNo) |
|||
|| string.IsNullOrEmpty(CertificateModel.Shader) || string.IsNullOrEmpty(CertificateModel.BrandName) |
|||
|| string.IsNullOrEmpty(CertificateModel.Brand) || string.IsNullOrEmpty(CertificateModel.ProductShop) |
|||
|| string.IsNullOrEmpty(CertificateModel.ProductAdress)) |
|||
{ |
|||
new TipsWindow("参数出错!请重新填写!").ShowDialog(); |
|||
return; |
|||
} |
|||
var standers = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); |
|||
CertificateLabelModel labelModel = CertificateLabelModel.CerStanderSingle; |
|||
bool IsTwo = false; |
|||
|
|||
if (standers.Count() > 2) |
|||
{ |
|||
IsTwo = true; |
|||
} |
|||
|
|||
switch (CertificateModel.IsLogo) |
|||
{ |
|||
case 0://没图
|
|||
if (IsTwo) |
|||
{ |
|||
labelModel = CertificateLabelModel.CerStanderDouble; break; |
|||
} |
|||
labelModel = CertificateLabelModel.CerStanderSingle; |
|||
break; |
|||
case 1://含3c图
|
|||
if (IsTwo) |
|||
{ |
|||
labelModel = CertificateLabelModel.Cer3CDouble; break; |
|||
} |
|||
labelModel = CertificateLabelModel.Cer3CSingle; |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
CertificateModel.LabelModel = labelModel; |
|||
var resData = packTaskService.SaveCer(new CerRequest |
|||
{ |
|||
Brand = CertificateModel.Brand, |
|||
BrandName = CertificateModel.BrandName, |
|||
ProductNo = CertificateModel.ProductNo, |
|||
SkuId = CertificateModel.SkuId, |
|||
ExcuteStander = CertificateModel.ExcuteStander, |
|||
LabelModel = (int)CertificateModel.LabelModel, |
|||
FactoryNumber = CertificateModel.FactoryNumber, |
|||
IsLogo = CertificateModel.IsLogo, |
|||
ProductAdress = CertificateModel.ProductAdress, |
|||
ProductShop = CertificateModel.ProductShop, |
|||
Shader = CertificateModel.Shader |
|||
|
|||
|
|||
}); |
|||
if (resData == null || !resData.Success) |
|||
{ |
|||
IsSetCertificate = false; |
|||
return; |
|||
} |
|||
CertificateModel.Id = resData.Data; |
|||
IsSetCertificate = false; |
|||
setCerWindow.Close(); |
|||
} |
|||
|
|||
SetBarCodeWindow setBarCodeWindow = null; SetCerWindow setCerWindow = null; |
|||
private void SetBarCode() |
|||
{ |
|||
|
|||
if (BarCodeModel == null) |
|||
{ |
|||
new TipsWindow("请先查询sku数据").ShowDialog(); |
|||
return; |
|||
} |
|||
BarCodeModel.BrandName = BrandName; |
|||
setBarCodeWindow = new SetBarCodeWindow(); |
|||
|
|||
setBarCodeWindow.ShowDialog(); |
|||
} |
|||
|
|||
public BarcodeLabelModel LabelModel = BarcodeLabelModel.barsimplify; |
|||
|
|||
private void SaveBarCode() |
|||
{ |
|||
//保存到服务器中 返回id
|
|||
var resData = packTaskService.SaveBarCode(new BarCodeRequest |
|||
{ |
|||
Brand = Brand, |
|||
BrandName = BrandName, |
|||
ProductNo = ProductNo, |
|||
SkuId = SkuId, |
|||
SkuName = SkuName, |
|||
LabelModel = LabelModel |
|||
|
|||
}); |
|||
if (resData == null || !resData.Success) |
|||
{ |
|||
IsSetBarCode = false; |
|||
return; |
|||
} |
|||
BarCodeId = resData.Data; |
|||
BarCodeModel.Id = BarCodeId; |
|||
IsSetBarCode = false; |
|||
setBarCodeWindow.Close(); |
|||
} |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 发布任务
|
|||
/// </summary>
|
|||
public void CreateTask(object obj) |
|||
{ |
|||
|
|||
|
|||
if (string.IsNullOrEmpty(SkuId)) |
|||
{ |
|||
new TipsWindow("请先搜索SkuId!").ShowDialog(); |
|||
return; |
|||
} |
|||
string increateStr = ""; |
|||
var increates = IncreateList.Where(i => i.IsSelected).Select(i => i.IncreateName); |
|||
if (increates != null && increates.Count() > 0) |
|||
{ |
|||
increateStr = string.Join(",", increates); |
|||
} |
|||
|
|||
|
|||
var createTaskModel = new Models.APIModel.Request.CreateTaskRequest |
|||
{ |
|||
BrandName = BrandName, |
|||
Availability = (int)Availability, |
|||
BasicPack = (int)BasicPack, |
|||
SkuId = SkuId, |
|||
CreateTime = DateTime.Now, |
|||
Increment1 = increateStr, |
|||
Increment2 = (int)Increment2, |
|||
CertificatePosition = (int)CertificatePosition, |
|||
PackType = (int)PackType, |
|||
MarkMessage = markMessage, |
|||
PositionType = (int)PositionType, |
|||
GoodsNumber = GoodsNumber, |
|||
SkuGoodsTitle = SkuTitle, |
|||
SkuCount = SkuCount, |
|||
UserId = AccepUserId, |
|||
ShopId = globalContext.User.Shop.ShopId.ToString(), |
|||
IsWorry = IsWorry |
|||
}; |
|||
if (IsNeedBarCode == "需要") |
|||
{ |
|||
if (BarCodeModel == null || BarCodeModel.Id <= 0) |
|||
{ |
|||
new TipsWindow("请设置条形码模板").ShowDialog(); |
|||
return; |
|||
} |
|||
createTaskModel.BarCodeId = BarCodeId; |
|||
} |
|||
if (IsNeedCertificateModel == "需要") |
|||
{ |
|||
if (CertificateModel == null || CertificateModel.Id <= 0) |
|||
{ |
|||
new TipsWindow("请设置合格证模板").ShowDialog(); |
|||
return; |
|||
} |
|||
createTaskModel.CertificateId = CertificateModel.Id;//
|
|||
} |
|||
|
|||
var res = packTaskService.CreateTask(createTaskModel); |
|||
if (res.Success) |
|||
{ |
|||
// Application.Current.Shutdown(0);
|
|||
new TipsWindow("发布成功").ShowDialog(); |
|||
var win = obj as System.Windows.Window; |
|||
win.Close(); |
|||
|
|||
|
|||
|
|||
//MessageBox.Success("发布成功");
|
|||
} |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 搜索 skuId
|
|||
/// </summary>
|
|||
public void SearchSku() |
|||
{ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
IsLoading = true; |
|||
SkuId = searchSkuId; |
|||
ApiResponse<ProductListResponse> productApiResponse = null; |
|||
var skuResponse = productService.GetProductSkuList(string.Empty, SkuId); |
|||
if (skuResponse.Success) |
|||
{ |
|||
if (skuResponse.Data.Count == 0) |
|||
{ |
|||
IsLoading = false; |
|||
return; |
|||
} |
|||
Logo = skuResponse.Data[0].Logo; |
|||
SkuName = skuResponse.Data[0].Title; |
|||
// ProductNo = skuResponse.Data[0].ProductItemNum;
|
|||
|
|||
|
|||
|
|||
productApiResponse = productService.GetProductList(skuResponse.Data[0].ProductId, string.Empty, string.Empty, 1); |
|||
|
|||
if (productApiResponse.Success) |
|||
{ |
|||
if (productApiResponse.Data.Count == 0) |
|||
{ |
|||
IsLoading = false; |
|||
return; |
|||
} |
|||
|
|||
ProductNo = productApiResponse.Data.Items[0].ProductItemNum; |
|||
Brand = productApiResponse.Data.Items[0].BrandName; |
|||
|
|||
} |
|||
var productSku = packTaskService.GetProductSku(searchSkuId); |
|||
if (productSku == null || !productSku.Success) |
|||
{ |
|||
IsLoading = false; |
|||
return; |
|||
} |
|||
BrandName = productSku.Data.BrandName; |
|||
|
|||
IsSetCertificate = true; |
|||
CertificateModel = productSku.Data.Certificate; |
|||
if (CertificateModel == null) |
|||
{ |
|||
CertificateModel = new CertificateModel(); |
|||
|
|||
} |
|||
CertificateModel.Brand = Brand; |
|||
CertificateModel.BrandName = BrandName; |
|||
CertificateModel.ProductNo = ProductNo; |
|||
CertificateModel.SkuId = SkuId; |
|||
BarCodeModel = productSku.Data.BarCodeModel; |
|||
if (BarCodeModel == null) |
|||
{ |
|||
BarCodeModel = new BarCodeModel(); |
|||
} |
|||
BarCodeModel.Brand = Brand; |
|||
BarCodeModel.BrandName = BrandName; |
|||
BarCodeModel.ProductNo = ProductNo; |
|||
BarCodeModel.SkuId = SkuId; |
|||
BarCodeModel.SkuName = SkuName; |
|||
IsSetBarCode = true; |
|||
} |
|||
else |
|||
{ |
|||
IsLoading = false; |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(skuResponse.Msg, "加载sku")); |
|||
return; |
|||
} |
|||
|
|||
IsLoading = false; |
|||
//查看有木有存在
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,587 @@ |
|||
using AutoMapper; |
|||
using AutoMapper.Internal; |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel.Request; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Common.Models; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Reflection.Metadata.Ecma335; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Controls.Primitives; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class PackServiceViewModel : BaseVM, IDenpendency |
|||
{ |
|||
|
|||
|
|||
|
|||
|
|||
public ICommand AddPackServiceCommand { get; set; } |
|||
|
|||
public ICommand AddIncreateServiceCommand { get; set; } |
|||
|
|||
public ICommand AddConsumableCommand { get; set; } |
|||
|
|||
public ICommand UpLoadPackCommand { get; set; } |
|||
|
|||
public ICommand SetAllCountCommand { get; set; } |
|||
|
|||
|
|||
PackTaskService packTaskService; |
|||
ConsumableService consumableService; |
|||
|
|||
public ObservableCollection<PackItemModel> IncreateList { get; set; } = new ObservableCollection<PackItemModel>(); |
|||
|
|||
public ObservableCollection<PackItemModel> PackList { get; set; } = new ObservableCollection<PackItemModel>(); |
|||
|
|||
|
|||
public ObservableCollection<PackItemModel> ConsumableServiceList { get; set; } = new ObservableCollection<PackItemModel>(); |
|||
|
|||
|
|||
//private ObservableCollection<IncreateServiceModel> increateServiceList = new ObservableCollection<IncreateServiceModel>();
|
|||
public ObservableCollection<IncreateServiceModel> IncreateServiceList { get; set; } = new ObservableCollection<IncreateServiceModel>(); |
|||
public ObservableCollection<PackUser> MemberList { get; set; } = new ObservableCollection<PackUser>(); |
|||
|
|||
public ObservableCollection<ConsumableModel> ConsumableList { get; set; } = new ObservableCollection<ConsumableModel>(); |
|||
public ObservableCollection<WorkProcessModel> PackServiceList { get; set; } = new ObservableCollection<WorkProcessModel>(); |
|||
|
|||
|
|||
|
|||
IncreateServiceService increateService; |
|||
public PackServiceViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateService, long taskId) |
|||
{ |
|||
TaskId = taskId; |
|||
this.consumableService = consumableService; |
|||
this.packTaskService = packTaskService; |
|||
this.workProcessService = workProcessService; |
|||
this.increateService = increateService; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
var increateRes = increateService.SearchAll(); |
|||
if (increateRes.Success) |
|||
{ |
|||
if (increateRes.Data != null && increateRes.Data.Count() > 0) |
|||
{ |
|||
foreach (var workProcess in increateRes.Data) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
IncreateServiceList.Add(workProcess);//加载增值服务列表
|
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
var result = workProcessService.SearchAll(); |
|||
if (result.Success) |
|||
{ |
|||
if (result.Data != null && result.Data.Count() > 0) |
|||
{ |
|||
foreach (var workProcess in result.Data) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
PackServiceList.Add(workProcess);//加载工序服务列表
|
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
var res = packTaskService.GetPackMembers(); |
|||
if (res.Success) |
|||
{ |
|||
foreach (var item in res.Data) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
MemberList.Add(item); |
|||
}); |
|||
|
|||
} |
|||
|
|||
} |
|||
var conRes = this.consumableService.SearchAll(); |
|||
if (conRes.Success) |
|||
{ |
|||
foreach (var item in conRes.Data) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
|
|||
ConsumableList.Add(new ConsumableModel(consumableService) |
|||
{ |
|||
Width = item.Width, |
|||
Weigth = item.Weigth, |
|||
Remark = item.Remark, |
|||
Price = item.Price, |
|||
Name = item.Name, |
|||
Length = item.Length, |
|||
Heigth = item.Heigth, |
|||
Id = item.Id |
|||
|
|||
}); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
AddIncreateServiceCommand = new RelayCommand(AddIncreateService); |
|||
AddPackServiceCommand = new RelayCommand(AddPackService); |
|||
AddConsumableCommand = new RelayCommand(AddConsumable); |
|||
UpLoadPackCommand = new RelayCommand<object>(UpLoadPack); |
|||
SetAllCountCommand = new RelayCommand<object>(SetAllCount); |
|||
//加载数据
|
|||
|
|||
|
|||
|
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
var res = packTaskService.GetTaskService(TaskId); |
|||
if (res.Success) |
|||
{ |
|||
if (res.Data.IncreateList != null) |
|||
{ |
|||
foreach (var item in res.Data.IncreateList) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
IncreateList.Add(new PackItemModel(IncreateServiceList, MemberList) |
|||
{ |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
SelectId = item.SelectId, |
|||
SelectUserId = item.SelectUserId, |
|||
MemberName = item.MemberName |
|||
|
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
if (res.Data.PackList != null) |
|||
{ |
|||
foreach (var item in res.Data.PackList) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
PackList.Add(new PackItemModel(null, MemberList, null, PackServiceList) |
|||
{ |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
SelectId = item.SelectId, |
|||
SelectUserId = item.SelectUserId, |
|||
MemberName = item.MemberName |
|||
|
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
if (res.Data.ConsumableServiceList != null) |
|||
{ |
|||
foreach (var item in res.Data.ConsumableServiceList) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
ConsumableServiceList.Add(new PackItemModel(null, MemberList, ConsumableList) |
|||
{ |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
SelectId = item.SelectId, |
|||
// SelectUserId = item.SelectUserId,
|
|||
//MemberName = item.MemberName
|
|||
|
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
|
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 批量设置耗材数据
|
|||
/// </summary>
|
|||
/// <param name="obj"></param>
|
|||
private void SetAllCount(object obj) |
|||
{ |
|||
|
|||
SetCountWindow set = new SetCountWindow(); |
|||
set.SetCount = new Action<int>((s) => |
|||
{ |
|||
var lbox = obj as ListBox; |
|||
var serviceList = lbox.ItemsSource as ObservableCollection<PackItemModel>; |
|||
foreach (var item in serviceList) |
|||
{ |
|||
if (item.ItemName == null) |
|||
{ |
|||
item.ItemName = ConsumableList.SingleOrDefault(c => c.Id == item.SelectId).Name; |
|||
} |
|||
|
|||
item.ItemCount = s; |
|||
} |
|||
lbox.ItemsSource = serviceList; |
|||
|
|||
}); |
|||
set.Show(); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
private long taskId; |
|||
public long TaskId { get => taskId; set { Set(ref taskId, value); } } //
|
|||
|
|||
|
|||
private int taskCount; |
|||
public int TaskCount { get => taskCount; set { Set(ref taskCount, value); } } //
|
|||
|
|||
private string selectBox; |
|||
/// <summary>
|
|||
/// 箱子类型
|
|||
/// </summary>
|
|||
public string SelectBox { get => selectBox; set { Set(ref selectBox, value); } } |
|||
|
|||
|
|||
private int boxCount; |
|||
/// <summary>
|
|||
/// 箱子数
|
|||
/// </summary>
|
|||
public int BoxCount { get => boxCount; set { Set(ref boxCount, value); } } |
|||
private int airPaperWidth; |
|||
/// <summary>
|
|||
/// 气泡宽
|
|||
/// </summary>
|
|||
public int AirPaperWidth { get => airPaperWidth; set { Set(ref airPaperWidth, value); } } |
|||
|
|||
private decimal airPaperHeigth; |
|||
/// <summary>
|
|||
/// 气泡长
|
|||
/// </summary>
|
|||
public decimal AirPaperHeigth { get => airPaperHeigth; set { Set(ref airPaperHeigth, value); } } |
|||
|
|||
private string selectMemberId; |
|||
public string SelectMemberId { get => selectMemberId; set { Set(ref selectMemberId, value); } } |
|||
|
|||
private decimal jiaoDai; |
|||
public decimal JiaoDai { get => jiaoDai; set { Set(ref jiaoDai, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 上传数据 (判断是否超量) 统一上传
|
|||
/// </summary>
|
|||
private void UpLoadPack(object obj) |
|||
{ |
|||
UploadServiceRequest uploadService = new UploadServiceRequest(); |
|||
uploadService.TaskId = TaskId; |
|||
List<IncreateMemberModel> increateMembers = new List<IncreateMemberModel>(); |
|||
List<ProcessMemberModel> processMembers = new List<ProcessMemberModel>(); |
|||
// List<ConsumableTaskModel> consumableTasks = new List<ConsumableTaskModel>();
|
|||
|
|||
List<PersonTaskModel> PersonTaskModels = new List<PersonTaskModel>(); |
|||
|
|||
List<IncreateMemberModel> allIncreateMembers = new List<IncreateMemberModel>();//所有数据数量不能超过总数据
|
|||
List<ProcessMemberModel> allProcessMembers = new List<ProcessMemberModel>(); |
|||
List<ConsumableTaskModel> allConsumableTasks = new List<ConsumableTaskModel>(); |
|||
FeesItemResponse feesItem = new FeesItemResponse(); ; |
|||
|
|||
//获取打包人员
|
|||
List<string> packUsers = new List<string>(); |
|||
|
|||
decimal singleFees = 0; |
|||
decimal AllFees = 0; |
|||
decimal price = 0; |
|||
foreach (var item in IncreateList)//增值服务上传
|
|||
{ |
|||
if (item.SelectId <= 0 || string.IsNullOrEmpty(item.SelectUserId) || item.ItemCount <= 0) |
|||
{ |
|||
new TipsWindow($"数据输入有误").Show(); |
|||
return; |
|||
} |
|||
var member = MemberList.SingleOrDefault(m => m.Id == item.SelectUserId); |
|||
if (member != null && !packUsers.Contains(member.UserName)) |
|||
{ |
|||
packUsers.Add(member.UserName); |
|||
} |
|||
|
|||
if (item.ItemCount > TaskCount) |
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{item.ItemCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
price = IncreateServiceList.First(i => i.Id == item.SelectId).ServicePrice; |
|||
singleFees += price; |
|||
AllFees += item.ItemCount * price; |
|||
|
|||
|
|||
|
|||
|
|||
if (allIncreateMembers.Select(a => a.IncreateId).Contains(item.SelectId))//相同服务 存在累加
|
|||
{ |
|||
var inMembers = increateMembers.SingleOrDefault(a => a.UserId == item.SelectUserId && a.IncreateId == item.SelectId); |
|||
if (inMembers != null) |
|||
inMembers.IncreateCount += item.ItemCount; |
|||
|
|||
|
|||
|
|||
var data = allIncreateMembers.SingleOrDefault(a => a.IncreateId == item.SelectId); |
|||
var feeItem = feesItem.ServiceList.SingleOrDefault(f => f.ItemName == item.ItemName); |
|||
if (data != null) data.IncreateCount += item.ItemCount; |
|||
if (feeItem != null) feeItem.ItemCount += item.ItemCount; |
|||
if (data.IncreateCount > TaskCount)//累积超出任务量
|
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{data.IncreateCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
|
|||
continue; |
|||
} |
|||
|
|||
increateMembers.Add(new IncreateMemberModel |
|||
{ |
|||
UserId = item.SelectUserId, |
|||
IncreateCount = item.ItemCount, |
|||
IncreateId = item.SelectId, |
|||
Price = price |
|||
}); |
|||
|
|||
|
|||
feesItem.ServiceList.Add(new ServiceItemResponse |
|||
{ |
|||
ServiceType = ServiceType.增值服务, |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
ItemPrice = price |
|||
}); |
|||
allIncreateMembers.Add(new IncreateMemberModel |
|||
{ |
|||
UserId = item.SelectUserId, |
|||
IncreateCount = item.ItemCount, |
|||
IncreateId = item.SelectId |
|||
}); |
|||
} |
|||
|
|||
foreach (var item in PackList)//打包服务
|
|||
{ |
|||
if (item.SelectId <= 0 || string.IsNullOrEmpty(item.SelectUserId) || item.ItemCount <= 0) |
|||
{ |
|||
new TipsWindow($"数据输入有误").Show(); |
|||
return; |
|||
} |
|||
if (item.ItemCount > TaskCount) |
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{item.ItemCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
var member = MemberList.SingleOrDefault(m => m.Id == item.SelectUserId); |
|||
if (member != null && !packUsers.Contains(member.UserName)) |
|||
{ |
|||
packUsers.Add(member.UserName); |
|||
} |
|||
|
|||
|
|||
price = PackServiceList.First(i => i.Id == item.SelectId).ProcessPrice; |
|||
singleFees += price; |
|||
AllFees += item.ItemCount * price; |
|||
|
|||
if (allProcessMembers.Select(a => a.ProcessId).Contains(item.SelectId))//存在累加
|
|||
{ |
|||
var inMembers = processMembers.SingleOrDefault(a => a.UserId == item.SelectUserId && a.ProcessId == item.SelectId); |
|||
if (inMembers != null) |
|||
inMembers.ProcessCount += item.ItemCount; |
|||
|
|||
|
|||
var data = allProcessMembers.SingleOrDefault(a => a.ProcessId == item.SelectId); |
|||
var feeItem = feesItem.ServiceList.SingleOrDefault(f => f.ItemName == item.ItemName); |
|||
feeItem.ItemCount += item.ItemCount; |
|||
data.ProcessCount += item.ItemCount; |
|||
if (data.ProcessCount > TaskCount)//累积超出任务量
|
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{data.ProcessCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
continue; |
|||
} |
|||
processMembers.Add(new ProcessMemberModel |
|||
{ |
|||
UserId = item.SelectUserId, |
|||
ProcessCount = item.ItemCount, |
|||
ProcessId = item.SelectId, |
|||
Price = price |
|||
}); |
|||
feesItem.ServiceList.Add(new ServiceItemResponse |
|||
{ |
|||
ServiceType = ServiceType.打包服务, |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
ItemPrice = price |
|||
}); |
|||
allProcessMembers.Add(new ProcessMemberModel |
|||
{ |
|||
UserId = item.SelectUserId, |
|||
ProcessCount = item.ItemCount, |
|||
ProcessId = item.SelectId |
|||
}); |
|||
|
|||
|
|||
} |
|||
|
|||
foreach (var item in ConsumableServiceList) |
|||
{ |
|||
if (item.SelectId <= 0 || item.ItemCount <= 0) |
|||
{ |
|||
new TipsWindow($"数据输入有误").Show(); |
|||
return; |
|||
} |
|||
if (item.ItemCount > TaskCount) |
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{item.ItemCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
price = ConsumableList.First(i => i.Id == item.SelectId).Price.Value; |
|||
singleFees += price; |
|||
AllFees += item.ItemCount * price; |
|||
if (allConsumableTasks.Select(a => a.ConsumableId).Contains(item.SelectId))//存在累加
|
|||
{ |
|||
var data = allConsumableTasks.SingleOrDefault(a => a.ConsumableId == item.SelectId); |
|||
var feeItem = feesItem.ServiceList.SingleOrDefault(f => f.ItemName == item.ItemName); |
|||
feeItem.ItemCount += item.ItemCount; |
|||
data.ConsumableCount += item.ItemCount; |
|||
if (data.ConsumableCount > TaskCount)//累积超出任务量
|
|||
{ |
|||
new TipsWindow($"{item.ItemName}:{data.ConsumableCount}超出任务量{TaskCount}").Show(); |
|||
return; |
|||
} |
|||
continue; |
|||
} |
|||
feesItem.ServiceList.Add(new ServiceItemResponse |
|||
{ |
|||
ServiceType = ServiceType.耗材服务, |
|||
ItemCount = item.ItemCount, |
|||
ItemName = item.ItemName, |
|||
ItemPrice = price |
|||
}); |
|||
allConsumableTasks.Add(new ConsumableTaskModel |
|||
{ |
|||
ConsumableCount = item.ItemCount, |
|||
ConsumableId = item.SelectId |
|||
}); |
|||
} |
|||
uploadService.ConsumableIds = string.Join(",", allConsumableTasks.Select(a => a.ConsumableId)); |
|||
uploadService.ConsumableNos = string.Join(",", allConsumableTasks.Select(a => a.ConsumableCount)); |
|||
uploadService.WorkProcessIds = string.Join(",", allProcessMembers.Select(a => a.ProcessId)); |
|||
uploadService.WorkProcessNos = string.Join(",", allProcessMembers.Select(a => a.ProcessCount)); |
|||
uploadService.IncreateServiceIds = string.Join(",", allIncreateMembers.Select(a => a.IncreateId)); |
|||
uploadService.IncreateServiceNos = string.Join(",", allIncreateMembers.Select(a => a.IncreateCount)); |
|||
|
|||
//List<IncreateMemberModel> increateMembers = new List<IncreateMemberModel>();
|
|||
//List<ProcessMemberModel> processMembers = new List<ProcessMemberModel>();
|
|||
foreach (var item in increateMembers) |
|||
{ |
|||
var allFees = item.Price * item.IncreateCount; |
|||
var person = PersonTaskModels.SingleOrDefault(p => p.PackUserId == item.UserId); |
|||
if (person != null) |
|||
{ |
|||
person.AllFees += allFees; |
|||
person.IncreateServiceIds += $",{item.IncreateId}"; |
|||
person.IncreateServiceNos += $",{item.IncreateCount}"; |
|||
continue; |
|||
} |
|||
|
|||
var inMember = new PersonTaskModel(); |
|||
inMember.IncreateServiceIds = item.IncreateId.ToString(); |
|||
inMember.IncreateServiceNos = item.IncreateCount.ToString(); |
|||
inMember.AllFees += allFees; |
|||
inMember.TaskId = TaskId; inMember.PackUserId = item.UserId; |
|||
|
|||
PersonTaskModels.Add(inMember); |
|||
|
|||
|
|||
} |
|||
foreach (var item in processMembers) |
|||
{ |
|||
var allFees = item.Price * item.ProcessCount; |
|||
var person = PersonTaskModels.SingleOrDefault(p => p.PackUserId == item.UserId); |
|||
if (person != null) |
|||
{ |
|||
person.AllFees += allFees; |
|||
if (string.IsNullOrEmpty(person.WorkProcessIds)) |
|||
{ |
|||
person.WorkProcessIds += $"{item.ProcessId}"; |
|||
person.WorkProcessNos += $"{item.ProcessCount}"; |
|||
continue; |
|||
} |
|||
|
|||
|
|||
person.WorkProcessIds += $",{item.ProcessId}"; |
|||
person.WorkProcessNos += $",{item.ProcessCount}"; |
|||
|
|||
continue; |
|||
} |
|||
|
|||
var inMember = new PersonTaskModel(); |
|||
inMember.WorkProcessNos = item.ProcessCount.ToString(); |
|||
inMember.WorkProcessIds = item.ProcessId.ToString(); |
|||
inMember.AllFees += allFees; |
|||
inMember.TaskId = TaskId; inMember.PackUserId = item.UserId; |
|||
PersonTaskModels.Add(inMember); |
|||
|
|||
|
|||
} |
|||
uploadService.PersonTaskModels = PersonTaskModels.ToArray(); |
|||
|
|||
uploadService.AllFees = AllFees; |
|||
uploadService.SingleFees = singleFees; |
|||
var res = packTaskService.UploadService(uploadService); |
|||
if (res != null && res.Success) |
|||
{ |
|||
new TipsWindow("上传成功!").Show(); |
|||
var win = obj as System.Windows.Window; |
|||
feesItem.AllFees = AllFees; |
|||
feesItem.SingleFees = singleFees; |
|||
feesItem.TaskId = TaskId; |
|||
|
|||
|
|||
SetAllFees(feesItem, packUsers); |
|||
|
|||
win.Close(); |
|||
} |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 更新 打包员 和费用数据
|
|||
/// </summary>
|
|||
public Action<FeesItemResponse, List<string>> SetAllFees { get; set; } |
|||
|
|||
private void AddPackService() |
|||
{ |
|||
PackList.Add(new PackItemModel(null, MemberList, null, PackServiceList)); |
|||
} |
|||
WorkProcessService workProcessService; |
|||
private void AddIncreateService() |
|||
{ |
|||
IncreateList.Add(new PackItemModel(IncreateServiceList, MemberList)); |
|||
} |
|||
|
|||
private void AddConsumable() |
|||
{ |
|||
ConsumableServiceList.Add(new PackItemModel(null, null, ConsumableList)); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class SetBarCodeViewModel : BaseVM, IDenpendency |
|||
{ |
|||
public SetBarCodeViewModel(BarCodeModel model) |
|||
{ |
|||
|
|||
BarCodeModel = model; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
private BarCodeModel barCodeModel; |
|||
/// <summary>
|
|||
/// 绑定数据
|
|||
/// </summary>
|
|||
public BarCodeModel BarCodeModel { get => barCodeModel; set { Set(ref barCodeModel, value); } } |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,18 @@ |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class TipsViewModel : BaseVM, IDenpendency |
|||
{ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,388 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
using System.Linq; |
|||
using System.Windows.Controls; |
|||
using System.ComponentModel; |
|||
using HandyControl.Controls; |
|||
using System.Windows; |
|||
using System.Collections; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
|
|||
public partial class WareHouseListViewModel : BaseVM, IDenpendency//注入服务
|
|||
{ |
|||
|
|||
#region 属性绑定
|
|||
/// <summary>
|
|||
/// 查询时间段
|
|||
/// </summary>
|
|||
private DateTime startTime; |
|||
public DateTime StartTime { get => startTime; set { Set(ref startTime, value); } } |
|||
|
|||
private DateTime endTime; |
|||
public DateTime EndTime { get => endTime; set { Set(ref endTime, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 查询任务id
|
|||
/// </summary>
|
|||
private string searchTaskId; |
|||
public string SearchTaskId |
|||
{ |
|||
get => searchTaskId; set |
|||
{ |
|||
Set(ref searchTaskId, value); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查询Sku
|
|||
/// </summary>
|
|||
private string searchSkuId; |
|||
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } } |
|||
|
|||
public TaskState? taskState; |
|||
/// <summary>
|
|||
/// 任务状态
|
|||
/// </summary>
|
|||
public TaskState? TaskState |
|||
{ |
|||
get => taskState; private set |
|||
{ |
|||
Set(ref taskState, value); |
|||
} |
|||
} |
|||
|
|||
private int pageIndex = 1; |
|||
private int pageSize = 10; |
|||
private int orderCount;//总数量
|
|||
|
|||
private Visibility tipVisitity; |
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
public Visibility TipVisitity { get => tipVisitity; set { Set(ref tipVisitity, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 未到货数量
|
|||
/// </summary>
|
|||
public int NoArrivedCount { get => noArrivedCount; set { Set(ref noArrivedCount, value); } } |
|||
private int noArrivedCount; |
|||
private int someArrivedCount; |
|||
/// <summary>
|
|||
/// 部分到货数量
|
|||
/// </summary>
|
|||
public int SomeArrivedCount { get => someArrivedCount; set { Set(ref someArrivedCount, value); } } |
|||
private int worryCount; |
|||
/// <summary>
|
|||
/// 加急数
|
|||
/// </summary>
|
|||
public int WorryCount { get => worryCount; set { Set(ref worryCount, value); } } |
|||
|
|||
|
|||
private int arrivedCount; |
|||
/// <summary>
|
|||
/// 已到货数量
|
|||
/// </summary>
|
|||
public int ArrivedCount { get => arrivedCount; set { Set(ref arrivedCount, value); } } |
|||
//private int totalCount;
|
|||
///// <summary>
|
|||
///// 全部数量
|
|||
///// </summary>
|
|||
//public int TotalCount { get => totalCount; set { Set(ref totalCount, value); } }
|
|||
|
|||
|
|||
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
|||
|
|||
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
|||
|
|||
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } } |
|||
|
|||
private bool isLoading; |
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
WorkProcessService workProcessService; |
|||
private readonly PackTaskService packTaskService; |
|||
|
|||
private int? IsWorry { get; set; } |
|||
public int? taskStatus { get; set; } |
|||
private ObservableCollection<PackTaskModel> packTaskList; |
|||
/// <summary>
|
|||
/// 动态数据表
|
|||
/// </summary>
|
|||
public ObservableCollection<PackTaskModel> PackTaskList { get => packTaskList; set { Set(ref packTaskList, value); } } |
|||
|
|||
//private ObservableCollection<FeesItemTypeDTO> feesItems;
|
|||
///// <summary>
|
|||
///// 动态数据表
|
|||
///// </summary>
|
|||
//public ObservableCollection<FeesItemTypeDTO> FeesItems { get => feesItems; set { Set(ref feesItems, value); } }
|
|||
|
|||
|
|||
public string searchDepartment; |
|||
public string SearchDepartment |
|||
{ |
|||
get => searchDepartment; set |
|||
{ |
|||
Set(ref searchDepartment, value); |
|||
|
|||
} |
|||
} |
|||
|
|||
ConsumableService consumableService; |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
public WareHouseListViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService) |
|||
{ |
|||
this.packTaskService = packTaskService; |
|||
this.consumableService = consumableService; |
|||
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
|
|||
|
|||
SetTaskStateCommand = new RelayCommand<TaskState?>(SetTaskState); |
|||
|
|||
SearchTaskCommand = new RelayCommand(() => |
|||
{ |
|||
PageIndex = 1; |
|||
Task.Factory.StartNew(() => SearchTaskList()); //手动点击查询订单
|
|||
}); |
|||
TaskPageIndexChangedCommand = new RelayCommand<PageArgs>(p => |
|||
{ |
|||
LoadIndex(p.PageIndex); |
|||
}); |
|||
|
|||
|
|||
StartTime = DateTime.Now.Date; |
|||
EndTime = DateTime.Now.Date; |
|||
IsLoading = false; |
|||
|
|||
|
|||
//加载数据
|
|||
SetTaskState(Models.TaskState.全部); |
|||
this.workProcessService = workProcessService; |
|||
this.increateServiceService = increateServiceService; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
private void IsLoadCount() |
|||
{ |
|||
var packTaskResult = packTaskService.GetWareAllCount(); |
|||
if (packTaskResult != null && packTaskResult.Success) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
ArrivedCount = packTaskResult.Data.ArrivedCount; |
|||
NoArrivedCount = packTaskResult.Data.NoArrivedCount; |
|||
SomeArrivedCount = packTaskResult.Data.SomeArrivedCount; |
|||
WorryCount = packTaskResult.Data.WorryCount; |
|||
}); |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
private void LoadIndex(int pageIndex) |
|||
{ |
|||
PageIndex = pageIndex;//
|
|||
SearchTaskList(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
#region 事件绑定
|
|||
/// <summary>
|
|||
/// 筛选数据
|
|||
/// </summary>
|
|||
public ICommand SetTaskStateCommand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 搜索数据
|
|||
/// </summary>
|
|||
public ICommand SearchTaskCommand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建任务
|
|||
/// </summary>
|
|||
public ICommand CreateTaskCommand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 页面改变事件
|
|||
/// </summary>
|
|||
public ICommand TaskPageIndexChangedCommand { get; set; } |
|||
|
|||
|
|||
public void SetTaskState(TaskState? taskState) |
|||
{ |
|||
IsWorry = null; |
|||
TaskState = null; |
|||
taskStatus = null; |
|||
switch (taskState) |
|||
{ |
|||
case null: |
|||
break; |
|||
case Models.TaskState.已到货: |
|||
case Models.TaskState.部分到货: //未完成的数据
|
|||
case Models.TaskState.未到货: |
|||
TaskState = taskState; |
|||
taskStatus = 0; |
|||
break; |
|||
case Models.TaskState.全部: //所有数据
|
|||
|
|||
break; |
|||
case Models.TaskState.已完成: |
|||
|
|||
taskStatus = 1; |
|||
break; |
|||
case Models.TaskState.加急: |
|||
|
|||
IsWorry = 1; |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
SearchTaskList(); |
|||
|
|||
} |
|||
|
|||
private IncreateServiceService increateServiceService; |
|||
/// <summary>
|
|||
/// 搜索任务列表
|
|||
/// </summary>
|
|||
public void SearchTaskList() |
|||
{ |
|||
IsLoading = true; |
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
|
|||
var datas = packTaskService.GetWareHouseList(IsWorry, SearchDepartment, SearchSkuId, SearchTaskId, StartTime, EndTime, (this.TaskState), taskStatus, |
|||
PageIndex, PageSize); |
|||
if (datas != null && datas.Data != null && datas.Success) |
|||
{ |
|||
var dataModel = datas.Data; |
|||
OrderCount = dataModel.TotalCount; |
|||
foreach (var item in dataModel.Items) |
|||
{ |
|||
|
|||
var data = new PackTaskModel(packTaskService,consumableService,workProcessService, increateServiceService) |
|||
{ |
|||
AcceptName = item.UserName, |
|||
Availability = (TaskState)item.Availability, |
|||
BasicPack = (BasicPack)item.BasicPack, |
|||
DepartmentName = item.DepartmentName, |
|||
CertificatePosition = (CertificatePosition)item.CertificatePosition, |
|||
|
|||
GoodsNumber = item.GoodsNumber, |
|||
Increment1 = item.Increment1, |
|||
Increment2 = (Increment)item.Increment2, |
|||
ItemList = new List<SkuMessage>() { new SkuMessage |
|||
{ BrandName = item.BrandName, |
|||
GoodsNo = item.ProductItemNum, Logo= item.Logo, |
|||
ShopName = item.ShopName, SkuName = item.SkuName |
|||
|
|||
} }, |
|||
MarkMessage = item.MarkMessage, |
|||
PackType = (PackType)item.PackType, |
|||
|
|||
PositionType = (PositionType)item.PositionType, |
|||
SkuCount = item.SkuCount, |
|||
SkuTitle = item.SkuGoodsTitle, |
|||
TaskId = item.TaskId, |
|||
TaskStatus = (TaskStateType)item.TaskStatus, |
|||
EndTime = item.CreateTime |
|||
|
|||
|
|||
}; |
|||
if (item.BarCodeDTO != null && item.BarCodeDTO.Id > 0) |
|||
{ |
|||
|
|||
data.BarCodeModel = item.BarCodeDTO; |
|||
|
|||
} |
|||
if (item.certificate != null) |
|||
{ |
|||
data.CertificateModel = item.certificate; |
|||
|
|||
} |
|||
|
|||
if (item.FeesItemResponse!=null) |
|||
{ |
|||
data.FeesItemResponse = item.FeesItemResponse; |
|||
data.FeesMoney = item.FeesItemResponse.SingleFees; |
|||
|
|||
data.IsShowFees = data.FeesMoney > 0 ? true : false; |
|||
|
|||
} |
|||
else |
|||
{ |
|||
data.IsShowFees = false; |
|||
} |
|||
|
|||
if (item.PackUserName != null && item.PackUserName.Count() > 0) |
|||
{ |
|||
data.PackUser = string.Join("\r\n", item.PackUserName); |
|||
} |
|||
|
|||
App.Current.Dispatcher.BeginInvoke(new Action(() => |
|||
{ |
|||
PackTaskList.Add(data); |
|||
})); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
else |
|||
{ |
|||
App.Current.Dispatcher.BeginInvoke(new Action(() => |
|||
{ |
|||
new TipsWindow("查不到数据").Show(); |
|||
})); |
|||
} |
|||
IsLoadCount(); |
|||
IsLoading = false; |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,196 @@ |
|||
<Page x:Class="BBWY.Client.Views.PackTask.Consumable" |
|||
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.PackTask" |
|||
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 Consumable,Source={StaticResource Locator}}" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="1300" |
|||
Title="Consumable"> |
|||
<!--DataContext="{Binding Consumable,Source={StaticResource Locator}}"--> |
|||
<Page.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> |
|||
|
|||
</Page.Resources> |
|||
<Grid> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
|
|||
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="100" Margin="220 25 0 0" > |
|||
<c:BTextBox x:Name="consumableName" Width="150" Height="30" TextChanged="consumableName_TextChanged" Text="{Binding SearchName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox> |
|||
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="ListBox_SelectionChanged" Background="{StaticResource Border.Background}"> |
|||
|
|||
</ListBox> |
|||
|
|||
</StackPanel> |
|||
<Grid Margin="0 10 0 0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="54"/> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="30"/> |
|||
<!----> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Stretch" Panel.ZIndex="10" Margin="10,5,0,0" > |
|||
|
|||
<StackPanel Orientation="Horizontal" Height="35"> |
|||
<!-- Command="{Binding AddConsumableCommand}"--> |
|||
<c:BButton Content="添加耗材" Width="118" VerticalAlignment="Stretch" Margin="15,0,0,0" |
|||
Command="{Binding AddConsumableCommand}" |
|||
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"> |
|||
</c:BButton> |
|||
<TextBlock Text="耗材品名:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
|
|||
</StackPanel> |
|||
<Button Content="搜索" Height="35" Width="66" VerticalAlignment="Stretch" Margin="5,0,10,0" |
|||
Command="{Binding SearchConsumableCommand}" HorizontalAlignment="Right" |
|||
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" Margin="0,29,0,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="35"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="{StaticResource Border.Background}" Margin="10 0 5 0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="250"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="170"/> |
|||
|
|||
</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="尺寸(cm)" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="备注" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="操作" Grid.Column="5" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<Border Height="1" BorderBrush="{StaticResource Border.Brush}" Grid.Row="1" VerticalAlignment="Top" Grid.ColumnSpan="6" BorderThickness="1"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
</Grid> |
|||
<!--ItemsSource="{Binding OrderList}"--> |
|||
<ListBox x:Name="listbox_order" Margin="10 0 5 0" |
|||
Grid.Row="1" |
|||
ItemsSource="{Binding ConsumableList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0,1,0,0" |
|||
Foreground="{StaticResource Text.Color}" |
|||
> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
|||
MinHeight="60"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="250"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition Width="*"/> |
|||
<ColumnDefinition Width="170"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid Grid.Column="0"> |
|||
<TextBlock |
|||
Text="{Binding Name}" |
|||
TextWrapping="Wrap" |
|||
VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Column="1"> |
|||
<TextBlock |
|||
Text="{Binding Price}" |
|||
TextWrapping="Wrap" |
|||
VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Column="2"> |
|||
<TextBlock |
|||
Text="{Binding Weigth}" |
|||
TextWrapping="Wrap" |
|||
VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
/> |
|||
</Grid> |
|||
<Grid Grid.Column="3"> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
TextWrapping="Wrap" |
|||
> |
|||
<Run Text="{Binding Length}"/> |
|||
<Run Text="*" /> |
|||
<Run Text="{Binding Width}"/> |
|||
<Run Text="*" /> |
|||
<Run Text="{Binding Heigth}"/> |
|||
</TextBlock> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" > |
|||
<TextBlock TextAlignment="Center" |
|||
Text="{Binding Remark}" |
|||
TextWrapping="Wrap" |
|||
VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
/> |
|||
</Grid> |
|||
<Grid Grid.Column="5"> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> |
|||
<c:BButton Background="Transparent" Foreground="Blue" Content="编辑" Command="{Binding EditConsumableCommand}" Margin="0 0 10 0"/> |
|||
<c:BButton Background="Transparent" Foreground="Blue" Content="删除" Command="{Binding DeletedConsumableCommand}" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}" |
|||
/> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
<Border Height="1" VerticalAlignment="Bottom" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="6"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<c:PageControl PageIndex="{Binding PageIndex}" |
|||
PageSize="{Binding PageSize}" |
|||
RecordCount="{Binding OrderCount}" |
|||
Grid.Row="3" |
|||
HorizontalAlignment="Left" Width="450"> |
|||
<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,164 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Client.ViewModels.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Messaging; |
|||
using HandyControl.Controls; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Reflection; |
|||
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.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// Consumable.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class Consumable : Page |
|||
{ |
|||
|
|||
public ConsumableViewModel model; |
|||
// public ConsumableService consumableService;
|
|||
public Consumable() |
|||
{ |
|||
//this.consumableService = consumableService;
|
|||
InitializeComponent(); |
|||
// model = new ConsumableViewModel(consumableService);
|
|||
//model.ReflashDatas = GetList;
|
|||
//this.DataContext = model;
|
|||
|
|||
|
|||
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); |
|||
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true); |
|||
var Configuration = builder.Build(); |
|||
|
|||
QKApiHost = Configuration.GetSection("QKApiHost").Value; |
|||
|
|||
|
|||
Messenger.Default.Register<bool>(this, message => |
|||
{ |
|||
|
|||
GetList(); |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
string QKApiHost = ""; |
|||
|
|||
|
|||
|
|||
List<string> consumables = new List<string>(); |
|||
|
|||
private void ListBox_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; |
|||
consumableName.Text = content.Content.ToString(); |
|||
tipBox.Visibility = Visibility.Collapsed; |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
private void consumableName_TextChanged(object sender, TextChangedEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
var textBoxt = (BTextBox)sender; |
|||
//创建一个ListBox
|
|||
|
|||
if (tipBox != null && tipBox.Items.Count > 0) |
|||
{ |
|||
tipBox.Items.Clear(); |
|||
|
|||
} |
|||
|
|||
if (consumables.Count <= 0) |
|||
{ |
|||
GetList(); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(textBoxt.Text)) |
|||
{ |
|||
tipBox.Visibility = Visibility.Collapsed; |
|||
return; |
|||
} |
|||
foreach (var department in consumables) |
|||
{ |
|||
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) |
|||
{ |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 刷新数据
|
|||
/// </summary>
|
|||
private void GetList() |
|||
{ |
|||
HttpClientHelper helper = new HttpClientHelper(QKApiHost); |
|||
|
|||
string url = $"{QKApiHost}/api/Consumable/SearchAll";//获取所有数据
|
|||
var data = helper.Get(url); |
|||
var res = JsonConvert.DeserializeObject<ApiResponse<ConsumableModel[]>>(data); |
|||
//创建一个ListBoxIem
|
|||
if (res.Success) |
|||
{ |
|||
|
|||
if (res.Data != null && res.Data.Count() > 0) |
|||
{ |
|||
consumables = new List<string>(); |
|||
foreach (var department in res.Data) |
|||
{ |
|||
if (!consumables.Contains(department.Name)) |
|||
{ |
|||
consumables.Add(department.Name); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,341 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.CreatePackTask" |
|||
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.PackTask" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
mc:Ignorable="d" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
Title="CreatePackTask" Height="350" Width="1500"> |
|||
<!-- DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" --> |
|||
<Window.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> |
|||
|
|||
</Window.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="150"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
<Grid Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="发布任务" VerticalAlignment="Center" HorizontalAlignment="Center" /> |
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="350"/> |
|||
<ColumnDefinition Width="350"/> |
|||
<ColumnDefinition Width="350"/> |
|||
<ColumnDefinition Width="*"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid Grid.Column="0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="2*"/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BTextBox Width="200" Margin="10,0,5,0" Height="35" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="请输入SkuId"/> |
|||
<Button Content="查询" Width="118" Height="35" VerticalAlignment="Stretch" Command="{Binding SearchSkuCommand}" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1" Margin="10,0,0,0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<c:BAsyncImage UrlSource="{Binding Logo}" |
|||
Width="80" DecodePixelWidth="80" |
|||
VerticalAlignment="Top" Margin="0,5,0,0" |
|||
Cursor="Hand"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction > |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<!--<Binding Path="DataContext.Id" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1}"/> |
|||
<Binding Path="Id"/>--> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
|
|||
<!--<Image Height="80" Width="80" Source="{Binding Logo}" Grid.Column="0"/>--> |
|||
<Grid Grid.Column="2" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock VerticalAlignment="Center" Margin="10,0"> |
|||
<Run Text="SKU名称: "/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<TextBlock Grid.Row="1" VerticalAlignment="Center" Margin="10,0"> |
|||
<Run Text="货号: "/> |
|||
<Run Text="{Binding ProductNo}"/> |
|||
</TextBlock> |
|||
<Grid Grid.Row="2" VerticalAlignment="Center" Margin="10,0"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center"/> |
|||
<c:BTextBox Width="200" Margin="10,0,0,0" Text="{Binding BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="请输入品名"/> |
|||
</Grid> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
</Grid> |
|||
<Grid Margin="10" Grid.Column="1" Background="{StaticResource Border.Background}"> |
|||
<Button Content="设置条形码" Width="100" Height="30" VerticalAlignment="Center" Command="{Binding SetBarCodeCommand}" |
|||
Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
<StackPanel Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }" Orientation="Horizontal" HorizontalAlignment="Center" > |
|||
<Button Content="预览" Width="100" Height="30" VerticalAlignment="Center" Command="{Binding LookBarCommand}" |
|||
Background="#2879ff" BorderThickness="0" Foreground="White"/> |
|||
<Button Content="修改" Width="100" Height="30" VerticalAlignment="Center" Command="{Binding SetBarCodeCommand}" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
|
|||
</StackPanel > |
|||
</Grid> |
|||
<Grid Margin="10" Grid.Column="2" Background="{StaticResource Border.Background}"> |
|||
<Button Content="设置合格证" Width="100" Height="30" VerticalAlignment="Center" |
|||
Command="{Binding SetCertificateCommand}" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }"> |
|||
<Button Content="预览" Width="100" Height="30" VerticalAlignment="Center" Command="{Binding LookCerCommand}" |
|||
Background="#2879ff" BorderThickness="0" Foreground="White"/> |
|||
<Button Content="修改" Width="100" Height="30" VerticalAlignment="Center" Command="{Binding SetCertificateCommand}" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
|
|||
</StackPanel > |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
<Grid Margin="10" Grid.Row="2"> |
|||
|
|||
<Grid > |
|||
<Grid.Resources> |
|||
|
|||
|
|||
<Style TargetType="TextBlock"> |
|||
<Setter Property="HorizontalAlignment" Value="Center"/> |
|||
<Setter Property="VerticalAlignment" Value="Center"/> |
|||
<Setter Property="FontSize" Value="12"/> |
|||
<Setter Property="FontFamily" Value="微软雅黑"/> |
|||
</Style> |
|||
<Style TargetType="Border" > |
|||
<Setter Property="BorderBrush" Value="{StaticResource Border.Brush}"/> |
|||
<Setter Property="BorderThickness" Value="1"/> |
|||
</Style> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid.Resources> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="100" /> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition MinWidth="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="*"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="40" /> |
|||
</Grid.RowDefinitions> |
|||
<Border Grid.Row="0" Grid.Column="0" /> |
|||
<Border Grid.Row="0" Grid.Column="1" /> |
|||
<Border Grid.Row="0" Grid.Column="2" /> |
|||
<Border Grid.Row="0" Grid.Column="3"/> |
|||
<Border Grid.Row="0" Grid.Column="4" /> |
|||
<Border Grid.Row="0" Grid.Column="5" /> |
|||
<Border Grid.Row="0" Grid.Column="6" /> |
|||
<Border Grid.Row="0" Grid.Column="7" /> |
|||
<Border Grid.Row="0" Grid.Column="8" /> |
|||
<Border Grid.Row="0" Grid.Column="9"/> |
|||
<Border Grid.Row="0" Grid.Column="10" /> |
|||
<Border Grid.Row="0" Grid.Column="11" /> |
|||
<Border Grid.Row="0" Grid.Column="12" /> |
|||
<Border Grid.Row="0" Grid.Column="13" /> |
|||
|
|||
<Border Grid.Row="1" Grid.Column="0" /> |
|||
<Border Grid.Row="1" Grid.Column="1" /> |
|||
<Border Grid.Row="1" Grid.Column="2" /> |
|||
<Border Grid.Row="1" Grid.Column="3"/> |
|||
<Border Grid.Row="1" Grid.Column="4" /> |
|||
<Border Grid.Row="1" Grid.Column="5" /> |
|||
<Border Grid.Row="1" Grid.Column="6" /> |
|||
<Border Grid.Row="1" Grid.Column="7" /> |
|||
<Border Grid.Row="1" Grid.Column="8" /> |
|||
<Border Grid.Row="1" Grid.Column="9"/> |
|||
<Border Grid.Row="1" Grid.Column="10" /> |
|||
<Border Grid.Row="1" Grid.Column="11" /> |
|||
<Border Grid.Row="1" Grid.Column="12" /> |
|||
<Border Grid.Row="1" Grid.Column="13" /> |
|||
|
|||
|
|||
<TextBlock Grid.Row="0" Grid.Column="0" Text="SKU数量"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="1" Text="到货情况"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="2" Text="加急"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="3" Text="落仓"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="4" Text="组合类型"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="5" Text="配件数量"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="6" Text="SKU配件商品"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="7" Text="基础包装"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="8" Text="增量耗材"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="9" Text="增量耗材"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="10" Text="条码标签"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="11" Text="合格证"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="12" Text="合格证位置"/> |
|||
<TextBlock Grid.Row="0" Grid.Column="13" Text="注意事项/对接备注"/> |
|||
|
|||
|
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="0" Height="30" Text="{Binding SkuCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" /> |
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="5" Height="30" Margin="5" Text="{Binding GoodsNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="6" Height="30" Margin="5" Text="{Binding SkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="13" Margin="5" Height="30" Text="{Binding MarkMessage,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
|
|||
<Grid Grid.Row="1" Grid.Column="1" > |
|||
|
|||
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding Availability}" > |
|||
<ComboBoxItem Content="已到货" IsSelected="True" /> |
|||
<ComboBoxItem Content="部分到货"/> |
|||
<ComboBoxItem Content="未到货"/> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="2" > |
|||
<ComboBox VerticalContentAlignment="Center" Text="{Binding IsWorry}" Margin="5" > |
|||
<ComboBoxItem Content="否" IsSelected="True" /> |
|||
<ComboBoxItem Content="是"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="3" > |
|||
<ComboBox VerticalContentAlignment="Center" Text="{Binding PositionType}" Margin="5" > |
|||
<ComboBoxItem Content="本地仓" IsSelected="True" /> |
|||
<ComboBoxItem Content="齐越仓"/> |
|||
<ComboBoxItem Content="京东仓"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="4" > |
|||
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding PackType}" > |
|||
<ComboBoxItem Content="单件" IsSelected="True" /> |
|||
<ComboBoxItem Content="多件"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" Grid.Column="7" > |
|||
<ComboBox BorderBrush="Transparent" VerticalContentAlignment="Center" Margin="5" Text="{Binding BasicPack}" > |
|||
<ComboBoxItem Content="快递袋" IsSelected="True" /> |
|||
<ComboBoxItem Content="纸箱"/> |
|||
<ComboBoxItem Content="麻袋"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" Grid.Column="8"> |
|||
<c:BTextBox WaterRemark="增量耗材关键字" HorizontalAlignment="Stretch" BorderBrush="Transparent" |
|||
Text="{Binding SearchIncrementKeyWord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="9"> |
|||
<Grid.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> |
|||
</Grid.Resources> |
|||
<hc:CheckComboBox IsTextSearchEnabled="True" ItemsSource="{Binding IncreateList}" |
|||
ShowClearButton="True" |
|||
MinWidth="90" |
|||
Height="25" |
|||
Margin="5,0,5,0"> |
|||
<hc:CheckComboBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Orientation="Horizontal" Margin="5,2.5"> |
|||
<CheckBox Content="{Binding IncreateName}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</hc:CheckComboBox.ItemTemplate> |
|||
<hc:CheckComboBox.ItemContainerStyle> |
|||
<Style TargetType="{x:Type hc:CheckComboBoxItem}" BasedOn="{StaticResource NoBgListBoxItemStyle}"> |
|||
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</Style> |
|||
</hc:CheckComboBox.ItemContainerStyle> |
|||
</hc:CheckComboBox> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" Grid.Column="10" > |
|||
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedBarCode}"> |
|||
<ComboBoxItem Content="需要" /> |
|||
<ComboBoxItem Content="不需要" IsSelected="True"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="11" > |
|||
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedCertificateModel}"> |
|||
<ComboBoxItem Content="需要" /> |
|||
<ComboBoxItem Content="不需要" IsSelected="True"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="12" > |
|||
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding CertificatePosition}"> |
|||
<ComboBoxItem Content="外部包装" /> |
|||
<ComboBoxItem Content="产品包装"/> |
|||
<ComboBoxItem Content="无" IsSelected="True"/> |
|||
</ComboBox> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
<Grid Grid.Row="3"> |
|||
|
|||
<Button Content="发布" Width="100" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="0,2,5,2" |
|||
Command="{Binding CreateTaskCommand}" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
|||
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,53 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.ViewModels; |
|||
using BBWY.Client.ViewModels.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Messaging; |
|||
using NPOI.SS.Formula.Functions; |
|||
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.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// CreatePackTask.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class CreatePackTask : BWindow,IDenpendency |
|||
{ |
|||
|
|||
//CreatePackTaskViewModel model = null;//PackTaskService packTaskService,GlobalContext globalContext,ProductService productService
|
|||
public CreatePackTask() |
|||
{ |
|||
InitializeComponent(); |
|||
// ViewModelLocator vm = new ViewModelLocator();
|
|||
//this.DataContext = vm.CreateTaskView;
|
|||
// vm.CreateTaskView.Refresh();
|
|||
|
|||
|
|||
//model = new CreatePackTaskViewModel(packTaskService, globalContext, productService);
|
|||
//DataContext = model;
|
|||
} |
|||
|
|||
public void SendData() |
|||
{ |
|||
Messenger.Default.Send(true,"InitData"); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.EditConsumable" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Title="TipsWindow" Height="350" Width="640" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
|
|||
> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加耗材" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1"> |
|||
<TextBlock Text="{Binding Id,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Visibility="Hidden"/> |
|||
<TextBlock Text="耗材品名:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="33,33,0,0"/> |
|||
<c:BTextBox Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="180" VerticalAlignment="Top" Margin="93,30,0,0"/> |
|||
<TextBlock Text="金额:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="321,33,0,0"/> |
|||
<c:BTextBox Text="{Binding Price ,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="228" VerticalAlignment="Top" Margin="353,30,0,0"/> |
|||
<TextBlock Text="重量:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="57,73,0,0"/> |
|||
<c:BTextBox Text="{Binding Weigth,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="180" VerticalAlignment="Top" Margin="93,70,0,0"/> |
|||
<TextBlock Text="尺寸:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="321,73,0,0"/> |
|||
<c:BTextBox WaterRemark="长" Text="{Binding Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="64" VerticalAlignment="Top" Margin="353,70,0,0"/> |
|||
<c:BTextBox WaterRemark="宽" Text="{Binding Width,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="64" VerticalAlignment="Top" Margin="417,70,0,0"/> |
|||
<c:BTextBox WaterRemark="高" Text="{Binding Heigth,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="25" Width="64" VerticalAlignment="Top" Margin="481,70,0,0"/> |
|||
<Label Content="cm" Width="38" Height="25" Background="{StaticResource Border.Background}" HorizontalAlignment="Left" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="545,70,0,0"/> |
|||
|
|||
<TextBlock Text="备注:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="57,113,0,0"/> |
|||
<TextBox Text="{Binding Remark,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" VerticalAlignment="Top" AcceptsReturn="True" TextWrapping="Wrap" Height="115" Width="487" Margin="93,110,0,0"/> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<Border BorderThickness="0 1 0 0" Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Brush}"/> |
|||
<c:BButton Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Command="{Binding SaveConsumableCommand}" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,30 @@ |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// EditConsumable.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class EditConsumable : BWindow |
|||
{ |
|||
|
|||
|
|||
public EditConsumable(ConsumableModel model) |
|||
{ |
|||
InitializeComponent(); |
|||
this.DataContext = model; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.PackTask.FeesExcelControl" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="100" d:DesignWidth="1800"> |
|||
|
|||
<Grid x:Name ="gd"/> |
|||
|
|||
</UserControl> |
@ -0,0 +1,288 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using NPOI.POIFS.Crypt.Dsig; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading; |
|||
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.Markup; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// FeesExcelControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class FeesExcelControl : UserControl |
|||
{ |
|||
/// <summary>
|
|||
/// 是否仓库端
|
|||
/// </summary>
|
|||
public bool IsWareHouse |
|||
{ |
|||
get { return (bool)GetValue(IsWareHouseProperty); } |
|||
set |
|||
{ |
|||
SetValue(IsWareHouseProperty, value); |
|||
} |
|||
} |
|||
|
|||
|
|||
public static readonly DependencyProperty IsWareHouseProperty = |
|||
DependencyProperty.Register("IsWareHouse", typeof(bool), typeof(FeesExcelControl), new PropertyMetadata(true, ChangedProperty1)); |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 价格
|
|||
/// </summary>
|
|||
//public decimal FeesPrice
|
|||
//{
|
|||
// get { return (decimal)GetValue(FeesPriceProperty); }
|
|||
// set
|
|||
// {
|
|||
// SetValue(FeesPriceProperty, value);
|
|||
// }
|
|||
//}
|
|||
|
|||
|
|||
//public static readonly DependencyProperty FeesPriceProperty =
|
|||
// DependencyProperty.Register("FeesPrice", typeof(decimal), typeof(FeesExcelControl), new PropertyMetadata(ChangedProperty2));
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public FeesItemResponse FeesItem |
|||
{ |
|||
get |
|||
{ |
|||
return (FeesItemResponse)GetValue(FeesItemProperty); |
|||
|
|||
} |
|||
set |
|||
{ |
|||
SetValue(FeesItemProperty, value); |
|||
} |
|||
} |
|||
|
|||
|
|||
public static readonly DependencyProperty FeesItemProperty = |
|||
DependencyProperty.Register("FeesItem", typeof(FeesItemResponse), typeof(FeesExcelControl), new PropertyMetadata(ChangedProperty)); |
|||
|
|||
|
|||
private static void ChangedProperty1(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|||
{ |
|||
var control = d as FeesExcelControl; |
|||
|
|||
var newValue = e.NewValue as FeesItemResponse; |
|||
|
|||
} |
|||
|
|||
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|||
{ |
|||
var control = d as FeesExcelControl; |
|||
// control.Str
|
|||
var newValue = e.NewValue as FeesItemResponse; |
|||
control.FeesItem = newValue; |
|||
if (control.IsWareHouse) |
|||
{ |
|||
control.LoadData(false); |
|||
} |
|||
else |
|||
{ |
|||
control.LoadData(true); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
string xaml = @" <Grid xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
|
|||
<Grid.ColumnDefinitions > |
|||
[:Columns:] |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height=""30"" /> |
|||
<RowDefinition Height=""30"" /> |
|||
<RowDefinition Height=""30"" /> |
|||
</Grid.RowDefinitions> |
|||
<Border Background=""#F2F2F2"" Grid.RowSpan=""2"" Grid.ColumnSpan=""[:ColumnCount:]""/> |
|||
|
|||
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/> |
|||
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/> |
|||
|
|||
|
|||
|
|||
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""0,0,1,0""/> |
|||
|
|||
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|||
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount-2:]"" BorderThickness=""0,1,0,0""/> |
|||
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|||
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""2"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|||
|
|||
<TextBlock MinWidth=""84"" Text=""任务ID"" TextAlignment=""Center"" Grid.Column=""0"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
[:Header:] |
|||
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text=""总计"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
<TextBlock Text=""[:TaskId:]"" Grid.Row=""2"" Grid.Column=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
<TextBlock Text=""[:AllFees:]"" Grid.Row=""2"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
[:ListData:] |
|||
</Grid>";
|
|||
|
|||
/// <summary>
|
|||
/// index 从1开始 0+1
|
|||
/// </summary>
|
|||
string columnData = @"
|
|||
<Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""2"" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.RowSpan=""2"" BorderThickness=""0,0,1,0""/> |
|||
<TextBlock Text=""[:ServiceName:]"" Grid.Row=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
<TextBlock Text=""[:ServiceCount:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|||
</Grid>";
|
|||
string columnStr = "<ColumnDefinition />"; |
|||
|
|||
string increateService = @"<TextBlock Text=""增值服务"" Grid.Column=""1"" Grid.ColumnSpan=""[:IncreateCount:]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
|
|||
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+IncreateCount:]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/>";
|
|||
|
|||
string workProcess = "<TextBlock Text=\"打包服务\" Grid.Column=\"[:1+IncreateCount:]\" Grid.ColumnSpan=\"[:ProcessCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+IncreateCount+ProcessCount:]\" Grid.Row=\"0\" Grid.RowSpan=\"3\" BorderThickness=\"1,0,0,0\"/>\r\n "; |
|||
|
|||
string consumableService = "<TextBlock Text=\"打包耗材\" Grid.Column=\"[:1+IncreateCount+ProcessCount:]\" Grid.ColumnSpan=\"[:ConsumableCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+IncreateCount+ProcessCount:+ConsumableCount]\" Grid.Row=\"0\" Grid.RowSpan=\"3\" BorderThickness=\"1,0,0,0\"/>\r\n "; |
|||
|
|||
|
|||
public FeesExcelControl() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
private void LoadData(bool isPrice) |
|||
{ |
|||
|
|||
if (FeesItem == null || FeesItem.ServiceList.Count <= 0) |
|||
{ |
|||
return; |
|||
} |
|||
try |
|||
{ |
|||
|
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
gd.Children.Clear(); |
|||
}); |
|||
var increateList = FeesItem.ServiceList.Where(s => s.ServiceType == ServiceType.增值服务).ToList(); |
|||
var processList = FeesItem.ServiceList.Where(s => s.ServiceType == ServiceType.打包服务).ToList(); |
|||
var consumableList = FeesItem.ServiceList.Where(s => s.ServiceType == ServiceType.耗材服务).ToList(); |
|||
var increateCount = increateList.Count(); |
|||
var processCount = processList.Count(); |
|||
var consumableCount = consumableList.Count(); |
|||
|
|||
List<ServiceItemResponse> all = new List<ServiceItemResponse>(); |
|||
all.AddRange(increateList); |
|||
all.AddRange(processList); |
|||
all.AddRange(consumableList); |
|||
|
|||
|
|||
var columnCount = 2 + all.Count; |
|||
StringBuilder columns = new StringBuilder(); |
|||
for (int i = 0; i < columnCount; i++) |
|||
{ |
|||
columns.AppendLine(columnStr); |
|||
} |
|||
StringBuilder serviceData = new StringBuilder(); |
|||
|
|||
|
|||
|
|||
|
|||
if (isPrice) |
|||
{ |
|||
for (int i = 0; i < all.Count; i++) |
|||
{ |
|||
serviceData.AppendLine(columnData.Replace("[:index:]", $"{i + 1}") |
|||
.Replace("[:ServiceName:]", $"{all[i].ItemName}") |
|||
.Replace("[:ServiceCount:]", $"{all[i].ItemPrice}")); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
for (int i = 0; i < all.Count; i++) |
|||
{ |
|||
serviceData.AppendLine(columnData.Replace("[:index:]", $"{i + 1}") |
|||
.Replace("[:ServiceName:]", $"{all[i].ItemName}") |
|||
.Replace("[:ServiceCount:]", $"{all[i].ItemCount}")); |
|||
} |
|||
} |
|||
StringBuilder header = new StringBuilder(); |
|||
|
|||
if (increateCount > 0) |
|||
{ |
|||
header.AppendLine(increateService); |
|||
} |
|||
if (processCount > 0) |
|||
{ |
|||
header.AppendLine(workProcess); |
|||
} |
|||
if (consumableCount > 0) |
|||
{ |
|||
header.AppendLine(consumableService); |
|||
} |
|||
|
|||
|
|||
var newGrid = xaml.Replace("[:Header:]", header.ToString()) |
|||
.Replace("[:Columns:]", columns.ToString()) |
|||
.Replace("[:ColumnCount:]", $"{columnCount}") |
|||
.Replace("[:ColumnCount-2:]", $"{columnCount - 2}") |
|||
.Replace("[:1+IncreateCount:]", $"{increateCount + 1}") |
|||
.Replace("[:1+IncreateCount+ProcessCount:]", $"{1 + increateCount + processCount}") |
|||
.Replace("[:1+IncreateCount+ProcessCount:+ConsumableCount]", $"{1 + increateCount + processCount + consumableCount}") |
|||
.Replace("[:IncreateCount:]", $"{increateCount}") |
|||
.Replace("[:ProcessCount:]", $"{processCount}") |
|||
.Replace("[:ConsumableCount:]", $"{consumableCount}") |
|||
.Replace("[:TaskId:]", $"{FeesItem.TaskId}") |
|||
.Replace("[:ListData:]", serviceData.ToString()) |
|||
; |
|||
|
|||
if (isPrice) |
|||
{ |
|||
newGrid = newGrid.Replace("[:AllFees:]", $"{FeesItem.SingleFees}"); |
|||
} |
|||
else |
|||
{ |
|||
newGrid = newGrid.Replace("[:AllFees:]", $"{FeesItem.AllFees}"); |
|||
} |
|||
|
|||
var grid = XamlReader.Parse(newGrid) as Grid; |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
gd.Children.Add(grid); |
|||
}); |
|||
|
|||
} |
|||
catch |
|||
{ |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,84 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.LookBarCodeWindow" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="259" Width="320" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
|
|||
<RowDefinition Height="20"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1"> |
|||
<Border Name="jingjian" Visibility="Visible" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="1"> |
|||
<StackPanel Orientation="Vertical" > |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,25,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
<Border Name="biaozhun" Visibility="Collapsed" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="型号:"/> |
|||
<Run Text="{Binding ProductNo}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,40 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// LookBarCodeWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class LookBarCodeWindow : BWindow |
|||
{ |
|||
public LookBarCodeWindow(BarCodeModel BarCodeModel) |
|||
{ |
|||
InitializeComponent(); |
|||
this.DataContext = BarCodeModel; |
|||
if (BarCodeModel.LabelModel==BarcodeLabelModel.barsimplify) |
|||
{//精简版
|
|||
jingjian.Visibility = Visibility.Visible; |
|||
biaozhun.Visibility = Visibility.Collapsed; |
|||
} |
|||
else |
|||
{ |
|||
jingjian.Visibility = Visibility.Collapsed; |
|||
biaozhun.Visibility = Visibility.Visible; |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,99 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.LookCerWindow" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="357" Width="386" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="查看合格证" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
|
|||
<Border Name="no3c" BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12,0,0" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Brand}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65,0,0"/> |
|||
|
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding ProductNo}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/> |
|||
|
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding BrandName}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/> |
|||
|
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Shader}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/> |
|||
|
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,150,0,0" /> |
|||
<TextBox IsReadOnly="True" BorderBrush="Transparent" |
|||
TextWrapping ="Wrap" AcceptsReturn="True" |
|||
Height="50" Text="{Binding ExcuteStander}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,148,0,0"/> |
|||
|
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding ProductShop}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
|
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,246,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" |
|||
Height="44" Text="{Binding ProductAdress}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
|
|||
|
|||
</Grid> |
|||
</Border> |
|||
<Border Name="is3c" Visibility="Collapsed" BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid > |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding Brand}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85,0,0"/> |
|||
|
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding ProductNo}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/> |
|||
|
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding BrandName}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/> |
|||
|
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Shader}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/> |
|||
|
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,154,0,0" /> |
|||
<TextBox IsReadOnly="True" BorderBrush="Transparent" |
|||
Text="{Binding ExcuteStander}" Height="40" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,153,0,0"/> |
|||
|
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding ProductShop}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
|
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,246,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding ProductAdress}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
|
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding FactoryNumber}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/> |
|||
|
|||
<Image Source="/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" /> |
|||
|
|||
</Grid> |
|||
</Border> |
|||
</Grid> |
|||
|
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,77 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using Org.BouncyCastle.Crypto.Tls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// LookCerWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class LookCerWindow : BWindow |
|||
{ |
|||
public LookCerWindow(CertificateModel certificate) |
|||
{ |
|||
|
|||
InitializeComponent(); |
|||
CertificateModel data = new CertificateModel |
|||
{ |
|||
Brand = certificate.Brand, |
|||
BrandName = certificate.BrandName, |
|||
ExcuteStander = certificate.ExcuteStander, |
|||
FactoryNumber = certificate.FactoryNumber, |
|||
IsLogo = certificate.IsLogo, |
|||
LabelModel = certificate.LabelModel, |
|||
ProductAdress = certificate.ProductAdress, |
|||
Id = certificate.Id, |
|||
ProductDate = certificate.ProductDate, |
|||
ProductNo = certificate.ProductNo, |
|||
ProductShop = certificate.ProductShop, |
|||
Shader = certificate.Shader, |
|||
SkuId = certificate.SkuId, |
|||
Reseller = certificate.Reseller |
|||
|
|||
}; |
|||
StringBuilder sb = new StringBuilder(); |
|||
if (data.ExcuteStander.Contains(","))//有逗号就拆分
|
|||
{ |
|||
var excutes = data.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); |
|||
for (int i = 0; i < excutes.Count(); i++) |
|||
{ |
|||
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|||
{ |
|||
sb.Append("\r\n"); |
|||
} |
|||
sb.Append(excutes[i]).Append(" "); |
|||
} |
|||
sb.Remove(sb.Length - 4, 4); |
|||
data.ExcuteStander = sb.ToString(); |
|||
} |
|||
|
|||
|
|||
|
|||
this.DataContext = data; |
|||
if (data.IsLogo == 0) |
|||
{ |
|||
is3c.Visibility = Visibility.Collapsed; |
|||
no3c.Visibility = Visibility.Visible; |
|||
} |
|||
else |
|||
{ |
|||
is3c.Visibility = Visibility.Visible; |
|||
no3c.Visibility = Visibility.Collapsed; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,96 @@ |
|||
<Page x:Class="BBWY.Client.Views.PackTask.PersonList" |
|||
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.PackTask" |
|||
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 WareHouseList,Source={StaticResource Locator}}" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="2048" |
|||
Title="TaskList"> |
|||
<Page.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> |
|||
|
|||
</Page.Resources> |
|||
<Grid> |
|||
<StackPanel Panel.ZIndex="10" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="810,15,0,0"> |
|||
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox> |
|||
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"> |
|||
</ListBox> |
|||
</StackPanel> |
|||
|
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
<Grid Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="50"/> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="30"/> |
|||
<!----> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Panel.ZIndex="999" Margin="0,5,0,0" Width="1100"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition Width="auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<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="11,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding StartTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding EndTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/> |
|||
<TextBlock Text="花名:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<TextBlock Text="任务ID:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark=""/> |
|||
|
|||
<TextBlock Text="部门:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
|
|||
|
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Column="1" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button Content="搜索" Width="80" VerticalAlignment="Stretch" Margin="5,0,0,0" |
|||
Command="{Binding SearchTaskCommand}" |
|||
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
<Border Grid.Row="2" Margin="0,5,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0"/> |
|||
|
|||
|
|||
|
|||
<c:PageControl PageIndex="{Binding PageIndex}" |
|||
PageSize="{Binding PageSize}" |
|||
RecordCount="{Binding OrderCount}" |
|||
Grid.Row="3" |
|||
HorizontalAlignment="Left" Width="450"> |
|||
<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,135 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Common.Models; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Reflection; |
|||
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; |
|||
using System.Linq; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// PersonList.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class PersonList : Page |
|||
{ |
|||
public PersonList() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); |
|||
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true); |
|||
var Configuration = builder.Build(); |
|||
QKApiHost = Configuration.GetSection("QKApiHost").Value; |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 主机域名
|
|||
/// </summary>
|
|||
string QKApiHost = ""; |
|||
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>(); |
|||
|
|||
private void tb_TextChanged(object sender, TextChangedEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
var textBoxt = (TextBox)sender; |
|||
//创建一个ListBox
|
|||
|
|||
if (tipBox != null && tipBox.Items.Count > 0) |
|||
{ |
|||
tipBox.Items.Clear(); |
|||
|
|||
} |
|||
|
|||
if (departments.Count <= 0) |
|||
{ |
|||
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.Count() > 0) |
|||
{ |
|||
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) |
|||
{ |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,151 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.PrintWindow" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="510" Width="448" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="打印设置" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<TextBlock Margin="33,28" VerticalAlignment="Top" HorizontalAlignment="Left" Height="15" Width="43" Text="打印机:"/> |
|||
<ComboBox x:Name="cbPrints" Margin="81,23,0,0" Width="197" Height="25" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Margin="41,70,0,0" Width="30" Height="15" Text="数量:"/> |
|||
<c:BTextBox x:Name="tbCount" Width="197" Margin="81,65,0,0" Height="25" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
|
|||
<Grid Name="bar" Visibility="Collapsed" Grid.Row="1" > |
|||
<Border Name="jingjian" Visibility="Visible" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Width="371" Margin="38,113,38,29"> |
|||
<StackPanel Orientation="Vertical" > |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,25,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Border> |
|||
<Border Name="biaozhun" Visibility="Collapsed" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Width="371" Height="240" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="型号:"/> |
|||
<Run Text="{Binding ProductNo}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Border> |
|||
</Grid> |
|||
<Grid x:Name="cer" Grid.Row="1"> |
|||
|
|||
<Border Name="no3c" Visibility="Collapsed" BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="33,110,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Brand}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/> |
|||
|
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding ProductNo}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/> |
|||
|
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding BrandName}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/> |
|||
|
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Shader}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/> |
|||
|
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,150,0,0" /> |
|||
<TextBox IsReadOnly="True" BorderBrush="Transparent" |
|||
TextWrapping ="Wrap" AcceptsReturn="True" |
|||
Height="50" Text="{Binding ExcuteStander}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,148,0,0"/> |
|||
|
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding ProductShop}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
|
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,246,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" |
|||
Height="44" Text="{Binding ProductAdress}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
|
|||
|
|||
</Grid> |
|||
</Border> |
|||
<Border Name="is3c" BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="33,110,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid > |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding Brand}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/> |
|||
|
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding ProductNo}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/> |
|||
|
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding BrandName}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/> |
|||
|
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding Shader}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/> |
|||
|
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" /> |
|||
<TextBox IsReadOnly="True" BorderBrush="Transparent" |
|||
Text="{Binding ExcuteStander}" Height="40" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/> |
|||
|
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding ProductShop}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
|
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,246,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding ProductAdress}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
|
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding FactoryNumber}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/> |
|||
|
|||
<Image Source="/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" /> |
|||
|
|||
</Grid> |
|||
</Border> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="打印" HorizontalAlignment="Right" Width="100" VerticalAlignment="Top" Click="BButton_Click" Height="30" Margin="1" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,180 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Linq; |
|||
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.Interop; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// PrintWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class PrintWindow : BWindow |
|||
{ |
|||
public PrintWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
var printingNames = System.Drawing.Printing.PrinterSettings.InstalledPrinters;//获取本机的打印机数据
|
|||
int index = -1; |
|||
int selectIndex = 0; |
|||
foreach (string name in printingNames) |
|||
{ |
|||
if (name== "Microsoft XPS Document Writer"||name== "Microsoft Print to PDF"||name== "Fax") |
|||
{ |
|||
continue; |
|||
} |
|||
index++; |
|||
if (name.Contains("Deli")) |
|||
{ |
|||
selectIndex = index; |
|||
} |
|||
cbPrints.Items.Add(name); |
|||
} |
|||
if (cbPrints.Items.Count>selectIndex) |
|||
{ |
|||
cbPrints.SelectedIndex = selectIndex; |
|||
} |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 加载预览打印数据
|
|||
/// </summary>
|
|||
public void LoadData() |
|||
{ |
|||
if (certificateModel==null) |
|||
{ |
|||
cer.Visibility = Visibility.Collapsed; |
|||
} |
|||
else |
|||
{ |
|||
cer.Visibility = Visibility.Visible; |
|||
bar.Visibility = Visibility.Collapsed; |
|||
|
|||
CertificateModel data = new CertificateModel |
|||
{ |
|||
Brand = certificateModel.Brand, |
|||
BrandName = certificateModel.BrandName, |
|||
ExcuteStander = certificateModel.ExcuteStander, |
|||
FactoryNumber = certificateModel.FactoryNumber, |
|||
IsLogo = certificateModel.IsLogo, |
|||
LabelModel = certificateModel.LabelModel, |
|||
ProductAdress = certificateModel.ProductAdress, |
|||
Id = certificateModel.Id, |
|||
ProductDate = certificateModel.ProductDate, |
|||
ProductNo = certificateModel.ProductNo, |
|||
ProductShop = certificateModel.ProductShop, |
|||
Shader = certificateModel.Shader, |
|||
SkuId = certificateModel.SkuId, |
|||
Reseller = certificateModel.Reseller |
|||
|
|||
}; |
|||
StringBuilder sb = new StringBuilder(); |
|||
if (data.ExcuteStander.Contains(","))//有逗号就拆分
|
|||
{ |
|||
var excutes = data.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); |
|||
for (int i = 0; i < excutes.Count(); i++) |
|||
{ |
|||
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|||
{ |
|||
sb.Append("\r\n"); |
|||
} |
|||
sb.Append(excutes[i]).Append(" "); |
|||
} |
|||
sb.Remove(sb.Length - 4, 4); |
|||
data.ExcuteStander = sb.ToString(); |
|||
} |
|||
|
|||
|
|||
|
|||
this.DataContext = data; |
|||
if (data.IsLogo == 0) |
|||
{ |
|||
is3c.Visibility = Visibility.Collapsed; |
|||
no3c.Visibility = Visibility.Visible; |
|||
} |
|||
else |
|||
{ |
|||
is3c.Visibility = Visibility.Visible; |
|||
no3c.Visibility = Visibility.Collapsed; |
|||
} |
|||
|
|||
} |
|||
if (barCodeModel == null) |
|||
{ |
|||
bar.Visibility = Visibility.Collapsed; |
|||
} |
|||
else |
|||
{ |
|||
bar.Visibility = Visibility.Visible; |
|||
cer.Visibility = Visibility.Collapsed; |
|||
this.DataContext = barCodeModel; |
|||
if (barCodeModel.LabelModel == BarcodeLabelModel.barsimplify) |
|||
{//精简版
|
|||
jingjian.Visibility = Visibility.Visible; |
|||
biaozhun.Visibility = Visibility.Collapsed; |
|||
} |
|||
else |
|||
{ |
|||
jingjian.Visibility = Visibility.Collapsed; |
|||
biaozhun.Visibility = Visibility.Visible; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public CertificateModel certificateModel { get; set; } |
|||
|
|||
public BarCodeModel barCodeModel { get; set; } |
|||
|
|||
public string LabelName { get; set; } |
|||
|
|||
public Dictionary<string, string> Datas { get; set; } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
string path = Directory.GetCurrentDirectory()+ $"/Resources/LabelNames/{LabelName}.btw"; |
|||
int printCount = Convert.ToInt32(tbCount.Text); |
|||
string printName =cbPrints.Text; |
|||
|
|||
PrintBarCode(path,printCount,printName); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
new TipsWindow("打印失败").ShowDialog(); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 打印条形码
|
|||
/// </summary>
|
|||
private void PrintBarCode(string labelPath,int printNums,string PrintName) |
|||
{ |
|||
BartenderHelper helper = new BartenderHelper(); |
|||
string msg = ""; |
|||
helper.BTPrint(labelPath, Datas, out msg, printNums, PrintName); |
|||
if (msg == "OK") |
|||
{ |
|||
return; |
|||
} |
|||
new TipsWindow(msg).ShowDialog();//打印失败提示
|
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,231 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.ServiceWindow" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Title="TipsWindow" Height="769" Width="350" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--DataContext="{Binding PackServiceList,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="服务、 耗材、 参与人" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
</Border> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="250"/> |
|||
</Grid.RowDefinitions> |
|||
<Grid Grid.Row="0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="87"/> |
|||
<RowDefinition Height="auto"/> |
|||
<RowDefinition Height="10"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="增值服务" Margin="19,33,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<Border Background="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="217" Margin="77,40,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="322" Margin="19,56,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="322" Margin="19,86,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="19,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="135,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="219,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="300,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="340,56,0,0" Height="30" /> |
|||
<Label Content="增值服务项目" Width="116" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="19,56,0,0" /> |
|||
<Label Content="成员" Width="84" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="135,56,0,0" /> |
|||
<Label Content="数量" Width="80" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="219,56,0,0" /> |
|||
<Label Content="操作" Width="40" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="303,56,0,0" /> |
|||
|
|||
<StackPanel Grid.Row="1" Orientation="Vertical" MaxHeight="140" Width="322" Margin="19,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent"> |
|||
<ListBox ItemsSource="{Binding IncreateList}" ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" MaxHeight="100" |
|||
Foreground="{StaticResource Text.Color}" |
|||
ScrollViewer.VerticalScrollBarVisibility="Auto" > |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="116"/> |
|||
<ColumnDefinition Width="84"/> |
|||
<ColumnDefinition Width="84"/> |
|||
<ColumnDefinition Width="40"/> |
|||
</Grid.ColumnDefinitions> |
|||
<ComboBox VerticalContentAlignment="Center" Grid.Column="0" ItemsSource="{Binding IncreateServiceList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="ServiceName" SelectedValuePath="Id" SelectedValue="{Binding SelectId}" Text="{Binding ItemName}" Width="116" Height="30"/> |
|||
<ComboBox VerticalContentAlignment="Center" Grid.Column="1" ItemsSource="{Binding MemberList}" DisplayMemberPath="UserName" SelectedValuePath="Id" SelectedValue="{Binding SelectUserId}" Width="84" Height="30"/> |
|||
<TextBox VerticalContentAlignment="Center" Grid.Column="2" Height="30" Text="{Binding ItemCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="84"/> |
|||
<c:BButton Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding DeleteServiceCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}" Content="删除" Grid.Column="3"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
<c:BButton Content="添加" Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding AddIncreateServiceCommand}" |
|||
> |
|||
<Button.Triggers> |
|||
|
|||
</Button.Triggers> |
|||
</c:BButton> |
|||
</StackPanel> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="87"/> |
|||
<RowDefinition Height="auto"/> |
|||
<RowDefinition Height="10"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="打包服务" Margin="19,33,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<Border Background="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="217" Margin="77,40,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="322" Margin="19,56,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="322" Margin="19,86,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="19,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="135,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="219,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="300,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="340,56,0,0" Height="30" /> |
|||
<Label Content="打包服务项目" Width="116" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="19,56,0,0" /> |
|||
<Label Content="成员" Width="84" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="135,56,0,0" /> |
|||
<Label Content="数量" Width="80" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="219,56,0,0" /> |
|||
<Label Content="操作" Width="40" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="303,56,0,0" /> |
|||
|
|||
|
|||
<StackPanel Grid.Row="1" Orientation="Vertical" MaxHeight="140" Width="322" Margin="19,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent"> |
|||
<ListBox |
|||
ItemsSource="{Binding PackList}" MaxHeight="100" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}" |
|||
ScrollViewer.VerticalScrollBarVisibility="Auto" |
|||
> |
|||
|
|||
<ListBox.ItemTemplate > |
|||
<DataTemplate> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="116"/> |
|||
<ColumnDefinition Width="84"/> |
|||
<ColumnDefinition Width="84"/> |
|||
<ColumnDefinition Width="40"/> |
|||
</Grid.ColumnDefinitions> |
|||
<ComboBox VerticalContentAlignment="Center" Grid.Column="0" DisplayMemberPath="ProcessName" ItemsSource="{Binding PackServiceList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" SelectedValuePath="Id" SelectedValue="{Binding SelectId}" Text="{Binding ItemName}" Width="116" Height="30"/> |
|||
<ComboBox VerticalContentAlignment="Center" Grid.Column="1" ItemsSource="{Binding MemberList}" DisplayMemberPath="UserName" SelectedValuePath="Id" SelectedValue="{Binding SelectUserId}" Width="84" Height="30"/> |
|||
<TextBox VerticalContentAlignment="Center" Grid.Column="2" Height="30" Text="{Binding ItemCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="84"/> |
|||
<c:BButton Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding DeleteServiceCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}" Content="删除" Grid.Column="3"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
<c:BButton Content="添加" Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding AddPackServiceCommand}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="2"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="87"/> |
|||
<RowDefinition MaxHeight="200"/> |
|||
<RowDefinition Height="10"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="耗材项目" Margin="19,20,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<Border Background="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="217" Margin="77,27,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="240" Margin="19,56,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="240" Margin="19,86,0,0" Height="1"/> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="19,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="135,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="239,56,0,0" Height="30" /> |
|||
<Border Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1" Margin="279,56,0,0" Height="30" /> |
|||
|
|||
<Label Content="任务耗材" Width="116" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="19,56,0,0" /> |
|||
<StackPanel Orientation="Horizontal" Width="104" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="135,56,0,0"> |
|||
<Label Content="数量" Width="44" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" /> |
|||
<c:BButton Content="批量设置" Width="60" Background="Transparent" Foreground="Blue" |
|||
Command="{Binding SetAllCountCommand}" |
|||
CommandParameter="{Binding ElementName=consumable_listBox}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<Label Content="操作" Width="40" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="239,56,0,0" /> |
|||
|
|||
|
|||
<StackPanel Grid.Row="1" Orientation="Vertical" MaxHeight="160" Width="260" Margin="19,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent"> |
|||
<ListBox MaxHeight="120" Name="consumable_listBox" |
|||
ItemsSource="{Binding ConsumableServiceList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}" |
|||
ScrollViewer.VerticalScrollBarVisibility="Auto" |
|||
> |
|||
|
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="116"/> |
|||
<ColumnDefinition Width="104"/> |
|||
<ColumnDefinition Width="40"/> |
|||
</Grid.ColumnDefinitions> |
|||
<ComboBox VerticalContentAlignment="Center" Text="{Binding ItemName}" Grid.Column="0" ItemsSource="{Binding ConsumableList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Name" SelectedValue="{Binding SelectId}" SelectedValuePath="Id" Width="116" Height="30"/> |
|||
<TextBox VerticalContentAlignment="Center" Grid.Column="1" Height="30" Text="{Binding ItemCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="104"/> |
|||
<c:BButton Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding DeleteServiceCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}" Content="删除" Grid.Column="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
<c:BButton Content="添加" Foreground="Blue" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Background="Transparent" HorizontalAlignment="Stretch" |
|||
Command="{Binding AddConsumableCommand}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Command="{Binding UpLoadPackCommand}" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,54 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.ViewModels; |
|||
using BBWY.Client.ViewModels.PackTask; |
|||
using BBWY.Controls; |
|||
using Org.BouncyCastle.Asn1.Ocsp; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// ServiceWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ServiceWindow : BWindow |
|||
{ |
|||
|
|||
public PackServiceViewModel model { get; set; } |
|||
public PackTaskService packTaskService; |
|||
public ConsumableService consumableService; |
|||
public WorkProcessService workProcessService; |
|||
public IncreateServiceService increateService; |
|||
public ServiceWindow(PackTaskService packTaskService, long taskId, int taskCount, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateService) |
|||
{ |
|||
InitializeComponent(); |
|||
this.consumableService = consumableService; |
|||
this.workProcessService = workProcessService; |
|||
this.packTaskService = packTaskService; |
|||
this.increateService = increateService; |
|||
|
|||
model = new PackServiceViewModel(packTaskService, consumableService, workProcessService, increateService, taskId); |
|||
model.TaskId = taskId; |
|||
model.TaskCount = taskCount; |
|||
this.DataContext = model; |
|||
} |
|||
|
|||
//public PackServiceViewModel model { get; set; }
|
|||
//public ServiceWindow()
|
|||
//{
|
|||
// InitializeComponent();
|
|||
// model = ViewModelLocator.CreateNewPackServiceViewModel();
|
|||
// this.DataContext = model;
|
|||
//}
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,110 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.SetBarCodeWindow" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="400" Width="600" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="设置条形码" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Vertical" > |
|||
<RadioButton GroupName="bar" IsChecked="True" Command="{Binding BarLabelCheckCommand}" CommandParameter="{x:Static cmodel:BarcodeLabelModel.barsimplify}" Content="精简" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
|
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BarCodeModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding BarCodeModel.SkuName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,25,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding BarCodeModel.SkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
|
|||
<StackPanel Grid.Column="1" Orientation="Vertical" > |
|||
<RadioButton GroupName="bar" Content="标准" Command="{Binding BarLabelCheckCommand}" CommandParameter="{x:Static cmodel:BarcodeLabelModel.barstander}" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding BarCodeModel.Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BarCodeModel.BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="型号:"/> |
|||
<Run Text="{Binding BarCodeModel.ProductNo}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding BarCodeModel.SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding BarCodeModel.SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Command="{Binding SaveBarCodeCommand}" /> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,28 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetBarCode.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetBarCodeWindow : BWindow |
|||
{ |
|||
public SetBarCodeWindow( ) |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,106 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.SetCerWindow" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="500" Width="960" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="设置合格证" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
|
|||
</Grid.ColumnDefinitions> |
|||
<Grid > |
|||
<!--CommandParameter="{x:Static cmodel:CerHave3C.No3C}"--> |
|||
<RadioButton GroupName="cer" IsChecked="True" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CerHave3C.No3C}" Content="标准" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,50" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/> |
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/> |
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/> |
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" /> |
|||
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
|
|||
|
|||
</Grid> |
|||
</Border> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Column="1" > |
|||
<RadioButton GroupName="cer" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CerHave3C.Is3C}" Content="带3c标" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,50" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<Grid > |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" /> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" /> |
|||
<c:BTextBox Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/> |
|||
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" /> |
|||
<c:BTextBox Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/> |
|||
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" /> |
|||
<c:BTextBox Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/> |
|||
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" /> |
|||
<c:BTextBox Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" /> |
|||
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/> |
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" /> |
|||
<c:BTextBox Text="{Binding CertificateModel.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/> |
|||
|
|||
<Image Source="/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" /> |
|||
|
|||
</Grid> |
|||
</Border> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
|
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Command="{Binding SaveCerCommand}" /> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,28 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using Org.BouncyCastle.Ocsp; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetCerWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetCerWindow : BWindow |
|||
{ |
|||
public SetCerWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.SetCountWindow" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Title="TipsWindow" Height="180" Width="220" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="批量设置" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" > |
|||
|
|||
<TextBlock Text="数量:" VerticalAlignment="Center" ></TextBlock> |
|||
<c:BTextBox x:Name="tbCount" Width="100"/> |
|||
</StackPanel> |
|||
|
|||
|
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="BButton_Click" /> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,47 @@ |
|||
using BBWY.Controls; |
|||
using NPOI.SS.Formula.Functions; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetCountWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetCountWindow : BWindow |
|||
{ |
|||
public SetCountWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
this.WindowStartupLocation = WindowStartupLocation.CenterScreen; |
|||
} |
|||
/// <summary>
|
|||
/// 委托设置数量
|
|||
/// </summary>
|
|||
public Action<int> SetCount { get; set; } |
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
var count = Convert.ToInt32(tbCount.Text); |
|||
SetCount(count); |
|||
this.Close(); |
|||
} |
|||
catch |
|||
{ |
|||
MessageBox.Show("请输入数字!"); |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,39 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTask.TipsWindow" |
|||
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.PackTask" |
|||
mc:Ignorable="d" |
|||
Title="TipsWindow" Height="200" Width="321" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
|
|||
WindowStartupLocation="CenterScreen" |
|||
|
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
CloseButtonVisibility ="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
<!--<RowDefinition Height="40"/>--> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="提示" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<TextBox Name="tbContent" IsReadOnly="True" AcceptsReturn="True" TextWrapping="Wrap" Grid.Row="1" Margin="10" |
|||
Text="请设置合格证内容 请设置合格证内容" BorderBrush="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
|
|||
|
|||
<!--<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="BButton_Click" />--> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,46 @@ |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
using System.Windows.Threading; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// TipsWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class TipsWindow : BWindow |
|||
{ |
|||
private DispatcherTimer timer; |
|||
public TipsWindow(string Content,int waitTime=2) |
|||
{ |
|||
InitializeComponent(); |
|||
tbContent.Text = Content; |
|||
this.WindowStartupLocation = WindowStartupLocation.CenterScreen; |
|||
|
|||
timer = new DispatcherTimer(); |
|||
timer.Interval = TimeSpan.FromSeconds(waitTime); |
|||
timer.Tick += OnTimerTick; |
|||
timer.Start(); |
|||
|
|||
} |
|||
|
|||
private void OnTimerTick(object sender, EventArgs e) |
|||
{ |
|||
timer.Stop(); |
|||
Close(); |
|||
} |
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,325 @@ |
|||
<Page x:Class="BBWY.Client.Views.PackTask.WareHouseList" |
|||
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.PackTask" |
|||
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 WareHouseList,Source={StaticResource Locator}}" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="2048" |
|||
Title="TaskList"> |
|||
<Page.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> |
|||
|
|||
</Page.Resources> |
|||
<Grid> |
|||
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="810,15,0,0"> |
|||
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox> |
|||
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"> |
|||
|
|||
</ListBox> |
|||
</StackPanel> |
|||
|
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
<Grid Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="50"/> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="30"/> |
|||
<!----> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Panel.ZIndex="999" Margin="0,5,0,0" Width="1100"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition Width="auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<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="11,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding StartTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding EndTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/> |
|||
<TextBlock Text="任务ID:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark=""/> |
|||
<TextBlock Text="SKU:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<TextBlock Text="部门:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
|
|||
|
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Column="1" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button Content="搜索" Width="80" VerticalAlignment="Stretch" Margin="5,0,0,0" |
|||
Command="{Binding SearchTaskCommand}" |
|||
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
|
|||
<StackPanel Grid.Row="1" Grid.RowSpan="1" HorizontalAlignment="Left" Orientation="Horizontal"> |
|||
<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" IsChecked="True" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.全部}" > |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="全部"/> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
|
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已到货}" > |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="已到货"/> |
|||
<Run Text="{Binding ArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Foreground="{StaticResource Text.Pink}" /> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.部分到货}" >> |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="部分到货"/> |
|||
<Run Text="{Binding SomeArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Foreground="{StaticResource Text.Pink}" /> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.未到货}" > |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="未到货"/> |
|||
<Run Text="{Binding NoArrivedCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Foreground="{StaticResource Text.Pink}" /> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.加急}" > |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="加急"/> |
|||
<Run Text="{Binding WorryCount ,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Foreground="{StaticResource Text.Pink}" /> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
|
|||
|
|||
<RadioButton VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" > |
|||
<RadioButton.Style > |
|||
<Style TargetType="RadioButton"> |
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="126" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<TextBlock Text="已完成" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</RadioButton.Style> |
|||
</RadioButton> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
<Border Grid.Row="2" Margin="0,5,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0"/> |
|||
|
|||
<local:WareHouseListControl x:Name="listbox_task" Grid.Row="2" Margin="0,5,0,0"/> |
|||
|
|||
<c:PageControl PageIndex="{Binding PageIndex}" |
|||
PageSize="{Binding PageSize}" |
|||
RecordCount="{Binding OrderCount}" |
|||
Grid.Row="3" |
|||
HorizontalAlignment="Left" Width="450"> |
|||
<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,136 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Common.Models; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Reflection; |
|||
using System.Runtime.InteropServices; |
|||
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; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Views.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// WareHouseList.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class WareHouseList : Page |
|||
{ |
|||
public WareHouseList() |
|||
{ |
|||
InitializeComponent(); |
|||
var applicationPath = System.IO. Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); |
|||
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true); |
|||
var Configuration = builder.Build(); |
|||
|
|||
QKApiHost = Configuration.GetSection("QKApiHost").Value; |
|||
|
|||
} |
|||
string QKApiHost = ""; |
|||
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>(); |
|||
|
|||
private void tb_TextChanged(object sender, TextChangedEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
var textBoxt = (TextBox)sender; |
|||
//创建一个ListBox
|
|||
|
|||
if (tipBox != null && tipBox.Items.Count > 0) |
|||
{ |
|||
tipBox.Items.Clear(); |
|||
|
|||
} |
|||
|
|||
if (departments.Count<=0) |
|||
{ |
|||
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.Count() > 0) |
|||
{ |
|||
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) |
|||
{ |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,594 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.PackTask.WareHouseListControl" |
|||
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:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask" |
|||
DataContext="{Binding WareHouseList,Source={StaticResource Locator}}" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="1500"> |
|||
<UserControl.Resources> |
|||
<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"/> |
|||
</UserControl.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="35"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="350"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition MinWidth="140"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="120"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="SKU数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="到货情况" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="组合类型" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="SKU配件商品" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
|||
<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}"/> |
|||
<TextBlock Text="服务 耗材费用" Grid.Column="10" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="打包员" Grid.Column="11" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="7"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="8"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="9"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="10"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="11"/> |
|||
</Grid> |
|||
<!--ItemsSource="{Binding OrderList}"--> |
|||
<ListBox x:Name="listbox_order" |
|||
Grid.Row="7" |
|||
ItemsSource="{Binding PackTaskList}" |
|||
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="350"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition MinWidth="140"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="120"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11"> |
|||
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" /> |
|||
<TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd HH:mm}" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{Binding TaskId}" Margin="5,0,0,0" /> |
|||
|
|||
<Label Width="94" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskStatus}" Foreground="White" Background="{Binding TaskStatus,Converter={StaticResource objConverter} , ConverterParameter=未完成:#facd91:#02a7f0 }" Margin="5,0,0,0"/> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Text="部门:" Margin="14,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{Binding DepartmentName}" Margin="5,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptName}" Margin="5,0,0,0" /> |
|||
</StackPanel> |
|||
<c:BButton Grid.Column="11" Command="{Binding SetTaskStatusCommand}" CommandParameter="{Binding TaskId}" |
|||
HorizontalAlignment="Stretch" VerticalAlignment="Center" Content="完成" /> |
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="350"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition MinWidth="140"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="120"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding ItemList}" |
|||
Style="{StaticResource NoScrollViewListBoxStyle}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" > |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> |
|||
<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 > |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="DataContext.Id" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1}"/> |
|||
<Binding Path="Id"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
|
|||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,12,0,10"> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis"> |
|||
<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> |
|||
|
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding ShopName}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="店铺:"/> |
|||
<Run Text="{Binding ShopName}"/> |
|||
</TextBlock> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Grid.Column="2" Orientation="Vertical" Margin="20,11,0,5"> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}"> |
|||
<Run Text="货号:" /> |
|||
<Run Text="{Binding GoodsNo}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
<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 SkuCount}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="2" Background="{Binding Availability,Converter={StaticResource enumToColorConverter} , ConverterParameter={x:Type cmodel:TaskState} }"> |
|||
<TextBlock Text="{Binding Availability}" |
|||
VerticalAlignment="Center" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
|
|||
> |
|||
</TextBlock> |
|||
</Grid> |
|||
<Grid Grid.Column="3" > |
|||
<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="4" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock |
|||
Text="{Binding SkuTitle}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
</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 BasicPack}"/> |
|||
</StackPanel> |
|||
<Grid Margin="10,5" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock TextWrapping="Wrap"> |
|||
<Run Text="增量耗材:"/> |
|||
<Run Text="{Binding Increment1}"/> |
|||
</TextBlock> |
|||
</Grid> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="6" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock |
|||
Text="{Binding PositionType}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="7" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="条形码:"/> |
|||
<c:BButton x:Name="btn_lookBarCode" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding LookBarCommand}" /> |
|||
|
|||
<c:BButton x:Name="btn_daCer" Content="打印" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding PrintBarcodeCommand}"/> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="合格证:"/> |
|||
<c:BButton x:Name="btn_lookCer" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding LookCerCommand}"/> |
|||
|
|||
<c:BButton x:Name="btn_dayinCer" Content="打印" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding PrintCerCommand}"/> |
|||
|
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="8" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
<TextBlock |
|||
Text="{Binding CertificatePosition}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="9" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock |
|||
Text="{Binding MarkMessage}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="10" > |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="3*"/> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Margin="20,0,0,0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="收费:"/> |
|||
<TextBlock |
|||
Text="{Binding FeesItemResponse.AllFees, StringFormat={}{0:F2}}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
<Path x:Name="path_fees_name" |
|||
Style="{StaticResource path_question}" |
|||
Width="14" Margin="0,0,0,0" Fill="{StaticResource Text.Pink}" |
|||
ToolTipService.InitialShowDelay="0" ToolTipService.ShowDuration="20000" |
|||
Visibility="{Binding IsShowFees,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed }" |
|||
> |
|||
|
|||
<Path.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<local:FeesExcelControl IsWareHouse="True" FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}" |
|||
/> |
|||
<!--<Grid Height="100" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="30"/> |
|||
</Grid.RowDefinitions> |
|||
<Border Background="#F2F2F2" Grid.RowSpan="2" Grid.ColumnSpan="17"/> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="13" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="16" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/> |
|||
<Border Width="1" HorizontalAlignment="Right" BorderBrush="#D7D7D7" Grid.Column="16" Grid.Row="0" Grid.RowSpan="3" BorderThickness="0,0,1,0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="4" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/> |
|||
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/> |
|||
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="15" BorderThickness="0,1,0,0"/> |
|||
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/> |
|||
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="17" BorderThickness="0,1,0,0"/> |
|||
<TextBlock Width="84" Text="任务ID" TextAlignment="Center" Grid.Column="0" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="增值服务" Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="打包服务" Grid.Column="4" Grid.ColumnSpan="9" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="打包耗材" Grid.Column="13" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Width="101" TextAlignment="Center" Text="总计" Grid.Column="16" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<Grid Grid.Column="1" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAcceptGoods,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="收货、卸货" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.AcceptGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="2" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsSendGoods, StringFormat={}{0:F0} ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="装箱、送货" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.SendGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="3" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsRuturnGoods ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="退货质检" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.RuturnGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="4" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsBasicPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="基础包装费" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Grid.Row="1" Text="{Binding FeesItemTypeDTO.BasicPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid Grid.Column="5" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsBoxPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="箱子包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.BoxPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid Grid.Column="6" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsExpressPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="快递袋包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.ExpressPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
|
|||
<Grid Grid.Column="7" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsExpressCloseSideFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="快递袋封边" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.ExpressCloseSideFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="8" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirPaperPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="气泡纸包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.AirPaperPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
|
|||
<Grid Grid.Column="9" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirBagPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="气泡袋包装" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.AirBagPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="10" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsPOPBagPackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="POP袋" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.POPBagPackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid Grid.Column="11" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsTapePackFees ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="胶带工序" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.TapePackFeesNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="12" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsIncreateGoods ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="增量配件" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.IncreateGoodsNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="13" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsPaperBox ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<Run Text="{Binding FeesItemTypeDTO.BoxNumber ,Converter={StaticResource intToStringConverter},ConverterParameter=号纸箱}"/> |
|||
|
|||
</TextBlock> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.PaperBoxNo, StringFormat={}{0:F0},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid Grid.Column="14" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsAirPaper ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="气泡纸" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.AirPaperNo, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid Grid.Column="15" Width="84" Grid.Row="1" Grid.RowSpan="2" Visibility="{Binding FeesItemTypeDTO.IsTape ,ConverterParameter=true:Collapsed:Visible,Converter={StaticResource objConverter}}" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/> |
|||
<TextBlock Text="胶带" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.TapeNo, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid> |
|||
<TextBlock Text="{Binding TaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<TextBlock Text="{Binding FeesItemTypeDTO.AllPackFees, StringFormat={}{0:F2},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="16" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
</Grid>--> |
|||
</ToolTip> |
|||
</Path.ToolTip> |
|||
</Path> |
|||
|
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Row="1" > |
|||
<Border Grid.Row="0" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<c:BButton HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Background="White" Foreground="Black" Grid.Row="1" Content="设置" |
|||
Command="{Binding SetServiceCommand}" |
|||
Visibility="Visible" /> |
|||
</Grid> |
|||
</Grid> |
|||
</Grid> |
|||
<Grid Grid.Column="11" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock |
|||
Text="{Binding PackUser}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="7"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="8"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="9"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="10"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="11"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
|
|||
</Grid> |
|||
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,30 @@ |
|||
using BBWY.Client.ViewModels.PackTask; |
|||
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.PackTask |
|||
{ |
|||
/// <summary>
|
|||
/// WareHouseListControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class WareHouseListControl : UserControl |
|||
{ |
|||
|
|||
public WareHouseListControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue