diff --git a/BBWY.Client/APIServices/SealBoxService.cs b/BBWY.Client/APIServices/SealBoxService.cs index d5a263c6..7c434475 100644 --- a/BBWY.Client/APIServices/SealBoxService.cs +++ b/BBWY.Client/APIServices/SealBoxService.cs @@ -1,4 +1,5 @@ -using BBWY.Client.Models.APIModel; +using BBWY.Client.Models; +using BBWY.Client.Models.APIModel; using BBWY.Client.Models.APIModel.Response.PackTask; using BBWY.Client.Views.PackTask; using BBWY.Common.Http; @@ -50,11 +51,12 @@ namespace BBWY.Client.APIServices , null, HttpMethod.Post); } - public ApiResponse GetSealBoxConfiguredList(string SkuId, string TaskId, string shopId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null) + public ApiResponse GetSealBoxConfiguredList(PositionState PositionState, string SkuId, string TaskId, string shopId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null) { return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetSealBoxConfiguredList", new { + PositionState, ShopId = shopId, TaskId = TaskId, SkuId = SkuId, @@ -112,7 +114,7 @@ namespace BBWY.Client.APIServices , null, HttpMethod.Post); } /// - /// 获取待落仓列表 + /// 仓库端获取待落仓列表 /// /// /// @@ -120,22 +122,80 @@ namespace BBWY.Client.APIServices /// /// /// - public ApiResponse SearchWaitFallWareList(string ShopName = null, long? TaskId = null, string SkuId = null, int PageIndex = 1 + public ApiResponse SearchWareFallWareConfigureList(PositionState positionState, string ShopName = null, long? TaskId = null, string SkuId = null, int PageIndex = 1 , int PageSize = 10) { - return SendRequest(globalContext.QKApiHost, $"api/SealBox/SearchWaitFallWareList", + return SendRequest(globalContext.QKApiHost, $"api/SealBox/SearchWareFallWareConfigureList", new { ShopName, TaskId, SkuId, PageIndex, + PageSize, + positionState + } + , null, HttpMethod.Post); + } + + + /// + /// 商家端 获取待落仓列表 + /// + /// + /// + /// + /// + /// + /// + public ApiResponse SearchFallWareConfiguredList(PositionState positionState, long? TaskId = null, string SkuId = null, int PageIndex = 1 + , int PageSize = 10) + { + return SendRequest(globalContext.QKApiHost, $"api/SealBox/SearchFallWareConfiguredList", + new + { + shopId = globalContext.User.Shop.ShopId.ToString(), + positionState, + TaskId, + SkuId, + PageIndex, PageSize } + , null, HttpMethod.Post); + } + + + + + public ApiResponse SetFallWareConfigure(long SealBoxId, string ProductTitle, string PurchaseOrder, string PrewOrder, string WaybillNo) + { + return SendRequest(globalContext.QKApiHost, $"api/SealBox/SetFallWareConfigure", + new + { + SealBoxId, + ProductTitle, + PurchaseOrder, + PrewOrder, + WaybillNo + } + , null, HttpMethod.Post); + } + + + public ApiResponse GetFallWareConfigureCounts(string shopId) + { + return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetFallWareConfigureCounts?shopId={shopId}", + null + , null, HttpMethod.Post); + } + + + public ApiResponse WareCompeteFallWare(long SealBoxId) + { + return SendRequest(globalContext.QKApiHost, $"api/SealBox/WareCompeteFallWare?SealBoxId={SealBoxId}", + null , null, HttpMethod.Post); } - - } } diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs index e111aba8..d5bd7c5e 100644 --- a/BBWY.Client/App.xaml.cs +++ b/BBWY.Client/App.xaml.cs @@ -125,6 +125,7 @@ namespace BBWY.Client serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); + serviceCollection.AddTransient(); //serviceCollection.AddScoped(); #region 注册拳探SDK相关类 diff --git a/BBWY.Client/Helpers/MyPrintHelper.cs b/BBWY.Client/Helpers/MyPrintHelper.cs index cafd3e48..cb054b7e 100644 --- a/BBWY.Client/Helpers/MyPrintHelper.cs +++ b/BBWY.Client/Helpers/MyPrintHelper.cs @@ -623,24 +623,6 @@ namespace BBWY.Client.Helpers } - - - - public static void SetDefaultPrint(string printName) - { - SetDefaultPrinter(printName); - } - - /// - /// 调用win api将指定名称的打印机设置为默认打印机 - /// - /// - /// - [DllImport("winspool.drv")] - public static extern bool SetDefaultPrinter(string Name); - - - public static void PrintSealBoxData(SealBoxModel sealBoxModel, string printName, int boxCount, int printCount ) { // 100*180 diff --git a/BBWY.Client/Models/APIModel/Response/FallWare/FallWareConfigureCountResponse.cs b/BBWY.Client/Models/APIModel/Response/FallWare/FallWareConfigureCountResponse.cs new file mode 100644 index 00000000..147ee7cc --- /dev/null +++ b/BBWY.Client/Models/APIModel/Response/FallWare/FallWareConfigureCountResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace BBWY.Client.Models.APIModel +{ + public class FallWareConfigureCountResponse + { + public int FallWareWaitConfigureCount { get; set; } + + public int FallWareConfiguredCount { get; set; } + } +} diff --git a/BBWY.Client/Models/APIModel/Response/FallWare/SearchFallWareConfiguredResponse.cs b/BBWY.Client/Models/APIModel/Response/FallWare/SearchFallWareConfiguredResponse.cs new file mode 100644 index 00000000..076a494d --- /dev/null +++ b/BBWY.Client/Models/APIModel/Response/FallWare/SearchFallWareConfiguredResponse.cs @@ -0,0 +1,13 @@ +using BBWY.Client.Models.FallWare; +using System; +using System.Collections.Generic; +using System.Text; + +namespace BBWY.Client.Models.APIModel +{ + public class SearchFallWareConfiguredResponse + { + public IList FallWareConfiguredModels { get; set; } + public int TotalCount { get; set; } + } +} diff --git a/BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs b/BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs index c52aec33..c540da6b 100644 --- a/BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs @@ -21,7 +21,10 @@ namespace BBWY.Client.Models.APIModel public class WaitFallWareModelResponse - { + { /// + /// 仓库类型 + /// + public WareType WareType { get; set; } /// /// 店铺Id /// @@ -62,10 +65,22 @@ namespace BBWY.Client.Models.APIModel /// 封箱id /// public long SealBoxId { get; set; } + /// + /// 落仓材料 + /// + public BoxConfigureData BoxConfigureData { get; set; } + /// + /// 商品数量(封箱sku任务数总和) + /// + public int ProductCount { get; set; } } public class WaitFallWareModel { + /// + /// 仓库类型 + /// + public WareType WareType { get; set; } /// /// 店铺Id /// @@ -106,6 +121,36 @@ namespace BBWY.Client.Models.APIModel /// 封箱id /// public long SealBoxId { get; set; } + /// + /// 落仓材料 + /// + public BoxConfigureData BoxConfigureData { get; set; } + /// + /// 商品数量(封箱sku任务数总和) + /// + public int ProductCount { get; set; } + } + public class BoxConfigureData + { + /// + /// 采购单号 + /// + public string PurchaseOrder { get; set; } + /// + /// 预约单号 + /// + public string PrewOrder { get; set; } + + /// + /// 运单号 + /// + public string WaybillNo { get; set; } + + /// + /// 商品名称 + /// + public string ProductTitle { get; set; } + } } diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs index df433a54..2e78c144 100644 --- a/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareSealBoxResponse.cs @@ -56,6 +56,8 @@ namespace BBWY.Client.Models.APIModel public class WareSealBoxSku { + + public TaskState TaskState { get; set; } /// /// 任务Id /// diff --git a/BBWY.Client/Models/Enums.cs b/BBWY.Client/Models/Enums.cs index c42da767..f9f7c205 100644 --- a/BBWY.Client/Models/Enums.cs +++ b/BBWY.Client/Models/Enums.cs @@ -482,7 +482,7 @@ /// public enum PositionState { - 待封箱, 待落仓, 待完结 + 待封箱=0, 待落仓=1,已配置待落仓=2, 待完结=3 } /// diff --git a/BBWY.Client/Models/FallWare/CloudWareBoxModel.cs b/BBWY.Client/Models/FallWare/CloudWareBoxModel.cs new file mode 100644 index 00000000..2d515cd2 --- /dev/null +++ b/BBWY.Client/Models/FallWare/CloudWareBoxModel.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace BBWY.Client.Models.FallWare +{ + public class CloudWareBoxModel + { + /// + /// 箱子id + /// + public long SealBoxId { get; set; } + + /// + /// 供应商名称 + /// + public string ShopName { get; set; } + + /// + /// CLPS采购单号 + /// + public string CLPSPurchaseOrder { get; set; } + + /// + /// 预约单号 + /// + public string PrewOrder { get; set; } + + /// + /// 目的城市-仓库 + /// + public string WareName { get; set; } + + /// + /// 箱子数 + /// + public int BoxCount { get; set; } + + /// + /// 商品数量 + /// + public int ProductCount { get; set; } + } +} diff --git a/BBWY.Client/Models/FallWare/FallWareConfiguredModel.cs b/BBWY.Client/Models/FallWare/FallWareConfiguredModel.cs new file mode 100644 index 00000000..8e2631d0 --- /dev/null +++ b/BBWY.Client/Models/FallWare/FallWareConfiguredModel.cs @@ -0,0 +1,60 @@ +using BBWY.Client.Models.SealBox; +using System; +using System.Collections.Generic; +using System.Text; + +namespace BBWY.Client.Models.FallWare +{ + public class FallWareConfiguredModel + { /// + /// 商品名称 + /// + public string ProductTitle { get; set; } + /// + /// 采购单号 + /// + public string PurchaseOrder { get; set; } + /// + /// 预约单号 + /// + public string PrewOrder { get; set; } + + /// + /// 运单号 + /// + public string WaybillNo { get; set; } + + /// + /// 仓库类型 + /// + public WareType? WareType { get; set; } + /// + /// 封箱id + /// + public long SealBoxId { get; set; } + + /// + /// 仓库名称 + /// + public string WareName { get; set; } + + /// + /// 箱子数 + /// + public int? BoxCount { get; set; } + + /// + /// 箱子总数量 + /// + public int SealBoxTotalCount { get; set; } + + /// + /// 仓库任务列表 + /// + public IList SealBoxConfigureTasks { get; set; } + } + public class FallWareConfigureTask : SealBoxConfigureTask + { + + } +} diff --git a/BBWY.Client/Models/FallWare/FallWareWaitConfigureModel.cs b/BBWY.Client/Models/FallWare/FallWareWaitConfigureModel.cs new file mode 100644 index 00000000..4fe754a3 --- /dev/null +++ b/BBWY.Client/Models/FallWare/FallWareWaitConfigureModel.cs @@ -0,0 +1,36 @@ +using BBWY.Client.Models.SealBox; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; + +namespace BBWY.Client.Models.FallWare +{ + public class FallWareWaitConfigureModel + { + /// + /// 封箱id + /// + public long SealBoxId { get; set; } + + /// + /// 箱子总数量 + /// + public int SealBoxTotalCount { get; set; } + + /// + /// 仓库名称 + /// + public string WareName { get; set; } + + /// + /// 仓库类型 + /// + public WareType? WareType { get; set; } + + /// + /// 仓库任务列表 + /// + public ObservableCollection SealBoxConfigureTasks { get; set; } + } +} diff --git a/BBWY.Client/Models/FallWare/JDWareBoxModel.cs b/BBWY.Client/Models/FallWare/JDWareBoxModel.cs new file mode 100644 index 00000000..90ab78ce --- /dev/null +++ b/BBWY.Client/Models/FallWare/JDWareBoxModel.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace BBWY.Client.Models.FallWare +{ + public class JDWareBoxModel + { + + /// + /// 箱子id + /// + public long SealBoxId { get; set; } + + /// + /// 供应商名称 + /// + public string ShopName { get; set; } + /// + /// 采购单号 + /// + public string PurchaseOrder { get; set; } + /// + /// 预约单号 + /// + public string PrewOrder { get; set; } + + /// + /// 运单号 + /// + public string WaybillNo { get; set; } + + /// + /// 目的城市-仓库 + /// + public string WareName { get; set; } + + /// + /// 商品名称 + /// + public string ProductTitle { get; set; } + + /// + /// 箱子数 + /// + public int BoxCount { get; set; } + + /// + /// 商品数量 + /// + public int ProductCount { get; set; } + } +} diff --git a/BBWY.Client/Models/PackTask/PackTaskModel.cs b/BBWY.Client/Models/PackTask/PackTaskModel.cs index 6daadbbe..35f32384 100644 --- a/BBWY.Client/Models/PackTask/PackTaskModel.cs +++ b/BBWY.Client/Models/PackTask/PackTaskModel.cs @@ -30,8 +30,8 @@ namespace BBWY.Client.Models private long id; public long Id { get => id; set { Set(ref id, value); } } - - + + public ICommand PrintBarcodeCommand { get; set; } public ICommand PrintCerCommand { get; set; } @@ -49,12 +49,12 @@ namespace BBWY.Client.Models public Action ReflashTask { get; set; } - + private void UpdateTask() { - + if (!this.OrderId.IsNullOrEmpty()) { System.Windows.MessageBox.Show("暂不支持修改采购组的任务"); @@ -89,18 +89,13 @@ namespace BBWY.Client.Models LookCerCommand = new RelayCommand(LookCer); SetServiceCommand = new RelayCommand(SetService); UpdateTaskCommand = new RelayCommand(UpdateTask); - QualityTaskCommand=new RelayCommand(QualityTask); + QualityTaskCommand = new RelayCommand(QualityTask); } private void QualityTask() { - QualityWindow service = new QualityWindow(); //加载数据 - ViewModelLocator viewModelLocator = new ViewModelLocator(); - var qualityViewModel = viewModelLocator.QualityTask; - if (qualityViewModel.ReflashWindow == null) - qualityViewModel.ReflashWindow = ReflashTask; - qualityViewModel.SearchSku(this); + QualityWindow service = new QualityWindow(this, ReflashTask); service.Show(); } @@ -112,19 +107,18 @@ namespace BBWY.Client.Models var serviceViewModel = viewModelLocator.PackServiceList; serviceViewModel.PackTaskModel = this; - serviceViewModel.PackTaskList = new System.Collections.ObjectModel.ObservableCollection { this}; + serviceViewModel.PackTaskList = new System.Collections.ObjectModel.ObservableCollection { this }; serviceViewModel.FloorDragNumber = this.FloorDragNumber; serviceViewModel.TaskCount = SkuCount; serviceViewModel.TaskId = TaskId; - serviceViewModel.OrderId= OrderId; - serviceViewModel.SkuId =SkuId ; - serviceViewModel.PackUserName = this.PackUser?.Replace("\r\n",",")?.Replace("\n", ",")?.Replace("\r", ","); + serviceViewModel.OrderId = OrderId; + serviceViewModel.SkuId = SkuId; + serviceViewModel.PackUserName = this.PackUser?.Replace("\r\n", ",")?.Replace("\n", ",")?.Replace("\r", ","); serviceViewModel.LoadPackDatas(); - + serviceViewModel.SetAllFees = new Action(() => { - if (ReflashTask != null) ReflashTask(); }); service.Show(); @@ -177,7 +171,7 @@ namespace BBWY.Client.Models return; } PrintWindow printWindow = new PrintWindow(); - + printWindow.CertificateModel = certificateModel; printWindow.LoadData(); //printWindow.Datas = LoadCerLabelModels(); @@ -195,7 +189,7 @@ namespace BBWY.Client.Models return; } - PrintWindow printWindow = new PrintWindow(); + PrintWindow printWindow = new PrintWindow(); printWindow.BarCodeModel = new BarCodeModel { Brand = BarCodeModel.Brand, @@ -209,8 +203,8 @@ namespace BBWY.Client.Models //printWindow.Datas = LoadBarLabelModels(); printWindow.Show(); } - - + + private DateTime endTime; /// @@ -485,6 +479,6 @@ namespace BBWY.Client.Models /// public string GoodsNo { get => goodsNo; set { Set(ref goodsNo, value); } } - + } } diff --git a/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs b/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs index 64acda27..6ed226b0 100644 --- a/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs +++ b/BBWY.Client/Models/SealBox/SealBoxConfiguredModel.cs @@ -23,6 +23,11 @@ namespace BBWY.Client.Models.SealBox /// public string WareName { get; set; } + /// + /// 仓库类型 + /// + public WareType? WareType { get; set; } + /// /// 仓库任务列表 /// @@ -50,13 +55,6 @@ namespace BBWY.Client.Models.SealBox /// sku图片 /// public string Logo { get; set; } - ///// - ///// 预计完成时间 - ///// - //public DateTime? PreCompletedTime { get; set; } - ///// - ///// 任务状态 - ///// - //public TaskState? TaskState { get; set; } + } } diff --git a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs index aec0236a..c6e222e3 100644 --- a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs @@ -27,6 +27,8 @@ using BBWY.Client.Models.APIModel; using BBWY.Client.Views.SealBox; using BBWY.Client.Models.SealBox; using BBWY.Client.ViewModels.SealBox; +using BBWY.Client.Views.FallWare; +using BBWY.Client.Models.FallWare; namespace BBWY.Client.ViewModels.PackTask { @@ -40,6 +42,9 @@ namespace BBWY.Client.ViewModels.PackTask #region 属性绑定 + + + private string sealBoxWaitConfigureCount; /// /// 封箱 待配置数 @@ -58,6 +63,12 @@ namespace BBWY.Client.ViewModels.PackTask /// public SealBoxConfigureType SealBoxConfigureType { get => sealBoxConfigureType; set { Set(ref sealBoxConfigureType, value); } } + //private SealBoxConfigureType fallWareConfigureType; + ///// + ///// 落仓配置状态 + ///// + //public SealBoxConfigureType FallWareConfigureType { get => fallWareConfigureType; set { Set(ref fallWareConfigureType, value); } } + private ObservableCollection sealBoxWaitConfigureList; /// @@ -71,6 +82,20 @@ namespace BBWY.Client.ViewModels.PackTask /// public ObservableCollection SealBoxConfiguredList { get => sealBoxConfiguredList; set { Set(ref sealBoxConfiguredList, value); } } + + + private ObservableCollection fallWareWaitConfigureList; + /// + /// 落仓待配置列表 + /// + public ObservableCollection FallWareWaitConfigureList { get => fallWareWaitConfigureList; set { Set(ref fallWareWaitConfigureList, value); } } + + private ObservableCollection fallWareConfiguredList; + /// + /// 落仓已配置列表 + /// + public ObservableCollection FallWareConfiguredList { get => fallWareConfiguredList; set { Set(ref fallWareConfiguredList, value); } } + /// /// 查询时间段 /// @@ -234,6 +259,37 @@ namespace BBWY.Client.ViewModels.PackTask this.sealBoxService = sealBoxService; SealBoxConfigureType = SealBoxConfigureType.已配置; + + SetFallWareConfiguredCommand = new RelayCommand(SetFallWareConfigured); + } + + private void SetFallWareConfigured(object obj) + { + var fallware = obj as FallWareConfiguredModel; + JDWareBoxModel model = new JDWareBoxModel + { + ShopName = globalContext.User.Shop.ShopName, + WareName = fallware.WareName, + SealBoxId = fallware.SealBoxId, + ProductCount = fallware.SealBoxTotalCount, + BoxCount = fallware.BoxCount.Value, + PrewOrder = fallware.PrewOrder, + ProductTitle = fallware.ProductTitle, + PurchaseOrder = fallware.PurchaseOrder, + WaybillNo = fallware.WaybillNo + }; + if (fallware.WareType== WareType.京仓) + { + + SetJDWareBoxWindow window = new SetJDWareBoxWindow(model,sealBoxService,fallware.WareType.Value,ReflashTask); + window.Show(); + } + if (fallware.WareType == WareType.云仓) + { + + SetCloudWareBoxWindow window = new SetCloudWareBoxWindow(model, sealBoxService, fallware.WareType.Value, ReflashTask); + window.Show(); + } } private void UpdateSealBoxConfigured(SealBoxConfiguredModel model) @@ -344,7 +400,10 @@ namespace BBWY.Client.ViewModels.PackTask #region 事件绑定 - + /// + /// 设置落仓配置信息(上传材料) + /// + public ICommand SetFallWareConfiguredCommand { get; set; } /// /// 修改封箱数据 /// @@ -413,10 +472,11 @@ namespace BBWY.Client.ViewModels.PackTask /// public void SearchTaskList() { + long? taskId = null; try { if (SearchTaskId != null && !string.IsNullOrEmpty(SearchTaskId.Trim())) - Convert.ToInt64(SearchTaskId); + taskId= Convert.ToInt64(SearchTaskId); } catch { @@ -568,10 +628,7 @@ namespace BBWY.Client.ViewModels.PackTask if (SealBoxConfigureType == SealBoxConfigureType.已配置) { SealBoxConfiguredList = new ObservableCollection(); - - - - var sealBoxRes = sealBoxService.GetSealBoxConfiguredList(SearchSkuId, SearchTaskId, globalContext.User.Shop.ShopId.ToString(), PageSize, PageIndex); + var sealBoxRes = sealBoxService.GetSealBoxConfiguredList(PositionState.待封箱, SearchSkuId, SearchTaskId, globalContext.User.Shop.ShopId.ToString(), PageSize, PageIndex); if (sealBoxRes == null) { System.Windows.MessageBox.Show("网络异常"); IsLoading = false; return; @@ -605,7 +662,77 @@ namespace BBWY.Client.ViewModels.PackTask IsLoading = false; }); if (TaskState == Models.TaskState.待落仓) - IsLoading = false; + Task.Factory.StartNew(() => + { + + try + { + if (SealBoxConfigureType == SealBoxConfigureType.待配置) + { + FallWareWaitConfigureList = new ObservableCollection(); + var fallWareRes = sealBoxService.SearchFallWareConfiguredList(PositionState.待落仓, taskId, SearchSkuId, PageIndex, PageSize); + + if (fallWareRes == null) + { + System.Windows.MessageBox.Show("网络异常"); IsLoading = false; return; + } + + if (!fallWareRes.Success || fallWareRes.Data == null) + { + System.Windows.MessageBox.Show(fallWareRes.Msg); IsLoading = false; return; + } + App.Current.Dispatcher.BeginInvoke(new Action(() => + { + OrderCount = fallWareRes.Data.TotalCount; + })); + + foreach (var item in fallWareRes.Data.FallWareConfiguredModels) + { + App.Current.Dispatcher.BeginInvoke(new Action(() => + { + FallWareWaitConfigureList.Add(item); + })); + } + } + if (SealBoxConfigureType == SealBoxConfigureType.已配置) + { + FallWareConfiguredList = new ObservableCollection(); + var fallWareRes = sealBoxService.SearchFallWareConfiguredList(PositionState.已配置待落仓, taskId, SearchSkuId, PageIndex, PageSize); + + if (fallWareRes == null) + { + System.Windows.MessageBox.Show("网络异常"); IsLoading = false; return; + } + + if (!fallWareRes.Success || fallWareRes.Data == null) + { + System.Windows.MessageBox.Show(fallWareRes.Msg); IsLoading = false; return; + } + App.Current.Dispatcher.BeginInvoke(new Action(() => + { + OrderCount = fallWareRes.Data.TotalCount; + })); + + foreach (var item in fallWareRes.Data.FallWareConfiguredModels) + { + App.Current.Dispatcher.BeginInvoke(new Action(() => + { + FallWareConfiguredList.Add(item); + })); + } + } + + IsLoadFallWareCount(); + + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + + } + IsLoading = false; + + }); } @@ -614,7 +741,15 @@ namespace BBWY.Client.ViewModels.PackTask GlobalContext globalContext; ProductService productService; - + private void IsLoadFallWareCount() + { + var res = sealBoxService.GetFallWareConfigureCounts(globalContext.User.Shop.ShopId.ToString()); + if (res != null && res.Success && res.Data != null) + { + SealBoxWaitConfigureCount = res.Data.FallWareWaitConfigureCount.ToString(); + SealBoxConfiguredCount = res.Data.FallWareConfiguredCount.ToString(); + } + } private void IsLoadSealBoxCount() { diff --git a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs index e3820bb0..37acb084 100644 --- a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs @@ -22,7 +22,8 @@ using GalaSoft.MvvmLight.Messaging; using BBWY.Client.Models.APIModel; using BBWY.Client.Models.PackTask; using BBWY.Client.Views.SealBox; - +using BBWY.Client.Views.FallWare; +using BBWY.Client.Models.FallWare; namespace BBWY.Client.ViewModels.PackTask { @@ -49,6 +50,11 @@ namespace BBWY.Client.ViewModels.PackTask } } + public string fallWareWaitConfigureCount; + public string FallWareWaitConfigureCount { get => fallWareWaitConfigureCount; set { Set(ref fallWareWaitConfigureCount, value); } } + + public string fallWareConfiguredCount; + public string FallWareConfiguredCount { get => fallWareConfiguredCount; set { Set(ref fallWareConfiguredCount, value); } } @@ -214,7 +220,11 @@ namespace BBWY.Client.ViewModels.PackTask } } - + private SealBoxConfigureType sealBoxConfigureType; + /// + /// 封箱配置状态 + /// + public SealBoxConfigureType SealBoxConfigureType { get => sealBoxConfigureType; set { Set(ref sealBoxConfigureType, value); } } #endregion @@ -252,7 +262,7 @@ namespace BBWY.Client.ViewModels.PackTask //加载数据 SetTaskState(null); - + @@ -262,22 +272,85 @@ namespace BBWY.Client.ViewModels.PackTask SetSealBoxCommand = new RelayCommand(SetSealBox); CompeteFallWareCommand = new RelayCommand(CompeteFallWare); + SealBoxConfigureType = SealBoxConfigureType.已配置; + PositionState = PositionState.已配置待落仓; + SetSealBoxConfigureTypeCommand = new RelayCommand(s => + { + PageIndex = 1; + SealBoxConfigureType = s; + PositionState = s == SealBoxConfigureType.已配置 ? PositionState.已配置待落仓 : PositionState.待落仓; + Task.Factory.StartNew(() => SearchTaskList()); + }); + + + LookBoxConfigureCommand = new RelayCommand(LookBoxConfigure); + } + + private void LookBoxConfigure(object obj) + { + var fallware = obj as WaitFallWareModel; + JDWareBoxModel model = new JDWareBoxModel + { + ShopName = globalContext.User.Shop.ShopName, + WareName = fallware.WareName, + SealBoxId = fallware.SealBoxId, + ProductCount = fallware.ProductCount, + BoxCount = fallware.SealBoxCount, + PrewOrder = fallware.BoxConfigureData.PrewOrder, + ProductTitle = fallware.BoxConfigureData.ProductTitle, + PurchaseOrder = fallware.BoxConfigureData.PurchaseOrder, + WaybillNo = fallware.BoxConfigureData.WaybillNo + }; + if (fallware.WareType == WareType.京仓) + { + SetJDWareBoxWindow window = new SetJDWareBoxWindow(model, sealBoxService, fallware.WareType, ReflashTask,false); + window.Show(); + } + if (fallware.WareType == WareType.云仓) + { + SetCloudWareBoxWindow window = new SetCloudWareBoxWindow(model, sealBoxService, fallware.WareType, ReflashTask, false); + window.Show(); + } } + public PositionState PositionState { get; set; } + /// /// 完成落仓(todo:) /// /// private void CompeteFallWare(object obj) { - //throw new NotImplementedException(); + + if (System.Windows.MessageBox.Show("是否完成落仓?", "提示", + MessageBoxButton.YesNo, + MessageBoxImage.Warning) != MessageBoxResult.Yes) + return; + + var model = obj as WaitFallWareModel; + var res = sealBoxService.WareCompeteFallWare(model.SealBoxId); + if (res != null&&res.Success) + { + ReflashTask();return; + } + if (res==null) + { + System.Windows.MessageBox.Show("网络异常"); + return; + } + System.Windows.MessageBox.Show(res.Msg); } private void SetSealBox(object obj) { var model = (SealBoxModel)obj; + if (model.SealBoxSkus.Any(s => s.TaskState == Models.TaskState.待质检 || s.TaskState == Models.TaskState.待打包)) + { + System.Windows.MessageBox.Show("无法封箱,存在未封箱的任务"); + return; + } SetSealBoxWindow setSealBoxWindow = new SetSealBoxWindow(model); setSealBoxWindow.SendBoxCount = boxCount => @@ -290,6 +363,11 @@ namespace BBWY.Client.ViewModels.PackTask #region 事件绑定 + public ICommand LookBoxConfigureCommand { get; set; } + /// + /// 待配置 /已配置 + /// + public ICommand SetSealBoxConfigureTypeCommand { get; set; } public ICommand CompeteFallWareCommand { get; set; } public ICommand CompeteSealBoxCommand { get; set; } @@ -346,16 +424,16 @@ namespace BBWY.Client.ViewModels.PackTask System.Windows.MessageBox.Show("请先设置封箱数量"); return; } - var res = sealBoxService.WareCompeteSealBox(model.SealBoxId,model.SealBoxCount); - if(res==null) + var res = sealBoxService.WareCompeteSealBox(model.SealBoxId, model.SealBoxCount); + if (res == null) { - System.Windows. MessageBox.Show("网络异常",""); + System.Windows.MessageBox.Show("网络异常", ""); return; } - if (!res.Success||!res.Data) + if (!res.Success || !res.Data) { System.Windows.MessageBox.Show(res.Msg); return; @@ -366,11 +444,13 @@ namespace BBWY.Client.ViewModels.PackTask private void UpdateTaskState(object obj) { - var objList = (object[])obj; - long taskId = (long)objList[0]; - var packTaskState = (TaskState)objList[1]; + var model = (PackTaskModel)obj; + long taskId = model.TaskId; + var packTaskState = model.TaskState; ApiResponse res = null; + + switch (packTaskState) { case Models.TaskState.未到货: @@ -397,11 +477,13 @@ namespace BBWY.Client.ViewModels.PackTask MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes) return; - res = packTaskService.SetPackTaskState(taskId, PackTaskState.待封箱); + res = packTaskService.SetPackTaskState(taskId, Models.TaskState.待封箱); break; case Models.TaskState.待封箱: break; case Models.TaskState.待出库: + + break; case Models.TaskState.已完成: break; @@ -437,7 +519,7 @@ namespace BBWY.Client.ViewModels.PackTask SearchTaskList(); } - + /// @@ -460,10 +542,10 @@ namespace BBWY.Client.ViewModels.PackTask if (TaskState == Models.TaskState.待落仓) Task.Factory.StartNew(() => { - + WaitFallWareList = new ObservableCollection(); - var datas = sealBoxService.SearchWaitFallWareList(SearchShopName, taskId, SearchSkuId, PageIndex, PageSize); + var datas = sealBoxService.SearchWareFallWareConfigureList(PositionState, SearchShopName, taskId, SearchSkuId, PageIndex, PageSize); if (datas != null && datas.Data != null && datas.Success) { var dataModel = datas.Data; @@ -483,6 +565,9 @@ namespace BBWY.Client.ViewModels.PackTask WareName = item.WareName, SealBoxCount = item.SealBoxCount, SealBoxId = item.SealBoxId, + BoxConfigureData = item.BoxConfigureData, + ProductCount = item.ProductCount, + WareType = item.WareType, }); })); @@ -497,15 +582,16 @@ namespace BBWY.Client.ViewModels.PackTask //})); } IsLoadCount(); - IsLoading = false; + IsLoadFallWareCount(); + IsLoading = false; }); else if (TaskState == Models.TaskState.待封箱) Task.Factory.StartNew(() => { - - + + var randNum = new Random().Next(81, 90); WaitSealBoxModels = new ObservableCollection(); var datas = sealBoxService.GetWareSealBoxList(SearchShopName, taskId, SearchSkuId, PageIndex, PageSize); @@ -515,18 +601,24 @@ namespace BBWY.Client.ViewModels.PackTask OrderCount = dataModel.TotalCount; foreach (var item in dataModel.WaitSealBoxModels) { + App.Current.Dispatcher.BeginInvoke(new Action(() => { WaitSealBoxModels.Add(new SealBoxModel { AcceptUserName = string.Join("|", item.AcceptUserNames), DepartmentName = item.DepartmentName, - SealBoxSkus = item.SealBoxSkus, + SealBoxSkus = item.SealBoxSkus.Select(s => + { + + s.Logo = s.Logo.Replace("80x80", $"{randNum}x{randNum}"); + return s; + }).ToList(), ShopId = item.ShopId, ShopName = item.ShopName, WareId = item.WareId, WareName = item.WareName, - SealBoxId = item.SealBoxId, + SealBoxId = item.SealBoxId, }); })); @@ -584,8 +676,8 @@ namespace BBWY.Client.ViewModels.PackTask OrderId = item.OrderId, SkuId = item.SkuId, SkuName = item.SkuName, - FloorDragNumber=item.FloorDragNumber, - + FloorDragNumber = item.FloorDragNumber, + }; if (item.BarCodeDTO != null && item.BarCodeDTO.Id > 0) @@ -636,7 +728,15 @@ namespace BBWY.Client.ViewModels.PackTask IsLoading = false; }); } - + private void IsLoadFallWareCount() + { + var res = sealBoxService.GetFallWareConfigureCounts(null); + if (res != null && res.Success && res.Data != null) + { + FallWareWaitConfigureCount = res.Data.FallWareWaitConfigureCount.ToString(); + FallWareConfiguredCount = res.Data.FallWareConfiguredCount.ToString(); + } + } private void IsLoadCount() { var packTaskResult = packTaskService.GetTaskAllCount(); @@ -651,7 +751,7 @@ namespace BBWY.Client.ViewModels.PackTask WaitOutbound = packTaskResult.Data.WaitOutbound?.ToString(); WaitPackCount = packTaskResult.Data.WaitPackCount?.ToString(); WaitSealBoxCount = packTaskResult.Data.WaitSealBox?.ToString(); - WaitFallWareCount= packTaskResult.Data.WaitFallWareCount?.ToString(); + WaitFallWareCount = packTaskResult.Data.WaitFallWareCount?.ToString(); WaitCompleted = packTaskResult.Data.WaitCompleted?.ToString(); })); } @@ -670,7 +770,7 @@ namespace BBWY.Client.ViewModels.PackTask private void OpenSkuDetail(object param) { var paramList = (object[])param; - var skuId = paramList[1].ToString(); + var skuId = paramList.Last().ToString(); var url = $"https://item.jd.com/{skuId}.html"; try { diff --git a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs index 16855eca..ef1ec561 100644 --- a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs +++ b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs @@ -24,7 +24,7 @@ using WebSocketSharp; namespace BBWY.Client.ViewModels { - public class QualityViewModel : BaseVM, IDenpendency + public class QualityViewModel : BaseVM { #region 属性 diff --git a/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml b/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml new file mode 100644 index 00000000..255e8c8b --- /dev/null +++ b/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml.cs b/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml.cs new file mode 100644 index 00000000..300c6547 --- /dev/null +++ b/BBWY.Client/Views/FallWare/FallWareConfiguredControl.xaml.cs @@ -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.FallWare +{ + /// + /// FallWareConfiguredControl.xaml 的交互逻辑 + /// + public partial class FallWareConfiguredControl : UserControl + { + public FallWareConfiguredControl() + { + InitializeComponent(); + } + } +} diff --git a/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml new file mode 100644 index 00000000..91578a32 --- /dev/null +++ b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml.cs b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml.cs new file mode 100644 index 00000000..7575ac19 --- /dev/null +++ b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml.cs @@ -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.FallWare +{ + /// + /// FallWareWaitConfigureControl.xaml 的交互逻辑 + /// + public partial class FallWareWaitConfigureControl : UserControl + { + public FallWareWaitConfigureControl() + { + InitializeComponent(); + } + } +} diff --git a/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml b/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml new file mode 100644 index 00000000..0fe85193 --- /dev/null +++ b/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml.cs b/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml.cs new file mode 100644 index 00000000..e357fde1 --- /dev/null +++ b/BBWY.Client/Views/FallWare/SetCloudWareBoxWindow.xaml.cs @@ -0,0 +1,72 @@ +using BBWY.Client.APIServices; +using BBWY.Client.Models.FallWare; +using BBWY.Client.Models; +using BBWY.Controls; +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using WebSocketSharp; + +namespace BBWY.Client.Views.FallWare +{ + /// + /// SetCloudWareBoxWindow.xaml 的交互逻辑 + /// + public partial class SetCloudWareBoxWindow : BWindow + { + public SetCloudWareBoxWindow(JDWareBoxModel model, SealBoxService sealBoxService, WareType wareType, Action reflashWindow, bool isEnabled = true) + { + if (SealBoxService == null) this.SealBoxService = sealBoxService; + WareType = wareType; + ReflashWindow = reflashWindow; + + JDWareBoxModel = model; + InitializeComponent(); + this.DataContext = JDWareBoxModel; + if (!isEnabled) + { + this.jd_box.IsEnabled = isEnabled; + this.btn_save.Visibility = Visibility.Collapsed; + } + } + public JDWareBoxModel JDWareBoxModel { get; set; } + + private SealBoxService SealBoxService { get; set; } + + private Action ReflashWindow { get; set; } + + private WareType WareType { get; set; } + private void BButton_Click(object sender, RoutedEventArgs e) + { + + if (JDWareBoxModel.PurchaseOrder.IsNullOrEmpty()) + { + MessageBox.Show("采购单号不能为空"); + return; + } + if (JDWareBoxModel.PrewOrder.IsNullOrEmpty() && WareType == WareType.京仓) + { + MessageBox.Show("预约单号不能为空"); + return; + } + var res = SealBoxService.SetFallWareConfigure(JDWareBoxModel.SealBoxId, JDWareBoxModel.ProductTitle, JDWareBoxModel.PurchaseOrder, JDWareBoxModel.PrewOrder, JDWareBoxModel.WaybillNo); + + if (res != null && res.Success) + { + if (ReflashWindow != null) ReflashWindow(); + this.Close(); + + return; + } + if (res != null) MessageBox.Show(res.Msg); + } + } +} diff --git a/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml b/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml new file mode 100644 index 00000000..960e1124 --- /dev/null +++ b/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml.cs b/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml.cs new file mode 100644 index 00000000..6803449e --- /dev/null +++ b/BBWY.Client/Views/FallWare/SetJDWareBoxWindow.xaml.cs @@ -0,0 +1,75 @@ +using BBWY.Client.APIServices; +using BBWY.Client.Models; +using BBWY.Client.Models.FallWare; +using BBWY.Controls; +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using WebSocketSharp; + +namespace BBWY.Client.Views.FallWare +{ + /// + /// SetJDWareBoxWindow.xaml 的交互逻辑 + /// + public partial class SetJDWareBoxWindow : BWindow + { + public SetJDWareBoxWindow(JDWareBoxModel model, SealBoxService sealBoxService,WareType wareType, Action reflashWindow,bool isEnabled = true) + { + if (SealBoxService == null) this.SealBoxService = sealBoxService; + WareType = wareType; + ReflashWindow = reflashWindow; + + JDWareBoxModel = model; + InitializeComponent(); + this.DataContext = JDWareBoxModel; + if (!isEnabled) + { + this.jd_box.IsEnabled = isEnabled; + this.btn_save.Visibility = Visibility.Collapsed; + } + + + + } + public JDWareBoxModel JDWareBoxModel { get; set; } + + private SealBoxService SealBoxService { get; set; } + + private Action ReflashWindow { get; set; } + + private WareType WareType { get; set; } + private void BButton_Click(object sender, RoutedEventArgs e) + { + + if (JDWareBoxModel.PurchaseOrder.IsNullOrEmpty()) + { + MessageBox.Show("采购单号不能为空"); + return; + } + if (JDWareBoxModel.PrewOrder.IsNullOrEmpty()&& WareType== WareType.京仓) + { + MessageBox.Show("预约单号不能为空"); + return; + } + var res = SealBoxService.SetFallWareConfigure(JDWareBoxModel.SealBoxId, JDWareBoxModel.ProductTitle,JDWareBoxModel.PurchaseOrder,JDWareBoxModel.PrewOrder,JDWareBoxModel.WaybillNo); + + if (res!=null&&res.Success) + { + if (ReflashWindow != null) ReflashWindow(); + this.Close(); + + return; + } + if (res != null) MessageBox.Show(res.Msg); + } + } +} diff --git a/BBWY.Client/Views/PackTask/WaitFallWareControl.xaml b/BBWY.Client/Views/FallWare/WaitFallWareControl.xaml similarity index 94% rename from BBWY.Client/Views/PackTask/WaitFallWareControl.xaml rename to BBWY.Client/Views/FallWare/WaitFallWareControl.xaml index f78b1f81..fb4eb870 100644 --- a/BBWY.Client/Views/PackTask/WaitFallWareControl.xaml +++ b/BBWY.Client/Views/FallWare/WaitFallWareControl.xaml @@ -109,7 +109,7 @@ Margin=" 5,0,0,0"/> - + @@ -236,17 +236,24 @@ - + + - - + /> + + diff --git a/BBWY.Client/Views/PackTask/WaitFallWareControl.xaml.cs b/BBWY.Client/Views/FallWare/WaitFallWareControl.xaml.cs similarity index 100% rename from BBWY.Client/Views/PackTask/WaitFallWareControl.xaml.cs rename to BBWY.Client/Views/FallWare/WaitFallWareControl.xaml.cs diff --git a/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml b/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml new file mode 100644 index 00000000..204f1415 --- /dev/null +++ b/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml.cs b/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml.cs new file mode 100644 index 00000000..365095e9 --- /dev/null +++ b/BBWY.Client/Views/FallWare/WareFallWareListControl.xaml.cs @@ -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.FallWare +{ + /// + /// WareFallWareListControl.xaml 的交互逻辑 + /// + public partial class WareFallWareListControl : UserControl + { + public WareFallWareListControl() + { + InitializeComponent(); + } + } +} diff --git a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs index fb46342b..74b24fdb 100644 --- a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs @@ -94,6 +94,7 @@ namespace BBWY.Client.Views.PackTask ApplyAge = item.CertificateModel.ApplyAge, GoodsNumber = item.CertificateModel.GoodsNumber, ProduceDate = item.CertificateModel.ProduceDate, + SaveType = SaveType.C端, }); if (resData == null) diff --git a/BBWY.Client/Views/PackTask/TaskList.xaml b/BBWY.Client/Views/PackTask/TaskList.xaml index 236a13cc..a1f7d582 100644 --- a/BBWY.Client/Views/PackTask/TaskList.xaml +++ b/BBWY.Client/Views/PackTask/TaskList.xaml @@ -148,7 +148,7 @@ + + > + diff --git a/BBWY.Client/Views/PackTask/WareHouseList.xaml b/BBWY.Client/Views/PackTask/WareHouseList.xaml index 0547ed9a..473e609b 100644 --- a/BBWY.Client/Views/PackTask/WareHouseList.xaml +++ b/BBWY.Client/Views/PackTask/WareHouseList.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:BBWY.Client.Views.PackTask" + xmlns:fallware="clr-namespace:BBWY.Client.Views.FallWare" xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" xmlns:ctr="clr-namespace:BBWY.Client.Converters" xmlns:cmodel="clr-namespace:BBWY.Client.Models" @@ -169,9 +170,11 @@ - + - + diff --git a/BBWY.Client/Views/PackTask/WareHouseListControl.xaml b/BBWY.Client/Views/PackTask/WareHouseListControl.xaml index 4b35a051..7eb84f49 100644 --- a/BBWY.Client/Views/PackTask/WareHouseListControl.xaml +++ b/BBWY.Client/Views/PackTask/WareHouseListControl.xaml @@ -423,10 +423,11 @@ /> - + public partial class QualityWindow : BWindow { - public QualityWindow() + public QualityWindow(PackTaskModel model,Action ReflashTask) { InitializeComponent(); + var qualityViewModel =(QualityViewModel)this.DataContext; + if (qualityViewModel.ReflashWindow == null) + qualityViewModel.ReflashWindow = ReflashTask; + qualityViewModel.SearchSku(model); } } } diff --git a/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml b/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml index 35333027..cfc870c4 100644 --- a/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml +++ b/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml @@ -37,10 +37,10 @@ - + - + diff --git a/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml.cs b/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml.cs index 20d31aec..a8bacb40 100644 --- a/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml.cs +++ b/BBWY.Client/Views/SealBox/SetSealBoxWindow.xaml.cs @@ -75,11 +75,6 @@ namespace BBWY.Client.Views.SealBox public Action SendBoxCount { get; set; } private void BButton_Click(object sender, RoutedEventArgs e) { - - - - - int boxCount = 0; try { @@ -90,19 +85,19 @@ namespace BBWY.Client.Views.SealBox MessageBox.Show("请输入数字!"); return; } - string printName = cbPrint.Text; - var localPrintServer = new LocalPrintServer(); - var printQueue = localPrintServer.GetPrintQueue(printName); - if (printQueue.IsInError) - { - MessageBox.Show("打印机处于错误状态"); - return; - } + //string printName = cbPrint.Text; + //var localPrintServer = new LocalPrintServer(); + //var printQueue = localPrintServer.GetPrintQueue(printName); + //if (printQueue.IsInError) + //{ + // MessageBox.Show("打印机处于错误状态"); + // return; + //} - //PrintSealboxModel(printName, boxCount); + ////PrintSealboxModel(printName, boxCount); - MyPrintHelper.PrintSealBoxData(SealBoxModel, printName, boxCount, 1); - //todo: 打印单子 + //MyPrintHelper.PrintSealBoxData(SealBoxModel, printName, boxCount, 1); + ////todo: 打印单子 if (SendBoxCount != null) SendBoxCount(boxCount); this.Close(); diff --git a/BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml b/BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml index 53fedef3..dd72650e 100644 --- a/BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml +++ b/BBWY.Client/Views/SealBox/ShopSealBoxListControl.xaml @@ -7,6 +7,7 @@ xmlns:ctr="clr-namespace:BBWY.Client.Converters" Background="White" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:BBWY.Client.Views.SealBox" + xmlns:fallware="clr-namespace:BBWY.Client.Views.FallWare" xmlns:cmodel="clr-namespace:BBWY.Client.Models" DataContext="{Binding TaskList,Source={StaticResource Locator}}" xmlns:b="http://schemas.microsoft.com/xaml/behaviors" @@ -71,11 +72,13 @@ - - + + + + + + + \ No newline at end of file diff --git a/BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml b/BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml index 3ed105d8..a33561e1 100644 --- a/BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml +++ b/BBWY.Client/Views/SealBox/UpdateSealBoxConfiguredWindow.xaml @@ -7,7 +7,6 @@ mc:Ignorable="d" xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" xmlns:b="http://schemas.microsoft.com/xaml/behaviors" - Title="修改分箱配置表" Height="500" Width="1024" MinButtonVisibility="Collapsed" MaxButtonVisibility="Collapsed" diff --git a/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml b/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml index 4954fd56..6c739dc7 100644 --- a/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml +++ b/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml @@ -201,6 +201,10 @@ CommandParameter="{Binding TaskId}" Margin=" 5,0,0,0"/> + + + +