diff --git a/BBWY.Client/APIServices/PackTaskService.cs b/BBWY.Client/APIServices/PackTaskService.cs index b15250e7..9c0d5bd7 100644 --- a/BBWY.Client/APIServices/PackTaskService.cs +++ b/BBWY.Client/APIServices/PackTaskService.cs @@ -35,7 +35,7 @@ namespace BBWY.Client.APIServices ) { - return SendRequest(globalContext.QKApiHost, "api/PackTask/SearchNew2PackTaskList", new + return SendRequest(globalContext.QKApiHost, "api/PackTask/SearchNewPackTaskList", new { SkuId = skuId, @@ -59,7 +59,7 @@ namespace BBWY.Client.APIServices ) { - return SendRequest(globalContext.QKApiHost, "api/PackTask/SearchNew2PackTaskList", new + return SendRequest(globalContext.QKApiHost, "api/PackTask/SearchNewPackTaskList", new { IsWorry = isWorry, DepartmentName = departmentName, @@ -95,7 +95,7 @@ namespace BBWY.Client.APIServices { HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost); - string url = $"{globalContext.QKApiHost}/api/PackTask/SearchProductNew?skuId={skuId}&ShopId={globalContext.User.Shop.ShopId}"; + string url = $"{globalContext.QKApiHost}/api/PackTask/SearchProduct?skuId={skuId}&ShopId={globalContext.User.Shop.ShopId}"; var data = helper.Get(url); return JsonConvert.DeserializeObject>(data); @@ -112,7 +112,7 @@ namespace BBWY.Client.APIServices public ApiResponse UpdateTask(CreateTaskRequest createTaskRequest) { - return SendRequest(globalContext.QKApiHost, "api/PackTask/UpdatePackTaskNew", + return SendRequest(globalContext.QKApiHost, "api/PackTask/UpdatePackTask", createTaskRequest , null, HttpMethod.Post); } @@ -132,7 +132,7 @@ namespace BBWY.Client.APIServices public ApiResponse CreateTask(CreateTaskRequest createTaskRequest) { - return SendRequest(globalContext.QKApiHost, "api/PackTask/CreatePackTaskNew", + return SendRequest(globalContext.QKApiHost, "api/PackTask/CreatePackTask", createTaskRequest , null, HttpMethod.Post); } @@ -156,7 +156,7 @@ namespace BBWY.Client.APIServices public ApiResponse SaveCer(CerRequest cerRequest) { - return SendRequest(globalContext.QKApiHost, "api/PackTask/CommitCerNew", cerRequest + return SendRequest(globalContext.QKApiHost, "api/PackTask/CommitCer", cerRequest , null, HttpMethod.Post); } public ApiResponse SaveSpuCer(CerRequest cerRequest) diff --git a/BBWY.Client/BBWYAppSettings.json b/BBWY.Client/BBWYAppSettings.json index e1b3dcff..9622efaf 100644 --- a/BBWY.Client/BBWYAppSettings.json +++ b/BBWY.Client/BBWYAppSettings.json @@ -4,6 +4,6 @@ "MDSApiHost": "http://mdsapi.qiyue666.com", "JOSApiHost": "", "1688ApiHost": "", - "QKApiHost": "http://localhost:8080" - //"QKApiHost": "http://qiku.qiyue666.com" + //"QKApiHost": "http://localhost:8080" + "QKApiHost": "http://qiku.qiyue666.com" } \ No newline at end of file diff --git a/BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs b/BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs index a27a9d28..713ae946 100644 --- a/BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs @@ -48,6 +48,8 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask public BarCodeModel BarCodeModel { get; set; } + + /// /// 合格证信息 /// diff --git a/BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs b/BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs index 57fcaee4..af420084 100644 --- a/BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs @@ -106,25 +106,9 @@ namespace BBWY.Client.ViewModels.PackTask ExportCommand = new RelayCommand(Export); SearchTaskTotal(); - - //LoadShopList(); } - private void LoadShopList() - { - - //departmentList=new List(); - //var response = shopService.GetDepartmentList(); - //if (!response.Success) - // throw new Exception(response.Msg); - //departmentList = response.Data.Map>(); - - - //var shopList = new List(); - //foreach (var d in departmentList) - // shopList.AddRange(d.ShopList); - - } + private void Export() { @@ -213,10 +197,7 @@ namespace BBWY.Client.ViewModels.PackTask private void SearchTaskTotal() { - if (IsBatchChecked) - { - BatchCheck(); - } + PackTaskTotalList = new ObservableCollection(); Task.Factory.StartNew(() => { @@ -233,7 +214,10 @@ namespace BBWY.Client.ViewModels.PackTask PackTaskTotalList.Add(shopTotal); }); } - + if (IsBatchChecked) + { + BatchCheck(); + } } IsLoading = false; diff --git a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs index 4a6a58fa..4479d6eb 100644 --- a/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/PublishTaskViewModel.cs @@ -20,8 +20,8 @@ namespace BBWY.Client.ViewModels.PackTask { public class PublishTaskViewModel : BaseVM, IDenpendency { - - #region 属性 + + #region 属性 private string searchSkuId; public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } } diff --git a/BBWY.Client/Views/MainWindow.xaml b/BBWY.Client/Views/MainWindow.xaml index 9cdc135b..ad6b9b1e 100644 --- a/BBWY.Client/Views/MainWindow.xaml +++ b/BBWY.Client/Views/MainWindow.xaml @@ -26,7 +26,7 @@ - + diff --git a/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml b/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml index 489db23f..1302fa8a 100644 --- a/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml +++ b/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml @@ -29,7 +29,9 @@ Background="{StaticResource Border.Background}"> - + + + diff --git a/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml.cs b/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml.cs index f8a08d1a..c021ac07 100644 --- a/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/LookBarCodeWindow.xaml.cs @@ -23,10 +23,15 @@ namespace BBWY.Client.Views.PackTask { InitializeComponent(); + + } + + public BarCodeModel BarCodeModel { get; set; } public void SetData(BarCodeModel BarCodeModel) { - this.DataContext = BarCodeModel; + this.BarCodeModel = BarCodeModel; + this.DataContext = this; } } } diff --git a/BBWY.Client/Views/PackTask/PackTaskTotal.xaml b/BBWY.Client/Views/PackTask/PackTaskTotal.xaml index ad9ac1aa..aad3fc9b 100644 --- a/BBWY.Client/Views/PackTask/PackTaskTotal.xaml +++ b/BBWY.Client/Views/PackTask/PackTaskTotal.xaml @@ -124,7 +124,9 @@ - + + + @@ -132,26 +134,26 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -171,10 +173,11 @@ - + + - + + + @@ -201,7 +206,6 @@ - @@ -217,7 +221,7 @@ - + @@ -228,70 +232,76 @@ + Margin=" 5,0,0,0"> + + + + + + + Margin=" 5,0,0,0"> + + + + + + - + - - - - - - - + + - + - + - + - - + + - - + + + + - + - - - - - - - + - + + + + - + diff --git a/BBWY.Client/Views/PackTask/PackTaskTotal.xaml.cs b/BBWY.Client/Views/PackTask/PackTaskTotal.xaml.cs index 2ae3eb50..de7764b2 100644 --- a/BBWY.Client/Views/PackTask/PackTaskTotal.xaml.cs +++ b/BBWY.Client/Views/PackTask/PackTaskTotal.xaml.cs @@ -34,10 +34,10 @@ namespace BBWY.Client.Views.PackTask } - public ShopService shopService; + public ShopService shopService; private void Load(object sender, RoutedEventArgs e) { - + var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true); @@ -90,10 +90,7 @@ namespace BBWY.Client.Views.PackTask } } - - List departments = new List(); - private void tb_TextChanged(object sender, TextChangedEventArgs e) { try diff --git a/BBWY.Client/Views/PackTask/PrintWindow.xaml b/BBWY.Client/Views/PackTask/PrintWindow.xaml index 12c39279..cd2c9821 100644 --- a/BBWY.Client/Views/PackTask/PrintWindow.xaml +++ b/BBWY.Client/Views/PackTask/PrintWindow.xaml @@ -7,7 +7,7 @@ xmlns:local="clr-namespace:BBWY.Client.Views.PackTask" mc:Ignorable="d" Style="{StaticResource bwstyle}" - Height="532" Width="486" + Height="525" Width="486" xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:b="http://schemas.microsoft.com/xaml/behaviors" xmlns:ctr="clr-namespace:BBWY.Client.Converters" @@ -18,8 +18,16 @@ MinButtonVisibility="Collapsed" MaxButtonVisibility="Collapsed" RightButtonGroupMargin="0,5,5,0" - ResizeMode="NoResize" > + + + + + + + + + @@ -32,230 +40,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs index 86c4772e..c08d9268 100644 --- a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs @@ -83,25 +83,21 @@ namespace BBWY.Client.Views.PackTask // PrintData data = new PrintData(); if (CertificateModel != null) { - GoodsNumberCerList = new ObservableCollection(); foreach (CertificateModel certificateModel in CertificateModel) GoodsNumberCerList.Add(new GoodsNumberCer { CertificateModel = certificateModel.Copy(), }); - this.DataContext = this; - bar.Visibility = Visibility.Collapsed; cer.Visibility = Visibility.Visible; } - if (BarCodeModel != null) { - this.DataContext = BarCodeModel; cer.Visibility = Visibility.Collapsed; bar.Visibility = Visibility.Visible; } + this.DataContext = this; } public CertificateModel[] CertificateModel { get; set; } @@ -136,7 +132,6 @@ namespace BBWY.Client.Views.PackTask { PrintData(printCount, printName,null,cer); System.Threading.Thread.Sleep(100); - // MyPrintHelper.PrintCertificate(ref args, cer, font); } } @@ -177,7 +172,7 @@ namespace BBWY.Client.Views.PackTask { App.Current.Dispatcher.Invoke(() => { - new TipsWindow("打印失败").ShowDialog(); + new TipsWindow($"打印失败,{ex.Message}").Show(); }); } diff --git a/BBWY.Client/Views/PackTask/PublishTaskWindow.xaml b/BBWY.Client/Views/PackTask/PublishTaskWindow.xaml index aaef69e6..890893c4 100644 --- a/BBWY.Client/Views/PackTask/PublishTaskWindow.xaml +++ b/BBWY.Client/Views/PackTask/PublishTaskWindow.xaml @@ -214,9 +214,9 @@ - + - - + diff --git a/BBWY.Client/Views/PackTask/SetBarCode.xaml.cs b/BBWY.Client/Views/PackTask/SetBarCode.xaml.cs index 32397bc1..56db3411 100644 --- a/BBWY.Client/Views/PackTask/SetBarCode.xaml.cs +++ b/BBWY.Client/Views/PackTask/SetBarCode.xaml.cs @@ -65,16 +65,13 @@ namespace BBWY.Client.Views.PackTask }); if (resData == null || !resData.Success) { - //IsSetBarCode = false; return; } BarCodeModel.Id = resData.Data; if (SaveResult != null) SaveResult(BarCodeModel); - // IsNeedBarCode = "需要"; - //IsSetBarCode = false; - // setBarCodeWindow.Close(); + this.Close(); } diff --git a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs index 492d4cae..74627b12 100644 --- a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs @@ -158,6 +158,7 @@ namespace BBWY.Client.Views.PackTask cer.CertificateModel.Shader = SpuCertificateModel.Shader; cer.CertificateModel.ProductShop = SpuCertificateModel.ProductShop; cer.CertificateModel.ApplyAge = SpuCertificateModel.ApplyAge; + cer.CertificateModel.ProduceDate = SpuCertificateModel.ProduceDate; } diff --git a/BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs b/BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs index 65678572..d12c551e 100644 --- a/BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs @@ -62,11 +62,10 @@ namespace BBWY.Client.Views.PackTask ProductAdress = SpuCertificateModel.ProductAdress, ProductShop = SpuCertificateModel.ProductShop, Shader = SpuCertificateModel.Shader, - SkuId = SpuCertificateModel.SkuId, + //SkuId = SpuCertificateModel.SkuId, ApplyAge = SpuCertificateModel.ApplyAge, - - - + ProduceDate=SpuCertificateModel.ProduceDate, + }); if (resData == null || !resData.Success) {