Browse Source

对接提示合格证 配置接口

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
5b3c92b1dc
  1. 16
      BBWY.Client/APIServices/QiKu/ConsumableService.cs
  2. 17
      BBWY.Client/APIServices/QiKu/PackTaskService.cs
  3. 5
      BBWY.Client/APIServices/QiKu/ProcessService.cs
  4. 2
      BBWY.Client/Models/APIModel/Request/ConsumableRequest.cs
  5. 6
      BBWY.Client/Models/APIModel/Request/SetPackDetailRequest.cs
  6. 48
      BBWY.Client/Models/APIModel/Response/PackTask/FeesItemResponse.cs
  7. 4
      BBWY.Client/Models/APIModel/Response/PackTask/GetConsumableTypeResponse.cs
  8. 6
      BBWY.Client/Models/APIModel/Response/PackTask/GetPackDetailResponse.cs
  9. 14
      BBWY.Client/Models/APIModel/Response/PackTask/SearchTaskListResponse.cs
  10. 30
      BBWY.Client/Models/APIModel/Response/Process/GetProcessTypeResponse.cs
  11. 9
      BBWY.Client/Models/Enums.cs
  12. 37
      BBWY.Client/Models/PackTask/ConsumableModel.cs
  13. 9
      BBWY.Client/Models/PackTask/PackItemModel.cs
  14. 39
      BBWY.Client/Models/PackTask/PackTaskModel.cs
  15. 30
      BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs
  16. 408
      BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs
  17. 46
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  18. 67
      BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs
  19. 41
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  20. 6
      BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml.cs
  21. 32
      BBWY.Client/Views/PackTask/Consumable.xaml
  22. 6
      BBWY.Client/Views/PackTask/EditConsumable.xaml
  23. 32
      BBWY.Client/Views/PackTask/FeesExcelControl.xaml.cs
  24. 138
      BBWY.Client/Views/PackTask/FeesExcelV2Control.xaml
  25. 355
      BBWY.Client/Views/PackTask/FeesExcelV2Control.xaml.cs
  26. 10
      BBWY.Client/Views/PackTask/MinFeesExcelV2Control.xaml
  27. 347
      BBWY.Client/Views/PackTask/MinFeesExcelV2Control.xaml.cs
  28. 79
      BBWY.Client/Views/PackTask/PackDetailWindow.xaml
  29. 11
      BBWY.Client/Views/PackTask/PackDetailWindow.xaml.cs
  30. 69
      BBWY.Client/Views/PackTask/PrintPackTaskDetail.xaml
  31. 81
      BBWY.Client/Views/PackTask/PrintPackTaskDetail.xaml.cs
  32. 2
      BBWY.Client/Views/PackTask/ServiceWindow.xaml
  33. 8
      BBWY.Client/Views/PackTask/UpdatePurchaseTaskWindow.xaml
  34. 28
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml
  35. 33
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml.cs
  36. 18
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml
  37. 34
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml.cs
  38. 122
      BBWY.Client/Views/QualityTask/WaitQualityControl.xaml
  39. 34
      BBWY.Client/Views/QualityTask/WaitQualityControl.xaml.cs

16
BBWY.Client/APIServices/QiKu/ConsumableService.cs

@ -41,12 +41,8 @@ namespace BBWY.Client.APIServices
public ApiResponse<object> Deleted(long id)
{
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Deleted",
new
{
id = id
}
, null, HttpMethod.Get);
return SendRequest<object>(globalContext.QKApiHost, $"api/Consumable/Deleted?id={id}",
null, null, HttpMethod.Get);
}
public ApiResponse<ConsumableResponse> Search(ConsumableSearchRequest consumable)
@ -72,5 +68,13 @@ namespace BBWY.Client.APIServices
null
, null, HttpMethod.Get);
}
public ApiResponse<object> DeletedConsumableType(long consumableTypeId)
{
return SendRequest<object>(globalContext.QKApiHost, $"api/Consumable/DeletedConsumableType?consumableTypeId={consumableTypeId}",
null
, null, HttpMethod.Post);
}
}
}

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

@ -321,9 +321,9 @@ namespace BBWY.Client.APIServices
}, null, HttpMethod.Post);
}
public ApiResponse<bool> SubmitOverTimeMarkMsg(OverTimeTaskType OverTimeTaskType, long Id, string MarkMsg)
public ApiResponse<object> SubmitOverTimeMarkMsg(OverTimeTaskType OverTimeTaskType, long Id, string MarkMsg)
{
return SendRequest<bool>(globalContext.QKApiHost, $"api/PackTask/SubmitOverTimeMarkMsg", new
return SendRequest<object>(globalContext.QKApiHost, $"api/PackTask/SubmitOverTimeMarkMsg", new
{
OverTimeTaskType,
Id,
@ -331,7 +331,20 @@ namespace BBWY.Client.APIServices
}, null, HttpMethod.Post);
}
//public ApiResponse<object> QikuPublishOrderSkuPackConfigState(string orderId, string skuId, PackConfigState packConfigState)
//{
// return SendRequest<object>("http://bbwyb.qiyue666.com", $"Api/Order/QikuPublishOrderSkuPackConfigState", new
// {
// orderId,
// skuId,
// packConfigState,
// }, null, HttpMethod.Post);
//}
public ApiResponse<object> SendToSetSkuConfigure(long taskId)
{
return SendRequest<object>(globalContext.QKApiHost, $"api/PackTask/SendToSetSkuConfigure?taskid={taskId}",null, null, HttpMethod.Post);
}
}

5
BBWY.Client/APIServices/QiKu/ProcessService.cs

@ -22,13 +22,14 @@ namespace BBWY.Client.APIServices.QiKu
}
public ApiResponse<DiscountFactoryResponse> GetDiscountFactory(string ProcessTypeName, int TaskCount)
public ApiResponse<DiscountFactoryResponse> GetDiscountFactory(string ProcessTypeName, int TaskCount,long? ProcessComboId=null)
{
return SendRequest<DiscountFactoryResponse>(globalContext.QKApiHost, "api/Process/GetDiscountFactory",
new
{
ProcessTypeName,
TaskCount
TaskCount,
ProcessComboId
}
, null, HttpMethod.Post);
}

2
BBWY.Client/Models/APIModel/Request/ConsumableRequest.cs

@ -15,6 +15,8 @@ namespace BBWY.Client.Models.APIModel.Request
public class ConsumableSearchRequest
{
public long? ConsumableTypeId { get; set; }
/// <summary>
/// 名称
/// </summary>

6
BBWY.Client/Models/APIModel/Request/SetPackDetailRequest.cs

@ -13,6 +13,12 @@ namespace BBWY.Client.Models
public long TaskId { get; set; }
#region 工序收费
public string ProductResistantName { get; set; }
/// <summary>
/// 打包工序类型(0=推荐工序,1=自定义工序)
/// </summary>
public PackProcessType PackProcessType { get; set; }
/// <summary>
/// 套餐id
/// </summary>

48
BBWY.Client/Models/APIModel/Response/PackTask/FeesItemResponse.cs

@ -15,17 +15,20 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
public List<ServiceItemResponse> ServiceList { get => serviceList; set { Set(ref serviceList, value); } }
public decimal disCount;
public decimal DisCount { get => disCount; set { Set(ref disCount, value); } }
public decimal AllFees { get=> allFees; set { Set(ref allFees, value);
} }
public decimal AllFees { get => allFees; set { Set(ref allFees, value); } }
private decimal allFees;
private decimal discountAllFees;
public decimal DiscountAllFees { get => discountAllFees; set { Set(ref discountAllFees, value); } }
public decimal SingleFees { get => singleFees; set { Set(ref singleFees, value);
public decimal SingleFees
{
get => singleFees; set
{
Set(ref singleFees, value);
} }
}
}
private decimal singleFees;
public decimal DiscountSingleFees { get => discountSingleFees; set { Set(ref discountSingleFees, value); } }
@ -36,8 +39,6 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
private decimal taskId;
/// <summary>
/// 耗材费用价格
/// </summary>
@ -62,12 +63,12 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
public decimal PackFees { get; set; }
/// <summary>
/// 增值费用小计
/// 增值费用小计(待移除)
/// </summary>
public decimal IncreateFees { get; set; }
/// <summary>
/// 增值服务数据
/// 增值服务数据(待移除)
/// </summary>
public List<ServiceItemResponse> IncreateList { get; set; }
@ -78,38 +79,55 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
/// <summary>
/// 打包服务
/// 打包服务(待移除)
/// </summary>
public List<PackItemResponse> PackItemList { get; set; }
/// <summary>
/// 增量配件数
/// 增量配件数(待移除)
/// </summary>
public int? IncrementPartCount { get; set; }
/// <summary>
/// 增量配件任务数
/// 增量配件任务数(待移除)
/// </summary>
public int? IncrementPartTaskCount { get; set; }
/// <summary>
/// 增量配件单价
/// 增量配件单价(待移除)
/// </summary>
public decimal? IncrementPartPrice { get; set; }
/// <summary>
/// 基础包装费
/// 基础包装费(待移除)
/// </summary>
public decimal? BasicProcessPrice { get; set; }
/// <summary>
/// 基础包装数
/// 基础包装数(待移除)
/// </summary>
public int? BasicProcessCount { get; set; }
/// <summary>
/// 工序类型名称
/// </summary>
public string ProcessTypeName { get; set; }
/// <summary>
/// 工序套餐名称
/// </summary>
public string ProcessComboName { get; set; }
/// <summary>
/// 工序套餐单价
/// </summary>
public decimal ProcessComboPrice { get; set; }
/// <summary>
/// 工序套餐任务量
/// </summary>
public int ProcessComboTaskCount { get; set; }
}
public class PackItemResponse

4
BBWY.Client/Models/APIModel/Response/PackTask/GetConsumableTypeResponse.cs

@ -12,8 +12,8 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
public string ConsumableTypeName { get => consumableTypeName; set { Set(ref consumableTypeName, value); } }
private long consumableTypeId;
private long? consumableTypeId;
public long ConsumableTypeId { get => consumableTypeId; set { Set(ref consumableTypeId, value); } }
public long? ConsumableTypeId { get => consumableTypeId; set { Set(ref consumableTypeId, value); } }
}
}

6
BBWY.Client/Models/APIModel/Response/PackTask/GetPackDetailResponse.cs

@ -25,6 +25,12 @@ namespace BBWY.Client.Models
public FeesMode? FeesMode { get; set; }
public decimal? DiscountFactor { get; set; }
public string SuggestPackUserName { get; set; }
public string ProductResistantName { get; set; }
/// <summary>
/// 打包工序类型(0=推荐工序,1=自定义工序)
/// </summary>
public PackProcessType PackProcessType { get; set; }
}
public class PackUserResponse : PackUserModelRequest

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

@ -205,6 +205,20 @@ namespace BBWY.Client.Models.APIModel
/// 排单超时时间
/// </summary>
public DateTime? ScheduleOverTime { get; set; }
/// <summary>
/// 打包工序类型(0=推荐工序,1=自定义工序) NULL 金额不为0则为旧版本结算
/// </summary>
public PackProcessType? PackProcessType { get; set; }
/// <summary>
///
/// </summary>
public string ShopId { get; set; }
/// <summary>
/// 发送信息不全时间
/// </summary>
public DateTime? SendToSetSkuConfigureTime { get; set; }
}
public class ExpressOrderResponse
{

30
BBWY.Client/Models/APIModel/Response/Process/GetProcessTypeResponse.cs

@ -13,10 +13,28 @@ namespace BBWY.Client.Models
/// 所有的耗材类型
/// </summary>
public List<ConsumableTypeResponse> ConsumableTypeList { get; set; }
public List<ProductResistantResponse> ProductResistantList { get; set; }
}
public class ProductResistantResponse : NotifyObject
{
private string productResistantName;
/// <summary>
/// 名称
/// </summary>
public string ProductResistantName { get => productResistantName; set { Set(ref productResistantName, value); } } //
/// <summary>
/// 套餐列表
/// </summary>
public ObservableCollection<ProcessComboResponse> ProcessComboList { get; set; }
}
public class ProcessTypeResponse
public class ProcessTypeResponse : NotifyObject
{
/// <summary>
/// 工序单价
@ -32,8 +50,14 @@ namespace BBWY.Client.Models
public ObservableCollection<ProcessComboResponse> ProcessComboList { get; set; }
}
public class ProcessComboResponse
public class ProcessComboResponse : NotifyObject
{
private decimal processComboNamePrice;
/// <summary>
/// 套餐费用
/// </summary>
public decimal ProcessComboNamePrice { get => processComboNamePrice; set { Set(ref processComboNamePrice, value); } } //
/// <summary>
/// 套餐id
/// </summary>
@ -48,7 +72,7 @@ namespace BBWY.Client.Models
public ObservableCollection<ConsumableTypeResponse> ConsumableTypeList { get; set; }
}
public class ConsumableTypeResponse
public class ConsumableTypeResponse : NotifyObject
{
/// <summary>
/// 耗材类型名称

9
BBWY.Client/Models/Enums.cs

@ -544,5 +544,14 @@
{
= 0, = 1
}
/// <summary>
/// 打包配置状态( 待配置 = 0,已配置 = 1, 需修改=2)
/// </summary>
public enum PackConfigState
{
= 0,
= 1,
= 2
}
}

37
BBWY.Client/Models/PackTask/ConsumableModel.cs

@ -43,6 +43,8 @@ namespace BBWY.Client.Models.PackTask
public ICommand DeletedConsumableCommand { get; set; }
public ICommand SaveConsumableCommand { get; set; }
public ICommand AddConsumableTypeCommand { get; set; }
public ICommand DeletedConsumableTypeCommand { get; set; }
public Action ReflashDatas { get; set; }
public ConsumableModel(ConsumableService consumableService)
@ -52,24 +54,49 @@ namespace BBWY.Client.Models.PackTask
DeletedConsumableCommand = new RelayCommand<ObservableCollection<ConsumableModel>>(DeletedConsumable);
SaveConsumableCommand = new RelayCommand<object>(SaveConsumable);
if (consumableService!=null)
if (consumableService != null)
{
GetConsumableTypeList();
}
AddConsumableTypeCommand = new RelayCommand(AddConsumableType);
DeletedConsumableTypeCommand = new RelayCommand(DeletedConsumableType);
}
private void DeletedConsumableType()
{
MessageBoxResult result = System.Windows.MessageBox.Show($"是否移除耗材类别:{ConsumableTypeName}?", "提示",
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
if (result != MessageBoxResult.Yes) return;
var res = consumableService.DeletedConsumableType(ConsumableTypeId.Value);
if (!res.Success)
{
System.Windows.MessageBox.Show(res.Msg);
return;
}
if (res.Success)
{
GetConsumableTypeList();
}
AddConsumableTypeCommand= new RelayCommand(AddConsumableType);
}
private void AddConsumableType()
{
var res = consumableService.AddConsumableType(AddConsumableTypeName);
if (!res.Success)
{
System.Windows.MessageBox.Show(res.Msg);
return;
}
if (res.Success)
{
GetConsumableTypeList();
}
}
private long consumableTypeId;
public long ConsumableTypeId
private long? consumableTypeId;
public long? ConsumableTypeId
{ get => consumableTypeId; set { Set(ref consumableTypeId, value); } }
@ -182,7 +209,7 @@ namespace BBWY.Client.Models.PackTask
Width = this.Width,
Price = this.Price,
ConsumableTypeList = this.ConsumableTypeList,
ConsumableTypeName=this.ConsumableTypeName,
ConsumableTypeName = this.ConsumableTypeName,
ConsumableTypeId = this.ConsumableTypeId,
});

9
BBWY.Client/Models/PackTask/PackItemModel.cs

@ -123,8 +123,11 @@ namespace BBWY.Client.Models.PackTask
ConsumableItemList = AllConsumableTypeList.SingleOrDefault(a => a.ConsumableTypeName == ConsumableType)?.ConsumableList;
if (ConsumableItemList == null || ConsumableItemList.Count <= 0 )
{
return;
}
ConsumableItem = ConsumableItemList.FirstOrDefault()?.ConsumableName;
}
@ -150,7 +153,7 @@ namespace BBWY.Client.Models.PackTask
void OnConsumableItemChanged(string consumableItem)
{
if (ConsumableItemList == null || ConsumableItemList.Count <= 0 || consumableItem == null)
if (ConsumableItemList == null || ConsumableItemList.Count <= 0 || consumableItem .IsNullOrEmpty())
{
return;
}

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

@ -44,17 +44,20 @@ namespace BBWY.Client.Models
private void UpdateTask()
{
try
{
if (!this.SkuPurchaseSchemeId.IsNullOrEmpty())//B端有采购方案
{
UpdatePurchaseTaskWindow updatePurchaseWindow = new UpdatePurchaseTaskWindow(this,ReflashTask);
UpdatePurchaseTaskWindow updatePurchaseWindow = new UpdatePurchaseTaskWindow(this, ReflashTask);
updatePurchaseWindow.ShowDialog();
return;
}
if (!OrderId.IsNullOrEmpty()&& SkuPurchaseSchemeId.IsNullOrEmpty())//B端无采购方案 ,手动添加合格证
if (!OrderId.IsNullOrEmpty() && SkuPurchaseSchemeId.IsNullOrEmpty())//B端无采购方案 ,手动添加合格证
{
PublishTaskWindow publishB = new PublishTaskWindow(ReflashTask, this,SaveType.B端);
PublishTaskWindow publishB = new PublishTaskWindow(ReflashTask, this, SaveType.B端);
publishB.ShowDialog();
return;
}
@ -62,6 +65,13 @@ namespace BBWY.Client.Models
PublishTaskWindow publish = new PublishTaskWindow(ReflashTask, this, SaveType.C端);
publish.ShowDialog();
}
catch (Exception)
{
}
}
@ -86,9 +96,15 @@ namespace BBWY.Client.Models
private void SetService()
{
if (this.PackProcessType==null&&this.FeesMoney>0)
{
ServiceWindow window = new ServiceWindow(this, ReflashTask);
window.ShowDialog();
return;//旧版本
}
PackDetailWindow service = new PackDetailWindow(this, ReflashTask);
service.Show();
service.ShowDialog();
}
/// <summary>
@ -459,6 +475,19 @@ namespace BBWY.Client.Models
/// </summary>
public DateTime? ScheduleOverTime { get; set; }
private PackProcessType? packProcessType;
/// <summary>
/// 打包工序类型(0=推荐工序,1=自定义工序) NULL 金额不为0则为旧版本结算
/// </summary>
public PackProcessType? PackProcessType { get => packProcessType; set { Set(ref packProcessType, value); } }
public string ShopId { get; set; }
/// <summary>
/// 发送信息不全时间
/// </summary>
public DateTime? SendToSetSkuConfigureTime { get; set; }
}
public class SkuMessage : NotifyObject

30
BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs

@ -1,4 +1,5 @@
using BBWY.Client.APIServices;
using BBWY.Client.Models.APIModel.Response.PackTask;
using BBWY.Client.Models.PackTask;
using BBWY.Client.Views.PackTask;
using BBWY.Common.Models;
@ -17,9 +18,19 @@ using System.Windows.Input;
namespace BBWY.Client.ViewModels.PackTask
{
public class ConsumableViewModel : BaseVM, IDenpendency
{
private string consumableTypeName;
public string ConsumableTypeName
{ get => consumableTypeName; set { Set(ref consumableTypeName, value); } }
private long? consumableTypeId;
public long? ConsumableTypeId
{ get => consumableTypeId; set { Set(ref consumableTypeId, value); } }
public ObservableCollection<GetConsumableTypeResponse> consumableTypeList = new ObservableCollection<GetConsumableTypeResponse>()
{
};
public ObservableCollection<GetConsumableTypeResponse> ConsumableTypeList { get => consumableTypeList; set { Set(ref consumableTypeList, value); } }
private bool isOpenAdd = true;
public bool IsOpenAdd { get => isOpenAdd; set { Set(ref isOpenAdd, value); } }
@ -69,10 +80,23 @@ namespace BBWY.Client.ViewModels.PackTask
LoadIndex(p.PageIndex);
});
SearchConsumable();
GetConsumableTypeList();
}
void GetConsumableTypeList()
{
ConsumableTypeList = new ObservableCollection<GetConsumableTypeResponse>();
var res = consumableService.GetConsumableTypeList();
if (res.Success && res.Data != null)
{
ConsumableTypeList.Add(new GetConsumableTypeResponse { ConsumableTypeId = null, ConsumableTypeName = "全部" });
foreach (var item in res.Data)
{
ConsumableTypeList.Add(item);
}
}
}
private void LoadIndex(int pageIndex)
{
@ -91,6 +115,8 @@ namespace BBWY.Client.ViewModels.PackTask
Name = searchName,
PageIndex = PageIndex,
PageSize = PageSize,
ConsumableTypeId = ConsumableTypeId,
});
if (res.Success)
{

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

@ -87,9 +87,6 @@ namespace BBWY.Client.ViewModels.PackTask
}
}
private decimal packFees;
/// <summary>
/// 打包原价
@ -119,22 +116,32 @@ namespace BBWY.Client.ViewModels.PackTask
get => processTaskCount; set
{
Set(ref processTaskCount, value);
OnProcessTypeChanged(SelectProcessType, 1);
if (PackProcessType == PackProcessType.&& SelectProcessComboIdV2>0&& ProcessTaskCount>0)
TotalPackFeesDetail(null, ProcessTaskCount, SelectProcessComboIdV2);
if (PackProcessType == PackProcessType.&& !SelectProcessType.IsNullOrEmpty()&& ProcessTaskCount>0)
TotalPackFeesDetail(SelectProcessType, ProcessTaskCount, null);
}
}
void OnProcessTaskCountChanged()
{
PackFees = decimal.Parse((ProcessTaskCount * ProcessPrice).ToString("0.00")); ;
PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
}
//void OnProcessTaskCountChanged()
//{
// PackFees = decimal.Parse((ProcessTaskCount * ProcessPrice).ToString("0.00")); ;
// PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
//}
private ObservableCollection<ProcessComboResponse> processComboList;
/// <summary>
/// 套餐类型列表
/// </summary>
public ObservableCollection<ProcessComboResponse> ProcessComboList { get => processComboList; set { Set(ref processComboList, value); } }
private List<ProcessComboModel> processComboList;
private ObservableCollection<ProcessComboResponse> processComboListV2;
/// <summary>
/// 套餐类型列表
/// </summary>
public List<ProcessComboModel> ProcessComboList { get => processComboList; set { Set(ref processComboList, value); } }
public ObservableCollection<ProcessComboResponse> ProcessComboListV2 { get => processComboListV2; set { Set(ref processComboListV2, value); } }
@ -151,17 +158,112 @@ namespace BBWY.Client.ViewModels.PackTask
OnProcessComboChanged(SelectProcessComboId);
}
}
private long selectProcessComboIdV2;
/// <summary>
/// 选中套餐类型(推荐工序)
/// </summary>
public long SelectProcessComboIdV2
{
get => selectProcessComboIdV2; set
{
Set(ref selectProcessComboIdV2, value);
OnProcessComboChanged(SelectProcessComboIdV2);
}
}
public bool isConsumableTypeListEnable;
public bool IsConsumableTypeListEnable { get => isConsumableTypeListEnable; set { Set(ref isConsumableTypeListEnable, value); } }
private void OnProcessComboChanged(long SelectProcessComboId)
private void OnProcessComboChanged(long SelectProcessComboId, int type = 1)
{
if (SelectProcessComboId <= 0)
{
return;
}
if (PackProcessType == PackProcessType.)
{
if (ProcessComboListV2 == null || ProcessComboListV2.Count <= 0)
{
return;
}
if (!DirectionalSingleFees.IsNullOrEmpty())
DirectionalSingleFees = string.Empty;//
var selectProcessComboData = ProcessTypeResponseList.SingleOrDefault(p => p.ProcessTypeName == SelectProcessType).ProcessComboList.
var selectProcessComboData = ProcessComboListV2.
SingleOrDefault(p => p.ProcessComboId == SelectProcessComboId);
App.Current.Dispatcher.Invoke(new Action(() =>
{
ConsumableServiceList.Clear();
}));
IsConsumableTypeListEnable = false;
ProcessPrice = selectProcessComboData.ProcessComboNamePrice;
ConsumableFees = 0;
AllFees = ConsumableFees + PackDiscountFees;
if (selectProcessComboData != null && selectProcessComboData.ConsumableTypeList != null && selectProcessComboData.ConsumableTypeList.Count > 0)//自动添加列表
{
foreach (var item in selectProcessComboData.ConsumableTypeList)
{
App.Current.Dispatcher.Invoke(new Action(() =>
{
ConsumableServiceList.Add(new PackItemModel
{
ConsumableTypeList = new ObservableCollection<string> { item.ConsumableTypeName },
ConsumableType = item.ConsumableTypeName,
ConsumableItemList = item.ConsumableList,
//ConsumableItem = item.ConsumableList.FirstOrDefault()?.ConsumableName,
//ConsumablePrice = item.ConsumableList.FirstOrDefault().ConsumablePrice,
TaskCount = ProcessTaskCount,
TotalConsumableFees = ToTalConsumableFees,
}); ;
}));
}
}
//关联工序类型名
var discountRes = processService.GetDiscountFactory(SelectProcessType, ProcessTaskCount, SelectProcessComboIdV2);
if (!discountRes.Success)
{
System.Windows.MessageBox.Show(discountRes.Msg);
return;
}
if (discountRes.Success && discountRes.Data != null)
{
DiscountFactory = discountRes.Data.DiscountFactory;
if (FeesMode == FeesMode. && CustomProcessSinglePrice != null)
{
PackFees = decimal.Parse((ProcessTaskCount * CustomProcessSinglePrice.Value).ToString("0.00"));
}
else
{
FeesMode = discountRes.Data.FeesMode;
PackFees = decimal.Parse((ProcessTaskCount * ProcessPrice).ToString("0.00"));
}
PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
AllFees = ConsumableFees + PackDiscountFees;
}
}
if (PackProcessType == PackProcessType.)
{
var selectProcessComboData = ProcessComboList.
SingleOrDefault(p => p.ProcessComboId == SelectProcessComboId);
App.Current.Dispatcher.Invoke(new Action(() =>
{
ConsumableServiceList.Clear();
@ -174,6 +276,11 @@ namespace BBWY.Client.ViewModels.PackTask
ConsumableServiceList = new ObservableCollection<PackItemModel>();
}
else
{
if (!DirectionalSingleFees.IsNullOrEmpty())
DirectionalSingleFees = string.Empty;
}
ConsumableFees = 0;
AllFees = ConsumableFees + PackDiscountFees;
@ -199,15 +306,58 @@ namespace BBWY.Client.ViewModels.PackTask
}
}
}
if (PackProcessType == PackProcessType. && SelectProcessComboIdV2 > 0 && ProcessTaskCount > 0)
TotalPackFeesDetail(null, ProcessTaskCount, SelectProcessComboIdV2);
if (PackProcessType == PackProcessType. && !SelectProcessType.IsNullOrEmpty() && ProcessTaskCount > 0)
TotalPackFeesDetail(SelectProcessType, ProcessTaskCount, null);
}
private void TotalPackFeesDetail(string processType, int taskCount, long? processComboId)
{
var discountRes = processService.GetDiscountFactory(processType, taskCount, processComboId);
if (!discountRes.Success)
{
System.Windows.MessageBox.Show(discountRes.Msg);
return;
}
if (discountRes.Success && discountRes.Data != null)
{
DiscountFactory = discountRes.Data.DiscountFactory;
if (FeesMode == FeesMode. && CustomProcessSinglePrice != null)
{
PackFees = decimal.Parse((taskCount * CustomProcessSinglePrice.Value).ToString("0.00"));
}
else
{
FeesMode = discountRes.Data.FeesMode;
PackFees = decimal.Parse((taskCount * ProcessPrice).ToString("0.00"));
}
PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
AllFees = ConsumableFees + PackDiscountFees;
}
//统计打包费用
}
private List<string> processTypeList;
private List<ProcessTypeResponse> processTypeList;
/// <summary>
/// 工序类型列表
/// </summary>
public List<string> ProcessTypeList { get => processTypeList; set { Set(ref processTypeList, value); } }
public List<ProcessTypeResponse> ProcessTypeList { get => processTypeList; set { Set(ref processTypeList, value); } }
private string selectProcessType;
@ -222,46 +372,61 @@ namespace BBWY.Client.ViewModels.PackTask
OnProcessTypeChanged(SelectProcessType);
}
}
private void OnProcessTypeChanged(string SelectProcessType, int isTaskCount = 0)
private void OnProcessTypeChanged(string SelectProcessType)
{
if (isTaskCount == 0)
{
if (ProcessTypeResponseList == null || ProcessTypeResponseList.Count <= 0 || SelectProcessType == null) return;
var processTypeData = ProcessTypeResponseList.SingleOrDefault(p => p.ProcessTypeName == SelectProcessType);
if (SelectProcessType.IsNullOrEmpty()) return;
var processTypeData = ProcessTypeList.SingleOrDefault(p => p.ProcessTypeName == SelectProcessType);
App.Current.Dispatcher.Invoke(new Action(() =>
{
ProcessPrice = processTypeData.ProcessTypePrice;
ProcessComboList = processTypeData.ProcessComboList.Select(p => new ProcessComboModel { ProcessComboId = p.ProcessComboId, ProcessComboName = p.ProcessComboName }).ToList();
ProcessComboList = processTypeData.ProcessComboList;
}));
if (ProcessComboList != null || ProcessComboList.Count() > 0)
{
SelectProcessComboId = ProcessComboList.FirstOrDefault().ProcessComboId;
}
}
var discountRes = processService.GetDiscountFactory(SelectProcessType, ProcessTaskCount);
if (!discountRes.Success)
private string selectProductResistant;
/// <summary>
/// 选中易碎等级
/// </summary>
public string SelectProductResistant
{
System.Windows.MessageBox.Show(discountRes.Msg);
get => selectProductResistant; set
{
Set(ref selectProductResistant, value);
OnProductResistantChanged(SelectProductResistant);
}
}
private void OnProductResistantChanged(string SelectProductResistant, int isTaskCount = 0)
{
if (SelectProductResistant.IsNullOrEmpty())
{
return;
}
if (discountRes.Success && discountRes.Data != null)
if (isTaskCount == 0)//获取绑定的耗材列表
{
DiscountFactory = discountRes.Data.DiscountFactory;
if (FeesMode == FeesMode. && CustomProcessSinglePrice != null)
if (ProductResistantList == null || ProductResistantList.Count <= 0 || SelectProductResistant == null) return;
var processTypeData = ProductResistantList.SingleOrDefault(p => p.ProductResistantName == SelectProductResistant);
App.Current.Dispatcher.Invoke(new Action(() =>
{
PackFees = decimal.Parse((ProcessTaskCount * CustomProcessSinglePrice.Value).ToString("0.00"));
}
else
//ProcessPrice = processTypeData.ProcessTypePrice;
ProcessComboListV2 = processTypeData.ProcessComboList;
}));
if (ProcessComboListV2 != null || ProcessComboListV2.Count() > 0)
{
FeesMode = discountRes.Data.FeesMode;
PackFees = decimal.Parse((ProcessTaskCount * ProcessPrice).ToString("0.00"));
SelectProcessComboIdV2 = ProcessComboListV2.FirstOrDefault().ProcessComboId;
}
PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
AllFees = ConsumableFees + PackDiscountFees;
}
//统计打包费用
}
private string suggestPackUserName;
@ -339,11 +504,6 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
public ICommand AddPackUserCommand { get; set; }
public ICommand AddPackServiceCommand { get; set; }
public ICommand AddBasicPackServiceCommand { get; set; }
public ICommand AddIncreateServiceCommand { get; set; }
public ICommand AddConsumableCommand { get; set; }
@ -391,18 +551,9 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary>
/// 折扣
/// </summary>
public string Discount { get => discount; set { Set(ref discount, value); } } //
public ObservableCollection<PackServiceDTO> IncreateServiceList { get; set; } = new ObservableCollection<PackServiceDTO>();
public string Discount { get => discount; set { Set(ref discount, value); } }
public ObservableCollection<PackUser> MemberList { get; set; } = new ObservableCollection<PackUser>();
public ObservableCollection<ConsumableModel> ConsumableList { get; set; } = new ObservableCollection<ConsumableModel>();
public ObservableCollection<PackServiceDTO> PackServiceList { get; set; } = new ObservableCollection<PackServiceDTO>();
/// <summary>
/// 基础包装服务项目列表
/// </summary>
public ObservableCollection<PackServiceDTO> BasicPackServiceList { get; set; } = new ObservableCollection<PackServiceDTO>();
@ -466,17 +617,15 @@ namespace BBWY.Client.ViewModels.PackTask
this.processService = processService;
this.packTaskService = packTaskService;
this.packDetailService = packDetailService;
AddIncreateServiceCommand = new RelayCommand(AddIncreateService);
AddPackServiceCommand = new RelayCommand(AddPackService);
AddBasicPackServiceCommand = new RelayCommand(AddBasicPackService);
AddConsumableCommand = new RelayCommand(AddConsumable);
UpLoadPackCommand = new RelayCommand<object>(UpLoadPack);
PackUserModelList = new ObservableCollection<PackUserModel>();
AddConsumableCommand = new RelayCommand(AddConsumable);
UpLoadPackCommand = new RelayCommand<object>(UpLoadPack);
SetAllCountCommand = new RelayCommand<object>(SetAllCount);
SetCustomProcessPriceCommand = new RelayCommand(SetCustomProcessPrice);
AddPackUserCommand = new RelayCommand(AddPackUser);
PackUserModelList = new ObservableCollection<PackUserModel>();
}
private void AddPackUser()
@ -504,7 +653,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
if (CustomProcessSinglePrice == null)
{
OnProcessTypeChanged(SelectProcessType, 1);
TotalPackFeesDetail(null, ProcessTaskCount, SelectProcessComboIdV2);
return;
}
if (SelectProcessType != "定制")
@ -513,13 +662,17 @@ namespace BBWY.Client.ViewModels.PackTask
SelectProcessComboId = ProcessComboList.FirstOrDefault().ProcessComboId;
}
FeesMode = FeesMode.;
ProcessPrice = CustomProcessSinglePrice.Value;
PackFees = decimal.Parse((ProcessTaskCount * CustomProcessSinglePrice.Value).ToString("0.00")); ;
PackDiscountFees = decimal.Parse((PackFees * DiscountFactory).ToString("0.00"));
AllFees = ConsumableFees + PackDiscountFees;
}
private List<ProcessTypeResponse> ProcessTypeResponseList { get; set; }
private List<ProductResistantResponse> productResistantList;
public List<ProductResistantResponse> ProductResistantList { get => productResistantList; set { Set(ref productResistantList, value); } }
/// <summary>
/// 加载任务数据
/// </summary>
@ -563,11 +716,12 @@ namespace BBWY.Client.ViewModels.PackTask
ProcessTaskCount = TaskCount;
if (res.Success && res.Data != null)
{
ProcessTypeResponseList = res.Data.ProcessTypeList;
ConsumableTypeList = res.Data.ConsumableTypeList;
App.Current.Dispatcher.Invoke(() =>
{
ProcessTypeList = ProcessTypeResponseList.Select(p => p.ProcessTypeName).Distinct().ToList();
ProcessTypeList = res.Data.ProcessTypeList;
ProductResistantList = res.Data.ProductResistantList;
});
}
@ -585,12 +739,27 @@ namespace BBWY.Client.ViewModels.PackTask
{
var resData = packDetailRes.Data;
SuggestPackUserName = resData.SuggestPackUserName;
PackProcessType = resData.PackProcessType;
switch (PackProcessType)
{
case PackProcessType.:
SelectProductResistant = resData.ProductResistantName;
SelectProcessComboIdV2 = resData.ProcessComboId;
break;
case PackProcessType.:
SelectProcessType = resData.ProcessTypeName;
SelectProcessComboId = resData.ProcessComboId;
break;
default:
break;
}
SuggestPackUserName = resData.SuggestPackUserName;
TaskCount = resData.ProcessTaskCount;
DirectionalSingleFees = resData.DirectionalSingleFees?.ToString();
if (resData.DirectionalSingleFees>0)
if (resData.DirectionalSingleFees > 0)
{
SetCustomProcessPrice();
}
@ -726,66 +895,6 @@ namespace BBWY.Client.ViewModels.PackTask
public string SkuId { get; set; }
private List<PackItemModel> IsOverCount(ObservableCollection<PackItemModel> packItemModels, bool needUserId = true)
{
List<PackItemModel> disItems = new List<PackItemModel>();
foreach (var packItem in packItemModels)//增值服务上传
{
var item = new PackItemModel
{
ItemCount = packItem.ItemCount,
SelectId = packItem.SelectId,
SelectUserId = packItem.SelectUserId,
ItemName = packItem.ItemName,
MemberName = packItem.MemberName
};
if (needUserId)
if (item.SelectId <= 0 || string.IsNullOrEmpty(item.SelectUserId) || item.ItemCount <= 0)
{
System.Windows.MessageBox.Show($"数据输入有误");
return null;
}
else
if (item.SelectId <= 0 || item.ItemCount <= 0)
{
System.Windows.MessageBox.Show($"数据输入有误");
return null;
}
if (item.ItemCount > TaskCount)
{
System.Windows.MessageBox.Show($"{item.ItemName}:{item.ItemCount}超出任务量{TaskCount}");
return null;
}
if (disItems.Select(a => a.SelectId).Contains(item.SelectId))//相同服务 存在累加
{
var data = disItems.SingleOrDefault(a => a.SelectId == item.SelectId);
if (data != null) data.ItemCount += item.ItemCount;
if (data.ItemCount > TaskCount)//累积超出任务量
{
System.Windows.MessageBox.Show($"{item.ItemName}:{data.ItemCount}超出任务量{TaskCount}");
return null;
}
continue;
}
disItems.Add(item);
}
return disItems;
}
/// <summary>
/// 计费模式
/// </summary>
@ -834,9 +943,9 @@ namespace BBWY.Client.ViewModels.PackTask
}
foreach (var item in ConsumableServiceList)
{
if (item.TaskCount > ProcessTaskCount)
if (item.TaskCount != ProcessTaskCount)
{
System.Windows.MessageBox.Show($"耗材分类:{item.ConsumableType}下,任务量:{item.TaskCount} 不能超过工序任务总量:{ProcessTaskCount}.");
System.Windows.MessageBox.Show($"耗材分类:{item.ConsumableType}下,任务量:{item.TaskCount} 不等于工序任务总量:{ProcessTaskCount}.");
return;
}
}
@ -862,10 +971,14 @@ namespace BBWY.Client.ViewModels.PackTask
PackDiscountPrice = PackDiscountFees,
PackPrice = PackFees,
ProcessComboCount = ProcessTaskCount,
ProcessComboId = SelectProcessComboId,
ProcessTypeName = SelectProcessType
ProcessComboId = PackProcessType == PackProcessType. ? SelectProcessComboIdV2 : SelectProcessComboId,
ProcessTypeName = SelectProcessType,
PackProcessType = PackProcessType,
ProductResistantName = SelectProductResistant,
};
var res = packDetailService.SetPackDetail(setPackDetailRequest);
if (res == null)
@ -892,47 +1005,12 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
public Action ReflashWindow { get; set; }
private void AddPackService()
{
App.Current.Dispatcher.Invoke(new Action(() =>
{
IncrementProcessList.Add(new PackItemModel()
{
ItemCount = TaskCount,
MemberList = MemberList,
PackServiceList = PackServiceList,
});
}));
}
private void AddBasicPackService()
{
App.Current.Dispatcher.Invoke(new Action(() =>
{
BasicPackProcessList.Add(new PackItemModel()
{
ItemCount = TaskCount,
MemberList = MemberList,
PackServiceList = BasicPackServiceList,
});
}));
}
private void AddIncreateService()
{
App.Current.Dispatcher.Invoke(new Action(() =>
{
IncreateList.Add(new PackItemModel()
{
ItemCount = TaskCount,
IncreateServiceList = IncreateServiceList,
MemberList = MemberList,
});
}));
}
private void AddConsumable()
{
@ -955,7 +1033,7 @@ namespace BBWY.Client.ViewModels.PackTask
TaskCount = ProcessTaskCount,
ConsumableTypeList = consumableTypeList,
AllConsumableTypeList = ConsumableTypeList,
TotalConsumableFees=ToTalConsumableFees
TotalConsumableFees = ToTalConsumableFees
});

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

@ -289,7 +289,7 @@ namespace BBWY.Client.ViewModels.PackTask
var paramList = (object[])param;
var id = (long)paramList[0];
var markMsg = paramList[1].ToString();
SubmitOverTimeMarkMsgWindow submitOverTimeMarkMsgWindow = new SubmitOverTimeMarkMsgWindow(OverTimeTaskType., id, markMsg, packTaskService, ReflashTask) ;
SubmitOverTimeMarkMsgWindow submitOverTimeMarkMsgWindow = new SubmitOverTimeMarkMsgWindow(OverTimeTaskType., id, markMsg, packTaskService, ReflashTask);
submitOverTimeMarkMsgWindow.ShowDialog();
}
@ -314,7 +314,7 @@ namespace BBWY.Client.ViewModels.PackTask
//SetJDWareBoxWindow window = new SetJDWareBoxWindow(model,sealBoxService,fallware.WareType.Value,ReflashTask);
//window.Show();
var w = new SetJDWareBoxWindow2(model, sealBoxService, fallware.WareType.Value, ReflashTask,fallware.TransportOverTime);
var w = new SetJDWareBoxWindow2(model, sealBoxService, fallware.WareType.Value, ReflashTask, fallware.TransportOverTime);
w.ShowDialog();
//}
//if (fallware.WareType == WareType.云仓)
@ -389,11 +389,11 @@ namespace BBWY.Client.ViewModels.PackTask
private void DeletedTask(object obj)
{
var packTaskmodel = (PackTaskModel)obj;
if (!packTaskmodel.OrderId.IsNullOrEmpty())
{
System.Windows.MessageBox.Show($"暂不支持删除采购组的任务,如要删除,请到采购列表取消订单:{packTaskmodel.OrderId}");
return;
}
//if (!packTaskmodel.OrderId.IsNullOrEmpty())
//{
// System.Windows.MessageBox.Show($"暂不支持删除采购组的任务,如要删除,请到采购列表取消订单:{packTaskmodel.OrderId}");
// return;
//}
MessageBoxResult result = MessageBox.Show("确定取消任务?", "提示",
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
@ -527,7 +527,7 @@ namespace BBWY.Client.ViewModels.PackTask
try
{
if (SearchTaskId != null && !string.IsNullOrEmpty(SearchTaskId.Trim()))
taskId= Convert.ToInt64(SearchTaskId);
taskId = Convert.ToInt64(SearchTaskId);
}
catch
{
@ -545,7 +545,7 @@ namespace BBWY.Client.ViewModels.PackTask
try
{
PackTaskList = new ObservableCollection<PackTaskModel>();//初始化数据
var datas = packTaskService.SearchTaskList(SearchSkuId, SearchTaskId,SearchSpuId,SearchOrderSn, this.TaskState,
var datas = packTaskService.SearchTaskList(SearchSkuId, SearchTaskId, SearchSpuId, SearchOrderSn, this.TaskState,
PageIndex, PageSize);
if (datas != null && datas.Data != null && datas.Success)
{
@ -588,7 +588,9 @@ namespace BBWY.Client.ViewModels.PackTask
ShopName = item.ShopName,
SkuPurchaseSchemeId = item.SkuPurchaseSchemeId,
ScheduleOverTimeMarkMsg = item.ScheduleOverTimeMarkMsg,
ScheduleOverTime = item.ScheduleOverTime
ScheduleOverTime = item.ScheduleOverTime,
PackProcessType = item.PackProcessType,
SendToSetSkuConfigureTime = item.SendToSetSkuConfigureTime,
};
if (!item.OrderId.IsNullOrEmpty() && !item.SkuId.IsNullOrEmpty())//加载物流信息
@ -596,7 +598,8 @@ namespace BBWY.Client.ViewModels.PackTask
var expressData = packTaskService.GetPurchaseExpressOrderList(item.OrderId, item.SkuId);
if (expressData != null && expressData.Success && expressData.Data != null)
{
expressData.Data.ForEach(e => {
expressData.Data.ForEach(e =>
{
e.ExpressState = ExpressOrderHelper.GetExpressStateName(e.ExpressState);
});
data.ExpressOrderList = expressData.Data;
@ -661,19 +664,18 @@ namespace BBWY.Client.ViewModels.PackTask
{
foreach (var item in packtasks)
{
var datetime = item.QualityCompletionOverTime.Value.Subtract(DateTime.Now);
TimeSpan datetime;
if (item.SendToSetSkuConfigureTime != null)
datetime = item.QualityCompletionOverTime.Value.Subtract(item.SendToSetSkuConfigureTime.Value);
else
datetime = item.QualityCompletionOverTime.Value.Subtract(DateTime.Now);
item.QualityRemainTime = OverTimeHelper.GetTimeString(datetime);
if (datetime.TotalMilliseconds > 0)
{
item.IsQualityOverTime = false;
//item.QualityRemainTime = $"{datetime.Days}天{datetime.Hours}小时{datetime.Minutes}分{datetime.Seconds}秒";
item.QualityRemainTime = $"{datetime.Days}天{datetime.Hours}小时{datetime.Minutes}分";
}
else
{
item.IsQualityOverTime = true;
//item.QualityRemainTime = $"{-datetime.Days}天{-datetime.Hours}小时{-datetime.Minutes}分{-datetime.Seconds}秒";
item.QualityRemainTime = $"{-datetime.Days}天{-datetime.Hours}小时{-datetime.Minutes}分";
}
}
}));
@ -803,7 +805,7 @@ namespace BBWY.Client.ViewModels.PackTask
if (SealBoxConfigureType == SealBoxConfigureType.)
{
SealBoxWaitConfigureList = new ObservableCollection<SealBoxWaitConfigureModel>();
ApiResponse<SealBoxWaitConfigureResponse> sealBoxWaitRes = sealBoxService.GetSealBoxWaitConfigureList(SearchSkuId, SearchTaskId, PageSize, PageIndex,SearchSpuId);
ApiResponse<SealBoxWaitConfigureResponse> sealBoxWaitRes = sealBoxService.GetSealBoxWaitConfigureList(SearchSkuId, SearchTaskId, PageSize, PageIndex, SearchSpuId);
if (sealBoxWaitRes == null)
{
@ -941,7 +943,7 @@ namespace BBWY.Client.ViewModels.PackTask
var fallWareTasks = FallWareWaitConfigureList.Where(p => p.SetPurchaseOrderOverTime != null).ToList();
if (fallWareTasks.Count() > 0 && TaskState == Models.TaskState.&& SealBoxConfigureType == SealBoxConfigureType.)
if (fallWareTasks.Count() > 0 && TaskState == Models.TaskState. && SealBoxConfigureType == SealBoxConfigureType.)
{
//if (packOverTimeThread!=null)
//{

67
BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs

@ -66,14 +66,14 @@ namespace BBWY.Client.ViewModels.PackTask
private ObservableCollection<string> certificatePositionList = new ObservableCollection<string> {
"无","外部包装","产品包装"
"无需合格证","外部包装","产品包装"
};
public ObservableCollection<string> CertificatePositionList { get => certificatePositionList; set { Set(ref certificatePositionList, value); } }
private ObservableCollection<string> availabilityList = new ObservableCollection<string> {
"已到货","部分到货","未到货"
};
public ObservableCollection<string> AvailabilityList { get => availabilityList; set { Set(ref availabilityList, value); } }
//private ObservableCollection<string> availabilityList = new ObservableCollection<string> {
// "已到货","部分到货","未到货"
// };
//public ObservableCollection<string> AvailabilityList { get => availabilityList; set { Set(ref availabilityList, value); } }
private int skuCount;
/// <summary>
@ -631,39 +631,6 @@ namespace BBWY.Client.ViewModels.PackTask
//加载配置文件
}
//public void SearSpuCer()
//{
// if (string.IsNullOrEmpty(SpuId))
// {
// SearchSku(SkuId);
// return;
// }
// SpuId = SpuId.Trim();//去掉空格 避免数据异常
// var productSku = packPurchaseTaskService.GetSpuCer(SpuId);
// if (productSku == null || !productSku.Success)
// {
// IsSetSpuCertificate = true;
// return;
// }
// SpuCertificateModel = productSku.Data;
// IsSetSpuCertificate = false;
// if (SpuCertificateModel == null)
// {
// SpuCertificateModel = new CertificateModel();
// IsSetSpuCertificate = true;
// SpuCertificateModel.Brand = Brand;
// SpuCertificateModel.BrandName = BrandName;
// SpuCertificateModel.ProductNo = ProductNo;
// SpuCertificateModel.SpuId = SpuId;
// }
//}
public Action ReflashWindow { get; set; }
public void InitData()
{
@ -679,15 +646,11 @@ namespace BBWY.Client.ViewModels.PackTask
BarCodeModel = null;
OriginShopName = "";
// Availability = (TaskState.)config.Availability;
MarkMessage = "";
CertificatePosition = CertificatePosition.;
// Increment1 = config.Increment1;
IsNeedBarCode = Need.;
IsNeedCertificateModel = Need.;
bool isSelected;
IncreateList = new ObservableCollection<IncreateModel>();
foreach (var item in increates)
@ -738,49 +701,44 @@ namespace BBWY.Client.ViewModels.PackTask
SkuName = SkuName,
OrderId = OrderId,
BrandName = BrandName,
Availability = (int)Availability,
BasicPack = (int)BasicPack,
SkuId = SkuId,
Increment1 = increateStr,
CertificatePosition = (int)CertificatePosition,
PackType = (int)PackType,
MarkMessage = MarkMessage,
PositionType = (int)PositionType,
GoodsNumber = GoodsNumber,
SkuGoodsTitle = SkuTitle,
SkuCount = SkuCount,
NeedBar = IsNeedBarCode == Need.,
NeedCer = IsNeedCertificateModel == Need.,
SkuPurchaseSchemeId = SkuPurchaseSchemeId,
Brand = Brand,
PurchaseSkuSpecs = PurchaseSkuList.Select(p => new PurchaseSkuSpec
{
IsNeedCer = p.IsNeedCer,
PurchaseSkuId = p.PurchaseSkuId,
}).ToArray()
}).ToArray(),
//IsWorry = IsWorry
};
if (IsNeedBarCode == Need.)
{
if (BarCodeModel == null || IsSetBarCode || BarCodeModel.Id <= 0)
{
MessageBox.Show("请设置条形码模板");
//new TipsWindow("请设置条形码模板").Show();
return;
}
createTaskModel.BarCodeId = BarCodeModel.Id;
}
if (IsNeedCertificateModel == Need.)
{
if (CertificatePosition!= CertificatePosition.)//需要合格证
{
if (PurchaseSkuList != null && PurchaseSkuList.Count > 0 && purchaseSkuList.Any(p => p.IsNeedCer))
{
if (purchaseSkuList.Any(p => p.IsNeedCer && p.CerDTO == null))
{
MessageBox.Show("有未设置的合格证,请设置完所有的合格证再保存");
return;
}
var cerList = purchaseSkuList.Where(p => p.IsNeedCer).Select(p => p.CerDTO).Select(c => c.Id).Where(c => c > 0).ToList();
if (purchaseSkuList.Count() <= 0 || cerList.Count <= 0)
{
@ -789,6 +747,11 @@ namespace BBWY.Client.ViewModels.PackTask
}
createTaskModel.CerId = string.Join(",", cerList);//
}
}
ApiResponse<long> res = null;
res = packPurchaseTaskService.UpdatePurchaseTask(createTaskModel);

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

@ -126,7 +126,7 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary>
/// 查询物流
/// </summary>
private string selectTaskId= "任务ID";
private string selectTaskId = "任务ID";
public string SelectTaskId
{
get => selectTaskId;
@ -570,11 +570,31 @@ namespace BBWY.Client.ViewModels.PackTask
LookLSOrderConfigureCommand = new RelayCommand<object>(LookLSOrderConfigure);
SubmitOverTimeMarkMsgCommand = new RelayCommand<object>(SubmitOverTimeMarkMsg);
SendToSetSkuConfigureCommand = new RelayCommand<PackTaskModel>(SendToSetSkuConfigure);
SelectSku = "SKU";
SelectExpress = "物流单号";
}
private void SendToSetSkuConfigure(PackTaskModel model)
{
if (model.SendToSetSkuConfigureTime!=null)
{
System.Windows.MessageBox.Show($"已提醒配置,提醒时间:{model.SendToSetSkuConfigureTime},请耐心等待");
return;
}
var res = packTaskService.SendToSetSkuConfigure(model.TaskId);
if (!res.Success)
{
System.Windows.MessageBox.Show(res.Msg);
}
if (res.Success)
{
SearchTaskList();
}
}
private void SubmitOverTimeMarkMsg(object param)
{
@ -924,6 +944,10 @@ namespace BBWY.Client.ViewModels.PackTask
#region 事件绑定
/// <summary>
/// 推送sku配置状态
/// </summary>
public ICommand SendToSetSkuConfigureCommand { get; set; }
/// <summary>
/// 提交超时原因
/// </summary>
@ -1516,7 +1540,10 @@ namespace BBWY.Client.ViewModels.PackTask
ShowMarkMessage = item.ShowMarkMessage,
SkuPurchaseSchemeId = item.SkuPurchaseSchemeId,
ScheduleOverTimeMarkMsg = item.ScheduleOverTimeMarkMsg,
ScheduleOverTime = item.ScheduleOverTime
ScheduleOverTime = item.ScheduleOverTime,
PackProcessType = item.PackProcessType,
ShopId = item.ShopId,
SendToSetSkuConfigureTime= item.SendToSetSkuConfigureTime,
};
@ -1557,7 +1584,7 @@ namespace BBWY.Client.ViewModels.PackTask
if (item.FeesItemResponse != null)
{
data.FeesItemResponse = item.FeesItemResponse;
data.FeesMoney = item.FeesItemResponse.SingleFees;
data.FeesMoney = item.FeesItemResponse.AllFees;
data.FeesItemResponse.DiscountAllFees = item.FeesItemResponse.AllFees *
item.FeesItemResponse.disCount;
@ -1597,7 +1624,11 @@ namespace BBWY.Client.ViewModels.PackTask
{
foreach (var item in packtasks)
{
var datetime = item.QualityCompletionOverTime.Value.Subtract(DateTime.Now);
TimeSpan datetime;
if (item.SendToSetSkuConfigureTime != null)
datetime = item.QualityCompletionOverTime.Value.Subtract(item.SendToSetSkuConfigureTime.Value);
else
datetime = item.QualityCompletionOverTime.Value.Subtract(DateTime.Now);
item.QualityRemainTime = OverTimeHelper.GetTimeString(datetime);
if (datetime.TotalMilliseconds > 0)
{

6
BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml.cs

@ -32,9 +32,10 @@ namespace BBWY.Client.Views.FallWare
{
public SetJDWareBoxWindow(JDWareBoxModel model)
{
JDWareBoxModel = model;
InitializeComponent();
PurchaseOrderImage= MyPrintHelper.GetBarcodeImageV2(model.PurchaseOrder, 420, 50);
JDWareBoxModel = model;
PurchaseOrderImage = MyPrintHelper.GetBarcodeImageV2(model.PurchaseOrder, 420, 50);
PrewOrderImage = MyPrintHelper.GetBarcodeImageV2(model.PrewOrder, 350, 50);
this.DataContext =this;
this.Dispatcher.Invoke(() => {
@ -88,6 +89,7 @@ namespace BBWY.Client.Views.FallWare
this.Width = pageWidth;//1123
this.FontSize = 30;
box_margin.Margin = new Thickness(50, 50, 50, 50);
//box_margin.Margin = new Thickness(10);
this.jd_box.Arrange(new Rect(new Point(0, 0), new Size(pageWidth, pageHeight)));
for (int i = 1; i <= JDWareBoxModel.BoxCount; i++)
{

32
BBWY.Client/Views/PackTask/Consumable.xaml

@ -41,7 +41,7 @@
<RowDefinition Height="30"/>
<!---->
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Stretch" Panel.ZIndex="10" Margin="10,5,0,0" >
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Stretch" Panel.ZIndex="10" Margin="10,5,10,0" >
<StackPanel Orientation="Horizontal" Height="35">
<!-- Command="{Binding AddConsumableCommand}"-->
@ -51,13 +51,26 @@
</c:BButton>
<TextBlock Text="耗材品名:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Visibility="Hidden" Width="150" Height="30" />
<!--<TextBlock Text="耗材类型:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<ComboBox Width="100" Height="30" />-->
</StackPanel>
<Button Content="搜索" Height="35" Width="66" VerticalAlignment="Stretch" Margin="5,0,10,0"
Command="{Binding SearchConsumableCommand}" HorizontalAlignment="Right"
<TextBlock Text="耗材类型:" VerticalAlignment="Center" Margin="16,0,0,0" />
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}">
<Border.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>
</Border.Resources>
<ComboBox BorderThickness="0" Width="140" VerticalContentAlignment="Center" ItemsSource="{Binding ConsumableTypeList}"
DisplayMemberPath="ConsumableTypeName"
SelectedValuePath="ConsumableTypeId" SelectedValue="{Binding ConsumableTypeId}" Text="{Binding ConsumableTypeName}"
/>
</Border>
<Button Content="搜索" Height="35" Width="66" VerticalAlignment="Stretch" Margin="60,0,10,0"
Command="{Binding SearchConsumableCommand}" HorizontalAlignment="Left"
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
</StackPanel>
</Grid>
@ -66,7 +79,7 @@
<RowDefinition Height="35"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" Margin="10 0 5 0">
<Grid Background="{StaticResource Border.Background}" Margin="10 0 10 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="250"/>
@ -97,7 +110,7 @@
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="7"/>
</Grid>
<!--ItemsSource="{Binding OrderList}"-->
<ListBox x:Name="listbox_order" Margin="10 0 5 0"
<ListBox x:Name="listbox_order" Margin="10 0 10 0"
Grid.Row="1"
ItemsSource="{Binding ConsumableList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
@ -188,7 +201,6 @@
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="7"/>
<Border Height="1" VerticalAlignment="Bottom" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="7"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

6
BBWY.Client/Views/PackTask/EditConsumable.xaml

@ -49,8 +49,10 @@
SelectedValuePath="ConsumableTypeId" SelectedValue="{Binding ConsumableTypeId}" Text="{Binding ConsumableTypeName}"
/>
</Border>
<c:BTextBox Margin="30 0 5 0" Width="100" Text="{Binding AddConsumableTypeName}"/>
<c:BButton Content="添加分类" Width="80" Command="{Binding AddConsumableTypeCommand}"/>
<c:BButton Content="移除选中分类" Width="80" Height="35" Command="{Binding DeletedConsumableTypeCommand}"/>
<c:BTextBox Margin="30 0 5 0" Width="100" Height="35" Text="{Binding AddConsumableTypeName}"/>
<c:BButton Content="添加分类" Width="80" Height="35" Command="{Binding AddConsumableTypeCommand}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 10 0 10">

32
BBWY.Client/Views/PackTask/FeesExcelControl.xaml.cs

@ -43,23 +43,6 @@ namespace BBWY.Client.Views.PackTask
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 bool IsMin
{
get
@ -237,7 +220,7 @@ namespace BBWY.Client.Views.PackTask
<TextBlock Text=""[:Price:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
string basicPackStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
string basicPackStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""[:BasicPackWidth:]"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
@ -359,7 +342,7 @@ namespace BBWY.Client.Views.PackTask
private void LoadData(bool isPrice)
{
isPrice = false;
if (FeesItem == null || FeesItem.ServiceList.Count <= 0)
if (FeesItem == null || FeesItem.ServiceList.Count <= 0 || FeesItem.ProcessComboTaskCount > 0)
{
return;
}
@ -468,8 +451,15 @@ namespace BBWY.Client.Views.PackTask
basiccolumns.AppendLine(columnStr);
}
serviceData.AppendLine(basicPackStr.Replace("[:index:]", $"{rowIndex}")
if (basicProcessList.Count == 1)
serviceData.AppendLine(basicPackStr.Replace("[:BasicPackWidth:]", $"{84}")
.Replace("[:index:]", $"{rowIndex}")
.Replace("[:Columns:]", $"{basiccolumns}")
.Replace("[:ServiceCount:]", $"{FeesItem.BasicProcessPrice}*{FeesItem.BasicProcessCount}")
.Replace("[:BasicProcessData:]", basicSB.ToString()));
if (basicProcessList.Count > 1)
serviceData.AppendLine(basicPackStr.Replace("[:BasicPackWidth:]", $"{168}")
.Replace("[:index:]", $"{rowIndex}")
.Replace("[:Columns:]", $"{basiccolumns}")
.Replace("[:ServiceCount:]", $"{FeesItem.BasicProcessPrice}*{FeesItem.BasicProcessCount}")
.Replace("[:BasicProcessData:]", basicSB.ToString()));

138
BBWY.Client/Views/PackTask/FeesExcelV2Control.xaml

@ -0,0 +1,138 @@
<UserControl x:Class="BBWY.Client.Views.PackTask.FeesExcelV2Control"
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" Background="White"
d:DesignHeight="120" d:DesignWidth="1800">
<Grid x:Name ="gd"/>
<!--<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Grid.ColumnDefinitions >
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Border Background="#F2F2F2" Grid.RowSpan="3" Grid.ColumnSpan="13"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Right" BorderBrush="#D7D7D7" Grid.Column="12" Grid.Row="0" Grid.RowSpan="4" BorderThickness="0,0,1,0"/>
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="13" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Top" BorderBrush="#D7D7D7" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="7" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="13" BorderThickness="0,1,0,0"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="13" BorderThickness="0,1,0,0"/>
<TextBlock Text="任务ID" TextAlignment="Center" Grid.Column="0" Grid.RowSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="包装服务" Grid.Column="1" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="4" Grid.Row="0" Grid.RowSpan="4" BorderThickness="1,0,0,0"/>
<TextBlock Text="打包耗材" Grid.Column="5" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Column="12" Grid.Row="0" Grid.RowSpan="4" BorderThickness="1,0,0,0"/>
<TextBlock MinWidth="101" TextAlignment="Center" Text="结算金额" Grid.Column="8" Grid.RowSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="13739" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="149.82" Grid.Row="3" Grid.Column="8" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Grid Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition />
<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="简工序" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Row="0" Grid.ColumnSpan="2" BorderThickness="0,1,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Row="0" Grid.RowSpan="3" BorderThickness="1,0,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" BorderThickness="1,0,0,0"/>
</Grid>
<Grid Grid.Column="2" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="工序套餐" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="紧贴标" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Height="1" VerticalAlignment="Bottom" BorderBrush="#D7D7D7" Grid.Row="0" Grid.ColumnSpan="2" BorderThickness="0,1,0,0"/>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.Row="0" Grid.RowSpan="2" BorderThickness="1,0,0,0"/>
</Grid>
<TextBlock Text="0.42*33" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Grid Grid.Column="3" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</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="0.74" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="4" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</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="30.00" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="5" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Width="1" HorizontalAlignment="Left" BorderBrush="#D7D7D7" Grid.RowSpan="2" BorderThickness="0,0,1,0"/>
<TextBlock Text="8号箱子" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="0.49*33" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="6" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</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="0.49*33" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<Grid Grid.Column="7" Grid.Row="1" Grid.RowSpan="3" >
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</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="16.17" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</Grid>-->
</UserControl>

355
BBWY.Client/Views/PackTask/FeesExcelV2Control.xaml.cs

@ -0,0 +1,355 @@
using BBWY.Client.Models.APIModel.Response.PackTask;
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.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackTask
{
/// <summary>
/// FeesExcelV2Control.xaml 的交互逻辑
/// </summary>
public partial class FeesExcelV2Control : UserControl
{
public FeesExcelV2Control()
{
InitializeComponent();
}
public FeesItemResponse FeesItem
{
get
{
return (FeesItemResponse)GetValue(FeesItemProperty);
}
set
{
SetValue(FeesItemProperty, value);
}
}
public static readonly DependencyProperty FeesItemProperty =
DependencyProperty.Register("FeesItem", typeof(FeesItemResponse), typeof(FeesExcelV2Control), new PropertyMetadata(ChangedProperty));
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = d as FeesExcelV2Control;
var newValue = e.NewValue as FeesItemResponse;
control.FeesItem = newValue;
control.LoadData();
}
string xaml = @" <Grid xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
<Grid.ColumnDefinitions >
<ColumnDefinition />
[:Columns:]
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
</Grid.RowDefinitions>
<Border Background=""#F2F2F2"" Grid.RowSpan=""3"" Grid.ColumnSpan=""[:ColumnCount:]""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.RowSpan=""4"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""0"" Grid.RowSpan=""4"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""4"" 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=""2"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""3"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/>
<TextBlock MinWidth=""84"" Text=""ID"" TextAlignment=""Center"" Grid.Column=""0"" Grid.RowSpan=""3"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
[:Header:]
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text="""" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""3"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:TaskId:]"" Grid.Row=""3"" Grid.Column=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:AllFees:]"" Grid.Row=""3"" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
[:ListData:]
</Grid>";
string processComboStr1 = @"<Grid Grid.Column=""1"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition />
<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=""[:ProcessTypeName:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.Column=""1"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>
<Grid Grid.Column=""2"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.RowSpan=""2"" BorderThickness=""0,0,1,0""/>
<TextBlock Text="""" Grid.Row=""0"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboName:]"" Grid.Row=""1"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>
<TextBlock Text=""[:ProcessComboPrice:]"" Grid.Row=""3"" Grid.Column=""1"" Grid.ColumnSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>";
string processComboStr = @" <Grid Grid.Column=""1"" MinWidth=""168"" Grid.Row=""1"" Grid.RowSpan=""3"" Grid.ColumnSpan=""2"" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<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=""[:ProcessTypeName:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text="" "" Grid.Row=""0"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboName:]"" Grid.Row=""1"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboPrice:]"" Grid.Row=""3"" Grid.ColumnSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.Column=""1"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>";
string discountFactorStr = @" <Grid Grid.Column=""3"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:DiscountFactor:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
string processFeesStr = @"
<Grid Grid.Column=""4"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:PackFees:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
string columnStr = "<ColumnDefinition Width=\"[:Width:]\"/>";
string workProcess = "<TextBlock Text=\"包装服务\" Grid.Column=\"1\" Grid.ColumnSpan=\"[:ProcessCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+ProcessCount:]\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1,0,0,0\"/>\r\n ";
string consumableService = "<TextBlock Text=\"包装耗材\" Grid.Column=\"[:1+ProcessCount:]\" Grid.ColumnSpan=\"[:ConsumableCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+ProcessCount:+ConsumableCount]\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1,0,0,0\"/>\r\n ";
string incrementConsumableStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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 totalIncrementConsumableStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:Price:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
private void LoadData()
{
if (FeesItem == null || FeesItem.ProcessComboTaskCount <= 0)
{
return;
}
try
{
App.Current.Dispatcher.Invoke(() =>
{
gd.Children.Clear();
});
var consumableList = FeesItem.ConsumableList;
var processCount = 4;
var consumableCount = consumableList.Count();
if (consumableCount > 0)
{
consumableCount++;
}
columnStr = columnStr.Replace("[:Width:]", "*");
var columnCount = consumableCount + processCount + 2;
StringBuilder columns = new StringBuilder();
for (int i = 1; i < columnCount; i++)
{
columns.AppendLine(columnStr);
}
StringBuilder serviceData = new StringBuilder();
int allCount = consumableCount + processCount;
serviceData.AppendLine(processComboStr.Replace("[:ProcessTypeName:]",$" {FeesItem.ProcessTypeName} " )
.Replace("[:ProcessComboName:]",$" {FeesItem.ProcessComboName} " )
.Replace("[:ProcessComboPrice:]", $"{FeesItem.ProcessComboPrice}*{FeesItem.ProcessComboTaskCount}")
);
serviceData.AppendLine(discountFactorStr.Replace("[:DiscountFactor:]", FeesItem.DiscountFoctor?.ToString()));
serviceData.AppendLine(processFeesStr.Replace("[:PackFees:]", FeesItem.PackFees.ToString("0.00")));
int rowIndex = 4;
if (consumableList.Count > 0)
{
foreach (var item in consumableList)
{
rowIndex++;
serviceData.AppendLine(incrementConsumableStr.Replace("[:index:]", $"{rowIndex}")
.Replace("[:ServiceName:]", $"{item.ItemName}")
.Replace("[:ServiceCount:]", $"{item.ItemPrice}*{item.ItemCount}"));
}
rowIndex++;
serviceData.AppendLine(totalIncrementConsumableStr.Replace("[:index:]", $"{rowIndex}")
.Replace("[:Price:]", $"{FeesItem.ConsumableFees}")
);
}
StringBuilder header = new StringBuilder();
if (processCount > 0)
{
header.AppendLine(workProcess);
}
if (consumableCount > 0)
{
header.AppendLine(consumableService);
}
decimal allFees = 0;
decimal discount = 0;
decimal discountFees = 0;
discount = FeesItem.disCount;
allFees = FeesItem.AllFees;
discountFees = allFees * discount;
string discountStr = "原价";
if (discount > 1)
discountStr = $"{discount.ToString("0.0")}倍";
if (discount < 1)
discountStr = $"{(discount * 10).ToString("0.0")}折";
var newGrid = xaml.Replace("[:Header:]", header.ToString())
.Replace("[:Columns:]", columns.ToString())
.Replace("[:ColumnCount:]", $"{columnCount}")
.Replace("[:ColumnCount-2:]", $"{columnCount - 2}")
.Replace("[:1+ProcessCount:]", $"{1 + processCount}")
.Replace("[:1+ProcessCount:+ConsumableCount]", $"{1 + processCount + consumableCount}")
.Replace("[:2+ProcessCount:+ConsumableCount]", $"{2 + processCount + consumableCount}")
.Replace("[:3+ProcessCount:+ConsumableCount]", $"{3 + processCount + consumableCount}")
.Replace("[:ProcessCount:]", $"{processCount}")
.Replace("[:ConsumableCount:]", $"{consumableCount}")
.Replace("[:TaskId:]", $"{FeesItem.TaskId}")
.Replace("[:ListData:]", serviceData.ToString())
.Replace("[:AllFees:]", $"{FeesItem.AllFees.ToString("0.00")}");
//.Replace("[:Discount:]", $"{FeesItem.DiscountFoctor}")
//.Replace("[:DiscountFees:]", $"{discountFees.ToString(" 0.00")}");
//
newGrid = newGrid.Replace(@"[:Visity:]", "");
var grid = XamlReader.Parse(newGrid) as Grid;
App.Current.Dispatcher.Invoke(() =>
{
gd.Children.Add(grid);
});
}
catch
{
}
}
}
}

10
BBWY.Client/Views/PackTask/MinFeesExcelV2Control.xaml

@ -0,0 +1,10 @@
<UserControl x:Class="BBWY.Client.Views.PackTask.MinFeesExcelV2Control"
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="450" d:DesignWidth="800">
<Grid x:Name ="gd"/>
</UserControl>

347
BBWY.Client/Views/PackTask/MinFeesExcelV2Control.xaml.cs

@ -0,0 +1,347 @@
using BBWY.Client.Models.APIModel.Response.PackTask;
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.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackTask
{
/// <summary>
/// MinFeesExcelV2Control.xaml 的交互逻辑
/// </summary>
public partial class MinFeesExcelV2Control : UserControl
{
public MinFeesExcelV2Control()
{
InitializeComponent();
}
public FeesItemResponse FeesItem
{
get
{
return (FeesItemResponse)GetValue(FeesItemProperty);
}
set
{
SetValue(FeesItemProperty, value);
}
}
public static readonly DependencyProperty FeesItemProperty =
DependencyProperty.Register("FeesItem", typeof(FeesItemResponse), typeof(MinFeesExcelV2Control), new PropertyMetadata(ChangedProperty));
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = d as MinFeesExcelV2Control;
var newValue = e.NewValue as FeesItemResponse;
control.FeesItem = newValue;
control.LoadData();
}
string xaml = @" <Grid xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
<Grid.ColumnDefinitions >
<ColumnDefinition Width=""0"" />
[:Columns:]
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
<RowDefinition Height=""30"" />
</Grid.RowDefinitions>
<Border Background=""#F2F2F2"" Grid.RowSpan=""3"" Grid.ColumnSpan=""[:ColumnCount:]""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.RowSpan=""4"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""0"" Grid.RowSpan=""4"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""4"" 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=""2"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""3"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/>
[:Header:]
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text="""" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""3"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:TaskId:]"" Grid.Row=""3"" Grid.Column=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:AllFees:]"" Grid.Row=""3"" Grid.Column=""[:1+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
[:ListData:]
</Grid>";
string processComboStr1 = @"<Grid Grid.Column=""1"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition />
<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=""[:ProcessTypeName:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.Column=""1"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>
<Grid Grid.Column=""2"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.RowSpan=""2"" BorderThickness=""0,0,1,0""/>
<TextBlock Text="""" Grid.Row=""0"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboName:]"" Grid.Row=""1"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>
<TextBlock Text=""[:ProcessComboPrice:]"" Grid.Row=""3"" Grid.Column=""1"" Grid.ColumnSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>";
string processComboStr = @" <Grid Grid.Column=""1"" MinWidth=""168"" Grid.Row=""1"" Grid.RowSpan=""3"" Grid.ColumnSpan=""2"" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<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=""[:ProcessTypeName:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text="" "" Grid.Row=""0"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboName:]"" Grid.Row=""1"" Grid.Column=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<TextBlock Text=""[:ProcessComboPrice:]"" Grid.Row=""3"" Grid.ColumnSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.ColumnSpan=""2"" BorderThickness=""0,1,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""1,0,0,0""/>
<Border Width=""1"" HorizontalAlignment=""Left"" BorderBrush=""#D7D7D7"" Grid.Row=""0"" Grid.Column=""1"" Grid.RowSpan=""2"" BorderThickness=""1,0,0,0""/>
</Grid>";
string discountFactorStr = @" <Grid Grid.Column=""3"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:DiscountFactor:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
string processFeesStr = @"
<Grid Grid.Column=""4"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:PackFees:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
string columnStr = "<ColumnDefinition Width=\"[:Width:]\"/>";
string workProcess = "<TextBlock Text=\"包装服务\" Grid.Column=\"1\" Grid.ColumnSpan=\"[:ProcessCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+ProcessCount:]\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1,0,0,0\"/>\r\n ";
string consumableService = "<TextBlock Text=\"包装耗材\" Grid.Column=\"[:1+ProcessCount:]\" Grid.ColumnSpan=\"[:ConsumableCount:]\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n <Border Width=\"1\" HorizontalAlignment=\"Left\" BorderBrush=\"#D7D7D7\" Grid.Column=\"[:1+ProcessCount:+ConsumableCount]\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1,0,0,0\"/>\r\n ";
string incrementConsumableStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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 totalIncrementConsumableStr = @" <Grid Grid.Column=""[:index:]"" MinWidth=""84"" Grid.Row=""1"" Grid.RowSpan=""3"" >
<Grid.RowDefinitions>
<RowDefinition Height=""2*""/>
<RowDefinition Height=""*""/>
</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=""[:Price:]"" Grid.Row=""1"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/>
</Grid>";
private void LoadData()
{
if (FeesItem == null || FeesItem.ProcessComboTaskCount <= 0)
{
return;
}
try
{
App.Current.Dispatcher.Invoke(() =>
{
gd.Children.Clear();
});
var consumableList = FeesItem.ConsumableList;
var processCount = 3;
var consumableCount = consumableList.Count();
columnStr = columnStr.Replace("[:Width:]", "auto");
var columnCount = consumableCount + processCount + 2;
StringBuilder columns = new StringBuilder();
for (int i = 1; i < columnCount; i++)
{
columns.AppendLine(columnStr);
}
StringBuilder serviceData = new StringBuilder();
int allCount = consumableCount + processCount;
serviceData.AppendLine(processComboStr.Replace("[:ProcessTypeName:]", $" {FeesItem.ProcessTypeName} ")
.Replace("[:ProcessComboName:]", $" {FeesItem.ProcessComboName} ")
.Replace("[:ProcessComboPrice:]", $"{FeesItem.ProcessComboPrice}*{FeesItem.ProcessComboTaskCount}")
);
serviceData.AppendLine(discountFactorStr.Replace("[:DiscountFactor:]", FeesItem.DiscountFoctor?.ToString()));
//serviceData.AppendLine(processFeesStr.Replace("[:PackFees:]", FeesItem.PackFees.ToString("0.00")));
int rowIndex = 3;
if (consumableList.Count > 0)
{
foreach (var item in consumableList)
{
rowIndex++;
serviceData.AppendLine(incrementConsumableStr.Replace("[:index:]", $"{rowIndex}")
.Replace("[:ServiceName:]", $"{item.ItemName}")
).Replace("[:ServiceCount:]", $"");//
}
rowIndex++;
//serviceData.AppendLine(totalIncrementConsumableStr.Replace("[:index:]", $"{rowIndex}")
// .Replace("[:Price:]", $"{FeesItem.ConsumableFees}")
// );
}
StringBuilder header = new StringBuilder();
if (processCount > 0)
{
header.AppendLine(workProcess);
}
if (consumableCount > 0)
{
header.AppendLine(consumableService);
}
decimal allFees = 0;
decimal discount = 0;
decimal discountFees = 0;
discount = FeesItem.disCount;
allFees = FeesItem.AllFees;
discountFees = allFees * discount;
string discountStr = "原价";
if (discount > 1)
discountStr = $"{discount.ToString("0.0")}倍";
if (discount < 1)
discountStr = $"{(discount * 10).ToString("0.0")}折";
var newGrid = xaml.Replace("[:Header:]", header.ToString())
.Replace("[:Columns:]", columns.ToString())
.Replace("[:ColumnCount:]", $"{columnCount}")
.Replace("[:ColumnCount-2:]", $"{columnCount - 2}")
.Replace("[:1+ProcessCount:]", $"{1 + processCount}")
.Replace("[:1+ProcessCount:+ConsumableCount]", $"{1 + processCount + consumableCount}")
.Replace("[:2+ProcessCount:+ConsumableCount]", $"{2 + processCount + consumableCount}")
.Replace("[:3+ProcessCount:+ConsumableCount]", $"{3 + processCount + consumableCount}")
.Replace("[:ProcessCount:]", $"{processCount}")
.Replace("[:ConsumableCount:]", $"{consumableCount}")
.Replace("[:TaskId:]", $"")
.Replace("[:ListData:]", serviceData.ToString())
.Replace("[:AllFees:]", $"{FeesItem.PackFees.ToString("0.00")}");//打包费用
newGrid = newGrid.Replace(@"[:Visity:]", "");
var grid = XamlReader.Parse(newGrid) as Grid;
App.Current.Dispatcher.Invoke(() =>
{
gd.Children.Add(grid);
});
}
catch
{
}
}
}
}

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

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask"
mc:Ignorable="d"
Title="PackDetailWindow" Height="844" Width="480"
Title="PackDetailWindow" Height="844" Width="500"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
@ -72,7 +72,7 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="480"/>
<ColumnDefinition Width="500"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@ -144,8 +144,13 @@
</Setter>
</Style>
</StackPanel.Resources>
<RadioButton Height="35" Width="110" VerticalAlignment="Center" IsChecked="True" Content="推荐工序" Command="{Binding SetTaskStateCommand}" />
<RadioButton Height="35" Width="110" VerticalAlignment="Center" Content="自定义工序" Command="{Binding SetTaskStateCommand}" />
<RadioButton Height="35" Width="110" VerticalAlignment="Center" Content="推荐工序" Command="{Binding SetTaskStateCommand}"
IsChecked="{Binding PackProcessType,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=推荐工序:True:False}"
/>
<RadioButton Height="35" Width="110" VerticalAlignment="Center" Content="自定义工序" Command="{Binding SetTaskStateCommand}"
IsChecked="{Binding PackProcessType,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=自定义工序:True:False}"
/>
</StackPanel>
<Grid Margin="20 10 20 10" >
<Grid.ColumnDefinitions>
@ -156,13 +161,12 @@
<Border Background="Black" Grid.Column="1" VerticalAlignment="Center" Height="1"/>
</Grid>
<!--推荐工序-->
<StackPanel>
<StackPanel Height="170" Visibility="{Binding PackProcessType,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=推荐工序:Visible:Collapsed}">
<Grid Margin="20 5 20 0">
<Grid Height="80" >
<Grid Height="100" >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="56"/>
@ -171,20 +175,18 @@
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<TextBlock Text="耐摔等级:" Style="{StaticResource middleTextBlock}"/>
<!--<Border Margin="5" Grid.Column="1" CornerRadius="0" Grid.ColumnSpan="3" Background="{StaticResource Border.Brush}">
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" ItemsSource="{Binding ProductResistantList}" Text="{Binding SelectProductResistant}" />
</Border>-->
<Grid Margin="5" Grid.Column="1" Grid.ColumnSpan="3">
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" ItemsSource="{Binding ProductResistantList}" Text="{Binding SelectProductResistant}" />
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" ItemsSource="{Binding ProductResistantList}" DisplayMemberPath="ProductResistantName" Text="{Binding SelectProductResistant}" />
</Grid>
<TextBlock Grid.Row="1" Text="套餐类型:" Style="{StaticResource middleTextBlock}"/>
<Grid Grid.Column="1" Grid.Row="1" Margin="5">
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding ProcessComboList}" DisplayMemberPath="ProcessComboName"
SelectedValuePath="ProcessComboId" SelectedValue="{Binding SelectProcessComboId}"
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding ProcessComboListV2}" DisplayMemberPath="ProcessComboName"
SelectedValuePath="ProcessComboId" SelectedValue="{Binding SelectProcessComboIdV2}"
Text="{Binding SelectProcessCombo}"/>
</Grid>
<!--<Border Margin="5" Grid.Column="1" Grid.Row="1" Background="{StaticResource Border.Brush}" >
@ -193,7 +195,7 @@
Text="{Binding SelectProcessCombo}"/>
</Border>-->
<TextBlock Grid.Row="1" Text="任务量:" Grid.Column="2" Style="{StaticResource middleTextBlock}"/>
<c:BTextBox Margin="5 5 5 5" Grid.Column="3" Grid.Row="1"/>
<c:BTextBox Margin="5 5 5 5" Grid.Column="3" Grid.Row="1" Text="{Binding ProcessTaskCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
@ -204,7 +206,7 @@
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource middleTextBlock}" Margin="10 0 0 0">
<Run Text="工序单价:"/>
<Run Text="{Binding PackFees}"/>
<Run Text="{Binding ProcessPrice}"/>
</TextBlock>
<TextBlock Style="{StaticResource middleTextBlock}" Margin="30 0 0 0">
<Run Text="原价:"/>
@ -228,7 +230,7 @@
</StackPanel>
<!--自定义工序-->
<StackPanel Visibility="Collapsed">
<StackPanel Height="170" Visibility="{Binding PackProcessType,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=自定义工序:Visible:Collapsed}">
<Grid Margin="20 5 20 0">
@ -258,7 +260,7 @@
<Border HorizontalAlignment="Left" Grid.Column="3" Width="1" Background="{StaticResource Border.Brush}" Grid.RowSpan="2"/>
<Border HorizontalAlignment="Right" Grid.Column="3" Width="1" Background="{StaticResource Border.Brush}" Grid.RowSpan="2"/>
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" ItemsSource="{Binding ProcessTypeList}" Text="{Binding SelectProcessType}" />
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" ItemsSource="{Binding ProcessTypeList}" DisplayMemberPath="ProcessTypeName" Text="{Binding SelectProcessType}" />
<ComboBox Margin="1" BorderThickness="0" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding ProcessComboList}" DisplayMemberPath="ProcessComboName"
SelectedValuePath="ProcessComboId" SelectedValue="{Binding SelectProcessComboId}"
Text="{Binding SelectProcessCombo}"/>
@ -266,20 +268,17 @@
<Grid Grid.Row="1" Grid.Column="2" Margin="1 0 1 1" Background="{StaticResource Border.Background}" >
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding ProcessPrice}" />
</Grid>
<TextBox BorderBrush="Transparent" BorderThickness="0" Margin="1" Grid.Row="1" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding ProcessTaskCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</Grid>
<Border BorderThickness="1" Height="40" Margin="20,10,20,10" BorderBrush="{StaticResource Border.Brush}">
<Grid Margin="20,10,20,10">
<Rectangle Height="40" StrokeDashArray="8,4" StrokeThickness="1" Stroke="{StaticResource Border.Brush}" >
</Rectangle>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource middleTextBlock}" Margin="10 0 0 0">
<TextBlock Style="{StaticResource middleTextBlock}" Margin="30 0 0 0">
<Run Text="原价:"/>
<Run Text="{Binding PackFees}"/>
</TextBlock>
@ -292,12 +291,7 @@
<Run Text="{Binding PackDiscountFees}"/>
</TextBlock>
</StackPanel>
</Border>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal" Margin="20 0 0 10">
<TextBlock Style="{StaticResource middleTextBlock}" Text="定制工序单价:"/>
<Border BorderThickness="1" CornerRadius="0" BorderBrush="{StaticResource Border.Brush}">
@ -307,6 +301,13 @@
<c:BButton Content="确定" Width="60" Command="{Binding SetCustomProcessPriceCommand}"/>
</StackPanel>
</StackPanel>
<Grid Margin="20 10 20 0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
@ -404,7 +405,7 @@
</Grid.RowDefinitions>
<Grid Height="30" Background="{StaticResource Border.Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="80"/>
@ -448,7 +449,7 @@
<Grid Width="{Binding ActualWidth,ElementName=consumable_listBox,Converter={StaticResource widthConverter},ConverterParameter=-0}"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="80"/>
@ -537,7 +538,7 @@
<Grid Grid.Row="1" Grid.Column="1" Visibility="Hidden">
<Grid Grid.Row="1" Grid.Column="1" Visibility="Visible">
<StackPanel Orientation="Vertical" Name="printArea" Width="1065" Height="800">
<StackPanel Orientation="Horizontal">
@ -551,7 +552,7 @@
</Grid>
<TextBlock Text="摆放地托编号:" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
<TextBlock Text="{Binding FloorDragNumber}" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
<TextBlock Text="打包人:" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
<TextBlock Text="包装员:" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
<TextBlock Text="{Binding PackUserName}" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
<TextBlock Text="截止时间:" FontSize="24" FontWeight="Bold" Style="{StaticResource middleTextBlock}" Margin="20 0 0 0"/>
@ -761,9 +762,9 @@
</StackPanel>
</Grid>
<Grid Grid.Column="7" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5 0 5 0">
<TextBlock
Text="{Binding MarkMessage}"
Text="{Binding ShowMarkMessage}"
TextWrapping="Wrap"
HorizontalAlignment="Center"
/>
@ -794,7 +795,7 @@
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<local:MinFeesExcelControl Margin="20 0 20 0" IsMin="true"
<local:MinFeesExcelV2Control Margin="20 0 20 0"
Visibility="{Binding PackTaskModel.IsShowFees,Converter={StaticResource objConverter},ConverterParameter=false:Collapsed:Visible}"
FeesItem="{Binding PackTaskModel.FeesItemResponse,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
/>

11
BBWY.Client/Views/PackTask/PackDetailWindow.xaml.cs

@ -50,6 +50,7 @@ namespace BBWY.Client.Views.PackTask
}
private void BButton_Click(object sender, RoutedEventArgs e)
{
//return;//禁用打印
var localPrintServer = new LocalPrintServer();
string printName = cbPrintName.Text.Trim();
if (string.IsNullOrEmpty(printName))
@ -66,15 +67,19 @@ namespace BBWY.Client.Views.PackTask
}
MyPrintHelper.SetDefaultPrint(printName);//设置默认打印机
this.printArea.Arrange(new Rect(new Point(0, 0), new Size(printArea.ActualWidth, printArea.ActualHeight)));
System.Windows.Controls.PrintDialog printDialog = new PrintDialog();
System.Windows.Controls.PrintDialog printDialog = new PrintDialog();
printDialog.PrintTicket.PageOrientation = PageOrientation.Landscape;//设置为横向打印 PageOrientation.Landscape Portrait为纵向
//设置纸张大小
var pageWidth = (int)Math.Ceiling(printDialog.PrintableAreaWidth);
var pageHeight = (int)Math.Ceiling(printDialog.PrintableAreaHeight);
printDialog.PrintTicket.PageMediaSize = new PageMediaSize(pageWidth, pageHeight);
//printArea.Height = pageHeight;//833
//printArea.Width = pageWidth;//1123
this.printArea.Arrange(new Rect(new Point(0, 0), new Size(printArea.ActualWidth, printArea.ActualHeight)));
printDialog.PrintVisual(this.printArea, "打印任务");

69
BBWY.Client/Views/PackTask/PrintPackTaskDetail.xaml

@ -0,0 +1,69 @@
<Window x:Class="BBWY.Client.Views.PackTask.PrintPackTaskDetail"
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="PrintPackTaskDetail" Height="492" Width="272">
<Grid x:Name="print_box">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="110"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Width="110" Stretch="Fill" Source="{Binding PurchaseOrderImage}"/>
<StackPanel VerticalAlignment="Top" Grid.Column="1">
<TextBlock Text="云仓" HorizontalAlignment="Center" FontWeight="Bold" FontSize="30"/>
<Image Height="40" Stretch="Fill" />
<TextBlock Style="{StaticResource middleTextBlock}" Text="10001"/>
</StackPanel>
</Grid>
<StackPanel Orientation="Vertical" Grid.Row="1">
<TextBlock Margin="0 5 0 5">
<Run Text="SKU名称:"/>
<Run Text="{Binding PackTaskModel.ItemList[0].SkuName}"/>
</TextBlock>
<TextBlock>
<Run Text="品名:"/>
<Run Text="{Binding PackTaskModel.ItemList[0].BrandName}"/>
</TextBlock>
<TextBlock Margin="0 5 0 5">
<Run Text="SKU数量:"/>
<Run Text="1234567"/>
</TextBlock>
<TextBlock>
<Run Text="SKU名称:"/>
<Run Text="1234567"/>
</TextBlock>
<TextBlock Margin="0 5 0 5">
<Run Text="SKU名称:"/>
<Run Text="1234567"/>
</TextBlock>
<Image Margin="10 10 10 0" Stretch="Fill" Source="/resources/images/barcode.png"/>
<TextBlock Margin="0 0 0 5" Style="{StaticResource middleTextBlock}" >
<Run Text="POP"/>
<Run Text="123456789789"/>
</TextBlock>
<Border Height="2" BorderThickness="1" BorderBrush="Black"/>
<TextBlock Margin="0 5 0 5">
<Run Text="SKU名称:"/>
<Run Text="1234567"/>
</TextBlock>
<TextBlock>
<Run Text="SKU名称:"/>
<Run Text="1234567"/>
</TextBlock>
<TextBlock Margin="0 5 0 5">
<Run Text="SKU名称:"/>
<Run Text="1234567"/>
</TextBlock>
</StackPanel>
</Grid>
</Grid>
</Window>

81
BBWY.Client/Views/PackTask/PrintPackTaskDetail.xaml.cs

@ -0,0 +1,81 @@
using BBWY.Client.Helpers;
using BBWY.Client.Models;
using BBWY.Client.Models.FallWare;
using System;
using System.Collections.Generic;
using System.Printing;
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.Shapes;
namespace BBWY.Client.Views.PackTask
{
/// <summary>
/// PrintPackTaskDetail.xaml 的交互逻辑
/// </summary>
public partial class PrintPackTaskDetail : Window
{
public PrintPackTaskDetail(PackTaskModel model)
{
InitializeComponent();
PackTaskModel = model;
this.DataContext = this;
this.UpdateLayout();//刷新UI
}
public PackTaskModel PackTaskModel { get; set; }
public void PrintBox(string printName)
{
var localPrintServer = new LocalPrintServer();
if (string.IsNullOrEmpty(printName))
{
return;
}
var printQueue = localPrintServer.GetPrintQueue(printName);
if (printQueue.IsInError)
{
System.Windows.MessageBox.Show("打印机处于错误状态");
return;
}
MyPrintHelper.SetDefaultPrint(printName);//设置默认打印机
PrintDialog printDialog = new PrintDialog();
printDialog.PrintTicket.PageOrientation = PageOrientation.Landscape;//设置为横向打印 PageOrientation.Landscape Portrait为纵向
//设置纸张大小
var pageWidth = (int)Math.Ceiling(printDialog.PrintableAreaWidth);
var pageHeight = (int)Math.Ceiling(printDialog.PrintableAreaHeight);
printDialog.PrintTicket.PageMediaSize = new PageMediaSize(pageWidth, pageHeight);
this.Height = pageHeight + 39;//833
this.Width = pageWidth;//1123
this.FontSize = 30;
// box_margin.Margin = new Thickness(50, 50, 50, 50);
//box_margin.Margin = new Thickness(10);
//this.jd_box.Arrange(new Rect(new Point(0, 0), new Size(pageWidth, pageHeight)));
this.UpdateLayout(); //刷新界面
printDialog.PrintVisual(this.print_box, "打印任务");
//var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//string printNames = System.IO.Path.Combine(applicationPath, "printName.init");
//if (File.Exists(printNames))
//{
// File.Delete(printNames);
//}
//System.IO.File.WriteAllText(printNames, printName);
this.Close();
}
}
}

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

@ -421,7 +421,7 @@
<Grid Grid.Row="1" Grid.Column="1" Visibility="Hidden">
<Grid Grid.Row="1" Grid.Column="1" Visibility="Visible">
<StackPanel Orientation="Vertical" Name="printArea" Width="1065" Height="800">
<StackPanel Orientation="Horizontal">

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

@ -260,7 +260,7 @@
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="86"/>
<ColumnDefinition Width="86"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@ -287,7 +287,7 @@
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="3" Text="基础包装"/>
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="4" Text="增量耗材"/>
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="5" Text="条码标签"/>
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="6" Text="合格证"/>
<!--<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="6" Text="合格证"/>-->
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="7" Text="合格证位置"/>
@ -334,11 +334,11 @@
</ComboBox>
</Grid>
<Grid Grid.Row="1" Grid.Column="6" >
<!--<Grid Grid.Row="1" Grid.Column="6" >
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding IsNeedCerList}" Text="{Binding IsNeedCertificateModel,Mode=TwoWay}">
</ComboBox>
</Grid>
</Grid>-->
<Grid Grid.Row="1" Grid.Column="7" >
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding CertificatePositionList}" Text="{Binding CertificatePosition}">

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

@ -30,18 +30,22 @@
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"/>
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}"/>
</ListBox>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
@ -518,8 +522,14 @@
>
<Path.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<local:FeesExcelControl IsWareHouse="True" FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
<Grid>
<local:FeesExcelControl FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding PackProcessType,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"
/>
<local:FeesExcelV2Control FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding PackProcessType,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
/>
</Grid>
</ToolTip>
</Path.ToolTip>
</Path>
@ -618,7 +628,7 @@
<c:BButton HorizontalAlignment="Center" Height="20" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Grid.Row="1"
Content="{Binding FeesItemResponse,Converter={StaticResource objConverter},ConverterParameter=#null:打包设置:修改设置 }"
Command="{Binding SetServiceCommand}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待打包|待排单:Visible:Collapsed}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=已取消|未到货|部分到货|待验收|:Collapsed:Visible}"
/>
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="验收"
@ -654,7 +664,7 @@
Command="{Binding DataContext.StoreGetBySelfCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待排单|待打包:Visible:Collapsed}"
/>
<hc:SplitButton Content="更多操作" Foreground="{StaticResource Button.Background}" BorderThickness="0" HitMode="Hover" HorizontalAlignment="Stretch">
<hc:SplitButton Content="更多操作" Foreground="{StaticResource Button.Background}" BorderThickness="0" HorizontalAlignment="Stretch">
<hc:SplitButton.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>

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

@ -213,6 +213,39 @@ namespace BBWY.Client.Views.PackTask
{
}
}
private void tb_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
}
catch (Exception)
{
}
}
private void tbShop_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
}
catch (Exception)
{
}
}
}

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

@ -33,7 +33,9 @@
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"></c:BTextBox>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
</ListBox>
@ -41,7 +43,9 @@
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"></c:BTextBox>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
@ -488,8 +492,16 @@
<Path.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<local:FeesExcelControl IsWareHouse="True" FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
<Grid>
<local:FeesExcelControl FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding PackProcessType,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"
/>
<local:FeesExcelV2Control FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding PackProcessType,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
/>
</Grid>
</ToolTip>
</Path.ToolTip>
</Path>

34
BBWY.Client/Views/PackTask/WareHouseListControl.xaml.cs

@ -215,6 +215,40 @@ namespace BBWY.Client.Views.PackTask
{
}
}
private void tb_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
}
catch (Exception)
{
}
}
private void tbShop_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
}
catch (Exception)
{
}
}
}

122
BBWY.Client/Views/QualityTask/WaitQualityControl.xaml

@ -29,15 +29,19 @@
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"/>
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"></c:BTextBox>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
@ -249,21 +253,8 @@
</StackPanel>
<!--<StackPanel Orientation="Horizontal" Visibility="{Binding QualityRemainTime, Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}">
<TextBlock Foreground="Red" VerticalAlignment="Center" Text="{Binding QualityRemainTime}" Margin="20,0,0,0" />
</StackPanel>-->
</StackPanel>
<!--<StackPanel Grid.Column="12" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
<c:BButton Command="{Binding DataContext.DeletedTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}" CommandParameter="{Binding}"
Style="{StaticResource LinkButton}" Content="取消任务" Margin="0 5 0 5 "
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待验收:Visible:Collapsed}"
/>
</StackPanel>-->
<StackPanel Grid.Column="12" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待验收:Visible:Collapsed}"
>
@ -466,6 +457,9 @@
</Grid>
<Grid Grid.Column="6" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding SendToSetSkuConfigureTime,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding QualityRemainTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
>
@ -499,6 +493,15 @@
</c:BButton>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding SendToSetSkuConfigureTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}">
<TextBlock Style="{StaticResource middleTextBlock}" Text="待合格证信息补全"/>
</StackPanel>
</Grid>
<!--<Grid Grid.Column="6" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
@ -558,72 +561,39 @@
</StackPanel>
</StackPanel>
</Grid>
<!--<Grid Grid.Column="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</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 FeesItemResponse,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible }"
>
<Path.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<local:FeesExcelControl IsWareHouse="True" FeesItem="{Binding FeesItemResponse,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
<Grid Grid.Column="12" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="验收"
Command="{Binding QualityTaskCommand}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收:Visible:Collapsed}"
/>
</ToolTip>
</Path.ToolTip>
</Path>
</StackPanel>
<Grid Grid.Row="1" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待验收|已取消|商家自取:Collapsed:Visible}">
<Border Grid.Row="0" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
<!--Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收:Visible:Collapsed}" -->
<StackPanel >
<StackPanel.Visibility>
<MultiBinding Converter="{StaticResource mobjConverter}"
ConverterParameter="9;待验收:&amp;:Visible:Collapsed:1">
<Binding Path="ShopId"/>
<Binding Path="TaskState"/>
</MultiBinding>
</StackPanel.Visibility>
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="信息不全"
CommandParameter="{Binding }"
Command="{Binding DataContext.SendToSetSkuConfigureCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
>
<c:BButton HorizontalAlignment="Center" Height="20" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Grid.Row="1" Content="设置"
Command="{Binding SetServiceCommand}"
Visibility="Visible" />
</StackPanel>
<c:BButton.Visibility>
<MultiBinding Converter="{StaticResource mobjConverter}"
ConverterParameter=";:amp;:Visible:Collapsed:1">
<Binding Path="BarCodeModel"/>
<Binding Path="CertificateModel"/>
</MultiBinding>
</Grid>
</Grid>
</Grid>-->
<!--<Grid Grid.Column="8" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock
Text="{Binding PackUser}"
TextWrapping="Wrap"
HorizontalAlignment="Center"
/>
</c:BButton.Visibility>
</c:BButton>
</StackPanel>
</StackPanel>
</Grid>-->
<Grid Grid.Column="12" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="验收"
Command="{Binding QualityTaskCommand}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收:Visible:Collapsed}"
/>
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商家自取"
CommandParameter="{Binding TaskId}"

34
BBWY.Client/Views/QualityTask/WaitQualityControl.xaml.cs

@ -213,6 +213,40 @@ namespace BBWY.Client.Views.QualityTask
{
}
}
private void tb_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBox != null && tipBox.Items.Count > 0)
{
tipBox.Items.Clear();
}
}
catch (Exception)
{
}
}
private void tbShop_LostFocus(object sender, RoutedEventArgs e)
{
try
{
if (tipBoxShop != null && tipBoxShop.Items.Count > 0)
{
tipBoxShop.Items.Clear();
}
}
catch (Exception)
{
}
}
}

Loading…
Cancel
Save