124 changed files with 6936 additions and 1096 deletions
@ -0,0 +1,43 @@ |
|||
using BBWY.Client.Extensions; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Media.Imaging; |
|||
|
|||
namespace BBWY.Client.Helpers |
|||
{ |
|||
public static class ImageHelper |
|||
{ |
|||
/// <summary>
|
|||
/// 下载图片
|
|||
/// </summary>
|
|||
/// <param name="imageUrl"></param>
|
|||
/// <returns></returns>
|
|||
private static async Task< BitmapImage> LoadImageAsync(string imageUrl) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
|
|||
using (HttpClient client = new HttpClient()) |
|||
{ |
|||
// 发送 HTTP 请求并获取图片数据
|
|||
var uri = new Uri(Uri.EscapeUriString(imageUrl)); |
|||
byte[] imageData = await client.GetByteArrayAsync(uri); |
|||
// 创建 BitmapImage 对象并设置图片数据
|
|||
var LogoImage = imageData.ByteToBitmapImage(); |
|||
return LogoImage; |
|||
|
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
// 处理加载图片失败的异常
|
|||
Console.WriteLine("加载图片失败:" + ex.Message); |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class ExportOrderSkuResponse |
|||
{ |
|||
public string OrderId { get; set; } |
|||
|
|||
public DateTime? StartTime { get; set; } |
|||
|
|||
public long ShopId { get; set; } |
|||
|
|||
public string ShopName { get; set; } |
|||
|
|||
public string Spu { get; set; } |
|||
|
|||
public string Sku { get; set; } |
|||
|
|||
public StorageType? StorageType { get; set; } |
|||
|
|||
public decimal? PurchaseSkuAmount { get; set; } |
|||
|
|||
public decimal? PurchaseFreight { get; set; } |
|||
|
|||
public decimal? PurchaseAmount { get { return PurchaseSkuAmount + PurchaseFreight; } } |
|||
|
|||
public decimal? SkuPrice { get; set; } |
|||
|
|||
public int? ItemTotal { get; set; } |
|||
|
|||
public string SpuName { get; set; } |
|||
|
|||
public OrderState? OrderState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 平台补贴
|
|||
/// </summary>
|
|||
public decimal? PreferentialAmount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商家优惠金额
|
|||
/// </summary>
|
|||
public decimal? SellerPreferentialAmount { get; set; } |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return $"{StartTime},{ShopName},{OrderId},{OrderState},{Spu},{Sku},{StorageType},{PurchaseAmount},{PreferentialAmount},{SellerPreferentialAmount},{SkuPrice},{ItemTotal},{SpuName}"; |
|||
} |
|||
} |
|||
|
|||
public class ExportOrderSkuListResponse |
|||
{ |
|||
public long Count { get; set; } |
|||
|
|||
public IList<ExportOrderSkuResponse> ItemList { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,83 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel |
|||
{ |
|||
public class SearchStoreGetSelfResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 总条数
|
|||
/// </summary>
|
|||
public int TotalCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商家自取记录列表
|
|||
/// </summary>
|
|||
public List<StoreGetSelfData> StoreGetSelfResponseList { get; set; } |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 单挑自取记录数据
|
|||
/// </summary>
|
|||
public class StoreGetSelfData:NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 打包任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
///// <summary>
|
|||
///// 取货时间
|
|||
///// </summary>
|
|||
//public DateTime OperatorTime { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 取货人
|
|||
/// </summary>
|
|||
public string PickerUserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 自取数量
|
|||
/// </summary>
|
|||
public int StoreGetCount { get; set; } |
|||
|
|||
#region 任务信息
|
|||
|
|||
/// <summary>
|
|||
/// 任务创建时间
|
|||
/// </summary>
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺
|
|||
/// </summary>
|
|||
public string ShopName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 团队
|
|||
/// </summary>
|
|||
public string DepartmentName { get; set; } |
|||
/// <summary>
|
|||
/// 商品sku
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 图片
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品sku标题名称
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,102 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Response.PackTask |
|||
{ |
|||
public class ShopTotalV2Response |
|||
{ |
|||
/// <summary>
|
|||
///总量
|
|||
/// </summary>
|
|||
public int TotalCount { get; set; } |
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
public List<ShopTotalV2> ShopTotals { get; set; } |
|||
} |
|||
public class ShopTotalV2 |
|||
{ |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
/// <summary>
|
|||
/// 完成打包时间日期
|
|||
/// </summary>
|
|||
public DateTime? CreateTime { get; set; } |
|||
/// <summary>
|
|||
/// 是否结清
|
|||
/// </summary>
|
|||
public Settle IsSettle { get; set; } |
|||
/// <summary>
|
|||
/// 部门
|
|||
/// </summary>
|
|||
public string DepartmentName { get; set; } |
|||
/// <summary>
|
|||
/// 店铺
|
|||
/// </summary>
|
|||
public string ShopName { get; set; } |
|||
/// <summary>
|
|||
/// 对接人
|
|||
/// </summary>
|
|||
public string AcceptUserName { get; set; } |
|||
/// <summary>
|
|||
/// sku标题
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
/// <summary>
|
|||
/// sku数量(任务数量)
|
|||
/// </summary>
|
|||
public int SkuCount { get; set; } |
|||
/// <summary>
|
|||
/// 耗材费
|
|||
/// </summary>
|
|||
public decimal ConsumableFees { get; set; } |
|||
/// <summary>
|
|||
/// 到货数量
|
|||
/// </summary>
|
|||
public int? ArrivalQuantity { get; set; } |
|||
/// <summary>
|
|||
/// 打包费(原价)
|
|||
/// </summary>
|
|||
public decimal PackFees { get; set; } |
|||
/// <summary>
|
|||
/// 折扣系数
|
|||
/// </summary>
|
|||
public decimal? DiscountFactor { get; set; } |
|||
/// <summary>
|
|||
/// 打包费用折扣价
|
|||
/// </summary>
|
|||
public decimal? PackDisCountFees { get; set; } |
|||
///// <summary>
|
|||
///// 折扣类型
|
|||
///// </summary>
|
|||
//public FeesMode? FeesMode { get; set; }
|
|||
/// <summary>
|
|||
/// 总费用
|
|||
/// </summary>
|
|||
public decimal? AllFees { 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; } |
|||
|
|||
/// <summary>
|
|||
/// 耗材服务数据
|
|||
/// </summary>
|
|||
public List<ServiceItemResponse> ConsumableList { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class StoreGetSelfResponse:NotifyObject |
|||
{ /// <summary>
|
|||
/// 团队用户列表(取件人)
|
|||
/// </summary>
|
|||
private ObservableCollection<DepartmentUser> departmentUsers; |
|||
|
|||
/// <summary>
|
|||
/// 团队用户列表(取件人)
|
|||
/// </summary>
|
|||
public ObservableCollection<DepartmentUser> DepartmentUsers { get=> departmentUsers; set { Set(ref departmentUsers, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 可取的最大数
|
|||
/// </summary>
|
|||
public int PickMaxCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 提示消息
|
|||
/// </summary>
|
|||
public string ShowMessage { get; set; } |
|||
} |
|||
public class DepartmentUser:NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 用户id
|
|||
/// </summary>
|
|||
public string UserId { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
private string userName; |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
public string UserName { get => userName; set { Set(ref userName, value); } } //
|
|||
} |
|||
} |
@ -0,0 +1,223 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using Microsoft.Win32; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels |
|||
{ |
|||
public class ExportOrderSkuViewModel : BaseVM, IDenpendency |
|||
{ |
|||
private DateTime startDate; |
|||
private DateTime endDate; |
|||
|
|||
private GlobalContext globalContext; |
|||
private KVModel selectedPlatform; |
|||
private int pageIndex; |
|||
private int pageSize; |
|||
private long totalCount; |
|||
private bool isLoading; |
|||
private bool isShowAll_Shop; |
|||
private bool isShowAll_Department; |
|||
|
|||
private OrderService orderService; |
|||
|
|||
public IList<Department> DepartmentList { get; set; } |
|||
|
|||
public IList<Shop> ShopList { get; set; } |
|||
|
|||
public IList<KVModel> PlatformList { get; set; } |
|||
|
|||
public IList<ExportOrderSkuResponse> ExportSkuList { get; set; } |
|||
|
|||
public DateTime StartDate { get => startDate; set { Set(ref startDate, value); } } |
|||
public DateTime EndDate { get => endDate; set { Set(ref endDate, value); } } |
|||
|
|||
public KVModel SelectedPlatform { get => selectedPlatform; set { Set(ref selectedPlatform, value); } } |
|||
|
|||
public ICommand SearchCommand { get; set; } |
|||
|
|||
public ICommand ExportCommand { get; set; } |
|||
|
|||
public ICommand OrderPageIndexChangedCommand { get; set; } |
|||
|
|||
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
|||
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
|||
|
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
public long TotalCount { get => totalCount; set { Set(ref totalCount, value); } } |
|||
|
|||
public bool IsShowAll_Shop { get => isShowAll_Shop; set { Set(ref isShowAll_Shop, value); } } |
|||
|
|||
public bool IsShowAll_Department { get => isShowAll_Department; set { Set(ref isShowAll_Department, value); } } |
|||
|
|||
public ExportOrderSkuViewModel(GlobalContext globalContext, OrderService orderService) |
|||
{ |
|||
this.orderService = orderService; |
|||
|
|||
DepartmentList = new ObservableCollection<Department>(); |
|||
ShopList = new ObservableCollection<Shop>(); |
|||
PlatformList = new ObservableCollection<KVModel>(); |
|||
ExportSkuList = new ObservableCollection<ExportOrderSkuResponse>(); |
|||
SearchCommand = new RelayCommand(Search); |
|||
ExportCommand = new RelayCommand(Export); |
|||
OrderPageIndexChangedCommand = new RelayCommand<PageArgs>(p => |
|||
{ |
|||
//this.PageIndex = p.PageIndex;
|
|||
Task.Factory.StartNew(() => SearchCore(p.PageIndex)); |
|||
}); |
|||
|
|||
var platformEnumValues = Enum.GetValues(typeof(Platform)); |
|||
foreach (var ev in platformEnumValues) |
|||
{ |
|||
var p = (Platform)ev; |
|||
PlatformList.Add(new KVModel() |
|||
{ |
|||
Key = p.ToString(), |
|||
Value = ((int)p).ToString() |
|||
}); |
|||
} |
|||
IsShowAll_Department = IsShowAll_Shop = true; |
|||
this.globalContext = globalContext; |
|||
LoadDepartment(); |
|||
StartDate = DateTime.Now.Date; |
|||
EndDate = DateTime.Now.Date; |
|||
PageIndex = 1; |
|||
PageSize = 20; |
|||
} |
|||
|
|||
private void LoadDepartment() |
|||
{ |
|||
var dlist = JsonConvert.DeserializeObject<IList<Department>>(JsonConvert.SerializeObject(globalContext.User.DepartmentList)); |
|||
foreach (var d in dlist) |
|||
{ |
|||
d.IsSelected = false; |
|||
DepartmentList.Add(d); |
|||
d.OnIsSelectedChanged = OnDeparmentSelectionChanged; |
|||
} |
|||
ShopList.Clear(); |
|||
} |
|||
|
|||
private void OnDeparmentSelectionChanged() |
|||
{ |
|||
ShopList.Clear(); |
|||
foreach (var d in DepartmentList) |
|||
{ |
|||
if (!d.IsSelected) |
|||
continue; |
|||
foreach (var s in d.ShopList) |
|||
{ |
|||
s.OnIsSelectedChanged = OnShopSelectionChanged; |
|||
s.IsSelected = false; |
|||
ShopList.Add(s); |
|||
} |
|||
} |
|||
IsShowAll_Department = !DepartmentList.Any(d => d.IsSelected); |
|||
} |
|||
|
|||
private void OnShopSelectionChanged() |
|||
{ |
|||
IsShowAll_Shop = !ShopList.Any(s => s.IsSelected); |
|||
} |
|||
|
|||
private void Search() |
|||
{ |
|||
PageIndex = 1; |
|||
Task.Factory.StartNew(() => SearchCore(PageIndex)); |
|||
} |
|||
|
|||
private void SearchCore(int pageIndex) |
|||
{ |
|||
IsLoading = true; |
|||
int? purchasePlatform = null; |
|||
if (SelectedPlatform != null) |
|||
purchasePlatform = int.Parse(SelectedPlatform.Value); |
|||
List<long> shopIds = new List<long>(); |
|||
if (ShopList.Count() > 0) |
|||
{ |
|||
if (ShopList.Any(s => s.IsSelected)) |
|||
shopIds.AddRange(ShopList.Where(s => s.IsSelected).Select(s => s.ShopId)); |
|||
else |
|||
shopIds.AddRange(ShopList.Select(s => s.ShopId)); |
|||
} |
|||
var response = orderService.QueryOrderSkuList(StartDate, |
|||
EndDate, |
|||
purchasePlatform, |
|||
shopIds, |
|||
pageIndex, |
|||
PageSize); |
|||
IsLoading = false; |
|||
TotalCount = 0; |
|||
if (!response.Success) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "提示")); |
|||
return; |
|||
} |
|||
TotalCount = response.Data.Count; |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
ExportSkuList.Clear(); |
|||
foreach (var item in response.Data.ItemList) |
|||
ExportSkuList.Add(item); |
|||
}); |
|||
|
|||
} |
|||
|
|||
private void Export() |
|||
{ |
|||
var sfd = new SaveFileDialog() { Filter = "csv files(*.csv)|*.csv" }; |
|||
if (sfd.ShowDialog() != true) |
|||
return; |
|||
|
|||
var ssaveFileName = sfd.FileName; |
|||
|
|||
int? purchasePlatform = null; |
|||
if (SelectedPlatform != null) |
|||
purchasePlatform = int.Parse(SelectedPlatform.Value); |
|||
IsLoading = true; |
|||
Task.Factory.StartNew(() => orderService.ExportOrderSkuList(StartDate, |
|||
EndDate, |
|||
purchasePlatform, |
|||
ShopList.Where(s => s.IsSelected).Select(s => s.ShopId).ToList())).ContinueWith(t => |
|||
{ |
|||
var response = t.Result; |
|||
|
|||
if (!response.Success) |
|||
{ |
|||
IsLoading = false; |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "提示")); |
|||
return; |
|||
} |
|||
|
|||
try |
|||
{ |
|||
var list = response.Data.Select(x => x.ToString()).ToList(); |
|||
list.Insert(0, "开始时间,店铺名称,订单Id,订单状态,SPU,SKU,仓储类型,采购成本(货款+运费),平台优惠,商家优惠,单价,数量,商品标题"); |
|||
System.IO.File.WriteAllLines(ssaveFileName, list, Encoding.UTF8); |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show("导出完成", "导出")); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "导出")); |
|||
return; |
|||
} |
|||
finally |
|||
{ |
|||
IsLoading = false; |
|||
} |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.ViewModels.PackTask |
|||
{ |
|||
public class StorePickSelfViewModel:BaseVM,IDenpendency |
|||
{ |
|||
} |
|||
} |
@ -0,0 +1,207 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Common.Models; |
|||
using BBWY.Controls; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using Microsoft.Win32; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
using System.Windows; |
|||
using System.Linq; |
|||
using AutoMapper.Internal; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.ViewModels.TotalPackTask |
|||
{ |
|||
|
|||
public class ShopPackTaskTotalViewModel : BaseVM, IDenpendency |
|||
{ |
|||
private readonly PackTaskService packTaskService; |
|||
private bool isLoading; |
|||
private DateTime startDate; |
|||
private DateTime endDate; |
|||
private int pageIndex = 1; |
|||
private int pageSize = 15; |
|||
private int orderCount; |
|||
private string searchTaskId; |
|||
|
|||
private string searchSkuId; |
|||
private ObservableCollection<ShopTotal> packTaskTotalList; |
|||
|
|||
public ObservableCollection<ShopTotal> PackTaskTotalList { get => packTaskTotalList; set { Set(ref packTaskTotalList, value); } } |
|||
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } } |
|||
|
|||
public string SearchTaskId { get => searchTaskId; set { Set(ref searchTaskId, value); } } |
|||
|
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
|
|||
public DateTime StartDate { get => startDate; set { Set(ref startDate, value); } } |
|||
|
|||
public DateTime EndDate { get => endDate; set { Set(ref endDate, value); } } |
|||
|
|||
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
|||
|
|||
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
|||
|
|||
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } } |
|||
|
|||
private decimal totalPackDiscountFees; |
|||
/// <summary>
|
|||
/// 总打包费用
|
|||
/// </summary>
|
|||
public decimal TotalPackDiscountFees { get => totalPackDiscountFees; set { Set(ref totalPackDiscountFees, value); } } |
|||
|
|||
private decimal totalConsumableFees; |
|||
/// <summary>
|
|||
/// 总耗材费
|
|||
/// </summary>
|
|||
public decimal TotalConsumableFees { get => totalConsumableFees; set { Set(ref totalConsumableFees, value); } } |
|||
|
|||
private decimal totalFees; |
|||
/// <summary>
|
|||
/// 总耗材费
|
|||
/// </summary>
|
|||
public decimal TotalFees { get => totalFees; set { Set(ref totalFees, value); } } |
|||
|
|||
|
|||
public ICommand SetSearchDateCommand { get; set; } |
|||
|
|||
public ICommand SearchTaskTotalCommand { get; set; } |
|||
|
|||
public ICommand ExportCommand { get; set; } |
|||
|
|||
public ICommand OrderPageIndexChangedCommand { get; set; } |
|||
|
|||
|
|||
|
|||
//public IList<Department> departmentList;
|
|||
//ShopService shopService;
|
|||
public ShopPackTaskTotalViewModel(PackTaskService packTaskService, GlobalContext globalContext) |
|||
{ |
|||
this.packTaskService = packTaskService; |
|||
SearchTaskTotalCommand = new RelayCommand(() => |
|||
{ |
|||
SearchTask(1); |
|||
}); |
|||
|
|||
StartDate = DateTime.Now; |
|||
EndDate = DateTime.Now; |
|||
|
|||
SetSearchDateCommand = new RelayCommand<int>(d => |
|||
{ |
|||
EndDate = d == 1 ? DateTime.Now.Date.AddDays(-1) : DateTime.Now; |
|||
StartDate = DateTime.Now.Date.AddDays(d * -1); |
|||
PageIndex = 1; |
|||
Task.Factory.StartNew(() => LoadOrder(1)); //点击日期查询订单
|
|||
}); |
|||
|
|||
OrderPageIndexChangedCommand = new RelayCommand<PageArgs>(p => |
|||
{ |
|||
LoadOrder(p.PageIndex); |
|||
}); |
|||
|
|||
ExportCommand = new RelayCommand(Export); |
|||
|
|||
SearchTaskTotal(); |
|||
this.globalContext = globalContext; |
|||
} |
|||
|
|||
|
|||
GlobalContext globalContext; |
|||
private void Export() |
|||
{ |
|||
|
|||
SaveFileDialog save = new SaveFileDialog(); |
|||
save.Filter = "csv files(*.csv)|*.csv"; |
|||
var result = save.ShowDialog(); |
|||
if (result == null || !result.Value) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
string fileName = save.FileName; |
|||
|
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
IsLoading = true; |
|||
var res = packTaskService.ShopTotalV2(SearchSkuId, SearchTaskId, globalContext.User.Shop.ShopId.ToString(), StartDate, EndDate, null, |
|||
null, 0, 0);//获取全部数据
|
|||
if (res.Success) |
|||
{ |
|||
//string title = "任务ID,日期,是否结清,部门,店铺,对接人,sku名称,sku数量,增值服务,打包服务,耗材服务,原价,促销折扣,结算价格,对接备注";
|
|||
string title = "任务ID,日期,是否结清,所属部门,所属店铺,包装数量,收货数量,耗材总价,工序类型,工序套餐,工序单价,包装原价,包装折扣系数,包装折扣价,总收费"; |
|||
var excelList = res.Data.ShopTotals.Select(x => x.ToString()).ToList(); |
|||
excelList.Insert(0, title); |
|||
System.IO.File.WriteAllLines(fileName, excelList, Encoding.UTF8); |
|||
} |
|||
IsLoading = false; |
|||
|
|||
}); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
private void SearchTaskTotal() |
|||
{ |
|||
|
|||
PackTaskTotalList = new ObservableCollection<ShopTotal>(); |
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
IsLoading = true; |
|||
var res = packTaskService.ShopTotalV2(SearchSkuId, SearchTaskId, globalContext.User.Shop.ShopId.ToString(), StartDate, EndDate, null, |
|||
null, PageIndex, PageSize); |
|||
if (res != null && res.Success) |
|||
{ |
|||
OrderCount = res.Data.TotalCount; |
|||
TotalConsumableFees = res.Data.TotalConsumableFees; |
|||
TotalPackDiscountFees = res.Data.TotalPackDiscountFees; |
|||
TotalFees = TotalConsumableFees + TotalPackDiscountFees; |
|||
foreach (var shopTotal in res.Data.ShopTotals) |
|||
{ |
|||
if (!shopTotal.ProcessComboName.IsNullOrEmpty()) |
|||
shopTotal.FeesItemResponse = new Models.APIModel.Response.PackTask.FeesItemResponse |
|||
{ |
|||
AllFees = shopTotal.AllFees.Value, |
|||
PackFees = shopTotal.PackDisCountFees.Value, |
|||
TaskId = shopTotal.TaskId, |
|||
ProcessTypeName = shopTotal.ProcessTypeName, |
|||
ProcessComboName = shopTotal.ProcessComboName, |
|||
ConsumableFees = shopTotal.ConsumableFees, |
|||
ConsumableList = shopTotal.ConsumableList, |
|||
ProcessComboPrice = shopTotal.ProcessComboPrice, |
|||
ProcessComboTaskCount = shopTotal.ProcessComboTaskCount, |
|||
DiscountFoctor = shopTotal.DiscountFactor |
|||
}; |
|||
|
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
PackTaskTotalList.Add(shopTotal); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
IsLoading = false; |
|||
}); |
|||
|
|||
|
|||
} |
|||
|
|||
private void LoadOrder(int pageIndex) |
|||
{ |
|||
SearchTask(pageIndex); |
|||
} |
|||
|
|||
private void SearchTask(int pageIndex) |
|||
{ |
|||
PageIndex = pageIndex; |
|||
SearchTaskTotal(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,178 @@ |
|||
<Page x:Class="BBWY.Client.Views.Order.ExportOrderSkuView" |
|||
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:hc="https://handyorg.github.io/handycontrol" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.Order" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="769" d:DesignWidth="1024" |
|||
DataContext="{Binding ExportOrderSkuVM,Source={StaticResource Locator}}" |
|||
Title="ExportOrderSkuView" |
|||
xmlns:converter="clr-namespace:HandyControl.Tools.Converter;assembly=HandyControl" |
|||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl" |
|||
xmlns:ex="clr-namespace:HandyControl.Tools.Extension;assembly=HandyControl" |
|||
xmlns:langs="clr-namespace:HandyControl.Properties.Langs;assembly=HandyControl"> |
|||
<Page.Resources> |
|||
|
|||
</Page.Resources> |
|||
<Grid> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
<Grid Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition /> |
|||
<RowDefinition Height="5"/> |
|||
<RowDefinition Height="30"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Background="{StaticResource Border.Background}"> |
|||
<Grid.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
</ResourceDictionary> |
|||
</Grid.Resources> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0"> |
|||
<Grid> |
|||
<hc:CheckComboBox IsTextSearchEnabled="True" ItemsSource="{Binding DepartmentList}" |
|||
ShowClearButton="True" |
|||
MinWidth="150" |
|||
Height="30"> |
|||
<hc:CheckComboBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Orientation="Horizontal" Margin="5,2.5"> |
|||
<CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</hc:CheckComboBox.ItemTemplate> |
|||
<hc:CheckComboBox.ItemContainerStyle> |
|||
<Style TargetType="{x:Type hc:CheckComboBoxItem}" BasedOn="{StaticResource NoBgListBoxItemStyle}"> |
|||
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</Style> |
|||
</hc:CheckComboBox.ItemContainerStyle> |
|||
</hc:CheckComboBox> |
|||
<TextBlock Text="全部" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" |
|||
Visibility="{Binding IsShowAll_Department,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"/> |
|||
</Grid> |
|||
|
|||
<Grid> |
|||
<hc:CheckComboBox IsTextSearchEnabled="True" ItemsSource="{Binding ShopList}" |
|||
ShowClearButton="True" |
|||
MinWidth="150" |
|||
Margin="5,0,0,0"> |
|||
<hc:CheckComboBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Orientation="Horizontal" Margin="5,2.5"> |
|||
<CheckBox Content="{Binding ShopName}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</hc:CheckComboBox.ItemTemplate> |
|||
<hc:CheckComboBox.ItemContainerStyle> |
|||
<Style TargetType="{x:Type hc:CheckComboBoxItem}" BasedOn="{StaticResource NoBgListBoxItemStyle}"> |
|||
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</Style> |
|||
</hc:CheckComboBox.ItemContainerStyle> |
|||
</hc:CheckComboBox> |
|||
<TextBlock Text="全部" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" |
|||
Visibility="{Binding IsShowAll_Shop,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"/> |
|||
</Grid> |
|||
|
|||
<!--<hc:CheckComboBox IsTextSearchEnabled="True" ItemsSource="{Binding PlatformList}" |
|||
ShowClearButton="True" |
|||
MinWidth="150" |
|||
Margin="5,0,0,0" |
|||
SelectionMode="Single" |
|||
SelectedItem="{Binding SelectedPlatform,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
DisplayMemberPath="Key"> |
|||
</hc:CheckComboBox>--> |
|||
|
|||
<DatePicker Height="30" Margin="5,0,0,0" SelectedDate="{Binding StartDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<DatePicker Height="30" Margin="5,0,0,0" SelectedDate="{Binding EndDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
|
|||
<c:BButton Content="查询" Margin="5,0,0,0" Width="80" Command="{Binding SearchCommand}"/> |
|||
<c:BButton Content="导出" Width="80" Margin="5,0,0,0" Command="{Binding ExportCommand}" Background="#02A7F0"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<DataGrid Grid.Row="2" |
|||
ItemsSource="{Binding ExportSkuList}" |
|||
BorderThickness="1,1,0,0" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
VirtualizingPanel.IsVirtualizing="True"> |
|||
<DataGrid.Columns> |
|||
<DataGridTextColumn Binding="{Binding StartTime,StringFormat=yyyy-MM-dd HH:mm:ss}" Header="订单日期" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="140"/> |
|||
<DataGridTextColumn Binding="{Binding ShopName}" Header="店铺名称" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="150"/> |
|||
<DataGridTextColumn Binding="{Binding OrderId}" Header="订单号" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="110"/> |
|||
<DataGridTextColumn Binding="{Binding OrderState,Mode=OneWay}" Header="订单状态" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="70"/> |
|||
<DataGridTextColumn Binding="{Binding Spu}" Header="SPU" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="120"/> |
|||
<DataGridTextColumn Binding="{Binding Sku}" Header="SKU" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="120"/> |
|||
<DataGridTextColumn Binding="{Binding StorageType}" Header="仓储类型" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="80"/> |
|||
<DataGridTextColumn Binding="{Binding PurchaseAmount,Mode=OneWay}" Header="采购成本" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="60"/> |
|||
<DataGridTextColumn Binding="{Binding PreferentialAmount,Mode=OneWay}" Header="平台优惠" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="60"/> |
|||
<DataGridTextColumn Binding="{Binding SellerPreferentialAmount,Mode=OneWay}" Header="商家优惠" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="60"/> |
|||
<DataGridTextColumn Binding="{Binding SkuPrice}" Header="单价" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="80"/> |
|||
<DataGridTextColumn Binding="{Binding ItemTotal}" Header="数量" |
|||
ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="50"/> |
|||
<DataGridTextColumn Binding="{Binding SpuName}" Header="商品标题" ElementStyle="{StaticResource middleTextBlock}" |
|||
HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|||
Width="*"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
|
|||
<c:PageControl PageIndex="{Binding PageIndex}" |
|||
PageSize="{Binding PageSize}" |
|||
RecordCount="{Binding TotalCount}" |
|||
Grid.Row="4" |
|||
HorizontalAlignment="Left"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="OnPageIndexChanged"> |
|||
<b:InvokeCommandAction Command="{Binding OrderPageIndexChangedCommand}" PassEventArgsToCommand="True"/> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:PageControl> |
|||
</Grid> |
|||
</Grid> |
|||
</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.Order |
|||
{ |
|||
/// <summary>
|
|||
/// ExportOrderSkuView.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ExportOrderSkuView : Page |
|||
{ |
|||
public ExportOrderSkuView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,101 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.AddProductWindow" |
|||
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" |
|||
|
|||
mc:Ignorable="d" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Width="450" Height="400" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" ResizeMode="NoResize" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
|
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加商品" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1" Margin="20 20 20 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid > |
|||
<c:BTextBox Height="35" Text="{Binding SkuId}" WaterRemark="请输入SKU" HorizontalAlignment="Stretch" /> |
|||
<c:BButton Height="35" Content="查询" HorizontalAlignment="Right" Width="120" Click="BButton_Click_1"/> |
|||
</Grid> |
|||
<Grid Grid.Row="1" |
|||
Visibility="{Binding Logo,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="150"/> |
|||
<ColumnDefinition/> |
|||
|
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage Height="150" Width="150" UrlSource="{Binding Logo}" |
|||
|
|||
/> |
|||
<UniformGrid Grid.Column="1" Rows="3" Height="150" Margin="20 0 0 0" > |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="名称:" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuTitle}" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"/> |
|||
</Grid> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="数量:" Style="{StaticResource middleTextBlock}"/> |
|||
<c:BTextBox WaterRemark="数量" Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" HorizontalAlignment="Stretch" /> |
|||
</Grid> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="仓库:" Style="{StaticResource middleTextBlock}"/> |
|||
<Grid Grid.Column="1" Height="30"> |
|||
<Rectangle Height="30" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<ComboBox Height="30" ItemsSource="{Binding PositionTypes}" Text="{Binding PositionType}" BorderThickness="0" Margin="1" > |
|||
<ComboBox.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> |
|||
</ComboBox.Resources> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
</UniformGrid> |
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
|
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/> |
|||
<c:BButton Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,98 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// AddProductWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class AddProductWindow : BWindow |
|||
{ |
|||
public AddProductWindow(PackTaskService packTaskService, ProductService productService, Action ReflashTask) |
|||
{ |
|||
this.packTaskService = packTaskService; |
|||
this.productService = productService; |
|||
this.ReflashTask = ReflashTask; |
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
} |
|||
ProductService productService; |
|||
PackTaskService packTaskService; |
|||
Action ReflashTask; |
|||
private int count; |
|||
public int Count { get => count; set { Set(ref count, value); } } |
|||
|
|||
private string skuId; |
|||
public string SkuId { get => skuId; set { Set(ref skuId, value); } } |
|||
|
|||
private string logo; |
|||
public string Logo { get => logo; set { Set(ref logo, value); } } |
|||
|
|||
private string skuTitle; |
|||
public string SkuTitle { get => skuTitle; set { Set(ref skuTitle, value); } } |
|||
|
|||
|
|||
public ObservableCollection<PositionType> PositionTypes { get; set; } = new ObservableCollection<PositionType>() { |
|||
PositionType.商家仓, PositionType.云仓, PositionType.京仓, PositionType.聚水潭 |
|||
}; |
|||
|
|||
private PositionType positionType; |
|||
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (Count <= 0) |
|||
{ |
|||
MessageBox.Show("请输入任务数"); return; |
|||
} |
|||
var res = packTaskService.AddSealBoxProduct(SkuId, PositionType, Count); |
|||
|
|||
if (res == null || !res.Success) |
|||
{ |
|||
MessageBox.Show(res?.Msg); return; |
|||
} |
|||
|
|||
this.Close(); |
|||
if (ReflashTask != null) |
|||
ReflashTask(); |
|||
} |
|||
|
|||
private void BButton_Click_1(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (SkuId.IsNullOrEmpty()) |
|||
{ |
|||
MessageBox.Show("请输入SkuId"); return; |
|||
} |
|||
SkuId = SkuId.Trim(); |
|||
var res = productService.GetProductSkuList(null, SkuId); |
|||
if (res == null || !res.Success) |
|||
{ |
|||
MessageBox.Show(res?.Msg); return; |
|||
} |
|||
var productSku = res.Data.SingleOrDefault(d => d.Id == SkuId); |
|||
|
|||
if (productSku == null) |
|||
{ |
|||
MessageBox.Show("不存在对应的sku商品数据."); return; |
|||
} |
|||
SkuTitle = productSku.Title; |
|||
Logo = productSku.Logo.Replace("80x80", "150x150"); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.AddWareListWindow" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Width="384" Height="510" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加仓库" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1"> |
|||
<ListBox Name="list_ware" Margin="50 20" |
|||
ItemsSource="{Binding WareList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,1" |
|||
Foreground="{StaticResource Text.Color}" |
|||
> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_ware,Converter={StaticResource widthConverter},ConverterParameter=-0}" Height="35"> |
|||
<CheckBox Content="{Binding WareName}" IsEnabled="{Binding IsEdit}" IsChecked="{Binding IsSelect}" FontSize="14" Margin="5 0 0 0"/> |
|||
<Border Height="1" Background="{StaticResource Border.Brush}" VerticalAlignment="Bottom"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
|
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
|
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/> |
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,163 @@ |
|||
using AutoMapper.Internal; |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.SealBox; |
|||
using BBWY.Controls; |
|||
using Org.BouncyCastle.Utilities.Collections; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// AddWareListWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class AddWareListWindow : BWindow |
|||
{ |
|||
public AddWareListWindow(WareType WareType, LogisticsService logisticsService, List<SealBoxConfigureModel> SealBoxConfigureModelList) |
|||
{ |
|||
this.WareType = WareType; |
|||
InitializeComponent(); |
|||
LoadWare(logisticsService, SealBoxConfigureModelList); |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
private WareType wareType; |
|||
public WareType WareType { get => wareType; set { Set(ref wareType, value); } } |
|||
|
|||
|
|||
|
|||
public void LoadWare(LogisticsService logisticsService, List<SealBoxConfigureModel> SealBoxConfigureModelList) |
|||
{ |
|||
if (WareType != WareType.聚水潭) |
|||
{ |
|||
var response = logisticsService.GetStoreList();//京仓库类型 商家仓 = 1, 京仓 = 2, 云仓 = 3
|
|||
if (response == null || !response.Success) |
|||
{ |
|||
MessageBox.Show($"加载仓库列表失败,{response?.Msg}"); |
|||
return; |
|||
} |
|||
|
|||
var data = response.Data.Where(w => w.Status == StockStatus.使用); |
|||
var stockType = StockType.云仓; |
|||
switch (WareType) |
|||
{ |
|||
case WareType.京仓: |
|||
stockType = StockType.京仓; |
|||
break; |
|||
case WareType.云仓: |
|||
stockType = StockType.云仓; |
|||
|
|||
break; |
|||
case WareType.商家仓: |
|||
stockType = StockType.商家仓; |
|||
break; |
|||
//case WareType.聚水潭:
|
|||
// WareList = new List<StoreWare> { new StoreWare { WareId = "qiyuejushuitan", WareName = "齐越聚水潭", IsSelect = false } };
|
|||
// break;
|
|||
//default:
|
|||
// break;
|
|||
} |
|||
WareList = new List<StoreWare>(); |
|||
data.Where(d => d.Type == stockType).ForAll(d => |
|||
{ |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType &&s.WareHourseDatas!=null).SelectMany(s => s.WareHourseDatas).Any(w => w.WareId == d.Id))//存在
|
|||
{ |
|||
bool isedit = true; |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType && s.WareHourseDatas != null).SelectMany(s => s.WareHourseDatas).Any(s=>s.WareState>0&& s.WareId == d.Id)) |
|||
isedit =false; |
|||
WareList.Add(new StoreWare |
|||
{ |
|||
IsSelect = true, |
|||
WareId = d.Id, |
|||
WareName = d.Name, |
|||
IsEdit= isedit |
|||
}); |
|||
} |
|||
else |
|||
{ |
|||
WareList.Add(new StoreWare |
|||
{ |
|||
IsSelect = false, |
|||
WareId = d.Id, |
|||
WareName = d.Name, |
|||
IsEdit = true |
|||
}); |
|||
} |
|||
|
|||
|
|||
}); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
bool isJST = false; |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType).SelectMany(s => s.WareHourseDatas).Any(w => w.WareId == "qiyuejushuitan"))//存在
|
|||
isJST = true; |
|||
WareList = new List<StoreWare> { new StoreWare { WareId = "qiyuejushuitan", WareName = "齐越聚水潭", IsSelect = isJST } }; |
|||
} |
|||
|
|||
} |
|||
private List<StoreWare> wareList; |
|||
public List<StoreWare> WareList { get => wareList; set { Set(ref wareList, value); } } |
|||
|
|||
|
|||
public Action<WareType, List<StoreWare>> AddWareList { get; set; } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
var selectWare = WareList.Where(w => w.IsSelect).ToList(); |
|||
if (AddWareList != null) AddWareList(WareType, selectWare); |
|||
this.Close(); |
|||
} |
|||
private PositionType ToPositionType(WareType wareType) |
|||
{ |
|||
switch (wareType) |
|||
{ |
|||
case WareType.京仓: |
|||
return PositionType.京仓; |
|||
break; |
|||
case WareType.云仓: |
|||
return PositionType.云仓; |
|||
break; |
|||
case WareType.商家仓: |
|||
return PositionType.商家仓; |
|||
break; |
|||
case WareType.聚水潭: |
|||
return PositionType.聚水潭; |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
return PositionType.聚水潭; |
|||
} |
|||
} |
|||
|
|||
public class StoreWare : NotifyObject |
|||
{ |
|||
private bool isSelect; |
|||
public bool IsSelect { get => isSelect; set { Set(ref isSelect, value); } } |
|||
|
|||
private string wareName; |
|||
public string WareName { get => wareName; set { Set(ref wareName, value); } } |
|||
|
|||
private string wareId; |
|||
public string WareId { get => wareId; set { Set(ref wareId, value); } } |
|||
|
|||
|
|||
private bool isEdit=true; |
|||
public bool IsEdit { get => isEdit; set { Set(ref isEdit, value); } } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.SealBox.SetSealBoxPolicyWareListControl" |
|||
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.SealBox" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800"> |
|||
<Grid> |
|||
|
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SetSealBoxPolicyWareListControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetSealBoxPolicyWareListControl : UserControl |
|||
{ |
|||
public SetSealBoxPolicyWareListControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,782 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SetSealBoxPolicyWindow" |
|||
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:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
mc:Ignorable="d" |
|||
DataContext="{Binding SealBoxConfigureVModel,Source={StaticResource Locator}}" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
Height="800" Width="1000" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Style="{StaticResource bwstyle}" |
|||
|
|||
> |
|||
<c:BWindow.Resources> |
|||
<Style TargetType="RadioButton"> |
|||
|
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="White" HorizontalAlignment="Center" Height="35" Stroke="{StaticResource Border.Brush}" VerticalAlignment="Center" Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="35"> |
|||
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Tag}" Foreground="{StaticResource Text.Pink}" Margin="5 0 0 0" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</c:BWindow.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="配置封箱策略" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<StackPanel Orientation="Horizontal" Height="35" Grid.Row="1" > |
|||
<RadioButton Content="京仓" Tag="{Binding JDWareTaskCount,Mode=TwoWay}" Width="116" Margin="20 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=京仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="云仓" Tag="{Binding CloudWareTaskCount,Mode=TwoWay}" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=云仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="聚水潭" Tag="{Binding JSTWareTaskCount,Mode=TwoWay}" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=聚水潭:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="商家仓" Tag="{Binding StoreWareTaskCount,Mode=TwoWay}" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=商家仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Orientation="Horizontal" Grid.Row="2" Height="30"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="SKU:" Margin="20 00 0 0"/> |
|||
<c:BTextBox Width="170" Margin="5 0 5 0" Text="{Binding SearchSkuId}"/> |
|||
<c:BButton Width="66" Content="搜索" Command="{Binding SearchSkuCommand}" |
|||
|
|||
/> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
<Grid Grid.Row="3" Margin="20 10 20 0" > |
|||
|
|||
<ListBox Name="jd_list" ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ScrollViewer.HorizontalScrollBarVisibility="Auto"> |
|||
<Grid Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=京仓:Visible:Collapsed}" |
|||
Width="{Binding Width,ElementName=jd_list,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
|||
|
|||
> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<Grid Grid.Column="2"> |
|||
|
|||
</Grid> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding JdWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Visible" |
|||
Visibility="{Binding JdWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="32"> |
|||
<TextBlock Text="{Binding WareName,Mode=TwoWay}" Style="{StaticResource middleTextBlock}"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_jddata" |
|||
ItemsSource="{Binding JdConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate > |
|||
<Grid Width="{Binding Width,ElementName=list_sealbox_jddata,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" Name="list_ware_data" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="68"> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" BorderBrush="{StaticResource Border.Brush}" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
</TextBox> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
</ListBox> |
|||
|
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=云仓:Visible:Collapsed}" |
|||
> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
|
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding CloudWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding CloudWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
|
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="220" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="80"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX设置" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_data_cloud" |
|||
ItemsSource="{Binding CloudConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_cloud,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" Name="list_ware_data" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="220" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" BorderBrush="{StaticResource Border.Brush}" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
</TextBox> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=聚水潭:Visible:Collapsed}" |
|||
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
|
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding JstWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding JstWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="80"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX设置" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_data_jst" |
|||
ItemsSource="{Binding JstConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate > |
|||
<DataTemplate > |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_jst,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" BorderBrush="{StaticResource Border.Brush}" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
</TextBox> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=商家仓:Visible:Collapsed}" |
|||
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
|
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding StoreWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding StoreWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="80"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX设置" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Name="list_sealbox_data_store" |
|||
Grid.Row="1" |
|||
ItemsSource="{Binding StoreConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
|
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_store,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" BorderBrush="{StaticResource Border.Brush}" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
</TextBox> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="3" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
<c:BButton Content="{Binding SealBoxId,Converter={StaticResource objConverter},ConverterParameter=0:提交任务:保存}" Width="80" HorizontalAlignment="Right" Grid.Row="4" |
|||
Command="{Binding SaveCommand}" Margin="0,0,5,0" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,197 @@ |
|||
using BBWY.Client.Models.SealBox; |
|||
using BBWY.Client.ViewModels.SealBox; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Collections.ObjectModel; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
using AutoMapper.Internal; |
|||
using BBWY.Client.APIServices; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SetSealBoxPolicyWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetSealBoxPolicyWindow : BWindow |
|||
{ |
|||
public SetSealBoxPolicyWindow(IList<SealBoxConfigureModel> sealBoxWaitConfigureModels, Action ReflashWindow, long sealboxId = 0) |
|||
{ |
|||
InitializeComponent(); |
|||
var sealBoxConfigureVM = this.DataContext as SealBoxConfigureViewModel; |
|||
sealBoxConfigureVM.SealBoxConfigureModelList = sealBoxWaitConfigureModels.ToList(); |
|||
sealBoxConfigureVM.JdConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.CloudConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.JstConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.StoreConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.SealBoxId = sealboxId; |
|||
sealBoxConfigureVM.ReflashWindow = ReflashWindow; |
|||
LoadData(sealBoxWaitConfigureModels, sealboxId, sealBoxConfigureVM); |
|||
|
|||
sealBoxConfigureVM.LoadCount(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
/// <param name="sealBoxWaitConfigureModels"></param>
|
|||
/// <param name="sealboxId"></param>
|
|||
/// <param name="sealBoxConfigureVM"></param>
|
|||
private void LoadData(IList<SealBoxConfigureModel> sealBoxWaitConfigureModels, long sealboxId, SealBoxConfigureViewModel sealBoxConfigureVM) |
|||
{ |
|||
|
|||
|
|||
if (sealboxId == 0)//设置
|
|||
{ |
|||
sealBoxConfigureVM.JstWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = "齐越聚水潭",WareId="qiyuejushuitan" |
|||
} |
|||
}; |
|||
var storeListRes = sealBoxConfigureVM.logisticsService.GetStoreList(); |
|||
|
|||
if (storeListRes.Success) |
|||
{ |
|||
//加载商家仓 全国仓
|
|||
var storeList = storeListRes.Data.Where(s=>s.Status== Models.StockStatus.使用); |
|||
|
|||
var store = storeList.FirstOrDefault(s => s.Id == "0");//商家全国仓
|
|||
if (store != null) |
|||
{ |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = store.Name,WareId=store.Id |
|||
} |
|||
}; |
|||
} |
|||
|
|||
|
|||
//加载 泉州齐越云仓3号库
|
|||
var cloud = storeList.FirstOrDefault(s => s.Id == "800009450");//商家全国仓
|
|||
if (cloud != null) |
|||
{ |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = cloud.Name,WareId=cloud.Id |
|||
} |
|||
}; |
|||
} |
|||
} |
|||
|
|||
//sealBoxConfigureVM.CloudWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> {
|
|||
// new SealBoxConfigureWareHourseModel{
|
|||
// WareName = "泉州齐越云仓3号库",WareId="800009450"
|
|||
// }
|
|||
//};
|
|||
} |
|||
|
|||
|
|||
|
|||
foreach (var sealBoxWaitConfigureModel in sealBoxWaitConfigureModels) |
|||
{ |
|||
if (sealBoxWaitConfigureModel.WareHourseDatas != null && sealBoxWaitConfigureModel.WareHourseDatas.Count > 0)//修改数据
|
|||
{ |
|||
sealBoxWaitConfigureModel.WaitConfigureCount = 0; |
|||
sealBoxWaitConfigureModel.WareHourseDatas.ForAll(w => { w.TotalWareCount = sealBoxConfigureVM.TotalCount; w.TaskId = sealBoxWaitConfigureModel.TaskId; }); |
|||
} |
|||
else |
|||
{ |
|||
sealBoxWaitConfigureModel.WaitConfigureCount = sealBoxWaitConfigureModel.SkuCount; |
|||
} |
|||
|
|||
|
|||
switch (sealBoxWaitConfigureModel.WareType.Value) |
|||
{ |
|||
case Models.WareType.商家仓: |
|||
|
|||
if (sealboxId == 0) |
|||
{ |
|||
if (sealBoxConfigureVM.StoreWareHourseHeaderList != null && sealBoxConfigureVM.StoreWareHourseHeaderList.Count > 0) |
|||
{ |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList.ForAll(s => |
|||
{ |
|||
|
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = s.WareName, |
|||
WareId=s.WareId, |
|||
TaskId=sealBoxWaitConfigureModel.TaskId, |
|||
TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
|
|||
}); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
sealBoxConfigureVM.StoreConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.云仓: |
|||
if (sealboxId == 0) |
|||
{ |
|||
if (sealBoxConfigureVM.CloudWareHourseHeaderList != null && sealBoxConfigureVM.CloudWareHourseHeaderList.Count > 0) |
|||
{ |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList.ForAll(s => |
|||
{ |
|||
|
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = s.WareName, |
|||
WareId=s.WareId, |
|||
TaskId=sealBoxWaitConfigureModel.TaskId, |
|||
TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
|
|||
}); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
sealBoxConfigureVM.CloudConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.京仓: |
|||
sealBoxConfigureVM.JdConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.JdWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.聚水潭: |
|||
sealBoxConfigureVM.JstConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
if (sealboxId == 0) |
|||
{ |
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = "齐越聚水潭",WareId="qiyuejushuitan", TaskId=sealBoxWaitConfigureModel.TaskId, TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
} |
|||
|
|||
sealBoxConfigureVM.JstWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
|
|||
|
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SplitOtherWareWindow" |
|||
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:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Width="384" Height="254" ResizeMode="NoResize" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加落仓" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1" Margin="100 20 100 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Grid.Row="0" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="待分配量:"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitCount}"/> |
|||
</StackPanel> |
|||
<StackPanel Grid.Row="1" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="仓库:"/> |
|||
<Grid Margin="5" Height="30" Width="150" Grid.Column="1" Grid.ColumnSpan="3"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<ComboBox Height="30" Width="150" SelectedItem="{Binding SelectWareType}" ItemsSource="{Binding WareTypeList}" BorderThickness="0" Margin="1" BorderBrush="Black"> |
|||
<ComboBox.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> |
|||
</ComboBox.Resources> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Grid.Row="2" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="数量:"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" Margin="5 0 0 0" Height="30" BorderThickness="1"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BTextBox Height="30" Width="100" Text="{Binding Count}" BorderThickness="0 0 1 0"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" BorderThickness="0" Height="30" Width="50" Foreground="{StaticResource Border.Brush}" Click="BButton_Click_1"/> |
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/> |
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,64 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
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.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SplitOtherWareWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SplitOtherWareWindow : BWindow |
|||
{ |
|||
public SplitOtherWareWindow(int waitCount, WareType wareType, Action<int, WareType> SplitWare) |
|||
{ |
|||
this. SplitWare = SplitWare; |
|||
WaitCount = waitCount; |
|||
WareTypeList.Remove(wareType);//移除当前落仓
|
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
} |
|||
private Action<int, WareType> SplitWare { get;set;} |
|||
private int waitCount; |
|||
public int WaitCount { get => waitCount; set { Set(ref waitCount, value); } } |
|||
|
|||
private int count; |
|||
public int Count { get => count; set { Set(ref count, value); } } |
|||
|
|||
private WareType selectWareType; |
|||
public WareType SelectWareType { get => selectWareType; set { Set(ref selectWareType, value); } } |
|||
|
|||
|
|||
private ObservableCollection<WareType> wareTypeList=new ObservableCollection<WareType> { |
|||
WareType.京仓, WareType.云仓, WareType.商家仓, WareType.聚水潭 |
|||
}; |
|||
public ObservableCollection<WareType> WareTypeList { get => wareTypeList; set { Set(ref wareTypeList, value); } } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (WaitCount< Count) |
|||
{ |
|||
MessageBox.Show("可分配量不足!"); |
|||
return; |
|||
} |
|||
if (SplitWare != null) SplitWare(Count, SelectWareType); |
|||
|
|||
this.Close(); |
|||
} |
|||
|
|||
private void BButton_Click_1(object sender, RoutedEventArgs e) |
|||
{ |
|||
Count = WaitCount; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,347 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.StorePickSelf.ShopStorePickSelfControl" |
|||
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.StorePickSelf" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
DataContext="{Binding TaskList,Source={StaticResource Locator}}" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
mc:Ignorable="d" Background="White" |
|||
d:DesignHeight="450" d:DesignWidth="1500"> |
|||
<UserControl.Resources> |
|||
<ResourceDictionary> |
|||
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="cmodel:StorageType"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/> |
|||
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/> |
|||
<ctr:WaybillNoConverter x:Key="waybillConverter"/> |
|||
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/> |
|||
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/> |
|||
</ResourceDictionary> |
|||
|
|||
|
|||
</UserControl.Resources> |
|||
|
|||
<Grid> |
|||
<!--<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0" |
|||
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}" |
|||
> |
|||
<c:BTextBox x:Name="tb" Width="150" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称" |
|||
BorderThickness="1 0 0 1" Margin="0 0 0 1" Height="30" |
|||
/> |
|||
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"> |
|||
|
|||
</ListBox> |
|||
</StackPanel> |
|||
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0" |
|||
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}" |
|||
> |
|||
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称" |
|||
BorderThickness="1 0 0 1" Margin="0 0 0 1" |
|||
/> |
|||
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}"> |
|||
|
|||
</ListBox> |
|||
</StackPanel>--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="0"/> |
|||
<RowDefinition Height="45"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<!--<Grid Grid.Row="0" HorizontalAlignment="Stretch" Panel.ZIndex="999" Margin="0,5,0,0" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition Width="auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
--><!--<StackPanel Orientation="Horizontal" Height="30" > |
|||
<StackPanel.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
</ResourceDictionary> |
|||
</StackPanel.Resources> |
|||
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<ComboBox BorderThickness="0" Width="110" VerticalContentAlignment="Center" ItemsSource="{Binding SelectIdList}" HorizontalContentAlignment="Center" Text="{Binding SelectTaskId ,Mode=TwoWay}" /> |
|||
<UniformGrid Width="150" Rows="1" Columns="1"> |
|||
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="任务ID" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=任务ID:Visible:Collapsed}" |
|||
/> |
|||
<c:BTextBox Width="150" BorderThickness="1 0 0 0" WaterRemark="拳探订单号" Text="{Binding SearchOrderSn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
Visibility="{Binding SelectTaskId,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=拳探订单号:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</UniformGrid> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
|
|||
|
|||
|
|||
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectSkuList}" HorizontalContentAlignment="Center" Text="{Binding SelectSku ,Mode=TwoWay}" /> |
|||
|
|||
<UniformGrid Width="150" Rows="1" Columns="1"> |
|||
<c:BTextBox Width="150" WaterRemark="SKUID" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SKU:Visible:Collapsed}" |
|||
/> |
|||
<c:BTextBox Width="150" WaterRemark="SPUID" Text="{Binding SearchSpuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SPU:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</UniformGrid> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectShopList}" HorizontalContentAlignment="Center" Text="{Binding SelectShop ,Mode=TwoWay}" /> |
|||
|
|||
<UniformGrid Width="150" Rows="1" Columns="1"> |
|||
</UniformGrid> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
|
|||
--><!--<TextBlock Text="部门: " VerticalAlignment="Center" Margin="16,0,2,0"/> |
|||
<c:BTextBox Visibility="Hidden" Width="150" Height="30" ></c:BTextBox> |
|||
|
|||
<TextBlock x:Name="textblock_shop" Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/> |
|||
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" />--> |
|||
|
|||
|
|||
<!--<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectExpressList}" Text="{Binding SelectExpress }"/> |
|||
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1"> |
|||
<c:BTextBox Width="150" Text="{Binding SearchWayBillNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="精准搜索" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流单号:Visible:Collapsed}" |
|||
/> |
|||
<c:BTextBox Width="150" Text="{Binding SearchExpressName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectExpress,Converter={StaticResource objConverter},ConverterParameter=物流公司名称:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</UniformGrid> |
|||
</StackPanel> |
|||
</Border>--> |
|||
|
|||
<!--<Grid Grid.Column="1" Grid.Row="1" Margin="5,0,0,0" |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货:Visible:Collapsed}" |
|||
> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<StackPanel Orientation="Horizontal" Margin="1"> |
|||
<ComboBox Width="100" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectTitleList}" Text="{Binding SelectTitle }"/> |
|||
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1"> |
|||
<c:BTextBox Width="150" Text="{Binding SearchSkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=SKU名称:Visible:Collapsed}" |
|||
/> |
|||
<c:BTextBox Width="150" Text="{Binding SearchSpuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索" |
|||
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=标题:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</UniformGrid> |
|||
</StackPanel> |
|||
</Grid>--><!-- |
|||
|
|||
|
|||
<c:BButton Content="搜索" Width="94" Height="30" VerticalAlignment="Stretch" Margin="10,0,0,0" |
|||
Command="{Binding SearchTaskCommand}" |
|||
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
</StackPanel>--><!-- |
|||
|
|||
|
|||
|
|||
</Grid>--> |
|||
|
|||
<Border Height="1" Grid.Row="1" Margin="0 10 0 0" Background="{StaticResource Border.Brush}" VerticalAlignment="Top"/> |
|||
<Grid Grid.Row="1" Margin="0 10 0 0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition MinWidth="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
|
|||
|
|||
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>--> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
</Grid> |
|||
<!--ItemsSource="{Binding OrderList}"--> |
|||
<ListBox x:Name="listbox_order" |
|||
Grid.Row="2" |
|||
ItemsSource="{Binding StoreGetSelfDataList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
|||
MinHeight="100"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition MinHeight="90"/> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="#F2F2F2" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition MinWidth="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11"> |
|||
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" /> |
|||
<TextBlock Text="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm}" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" /> |
|||
<c:BButton Content="{Binding TaskId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding TaskId}" |
|||
Margin=" 5,0,7,0"/> |
|||
<!--<Label Width="90" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskState}" |
|||
Foreground="White" Background="{Binding TaskState,Converter={StaticResource enumToColorConverter} , ConverterParameter={x:Type cmodel:TaskState} }" Margin="25,0,0,0" |
|||
|
|||
/>--> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Text="部门:" Margin="14,0,0,0" /> |
|||
<c:BButton Content="{Binding DepartmentName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding DepartmentName}" |
|||
Margin=" 5,0,0,0"/> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Text="店铺:" Margin="14,0,0,0" /> |
|||
<c:BButton Content="{Binding ShopName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding ShopName}" |
|||
Margin=" 5,0,0,0"/> |
|||
<StackPanel Orientation="Horizontal" Visibility="{Binding OrderId, Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"> |
|||
<TextBlock VerticalAlignment="Center" Text="取货人:" Margin="16,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{Binding PickerUserName}" Margin="5,0,0,0" /> |
|||
|
|||
|
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition MinWidth="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage UrlSource="{Binding Logo}" |
|||
Width="80" DecodePixelWidth="80" |
|||
VerticalAlignment="Top" Margin="11,9,0,10" |
|||
Cursor="Hand"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="SkuId"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,12,0,10"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
Margin=" 5,0,0,11"/> |
|||
|
|||
</StackPanel> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding SkuName}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextWrapping="Wrap" Margin="0,11"> |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/> |
|||
<Grid Grid.Column="1" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock x:Name="txt_storeName" |
|||
Text="{Binding StoreGetCount}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<Border Grid.Row="1" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/> |
|||
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>--> |
|||
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>--> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
|
|||
</Grid> |
|||
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
</UserControl> |
@ -0,0 +1,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.StorePickSelf |
|||
{ |
|||
/// <summary>
|
|||
/// ShopStorePickSelfControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ShopStorePickSelfControl : UserControl |
|||
{ |
|||
public ShopStorePickSelfControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,83 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.StorePickSelf.StorePickProductWindow" |
|||
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.StorePickSelf" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Width="384" Height="300" ResizeMode="NoResize" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
|
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加落仓" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1" Margin="50 20 50 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Grid.Row="0" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="剩余良品数量:"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding StoreGetSelfResponse.PickMaxCount}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1" Height="30"> |
|||
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<StackPanel Orientation="Horizontal" Height="30" > |
|||
<Label HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="取件人:"/> |
|||
<Grid Grid.Column="1" Grid.ColumnSpan="3"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<ComboBox Height="30" Width="200" ItemsSource="{Binding StoreGetSelfResponse.DepartmentUsers}" DisplayMemberPath="UserName" Text="{Binding UserName}" BorderThickness="0" Margin="1" > |
|||
<ComboBox.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> |
|||
</ComboBox.Resources> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
|
|||
<Grid Grid.Row="2" Height="30"> |
|||
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<StackPanel Orientation="Horizontal" Height="30" > |
|||
<Label HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="自取数量:"/> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BTextBox Height="30" Width="150" Text="{Binding Count}" BorderThickness="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" BorderThickness="0" Height="30" Width="50" Foreground="{StaticResource Border.Brush}" Click="BButton_Click_1"/> |
|||
|
|||
</StackPanel> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Grid.Row="3" Text="{Binding StoreGetSelfResponse.ShowMessage}" Foreground="Orange"/> |
|||
</Grid> |
|||
|
|||
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/> |
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,59 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO.Packaging; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.StorePickSelf |
|||
{ |
|||
/// <summary>
|
|||
/// StorePickProductWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class StorePickProductWindow : BWindow |
|||
{ |
|||
public StorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData) |
|||
{ |
|||
this. SaveData=SaveData; |
|||
StoreGetSelfResponse =model; |
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
} |
|||
private string userName; |
|||
/// <summary>
|
|||
/// 用户名
|
|||
/// </summary>
|
|||
public string UserName { get => userName; set { Set(ref userName, value); } } |
|||
|
|||
private int count; |
|||
|
|||
public int Count { get => count; set { Set(ref count, value); } } |
|||
|
|||
private StoreGetSelfResponse storeGetSelfResponse; |
|||
|
|||
public StoreGetSelfResponse StoreGetSelfResponse { get=> storeGetSelfResponse; set {Set(ref storeGetSelfResponse,value); } } |
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (SaveData != null&& SaveData(Count, UserName)) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
} |
|||
private Func<int, string,bool> SaveData { get; set; } |
|||
private void BButton_Click_1(object sender, RoutedEventArgs e) |
|||
{ |
|||
Count = StoreGetSelfResponse.PickMaxCount; |
|||
} |
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue