From 2baf8ffc3a26b3f8204736aa586d0ea1ebaea4a2 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Thu, 24 Oct 2024 13:28:56 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=BD=E5=B1=89=E5=8A=A0?=
=?UTF-8?q?=E8=8D=AF=E4=B8=8E=E6=8A=BD=E5=B1=89=E5=8F=96=E8=8D=AF=E6=97=B6?=
=?UTF-8?q?=E5=BC=80=E8=8D=AF=E7=9B=92=E5=AD=97=E6=AE=B5=E5=88=97=E7=9A=84?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8E=E9=9A=90=E8=97=8F=EF=BC=8C=E6=8A=BD?=
=?UTF-8?q?=E5=B1=89=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=98=AF=E8=8D=AF=E7=9B=92?=
=?UTF-8?q?=E7=9A=84=E5=88=99=E5=BC=80=E8=8D=AF=E7=9B=92=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=88=97=E4=B8=8D=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DM_Weight/Converter/OpenBoxConverter.cs | 4 ++--
DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs | 7 +++++++
DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs | 9 ++++++++-
DM_Weight/Views/DrawerAddDrugWindow.xaml | 10 ++++++----
DM_Weight/Views/DrawerTakeDrugWindow.xaml | 7 +++++--
5 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/DM_Weight/Converter/OpenBoxConverter.cs b/DM_Weight/Converter/OpenBoxConverter.cs
index 75beeb7..0e69327 100644
--- a/DM_Weight/Converter/OpenBoxConverter.cs
+++ b/DM_Weight/Converter/OpenBoxConverter.cs
@@ -13,8 +13,8 @@ namespace DM_Weight.Converter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- int status = int.Parse(value.ToString());
- if(status == 3||status==35)
+ bool status = bool.Parse(value.ToString());
+ if(status)
{
return Visibility.Visible;
}
diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
index 8e00c99..fc76775 100644
--- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
@@ -33,6 +33,13 @@ namespace DM_Weight.ViewModels
set => SetProperty(ref _channelStocks, value);
}
+ private bool _openBoxVisibility = false;
+ public bool OpenBoxVisibility
+ {
+ get => _openBoxVisibility;
+ set=>SetProperty(ref _openBoxVisibility, value);
+ }
+
private static readonly DateTime Jan1st1970 = new DateTime
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
diff --git a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
index 8409556..5427c0e 100644
--- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
@@ -39,7 +39,12 @@ namespace DM_Weight.ViewModels
private static readonly DateTime Jan1st1970 = new DateTime
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
-
+ private bool _openBoxVisibility=false;
+ public bool OpenBoxVisibility
+ {
+ get => _openBoxVisibility;
+ set => SetProperty(ref _openBoxVisibility, value);
+ }
private PortUtil _portUtil;
IEventAggregator _eventAggregator;
@@ -445,6 +450,8 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.Quantity > 0)
.OrderBy(cs => cs.ColNo)
.ToList();
+
+ OpenBoxVisibility = queryData[0].BoardType == 3 ? true : queryData[0].BoardType == 35 ? true : false ;
ChannelStocks = queryData;
}
diff --git a/DM_Weight/Views/DrawerAddDrugWindow.xaml b/DM_Weight/Views/DrawerAddDrugWindow.xaml
index b92d110..bc94b4d 100644
--- a/DM_Weight/Views/DrawerAddDrugWindow.xaml
+++ b/DM_Weight/Views/DrawerAddDrugWindow.xaml
@@ -12,8 +12,10 @@
+
-
+
+
@@ -21,7 +23,7 @@
-
+
@@ -295,8 +297,8 @@
-
+
diff --git a/DM_Weight/Views/DrawerTakeDrugWindow.xaml b/DM_Weight/Views/DrawerTakeDrugWindow.xaml
index 6390bac..c741bb1 100644
--- a/DM_Weight/Views/DrawerTakeDrugWindow.xaml
+++ b/DM_Weight/Views/DrawerTakeDrugWindow.xaml
@@ -15,12 +15,15 @@
+
+
+
@@ -200,7 +203,7 @@
-
+