diff --git a/BBWY.Client/APIServices/ProductService.cs b/BBWY.Client/APIServices/ProductService.cs index 1e4fbda8..7862bd24 100644 --- a/BBWY.Client/APIServices/ProductService.cs +++ b/BBWY.Client/APIServices/ProductService.cs @@ -28,22 +28,7 @@ namespace BBWY.Client.APIServices null, HttpMethod.Post); } - public ApiResponse> GetProductSkuList(string spu, string sku,Platform platform,string appKey,string appSecret,string appToken) - { - return SendRequest>(globalContext.BBYWApiHost, - "api/product/GetProductSkuList", - new - { - Spu = spu, - Sku = sku, - Platform = platform, - AppKey = appKey, - AppSecret = appSecret, - AppToken = appToken - }, - null, - HttpMethod.Post); - } + public ApiResponse> GetProductSkuList(string spu, string sku) { return SendRequest>(globalContext.BBYWApiHost, @@ -61,6 +46,25 @@ namespace BBWY.Client.APIServices HttpMethod.Post); } + + + + public ApiResponse> GetProductSkuList(string spu, string sku, Platform platform, string appKey, string appSecret, string appToken) + { + return SendRequest>(globalContext.BBYWApiHost, + "api/product/GetProductSkuList", + new + { + Spu = spu, + Sku = sku, + Platform = platform, + AppKey = appKey, + AppSecret = appSecret, + AppToken = appToken + }, + null, + HttpMethod.Post); + } public ApiResponse GetProductList(string spu, string productName, string productItem, int pageIndex, Platform platform, string appKey, string appSecret, string appToken) { return SendRequest(globalContext.BBYWApiHost, diff --git a/BBWY.Client/BBWYAppSettings.json b/BBWY.Client/BBWYAppSettings.json index 0bc0e98f..34888905 100644 --- a/BBWY.Client/BBWYAppSettings.json +++ b/BBWY.Client/BBWYAppSettings.json @@ -5,5 +5,5 @@ "JOSApiHost": "", "1688ApiHost": "", "QKApiHost": "http://localhost:8080" - // "QKApiHost": "http://qiku.qiyue666.com" + // "QKApiHost": "http://qiku.qiyue666.com" } \ No newline at end of file diff --git a/BBWY.Client/GlobalContext.cs b/BBWY.Client/GlobalContext.cs index 958a3ea9..3973e2e7 100644 --- a/BBWY.Client/GlobalContext.cs +++ b/BBWY.Client/GlobalContext.cs @@ -13,7 +13,7 @@ namespace BBWY.Client { ShopServiceGroupList = new List(); ShopServiceGroupLowerList = new List(); - ClientVersion = "10169"; + ClientVersion = "10170"; } private User user; diff --git a/BBWY.Client/Models/Enums.cs b/BBWY.Client/Models/Enums.cs index 1f1b648d..e1dc1816 100644 --- a/BBWY.Client/Models/Enums.cs +++ b/BBWY.Client/Models/Enums.cs @@ -554,4 +554,11 @@ 需修改 = 2 } + + public enum QualityLookState + { + + } + + } diff --git a/BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs b/BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs index c85ef211..3d255f19 100644 --- a/BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/UpdatePurchaseTaskViewModel.cs @@ -436,7 +436,7 @@ namespace BBWY.Client.ViewModels.PackTask if (!string.IsNullOrEmpty(BrandName)) model.CerDTO.BrandName = BrandName; - QualitySetCerWindow setCerWindow = new QualitySetCerWindow(); + QualitySetCerWindow setCerWindow = new QualitySetCerWindow(false); setCerWindow.LoadData(model.IsNeedCer, model.CerDTO, packPurchaseTaskService, spuCertificateModel, IsSetSpuCertificate, SaveType); setCerWindow.SaveResult = (s, PackCerState) => { diff --git a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs index 3449aee4..fd37402b 100644 --- a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs +++ b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs @@ -585,7 +585,8 @@ namespace BBWY.Client.ViewModels if (!string.IsNullOrEmpty(BrandName)) model.CerDTO.BrandName = BrandName; - QualitySetCerWindow setCerWindow = new QualitySetCerWindow(); + + QualitySetCerWindow setCerWindow = new QualitySetCerWindow(model.IsSetCertificate); setCerWindow.LoadData(model.IsNeedCer, model.CerDTO, packPurchaseTaskService, spuCertificateModel, IsSetSpuCertificate, saveType); setCerWindow.SaveResult = (s, PackCerState) => { diff --git a/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml b/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml index 970feb65..1b447b05 100644 --- a/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml +++ b/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml @@ -42,7 +42,221 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs b/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs index 9ce656c1..018aca22 100644 --- a/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs +++ b/BBWY.Client/Views/QualityTask/QualitySetCerWindow.xaml.cs @@ -16,6 +16,9 @@ using System.Windows.Shapes; using BBWY.Client.Extensions; using BBWY.Client.APIServices; using BBWY.Controls; +using System.DirectoryServices.ActiveDirectory; +using System.Threading; +using System.Threading.Tasks; namespace BBWY.Client.Views.QualityTask { @@ -24,10 +27,73 @@ namespace BBWY.Client.Views.QualityTask /// public partial class QualitySetCerWindow : BWindow { - public QualitySetCerWindow() + + public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } + + private bool isLoading; + + private bool isShowProductAdress=false; + public bool IsShowProductAdress { get => isShowProductAdress; set {Set(ref isShowProductAdress,value); } } + + private bool isShowShader = false; + public bool IsShowShader { get => isShowShader; set { Set(ref isShowShader, value); } } + private bool isShowProductShop = false; + public bool IsShowProductShop { get => isShowProductShop; set { Set(ref isShowProductShop, value); } } + + private bool isShowExcuteStander = false; + public bool IsShowExcuteStander { get => isShowExcuteStander; set { Set(ref isShowExcuteStander, value); } } + + + + public QualitySetCerWindow( bool IsQualityTask) { InitializeComponent(); SetPackCerStateCommand = new RelayCommand(SetPackCerState); + ShowDataCommand = new RelayCommand(ShowData); + if (IsQualityTask) + { + IsShowShader = true; + IsShowExcuteStander = true; + IsShowProductShop = true; + IsShowProductAdress = true; + } + + } + + private void ShowData(string obj) + { + if (IsLoading) + { + return; + } + if (obj== "材质") + { + IsShowShader = false; + } + if (obj == "生产商") + { + IsShowProductShop = false; + } + if (obj == "执行标准") + { + IsShowExcuteStander = false; + } + if (obj == "地址") + { + IsShowProductAdress = false; + } + IsLoading = true; + + Task.Factory.StartNew(() => { + Thread.Sleep(1000); + IsLoading = false; + + }); + + + + + } private void SetPackCerState(PackCerState obj) @@ -47,6 +113,9 @@ namespace BBWY.Client.Views.QualityTask public SaveType? SaveType { get; set; } public ICommand SetPackCerStateCommand { get; set; } + public ICommand ShowDataCommand { get; set; } + + public PackCerState PackCerState { @@ -69,6 +138,7 @@ namespace BBWY.Client.Views.QualityTask public bool IsSetSpuCertificate { get; set; } public PackPurchaseTaskService packTaskService { get; set; } public CertificateModel CertificateModel { get; set; } + public CertificateModel SpuCertificateModel { get; set; } public Action SaveResult { get; set; } @@ -77,12 +147,20 @@ namespace BBWY.Client.Views.QualityTask private void save_btn_Click(object sender, RoutedEventArgs e) { + if (PackCerState== PackCerState.无需合格证) { if (SaveResult != null) SaveResult(CertificateModel, PackCerState); this.Close(); return; } + + + + + + + if (string.IsNullOrEmpty(CertificateModel.ExcuteStander) || string.IsNullOrEmpty(CertificateModel.Shader) || string.IsNullOrEmpty(CertificateModel.BrandName) || string.IsNullOrEmpty(CertificateModel.Brand) || string.IsNullOrEmpty(CertificateModel.ProductShop) @@ -107,6 +185,33 @@ namespace BBWY.Client.Views.QualityTask MessageBox.Show("适用年龄不能为空"); return; } + + + if (IsShowShader) + { + MessageBox.Show("请先确认材质"); + return; + } + + if (IsShowProductShop) + { + MessageBox.Show("请先确认生产商"); + return; + } + if (IsShowExcuteStander) + { + MessageBox.Show("请先确认执行标准"); + return; + } + + if (IsShowProductAdress) + { + MessageBox.Show("请先确认地址"); + return; + } + + + var standers = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); var resData = packTaskService.SaveCer(new CerRequest { diff --git a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml index 756c4030..386a9875 100644 --- a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml +++ b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml @@ -194,8 +194,6 @@ --> - -