diff --git a/29WxOrderWpf/29WxOrderWpf.csproj b/29WxOrderWpf/29WxOrderWpf.csproj
index 54e45be..6f84b3f 100644
--- a/29WxOrderWpf/29WxOrderWpf.csproj
+++ b/29WxOrderWpf/29WxOrderWpf.csproj
@@ -85,6 +85,7 @@
+
OrderListRowCtrl.xaml
@@ -107,6 +108,7 @@
Icons.xaml
+
UcWindowBoxes.xaml
@@ -187,6 +189,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/29WxOrderWpf/App.xaml b/29WxOrderWpf/App.xaml
index aa1c3d6..34882f3 100644
--- a/29WxOrderWpf/App.xaml
+++ b/29WxOrderWpf/App.xaml
@@ -2,9 +2,12 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:_29WxOrderWpf"
+ xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
StartupUri="MainWindow.xaml">
+
+
diff --git a/29WxOrderWpf/Converters/VisibleToVisibilityConverter.cs b/29WxOrderWpf/Converters/VisibleToVisibilityConverter.cs
new file mode 100644
index 0000000..e89410c
--- /dev/null
+++ b/29WxOrderWpf/Converters/VisibleToVisibilityConverter.cs
@@ -0,0 +1,24 @@
+using NaiBa.Util.Extension;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace _29WxOrderWpf.Converters
+{
+ public class VisibleToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value.ParseToBool() ? Visibility.Visible : Visibility.Collapsed;
+ }
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException(); // 单向绑定可不实现
+ }
+ }
+}
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
index 434f0d3..66da706 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
@@ -9,10 +9,7 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Loaded="Window_Loaded">
-
-
-
-
+
@@ -26,7 +23,6 @@
-
@@ -35,14 +31,28 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -74,7 +84,7 @@
-
+
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
index b2cc5d6..107ebc9 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
@@ -1,4 +1,5 @@
-using AllBase;
+using _29WxOrderWpf.BaseWindows;
+using AllBase;
using AllBase.Extension;
using AllBase.Helper;
using AllBase.Model;
@@ -48,8 +49,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
//dgOrder.Items.Add(1111111);
//dgOrder.ItemsSource = lstOrder;
-
//lbxOrder.ItemsSource = lstOrder;
+
+ dateStart.SelectedDate = DateTime.Now.Date.AddDays(-30);
+ dateEnd.SelectedDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
+
Task.Run(() =>
{
while (!MainWindow.Instance.hasReadShop)
@@ -78,6 +82,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
int page = 0;
int totalPage = 1;
+ int pageSize = 50;
+
while (true)
{
if (page >= totalPage)
@@ -88,8 +94,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
page++;
var url = BaseClass.Build29WxObjString("order/get_order_list");
var data = UserLogin.GetSignaturex() + "&page=" + page;
+ data += "&page_size=" + pageSize;
var shop_id = string.Join(",", GlobalConfig.ShopLoginList.Select(s => s.ErpShopId).Where(s => !s.IsNullOrEmpty()));
- data += "&erp_shop_id_in=" + shop_id;
Dispatcher.Invoke(new Action(() =>
{
if (!string.IsNullOrEmpty(txtShopName.Text.Trim()))
@@ -97,6 +103,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var shopNames = txtShopName.Text.Trim().Split(';').Where(s => !s.IsNullOrEmpty()).ToList();
shop_id = string.Join(",", GlobalConfig.ShopLoginList.Where(s => shopNames.Contains(s.ShopAccount)).Select(s => s.ErpShopId).Where(s => !s.IsNullOrEmpty()));
}
+ var startTime = BaseClass.DateTimeToTimestampSeconds(dateStart.SelectedDate.Value);
+ var endTime = BaseClass.DateTimeToTimestampSeconds(dateEnd.SelectedDate.Value);
+ data += "&erp_shop_id_in=" + shop_id;
+ data += "&start_time=" + startTime;
+ data += "&end_time=" + endTime;
}));
Thread.Sleep(200);
var html = GetHtml.PostUtf8(url, data);
@@ -133,24 +144,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
}));
}
+
+ var totalCount = BaseRegex.GetIntJson(ref html, "count");
+ totalPage = Math.Ceiling(1m * totalCount / pageSize).ParseToInt();
}
});
}
-
-
- private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- var orderId = ((sender as Border)?.Tag).ParseToString();
- try
- {
- Clipboard.SetText(orderId);
- }
- catch (Exception ex)
- {
- }
- }
-
private void btnMultiShopChoice_Click(object sender, RoutedEventArgs e)
{
MainWindow.Instance.shopListCtrl.IsVisibleChanged -= ShopListCtrl_IsVisibleChanged;
@@ -166,9 +166,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (list != null)
this.txtShopName.Text = string.Join(";", list.Where(s => s.IsSelect == true).Select(s => s.ShopAccount));
-
}
MainWindow.Instance.shopListCtrl.IsVisibleChanged -= ShopListCtrl_IsVisibleChanged;
}
+
+ private void btnSearch_Click(object sender, RoutedEventArgs e)
+ {
+ }
}
}
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowCtrl.xaml.cs
index 9608bfc..e5b873f 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowCtrl.xaml.cs
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowCtrl.xaml.cs
@@ -1,4 +1,5 @@
-using NaiBa.Util.Extension;
+using _29WxOrderWpf.BaseWindows;
+using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -25,17 +26,5 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
InitializeComponent();
}
-
- private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- var orderId = ((sender as Border)?.Tag).ParseToString();
- try
- {
- Clipboard.SetText(orderId);
- }
- catch (Exception ex)
- {
- }
- }
}
}
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
index 021603c..b6e78d9 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
@@ -3,9 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
+ xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls" xmlns:usercontrols="clr-namespace:_29WxOrderWpf.UserControls"
mc:Ignorable="d"
- d:DesignHeight="150" d:DesignWidth="800">
+ d:DesignHeight="50" d:DesignWidth="800">
@@ -16,14 +16,33 @@
+
+
+
-
-
+
+
+
+
+ Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
index eeaf151..7b0934c 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
@@ -1,4 +1,5 @@
-using NaiBa.Util.Extension;
+using _29WxOrderWpf.BaseWindows;
+using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -35,6 +36,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
catch (Exception ex)
{
+ BaseMsgWindow.ShowError(MainWindow.Instance, "复制失败 " + ex.Message);
}
}
}
diff --git a/29WxOrderWpf/Styles/BaseButtonStyle.xaml b/29WxOrderWpf/Styles/BaseButtonStyle.xaml
index b397793..2495788 100644
--- a/29WxOrderWpf/Styles/BaseButtonStyle.xaml
+++ b/29WxOrderWpf/Styles/BaseButtonStyle.xaml
@@ -99,13 +99,13 @@
+
\ No newline at end of file
diff --git a/29WxOrderWpf/UserControls/UcWaterMarkTextBox.cs b/29WxOrderWpf/UserControls/UcWaterMarkTextBox.cs
new file mode 100644
index 0000000..6621b62
--- /dev/null
+++ b/29WxOrderWpf/UserControls/UcWaterMarkTextBox.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace _29WxOrderWpf.UserControls
+{
+ public class UcWaterMarkTextBox : TextBox
+ {
+ public UcWaterMarkTextBox()
+ {
+ this.DataContext = this;
+ }
+
+ public static readonly DependencyProperty WaterMarkProperty = DependencyProperty.Register(
+ "WaterMark", typeof(string), typeof(UcWaterMarkTextBox), null);
+ public string WaterMark
+ {
+ get { return (string)GetValue(WaterMarkProperty); }
+ set { SetValue(WaterMarkProperty, value); }
+ }
+ }
+}
diff --git a/AllBase/Model/oms_wei_order_info.cs b/AllBase/Model/oms_wei_order_info.cs
index 86427ce..f13a25c 100644
--- a/AllBase/Model/oms_wei_order_info.cs
+++ b/AllBase/Model/oms_wei_order_info.cs
@@ -10,6 +10,9 @@ namespace AllBase.Model
public class oms_wei_order_info
{
public bool is_select { get; set; }
+ public bool is_visible { get; set; } = true;
+
+
public long id { get; set; }
public long shop_id { get; set; }
public string shop_name { get; set; }