From 61072fa45bf43d3325c41225349b84099a42d176 Mon Sep 17 00:00:00 2001 From: "506583276@qq.com" <506583276@qq.com> Date: Sun, 11 Jun 2023 16:19:08 +0800 Subject: [PATCH] 1 --- BBWY.Client/Models/PackTask/CertificateModel.cs | 16 +++++++++++----- .../ViewModels/QualityTask/QualityViewModel.cs | 6 ++++-- BBWY.Client/Views/PackTask/LookCerWindow.xaml | 2 +- BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs | 8 ++++++++ BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs | 2 +- BBWY.Client/Views/QualityTask/QualityWindow.xaml | 6 +++--- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/BBWY.Client/Models/PackTask/CertificateModel.cs b/BBWY.Client/Models/PackTask/CertificateModel.cs index 437d9a1a..91c03978 100644 --- a/BBWY.Client/Models/PackTask/CertificateModel.cs +++ b/BBWY.Client/Models/PackTask/CertificateModel.cs @@ -12,9 +12,6 @@ namespace BBWY.Client.Models /// 合格证id /// public long Id { get; set; } - - - /// /// skuid /// @@ -142,11 +139,20 @@ namespace BBWY.Client.Models - private int goodsNumber = 1; + private long goodsNumber = 1; + /// + /// 配件序号 + /// + public long GoodsNumber { get => goodsNumber; set { Set(ref goodsNumber, value); } } + + + + private int goodsNumberIndex = 1; /// /// 配件序号 /// - public int GoodsNumber { get => goodsNumber; set { Set(ref goodsNumber, value); } } + public int GoodsNumberIndex { get => goodsNumberIndex; set { Set(ref goodsNumberIndex, value); } } + private string produceDate; /// diff --git a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs index f645f141..e91ac724 100644 --- a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs +++ b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs @@ -731,7 +731,7 @@ namespace BBWY.Client.ViewModels if (packTaskRes == null || !packTaskRes.Success) return; BarCodeModel = packTaskRes.Data.BarCodeDTO; IsNeedBarCode = packTaskRes.Data.IsNeedBar ? Need.需要 : Need.不需要; - IsSetBarCode = packTaskRes.Data.IsNeedBar ? false : true; + IsSetBarCode = packTaskRes.Data.BarCodeDTO==null ? true:false; IsNeedCertificateModel = packTaskRes.Data.IsNeedCer ? Need.需要 : Need.不需要; if (packTaskRes.Data.WareHourses != null) packTaskRes.Data.WareHourses.ToList().ForEach(w => @@ -742,9 +742,11 @@ namespace BBWY.Client.ViewModels if (packTaskRes.Data.PurchaseSkus != null) { - + int goodsIndex = 0; foreach (var item in packTaskRes.Data.PurchaseSkus) { + goodsIndex++; + if (item.CerDTO != null) item.CerDTO.GoodsNumberIndex = goodsIndex; item.IsSetCertificate = true; if (string.IsNullOrEmpty(item.PurchaseProductId)) { diff --git a/BBWY.Client/Views/PackTask/LookCerWindow.xaml b/BBWY.Client/Views/PackTask/LookCerWindow.xaml index d7893ee0..d6d90724 100644 --- a/BBWY.Client/Views/PackTask/LookCerWindow.xaml +++ b/BBWY.Client/Views/PackTask/LookCerWindow.xaml @@ -44,7 +44,7 @@ - + diff --git a/BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs b/BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs index f5ff0e73..37631eae 100644 --- a/BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs @@ -29,11 +29,19 @@ namespace BBWY.Client.Views.PackTask InitializeComponent(); GoodsNumberCerList = new ObservableCollection(); + int goodsNumberIndex = 0; foreach (CertificateModel certificateModel in certificate) + { + goodsNumberIndex++; + certificateModel.GoodsNumberIndex = goodsNumberIndex; GoodsNumberCerList.Add(new GoodsNumberCer { CertificateModel = certificateModel.Copy(), + + }); + } + this.DataContext = this; } diff --git a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs index 55073097..fb46342b 100644 --- a/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs @@ -139,7 +139,7 @@ namespace BBWY.Client.Views.PackTask setSpuCerWindow.Show(); } - int selectCer = -1;//tabcontrol 选中事件 + long selectCer = -1;//tabcontrol 选中事件 private void InseartCer_Click(object sender, RoutedEventArgs e) { if (IsSetSpuCertificate) diff --git a/BBWY.Client/Views/QualityTask/QualityWindow.xaml b/BBWY.Client/Views/QualityTask/QualityWindow.xaml index a307c095..4136005c 100644 --- a/BBWY.Client/Views/QualityTask/QualityWindow.xaml +++ b/BBWY.Client/Views/QualityTask/QualityWindow.xaml @@ -212,7 +212,7 @@ ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ItemsSource="{Binding PurchaseSkuList,Mode=TwoWay}" BorderBrush="{StaticResource Border.Brush}" - BorderThickness="0" Visibility="{Binding OrderId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" + BorderThickness="0" Visibility="{Binding SkuPurchaseSchemeId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" Foreground="{StaticResource Text.Color}"> @@ -316,7 +316,7 @@ ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ItemsSource="{Binding PurchaseSkuList,Mode=TwoWay}" BorderBrush="{StaticResource Border.Brush}" - BorderThickness="0" Visibility="{Binding OrderId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" + BorderThickness="0" Visibility="{Binding SkuPurchaseSchemeId,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" Foreground="{StaticResource Text.Color}"> @@ -331,7 +331,7 @@ - +