From 9fa4ea280a5ff84b6d7b825553c391ec9543b756 Mon Sep 17 00:00:00 2001
From: shanj <18996038927@163.com>
Date: Thu, 22 Sep 2022 03:50:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E5=8D=95=E7=BB=84=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BBWY.Client/APIServices/StatisticsService.cs | 4 +-
BBWY.Client/App.xaml.cs | 4 +-
BBWY.Client/Resources/Themes/Path.xaml | 4 ++
BBWY.Client/ViewModels/MainViewModel.cs | 17 +++--
.../ViewModels/Order/OrderListViewModel.cs | 26 +++++---
.../Order/OrderListViewModel_SDGroup.cs | 6 +-
BBWY.Client/Views/Order/SDGroup.xaml | 18 ++++-
.../Views/SelectShop/SelectShopDialog.xaml | 62 +++++++++++++++++
.../Views/SelectShop/SelectShopDialog.xaml.cs | 66 +++++++++++++++++++
.../SelectShopW.xaml} | 2 +-
.../SelectShopW.xaml.cs} | 4 +-
11 files changed, 187 insertions(+), 26 deletions(-)
create mode 100644 BBWY.Client/Views/SelectShop/SelectShopDialog.xaml
create mode 100644 BBWY.Client/Views/SelectShop/SelectShopDialog.xaml.cs
rename BBWY.Client/Views/{SelectShop.xaml => SelectShop/SelectShopW.xaml} (98%)
rename BBWY.Client/Views/{SelectShop.xaml.cs => SelectShop/SelectShopW.xaml.cs} (91%)
diff --git a/BBWY.Client/APIServices/StatisticsService.cs b/BBWY.Client/APIServices/StatisticsService.cs
index 5d81087e..4c60ec25 100644
--- a/BBWY.Client/APIServices/StatisticsService.cs
+++ b/BBWY.Client/APIServices/StatisticsService.cs
@@ -17,11 +17,11 @@ namespace BBWY.Client.APIServices
/// 今日业绩统计
///
///
- public ApiResponse GetTodayAchievementStatistics(DateTime startTime, DateTime endTime)
+ public ApiResponse GetTodayAchievementStatistics(DateTime startTime, DateTime endTime,long shopId)
{
return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetOrderAchievementStatistics", new
{
- globalContext.User.Shop.ShopId,
+ shopId,
startTime,
endTime
},
diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs
index c2bdb51a..b66a121a 100644
--- a/BBWY.Client/App.xaml.cs
+++ b/BBWY.Client/App.xaml.cs
@@ -31,10 +31,10 @@ namespace BBWY.Client
string userToken = string.Empty;
#if DEBUG
//齐越山鸡
- userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw";
+ //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw";
//刷单组测试
- //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs";
+ userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs";
//齐越愉辰
//userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTEyNDU1MzExNDYyNDAwIiwidGVhbUlkIjoiMTQzOTg5ODYxNzM1ODg0ODAwMCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUwNDA0ODZ9.0TvEhPzTeKvpQY31E5YhgfvRBJHYdvwWRrEHNnF9kkA";
//齐越悠仁
diff --git a/BBWY.Client/Resources/Themes/Path.xaml b/BBWY.Client/Resources/Themes/Path.xaml
index 53260ddb..16ab78e7 100644
--- a/BBWY.Client/Resources/Themes/Path.xaml
+++ b/BBWY.Client/Resources/Themes/Path.xaml
@@ -34,4 +34,8 @@
+
+
\ No newline at end of file
diff --git a/BBWY.Client/ViewModels/MainViewModel.cs b/BBWY.Client/ViewModels/MainViewModel.cs
index b24cd428..36b850c1 100644
--- a/BBWY.Client/ViewModels/MainViewModel.cs
+++ b/BBWY.Client/ViewModels/MainViewModel.cs
@@ -192,11 +192,13 @@ namespace BBWY.Client.ViewModels
CreateMenu();
- if (GlobalContext.User.TeamName == "刷单组")
- return;
+ //if (GlobalContext.User.TeamName == "刷单组")
+ // return;
IList departmentList = null;
- if (managerDepartment.Contains(GlobalContext.User.TeamName) || managerDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
+ if (GlobalContext.User.TeamName == "刷单组" ||
+ managerDepartment.Contains(GlobalContext.User.TeamName) ||
+ managerDepartment.Any(m => GlobalContext.User.SonDepartmentNames.Contains(m)))
{
ShowShopChoosePanel = true;
var response = shopService.GetDepartmentList();
@@ -221,11 +223,14 @@ namespace BBWY.Client.ViewModels
else
ShowShopChoosePanel = true;
}
-
GlobalContext.User.DepartmentList = departmentList;
+
+ if (GlobalContext.User.TeamName == "刷单组")
+ return;
+
App.Current.Dispatcher.Invoke(() =>
{
- var selectShop = new SelectShop(departmentList);
+ var selectShop = new SelectShopW(departmentList);
if (selectShop.ShowDialog() == true)
{
ChooseShop(selectShop.Shop, true);
@@ -250,7 +255,7 @@ namespace BBWY.Client.ViewModels
{
try
{
- var selectShop = new SelectShop(GlobalContext.User.DepartmentList);
+ var selectShop = new SelectShopW(GlobalContext.User.DepartmentList);
if (selectShop.ShowDialog() == true)
{
ChooseShop(selectShop.Shop, true);
diff --git a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
index e1d71119..98dfdce0 100644
--- a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
+++ b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
@@ -45,7 +45,7 @@ namespace BBWY.Client.ViewModels
private bool excludeCanceled;
private bool onlyUnhandle;
private Random random;
- private GlobalContext globalContext;
+ public GlobalContext globalContext { get; set; }
private bool? includeAfterOrder;
private bool includeExceptionOrder;
private decimal currentConditionsTotalProfit;
@@ -58,7 +58,7 @@ namespace BBWY.Client.ViewModels
public IList OrderList { get; set; }
- public IList AfterSaleOrderList { get; set; }
+ public IList AfterSaleOrderList { get; set; }
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
@@ -181,7 +181,6 @@ namespace BBWY.Client.ViewModels
{
PageIndex = 1;
Task.Factory.StartNew(() => LoadOrder(1)); //手动点击查询订单
- Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
SyncOrderCommand = new RelayCommand(SyncOrder);
CopyTextCommand = new RelayCommand(s =>
@@ -205,12 +204,10 @@ namespace BBWY.Client.ViewModels
StartDate = DateTime.Now.Date.AddDays(d * -1);
PageIndex = 1;
Task.Factory.StartNew(() => LoadOrder(1)); //点击日期查询订单
- Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
OrderPageIndexChangedCommand = new RelayCommand(p =>
{
Task.Factory.StartNew(() => LoadOrder(p.PageIndex));
- Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
DecodeConsigneeCommand = new RelayCommand(DecodeConsignee);
ChooseStorageTypeCommand = new RelayCommand