From 2e3dba49fe7fd48980fa4041795a00cd7b017f6e Mon Sep 17 00:00:00 2001 From: "506583276@qq.com" <506583276@qq.com> Date: Fri, 3 Nov 2023 21:58:57 +0800 Subject: [PATCH] 1 --- .../PackTask/WareHouseListViewModel.cs | 44 +++++++++- .../Views/QualityTask/WaitQualityControl.xaml | 2 +- .../SealBox/SealBoxNoConfigureControl.xaml | 26 ++++-- .../QualityStorePickProductWindow.xaml | 83 +++++++++++++++++++ .../QualityStorePickProductWindow.xaml.cs | 56 +++++++++++++ .../StorePickSelf/StorePickProductWindow.xaml | 8 +- .../StorePickProductWindow.xaml.cs | 12 ++- 7 files changed, 215 insertions(+), 16 deletions(-) create mode 100644 BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml create mode 100644 BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs diff --git a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs index f7cfd837..78c7ffac 100644 --- a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs @@ -654,6 +654,8 @@ namespace BBWY.Client.ViewModels.PackTask StoreGetBySelfCommand = new RelayCommand(StoreGetBySelf); + QualityStoreGetBySelfCommand = new RelayCommand(QualityStoreGetBySelf); + CompletedPackTaskCommand = new RelayCommand(CompletedPackTask); SetWareTypeCommand = new RelayCommand(s => @@ -992,7 +994,6 @@ namespace BBWY.Client.ViewModels.PackTask //Task.Factory.StartNew(() => SearchTaskList()); } - private void StoreGetBySelf(long taskId) { @@ -1026,7 +1027,40 @@ namespace BBWY.Client.ViewModels.PackTask Task.Factory.StartNew(() => SearchTaskList()); return true; - }); + },false); + sorePickProductWindow.ShowDialog(); + + + + } + + private void QualityStoreGetBySelf(long taskId) + { + var data = packTaskService.GetStoreGetSelfData(taskId); + if (!data.Success) + { + MessageBox.Show(data?.Msg); + return; + } + StorePickProductWindow sorePickProductWindow = new StorePickProductWindow(data.Data, (count, UserName) => + { + + var res = packTaskService.StoreGetBySelfV2(taskId, count, UserName); + if (res == null) + { + return false; + } + if (!res.Success) + { + System.Windows.MessageBox.Show(res.Msg, "错误信息"); + return false; + } + + + Task.Factory.StartNew(() => SearchTaskList()); + + return true; + },true); sorePickProductWindow.ShowDialog(); @@ -1252,6 +1286,12 @@ namespace BBWY.Client.ViewModels.PackTask public ICommand StoreGetBySelfCommand { get; set; } + /// + /// 商家自取(未验收) + /// + public ICommand QualityStoreGetBySelfCommand { get; set; } + + /// /// 加载事件(待封箱) /// diff --git a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml index 386a9875..94ab3e64 100644 --- a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml +++ b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml @@ -613,7 +613,7 @@ diff --git a/BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml b/BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml index bf2cd02f..e2ead9d4 100644 --- a/BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml +++ b/BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml @@ -38,16 +38,16 @@ - + - - - + + + @@ -86,7 +86,7 @@ - + @@ -112,7 +112,7 @@ Command="{Binding DataContext.LoadSkuDataCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" CommandParameter="{Binding}" /> - + @@ -125,12 +125,12 @@ - + - @@ -141,6 +141,7 @@ + @@ -226,6 +227,13 @@ HorizontalAlignment="Center" VerticalAlignment="Center" /> + + + + @@ -236,7 +244,7 @@ - + diff --git a/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml b/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml new file mode 100644 index 00000000..f244f785 --- /dev/null +++ b/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs b/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs new file mode 100644 index 00000000..0c365241 --- /dev/null +++ b/BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs @@ -0,0 +1,56 @@ +using BBWY.Client.Models.PackTask; +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; + +namespace BBWY.Client.Views.StorePickSelf +{ + /// + /// QualityStorePickProductWindow.xaml 的交互逻辑 + /// + public partial class QualityStorePickProductWindow : BWindow + { + public QualityStorePickProductWindow(StoreGetSelfResponse model, Func SaveData) + { + InitializeComponent(); + StoreGetSelfResponse = model; + InitializeComponent(); + this.DataContext = this; + } + private string userName; + /// + /// 用户名 + /// + 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.Invoke(Count, UserName)) + { + this.Close(); + } + + } + private Func SaveData { get; set; } + private void BButton_Click_1(object sender, RoutedEventArgs e) + { + Count = StoreGetSelfResponse.PickMaxCount; + } + } +} diff --git a/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml b/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml index 183ce15a..671a191c 100644 --- a/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml +++ b/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml @@ -22,8 +22,8 @@ - + Background="{StaticResource Button.Background}"> + @@ -33,7 +33,9 @@ - + + + diff --git a/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs b/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs index 6ce46085..f2f3b603 100644 --- a/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs +++ b/BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs @@ -22,13 +22,23 @@ namespace BBWY.Client.Views.StorePickSelf /// public partial class StorePickProductWindow : BWindow { - public StorePickProductWindow(StoreGetSelfResponse model, Func SaveData) + public StorePickProductWindow(StoreGetSelfResponse model, Func SaveData,bool _isQuality) { this. SaveData=SaveData; StoreGetSelfResponse =model; InitializeComponent(); this.DataContext = this; + + IsQuality = _isQuality; } + + private bool isQuality; + + public bool IsQuality { get => isQuality; set { Set(ref isQuality, value); } } + + + + private string userName; /// /// 用户名