From a559b3023a2caa598ce017f2185f726e093d1e96 Mon Sep 17 00:00:00 2001
From: "506583276@qq.com" <506583276@qq.com>
Date: Mon, 26 Jun 2023 13:39:14 +0800
Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=B0=81=E7=AE=B1id?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BBWY.Client/App.xaml | 2 +
.../Converters/TaskStateToBooleanConvert.cs | 65 +++++++++
BBWY.Client/GlobalContext.cs | 2 +-
.../ViewModels/PackTask/TaskListViewModel.cs | 6 +-
.../PackTask/WareHouseListViewModel.cs | 64 ++++-----
.../FallWare/FallWareConfiguredControl.xaml | 16 ++-
.../FallWareWaitConfigureControl.xaml | 17 ++-
.../Views/FallWare/WaitFallWareControl.xaml | 31 ++--
BBWY.Client/Views/PackTask/TaskList.xaml | 46 ++++--
BBWY.Client/Views/PackTask/WareHouseList.xaml | 45 ++++--
.../SealBox/SealBoxConfiguredControl.xaml | 10 +-
.../SealBox/SealBoxNoConfigureControl.xaml | 136 ++++++++----------
.../SealBox/SealBoxWaitConfigureControl.xaml | 6 +-
.../Views/SealBox/WaitSealBoxControl.xaml | 21 +--
14 files changed, 293 insertions(+), 174 deletions(-)
create mode 100644 BBWY.Client/Converters/TaskStateToBooleanConvert.cs
diff --git a/BBWY.Client/App.xaml b/BBWY.Client/App.xaml
index 0b5c1eed..fe8e1f96 100644
--- a/BBWY.Client/App.xaml
+++ b/BBWY.Client/App.xaml
@@ -24,6 +24,8 @@
+
+
diff --git a/BBWY.Client/Converters/TaskStateToBooleanConvert.cs b/BBWY.Client/Converters/TaskStateToBooleanConvert.cs
new file mode 100644
index 00000000..571f912a
--- /dev/null
+++ b/BBWY.Client/Converters/TaskStateToBooleanConvert.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Windows.Data;
+
+namespace BBWY.Client.Converters
+{
+ public class TaskStateToBooleanConvert : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ string[] parray = parameter.ToString().ToLower().Split(':');//参数拆分
+ string valueStr = value == null ? string.Empty : value.ToString().ToLower();
+ string returnValue = string.Empty;
+ try
+ {
+ if (string.IsNullOrEmpty(valueStr))
+ {
+ returnValue = parray[0].Contains("#null") ? parray[1] : parray[2];
+ }
+ else if (parray[0].Contains("|"))
+ {
+ returnValue = parray[0].Split('|').Contains(valueStr) ? parray[1] : parray[2];
+ }
+ else
+ {
+ returnValue = parray[0].Equals(valueStr) ? parray[1] : parray[2];
+ }
+ if (returnValue.Equals("#source", StringComparison.CurrentCultureIgnoreCase))
+ return value;
+ return returnValue;
+ }
+ catch (Exception ex)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine($"ObjectConverter {ex.Message} {parameter}");
+ Console.ResetColor();
+ }
+ return parray[2];
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var returnValue = "otherValue";
+ string[] parray = parameter.ToString().ToLower().Split(':');
+ if (value == null)
+ return returnValue;
+ var valueStr = value.ToString().ToLower();
+ if (valueStr != parray[1])
+ return returnValue;
+ else
+ {
+ var resData = parray[0].Contains('|') ? parray[0].Split('|')[0] : parray[0];
+ if (resData == "#null")
+ {
+ return null;
+ }
+ return resData;
+ }
+
+ }
+ }
+}
diff --git a/BBWY.Client/GlobalContext.cs b/BBWY.Client/GlobalContext.cs
index b1901f46..0038ddfd 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 = "10134";
+ ClientVersion = "10135";
}
private User user;
diff --git a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
index d8df6827..1e1c5dea 100644
--- a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
@@ -123,13 +123,13 @@ namespace BBWY.Client.ViewModels.PackTask
private string searchSkuId;
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } }
- public TaskState? taskState;
+ private TaskState? taskState;
///
/// 任务状态
///
public TaskState? TaskState
{
- get => taskState; private set
+ get => taskState; set
{
Set(ref taskState, value);
}
@@ -578,7 +578,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
else
{
- MessageBox.Show("查不到数据");
+ if (datas != null) System.Windows.MessageBox.Show(datas.Msg);
}
IsLoadCount();
diff --git a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
index 479ece99..9f917b6b 100644
--- a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
+++ b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
@@ -121,13 +121,13 @@ namespace BBWY.Client.ViewModels.PackTask
private string searchSkuId;
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } }
- public TaskState? taskState;
+ private TaskState? taskState;
///
/// 任务状态
///
public TaskState? TaskState
{
- get => taskState; private set
+ get => taskState; set
{
Set(ref taskState, value);
}
@@ -266,6 +266,7 @@ namespace BBWY.Client.ViewModels.PackTask
IsLoading = false;
SetTaskStatusCommand = new RelayCommand