50 changed files with 3024 additions and 1762 deletions
@ -0,0 +1,75 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Net.Http; |
|||
|
|||
namespace BBWY.Client.APIServices |
|||
{ |
|||
public class ServiceOrderService : BaseApiService, IDenpendency |
|||
{ |
|||
public ServiceOrderService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
public ApiResponse<ServiceOrderResponse> GetList(string orderId, |
|||
string sku, |
|||
string spu, |
|||
string serviceId, |
|||
string shopId, |
|||
ServiceOrderState? serviceOrderState, |
|||
ReturnDirection? returnDirection, |
|||
int pageIndex, |
|||
int pageSize, |
|||
DateTime? startDate, |
|||
DateTime? endDate) |
|||
{ |
|||
return SendRequest<ServiceOrderResponse>(globalContext.BBYWApiHost, "Api/ServiceOrder/GetList", new |
|||
{ |
|||
orderId, |
|||
sku, |
|||
spu, |
|||
serviceId, |
|||
shopId, |
|||
serviceOrderState, |
|||
returnDirection, |
|||
pageIndex, |
|||
pageSize, |
|||
startDate, |
|||
endDate |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<object> EditServiceOrder(long servicePId, |
|||
string orderId, |
|||
ServiceResult? serviceResult, |
|||
decimal? sdRefundFreight, |
|||
ReturnDirection? returnDirection, |
|||
string renewalOrderId, |
|||
decimal? reissueAfterSaleAmount, |
|||
string returnCheckRemark, |
|||
StorageType? renewalType, |
|||
string renewalPurchaseOrderId, |
|||
Platform? renewalPurchasePlatform, |
|||
decimal? reissueFreight, |
|||
decimal? reissueProductAmount) |
|||
{ |
|||
return SendRequest<object>(globalContext.BBYWApiHost, "Api/ServiceOrder/EditServiceOrder", new |
|||
{ |
|||
servicePId, |
|||
orderId, |
|||
serviceResult, |
|||
sdRefundFreight, |
|||
returnDirection, |
|||
renewalOrderId, |
|||
reissueAfterSaleAmount, |
|||
returnCheckRemark, |
|||
renewalType, |
|||
renewalPurchaseOrderId, |
|||
renewalPurchasePlatform, |
|||
reissueFreight, |
|||
reissueProductAmount |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,289 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class ServiceOrderItemResponse |
|||
{ |
|||
|
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 售后成本(不含退款采购成本)
|
|||
/// </summary>
|
|||
public decimal? AfterTotalCost { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 申请时间
|
|||
/// </summary>
|
|||
public DateTime? ApplyTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 耗材费
|
|||
/// </summary>
|
|||
public decimal? ConsumableAmount { get; set; } = 0.00M; |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 发货快递费
|
|||
/// </summary>
|
|||
public decimal? DeliveryExpressFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 头程费
|
|||
/// </summary>
|
|||
public decimal? FirstFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货拍摄图(名称)
|
|||
/// </summary>
|
|||
public string ImageName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入仓操作费
|
|||
/// </summary>
|
|||
public decimal? InStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 是否订阅快递100
|
|||
/// </summary>
|
|||
|
|||
public bool? IsSubscribeKuaiDi100 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否需要订阅快递100
|
|||
/// </summary>
|
|||
public bool? IsNeedSubscribeKuaiDi100 { get; set; } |
|||
|
|||
public string OrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 出仓操作费
|
|||
/// </summary>
|
|||
public decimal? OutStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 产品外观 (严重损=0 轻微损=1 新=2)
|
|||
/// </summary>
|
|||
|
|||
public ProductAppearance? ProductAppearance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 产品功能 (坏=0 好=1)
|
|||
/// </summary>
|
|||
|
|||
public ProductFunction? ProductFunction { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品健康状态 (残次品=0 良品=1)
|
|||
/// </summary>
|
|||
|
|||
public NewProductHealth? ProductHealth { get; set; } |
|||
|
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 产品包装(无=0 非新=1 新=2)
|
|||
/// </summary>
|
|||
|
|||
public ProductPackage? ProductPackage { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 采购方式
|
|||
/// </summary>
|
|||
|
|||
public PurchaseMethod? PurchaseMethod { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单号
|
|||
/// </summary>
|
|||
public string PurchaseOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单主键
|
|||
/// </summary>
|
|||
|
|||
public long? PurchaseOrderPKId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购平台
|
|||
/// </summary>
|
|||
|
|||
public Platform? PurchasePlatform { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款支付宝订单号
|
|||
/// </summary>
|
|||
public string RefundAlipayOrderNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款金额
|
|||
/// </summary>
|
|||
public decimal? RefundAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货入仓操作费
|
|||
/// </summary>
|
|||
public decimal? RefundInStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退款商户订单号
|
|||
/// </summary>
|
|||
public string RefundMerchantOrderNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款采购成本
|
|||
/// </summary>
|
|||
public decimal? RefundPurchaseAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退款时间
|
|||
/// </summary>
|
|||
public DateTime? RefundTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 售后补发成本
|
|||
/// </summary>
|
|||
public decimal? ReissueAfterSaleAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 补发快递费
|
|||
/// </summary>
|
|||
public decimal? ReissueFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 补发货款成本
|
|||
/// </summary>
|
|||
public decimal? ReissueProductAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货去向(退货仓=0,采购商=1,原返=2,无退货=3)
|
|||
/// </summary>
|
|||
|
|||
public ReturnDirection? ReturnDirection { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// SD退货运费
|
|||
/// </summary>
|
|||
public decimal? SDRefundFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 服务单号
|
|||
/// </summary>
|
|||
public string ServiceId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单租备注
|
|||
/// </summary>
|
|||
public string ServiceOrderRemark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单处理结果
|
|||
/// </summary>
|
|||
|
|||
public ServiceResult? ServiceResult { get; set; } |
|||
|
|||
public string ShopId { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// SKU销售件数
|
|||
/// </summary>
|
|||
|
|||
public int? SkuItemCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单状态 待收货 = 10005,取消 = 10011,完成 = 10010
|
|||
/// </summary>
|
|||
|
|||
public ServiceOrderState? Status { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 变更时间
|
|||
/// </summary>
|
|||
public DateTime? StatusUpdateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 仓储费
|
|||
/// </summary>
|
|||
public decimal? StorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 服务单物流状态(0=待质检,1=已入库,2=派送中,3=运输中)
|
|||
/// </summary>
|
|||
|
|||
public TransportState? TransportDetails { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 仓库组备注
|
|||
/// </summary>
|
|||
public string WareHouseGrounpRemark { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 快递单号
|
|||
/// </summary>
|
|||
public string WayBillNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 快递公司名称
|
|||
/// </summary>
|
|||
public string ExpressName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 质检入库时间
|
|||
/// </summary>
|
|||
public DateTime? QualityInspectionInStoreTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 换新单号
|
|||
/// </summary>
|
|||
public string RenewalOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退货检查备注
|
|||
/// </summary>
|
|||
public string ReturnCheckRemark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新方式
|
|||
/// </summary>
|
|||
public StorageType? RenewalType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新采购单号
|
|||
/// </summary>
|
|||
public string RenewalPurchaseOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新采购平台
|
|||
/// </summary>
|
|||
public Platform? RenewalPurchasePlatform { get; set; } |
|||
|
|||
#region Sku
|
|||
public string Logo { get; set; } |
|||
|
|||
public string Title { get; set; } |
|||
|
|||
//public string ContactName { get; set; }
|
|||
|
|||
//public string Mobile { get; set; }
|
|||
|
|||
public int ItemTotal { get; set; } |
|||
|
|||
public decimal Price { get; set; } |
|||
#endregion
|
|||
|
|||
public StorageType? StorageType { get; set; } |
|||
} |
|||
|
|||
public class ServiceOrderResponse |
|||
{ |
|||
public IList<ServiceOrderItemResponse> Items { get; set; } |
|||
|
|||
public long Count { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class ServiceOrder : ServiceOrderItemResponse |
|||
{ |
|||
public ServiceOrder() |
|||
{ |
|||
ThumbnailImageList = new List<string>(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 是否显示商品情况
|
|||
/// </summary>
|
|||
public bool IsShowProductInfo |
|||
{ |
|||
get |
|||
{ |
|||
return ProductAppearance != null || ProductFunction != null || ProductHealth != null || ProductPackage != null; |
|||
} |
|||
} |
|||
|
|||
public IList<string> ThumbnailImageList { get; set; } |
|||
|
|||
public void Init() |
|||
{ |
|||
if (!string.IsNullOrEmpty(ImageName)) |
|||
{ |
|||
var imageNameArray = ImageName.Split(',', System.StringSplitOptions.RemoveEmptyEntries); |
|||
foreach (var imgItemName in imageNameArray) |
|||
{ |
|||
ThumbnailImageList.Add($"https://qiyue-qiku.oss-cn-beijing.aliyuncs.com/tuihuo/{imgItemName}.jpg?x-oss-process=image/resize,m_lfit,w_35/quality,q_100"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,116 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using HandyControl.Controls; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels |
|||
{ |
|||
public class EditServiceOrderViewModel : BaseVM |
|||
{ |
|||
|
|||
private ServiceOrderService serviceOrderService; |
|||
/// <summary>
|
|||
/// 主键Id
|
|||
/// </summary>
|
|||
private long servicePId; |
|||
private string orderId; |
|||
private ServiceResult? serviceResult; |
|||
private decimal? sdRefundFreight; |
|||
private ReturnDirection? returnDirection; |
|||
private string renewalOrderId; |
|||
private decimal? reissueAfterSaleAmount; |
|||
private string returnCheckRemark; |
|||
private StorageType? renewalType; |
|||
private string renewalPurchaseOrderId; |
|||
private Platform? renewalPurchasePlatform; |
|||
private decimal? reissueFreight; |
|||
private decimal? reissueProductAmount; |
|||
private bool isLoading; |
|||
|
|||
|
|||
public ServiceResult? ServiceResult { get => serviceResult; set { Set(ref serviceResult, value); } } |
|||
public decimal? SDRefundFreight { get => sdRefundFreight; set { Set(ref sdRefundFreight, value); } } |
|||
public ReturnDirection? ReturnDirection { get => returnDirection; set { Set(ref returnDirection, value); } } |
|||
public string RenewalOrderId { get => renewalOrderId; set { Set(ref renewalOrderId, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 售后补发成本
|
|||
/// </summary>
|
|||
public decimal? ReissueAfterSaleAmount { get => reissueAfterSaleAmount; set { Set(ref reissueAfterSaleAmount, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 退货检查备注
|
|||
/// </summary>
|
|||
public string ReturnCheckRemark { get => returnCheckRemark; set { Set(ref returnCheckRemark, value); } } |
|||
|
|||
public StorageType? RenewalType { get => renewalType; set { Set(ref renewalType, value); } } |
|||
|
|||
public string RenewalPurchaseOrderId { get => renewalPurchaseOrderId; set { Set(ref renewalPurchaseOrderId, value); } } |
|||
|
|||
public Platform? RenewalPurchasePlatform { get => renewalPurchasePlatform; set { Set(ref renewalPurchasePlatform, value); } } |
|||
|
|||
public ICommand SaveCommand { get; set; } |
|||
|
|||
public decimal? ReissueFreight { get => reissueFreight; set { Set(ref reissueFreight, value); } } |
|||
|
|||
public decimal? ReissueProductAmount { get => reissueProductAmount; set { Set(ref reissueProductAmount, value); } } |
|||
|
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
public EditServiceOrderViewModel(ServiceOrderService serviceOrderService) |
|||
{ |
|||
this.serviceOrderService = serviceOrderService; |
|||
SaveCommand = new RelayCommand(Save); |
|||
} |
|||
|
|||
public void SetData(ServiceOrder serviceOrder) |
|||
{ |
|||
this.servicePId = serviceOrder.Id; |
|||
this.orderId = serviceOrder.OrderId; |
|||
this.ServiceResult = serviceOrder.ServiceResult; |
|||
this.SDRefundFreight = serviceOrder.SDRefundFreight; |
|||
this.ReturnDirection = serviceOrder.ReturnDirection; |
|||
this.RenewalOrderId = serviceOrder.RenewalOrderId; |
|||
this.ReissueAfterSaleAmount = serviceOrder.ReissueAfterSaleAmount; |
|||
this.ReturnCheckRemark = serviceOrder.ReturnCheckRemark; |
|||
this.RenewalType = serviceOrder.RenewalType; |
|||
this.RenewalPurchaseOrderId = serviceOrder.RenewalPurchaseOrderId; |
|||
this.RenewalPurchasePlatform = serviceOrder.RenewalPurchasePlatform; |
|||
this.ReissueFreight = serviceOrder.ReissueFreight; |
|||
this.ReissueProductAmount = serviceOrder.ReissueProductAmount; |
|||
} |
|||
|
|||
private void Save() |
|||
{ |
|||
if (IsLoading) |
|||
return; |
|||
IsLoading = true; |
|||
Task.Factory.StartNew(() => serviceOrderService.EditServiceOrder(servicePId, |
|||
orderId, |
|||
ServiceResult, |
|||
SDRefundFreight, |
|||
ReturnDirection, |
|||
RenewalOrderId, |
|||
ReissueAfterSaleAmount, |
|||
ReturnCheckRemark, |
|||
RenewalType, |
|||
RenewalPurchaseOrderId, |
|||
RenewalPurchasePlatform, |
|||
ReissueFreight, |
|||
ReissueProductAmount)).ContinueWith(t => |
|||
{ |
|||
IsLoading = false; |
|||
var r = t.Result; |
|||
if (!r.Success) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(r.Msg, "提示")); |
|||
return; |
|||
} |
|||
//closeEditServiceOrder
|
|||
GalaSoft.MvvmLight.Messaging.Messenger.Default.Send(true, "closeEditServiceOrder"); |
|||
}); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,286 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Views.ServiceOrder; |
|||
using BBWY.Common.Extensions; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Net.Http; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels |
|||
{ |
|||
public class ServiceOrderViewModel : BaseVM, IDenpendency |
|||
{ |
|||
private ServiceOrderService serviceOrderService; |
|||
private IHttpClientFactory httpClientFactory; |
|||
|
|||
private bool isLoading; |
|||
private ServiceOrderState? serviceOrderState; |
|||
private ReturnDirection? returnDirection; |
|||
private long serviceOrderCount; |
|||
private int pageIndex; |
|||
private int pageSize; |
|||
private string orderId; |
|||
private string spu; |
|||
private string sku; |
|||
private string serviceId; |
|||
private DateTime? startDate; |
|||
private DateTime? endDate; |
|||
|
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
public ServiceOrderState? ServiceOrderState { get => serviceOrderState; set { Set(ref serviceOrderState, value); } } |
|||
|
|||
public ReturnDirection? ReturnDirection { get => returnDirection; set { Set(ref returnDirection, value); } } |
|||
|
|||
|
|||
public ICommand SetServiceOrderStateCommand { get; set; } |
|||
public ICommand SetReturnDirectionCommand { get; set; } |
|||
public ICommand OnPageIndexChangedCommand { get; set; } |
|||
|
|||
public ICommand CopyTextCommand { get; set; } |
|||
|
|||
public ICommand SetSearchDateCommand { get; set; } |
|||
|
|||
public ICommand SearchServiceOrderCommand { get; set; } |
|||
|
|||
public ICommand NavigateToDetailCommand { get; set; } |
|||
|
|||
public ICommand PreviewImgCommand { get; set; } |
|||
|
|||
public ICommand EditServiceOrderCommand { get; set; } |
|||
|
|||
public IList<ServiceOrder> ServiceOrderList { get; set; } |
|||
|
|||
public long ServiceOrderCount { get => serviceOrderCount; set { Set(ref serviceOrderCount, value); } } |
|||
|
|||
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
|||
|
|||
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
|||
|
|||
public string OrderId { get => orderId; set { Set(ref orderId, value); } } |
|||
|
|||
public string Spu { get => spu; set { Set(ref spu, value); } } |
|||
|
|||
public string Sku { get => sku; set { Set(ref sku, value); } } |
|||
|
|||
public string ServiceId { get => serviceId; set { Set(ref serviceId, value); } } |
|||
|
|||
public DateTime? StartDate { get => startDate; set { Set(ref startDate, value); } } |
|||
|
|||
public DateTime? EndDate { get => endDate; set { Set(ref endDate, value); } } |
|||
|
|||
public GlobalContext GlobalContext { get; set; } |
|||
|
|||
public ServiceOrderViewModel(ServiceOrderService serviceOrderService, GlobalContext globalContext, IHttpClientFactory httpClientFactory) |
|||
{ |
|||
this.httpClientFactory = httpClientFactory; |
|||
this.serviceOrderService = serviceOrderService; |
|||
SetServiceOrderStateCommand = new RelayCommand<ServiceOrderState?>(SetServiceOrderState); |
|||
SetReturnDirectionCommand = new RelayCommand<ReturnDirection?>(SetReturnDirection); |
|||
CopyTextCommand = new RelayCommand<string>(s => { try { Clipboard.SetText(s); } catch (Exception ex) { } }); |
|||
SetSearchDateCommand = new RelayCommand<int>(SetSearchDate); |
|||
SearchServiceOrderCommand = new RelayCommand(InitQueryServiceOrder); |
|||
NavigateToDetailCommand = new RelayCommand<string>(NavigateToDetail); |
|||
OnPageIndexChangedCommand = new RelayCommand<PageArgs>(OnPageIndexChanged); |
|||
PreviewImgCommand = new RelayCommand<string>(PreviewImg); |
|||
EditServiceOrderCommand = new RelayCommand<ServiceOrder>(OpenEditServiceOrder); |
|||
ServiceOrderList = new ObservableCollection<ServiceOrder>() { new ServiceOrder(), new ServiceOrder(), new ServiceOrder() }; |
|||
PageSize = 10; |
|||
GlobalContext = globalContext; |
|||
EndDate = DateTime.Now.Date; |
|||
StartDate = DateTime.Now.Date.AddDays(-15); |
|||
InitQueryServiceOrder(); |
|||
} |
|||
|
|||
private void InitQueryServiceOrder() |
|||
{ |
|||
PageIndex = 1; |
|||
Task.Factory.StartNew(() => QueryServiceOrder(PageIndex)); |
|||
} |
|||
|
|||
private void SetSearchDate(int d) |
|||
{ |
|||
EndDate = d == 1 ? DateTime.Now.Date.AddDays(-1) : DateTime.Now; |
|||
StartDate = DateTime.Now.Date.AddDays(d * -1); |
|||
InitQueryServiceOrder(); |
|||
} |
|||
|
|||
private void SetServiceOrderState(ServiceOrderState? state) |
|||
{ |
|||
this.ServiceOrderState = state; |
|||
//query
|
|||
InitQueryServiceOrder(); |
|||
} |
|||
|
|||
private void SetReturnDirection(ReturnDirection? returnDirection) |
|||
{ |
|||
this.ReturnDirection = returnDirection; |
|||
//query
|
|||
InitQueryServiceOrder(); |
|||
} |
|||
|
|||
private void QueryServiceOrder(int pageIndex) |
|||
{ |
|||
IsLoading = true; |
|||
var response = serviceOrderService.GetList(OrderId, Sku, Spu, ServiceId, GlobalContext.User.Shop.ShopId.ToString(), ServiceOrderState, ReturnDirection, pageIndex, PageSize, StartDate, EndDate); |
|||
if (!response.Success) |
|||
{ |
|||
IsLoading = false; |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
MessageBox.Show(response.Msg, "提示"); |
|||
return; |
|||
}); |
|||
} |
|||
|
|||
IsLoading = false; |
|||
ServiceOrderCount = response.Data.Count; |
|||
App.Current.Dispatcher.Invoke(() => ServiceOrderList.Clear()); |
|||
|
|||
if (response.Data.Items == null || response.Data.Items.Count() == 0) |
|||
return; |
|||
|
|||
var list = response.Data.Items.Map<IList<ServiceOrder>>(); |
|||
|
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
foreach (var s in list) |
|||
{ |
|||
#region Test
|
|||
//转换ImageName
|
|||
//if (int.Parse(s.ServiceId) % 2 == 0)
|
|||
//{
|
|||
// s.ProductPackage = ProductPackage.新; s.ImageName = "20230317071208762563,8d58b491-7859-4187-9f43-4fd177a0f25f,b0df0763-9cf4-40ca-a1fc-57695e4b8d33";
|
|||
//}
|
|||
#endregion
|
|||
|
|||
s.Init(); |
|||
ServiceOrderList.Add(s); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
private void NavigateToDetail(string serviceId) |
|||
{ |
|||
var url = $"https://sh.shop.jd.com/afs/detail/waitReceive?afsApplyId=undefined&afsServiceId={serviceId}"; |
|||
try |
|||
{ |
|||
//System.Diagnostics.Process.Start("explorer.exe", url);
|
|||
ShellExecuteHelper.ShellExecute(IntPtr.Zero, "open", url, string.Empty, string.Empty, ShellExecuteHelper.ShowCommands.SW_SHOWNORMAL); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Clipboard.SetText(url); |
|||
MessageBox.Show($"{ex.Message}\r\n调用浏览器失败,网页链接已复制到剪切板,请手动打开浏览器访问", "提示"); |
|||
} |
|||
} |
|||
|
|||
private void OnPageIndexChanged(PageArgs pageArgs) |
|||
{ |
|||
Task.Factory.StartNew(() => QueryServiceOrder(pageArgs.PageIndex)); |
|||
} |
|||
|
|||
private void PreviewImg(string thumbnailImg) |
|||
{ |
|||
var fullUrl = thumbnailImg.Substring(0, thumbnailImg.IndexOf("?")); |
|||
var fileName = fullUrl.Substring(fullUrl.LastIndexOf("/") + 1); |
|||
var localPath = Path.Combine(Path.GetTempPath(), fileName); |
|||
if (!File.Exists(localPath)) |
|||
{ |
|||
IsLoading = true; |
|||
var downloader = new HttpDownloader(httpClientFactory); |
|||
downloader.OnDownloadComplated += (s, e) => |
|||
{ |
|||
IsLoading = false; |
|||
if (e.Error != null) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(e.Error.Message)); |
|||
return; |
|||
} |
|||
CallWindowsPhoto(localPath); |
|||
}; |
|||
Task.Factory.StartNew(() => downloader.DownloadFile(fullUrl, Path.GetTempPath(), fileName, null)); |
|||
} |
|||
else |
|||
{ |
|||
CallWindowsPhoto(localPath); |
|||
} |
|||
} |
|||
|
|||
private void CallWindowsPhoto(string path) |
|||
{ |
|||
//建立新的系统进程
|
|||
try |
|||
{ |
|||
System.Diagnostics.Process process = new System.Diagnostics.Process(); |
|||
|
|||
//设置图片的真实路径和文件名
|
|||
process.StartInfo.FileName = path; |
|||
|
|||
//设置进程运行参数,这里以最大化窗口方法显示图片。
|
|||
process.StartInfo.Arguments = "rundl132.exe C://WINDOWS//system32//shimgvw.dll,ImageView_Fullscreen"; |
|||
|
|||
//此项为是否使用Shell执行程序,因系统默认为true,此项也可不设,但若设置必须为true
|
|||
process.StartInfo.UseShellExecute = true; |
|||
|
|||
//此处可以更改进程所打开窗体的显示样式,可以不设
|
|||
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; |
|||
process.Start(); |
|||
process.Close(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show($"打开照片查看器失败 {ex.Message}")); |
|||
} |
|||
} |
|||
|
|||
private void OpenEditServiceOrder(ServiceOrder serviceOrder) |
|||
{ |
|||
var w = new EditServiceOrder(serviceOrder); |
|||
var r = w.ShowDialog(); |
|||
if (r == true) |
|||
{ |
|||
IsLoading = true; |
|||
Task.Factory.StartNew(() => RefreshServiceOrder(serviceOrder)); |
|||
} |
|||
} |
|||
|
|||
private void RefreshServiceOrder(long servicePId) |
|||
{ |
|||
var order = ServiceOrderList.FirstOrDefault(s => s.Id == servicePId); |
|||
RefreshServiceOrder(order); |
|||
} |
|||
|
|||
private void RefreshServiceOrder(ServiceOrder serviceOrder) |
|||
{ |
|||
var serviceOrderResponse = serviceOrderService.GetList(string.Empty, string.Empty, string.Empty, serviceOrder.ServiceId, serviceOrder.ShopId, null, null, 1, 1, null, null); |
|||
IsLoading = false; |
|||
if (!serviceOrderResponse.Success) |
|||
{ |
|||
Application.Current.Dispatcher.Invoke(() => MessageBox.Show(serviceOrderResponse.Msg, "刷新服务单")); |
|||
return; |
|||
} |
|||
|
|||
var newServiceOrder = serviceOrderResponse.Data.Items.FirstOrDefault().Map<ServiceOrder>(); |
|||
newServiceOrder.Init(); |
|||
|
|||
Application.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
var orderIndex = ServiceOrderList.IndexOf(serviceOrder); |
|||
ServiceOrderList.Remove(serviceOrder); |
|||
ServiceOrderList.Insert(orderIndex, newServiceOrder); |
|||
}); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,179 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.ServiceOrder.EditServiceOrder" |
|||
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.ServiceOrder" |
|||
mc:Ignorable="d" |
|||
xmlns:clientModel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
Style="{StaticResource bwstyle}" |
|||
DataContext="{Binding EditServiceOrder,Source={StaticResource Locator}}" |
|||
Title="EditServiceOrder" Height="450" Width="340"> |
|||
<c:BWindow.Resources> |
|||
<ObjectDataProvider x:Key="serviceResultProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="clientModel:ServiceResult"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ObjectDataProvider x:Key="returnDirectionProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="clientModel:ReturnDirection"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="clientModel:StorageType"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ObjectDataProvider x:Key="platformProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="clientModel:Platform"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
</c:BWindow.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="售后信息" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="5"> |
|||
<Grid Height="25"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="处理结果:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<ComboBox ItemsSource="{Binding Source={StaticResource serviceResultProvider}}" |
|||
SelectedItem="{Binding ServiceResult,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Grid.Column="1" |
|||
HorizontalAlignment="Left" |
|||
VerticalContentAlignment="Center" |
|||
Width="160" |
|||
Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=换新|线下换新|退货:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="退货去向:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<ComboBox ItemsSource="{Binding Source={StaticResource returnDirectionProvider}}" |
|||
SelectedItem="{Binding ReturnDirection,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Grid.Column="1" |
|||
HorizontalAlignment="Left" |
|||
VerticalContentAlignment="Center" |
|||
Width="160" |
|||
Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=SD退货:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="SD退货运费:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding SDRefundFreight}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=换新:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="换新单号:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding RenewalOrderId}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=换新|线下换新|退货|商品补发|原返|仅退款:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="售后补偿:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding ReissueAfterSaleAmount}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=线下换新:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="换新方式:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<ComboBox ItemsSource="{Binding Source={StaticResource storageTypeProvider}}" |
|||
SelectedItem="{Binding RenewalType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Grid.Column="1" |
|||
HorizontalAlignment="Left" |
|||
VerticalContentAlignment="Center" |
|||
Width="160" |
|||
Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=线下换新:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="80"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="采购单号:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding RenewalPurchaseOrderId}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
<ComboBox ItemsSource="{Binding Source={StaticResource platformProvider}}" |
|||
SelectedItem="{Binding RenewalPurchasePlatform,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Grid.Column="2" |
|||
HorizontalAlignment="Left" |
|||
VerticalContentAlignment="Center" |
|||
MinWidth="70"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=商品补发:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="补发快递费:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding ReissueFreight}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
</Grid> |
|||
<Grid Height="25" Margin="0,5,0,0" |
|||
Visibility="{Binding ServiceResult,ConverterParameter=商品补发:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="补发货款成本:" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
|||
<c:BTextBox Text="{Binding ReissueProductAmount}" Width="160" Grid.Column="1" HorizontalAlignment="Left" |
|||
Height="25" Margin="5,0,0,0"/> |
|||
</Grid> |
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Row="2" Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="退货检查备注:" Margin="0,3"/> |
|||
<TextBox Grid.Row="1" AcceptsReturn="True" |
|||
TextWrapping="Wrap" Padding="3" |
|||
Text="{Binding ReturnCheckRemark}"/> |
|||
</Grid> |
|||
|
|||
<c:BButton Content="保存" Width="80" HorizontalAlignment="Right" Grid.Row="3" |
|||
Command="{Binding SaveCommand}" Margin="0,0,5,0"/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,28 @@ |
|||
using BBWY.Client.ViewModels; |
|||
using BBWY.Controls; |
|||
|
|||
namespace BBWY.Client.Views.ServiceOrder |
|||
{ |
|||
/// <summary>
|
|||
/// EditServiceOrder.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class EditServiceOrder : BWindow |
|||
{ |
|||
public EditServiceOrder(Models.ServiceOrder serviceOrder) |
|||
{ |
|||
InitializeComponent(); |
|||
(this.DataContext as EditServiceOrderViewModel).SetData(serviceOrder); |
|||
GalaSoft.MvvmLight.Messaging.Messenger.Default.Register<bool>(this, "closeEditServiceOrder", (r) => |
|||
{ |
|||
if (r) |
|||
{ |
|||
this.Dispatcher.Invoke(() => |
|||
{ |
|||
this.DialogResult = true; |
|||
this.Close(); |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,478 @@ |
|||
<Page x:Class="BBWY.Client.Views.ServiceOrder.ServiceOrderList" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.ServiceOrder" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="1920" |
|||
Title="ServiceOrderList" |
|||
DataContext="{Binding ServiceOrderList,Source={StaticResource Locator}}"> |
|||
<Page.Resources> |
|||
|
|||
<sys:Int32 x:Key="d0">0</sys:Int32> |
|||
<sys:Int32 x:Key="d1">1</sys:Int32> |
|||
<sys:Int32 x:Key="d3">2</sys:Int32> |
|||
<sys:Int32 x:Key="d7">6</sys:Int32> |
|||
<sys:Int32 x:Key="d15">14</sys:Int32> |
|||
<sys:Int32 x:Key="d30">29</sys:Int32> |
|||
|
|||
<sys:Int32 x:Key="ddaishouhuo">10005</sys:Int32> |
|||
<sys:Int32 x:Key="dyiwancheng">10010</sys:Int32> |
|||
|
|||
</Page.Resources> |
|||
<Grid> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
|
|||
<Grid Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="auto"/> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="30"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Height="75" Panel.ZIndex="999"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="0.5*"/> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition Height="0.5*"/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" Height="30"> |
|||
<StackPanel.Resources> |
|||
<Style TargetType="DatePickerTextBox"> |
|||
<Setter Property="IsReadOnly" Value="True"/> |
|||
</Style> |
|||
</StackPanel.Resources> |
|||
<TextBlock Text="下单时间" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding StartDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/> |
|||
<DatePicker SelectedDate="{Binding EndDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/> |
|||
<TextBlock Text="订单号" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding OrderId}" WaterRemark="精确匹配"/> |
|||
<TextBlock Text="SPU" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="精确匹配" Text="{Binding ProductId}"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,5" Height="30"> |
|||
<c:BButton Content="今天" Width="50" Height="25" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d0}"/> |
|||
<c:BButton Content="昨天" Width="50" Height="25" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d1}"/> |
|||
<c:BButton Content="近3天" Width="50" Height="25" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d3}"/> |
|||
<c:BButton Content="近7天" Width="50" Height="24" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d7}"/> |
|||
<c:BButton Content="近15天" Width="50" Height="25" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d15}"/> |
|||
<c:BButton Content="近30天" Width="50" Height="25" Margin="5,0,0,0" |
|||
Command="{Binding SetSearchDateCommand}" |
|||
CommandParameter="{StaticResource d30}"/> |
|||
<TextBlock Text="服务单" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding ServiceId}" WaterRemark="精确匹配"/> |
|||
<TextBlock Text="SKU" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding Sku}" WaterRemark="精确匹配"/> |
|||
|
|||
<c:BButton Content="同步" Width="50" Margin="5,0,0,0" Command="{Binding SyncOrderCommand}" ToolTipService.InitialShowDelay="0" ToolTipService.ShowDuration="10000" |
|||
Visibility="Collapsed"> |
|||
<c:BButton.ToolTip> |
|||
<StackPanel> |
|||
<TextBlock Text="1.使用筛选条件中的开始时间和结束时间进行同步"/> |
|||
<TextBlock Text="2.从开始时间起每次同步3小时时长的订单直到到达结束时间"/> |
|||
<TextBlock Text="3.已存在未结束的同步任务将不会重复执行"/> |
|||
</StackPanel> |
|||
</c:BButton.ToolTip> |
|||
</c:BButton> |
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Column="1" Grid.RowSpan="3"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchServiceOrderCommand}" |
|||
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
<Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1" |
|||
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#1CC2A2" BorderThickness="0" Foreground="White"/> |
|||
<Button Content="同步" Command="{Binding SyncOrderCommand}" Width="50" Grid.Column="1" Grid.Row="1" |
|||
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#02A7F0" BorderThickness="0" Foreground="White"/> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal"> |
|||
<TextBlock Text="服务单状态" VerticalAlignment="Center"/> |
|||
<c:BButton Content="全部" Width="100" Margin="5,0,0,0" |
|||
Background="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=#null:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=#null:White:#4A4A4A}" |
|||
Command="{Binding SetServiceOrderStateCommand}" CommandParameter="{x:Null}"/> |
|||
<c:BButton Content="待收货" Width="100" |
|||
Background="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:White:#4A4A4A}" |
|||
Command="{Binding SetServiceOrderStateCommand}" CommandParameter="{x:Static cmodel:ServiceOrderState.待收货}"/> |
|||
<c:BButton Content="已完成" Width="100" |
|||
Background="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ServiceOrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:White:#4A4A4A}" |
|||
Command="{Binding SetServiceOrderStateCommand}" CommandParameter="{x:Static cmodel:ServiceOrderState.已完成}"/> |
|||
|
|||
<TextBlock Text="退货去向" VerticalAlignment="Center" Margin="30,0,0,0"/> |
|||
<c:BButton Content="全部" Width="100" Margin="5,0,0,0" |
|||
Background="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=#null:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=#null:White:#4A4A4A}" |
|||
Command="{Binding SetReturnDirectionCommand}" CommandParameter="{x:Null}"/> |
|||
<c:BButton Content="退货仓" Width="100" |
|||
Background="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=退货仓:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=退货仓:White:#4A4A4A}" |
|||
Command="{Binding SetReturnDirectionCommand}" CommandParameter="{x:Static cmodel:ReturnDirection.退货仓}"/> |
|||
<c:BButton Content="采购商" Width="100" |
|||
Background="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=采购商:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=采购商:White:#4A4A4A}" |
|||
Command="{Binding SetReturnDirectionCommand}" CommandParameter="{x:Static cmodel:ReturnDirection.采购商}"/> |
|||
<c:BButton Content="原返" Width="100" |
|||
Background="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=原返:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=原返:White:#4A4A4A}" |
|||
Command="{Binding SetReturnDirectionCommand}" CommandParameter="{x:Static cmodel:ReturnDirection.原返}"/> |
|||
<c:BButton Content="无退货" Width="100" |
|||
Background="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=无退货:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding ReturnDirection,Converter={StaticResource objConverter},ConverterParameter=无退货:White:#4A4A4A}" |
|||
Command="{Binding SetReturnDirectionCommand}" CommandParameter="{x:Static cmodel:ReturnDirection.无退货}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Grid.Row="4" Background="{StaticResource Border.Background}"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<CheckBox Content="仅显示采购单未退款" VerticalContentAlignment="Center"/> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
<Border Grid.Row="6" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1,1,1,0" |
|||
Background="#F2F2F2" |
|||
Visibility="{Binding Visibility,ElementName=listbox_afterSaleOrder}"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="360"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="190"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="退货去向" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="退货检查备注" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="商品情况" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="采购单" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="售后成本" Grid.Column="5" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="退货物流" Grid.Column="6" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="操作" Grid.Column="7" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
|
|||
<ListBox x:Name="listbox_serviceOrder" |
|||
Grid.Row="7" |
|||
ItemsSource="{Binding ServiceOrderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_serviceOrder,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Background="#F2F2F2"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Border BorderBrush="{StaticResource Text.Pink}" BorderThickness="1" |
|||
Background="White" |
|||
Padding="10,0" |
|||
Height="25" |
|||
Margin="5,0,0,0"> |
|||
<TextBlock Text="{Binding Status}" |
|||
Foreground="{StaticResource Text.Pink}" |
|||
VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<TextBlock Text="{Binding ApplyTime,StringFormat=yyyy-MM-dd HH:mm:ss}" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<TextBlock VerticalAlignment="Center" Margin="10,0,0,0"> |
|||
<Run Text="服务单类型:"/> |
|||
<Run Text="{Binding ServiceResult}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
<TextBlock Text="服务单号:" Margin="10,0,0,0" VerticalAlignment="Center"/> |
|||
<c:BButton Content="{Binding ServiceId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding ServiceId}" Margin="3,0,0,0"/> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Margin="10,0,0,0"> |
|||
<Run Text="仓储类型:"/> |
|||
<Run Text="{Binding StorageType}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
<TextBlock Text="订单号:" Margin="10,0,0,0" VerticalAlignment="Center"/> |
|||
<c:BButton Content="{Binding OrderId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding OrderId}" Margin="3,0,0,0"/> |
|||
</StackPanel> |
|||
<Border VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="360"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="190"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<c:BAsyncImage UrlSource="{Binding Logo}" |
|||
Width="80" DecodePixelWidth="80" |
|||
VerticalAlignment="Top" Margin="0,5"/> |
|||
|
|||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,5,0,5"> |
|||
<TextBlock TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding Title}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding Title}"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SPU:"/> |
|||
<c:BButton Content="{Binding ProductId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding ProductId}" |
|||
Margin=" 5,0,0,0"/> |
|||
|
|||
<TextBlock Text="SKU:" Margin="5,0,0,0"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
Margin=" 5,0,0,0"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock TextWrapping="Wrap"> |
|||
<Run Text="单价:"/> |
|||
<Run Text="{Binding Price}"/> |
|||
</TextBlock> |
|||
<TextBlock TextWrapping="Wrap" Margin="5,0,0,0"> |
|||
<Run Text="数量:"/> |
|||
<Run Text="{Binding ItemTotal}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<TextBlock Text="{Binding ReturnDirection}" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,20"/> |
|||
|
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Column="1" VerticalAlignment="Bottom" Margin="0,0,0,27"/> |
|||
<c:BButton Content="修改" VerticalAlignment="Bottom" |
|||
HorizontalAlignment="Stretch" |
|||
Background="Transparent" |
|||
Foreground="{StaticResource Text.Color}" |
|||
Grid.Column="1" |
|||
Command="{Binding DataContext.EditServiceOrderCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding }"/> |
|||
|
|||
<Border Grid.Column="1" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<TextBlock Text="{Binding ReturnCheckRemark}" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" |
|||
TextWrapping="Wrap"/> |
|||
|
|||
<Border Grid.Column="2" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<Grid Grid.Column="3"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="0.5*"/> |
|||
<RowDefinition Height="0.5*"/> |
|||
</Grid.RowDefinitions> |
|||
<Grid Margin="5,5,0,0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="0.55*"/> |
|||
<ColumnDefinition Width="0.45*"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock |
|||
Visibility="{Binding IsShowProductInfo,Mode=OneWay,UpdateSourceTrigger=PropertyChanged,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Run Text="商品状态:"/> |
|||
<Run Text="{Binding ProductHealth,ConverterParameter=#null:未填:#source,Converter={StaticResource objConverter}}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Grid.Column="1" |
|||
Visibility="{Binding IsShowProductInfo,Mode=OneWay,UpdateSourceTrigger=PropertyChanged,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Run Text="商品功能:"/> |
|||
<Run Text="{Binding ProductFunction,ConverterParameter=#null:未填:#source,Converter={StaticResource objConverter}}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Grid.Row="1" |
|||
Visibility="{Binding IsShowProductInfo,Mode=OneWay,UpdateSourceTrigger=PropertyChanged,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Run Text="商品外观:"/> |
|||
<Run Text="{Binding ProductAppearance,ConverterParameter=#null:未填:#source,Converter={StaticResource objConverter}}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Grid.Row="1" Grid.Column="1" |
|||
Visibility="{Binding IsShowProductInfo,Mode=OneWay,UpdateSourceTrigger=PropertyChanged,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"> |
|||
<Run Text="商品包装:"/> |
|||
<Run Text="{Binding ProductPackage,ConverterParameter=#null:未填:#source,Converter={StaticResource objConverter}}" Foreground="{StaticResource Text.Pink}"/> |
|||
</TextBlock> |
|||
</Grid> |
|||
<ListBox ItemsSource="{Binding ThumbnailImageList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
Style="{StaticResource NoScrollViewListBoxStyle}" |
|||
Grid.Row="1"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal"/> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Margin="5,0,0,0" Cursor="Hand"> |
|||
<c:BAsyncImage UrlSource="{Binding }" |
|||
DecodePixelWidth="35" |
|||
Width="35"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction PassEventArgsToCommand="True" |
|||
CommandParameter="{Binding }" |
|||
Command="{Binding DataContext.PreviewImgCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"/> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
|
|||
<Border Grid.Column="3" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<StackPanel Grid.Column="4" VerticalAlignment="Center" Margin="5,0,0,0" |
|||
Visibility="{Binding RenewalPurchaseOrderId,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}"> |
|||
<TextBlock> |
|||
<Run Text="采购平台:"/> |
|||
<Run Text="{Binding RenewalPurchasePlatform}"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="采购订单号:"/> |
|||
<c:BButton Content="{Binding RenewalPurchaseOrderId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding RenewalPurchaseOrderId}" Margin="3,0,0,0"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
<Border Grid.Column="4" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<StackPanel Orientation="Horizontal" Grid.Column="5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,20"> |
|||
<TextBlock> |
|||
<Run Text="总耗损"/> |
|||
<Run Text="{Binding AfterTotalCost}"/> |
|||
</TextBlock> |
|||
<Path Style="{StaticResource path_question}" Width="14" Margin="5,0,0,0" Fill="{StaticResource Text.Pink}"> |
|||
|
|||
</Path> |
|||
</StackPanel> |
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Column="5" VerticalAlignment="Bottom" Margin="0,0,0,27"/> |
|||
<c:BButton Content="设置" VerticalAlignment="Bottom" |
|||
HorizontalAlignment="Stretch" |
|||
Background="Transparent" |
|||
Foreground="{StaticResource Text.Color}" |
|||
Grid.Column="5" |
|||
Command="{Binding DataContext.EditServiceOrderCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding }"/> |
|||
|
|||
<Border Grid.Column="5" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<StackPanel Grid.Column="6" VerticalAlignment="Center" Margin="5,0,0,0" |
|||
Visibility="{Binding WayBillNo,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}"> |
|||
<TextBlock> |
|||
<Run Text="物流状态:"/> |
|||
<Run Text="{Binding TransportDetails}"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="{Binding ExpressName,StringFormat=\{0\}:}"/> |
|||
<c:BButton Content="{Binding WayBillNo}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding WayBillNo}" Margin="3,0,0,0"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
<Border Grid.Column="6" Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<StackPanel Orientation="Horizontal" Grid.Column="7" HorizontalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="查看详情" |
|||
Command="{Binding DataContext.NavigateToDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
|||
CommandParameter="{Binding ServiceId}"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<c:PageControl PageIndex="{Binding PageIndex}" |
|||
PageSize="{Binding PageSize}" |
|||
RecordCount="{Binding ServiceOrderCount}" |
|||
Grid.Row="8" |
|||
HorizontalAlignment="Left"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="OnPageIndexChanged"> |
|||
<b:InvokeCommandAction Command="{Binding OnPageIndexChangedCommand}" PassEventArgsToCommand="True"/> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:PageControl> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</Page> |
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.ServiceOrder |
|||
{ |
|||
/// <summary>
|
|||
/// ServiceOrderList.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ServiceOrderList : Page |
|||
{ |
|||
public ServiceOrderList() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
using BBWY.Server.Business; |
|||
using BBWY.Server.Model.Dto; |
|||
using Microsoft.AspNetCore.Http; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace BBWY.Server.API.Controllers |
|||
{ |
|||
|
|||
public class ServiceOrderController : BaseApiController |
|||
{ |
|||
private ServiceOrderBusiness serviceOrderBusiness { get; set; } |
|||
public ServiceOrderController(IHttpContextAccessor httpContextAccessor, ServiceOrderBusiness serviceOrderBusiness) : base(httpContextAccessor) |
|||
{ |
|||
this.serviceOrderBusiness = serviceOrderBusiness; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查询服务单
|
|||
/// </summary>
|
|||
/// <param name="request"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost] |
|||
public ServiceOrderResponse GetList([FromBody] ClientQueryServiceOrderRequest request) |
|||
{ |
|||
return serviceOrderBusiness.GetList(request); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 修改服务单
|
|||
/// </summary>
|
|||
/// <param name="request"></param>
|
|||
[HttpPost] |
|||
public void EditServiceOrder([FromBody] EditQueryServiceOrderRequest request) |
|||
{ |
|||
serviceOrderBusiness.EditServiceOrder(request); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,100 @@ |
|||
using BBWY.Common.Models; |
|||
using BBWY.Server.Model.Db; |
|||
using BBWY.Server.Model.Dto; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using Yitter.IdGenerator; |
|||
|
|||
namespace BBWY.Server.Business |
|||
{ |
|||
public class ServiceOrderBusiness : BaseBusiness, IDenpendency |
|||
{ |
|||
public ServiceOrderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator) : base(fsql, nLogManager, idGenerator) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public ServiceOrderResponse GetList(ClientQueryServiceOrderRequest request) |
|||
{ |
|||
var list = fsql.Select<ServiceOrder, Order, OrderSku>() |
|||
.InnerJoin((s, o, osku) => s.OrderId == o.Id) |
|||
.InnerJoin((s, o, osku) => s.OrderId == osku.OrderId && s.SkuId == osku.SkuId) |
|||
.Where((s, o, osku) => s.ShopId == request.ShopId) |
|||
.WhereIf(!string.IsNullOrEmpty(request.Sku), (s, o, osku) => s.SkuId == request.Sku) |
|||
.WhereIf(!string.IsNullOrEmpty(request.Spu), (s, o, osku) => s.ProductId == request.Spu) |
|||
.WhereIf(!string.IsNullOrEmpty(request.OrderId), (s, o, osku) => s.OrderId == request.OrderId) |
|||
.WhereIf(!string.IsNullOrEmpty(request.ServiceId), (s, o, osku) => s.ServiceId == request.ServiceId) |
|||
.WhereIf(request.ServiceOrderState != null, (s, o, osku) => s.Status == request.ServiceOrderState) |
|||
.WhereIf(request.ReturnDirection != null, (s, o, osku) => s.ReturnDirection == request.ReturnDirection) |
|||
.WhereIf(request.StartDate != null, (s, o, osku) => s.ApplyTime >= request.StartDate) |
|||
.WhereIf(request.EndDate != null, (s, o, osku) => s.ApplyTime <= request.EndDate) |
|||
.OrderByDescending((s, o, osku) => s.ApplyTime) |
|||
.Count(out var total) |
|||
.Page(request.PageIndex, request.PageSize) |
|||
.ToList((s, o, osku) => new ServiceOrderItemResponse |
|||
{ |
|||
Id = s.Id, |
|||
ApplyTime = s.ApplyTime, |
|||
CreateTime = s.CreateTime, |
|||
ExpressName = s.ExpressName, |
|||
WayBillNo = s.WayBillNo, |
|||
ImageName = s.ImageName, |
|||
OrderId = s.OrderId, |
|||
SkuId = s.SkuId, |
|||
ProductId = s.ProductId, |
|||
ProductAppearance = s.ProductAppearance, |
|||
ProductFunction = s.ProductFunction, |
|||
ProductHealth = s.ProductHealth, |
|||
ProductPackage = s.ProductPackage, |
|||
ServiceResult = s.ServiceResult, |
|||
TransportDetails = s.TransportDetails, |
|||
WareHouseGrounpRemark = s.WareHouseGrounpRemark, |
|||
Status = s.Status, |
|||
ServiceId = s.ServiceId, |
|||
ShopId = s.ShopId, |
|||
RenewalOrderId = s.RenewalOrderId, |
|||
ReturnCheckRemark = s.ReturnCheckRemark, |
|||
|
|||
Title = osku.Title, |
|||
ItemTotal = osku.ItemTotal.Value, |
|||
Logo = osku.Logo, |
|||
Price = osku.Price.Value, |
|||
SkuItemCount = osku.ItemTotal.Value, |
|||
ReturnDirection = s.ReturnDirection, |
|||
ServiceOrderRemark = s.ServiceOrderRemark, |
|||
StatusUpdateTime = s.StatusUpdateTime, |
|||
PurchaseOrderId = s.PurchaseOrderId, |
|||
PurchasePlatform = s.PurchasePlatform, |
|||
|
|||
StorageType = o.StorageType |
|||
}); |
|||
return new ServiceOrderResponse() |
|||
{ |
|||
Count = total, |
|||
Items = list |
|||
}; |
|||
} |
|||
|
|||
public void EditServiceOrder(EditQueryServiceOrderRequest request) |
|||
{ |
|||
|
|||
|
|||
fsql.Transaction(() => |
|||
{ |
|||
fsql.Update<ServiceOrder>(request.ServicePId).Set(s => s.ServiceResult, request.ServiceResult) |
|||
.Set(s => s.SDRefundFreight, request.SDRefundFreight) |
|||
.Set(s => s.ReturnDirection, request.ReturnDirection) |
|||
.Set(s => s.RenewalOrderId, request.RenewalOrderId) |
|||
.Set(s => s.ReissueAfterSaleAmount, request.ReissueAfterSaleAmount) |
|||
.Set(s => s.ReturnCheckRemark, request.ReturnCheckRemark) |
|||
.Set(s => s.RenewalType, request.RenewalType) |
|||
.Set(s => s.RenewalPurchaseOrderId, request.RenewalPurchaseOrderId) |
|||
.Set(s => s.RenewalPurchasePlatform, request.RenewalPurchasePlatform) |
|||
.Set(s => s.ReissueFreight, request.ReissueFreight) |
|||
.Set(s => s.ReissueProductAmount, request.ReissueProductAmount) |
|||
.ExecuteAffrows(); |
|||
}); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
using FreeSql.DataAnnotations; |
|||
using System; |
|||
|
|||
namespace BBWY.Server.Model.Db |
|||
{ |
|||
|
|||
[ Table(Name = "waitpayorder", DisableSyncStructure = true)] |
|||
public partial class WaitPayOrder |
|||
{ |
|||
|
|||
[Column(StringLength = 100, IsPrimary = true, IsNullable = false)] |
|||
public string Id { get; set; } |
|||
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
public long? ShopId { get; set; } |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
|
|||
using System; |
|||
|
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
public class ClientQueryServiceOrderRequest |
|||
{ |
|||
public string OrderId { get; set; } |
|||
|
|||
public string Sku { get; set; } |
|||
|
|||
public string Spu { get; set; } |
|||
|
|||
public string ServiceId { get; set; } |
|||
|
|||
public string ShopId { get; set; } |
|||
|
|||
public Enums.ServiceOrderState? ServiceOrderState { get; set; } |
|||
|
|||
public Enums.ReturnDirection? ReturnDirection { get; set; } |
|||
|
|||
public int PageIndex { get; set; } |
|||
|
|||
public int PageSize { get; set; } |
|||
|
|||
public DateTime? StartDate { get; set; } |
|||
|
|||
public DateTime? EndDate { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
public class EditQueryServiceOrderRequest |
|||
{ |
|||
public long ServicePId { get; set; } |
|||
|
|||
public string OrderId { get; set; } |
|||
|
|||
public Enums.ServiceResult? ServiceResult { get; set; } |
|||
public decimal? SDRefundFreight { get; set; } |
|||
public Enums.ReturnDirection? ReturnDirection { get; set; } |
|||
public string RenewalOrderId { get; set; } |
|||
public decimal? ReissueAfterSaleAmount { get; set; } |
|||
public string ReturnCheckRemark { get; set; } |
|||
public Enums.StorageType? RenewalType { get; set; } |
|||
public string RenewalPurchaseOrderId { get; set; } |
|||
public Enums.Platform? RenewalPurchasePlatform { get; set; } |
|||
public decimal? ReissueFreight { get; set; } |
|||
public decimal? ReissueProductAmount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,291 @@ |
|||
using FreeSql.DataAnnotations; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
public class ServiceOrderItemResponse |
|||
{ |
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 售后成本(不含退款采购成本)
|
|||
/// </summary>
|
|||
public decimal? AfterTotalCost { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 申请时间
|
|||
/// </summary>
|
|||
public DateTime? ApplyTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 耗材费
|
|||
/// </summary>
|
|||
public decimal? ConsumableAmount { get; set; } = 0.00M; |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 发货快递费
|
|||
/// </summary>
|
|||
public decimal? DeliveryExpressFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 头程费
|
|||
/// </summary>
|
|||
public decimal? FirstFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货拍摄图(名称)
|
|||
/// </summary>
|
|||
public string ImageName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入仓操作费
|
|||
/// </summary>
|
|||
public decimal? InStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 是否订阅快递100
|
|||
/// </summary>
|
|||
|
|||
public bool? IsSubscribeKuaiDi100 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否需要订阅快递100
|
|||
/// </summary>
|
|||
public bool? IsNeedSubscribeKuaiDi100 { get; set; } |
|||
|
|||
public string OrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 出仓操作费
|
|||
/// </summary>
|
|||
public decimal? OutStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 产品外观 (严重损=0 轻微损=1 新=2)
|
|||
/// </summary>
|
|||
|
|||
public Enums.ProductAppearance? ProductAppearance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 产品功能 (坏=0 好=1)
|
|||
/// </summary>
|
|||
|
|||
public Enums.ProductFunction? ProductFunction { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品健康状态 (残次品=0 良品=1)
|
|||
/// </summary>
|
|||
|
|||
public Enums.NewProductHealth? ProductHealth { get; set; } |
|||
|
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 产品包装(无=0 非新=1 新=2)
|
|||
/// </summary>
|
|||
|
|||
public Enums.ProductPackage? ProductPackage { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 采购方式
|
|||
/// </summary>
|
|||
|
|||
public Enums.PurchaseMethod? PurchaseMethod { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单号
|
|||
/// </summary>
|
|||
public string PurchaseOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单主键
|
|||
/// </summary>
|
|||
|
|||
public long? PurchaseOrderPKId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购平台
|
|||
/// </summary>
|
|||
|
|||
public Enums.Platform? PurchasePlatform { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款支付宝订单号
|
|||
/// </summary>
|
|||
public string RefundAlipayOrderNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款金额
|
|||
/// </summary>
|
|||
public decimal? RefundAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货入仓操作费
|
|||
/// </summary>
|
|||
public decimal? RefundInStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退款商户订单号
|
|||
/// </summary>
|
|||
public string RefundMerchantOrderNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退款采购成本
|
|||
/// </summary>
|
|||
public decimal? RefundPurchaseAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退款时间
|
|||
/// </summary>
|
|||
public DateTime? RefundTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 售后补发成本
|
|||
/// </summary>
|
|||
public decimal? ReissueAfterSaleAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 补发快递费
|
|||
/// </summary>
|
|||
public decimal? ReissueFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 补发货款成本
|
|||
/// </summary>
|
|||
public decimal? ReissueProductAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 退货去向(退货仓=0,采购商=1,原返=2,无退货=3)
|
|||
/// </summary>
|
|||
|
|||
public Enums.ReturnDirection? ReturnDirection { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// SD退货运费
|
|||
/// </summary>
|
|||
public decimal? SDRefundFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 服务单号
|
|||
/// </summary>
|
|||
public string ServiceId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单租备注
|
|||
/// </summary>
|
|||
public string ServiceOrderRemark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单处理结果
|
|||
/// </summary>
|
|||
|
|||
public Enums.ServiceResult? ServiceResult { get; set; } |
|||
|
|||
public string ShopId { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// SKU销售件数
|
|||
/// </summary>
|
|||
|
|||
public int? SkuItemCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 服务单状态 待收货 = 10005,取消 = 10011,完成 = 10010
|
|||
/// </summary>
|
|||
|
|||
public Enums.ServiceOrderState? Status { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 变更时间
|
|||
/// </summary>
|
|||
public DateTime? StatusUpdateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 仓储费
|
|||
/// </summary>
|
|||
public decimal? StorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 服务单物流状态(0=待质检,1=已入库,2=派送中,3=运输中)
|
|||
/// </summary>
|
|||
|
|||
public Enums.TransportState? TransportDetails { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 仓库组备注
|
|||
/// </summary>
|
|||
public string WareHouseGrounpRemark { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 快递单号
|
|||
/// </summary>
|
|||
public string WayBillNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 快递公司名称
|
|||
/// </summary>
|
|||
public string ExpressName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 质检入库时间
|
|||
/// </summary>
|
|||
public DateTime? QualityInspectionInStoreTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 换新单号
|
|||
/// </summary>
|
|||
public string RenewalOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 退货检查备注
|
|||
/// </summary>
|
|||
public string ReturnCheckRemark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新方式
|
|||
/// </summary>
|
|||
public Enums.StorageType? RenewalType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新采购单号
|
|||
/// </summary>
|
|||
public string RenewalPurchaseOrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 线下换新采购平台
|
|||
/// </summary>
|
|||
public Enums.Platform? RenewalPurchasePlatform { get; set; } |
|||
|
|||
#region Sku
|
|||
public string Logo { get; set; } |
|||
|
|||
public string Title { get; set; } |
|||
|
|||
//public string ContactName { get; set; }
|
|||
|
|||
//public string Mobile { get; set; }
|
|||
|
|||
public int ItemTotal { get; set; } |
|||
|
|||
public decimal Price { get; set; } |
|||
#endregion
|
|||
|
|||
#region Order
|
|||
public Enums.StorageType? StorageType { get; set; } |
|||
#endregion
|
|||
} |
|||
|
|||
public class ServiceOrderResponse |
|||
{ |
|||
public IList<ServiceOrderItemResponse> Items { get; set; } |
|||
|
|||
public long Count { get; set; } |
|||
} |
|||
} |
Loading…
Reference in new issue