删除不合适的仓库 优化订单和售后单读取

This commit is contained in:
wule committed 2026-07-03 22:05:18 +08:00
1 parent 6f7aa58ac1
commit 13b68fa64e
53 files changed
+14843 -820

No files matched your search

+9 -9
View File
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36221.1 d17.14
VisualStudioVersion = 17.14.36221.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "29WxOrderAllBase", "AllBase\29WxOrderAllBase.csproj", "{6461D807-B1C8-45F0-B388-E0CA1A418DE0}"
EndProject
@@ -33,8 +33,8 @@ Global
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|Mixed Platforms.Build.0 = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x64.ActiveCfg = Debug|x64
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x64.Build.0 = Debug|x64
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.ActiveCfg = Debug|Any CPU
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.Build.0 = Debug|Any CPU
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.ActiveCfg = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.Build.0 = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.ActiveCfg = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.Build.0 = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Mixed Platforms.ActiveCfg = Release|x86
@@ -49,18 +49,18 @@ Global
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|Mixed Platforms.Build.0 = Debug|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x64.ActiveCfg = Debug|x64
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x64.Build.0 = Debug|x64
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x86.ActiveCfg = Debug|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x86.Build.0 = Debug|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Any CPU.ActiveCfg = Release|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Any CPU.Build.0 = Release|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x86.ActiveCfg = Debug|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|x86.Build.0 = Debug|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Any CPU.Build.0 = Release|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|x64.ActiveCfg = Release|x64
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|x64.Build.0 = Release|x64
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|x86.ActiveCfg = Release|x86
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Release|x86.Build.0 = Release|x86
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Any CPU.ActiveCfg = Debug|x86
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Any CPU.Build.0 = Debug|x86
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|Mixed Platforms.Build.0 = Debug|x86
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Debug|x64.ActiveCfg = Debug|x64
+1 -1
View File
@@ -26,7 +26,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
<OutputPath>..\Bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+1 -1
View File
@@ -41,8 +41,8 @@ using Work.Api;
using Work.BaseForms;
using Work.BuyUsers;
using _29WxOrder.MyControl;
using Work.BLL;
using AllBase.Model.Local;
using Work._29Tools.BLL;
namespace _29WxOrder
{
+24 -3
View File
@@ -36,11 +36,11 @@
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Bin\</OutputPath>
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -49,7 +49,7 @@
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Bin\</OutputPath>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -77,6 +77,26 @@
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.dll</HintPath>
@@ -122,6 +142,7 @@
<Compile Include="CefHelper\WPFCEFBrowser.cs" />
<Compile Include="Converters\ImageUrlToBitmapImageConverter.cs" />
<Compile Include="Converters\HasValueToVisibilityConverter.cs" />
<Compile Include="Converters\ListBoxIndexConverter.cs" />
<Compile Include="Converters\StatusToColorBrushConverter.cs" />
<Compile Include="Converters\TextToVisibilityConverter.cs" />
<Compile Include="Converters\VisibleToVisibilityConverter.cs" />
+1
View File
@@ -13,6 +13,7 @@
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage"/>
<converters:ValueMinus24Converter x:Key="ValueMinus24Converter"/>
<converters:StatusToColorBrushConverter x:Key="statusToColorBrushConverter"/>
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter"/>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
<ResourceDictionary Source="Styles/BaseDataGridStyle.xaml" />
+39 -29
View File
@@ -22,12 +22,19 @@ namespace _29WxOrderWpf
public partial class App : Application
{
public static int ProcessCount = 0;
public static string[] args = new List<string>().ToArray();
public static string[] args { get; set; } = new List<string>().ToArray();
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
if (e.Args.Length > 0)
{
if (e.Args.Length != 2 && e.Args.Any(a => a.Contains("--browser-subprocess-path")))
{
//MessageBox.Show(string.Join(",", args));
Process.GetCurrentProcess().Kill();
return;
}
args = e.Args;
}
@@ -69,36 +76,39 @@ namespace _29WxOrderWpf
string str = GetExceptionMsg(ex, string.Empty);
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
//BaseMsgForm.ShowError(str, "系统错误");
BaseMsgWindow.ShowError(null, str, "系统错误");
BaseMsgWindow.ShowError(str, "系统错误");
}
#region 初始化cef
CefSharpSettings.WcfEnabled = false;
if (!args.Any(a => a.Contains("--browser-subprocess-path")))
{
CefSharpSettings.WcfEnabled = false;
CefSharp.Wpf.CefSettings settings = new CefSharp.Wpf.CefSettings();
settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
settings.CefCommandLineArgs.Add("disable-gpu", "1"); // 禁止显卡加速
settings.IgnoreCertificateErrors = true;
settings.Locale = "zh-CN";
settings.LogSeverity = LogSeverity.Disable;
CefSharp.Wpf.CefSettings settings = new CefSharp.Wpf.CefSettings();
settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
settings.CefCommandLineArgs.Add("disable-gpu", "1"); // 禁止显卡加速
settings.IgnoreCertificateErrors = true;
settings.Locale = "zh-CN";
settings.LogSeverity = LogSeverity.Disable;
var pName = Process.GetCurrentProcess().ProcessName;
ProcessCount = Process.GetProcesses().Count(p => p.ProcessName == pName);
//138版cef自己不会分缓存,会因占用导致报错,手动分缓存
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\Order" + ProcessCount);
//settings.CachePath = null; //禁止缓存
//settings.CefCommandLineArgs.Add("enable-javascript", "1");
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
settings.CefCommandLineArgs.Add("--disable-web-security", "1");
//settings.CefCommandLineArgs.Add("--disable-request-handling-for-testing", "1");
var pName = Process.GetCurrentProcess().ProcessName;
ProcessCount = Process.GetProcesses().Count(p => p.ProcessName == pName);
//138版cef自己不会分缓存,会因占用导致报错,手动分缓存
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\Order" + ProcessCount);
//settings.CachePath = null; //禁止缓存
//settings.CefCommandLineArgs.Add("enable-javascript", "1");
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
settings.CefCommandLineArgs.Add("--disable-web-security", "1");
//settings.CefCommandLineArgs.Add("--disable-request-handling-for-testing", "1");
#if DEBUG
settings.LogFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "cef_log_order.txt");
// 设置日志级别为详细
settings.LogSeverity = LogSeverity.Verbose;
// 捕获JavaScript异常堆栈(最多32帧)
settings.UncaughtExceptionStackSize = 32;
#endif
Cef.Initialize(settings);
settings.LogFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "cef_log_order.txt");
// 设置日志级别为详细
settings.LogSeverity = LogSeverity.Verbose;
// 捕获JavaScript异常堆栈(最多32帧)
settings.UncaughtExceptionStackSize = 32;
#endif
Cef.Initialize(settings);
}
#endregion
}
@@ -106,21 +116,21 @@ namespace _29WxOrderWpf
//{
// string str = GetExceptionMsg(e.Exception, e.ToString());
// NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
// BaseMsgWindow.ShowError(null, str, "系统错误");
// BaseMsgWindow.ShowError(str, "系统错误");
//}
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string str = GetExceptionMsg(e.Exception, e.ToString());
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
BaseMsgWindow.ShowError(null, str, "系统错误");
BaseMsgWindow.ShowError(str, "系统错误");
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
BaseMsgWindow.ShowError(null, str, "系统错误");
BaseMsgWindow.ShowError(str, "系统错误");
}
/// <summary>
@@ -146,7 +156,7 @@ namespace _29WxOrderWpf
}
sb.AppendLine("***************************************************************");
NaiBa.Util.Helper.LogHelper.WriteWithTime("Error:" + sb);
BaseMsgWindow.ShowError(null, sb.ToString(), "系统错误");
BaseMsgWindow.ShowError(sb.ToString(), "系统错误");
return sb.ToString();
}
+40 -4
View File
@@ -9,6 +9,7 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Work.BaseForms;
@@ -39,29 +40,32 @@ namespace _29WxOrderWpf.BaseWindows
return msgBox;
}
public static BaseMsgWindow ShowInfo(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
public static BaseMsgWindow ShowInfo(string msg, string caption = "", Window window = null, MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "系统提示" : caption;
BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgInfo"] as ImageSource;
if (window != null)
msgBox.Owner = window;
msgBox.ShowDialog();
else msgBox.Owner = MainWindow.Instance;
msgBox.ShowDialog();
return msgBox;
}
public static BaseMsgWindow ShowError(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
public static BaseMsgWindow ShowError(string msg, string caption = "", Window window = null, MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgErr"] as ImageSource;
if (window != null)
msgBox.Owner = window;
else
msgBox.Owner = MainWindow.Instance;
msgBox.ShowDialog();
return msgBox;
}
public static BaseMsgWindow ShowConfirm(Window window, string msg, string caption = "", MsgWindowLevel fl = MsgWindowLevel.MEDIUM)
public static BaseMsgWindow ShowConfirm(string msg, string caption = "", Window window = null, MsgWindowLevel fl = MsgWindowLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "确认系统提示" : caption;
BaseMsgWindow msgBox = new BaseMsgWindow
@@ -77,6 +81,8 @@ namespace _29WxOrderWpf.BaseWindows
}
if (window != null)
msgBox.Owner = window;
else
msgBox.Owner = MainWindow.Instance;
msgBox.ShowDialog();
return msgBox;
}
@@ -90,6 +96,36 @@ namespace _29WxOrderWpf.BaseWindows
{
DialogResult = false;
}
public static void ShowAnimateMessage(string message)
{
MainWindow.Instance.tbMessage.Text = message;
MainWindow.Instance.borderMessage.Visibility = Visibility.Visible;
// 创建Storyboard并添加动画
Storyboard storyboard = new Storyboard();
DoubleAnimation fadeInAnimation1 = new DoubleAnimation
{
From = 0, // 开始时完全透明
To = 1, // 结束时完全不透明
Duration = new Duration(TimeSpan.FromSeconds(0.2)) // 持续时间2秒
};
Storyboard.SetTarget(fadeInAnimation1, MainWindow.Instance.borderMessage);
Storyboard.SetTargetProperty(fadeInAnimation1, new PropertyPath(OpacityProperty));
storyboard.Children.Add(fadeInAnimation1);
DoubleAnimation fadeInAnimation2 = new DoubleAnimation
{
BeginTime = new TimeSpan(0, 0, 1),
From = 1,
To = 0,
Duration = new Duration(TimeSpan.FromSeconds(0.2)) // 持续时间2秒
};
Storyboard.SetTarget(fadeInAnimation2, MainWindow.Instance.borderMessage);
Storyboard.SetTargetProperty(fadeInAnimation2, new PropertyPath(OpacityProperty));
storyboard.Children.Add(fadeInAnimation2);
// 开始动画
storyboard.Begin();
}
}
public enum MsgWindowLevel
@@ -22,7 +22,9 @@ namespace _29WxOrderWpf.Converters
{
// 直接加载绑定如果遇到有问题的网络图片会直接崩溃。
//var bitMap = new BitmapImage(new Uri(url));
var bitMap = LoadImageFromUrl(url);
BitmapImage bitMap = null;
//bitMap = LoadImageFromUrl(url + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
bitMap = LoadImageFromUrl(url);
return bitMap;
//string errStr = "";
//var bitmapImg = GetUrlImg(url, out errStr);
@@ -43,7 +45,7 @@ namespace _29WxOrderWpf.Converters
}
public BitmapImage LoadImageFromUrl(string url)
public static BitmapImage LoadImageFromUrl(string url)
{
BitmapImage bitmap = new BitmapImage();
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Data;
namespace _29WxOrderWpf.Converters
{
internal class ListBoxIndexConverter : IValueConverter
{
public object Convert(object value, Type TargetType, object parameter, CultureInfo culture)
{
ListBoxItem item = (ListBoxItem)value;
ListBox listView = ItemsControl.ItemsControlFromItemContainer(item) as ListBox;
return listView.ItemContainerGenerator.IndexFromContainer(item) + 1;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
@@ -14,7 +14,7 @@ namespace _29WxOrderWpf.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return !value.ParseToString().IsNullOrEmpty() ? Visibility.Visible : Visibility.Collapsed;
return !value.ParseToString().Trim().IsNullOrEmpty() ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
@@ -15,11 +15,13 @@
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<WrapPanel VerticalAlignment="Center">
<Image Margin="12,0,4,0" Width="16" Height="16" Source="{StaticResource imgCloseGray}" MouseLeftButtonUp="btnClose_Click" Cursor="Hand"></Image>
<WrapPanel VerticalAlignment="Center" Grid.Column="1">
<CheckBox Content="自动读买手单" x:Name="chkAutoReadBuyerOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
Margin="6,0" VerticalAlignment="Center" Checked="chkAutoReadBuyerOrder_CheckedChanged" Unchecked="chkAutoReadBuyerOrder_CheckedChanged" IsChecked="true"/>
@@ -31,9 +33,9 @@
<Button Grid.Column="8" x:Name="btnSearch" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,0,0" Content="刷新订单" Width="118" Height="24" Click="btnSearch_Click"/>
</WrapPanel>
<TextBox x:Name="txtFilter" Grid.Column="1" Margin="28,0,8,0" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" Height="28"
<TextBox x:Name="txtFilter" Grid.Column="2" Margin="28,0,8,0" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" Height="28"
VerticalContentAlignment="Center" Style="{StaticResource BaseRoundCornerTextBoxStyle}" TextChanged="txtFilter_TextChanged" />
<Button Grid.Column="2" x:Name="btnFilter" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,8,0" Content="过滤" Width="50" Height="24" Click="btnFilter_Click"/>
<Button Grid.Column="3" x:Name="btnFilter" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,8,0" Content="过滤" Width="50" Height="24" Click="btnFilter_Click"/>
</Grid>
<Grid Grid.Row="1" Background="LightGray" x:Name="GridCef">
@@ -151,7 +153,7 @@
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnSendBuyerOrder" VerticalAlignment="Center" Background="Transparent" HorizontalAlignment="Center" Foreground="#409eff" BorderBrush="Transparent"
Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click" Visibility="{Binding ShopOrderIdStr, Converter={StaticResource HasTextVisibility}}"></Button>
Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click" Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}"></Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -125,7 +125,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
if (!GlobalConfig.PDDBuyerLoginList.Any(u => u.buyer_name == order.buyerName))
return false;
if (order.order_time < BaseClass.DateTimeToTimestampSeconds(new DateTime(2026, 6, 25)))
if (order.OrderTime < new DateTime(2025, 6, 29))
return false;
if (isHideNoWxOrderNo && order.ShopOrderIdStr.IsNullOrEmpty())
return false;
@@ -148,7 +148,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
lstPddBuyerOrderInfoLite = new ObservableCollection<PddBuyerOrderLiteInfo>();
foreach (var item in lstPddBuyerOrderInfoLite.ToList())
{
if (item.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddMonths(-1)))
if (item.OrderTime < DateTime.Now.AddMonths(-1))
lstPddBuyerOrderInfoLite.Remove(item);
}
@@ -491,7 +491,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
data3 += "&out_order_no=" + out_order_nos;
var html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
GetHtml.PostUtf8(url3, data3);
html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
{
//Dispatcher.Invoke(new Action(() =>
@@ -531,9 +531,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
void UpdateOrderStatus(PddBuyerOrderLiteInfo o, oms_wei_order_item_info order_item, oms_wei_refund_info refund_item, oms_wei_external_procurement_log transitOrderList)
{
o.ShopOrderIdStr = order_item.order_id;
o.ShopOrderSkuIdStr = order_item.sku_id;
o.ShopOrderSkuNameStr = order_item.sku_attr_str;
o.ShopOrderIdStr = order_item?.order_id ?? transitOrderList.order_no;
o.ShopOrderSkuIdStr = order_item?.sku_id ?? transitOrderList.order_sku_id;
o.ShopOrderSkuNameStr = order_item?.sku_attr_str;
o.ShopOrderRefundStr = refund_item?.count > 0 ? "店铺售后" : "";
o.TransitWarehouseIdStr = transitOrderList?.platform;
o.Express1WaybillStr = transitOrderList?.express_1_waybill;
@@ -544,6 +544,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
o.PreAllocatedOrderNoStr = transitOrderList?.pre_allocated_order_no.ParseToString();
// 更新订单中转取号状态
o.sendStatus = (o.TransitOrderStatus + " " + o.ShopOrderRefundStr).Trim();
o.TransitCreateTime = transitOrderList?.created_time ?? DateTime.MinValue;
}
void CefReadBuyerOrder(string url, string data)
@@ -596,18 +597,22 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
o.outExpressCompanyMsg = o.extra_info.order_hint?.message;
// 查找店铺订单并更新店铺订单状态
var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.order_items.Any(i1 => i1.item_transit_orders.Any(t1 => t1.out_order_no == o.order_sn)));
var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.orderItems.Any(i1 => i1.ItemTransitOrders.Any(t1 => t1.out_order_no == o.order_sn)));
if (ShopOrder != null)
{
var order_item = ShopOrder.order_items.FirstOrDefault(oi => oi.item_transit_orders.Any(t1 => t1.out_order_no == o.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.item_refund;
var order_item = ShopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == o.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.ItemRefund;
var transit_item = transitOrderList.FirstOrDefault(t1 => t1.out_order_no == o.order_sn);
UpdateOrderStatus(o, order_item, refund_item, transit_item);
}
PddBuyerOrderLiteInfo order = null;
if (!this.lstPddBuyerOrderInfoLite.Any(or => or.order_sn == o.order_sn))
Dispatcher.Invoke(new Action(() =>
{
order = this.lstPddBuyerOrderInfoLite.FirstOrDefault(or => or.order_sn == o.order_sn);
}));
if (order == null)
{
order = o;
Dispatcher.Invoke(new Action(() =>
@@ -617,7 +622,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
}
else
{
order = this.lstPddBuyerOrderInfoLite.FirstOrDefault(or => or.order_sn == o.order_sn);
//if (JsonHelper.SerializeObject(order) != JsonHelper.SerializeObject(o))
{
//if (order.order_status_prompt.Contains("待发货") && !o.order_status_prompt.Contains("待发货"))
@@ -702,10 +706,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
SendTransitOrderE57(order);
});
Dispatcher.Invoke(new Action(() =>
{
ShowOrder(order);
}));
// 数据源绑定,不再需要显示指定显示的状态
//Dispatcher.Invoke(new Action(() =>
//{
// ShowOrder(order);
//}));
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order_list", lstPddBuyerOrderInfoLite);
}
@@ -1146,11 +1151,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
var refunds = GetOrderRefundInfo(order_ids);
// 查找店铺订单并更新店铺订单状态
var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.order_items.Any(i1 => i1.item_transit_orders.Any(t1 => t1.out_order_no == buyerOrder.order_sn)));
var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.orderItems.Any(i1 => i1.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn)));
if (ShopOrder != null)
{
var order_item = ShopOrder.order_items.FirstOrDefault(oi => oi.item_transit_orders.Any(t1 => t1.out_order_no == buyerOrder.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.item_refund;
var order_item = ShopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.ItemRefund;
var transit_item = transitOrderList.FirstOrDefault(t1 => t1.out_order_no == buyerOrder.order_sn);
UpdateOrderStatus(buyerOrder, order_item, refund_item, transit_item);
@@ -1173,27 +1178,24 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
return;
//if (resetSendStatus)
// order.sendStatus = "";
// 已取号 有售后 或者没有店铺订单号的订单,不发送
if (order.sendStatus == "已取号" || order.sendStatus.ParseToString().Contains("取号成功") ||
order.sendStatus.ParseToString().Contains("售后") || order.ShopOrderIdStr.IsNullOrEmpty())
{
return;
}
if (!order.outExpressCompanyCode.IsNullOrEmpty() && !order.tracking_number.IsNullOrEmpty())
{
// 物流单号不为空才更新服务端
}
else
{
return;
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order_list", lstPddBuyerOrderInfoLite);
// 提交物流信息
if (order.sendStatus != "已提交" && order.sendStatus != "提前取号" && order.sendStatus != "已取号")
// 处理中, "已取号(更正)", 已取号, 提前取号, 取号失败
// 正在处理取号、已取号(包括提前取号更正的订单)、有售后或者没有中转仓(非中转系统订单)的订单,不发送
if (order.sendStatus == "处理中" || order.sendStatus == "已取号" || order.sendStatus == "已取号(更正)" ||
order.sendStatus.ParseToString().Contains("售后") || order.TransitWarehouseIdStr.IsNullOrEmpty())
{
return;
}
// 物流单号不为空才更新服务端
if (order.outExpressCompanyCode.IsNullOrEmpty() || order.tracking_number.IsNullOrEmpty())
{
return;
}
// 如果物流不一致,提交物流信息
if (order.Express1CompanyStr != order.outExpressCompanyCode || order.Express1WaybillStr != order.tracking_number)
{
//JObject obj = new JObject();
//obj["orderNo"] = order.ShopOrderIdStr;
@@ -1224,21 +1226,37 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
// order.sendStatus = "已提交";
//}
var url3 = BaseClass.Build29WxObjString("order/wx_update_erp_order_express");
var data3 = UserLogin.GetSignaturex();
data3 += "&out_order_no=" + order.order_sn;
data3 += "&express_1_company=" + order.outExpressCompanyCode; // 物流公司编号
data3 += "&express_1_waybil=" + order.tracking_number; // 物流单号
var html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
GetHtml.PostUtf8(url3, data3);
if (html3.Contains("\"code\":200"))
//var url3 = BaseClass.Build29WxObjString("order/wx_update_erp_order_express");
//var data3 = UserLogin.GetSignaturex();
//data3 += "&out_order_no=" + order.order_sn;
//data3 += "&express_1_company=" + order.outExpressCompanyCode; // 物流公司编号
//data3 += "&express_1_waybil=" + order.tracking_number; // 物流单号
//var html3 = GetHtml.PostUtf8(url3, data3);
//if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
// html3 = GetHtml.PostUtf8(url3, data3);
//if (html3.Contains("\"code\":200"))
//{
// order.sendStatus = "已提交";
//}
// 修改上游物流单号
string url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/update-upstream-waybill";
JObject obj = new JObject();
obj["platform"] = "WEISHOP";
obj["outOrderNo"] = order.order_sn; //外采单号
obj["outExpressCompany"] = order.outExpressCompanyCode; // 物流公司编号
obj["outExpressNo"] = order.tracking_number; // 物流单号
obj["orderCode"] = order.tracking_number; //实际就是外采单号
var dataStr = JsonHelper.SerializeObject(obj);
var exportRst = HttpResponseWXBLL.e57PostResponse(url, dataStr, "");
if (exportRst.Contains("<code>0</code>") || exportRst.Contains("<code>200</code>"))
{
order.sendStatus = "已提交";
order.sendStatus = "提交物流信息失败";
return;
}
}
if (order.sendStatus == "已提交" && order.sendStatus != "提前取号")
// 直接取号
if (order.sendStatus != "提前取号" && order.sendStatus != "提前取号(旧订单)")
{
// 立即取号
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/transfer-warehouse/dispatch";
@@ -1254,16 +1272,17 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
var dispatchRst = HttpResponseWXBLL.e57PostResponse(url2, dataStr2, "");
//<AjaxResult><msg>订单已成功调用鸿浩仓库接口发货</msg><code>200</code></AjaxResult>
if (dispatchRst.Contains("<code>200</code>"))
if (dispatchRst.Contains("<code>0</code>") || dispatchRst.Contains("<code>200</code>"))
{
var msg = BaseRegex.GetStringXml(ref dispatchRst, "msg");
order.sendStatus = "取号成功";
var shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_items.Any(oi => oi.item_transit_orders.Any(t => t.out_order_no == order.order_sn)));
var shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.orderItems.Any(oi => oi.ItemTransitOrders.Any(t => t.out_order_no == order.order_sn)));
if (shopOrder != null)
{
var orderItem = shopOrder.order_items.FirstOrDefault(oi => oi.item_transit_orders.Any(t => t.out_order_no == order.order_sn));
var orderItem = shopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t => t.out_order_no == order.order_sn));
if (orderItem != null)
{
var transit = orderItem.item_transit_orders.FirstOrDefault(t => t.out_order_no == order.order_sn);
var transit = orderItem.ItemTransitOrders.FirstOrDefault(t => t.out_order_no == order.order_sn);
if (transit != null)
{
if (transit.transfer_warehouse_status == 0)
@@ -1275,11 +1294,17 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
}
else
{
order.sendStatus = "直接取号失败";
order.sendStatus = "直接取号失败" + BaseRegex.GetStringXml(ref dispatchRst, "msg");
}
}
else if (order.sendStatus == "提前取号")
// 修改提前取号
else if (order.sendStatus == "提前取号" || order.sendStatus == "提前取号(旧订单)")
{
if (order.TransitCreateTime.AddHours(23) > DateTime.Now)
{
order.sendStatus = "提前取号流程进行中";
}
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/update-upstream-waybill";
var data = new JObject();
//data["outAmount"] = order.order_amount.ParseToString();
@@ -1292,16 +1317,28 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
var dataStr2 = JsonHelper.SerializeObject(data);
var dispatchRst = HttpResponseWXBLL.e57PostResponse(url2, dataStr2, "");
if (dispatchRst.Contains("<code>0</code>"))
if (dispatchRst.Contains("<code>0</code>") || dispatchRst.Contains("<code>200</code>"))
{
var msg = BaseRegex.GetStringXml(ref dispatchRst, "msg");
if (order.OrderTime < new DateTime(2026, 6, 29) /*order.sendStatus == "提前取号(旧订单)"*/)
{
var url3 = BaseClass.Build29WxObjString("order/wx_update_erp_allocated_order_no");
var data3 = UserLogin.GetSignaturex();
data3 += "&out_order_no=" + order.order_sn;
data3 += "&pre_allocated_order_no=" + 3;
var html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
html3 = GetHtml.PostUtf8(url3, data3);
}
order.sendStatus = "修改提前取号成功";
var shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_items.Any(oi => oi.item_transit_orders.Any(t => t.out_order_no == order.order_sn)));
var shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.orderItems.Any(oi => oi.ItemTransitOrders.Any(t => t.out_order_no == order.order_sn)));
if (shopOrder != null)
{
var orderItem = shopOrder.order_items.FirstOrDefault(oi => oi.item_transit_orders.Any(t => t.out_order_no == order.order_sn));
var orderItem = shopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t => t.out_order_no == order.order_sn));
if (orderItem != null)
{
var transit = orderItem.item_transit_orders.FirstOrDefault(t => t.out_order_no == order.order_sn);
var transit = orderItem.ItemTransitOrders.FirstOrDefault(t => t.out_order_no == order.order_sn);
if (transit != null)
transit.pre_allocated_order_no = 1;
}
@@ -1309,7 +1346,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
}
else
{
order.sendStatus = "修改提前取号失败";
order.sendStatus = "修改提前取号失败" + BaseRegex.GetStringXml(ref dispatchRst, "msg");
}
}
}
@@ -1644,6 +1681,16 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
{
filterTxt = txtFilter.Text.Trim();
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{
if (MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility != Visibility.Visible)
MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
if (Panel.GetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl) < 1)
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, 1);
else
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
}
}
public class YkdBuyerOrder
@@ -98,7 +98,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
private void btnDeleteItem_Click(object sender, RoutedEventArgs e)
{
if (BaseMsgWindow.ShowConfirm(MainWindow.Instance, "确定删除吗?删除后不可恢复!").DialogResult != true)
if (BaseMsgWindow.ShowConfirm("确定删除吗?删除后不可恢复!").DialogResult != true)
return;
if (sender is Button btn)
@@ -158,12 +158,12 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility != Visibility.Visible)
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
if (Panel.GetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl) < 1)
Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, 1);
if (MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility != Visibility.Visible)
MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
if (Panel.GetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl) < 1)
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, 1);
else
Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, -1);
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
}
}
}
@@ -62,8 +62,8 @@
<DatePicker x:Name="dateEnd" Grid.Column="7" Margin="0,0,4,0" VerticalAlignment="Center" BorderThickness="0" />
<Button Grid.Column="8" x:Name="btnFilter" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,0,0" Content="过滤" Width="48" Height="24" Click="btnFilter_Click"/>
<Button Grid.Column="9" x:Name="btnSearch" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,4,0" Content="读单" Width="48" Height="24" Click="btnSearch_Click"/>
<Image x:Name="imgLoading" Grid.Column="10" Source="{StaticResource imgLoadingPic}" Width="20" Height="20" Margin="0">
<Button Grid.Column="9" x:Name="btnSearch" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,4,0" Content="读单" Width="48" Height="24" Click="btnSearch_Click" IsEnabled="False"/>
<Image x:Name="imgLoading" Grid.Column="10" Source="{StaticResource imgLoadingPic}" Width="20" Height="20" Margin="0" IsEnabled="False">
<Image.RenderTransform>
<RotateTransform Angle="45" CenterX="10" CenterY="10"/>
</Image.RenderTransform>
@@ -135,8 +135,17 @@
</TabControl.Resources>
<TabItem Header="待采购" BorderBrush="Transparent" Background="Transparent">
<Border BorderBrush="#e0e0e0" BorderThickness="0,0,0,1" Margin="4,0,4,4">
<CheckBox Content="未关联拍单" x:Name="chkNoMapProdOnly" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="6,8" Checked="chkNoMapProdOnly_Checked" Unchecked="chkNoMapProdOnly_Checked"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Content="已关联拍单" x:Name="chkMapProdOnly" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="6,8" Click="chkMapProdOnly_Click"/>
<CheckBox Content="未关联拍单" x:Name="chkNoMapProdOnly" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
Grid.Column="1" VerticalAlignment="Center" Margin="6,8" Click="chkNoMapProdOnly_Click"/>
</Grid>
</Border>
</TabItem >
<TabItem Header="待发货"></TabItem>
@@ -155,7 +164,8 @@
ColumnDisplayIndexChanged="dgOrderHeader_ColumnDisplayIndexChanged"
LayoutUpdated="dgOrderHeader_LayoutUpdated">
<DataGrid.Columns>
<DataGridTemplateColumn x:Name="colSelectAll" Header="选择" Width="50" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}">
<DataGridTextColumn Width="38" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="序号"/>
<DataGridTemplateColumn x:Name="colSelectAll" Header="选择" Width="28" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Grid Width="14" Height="14">
@@ -176,9 +186,9 @@
</DataGridTemplateColumn>
<DataGridTextColumn Width="200*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="店铺单号"/>
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="交易时间"/>
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="利润"/>
<DataGridTextColumn Width="80*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="利润"/>
<DataGridTextColumn Width="160*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="状态/地址"/>
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="单号"/>
<DataGridTextColumn Width="110*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="单号"/>
<DataGridTextColumn Width="120*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="备注"/>
<DataGridTextColumn Width="82*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header=" 操作"/>
</DataGrid.Columns>
@@ -24,7 +24,6 @@ using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using TemuKJD.ToolForms;
using Work;
using Work.BLL;
namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
@@ -44,6 +43,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
private void Window_Loaded(object sender, RoutedEventArgs e)
{
lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
dateStart.SelectedDate = DateTime.Now.Date.AddDays(-7);
@@ -127,7 +127,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
break;
}
@@ -142,12 +142,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var url1 = BaseClass.Build29WxObjString("order/get_order_item_list");
var data1 = UserLogin.GetSignaturex();
data1 += "&erp_order_id_in=" + order_ids;
data1 += "&page_size=" + 1000;
var html1 = GetHtml.PostUtf8(url1, data1);
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
html1 = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
break;
}
List<oms_wei_order_item_info> orderItems = new List<oms_wei_order_item_info>();
@@ -164,7 +165,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
html2 = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
break;
}
List<oms_wei_refund_info> refunds = new List<oms_wei_refund_info>();
@@ -182,7 +183,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
Dispatcher.Invoke(new Action(() =>
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
}));
break;
}
@@ -202,7 +203,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
Dispatcher.Invoke(new Action(() =>
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
}));
break;
}
@@ -210,75 +211,82 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
try { byuMapList = JsonHelper.DeserializeJsonToList<WXBuyMapInfo>(JObject.Parse(resultMap)["data"].ParseToString()); } catch { }
// 装载订单
foreach (JObject jObj in jArr)
{
Dispatcher.Invoke(new Action(() =>
try
{
try
oms_wei_order_info order = null;
Dispatcher.Invoke(new Action(() =>
{
var order = JsonHelper.DeserializeJsonToObject<oms_wei_order_info>(JsonHelper.SerializeObject(jObj));
//装载订单商品详情
order.order_items = new ObservableCollection<oms_wei_order_item_info>();
foreach (var item in orderItems.Where(oi => oi.order_id == order.order_id))
order = JsonHelper.DeserializeJsonToObject<oms_wei_order_info>(JsonHelper.SerializeObject(jObj));
if (order.order_id == "3737398647233862400")
{
// 订单商品
item.item_order = order;
order.order_items.Add(item);
// 关联拍单关系
if (PddMobileBuyOrderForm.lstDangerItemWord.Any(d => item.title.Contains(d)))
{
// 危险物品禁止拍单
}
else
{
item.buy_map = byuMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
if (item.buy_map == null)
item.buy_map = byuMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.out_product_id);
if (item.buy_map == null)
item.buy_map = byuMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
if (item.buy_map == null)
item.buy_map = byuMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.product_id);
}
// 中转仓订单
if (item.item_order.order_items.Count > 1)
item.item_transit_orders.AddRange(transitOrderList.Where(t => t.order_no == item.order_id && t.order_sku_id == item.sku_id));
else
item.item_transit_orders.AddRange(transitOrderList.Where(t => t.order_no == item.order_id));
}
//装载订单售后详情
order.refunds = new ObservableCollection<oms_wei_refund_info>();
foreach (var item in refunds.Where(of => of.order_id == order.order_id))
}));
//装载订单商品详情
order.orderItems = new ObservableCollection<oms_wei_order_item_info>();
foreach (var item in orderItems.Where(oi => oi.order_id == order.order_id))
{
// 订单商品
item.ItemOrder = order;
order.orderItems.Add(item);
item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == item.order_id);
Dispatcher.Invoke(new Action(() => { item.UpdateOrderItemBuyButton(); }));
// 关联拍单关系 // 危险物品禁止拍单,仅关联安全商品
if (!GlobalConfig.lstDangerItemWord.Any(d => (item.title).ParseToString().Contains(d)))
{
order.refunds.Add(item);
item.BuyMap = byuMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
if (item.BuyMap == null)
item.BuyMap = byuMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.out_product_id);
if (item.BuyMap == null)
item.BuyMap = byuMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
if (item.BuyMap == null)
item.BuyMap = byuMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.product_id);
}
var orderExist = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == order.order_id);
if (orderExist != null)
GlobalConfig.lstOrder.Remove(orderExist);
var nextOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.create_time < order.create_time);
if (nextOrder != null)
{
GlobalConfig.lstOrder.Insert(GlobalConfig.lstOrder.IndexOf(nextOrder), order);
}
// 中转仓订单
if (item.ItemOrder.orderItems.Count > 1)
item.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == item.order_id && t.order_sku_id == item.sku_id));
else
{
GlobalConfig.lstOrder.Add(order);
}
if (order.order_items.Count > 1)
{
}
FilterOneOrder(order);
item.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == item.order_id));
}
catch (Exception ex)
//装载订单售后详情
order.refundItems = new ObservableCollection<oms_wei_refund_info>(refunds.Where(of => of.order_id == order.order_id));
foreach (var orderItem in order.orderItems)
{
orderItem.SetItemRefund(order.refundItems.ToList());
}
var orderExist = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == order.order_id);
if (orderExist != null)
GlobalConfig.lstOrder.Remove(orderExist);
var nextOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.create_time < order.create_time);
if (nextOrder != null)
{
GlobalConfig.lstOrder.Insert(GlobalConfig.lstOrder.IndexOf(nextOrder), order);
}
else
{
GlobalConfig.lstOrder.Add(order);
}
if (order.orderItems.Count > 1)
{
}
}));
Dispatcher.Invoke(new Action(() =>
{
FilterOneOrder(order);
}));
}
catch (Exception ex)
{
}
}
Dispatcher.Invoke(new Action(() =>
@@ -338,17 +346,19 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
try
{
foreach (var order in GlobalConfig.lstFilterOrder.ToList())
{
if (GetOrderIsFilter(order))
{
GlobalConfig.lstFilterOrder.Remove(order);
}
}
foreach (var order in GlobalConfig.lstOrder.ToList())
{
FilterOneOrder(order);
}
//foreach (var order in GlobalConfig.lstFilterOrder.ToList())
//{
// if (GetOrderIsFilter(order))
// {
// GlobalConfig.lstFilterOrder.Remove(order);
// }
//}
//foreach (var order in GlobalConfig.lstOrder.ToList())
//{
// FilterOneOrder(order);
//}
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)));
this.lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
Dispatcher.Invoke(new Action(() => {
txtFilterCount.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count().ToString() + " 条订单记录";
}));
@@ -399,7 +409,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return true;
}
// 过滤商品名称
if (!string.IsNullOrEmpty(txtGoodsName.Text.Trim()) && !order.order_items.Any(it => it.title.Contains(txtGoodsName.Text.Trim())))
if (!string.IsNullOrEmpty(txtGoodsName.Text.Trim()) && !order.orderItems.Any(it => it.title.Contains(txtGoodsName.Text.Trim())))
{
return true;
}
@@ -412,7 +422,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (!order.IsWaitBuy)
return true;
if (chkNoMapProdOnly.IsChecked == true && order.order_items.All(oi => oi.buy_map != null))
if (chkMapProdOnly.IsChecked == true && order.orderItems.All(oi => oi.BuyMap == null))
return true;
if (chkNoMapProdOnly.IsChecked == true && order.orderItems.All(oi => oi.BuyMap != null))
return true;
}
if (headerStr.StartsWith("待发货") && !order.IsWaitSend)
@@ -533,8 +545,16 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
FilterOrders();
}
private void chkNoMapProdOnly_Checked(object sender, RoutedEventArgs e)
private void chkMapProdOnly_Click(object sender, RoutedEventArgs e)
{
if (chkMapProdOnly.IsChecked == true)
chkNoMapProdOnly.IsChecked = false;
FilterOrders();
}
private void chkNoMapProdOnly_Click(object sender, RoutedEventArgs e)
{
if (chkNoMapProdOnly.IsChecked == true)
chkMapProdOnly.IsChecked = false;
FilterOrders();
}
}
@@ -33,21 +33,12 @@
<Grid.RowDefinitions>
<RowDefinition Height="6"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="6"></RowDefinition>
</Grid.RowDefinitions>
<!--<Border Visibility="{Binding order_item1_visibility}" Grid.Row="1">
<local:OrderListRowItemCtrl x:Name="item1" Grid.Row="1" DataContext="{Binding order_item1}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
</Border>-->
<!--<Border Visibility="{Binding order_item2_visibility}" Grid.Row="2">
</Border>
<Border Visibility="{Binding order_item2_visibility}" Grid.Row="2">
<local:OrderListRowItemCtrl x:Name="item2" Grid.Row="2" DataContext="{Binding order_item2}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
</Border>
<Border Visibility="{Binding order_item3_visibility}" Grid.Row="3">
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -40,20 +41,26 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
private void OrderListRowCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
//if (gridChildOrder.Children.Count > 0)
// return;
var order = this.DataContext as oms_wei_order_info;
if (order == null)
return;
int index = 0;
foreach (var orderItem in order.order_items)
if (this.DataContext is oms_wei_order_info order)
{
index++;
var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
Grid.SetRow(rowItem, index);
this.gridChildOrder.Children.Add(rowItem);
//Task.Run(() =>
//{
int index = 0;
foreach (var orderItem in order.orderItems)
{
gridChildOrder.RowDefinitions.Insert(gridChildOrder.RowDefinitions.Count - 1, new RowDefinition() { Height = GridLength.Auto });
//Thread.Sleep(5);
index++;
//Dispatcher.Invoke(new Action(() =>
//{
var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
Grid.SetRow(rowItem, index);
this.gridChildOrder.Children.Add(rowItem);
//}));
if (index >= 5)
break;
}
//});
}
}
@@ -21,7 +21,7 @@
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Margin="8,8,-4,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="店铺单号:" BorderThickness="0" />
<uc:UcWaterMarkTextBox WaterMark="订单号" x:Name="txtOrderId" Grid.Column="1" Margin="0,8,4,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding order_id}" BorderThickness="0" />
<uc:UcWaterMarkTextBox Foreground="#409eff" Cursor="Hand" WaterMark="订单号" x:Name="txtOrderId" Grid.Column="1" Margin="0,8,4,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding order_id}" BorderThickness="0" />
<Border Grid.Column="2" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="#409eff" Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
@@ -58,7 +58,22 @@
<Image Margin="8,8,0,8" Grid.Column="4" Width="24" Height="24" Source="{StaticResource imgOrderWeishopIcon}"></Image>
<uc:UcWaterMarkTextBox WaterMark="店铺名称" x:Name="txtShopName" Grid.Column="5" Margin="4,8,0,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding shop_name}" BorderThickness="0" />
<uc:UcWaterMarkTextBox WaterMark="店铺状态" x:Name="txtShopLoginStatus" Grid.Column="4" HorizontalAlignment="Right" Margin="0,12,-6,0" Padding="0" FontWeight="Bold"
VerticalAlignment="Center" FontSize="7" Background="{StaticResource ListHeadBackColorBrush}" IsReadOnly="True"
Text="{Binding order_item1.Shop.LoginStatusStr}" BorderThickness="0"
Foreground="{Binding order_item1.Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"/>
<uc:UcWaterMarkTextBox Foreground="#409eff" Cursor="Hand" WaterMark="店铺名称" x:Name="txtShopName" Grid.Column="5" Margin="4,8,4,8" VerticalAlignment="Center"
FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding shop_name}" BorderThickness="0" />
<Border Grid.Column="6" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
Tag="{Binding order_id}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="#409eff" Tag="{Binding order_id}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>
<uc:UcWaterMarkTextBox WaterMark="该订单共有 1 条不同商品记录" x:Name="txtCount" Grid.Column="8" Margin="8,8,0,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" BorderThickness="0" />
</Grid>
</Border>
</UserControl>
@@ -1,4 +1,6 @@
using _29WxOrderWpf.BaseWindows;
using AllBase.Helper;
using AllBase.Model.Local;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
@@ -11,9 +13,12 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Work._29Tools.BLL;
using Work._29Tools.Forms.ShopForms;
namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
@@ -25,6 +30,86 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
public OrderListRowHeaderCtrl()
{
InitializeComponent();
this.DataContextChanged += OrderListRowHeaderCtrl_DataContextChanged;
txtOrderId.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOrderId_MouseLeftButtonUp), true);
txtShopName.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtShopName_MouseLeftButtonUp), true);
}
private void txtShopName_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
ShopBLL.CheckShopLogin(shop);
if (shop.LoginStatus == "登录成功")
{
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home";
shopLoginForm.Show();
}
else
{
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
if (shop.LoginStatus == "登录成功")
{
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
if (!is29SupplierRst.Contains("\"code\":0"))
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
{
shop.Is29Supplier = true;
}
else
{
ShopBLL.CheckShopLogin(shop);
shop.Is29Supplier = false;
}
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var orderItem in ord.orderItems)
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
}
}
}
}
}
}
private void txtOrderId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
{
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/order/detail?orderid=" + order.order_id;
}
shopLoginForm.Show();
}
}
}
private void OrderListRowHeaderCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
if (order.orderItems.Count > 5)
{
txtCount.Text = "该订单共计 " + order.orderItems.Count + " 件商品";
}
}
}
private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -33,10 +118,31 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
try
{
Clipboard.SetText(orderId);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError(MainWindow.Instance, "复制失败 " + ex.Message);
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
private void pathShop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
try
{
Clipboard.SetText(shop.ShopAccount);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
}
}
@@ -16,7 +16,8 @@
</Grid.RowDefinitions>
<Grid x:Name="gridListItem" Grid.Row="1" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"></ColumnDefinition>
<ColumnDefinition Width="36"></ColumnDefinition>
<ColumnDefinition Width="28"></ColumnDefinition>
<ColumnDefinition Width="200*"></ColumnDefinition>
<ColumnDefinition Width="100*"></ColumnDefinition>
<ColumnDefinition Width="100*"></ColumnDefinition>
@@ -25,15 +26,17 @@
<ColumnDefinition Width="120*"></ColumnDefinition>
<ColumnDefinition Width="82*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!--选择框-->
<CheckBox Grid.Column="0" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Tag="{Binding order_id}" IsChecked="{Binding item_order.IsSelect, Mode=TwoWay}" Click="CheckBox_Click"/>
<TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource listBoxIndexConverter}}"
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<CheckBox Grid.Column="1" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Tag="{Binding order_id}" IsChecked="{Binding ItemOrder.IsSelect, Mode=TwoWay}" Click="CheckBox_Click" Margin="0,0,0,0"/>
<!--订单商品信息-->
<Grid Grid.Column="1" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="2" Background="Transparent" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" MinWidth="50"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" Height="100" Width="100" Margin="0,2,8,2" Source="{Binding thumb_img, Converter={StaticResource ImageUrlToBitmapImage}}"></Image>
<!--<Image Grid.Row="1" x:Name="imgOrderItem" Grid.Column="0" VerticalAlignment="Top" Height="100" Width="100" Margin="0,2,8,2" Source="{Binding thumb_img, Converter={StaticResource ImageUrlToBitmapImage}}"></Image>-->
<Image Grid.Row="1" x:Name="imgOrderItem" Grid.Column="0" VerticalAlignment="Top" Height="100" Width="100" Margin="0,2,8,2"></Image>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
@@ -74,7 +77,7 @@
</Grid>
</Grid>
<!--订单时间信息-->
<Grid Grid.Column="2" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="3" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -86,12 +89,12 @@
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Text="成交时间:" Grid.Column="1" Grid.Row="1" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="成交时间" Text="{Binding item_order.create_time_str}" Grid.Column="1" Grid.Row="1" Margin="60,2,4,2" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="成交时间" Text="{Binding ItemOrder.create_time_str}" Grid.Column="1" Grid.Row="1" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<TextBox Text="发货时间:" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"
Visibility="{Binding item_order.ship_done_time_visibility}"/>
<uc:UcWaterMarkTextBox WaterMark="发货时间" Text="{Binding item_order.ship_done_time_str}" Grid.Column="1" Grid.Row="2" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding item_order.ship_done_time_visibility}"/>
Visibility="{Binding ItemOrder.ship_done_time_visibility}"/>
<uc:UcWaterMarkTextBox WaterMark="发货时间" Text="{Binding ItemOrder.ship_done_time_str}" Grid.Column="1" Grid.Row="2" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding ItemOrder.ship_done_time_visibility}"/>
<!--refund_time_str-->
<TextBox Text="退款时间:" Grid.Column="1" Grid.Row="3" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"
Visibility="{Binding refund_time_visibility}"/>
@@ -99,7 +102,7 @@
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding refund_time_visibility}"/>
</Grid>
<!--订单利润-->
<Grid Grid.Column="3" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="4" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -113,7 +116,7 @@
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Text="售价:" Grid.Column="1" Grid.Row="1" Margin="0,0,4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="售价" Text="{Binding real_price_str}" Grid.Column="1" Grid.Row="1" Margin="36,0,4,0" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="售价" Text="{Binding realPriceStr}" Grid.Column="1" Grid.Row="1" Margin="36,0,4,0" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<TextBox Text="平台优惠:" Grid.Column="1" Grid.Row="2" Margin="0,0,4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="平台优惠" Text="{Binding cash_coupon_discounted_price_str}" Grid.Column="1" Grid.Row="2" Margin="60,0,4,0" VerticalAlignment="Top"
@@ -135,12 +138,16 @@
<TextBox Text="外采金额:" Grid.Column="1" Grid.Row="7" Margin="0,0,4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="外采金额" Text="{Binding out_amount_str}" Grid.Row="7" Margin="60,0,4,0" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<TextBox Text="利润:" Grid.Column="1" Grid.Row="8" Margin="0,0,4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="利润" Text="{Binding profit_str}" Grid.Row="8" Margin="36,0,4,0" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" FontWeight="Bold"/>
<WrapPanel Grid.Column="1" Grid.Row="8" >
<!--<TextBox Text="预估" x:Name="txtProfitForecast" Grid.Column="1" Grid.Row="8" Margin="0,0,-4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
BorderThickness="0" Visibility="Collapsed"/>-->
<TextBox Text="利润:" Grid.Column="1" Grid.Row="8" Margin="0,0,-4,0" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="利润" Text="{Binding ProfitCountStr}" Grid.Row="8" Margin="0,0,4,0" VerticalAlignment="Center" Foreground="{Binding ProfitStrColor}"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" FontWeight="Bold"/>
</WrapPanel>
</Grid>
<!--订单状态/地址-->
<Grid Grid.Column="4" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="5" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -159,10 +166,10 @@
<TextBox x:Name="txtDeadline" Grid.Column="1" Margin="2,0,2,1" Foreground="{Binding OrderItemStatusStrColor}" VerticalContentAlignment="Center" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" MinWidth="20" Text="{Binding OrderItemStatusStr}" BorderThickness="0" />
</Border>
<TextBox Text="{Binding item_refund.statusStr}" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
x:Name="txtStatusStr" BorderThickness="0" Foreground="{Binding item_refund.refundStatusColor}" HorizontalAlignment="Center"
<TextBox Text="{Binding ItemRefund.statusStr}" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
x:Name="txtStatusStr" BorderThickness="0" Foreground="{Binding ItemRefund.refundStatusColor}" HorizontalAlignment="Center"
Visibility="{Binding ElementName=txtStatusStr,Path=Text,Converter={StaticResource HasTextVisibility}}"/>
<TextBox Text="{Binding item_refund.reasonTextStr}" Grid.Column="1" Grid.Row="3" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
<TextBox Text="{Binding ItemRefund.reasonTextStr}" Grid.Column="1" Grid.Row="3" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
x:Name="txtRefundReasonTextStr" BorderThickness="0" Foreground="#f56c6c" HorizontalAlignment="Center"
Visibility="{Binding ElementName=txtRefundReasonTextStr,Path=Text,Converter={StaticResource HasTextVisibility}}"/>
<TextBox Text="{Binding refundResultStr}" Grid.Column="1" Grid.Row="4" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
@@ -171,17 +178,26 @@
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5">
<TextBox Text="收货地址:" Grid.Column="1" Grid.Row="5" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="收货地址" Text="{Binding item_order.address_str}" Grid.Column="1" Grid.Row="5" Margin="0,2,4,2" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="收货地址" Text="{Binding ItemOrder.address_str}" Grid.Column="1" Grid.Row="5" Margin="0,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<Button Grid.Column="10" x:Name="btnSeeAddressDetail" Background="Transparent" Foreground="#409eff" BorderBrush="Transparent"
Margin="4,0,0,0" Content="👁" Click="btnSeeAddressDetail_Click" Tag="{Binding order_id}"></Button>
</WrapPanel>
<!--<Button Grid.Column="1" Grid.Row="6" x:Name="btnGetRefundAddress" Background="Transparent" HorizontalAlignment="Center" Foreground="#409eff" BorderBrush="Transparent"
Margin="4,0,0,0" Content="仓库退货地址:点击复制" Click="btnGetRefundAddress_Click" Tag="{Binding order_id}"></Button>-->
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="6" Width="auto" HorizontalAlignment="Center">
<TextBlock Text="退款单号:" VerticalAlignment="Center" Visibility="{Binding ElementName=txtRefundId,Path=Visibility}"/>
<uc:UcWaterMarkTextBox WaterMark="退款单号" Text="{Binding ItemRefund.after_sale_order_id}" Grid.Column="1" Grid.Row="6" Margin="0,2,4,2" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Foreground="#409eff" Cursor="Hand" x:Name="txtRefundId"
Visibility="{Binding Text,RelativeSource={RelativeSource Self},Converter={StaticResource HasTextVisibility}}" HorizontalAlignment="Center"/>
<Border Grid.Column="6" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
MouseLeftButtonDown="pathRefundId_MouseLeftButtonDown" Visibility="{Binding ElementName=txtRefundId,Path=Visibility}">
<Path Margin="0,0,0,0" Fill="#409eff" MouseLeftButtonDown="pathRefundId_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>
</WrapPanel>
</Grid>
<!--单号-->
<Grid Grid.Column="5" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="6" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -198,41 +214,62 @@
<!--<TextBox Text="发货:" Grid.Column="1" Grid.Row="1" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="发货" Text="" Grid.Column="1" Grid.Row="1" Margin="0,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>-->
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1">
<TextBlock Text="采购账户:" IsHitTestVisible="False" Foreground="LightGray" VerticalAlignment="Center"
Visibility="{Binding ElementName=txtOutOrderBuyerStr,Path=Text,Converter={StaticResource NotHasTextVisibility}}"></TextBlock>
<uc:UcWaterMarkTextBox WaterMark="采购账户:" Text="{Binding ItemTransitOrder.OutOrderBuyerStr}" Grid.Column="1" Grid.Row="1"
Padding="0" Margin="-2,2" VerticalAlignment="Top" x:Name="txtOutOrderBuyerStr" Background="Transparent"
IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Cursor="Hand" Foreground="#0099ff"/>
</WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="2">
<TextBlock Text="外部单号:" IsHitTestVisible="False" Foreground="LightGray" VerticalAlignment="Center"
<TextBlock Text="采购单号:" IsHitTestVisible="False" Foreground="LightGray" VerticalAlignment="Center"
Visibility="{Binding ElementName=txtOutOrderNumStr,Path=Text,Converter={StaticResource NotHasTextVisibility}}"></TextBlock>
<uc:UcWaterMarkTextBox WaterMark="外部单号:" Text="{Binding item_transit_order.OutOrderNumStr}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
x:Name="txtOutOrderNumStr" Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
</WrapPanel>
<uc:UcWaterMarkTextBox WaterMark="采购单号:" Text="{Binding ItemTransitOrder.OutOrderNumStr}" Grid.Column="1" Grid.Row="1"
Padding="0" Margin="-2,2" VerticalAlignment="Top" x:Name="txtOutOrderNumStr" Background="Transparent"
IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Cursor="Hand" Foreground="#0099ff"/>
<Border Grid.Column="2" Margin="4,0,0,0" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand" Visibility="{Binding ElementName=txtOutOrderBuyerStr,Path=Text,Converter={StaticResource HasTextVisibility}}"
Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="#409eff" MouseLeftButtonDown="Path_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>
</WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="3">
<TextBox Text="外采:" Grid.Column="1" Grid.Row="1" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="外采" Text="{Binding item_order.out_express_company}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="-" Text="-" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="外采" Text="{Binding item_order.out_express_no}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<TextBlock Text="采购时间:" IsHitTestVisible="False" Foreground="LightGray" VerticalAlignment="Center"
Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr,Path=Text,Converter={StaticResource NotHasTextVisibility}}"></TextBlock>
<uc:UcWaterMarkTextBox WaterMark="采购时间:" Text="{Binding OutOrderTimeQualifiedStr}" Grid.Column="1" Grid.Row="1"
Padding="0" Margin="-2,2" VerticalAlignment="Top" x:Name="txtOutOrderTimeQualifiedStr" Background="Transparent"
IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Foreground="{Binding OutOrderTimeQualifiedBrush}"/>
<!--<Border Grid.Column="2" Margin="4,0,0,0" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand" Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr,Path=Text,Converter={StaticResource HasTextVisibility}}"
Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="#409eff" MouseLeftButtonDown="Path_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>-->
</WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4">
<TextBox Text="退货:" Grid.Column="1" Grid.Row="1" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="退货" Text="{Binding item_refund.return_delivery_name}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
<TextBox Text="外采:" Grid.Column="1" Grid.Row="1" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="外采" Text="{Binding ItemOrder.out_express_company}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="-" Text="-" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="退货" Text="{Binding item_refund.return_waybill_id}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2,4,2" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="外采" Text="{Binding ItemOrder.out_express_no}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
</WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5">
<TextBox Text="退货:" Grid.Column="1" Grid.Row="1" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="退货" Text="{Binding ItemRefund.return_delivery_name}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="-" Text="-" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<uc:UcWaterMarkTextBox WaterMark="退货" Text="{Binding ItemRefund.return_waybill_id}" Grid.Column="1" Grid.Row="1" Padding="0" Margin="-2,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
</WrapPanel>
<!--
<TextBox Text="店铺备注:" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="店铺备注" Text="{Binding item_order.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="店铺备注" Text="{Binding ItemOrder.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnCopyRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="#409eff" BorderBrush="Transparent"
Margin="4,0,0,0" Content="编辑" Click="btnCopyRemark_Click"></Button>-->
</Grid>
<!--备注-->
<Grid Grid.Column="6" Background="Transparent" VerticalAlignment="Center">
<Grid Grid.Column="7" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -254,15 +291,14 @@
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="2">
<TextBox Text="店铺备注:" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox WaterMark="店铺备注" Text="{Binding item_order.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top"
<uc:UcWaterMarkTextBox WaterMark="店铺备注" Text="{Binding ItemOrder.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnCopyRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="#409eff" BorderBrush="Transparent"
Margin="4,0,0,0" Content="编辑" Click="btnCopyRemark_Click"></Button>
</WrapPanel>
</Grid>
<!--备注-->
<Grid Grid.Column="7" Background="Transparent" VerticalAlignment="Center">
<!--操作-->
<Grid Grid.Column="8" Background="Transparent" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@@ -278,12 +314,14 @@
<!--<Button Grid.Column="1" Grid.Row="2" Background="Transparent" HorizontalAlignment="Center"
Foreground="#409eff" BorderBrush="Transparent" Margin="4,0,0,0" Content="核对拍单" Click=""></Button>-->
<!--<Button Grid.Column="1" Grid.Row="1" Background="Transparent" x:Name="btnBuyOrder" Click="btnBuyOrder_Click"
Visibility="{Binding item_order.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}"
Visibility="{Binding ItemOrder.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}"
Style="{StaticResource BasePageButtonLightStyle}" Margin="4,0,0,0" Content="关联拍单" Width="56" Height="24"/>-->
<Button Grid.Column="1" Grid.Row="1" Background="Transparent" x:Name="btnBuyOrder" Click="btnBuyOrder_Click"
Visibility="{Binding item_order.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}"
Style="{StaticResource BasePageButtonLightStyle}" Margin="4,0,0,0"
HorizontalAlignment="Center" MinWidth="38" Height="24"/>
<Button Grid.Column="1" Grid.Row="1" x:Name="btnBuyOrder" Click="btnBuyOrder_Click"
Visibility="{Binding ItemOrder.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}"
BorderBrush="{Binding BuyGoodsBtnColor}" Background="{Binding BuyGoodsBtnBackColor}" Foreground="{Binding BuyGoodsBtnColor}"
Content="{Binding BuyGoodsBtnTxt}" IsEnabled="{Binding IsBuyGoodsBtnEnabled}" Style="{StaticResource BasePageButtonLightStyle}"
HorizontalAlignment="Center" MinWidth="38" Height="24" Margin="4,0,0,0">
</Button>
</Grid>
</Grid>
</Grid>
@@ -1,11 +1,14 @@
using _29WxOrderWpf.BaseWindows;
using _29WxOrderWpf.Converters;
using AllBase;
using AllBase.Helper;
using AllBase.Model;
using AllBase.Model.Local;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@@ -14,10 +17,13 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TemuKJD.ToolForms;
using Work._29Tools.BLL;
using Work._29Tools.Forms.ShopForms;
using static System.Net.WebRequestMethods;
namespace _29WxOrderWpf.Ctrls.OrderCtrls
@@ -30,6 +36,28 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
public OrderListRowItemCtrl()
{
InitializeComponent();
txtOutOrderBuyerStr.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOutOrderNumStr_MouseLeftButtonUp), true);
txtOutOrderNumStr.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOutOrderNumStr_MouseLeftButtonUp), true);
txtRefundId.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtRefundId_MouseLeftButtonUp), true);
}
private void txtRefundId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if(this.DataContext is oms_wei_order_item_info order_item)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order_item.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
shopLoginForm.openType = Work._29Tools.Forms.ShopForms.EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
{
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/aftersale/detail?orderid=" + order_item.ItemRefund.after_sale_order_id;
}
shopLoginForm.Show();
}
}
}
private void btnSeeAddressDetail_Click(object sender, RoutedEventArgs e)
@@ -61,44 +89,121 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var orderItem = this.DataContext as oms_wei_order_item_info;
if (orderItem == null)
{
BaseMsgWindow.ShowError(MainWindow.Instance, "订单信息为空");
BaseMsgWindow.ShowError("订单信息为空");
return;
}
if (GlobalConfig.CurrentPddBuyer == null)
{
BaseMsgWindow.ShowError(MainWindow.Instance, "请选择买手号");
BaseMsgWindow.ShowError("请选择买手号");
return;
}
// 拍单的时候检测一下买手号
if (GlobalConfig.CurrentPddBuyer.status == "在线")
{
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
}
if (GlobalConfig.CurrentPddBuyer.status != "在线")
{
BaseMsgWindow.ShowError(MainWindow.Instance, "买手号掉线");
BaseMsgWindow.ShowError("买手号掉线");
return;
}
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.buy_map);
if (orderItem.BuyGoodsBtnTxt == "去店铺后台绑定代发")
{
if (orderItem.Shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(orderItem.Shop);
shopLoginForm.openType = Work._29Tools.Forms.ShopForms.EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/supply/consignmentOrderList";
shopLoginForm.IsGetSupplierPage = true;
shopLoginForm.ShowDialog();
//所有订单页面
// 不是立即生效的,不用立即刷新
//var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(orderItem.Shop);
//if (!is29SupplierRst.Contains("\"code\":0"))
// is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(orderItem.Shop);
//if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
//{
// orderItem.Shop.Is29Supplier = true;
//}
//else
//{
// ShopBLL.CheckShopLogin(orderItem.Shop);
// orderItem.Shop.Is29Supplier = false;
//}
//foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == orderItem.Shop.ErpShopId).ToList())
//{
// // 更新代发管理情况
// foreach (var o in order.orderItems)
// Dispatcher.Invoke(new Action(() => { o.UpdateOrderItemBuyButton(); }));
//}
}
return;
}
if (orderItem.Shop?.LoginStatus != "登录成功")
{
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == orderItem.Shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var oi in ord.orderItems)
Dispatcher.Invoke(new Action(() => { oi.UpdateOrderItemBuyButton(); }));
}
BaseMsgWindow.ShowError("请登录店铺");
return;
}
// 检测是否加入代发
if (orderItem.Shop?.LoginStatus == "登录成功")
{
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
if (!is29SupplierRst.Contains("\"code\":0"))
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"supplierName\":\"29供货商\"")) // "supplierName":"29供货商"
{
orderItem.Shop.Is29Supplier = true;
}
else
{
ShopBLL.CheckShopLogin(orderItem.Shop);
if (orderItem.Shop?.LoginStatus != "登录成功")
{
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == orderItem.Shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var oi in ord.orderItems)
Dispatcher.Invoke(new Action(() => { oi.UpdateOrderItemBuyButton(); }));
}
BaseMsgWindow.ShowError("请登录店铺");
return;
}
BaseMsgWindow.ShowError("店铺后台未查询到该代发单,请确认店铺在线且商品加入代发");
return;
}
}
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
// 未关联拍单的跳到所有订单页面
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html"; //"?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001";
buyOrderForm.pnlBuy.Visible = false;
//已有拍单关联的跳的到订单确认界面
if (orderItem.buy_map != null)
// 已有拍单关联的跳的到订单确认界面
if (orderItem.BuyMap != null)
{
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.buy_map.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.buy_map.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
// "&page_from=101&detail_id=" + Randomx.GetNumber(11) + "&_oak_rcto=YW" +
// Randomx.GetWordNumber("JvLXvJ8Fx9mUIW34yn103TOlATJGk5PaZshD6pY1bsVrsIjWdxWwjCoNX3IGT".Length) + "_VWkP5_q-1QNqGg" +
// "&order_extra_type=1&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail" +
// "&refer_page_id=10014_" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_tny5ifswls&refer_page_sn=10014";
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.buy_map.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.buy_map.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
"&page_from=101";
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.buy_map.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.buy_map.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
// "&page_from=0&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail&refer_page_id=10014_" +
// BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10014";
@@ -112,22 +217,116 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (this.DataContext is oms_wei_order_item_info order_item)
{
if (PddMobileBuyOrderForm.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
// 显示预估利润
//if (order_item.BuyMap == null && order_item.ItemOrder.out_amount == 0)
// txtProfitForecast.Visibility = Visibility.Visible;
order_item.UpdateOrderItemBuyButton();
Task.Run(() =>
{
btnBuyOrder.SetValue(ForegroundProperty, new SolidColorBrush(Color.FromArgb(255, 250, 70, 51)));
btnBuyOrder.SetValue(BorderBrushProperty, new SolidColorBrush(Color.FromArgb(255, 250, 70, 51)));
btnBuyOrder.SetValue(BackgroundProperty, new SolidColorBrush(Color.FromArgb(50, 250, 70, 51)));
btnBuyOrder.IsEnabled = false;
btnBuyOrder.Content = "危险品不支持中转拍单";
}
else
{
btnBuyOrder.Content = order_item.buy_map == null ? "关联拍单" : "拍单";
}
// 异步加载图片防止卡顿
// 缩略图在有的电脑上无法显示
//BitmapImage bImg = ImageUrlToBitmapImageConverter.LoadImageFromUrl(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
BitmapImage bImg = ImageUrlToBitmapImageConverter.LoadImageFromUrl(order_item.thumb_img);
Dispatcher.Invoke(new Action(() =>
{
imgOrderItem.Source = bImg;
}));
});
}
else
{
btnBuyOrder.Content = "关联拍单";
//imgOrderItem.Source = null;
}
}
private void txtOutOrderNumStr_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
var buyerName = txtOutOrderBuyerStr.Text.Split(':').LastOrDefault();
var outOrderId = txtOutOrderNumStr.Text.Split(':').LastOrDefault();
if (string.IsNullOrEmpty(buyerName) || string.IsNullOrEmpty(outOrderId))
{
return;
}
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(p => p.buyer_name == buyerName);
var url = "";
if (buyer != null)
{
if (sender == txtOutOrderBuyerStr)
url = "https://mobile.yangkeduo.com/index.html";
else
url = "https://mobile.yangkeduo.com/order.html?order_sn=" + outOrderId + "&page_from=1&main_orders=1&is_tester=1&refer_page_name=my_order" +
"&refer_page_id=10032_" + BaseClass.ConvertDateTimeLong(DateTime.Now) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10032";
}
var orderItem = this.DataContext as oms_wei_order_item_info;
if (orderItem == null)
{
BaseMsgWindow.ShowError("订单信息为空");
return;
}
if (GlobalConfig.CurrentPddBuyer == null)
{
BaseMsgWindow.ShowError("请选择买手号");
return;
}
// 拍单的时候检测一下买手号
if (GlobalConfig.CurrentPddBuyer.status == "在线")
{
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
}
if (GlobalConfig.CurrentPddBuyer.status != "在线")
{
BaseMsgWindow.ShowError("买手号掉线");
return;
}
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
//所有订单页面
buyOrderForm.InitUrl = url;
buyOrderForm.pnlBuy.Visible = false;
//已有拍单关联的控制界面显示隐藏
if (orderItem.BuyMap != null)
{
buyOrderForm.pnlBuy.Visible = true;
buyOrderForm.pnlMap.Visible = false;
}
buyOrderForm.ShowDialog();
}
private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_item_info orderItem)
{
try
{
Clipboard.SetText(orderItem.ItemTransitOrder.out_order_no);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
private void pathRefundId_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_item_info order_item)
{
try
{
Clipboard.SetText(order_item.ItemRefund.after_sale_order_id);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
}
@@ -90,7 +90,7 @@ namespace _29WxOrderWpf.LoginWindows
if (!IsLogin)
{
if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个。", "请先登录或者注册").DialogResult == true)
if (BaseMsgWindow.ShowConfirm("是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个。", "请先登录或者注册", this).DialogResult == true)
Process.GetCurrentProcess().Kill();
else
e.Cancel = true;
@@ -105,13 +105,13 @@ namespace _29WxOrderWpf.LoginWindows
if (cmbUserNameMobile.Text.Length != 11)
{
BaseMsgWindow.ShowError(this, "手机号不正确", "提示");
BaseMsgWindow.ShowError("手机号不正确", "提示", this);
cmbUserNameMobile.Focus();
return;
}
if (txtPassword.Password.Length < 6)
{
BaseMsgWindow.ShowError(this, "密码长度不正确", "提示");
BaseMsgWindow.ShowError("密码长度不正确", "提示", this);
txtPassword.Password = "";
txtPassword.Focus();
return;
+13 -2
View File
@@ -34,7 +34,9 @@
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<orderctrls:OrderListCtrl x:Name="orderListCtrl" Grid.Column="1" Visibility="Collapsed"></orderctrls:OrderListCtrl>
<buyerctrls:PDDBuyerOrderReadCtrl x:Name="pddBuyerOrderReadCtrl" Grid.Column="1" Visibility="Collapsed" Panel.ZIndex="-1" Width="1200" HorizontalAlignment="Right" Margin="0,50,0,0"></buyerctrls:PDDBuyerOrderReadCtrl>
<Grid x:Name="gridPddBuyerOrderReadCtrl" Visibility="Hidden" Grid.ColumnSpan="2" Background="#7F000000">
<buyerctrls:PDDBuyerOrderReadCtrl x:Name="pddBuyerOrderReadCtrl" Grid.Column="1" Visibility="Collapsed" Panel.ZIndex="-1" Width="1200" HorizontalAlignment="Right" Margin="0,50,0,0"></buyerctrls:PDDBuyerOrderReadCtrl>
</Grid>
<buyerctrls:PDDBuyerSelectCtrl x:Name="pddBuyerSelectCtrl" Visibility="Collapsed" Width="280" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="8"/>
<Grid x:Name="gridUser" Visibility="Hidden" Grid.ColumnSpan="2" Background="#7F000000">
<Border CornerRadius="4" Width="500" Height="600" Background="White">
@@ -43,6 +45,15 @@
</Border>
</Grid>
</Grid>
<userctrls:UcWindowBoxes VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Visible"/>
<userctrls:UcWindowBoxes x:Name="ucWindowBox" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Visible"/>
<Border x:Name="borderMessage" Grid.Row="1" Width="auto" Height="auto" HorizontalAlignment="Center" Margin="10,50" VerticalAlignment="Top" BorderThickness="1" Opacity="0"
BorderBrush="{StaticResource pageColorBrush}" CornerRadius="6" Background="White" IsHitTestVisible="False"
MinWidth="120" MinHeight="2" Panel.ZIndex="1000000">
<Border.Effect>
<DropShadowEffect ShadowDepth="5" Color="#FF98638f" BlurRadius="40" Opacity="0.2"/>
</Border.Effect>
<TextBlock Text="这里是默认提示信息" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="tbMessage"></TextBlock>
</Border>
</Grid>
</basewindows:BaseWindow>
+60 -7
View File
@@ -31,12 +31,13 @@ using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml.Linq;
using Work;
using Work.BLL;
using Work._29Tools.BLL;
namespace _29WxOrderWpf
{
@@ -58,6 +59,8 @@ namespace _29WxOrderWpf
private void Window_Loaded(object sender, RoutedEventArgs e)
{
ucWindowBox.SetWindowMax();
new Thread(AutoAntiGrabbingMechanism).Start(); // 反抓包
#region 弹出登录窗口
@@ -199,7 +202,7 @@ namespace _29WxOrderWpf
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
if (BaseMsgWindow.ShowConfirm("是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
Process.GetCurrentProcess().Kill();
else
e.Cancel = true;
@@ -213,6 +216,8 @@ namespace _29WxOrderWpf
if (isReadShop)
return;
var tList = new List<Task>();
var cList = new List<int>();
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
Dispatcher.Invoke(new Action(() =>
{
@@ -244,21 +249,67 @@ namespace _29WxOrderWpf
{
var shop = ShopBLL.DeserializationShop(jObj);
var shopExist = list.Where(l => l.ShopId == shop.ShopId).ToList();
if (shopExist != null)
shopExist.Remove(shop);
var shopExist = list.LastOrDefault(l => l.ShopId == shop.ShopId);
while (shopExist != null)
{
shop.Is29Supplier = shopExist.Is29Supplier;
shop.IsSelect = shopExist.IsSelect;
shop.IsFilter = shopExist.IsFilter;
list.Remove(shopExist);
}
// 更新店铺 // 代发管理中更新
//foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
//{
// foreach (var orderItem in order.orderItems)
// orderItem.Shop = shop;
//}
list.Add(shop);
if (!GlobalConfig.ShopLoginList.Any(s => s.ShopId == shop.ShopId && !shop.is_point_shop_expire))
{
Dispatcher.Invoke(new Action(() =>
{
GlobalConfig.ShopLoginList.Add(shop);
}));
var t = Task.Run(() =>
{
while (cList.Count > 20) { Thread.Sleep(100); }
cList.Add(1);
try
{
if (shop.LoginStatus == "登录成功")
{
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
if (!is29SupplierRst.Contains("\"code\":0"))
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
{
shop.Is29Supplier = true;
}
else
{
ShopBLL.CheckShopLogin(shop);
shop.Is29Supplier = false;
}
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var orderItem in order.orderItems)
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
}
}
}
catch
{
}
if (cList.Count > 0)
cList.RemoveAt(0);
});
tList.Add(t);
}
}
}
Dispatcher.Invoke(new Action(() =>
{
foreach (var shop in GlobalConfig.ShopLoginList.Where(s => !list.Any(ss => ss.ShopId == s.ShopId)).ToList())
@@ -272,6 +323,8 @@ namespace _29WxOrderWpf
}));
isReadShop = false;
hasReadShop = true;
while (tList.Where(ta => !ta.IsFaulted && !ta.IsCompleted).Count() >= 1) { tList.RemoveAll(ta => ta.IsFaulted || ta.IsCompleted || ta.IsCanceled); Thread.Sleep(100); }
}
#endregion
+12 -7
View File
@@ -137,24 +137,29 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="buttonBorder" Background="{TemplateBinding Background}" Cursor="Hand"
<Border x:Name="btnBorder" Background="{TemplateBinding Background}" Cursor="Hand"
BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}"
<!--<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>
</ContentPresenter>-->
<Label Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"
ContentStringFormat="{TemplateBinding ContentStringFormat}" x:Name="lblContent"
ContentTemplate="{TemplateBinding ContentTemplate}" Padding="0" Margin="0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Foreground" TargetName="lblContent" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Background" TargetName="btnBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Foreground" TargetName="lblContent" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Background" TargetName="btnBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@@ -47,6 +48,11 @@ namespace _29WxOrderWpf.UserControls
InitializeComponent();
}
public void SetWindowMax()
{
this.BtnMax_Click(null, null);
}
private void WindowBoxes_Loaded(object sender, RoutedEventArgs e)
{
this.btnClose.Click += BtnClose_Click;
+4 -4
View File
@@ -26,7 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>..\bin\AllBase.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
@@ -40,7 +40,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
<OutputPath>..\Bin\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
@@ -59,11 +59,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
<OutputPath>..\Bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+2 -1
View File
@@ -22,7 +22,7 @@ namespace AllBase
/// 版本ID
/// </summary>
public static int VersionCount = 113;
public static int VersionCount = 126;
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
public static string DebugUrl { get; set; } = "http://localhost:9000";
@@ -573,6 +573,7 @@ namespace AllBase
public static int ShopPointsPerMonth { get; set; }
public static string Mobile { get; set; }
public static string ParentAuthority { get; set; }
public static string ForbiddenPage { get; set; }
public static string UserAuthority { get; set; }
public static string ParentUserName { get; set; }
public static string MainUserName { get { return string.IsNullOrEmpty(ParentUserName) ? UserName : ParentUserName; } }
+12
View File
@@ -667,6 +667,18 @@ namespace AllBase
return defaultValue;
}
/// <summary>
/// 获取值
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static string GetStringXml(ref string html, string reg)
{
string temp = GetMatchRegexString(html, @"<" + reg + ">([^']+?)</" + reg + ">");
return temp;
}
public static string GetOneJsonObjStrJson(ref string html, string reg)
{
return GetJsonObjStrJson(ref html, reg).FirstOrDefault();
+24
View File
@@ -2036,6 +2036,30 @@ Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom
#endregion
/// <summary>
/// 字符串转Unicode
/// </summary>
/// <param name="source">源字符串</param>
/// <returns>Unicode编码后的字符串</returns>
public static string String2Unicode(string source)
{
var bytes = Encoding.Unicode.GetBytes(source);
var stringBuilder = new StringBuilder();
for (var i = 0; i < bytes.Length; i += 2)
{
stringBuilder.AppendFormat("\\u{0}{1}", bytes[i + 1].ToString("x").PadLeft(2, '0'), bytes[i].ToString("x").PadLeft(2, '0'));
}
return stringBuilder.ToString();
}
/// <summary>
/// Unicode转字符串
/// </summary>
/// <param name="source">经过Unicode编码的字符串</param>
/// <returns>正常字符串</returns>
public static string Unicode2String(string source)
{
return new Regex(@"\\u([0-9A-F]{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled).Replace(source, x => Convert.ToChar(Convert.ToUInt16(x.Result("$1"), 16)).ToString());
}
}
}
+5
View File
@@ -45,6 +45,11 @@ namespace AllBase.Helper
/// </summary>
public static List<PddMultiBuyerInfo> LstMultiBuyer = new List<PddMultiBuyerInfo>();
// 敏感词
//public static string dangerItemWords = "打火机,压力罐,刀具,铡刀,充电宝,罂粟,礼炮,煤气罐,仿制枪,暖手宝,灭火器,火炮,纸炮枪,手枪,毫安,喷漆,酒精,锂电,电池,火柴,气罐,燃气,气泡弹,喷雾";
public static string dangerItemWords = "打火机,压力罐,刀具,铡刀,充电宝,罂粟,礼炮,煤气罐,仿制枪,暖手宝,灭火器,火炮,纸炮枪,手枪,毫安,喷漆,酒精,锂电,电池,火柴,气罐,气泡弹,喷雾";
public static List<string> lstDangerItemWord { get; set; } = dangerItemWords.Split(',').ToList();
public static System.Drawing.Color DefaultMainColor { get; set; } = System.Drawing.Color.FromArgb(63, 126, 255);
public static System.Drawing.Color DefaultMainColorLight { get; set; } = System.Drawing.Color.FromArgb(185, 215, 255);
public static System.Drawing.Color DefaultBorderColor { get; set; } = System.Drawing.Color.FromArgb(25, 98, 200);
+27 -1
View File
@@ -5,11 +5,20 @@ using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace AllBase.Model.Local
{
/// <summary>
/// 是否已绑定代发仓库
/// </summary>
public class ShopLoginInfo : PropertyNotifyObject
{
public bool? Is29Supplier
{
get { return this.GetValue(x => x.Is29Supplier); }
set { this.SetValue(x => x.Is29Supplier, value); }
}
/// <summary>
/// 是否被选中
/// </summary>
@@ -26,6 +35,7 @@ namespace AllBase.Model.Local
get { return this.GetValue(x => x.IsFilter); }
set { this.SetValue(x => x.IsFilter, value); }
}
public string DbId { get; set; }
public string CompanyName { get; set; }
public string LoginName { get; set; }
@@ -39,7 +49,23 @@ namespace AllBase.Model.Local
public string Signature { get; set; }
public string TouTiaoId { get; set; }
public string Cookies { get; set; }
public string LoginStatus { get; set; }
/// <summary>
/// 在线、掉线
/// </summary>
public string LoginStatusStr
{
get { return this.GetValue(x => x.LoginStatusStr); }
set { this.SetValue(x => x.LoginStatusStr, value); }
}
public string LoginStatus
{
get { return this.GetValue(x => x.LoginStatus); }
set
{
this.SetValue(x => x.LoginStatus, value);
LoginStatusStr = value == "登录成功" ? "在线" : "掉线";
}
}
public string ApiAuthStatus { get; set; }
/// <summary>
/// 上货账户
+12 -12
View File
@@ -38,22 +38,22 @@ namespace AllBase.Model.Local
public class TransitWarehouseData
{
public static string TransitWarehouseDataStr = @"
XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北苑街道西站大道妈妈商贸6号库3楼中库走到底鸿鹄云仓(康诚楼上) ;31 ;386 ;3409
XDYJJC ;晋江仓 ;安群 ;19905951984 ;福建省泉州市南安市霞美镇温山村431号鸿鹄大厦 ;4 ;58 ;569
XDYBJC ;北京仓 ;胡萍 ;18565773752 ;北京市顺义区光明街道滨河小区七区1号楼 ;2 ;52 ;511
XDYCDC ;成都仓 ;谢春虹 ;15828201479 ;四川省资阳市乐至县仙鹤大道桑都街15-19号仓库(不要放驿站,送到仓库) ;26 ;340 ;2898
XDYGZC ;广州仓 ;何外华 ;13826339849 ;广州市从化区太平镇高埔细埔街99号东门4栋3楼 ;6 ;76 ;692
XDYWHC ;武汉2仓 ;杨先生 ;13044121071 ;湖北省武汉市汉阳区洲头街道汉新大道2号鲲鹏公司 ;13 ;180 ;1548
XDYSHANDC ;山东2仓 ;鸿鹄小申 ;13044121239 ;山东省临沂市费县南外环东转盘往东200米顺通快递有限公司(仓库二楼) ;22 ;292 ;2415
XDYCHONGQC ;重庆2仓 ;翁桂柱 ;18923911055 ;重庆市九龙坡区中梁山街道云飞九龙香山(二纵线东50米)重庆九龙坡区渝州公司 ;32 ;394 ;3339
XDYGZC ;广州仓 ;何外华 ;13826339849 ;广州市从化区太平镇高埔细埔街99号东门4栋3楼 ;6 ;76 ;692
XDYBJC ;北京仓 ;胡萍 ;18565773752 ;北京市顺义区光明街道滨河小区七区1号楼 ;2 ;52 ;511
XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市上海市普陀区真如镇街道真北路2653弄G区 ;25 ;321 ;2709
XDYJJC ;晋江仓 ;安群 ;19905951984 ;福建省泉州市南安市霞美镇温山村431号鸿鹄大厦 ;4 ;58 ;569
XDYHEBC ;哈尔滨仓 ;韩健 ;13044121250 ;黑龙江省哈尔滨市双城区新兴镇钱江路南侧韵达快递分拨中心发出库房84号装车口旁边电梯 ;12 ;167 ;1426
XDYXA ;西安仓 ;方先生 ;15813526665 ;陕西省西安市雁塔区田马路厨具市场内韵达超市(田马路店);24 ;311 ;2599
XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北苑街道西站大道妈妈商贸6号库3楼中库走到底鸿鹄云仓(康诚楼上) ;31 ;386 ;3409
XDYZZC ;郑州仓 ;朱红艳 ;13044121247 ;河南省郑州市经济开发区祥云办公处润之新物流园韵达速递 ;11 ;149 ;1259
XDYGYC ;贵阳仓 ;潘小娘 ;19218546304 ;贵州省黔南州龙里县谷脚镇韵达分拨中心 综合楼一楼 食堂隔壁(不要放驿站,送到仓库) ;8 ;116 ;1017
XDYKMC ;昆明仓 ;杨源炜 ;19533700289 ;云南省昆明市宜良县北古城镇红枫路一号韵达分拨(不要放驿站,送到仓库) ;30 ;367 ;3109
XDYCDC ;成都仓 ;谢春虹 ;15828201479 ;四川省资阳市乐至县仙鹤大道桑都街15-19号仓库(不要放驿站,送到仓库) ;26 ;340 ;2898
XDYSSC ;河北仓 ;田女士 ;13382898026 ;河北省衡水市安平县兴安大道灿达创业基地韵达库房A-1 ;10 ;143 ;1180
XDYSZC ;深圳仓 ;峰峰 ;15343351331 ;广东省东莞市东莞市凤岗镇 浸校塘东良巷兔喜生活(云仓);6 ;79 ;732";
//XDYCHONGQC ;重庆2仓 ;翁桂柱 ;18923911055 ;重庆市九龙坡区中梁山街道云飞九龙香山(二纵线东50米)重庆九龙坡区渝州公司 ;32 ;394 ;3339
//XDYHEBC ;哈尔滨仓 ;韩健 ;13044121250 ;黑龙江省哈尔滨市双城区新兴镇钱江路南侧韵达快递分拨中心发出库房84号装车口旁边电梯 ;12 ;167 ;1426
//XDYXA ;西安仓 ;方先生 ;15813526665 ;陕西省西安市雁塔区田马路厨具市场内韵达超市(田马路店);24 ;311 ;2599
//XDYGYC ;贵阳仓 ;潘小娘 ;19218546304 ;贵州省黔南州龙里县谷脚镇韵达分拨中心 综合楼一楼 食堂隔壁(不要放驿站,送到仓库) ;8 ;116 ;1017
//XDYKMC ;昆明仓 ;杨源炜 ;19533700289 ;云南省昆明市宜良县北古城镇红枫路一号韵达分拨(不要放驿站,送到仓库) ;30 ;367 ;3109
//XDYSSC ;河北仓 ;田女士 ;13382898026 ;河北省衡水市安平县兴安大道灿达创业基地韵达库房A-1 ;10 ;143 ;1180
//XDYZZC ;郑州仓 ;朱红艳 ;13044121247 ;河南省郑州市经济开发区祥云办公处润之新物流园韵达速递 ;11 ;149 ;1259
static List<TransitWarehouseParam> transitWarehouseList = null;
@@ -10,7 +10,12 @@ namespace AllBase.Model.Local
{
public string OutOrderNumStr
{
get { return "外部单号:" + out_order_no; }
get { return "采购单号:" + out_order_no; }
set { }
}
public string OutOrderBuyerStr
{
get { return "采购账户:" + buyer_account; }
set { }
}
@@ -29,7 +34,8 @@ namespace AllBase.Model.Local
public string refund_status { get; set; }
public DateTime pickup_time { get; set; }
/// <summary>
/// 中转仓状态:0 未使用,1 已创建,2 创建失败
/// 中转仓状态:0 未使用,1 已创建,2 创建失败,3 处理中(业务方根据此字段处理中转流程)
/// 使用此字段判断中转仓库是否已取号
/// </summary>
public int? transfer_warehouse_status { get; set; }
public string raw_message { get; set; }
@@ -39,7 +45,8 @@ namespace AllBase.Model.Local
public string order_platform_code { get; set; }
public string order_code { get; set; }
/// <summary>
/// 1正常取号 2提前取号
/// 取号状态 1 正常取号 2提前取号 3已更正 (已修改提前取号为正常取号)
/// 使用此字段判断取号状态,如果是提前取号,需要修改新的物流单号,此时服务端状态将替换为已更正
/// </summary>
public int? pre_allocated_order_no { get; set; }
+23 -122
View File
@@ -16,21 +16,22 @@ namespace AllBase.Model.Local
{
public class oms_wei_order_info : PropertyNotifyObject
{
public ObservableCollection<oms_wei_order_item_info> orderItems { get; set; } = new ObservableCollection<oms_wei_order_item_info>();
public ObservableCollection<oms_wei_order_item_info> order_items { get; set; } = new ObservableCollection<oms_wei_order_item_info>();
public oms_wei_order_item_info order_item1 { get { return order_items?.Count > 0 ? order_items[0] : null; } }
public oms_wei_order_item_info order_item2 { get { return order_items?.Count > 1 ? order_items[1] : null; } }
public oms_wei_order_item_info order_item3 { get { return order_items?.Count > 2 ? order_items[2] : null; } }
public oms_wei_order_item_info order_item4 { get { return order_items?.Count > 3 ? order_items[3] : null; } }
public oms_wei_order_item_info order_item5 { get { return order_items?.Count > 4 ? order_items[4] : null; } }
public oms_wei_order_item_info order_item1 { get { return orderItems?.Count > 0 ? orderItems[0] : null; } }
public oms_wei_order_item_info order_item2 { get { return orderItems?.Count > 1 ? orderItems[1] : null; } }
public oms_wei_order_item_info order_item3 { get { return orderItems?.Count > 2 ? orderItems[2] : null; } }
public oms_wei_order_item_info order_item4 { get { return orderItems?.Count > 3 ? orderItems[3] : null; } }
public oms_wei_order_item_info order_item5 { get { return orderItems?.Count > 4 ? orderItems[4] : null; } }
public Visibility order_item1_visibility { get { return order_item1 == null ? Visibility.Collapsed : Visibility.Visible; } }
public Visibility order_item2_visibility { get { return order_item2 == null ? Visibility.Collapsed : Visibility.Visible; } }
public Visibility order_item3_visibility { get { return order_item3 == null ? Visibility.Collapsed : Visibility.Visible; } }
public Visibility order_item4_visibility { get { return order_item4 == null ? Visibility.Collapsed : Visibility.Visible; } }
public Visibility order_item5_visibility { get { return order_item5 == null ? Visibility.Collapsed : Visibility.Visible; } }
public ObservableCollection<oms_wei_refund_info> refunds { get; set; } = new ObservableCollection<oms_wei_refund_info>();
public ObservableCollection<oms_wei_refund_info> refundItems { get; set; } = new ObservableCollection<oms_wei_refund_info>();
private bool isWaitBuy;
/// <summary>
/// 待采购
/// </summary>
@@ -38,7 +39,7 @@ namespace AllBase.Model.Local
{
get
{
if (order_items.All(oi => oi.item_transit_order != null)) return false;
if (orderItems.All(oi => oi.ItemTransitOrder != null)) return false;
if (purchase_status != 0) return false;
if (!out_order_no.IsNullOrEmpty()) return false;
if (status != 20 && status != 21) return false;
@@ -54,7 +55,7 @@ namespace AllBase.Model.Local
//get { return (purchase_status == 1 || !string.IsNullOrEmpty(out_order_no)) && (status == 20 || status == 21); }
get
{
if (purchase_status != 1 && string.IsNullOrEmpty(out_order_no) && !order_items.All(oi => oi.item_transit_order != null)) return false;
if (purchase_status != 1 && string.IsNullOrEmpty(out_order_no) && !orderItems.All(oi => oi.ItemTransitOrder != null)) return false;
if (status != 20 && status != 21) return false;
return true;
}
@@ -70,7 +71,7 @@ namespace AllBase.Model.Local
}
public bool IsRefund
{
get { return refunds?.Count > 0; }
get { return refundItems?.Count > 0; }
set { }
}
@@ -96,12 +97,18 @@ namespace AllBase.Model.Local
set { }
}
public DateTime? createDateTime = null;
/// <summary>
/// 订单生成时间
/// </summary>
public string create_time_str
{
get { return BaseClass.StampToDateTime(create_time).ToString("yyyy-MM-dd HH:mm:ss"); }
get
{
if (createDateTime == null)
createDateTime = BaseClass.StampToDateTime(create_time);
return createDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
}
set { }
}
@@ -130,12 +137,12 @@ namespace AllBase.Model.Local
{
get
{
if (this.refunds.Any(r => "商家受理中,待买家退货,待商家收货,平台退款中,待用户确认,待用户处理商家协商,待用户处理商家代发起的售后申请".Contains(r.statusStr)))
if (this.refundItems.Any(r => "商家受理中,待买家退货,待商家收货,平台退款中,待用户确认,待用户处理商家协商,待用户处理商家代发起的售后申请".Contains(r.statusStr)))
return "退款中";
else if (this.refunds.Any(r => r.statusStr == "退款完成" || r.statusStr == "退货退款完成"))
else if (this.refundItems.Any(r => r.statusStr == "退款完成" || r.statusStr == "退货退款完成"))
return "退款完成";
else if (this.refunds.Any(r => !r.statusStr.IsNullOrEmpty()))
return this.refunds.FirstOrDefault(r => !r.statusStr.IsNullOrEmpty()).statusStr;
else if (this.refundItems.Any(r => !r.statusStr.IsNullOrEmpty()))
return this.refundItems.FirstOrDefault(r => !r.statusStr.IsNullOrEmpty()).statusStr;
if (this.status == 20 || this.status == 21)
{
return "剩余";
@@ -168,7 +175,7 @@ namespace AllBase.Model.Local
else
return "未发货";
}
set { /*delivery_deadline_str = value;*/ }
set {}
}
public SolidColorBrush StatusBoxForeColor
@@ -201,13 +208,6 @@ namespace AllBase.Model.Local
{
get
{
//if (delivery_deadline_status_str == "退款中" || delivery_deadline_str == "已超时")
// return new SolidColorBrush(Color.FromRgb(246, 212, 210)); // #f6d4d2
//else if (delivery_deadline_status_str == "退款完成" || delivery_deadline_str == "已发货")
// return new SolidColorBrush(Color.FromRgb(217, 237, 212)); // #d9edd4
//else
// return new SolidColorBrush(Color.FromRgb(232, 251, 249)); // #e8fbf9
if (delivery_deadline_status_str == "退款中" || delivery_deadline_str == "已超时")
return new SolidColorBrush(Color.FromArgb(50, 250, 71, 51)); // #fa4733 0.2
else if (delivery_deadline_status_str == "退款完成" || delivery_deadline_str == "已发货")
@@ -218,111 +218,12 @@ namespace AllBase.Model.Local
set { }
}
public string address_str
{
get { return user_name + " " + tel_number + " " + province_name + " " + city_name + " " + county_name + " " + detail_info; }
set { }
}
///// <summary>
///// 订单中所有商品加起来的总售价文本
///// </summary>
//public string real_price_str
//{
// //get { return "¥" + (order_items.Sum(oi => oi.sale_price * oi.sku_cnt) * 0.01m).ParseToDecimal().ToString("0.00"); }
// get { return "¥" + (order_items.Sum(oi => oi.real_price) * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
///// <summary>
///// 订单内商品维度平台券优惠金额(利润需要计算这个金额在内)文本
///// </summary>
//public string cash_coupon_discounted_price_str
//{
// //get { return "¥" + (order_items.Sum(oi => oi.cash_coupon_discounted_price.ParseToInt() * oi.sku_cnt) * 0.01m).ParseToDecimal().ToString("0.00"); }
// get { return "¥" + (order_items.Sum(oi => oi.cash_coupon_discounted_price.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); }
// //get { return "¥" + (discounted_price * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
///// <summary>
///// 采购价文本
///// </summary>
//public string purchase_price_str
//{
// get { return "¥" + (order_items.Sum(oi => oi.purchase_price.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); }
// //get { return "¥" + (purchase_price * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
//public Visibility purchase_price_visibility
//{
// get { if (out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
// set { }
//}
///// <summary>
///// 运费文本
///// </summary>
//public string freight_str
//{
// get { return "¥" + (order_items.Sum(oi => oi.freight.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); }
// //get { return "¥" + (freight * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
//public Visibility freight_visibility
//{
// get { if (out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
// set { }
//}
///// <summary>
///// 平台服务费
///// </summary>
//public string predict_commission_fee_string
//{
// get { return "¥" + (order_items.Sum(oi => oi.predict_commission_fee.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); }
// //get { return "¥" + (predict_commission_fee * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
///// <summary>
///// 达人佣金
///// </summary>
//public string commission_amount_str
//{
// get { return "¥" + (order_items.Sum(oi => oi.commission_amount.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); }
// //get { return "¥" + (commission_amount * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
///// <summary>
///// 外采金额文本
///// </summary>
//public string out_amount_str
//{
// get { return "¥" + (out_amount * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { /*out_amount_str = value;*/ }
//}
///// <summary>
///// 利润文本
///// </summary>
//public string profit_str
//{
// //get { return "¥" + (profit * 0.01m).ParseToDecimal().ToString("0.00"); }
// get { return "¥" + ((profit - out_amount) * 0.01m).ParseToDecimal().ToString("0.00"); }
// set { }
//}
/// <summary>
/// 是否被选中
/// </summary>
+192 -43
View File
@@ -1,6 +1,8 @@
using AllBase.Model.MvvmBaseClasses;
using AllBase.Helper;
using AllBase.Model.MvvmBaseClasses;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Asn1.Mozilla;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,53 +16,121 @@ namespace AllBase.Model.Local
{
public class oms_wei_order_item_info : PropertyNotifyObject
{
public oms_wei_order_info item_order { get; set; }
public oms_wei_refund_info item_refund
public ShopLoginInfo Shop
{
get
{
if (item_order?.refunds?.Count == 0)
return null;
if (item_order?.refunds?.Count == 1)
return item_order?.refunds?.FirstOrDefault();
return item_order?.refunds?.FirstOrDefault(r => r.sku_id == this.sku_id);
}
set { }
get { return this.GetValue(x => x.Shop); }
set { this.SetValue(x => x.Shop, value); }
}
public oms_wei_order_info ItemOrder
{
get { return this.GetValue(x => x.ItemOrder); }
set { this.SetValue(x => x.ItemOrder, value); }
}
public oms_wei_refund_info ItemRefund
{
get { return this.GetValue(x => x.ItemRefund); }
set { this.SetValue(x => x.ItemRefund, value); }
}
public void SetItemRefund(List<oms_wei_refund_info> itemRefunds)
{
if (itemRefunds?.Count == 1)
ItemRefund = ItemOrder?.refundItems?.FirstOrDefault();
else
ItemRefund = ItemOrder?.refundItems?.FirstOrDefault(r => r.sku_id == this.sku_id);
}
/// <summary>
/// 采购关联
/// </summary>
public WXBuyMapInfo buy_map
public WXBuyMapInfo BuyMap
{
get { return this.GetValue(x => x.buy_map); }
set { this.SetValue(x => x.buy_map, value); }
get { return this.GetValue(x => x.BuyMap); }
set { this.SetValue(x => x.BuyMap, value); }
}
public List<oms_wei_external_procurement_log> item_transit_orders { get; set; } = new List<oms_wei_external_procurement_log>();
public oms_wei_external_procurement_log item_transit_order
/// <summary>
/// 采购按钮文字
/// </summary>
public string BuyGoodsBtnTxt
{
get { return item_transit_orders.FirstOrDefault(); }
get { return this.GetValue(x => x.BuyGoodsBtnTxt); }
set { this.SetValue(x => x.BuyGoodsBtnTxt, value); }
}
/// <summary>
/// 采购按钮颜色
/// </summary>
public SolidColorBrush BuyGoodsBtnColor
{
get { return this.GetValue(x => x.BuyGoodsBtnColor); }
set { this.SetValue(x => x.BuyGoodsBtnColor, value); }
}
/// <summary>
/// 采购按钮背景颜色
/// </summary>
public SolidColorBrush BuyGoodsBtnBackColor
{
get { return this.GetValue(x => x.BuyGoodsBtnBackColor); }
set { this.SetValue(x => x.BuyGoodsBtnBackColor, value); }
}
public bool IsBuyGoodsBtnEnabled
{
get { return this.GetValue(x => x.IsBuyGoodsBtnEnabled); }
set { this.SetValue(x => x.IsBuyGoodsBtnEnabled, value); }
}
public List<oms_wei_external_procurement_log> ItemTransitOrders { get; set; } = new List<oms_wei_external_procurement_log>();
public oms_wei_external_procurement_log ItemTransitOrder
{
get { return ItemTransitOrders.FirstOrDefault(); }
set { }
}
// 仓库采购时间是否达标字段
public string OutOrderTimeQualifiedStr
{
get
{
if (ItemTransitOrder == null)
return "";
if (ItemOrder.createDateTime == null)
ItemOrder.createDateTime = BaseClass.StampToDateTime(ItemOrder.create_time);
string timeStr = "采购时间:" + ItemTransitOrder.created_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ItemOrder.createDateTime.Value.Date != ItemTransitOrder.created_time.Date && ItemTransitOrder.created_time > ItemTransitOrder.created_time.Date.AddHours(1.5))
return timeStr + " ×";
return timeStr + " √";
}
set { }
}
/// <summary>
/// 仓库采购时间是否达标字段
/// </summary>
public SolidColorBrush OutOrderTimeQualifiedBrush
{
get
{
return OutOrderTimeQualifiedStr.EndsWith("√") ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51));
}
}
public string OrderItemStatusStr
{
get
{
if (item_order?.status == 10)
if (ItemOrder?.status == 10)
return "待付款";
if (item_order?.status == 20)
if (ItemOrder?.status == 20)
return "待店铺发货";
if (item_order?.status == 21)
if (ItemOrder?.status == 21)
return "店铺部分发货";
if (item_order?.status == 30)
if (ItemOrder?.status == 30)
return "待买家收货";
if (item_order?.status == 100)
if (ItemOrder?.status == 100)
return "订单完成";
if (item_order?.status == 200)
if (ItemOrder?.status == 200)
return "售后完成订单取消";
if (item_order?.status == 250)
if (ItemOrder?.status == 250)
return "未付款已取消";
return "未知状态";
}
@@ -116,12 +186,12 @@ namespace AllBase.Model.Local
{
get
{
if (item_refund == null)
if (ItemRefund == null)
return "";
if (item_refund.status != "MERCHANT_REFUND_SUCCESS" && item_refund.status != "MERCHANT_RETURN_SUCCESS")
if (ItemRefund.status != "MERCHANT_REFUND_SUCCESS" && ItemRefund.status != "MERCHANT_RETURN_SUCCESS")
return "";
return "商品退款数量:" + item_refund.count + ",订单状态:" + item_order.orderStatusStr;
return "商品退款数量:" + ItemRefund.count + ",订单状态:" + ItemOrder.orderStatusStr;
}
set { }
}
@@ -131,7 +201,7 @@ namespace AllBase.Model.Local
/// </summary>
public string refund_time_str
{
get { return BaseClass.StampToDateTime((item_refund?.create_time).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss"); }
get { return BaseClass.StampToDateTime((ItemRefund?.create_time).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss"); }
set { }
}
/// <summary>
@@ -141,7 +211,7 @@ namespace AllBase.Model.Local
{
get
{
return (this.item_refund?.create_time) > 0 ? Visibility.Visible : Visibility.Collapsed;
return (this.ItemRefund?.create_time) > 0 ? Visibility.Visible : Visibility.Collapsed;
}
set { }
}
@@ -149,9 +219,8 @@ namespace AllBase.Model.Local
/// <summary>
/// 订单中所有商品加起来的总售价文本
/// </summary>
public string real_price_str
public string realPriceStr
{
//get { return "¥" + (order_items.Sum(oi => oi.sale_price * oi.sku_cnt) * 0.01m).ParseToDecimal().ToString("0.00"); }
//get { return "¥" + (order_items.Sum(oi => oi.real_price) * 0.01m).ParseToDecimal().ToString("0.00"); }
get { return "¥" + (real_price * 0.01m).ParseToDecimal().ToString("0.00"); }
set { }
@@ -181,7 +250,7 @@ namespace AllBase.Model.Local
/// </summary>
public Visibility purchase_price_visibility
{
get { if (item_order.out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
get { if (ItemOrder.out_amount > 0 || ItemTransitOrder?.out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
set { }
}
@@ -199,7 +268,7 @@ namespace AllBase.Model.Local
/// </summary>
public Visibility freight_visibility
{
get { if (item_order.out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
get { if (ItemOrder.out_amount > 0 || ItemTransitOrder?.out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; }
set { }
}
@@ -228,21 +297,58 @@ namespace AllBase.Model.Local
/// </summary>
public string out_amount_str
{
//get { return "¥" + (item_order.out_amount * 0.01m).ParseToDecimal().ToString("0.00"); }
get { return "¥" + (commission_amount.ParseToInt() * 0.01m).ParseToDecimal().ToString("0.00"); }
//get { return "¥" + (ItemOrder.out_amount * 0.01m).ParseToDecimal().ToString("0.00"); }
get
{
if (ItemTransitOrder?.out_amount > 0)
return "¥" + (ItemTransitOrder.out_amount * 0.01m).ParseToDecimal().ToString("0.00");
else
return "¥" + (commission_amount.ParseToInt() * 0.01m).ParseToDecimal().ToString("0.00");
}
set { }
}
decimal profitCount = decimal.MinValue;
/// <summary>
/// 利润文本
/// 通过计算的利润
/// </summary>
public string profit_str
public decimal ProfitCount
{
get
{
if (profitCount == decimal.MinValue)
{
//ItemOrder.out_amount ItemTransitOrder.out_amount 只有一个有值
var out_amount = ItemTransitOrder?.out_amount ?? ItemOrder.out_amount / ItemOrder.orderItems.Count;
profitCount = ((real_price.ParseToInt() + cash_coupon_discounted_price.ParseToInt() - purchase_price.ParseToInt() - freight.ParseToInt() - predict_commission_fee.ParseToInt() -
commission_amount.ParseToInt() - out_amount.ParseToInt()) * 0.01m).ParseToDecimal();
}
return profitCount;
}
}
/// <summary>
/// 通过计算的利润文本
/// </summary>
public string ProfitCountStr
{
//get { return "¥" + (profit * 0.01m).ParseToDecimal().ToString("0.00"); }
//get { return "¥" + ((item_order.profit - item_order.out_amount) * 0.01m).ParseToDecimal().ToString("0.00"); }
get { return "¥" + ((real_price.ParseToInt() + cash_coupon_discounted_price.ParseToInt() - purchase_price.ParseToInt() - freight.ParseToInt() -
predict_commission_fee.ParseToInt() - commission_amount.ParseToInt() - item_order.out_amount / item_order.order_items.Count) * 0.01m)
.ParseToDecimal().ToString("0.00"); }
//get { return "¥" + ((ItemOrder.profit - ItemOrder.out_amount) * 0.01m).ParseToDecimal().ToString("0.00"); }
get
{
if (refund_status == 2 || refund_status == 3 || refund_status == 4 || refund_status == 11)
return "--";
return "¥" + ProfitCount.ToString("0.00");
}
set { }
}
public SolidColorBrush ProfitStrColor
{
get
{
if (refund_status == 2 || refund_status == 3 || refund_status == 4 || refund_status == 11)
return new SolidColorBrush(Color.FromRgb(127, 127, 127));
return ProfitCount > 0 ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51));
}
set { }
}
@@ -403,8 +509,51 @@ namespace AllBase.Model.Local
/// </summary>
public long? erp_goods_sku_id { get; set; }
/// <summary>
/// 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功 11 已取消
/// 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4:退款成功,11:已取消(售后完成订单取消)
/// </summary>
public int? refund_status { get; set; }
public void UpdateOrderItemBuyButton()
{
var order_item = this;
order_item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order_item.shop_id.ParseToString());
if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
{
order_item.IsBuyGoodsBtnEnabled = false;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51));
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51));
order_item.BuyGoodsBtnTxt = "危险品不支持中转拍单";
}
else if (Shop == null || (Shop?.LoginStatus != "登录成功" /*&& Shop?.Is29Supplier == null*/))
{
order_item.IsBuyGoodsBtnEnabled = false;
//order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51));
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51));
order_item.BuyGoodsBtnTxt = "请登录店铺";
}
else if (Shop?.LoginStatus == "登录成功" && Shop?.Is29Supplier == null)
{
order_item.IsBuyGoodsBtnEnabled = false;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 127, 51));
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 127, 51));
order_item.BuyGoodsBtnTxt = "代发状态读取中请稍候";
}
else if (Shop?.Is29Supplier == false)
{
//order_item.IsBuyGoodsBtnEnabled = false;
order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51));
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51));
order_item.BuyGoodsBtnTxt = "去店铺后台绑定代发";
}
else
{
order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnTxt = order_item.BuyMap == null ? "关联拍单" : "拍单";
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 152, 99, 143));
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 152, 99, 143));
}
}
}
}
+87 -26
View File
@@ -5,6 +5,7 @@ using NaiBa.Util.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
@@ -115,35 +116,49 @@ namespace AllBase.Model.Result
get { return this.GetValue(x => x.ShopOrderRefundStr); }
set { this.SetValue(x => x.ShopOrderRefundStr, value); }
}
/// <summary>
/// 中转仓仓库编号
/// </summary>
public string TransitWarehouseIdStr
{
get { return this.GetValue(x => x.TransitWarehouseIdStr); }
set { this.SetValue(x => x.TransitWarehouseIdStr, value); }
}
// 拍单物流
/// <summary>
/// 拍单物流公司编码
/// </summary>
public string Express1CompanyStr
{
get { return this.GetValue(x => x.Express1CompanyStr); }
set { this.SetValue(x => x.Express1CompanyStr, value); }
}
/// <summary>
/// 拍单物流
/// </summary>
public string Express1WaybillStr
{
get { return this.GetValue(x => x.Express1WaybillStr); }
set { this.SetValue(x => x.Express1WaybillStr, value); }
}
// 中转仓物流
/// <summary>
/// 中转仓物流公司编码(提前取号)
/// </summary>
public string Express2CompanyStr
{
get { return this.GetValue(x => x.Express2CompanyStr); }
set { this.SetValue(x => x.Express2CompanyStr, value); }
}
/// <summary>
/// 中转仓物流编码(提前取号)
/// </summary>
public string Express2WaybillStr
{
get { return this.GetValue(x => x.Express2WaybillStr); }
set { this.SetValue(x => x.Express2WaybillStr, value); }
}
/// <summary>
/// 中转仓状态:0 未使用,1 已创建,2 创建失败 ?3 已提交创建
/// 中转仓状态:"0" 未使用,"1" 已创建,"2" 创建失败,"3" 处理中(业务方根据此字段处理中转流程)
/// 使用此字段判断中转仓库是否已取号
/// </summary>
public string TransferWareHouseStatus
{
@@ -151,7 +166,7 @@ namespace AllBase.Model.Result
set { this.SetValue(x => x.TransferWareHouseStatus, value); }
}
/// <summary>
/// 1正常取号 2提前取号
/// 1 正常取号 2 提前取号 3 已更正
/// </summary>
public string PreAllocatedOrderNoStr
{
@@ -159,48 +174,94 @@ namespace AllBase.Model.Result
set { this.SetValue(x => x.PreAllocatedOrderNoStr, value); }
}
/// <summary>
/// 已取号, 提前取号, 已提交, 取号失败
/// 处理中, "已取号(更正)", 已取号, 提前取号, 取号失败
/// </summary>
public string TransitOrderStatus
{
get
{
if ((TransferWareHouseStatus == "1" || TransferWareHouseStatus == "3") &&
//Express1CompanyStr == this.outExpressCompanyCode && !this.outExpressCompanyCode.IsNullOrEmpty() &&
Express1WaybillStr == this.tracking_number && !this.tracking_number.IsNullOrEmpty())
if (TransferWareHouseStatus == "3")
{
return "已取号";
return "处理中";
}
if (string.IsNullOrEmpty(Express1CompanyStr) && string.IsNullOrEmpty(Express1WaybillStr) &&
!string.IsNullOrEmpty(Express2CompanyStr) && !string.IsNullOrEmpty(Express2WaybillStr))
// 不考虑仓库取号失败情况,只要取号状态不是3或者1,且有仓库订单记录,就处理取号
//if (TransferWareHouseStatus == "2")
//{
// return "取号失败";
//}
if (PreAllocatedOrderNoStr == "3")
{
return "已取号(更正)";
}
if (PreAllocatedOrderNoStr == "1")
{
if (OrderTime >= new DateTime(2026, 6, 29))
return "已取号";
else
return "提前取号";
}
if (PreAllocatedOrderNoStr == "2")
{
return "提前取号";
}
if (/*!string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr != this.outExpressCompanyCode && !this.outExpressCompanyCode.IsNullOrEmpty() &&*/
!string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr != this.tracking_number && !this.tracking_number.IsNullOrEmpty())
if (!TransitWarehouseIdStr.IsNullOrEmpty() && OrderTime < new DateTime(2026, 6, 29))
{
return "提前取号";
return "提前取号(旧订单)";
}
if ((TransferWareHouseStatus == "1" || TransferWareHouseStatus == "3") && (string.IsNullOrEmpty(Express1CompanyStr) || string.IsNullOrEmpty(Express1WaybillStr)))
if (TransitWarehouseIdStr.IsNullOrEmpty())
{
return "提前取号";
}
if (TransferWareHouseStatus == "0" && !string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr == outExpressCompanyCode &&
!string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr == tracking_number)
{
return "已提交";
}
if (TransferWareHouseStatus == "2" && !string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr == outExpressCompanyCode &&
!string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr == tracking_number)
{
return "取号失败";
return "非中转仓订单";
}
return "";
//if ((TransferWareHouseStatus == "1" || TransferWareHouseStatus == "3") &&
// //Express1CompanyStr == this.outExpressCompanyCode && !this.outExpressCompanyCode.IsNullOrEmpty() &&
// Express1WaybillStr == this.tracking_number && !this.tracking_number.IsNullOrEmpty())
//{
// return "已取号";
//}
//if (string.IsNullOrEmpty(Express1CompanyStr) && string.IsNullOrEmpty(Express1WaybillStr) &&
// !string.IsNullOrEmpty(Express2CompanyStr) && !string.IsNullOrEmpty(Express2WaybillStr))
//{
// return "提前取号";
//}
//if (/*!string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr != this.outExpressCompanyCode && !this.outExpressCompanyCode.IsNullOrEmpty() &&*/
// !string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr != this.tracking_number && !this.tracking_number.IsNullOrEmpty())
//{
// return "提前取号";
//}
//if ((TransferWareHouseStatus == "1" || TransferWareHouseStatus == "3") && (string.IsNullOrEmpty(Express1CompanyStr) || string.IsNullOrEmpty(Express1WaybillStr)))
//{
// return "提前取号";
//}
//if (TransferWareHouseStatus == "0" && !string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr == outExpressCompanyCode &&
// !string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr == tracking_number)
//{
// return "已提交";
//}
//if (TransferWareHouseStatus == "2" && !string.IsNullOrEmpty(Express1CompanyStr) && Express1CompanyStr == outExpressCompanyCode &&
// !string.IsNullOrEmpty(Express1WaybillStr) && Express1WaybillStr == tracking_number)
//{
// return "取号失败";
//}
//return "";
}
set { }
}
public DateTime TransitCreateTime
{
get { return this.GetValue(x => x.TransitCreateTime); }
set { this.SetValue(x => x.TransitCreateTime, value); }
}
public DateTime OrderTime
{
get { return BaseClass.StampToDateTime(order_time.ParseToInt()); }
set { }
}
public string OrderTimeStr
{
get { return BaseClass.StampToDateTime(order_time.ParseToInt()).ToString("yy-MM-dd HH:mm:ss"); }
+20 -4
View File
@@ -29,8 +29,9 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -41,15 +42,17 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\Bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\bin\</OutputPath>
@@ -59,6 +62,7 @@
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
@@ -69,6 +73,7 @@
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
@@ -78,6 +83,7 @@
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
@@ -213,7 +219,6 @@
<Compile Include="BaseForms\UserComponents\UcTreeView.designer.cs">
<DependentUpon>UcTreeView.cs</DependentUpon>
</Compile>
<Compile Include="BLL\ShopBLL.cs" />
<Compile Include="BoundJs.cs" />
<Compile Include="BuyUsers\ALBuyUser.cs" />
<Compile Include="BuyUsers\CookieVisitor.cs" />
@@ -261,6 +266,8 @@
<Compile Include="_29Tools\BLL\SendBuyerOrder.cs" />
<Compile Include="_29Tools\BLL\HttpResponseWXBLL.cs" />
<Compile Include="_29Tools\BLL\HttpResponseYkdBLL.cs" />
<Compile Include="_29Tools\BLL\ShopBLL.cs" />
<Compile Include="_29Tools\BLL\WxOrderSupplierBLL.cs" />
<Compile Include="_29Tools\CefTools\LocalCookieVisitor.cs" />
<Compile Include="_29Tools\CefTools\LocalRequestHandler.cs" />
<Compile Include="_29Tools\CefTools\LocalResourceRequestHandler.cs" />
@@ -278,6 +285,12 @@
<Compile Include="_29Tools\Forms\PddMobileLoginForm.designer.cs">
<DependentUpon>PddMobileLoginForm.cs</DependentUpon>
</Compile>
<Compile Include="_29Tools\Forms\ShopForms\WXShopLoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="_29Tools\Forms\ShopForms\WXShopLoginForm.Designer.cs">
<DependentUpon>WXShopLoginForm.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj">
@@ -348,6 +361,9 @@
<EmbeddedResource Include="_29Tools\Forms\PddMobileLoginForm.resx">
<DependentUpon>PddMobileLoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="_29Tools\Forms\ShopForms\WXShopLoginForm.resx">
<DependentUpon>WXShopLoginForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-60
View File
@@ -1,60 +0,0 @@
using AllBase;
using AllBase.Model.Local;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Work.BLL
{
public class ShopBLL
{
public static List<ShopLoginInfo> DeserializationShop(string shopJson, string shopDataName = "data")
{
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
if (!shopJson.Contains(shopDataName))
return list;
var jArr = JObject.Parse(shopJson)[shopDataName];
if (jArr.Count() == 0)
return list;
foreach (JObject jObj in jArr)
{
var shop = DeserializationShop(jObj);
if (shop != null)
list.Add(shop);
}
return list;
}
public static ShopLoginInfo DeserializationShop(JObject shopObj)
{
string shopStr = shopObj.ToString();
ShopLoginInfo shop = new ShopLoginInfo();
shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id");
if (shop.DbId == null)
return null;
shop.LoginName = BaseRegex.GetStringJson(ref shopStr, "login_name");
shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass");
shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account");
shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name");
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "group_name");
shop.Cookies = shopObj["cookie"].ParseToString().Replace("&", "&").Replace("%", "%").Replace("+", "+").Replace(""", "\"");
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
shop.LoginStatus = BaseRegex.GetStringJson(ref shopStr, "login_status");
shop.AddTime = BaseRegex.GetStringJson(ref shopStr, "add_time") == null ? DateTime.MinValue : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "add_time"));
shop.is_point_shop_expire = BaseRegex.GetBoolJson(ref shopStr, "is_point_shop_expire");
shop.expire_time = BaseRegex.GetIntJson(ref shopStr, "expire_time");
shop.ErpShopId = BaseRegex.GetStringJson(ref shopStr, "erp_shop_id");
return shop;
}
}
}
+2
View File
@@ -29,6 +29,7 @@ namespace Work.BaseForms
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseForm));
this.SuspendLayout();
//
// BaseForm
@@ -36,6 +37,7 @@ namespace Work.BaseForms
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "BaseForm";
this.Text = "BaseForm";
this.Load += new System.EventHandler(this.BaseForm_Load);
File diff suppressed because it is too large. Load diff
+2
View File
@@ -29,6 +29,7 @@ namespace Work.BaseForms
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseGeneralForm));
this.pnlTitle = new System.Windows.Forms.Panel();
this.pbMinBase = new System.Windows.Forms.PictureBox();
this.pbNormalBase = new System.Windows.Forms.PictureBox();
@@ -149,6 +150,7 @@ namespace Work.BaseForms
this.ClientSize = new System.Drawing.Size(386, 232);
this.Controls.Add(this.pnlTitle);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "BaseGeneralForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Load += new System.EventHandler(this.LcBaseForm_Load);
File diff suppressed because it is too large. Load diff
+11 -9
View File
@@ -43,6 +43,7 @@ namespace Work.BaseForms
// pbCloseBase
//
this.pbCloseBase.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pbCloseBase.Location = new System.Drawing.Point(406, 0);
//
// panel2
//
@@ -56,7 +57,7 @@ namespace Work.BaseForms
this.panel2.Controls.Add(this.lblMsg);
this.panel2.Location = new System.Drawing.Point(3, 32);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(382, 210);
this.panel2.Size = new System.Drawing.Size(434, 265);
this.panel2.TabIndex = 2;
//
// pnlCancel
@@ -66,7 +67,7 @@ namespace Work.BaseForms
this.pnlCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlCancel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlCancel.Location = new System.Drawing.Point(280, 160);
this.pnlCancel.Location = new System.Drawing.Point(332, 215);
this.pnlCancel.Name = "pnlCancel";
this.pnlCancel.Size = new System.Drawing.Size(80, 30);
this.pnlCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -88,7 +89,7 @@ namespace Work.BaseForms
this.pnlConfirm.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlConfirm.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlConfirm.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlConfirm.Location = new System.Drawing.Point(163, 160);
this.pnlConfirm.Location = new System.Drawing.Point(215, 215);
this.pnlConfirm.Name = "pnlConfirm";
this.pnlConfirm.Size = new System.Drawing.Size(80, 30);
this.pnlConfirm.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -105,7 +106,7 @@ namespace Work.BaseForms
//
// picTip
//
this.picTip.Location = new System.Drawing.Point(25, 44);
this.picTip.Location = new System.Drawing.Point(25, 40);
this.picTip.Name = "picTip";
this.picTip.Size = new System.Drawing.Size(64, 64);
this.picTip.TabIndex = 41;
@@ -117,24 +118,25 @@ namespace Work.BaseForms
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.Location = new System.Drawing.Point(112, 44);
this.lblMsg.Location = new System.Drawing.Point(112, 40);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(248, 103);
this.lblMsg.Size = new System.Drawing.Size(300, 158);
this.lblMsg.TabIndex = 40;
this.lblMsg.Text = "信息";
this.lblMsg.TextChanged += new System.EventHandler(this.lblMsg_TextChanged);
//
// BaseMsgForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.ClientSize = new System.Drawing.Size(388, 245);
this.ClientSize = new System.Drawing.Size(440, 300);
this.Controls.Add(this.panel2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "BaseMsgForm";
this.Padding = new System.Windows.Forms.Padding(1);
this.Text = "BaseMsgForm";
this.TitleText = "BaseMsgForm";
this.Text = "消息提示框";
this.TitleText = "消息提示框";
this.Controls.SetChildIndex(this.panel2, 0);
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).EndInit();
this.panel2.ResumeLayout(false);
+5
View File
@@ -124,6 +124,11 @@ namespace Work.BaseForms
{
DialogResult = DialogResult.Cancel;
}
private void lblMsg_TextChanged(object sender, EventArgs e)
{
}
}
public enum FormLevel
File diff suppressed because it is too large. Load diff
+10
View File
@@ -124,6 +124,7 @@ namespace Work
BaseClass.SaLevel = BaseRegex.GetIntJson(ref html, "sa_level").ParseToInt();
BaseClass.UserAuthority = BaseRegex.GetStringJson(ref html, "authority").ParseToString();
BaseClass.ParentAuthority = BaseRegex.GetStringJson(ref html, "parent_authority").ParseToString();
BaseClass.ForbiddenPage = BaseRegex.GetStringJson(ref html, "forbidden_page").ParseToString();
BaseClass.Mobile = BaseRegex.GetStringJson(ref html, "mobile");
BaseClass.UserVersion = BaseRegex.GetStringJson(ref html, "version").ParseToInt();
BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "version_s");
@@ -135,6 +136,15 @@ namespace Work
if (BaseClass.GroupId != 3 && BaseClass.GroupId != 4 && BaseClass.GroupId != 9 && BaseClass.GroupId != 10 && BaseClass.GroupId != 11)
{
message = "该账户禁止登录订单管理";
BaseClass.UserId = 0;
BaseClass.UserKey = 0;
return false;
}
if (BaseClass.ForbiddenPage.Contains("拍单"))
{
message = "该账户禁止登录订单管理";
BaseClass.UserId = 0;
BaseClass.UserKey = 0;
return false;
+227
View File
@@ -0,0 +1,227 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Local;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Work.BaseForms;
namespace Work._29Tools.BLL
{
public class ShopBLL
{
public static string AddServerShop(ShopLoginInfo _shop)
{
var url = BaseClass.Build29WxObjString("shop/add_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + _shop.LoginName
+ "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password)
+ "&shop_id=" + _shop.ShopId
+ "&shop_account=" + _shop.ShopAccount
//+ "&mall_id" + _shop.MallId
+ "&cookie=" + _shop.Cookies
//+ "&cookie2=" + _shop.Cookies2
+ "&group_name=" + GetHtml.UrlEncodeUtf8(_shop.GroupName)
+ "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName)
+ "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes)
+ "&login_status=" + _shop.LoginStatus;
//+ "&anti_contents=" + JsonHelper.SerializeObject(_shop.AntiContents);
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg");
if (string.IsNullOrEmpty(msg))
msg = "店铺保存失败!";
BaseMsgForm.ShowError(msg);
}
return result;
}
#region 服务端店铺Cookie管理
/// <summary>
/// 添加店铺Cookies
/// </summary>
/// <param name="shopName">店铺名称</param>
/// <param name="shopCookies">cookies</param>
/// <param name="fromTool">工具名称(可不填写)</param>
public static string UpdateServerShopCookies(ShopLoginInfo shop, string fromTool = null, bool isShowProgress = true)
{
var fTool = string.IsNullOrEmpty(fromTool) ? "" : "&from_tool=" + fromTool;
var url = BaseClass.Build29WxObjString("shop/mdy_shop_cookie_and_login_status");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&login_status=" + shop.LoginStatus
+ "&cookie=" + shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+")
+ "&openid=" + shop.openid
+ fTool;
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
{
var errMsg = BaseRegex.GetStringJson(ref result, "msg");
if (isShowProgress)
BaseMsgForm.ShowError("服务端登录状态保存失败!请检查网络连接。" + errMsg);
else
return "服务端登录状态保存失败!请检查网络连接。" + errMsg;
}
return "";
}
public static List<ShopLoginInfo> AdminGetServerShopLstByIds(List<string> shop_ids)
{
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
shop_ids = shop_ids.Where(s => !string.IsNullOrEmpty(s)).ToList();
var url = BaseClass.Build29WxObjString("shop/admin_get_shop_list");
var data = UserLogin.GetSignaturex() +
"&shop_ids='" + string.Join("','", shop_ids) + "'";
data += "&page_size=200";
var html = GetHtml.PostUtf8(url, data);
for (int i = 0; i < 5 && (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")); i++)
{
html = GetHtml.PostUtf8(url, data);
System.Threading.Thread.Sleep(200);
}
if (string.IsNullOrEmpty(html)
|| !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass"))
{
return new List<ShopLoginInfo>();
}
return ShopBLL.DeserializationShop(html);
}
#endregion
public static List<ShopLoginInfo> DeserializationShop(string shopJson, string shopDataName = "data")
{
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
if (!shopJson.Contains(shopDataName))
return list;
var jArr = JObject.Parse(shopJson)[shopDataName];
if (jArr.Count() == 0)
return list;
foreach (JObject jObj in jArr)
{
var shop = DeserializationShop(jObj);
if (shop != null)
list.Add(shop);
}
return list;
}
public static ShopLoginInfo DeserializationShop(JObject shopObj)
{
string shopStr = shopObj.ToString();
ShopLoginInfo shop = new ShopLoginInfo();
shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id");
if (shop.DbId == null)
return null;
shop.LoginName = BaseRegex.GetStringJson(ref shopStr, "login_name");
shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass");
shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account");
shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name");
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "group_name");
shop.Cookies = shopObj["cookie"].ParseToString().Replace("&", "&").Replace("%", "%").Replace("+", "+").Replace(""", "\"");
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
shop.LoginStatus = BaseRegex.GetStringJson(ref shopStr, "login_status");
shop.AddTime = BaseRegex.GetStringJson(ref shopStr, "add_time") == null ? DateTime.MinValue : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "add_time"));
shop.is_point_shop_expire = BaseRegex.GetBoolJson(ref shopStr, "is_point_shop_expire");
shop.expire_time = BaseRegex.GetIntJson(ref shopStr, "expire_time");
shop.ErpShopId = BaseRegex.GetStringJson(ref shopStr, "erp_shop_id");
return shop;
}
#region 检测店铺登录
public static void CheckShopLogin(ShopLoginInfo shop, UserControls.StatusBarUserControl statusBar = null)
{
CheckShopLogin(new string[] { shop.ShopId }, statusBar);
}
public static void CheckShopLogin(ShopLoginInfo[] shops, UserControls.StatusBarUserControl statusBar = null)
{
CheckShopLogin(shops.Select(s => s.ShopId).ToArray(), statusBar);
}
public static void CheckShopLogin(string[] shopNames, UserControls.StatusBarUserControl statusBar = null)
{
for (int i = 0; i < shopNames.Length; i++)
{
var campanys = GlobalConfig.ShopLoginList.ToList().Where(v => v.LoginName == shopNames[i]).ToList();
var shop = GlobalConfig.ShopLoginList.ToList().FirstOrDefault(v => v.LoginName == shopNames[i]);
// 先从服务端取最新cookie
var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList());
//var shopInfoTmp = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount));
var serverShop = serverCampanys.FirstOrDefault();
if (shop != null && serverShop != null)
{
shop.Cookies = serverShop.Cookies;
foreach (var sc in campanys)
{
sc.Cookies = serverShop.Cookies;
}
}
if (shop != null)
{
var loginResult = CheckShopLoginStatus(shop);
if (!loginResult.Contains("\"code\":0"))
{
shop.Cookies = "[]";
foreach (var sc in campanys)
{
sc.LoginStatus = "未登录";
shop.Cookies = "[]";
}
}
else
{
foreach (var sc in campanys)
{
sc.LoginStatus = "登录成功";
sc.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
}
UpdateServerShopCookies(shop, null, statusBar == null ? false : true); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
}
if (statusBar != null)
{
statusBar.Invoke(new Action(() =>
{
statusBar.lblTaskStatus.Text = "正在检测...";
statusBar.pgbTaskProgress.Value = (i + 1);
statusBar.pgbTaskProgress.Text = (i + 1) + "/" + shopNames.Length;
}));
}
}
}
public static string GetShopInfo(ShopLoginInfo shop)
{
string url = "https://store.weixin.qq.com/shop/home";
string refere = "";
var result = HttpResponseWXBLL.WeiXinGetResponse(shop, url, refere, true);
return result;
}
public static string CheckShopLoginStatus(ShopLoginInfo shop, string refere = "https://store.weixin.qq.com/shop/home")
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodebase/reachDiolog/getBizNotifyConfig?token=&lang=zh_CN";
string body = @"{""path"":""https://store.weixin.qq.com/shop/home""}";
return HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, refere);
}
#endregion
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AllBase.Model.Local;
namespace Work._29Tools.BLL
{
public static class WxOrderSupplierBLL
{
public static string GetWxSupplierList(ShopLoginInfo shop)
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodesuppliercosignment/supplier/cgi/getSupplierList?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/supply/consignmentOrderList";
string body = @"{""page"":1,""pageSize"":10,""currentTab"":1}";
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
public static string GetWxSupplierOrderList(ShopLoginInfo shop, string orderId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodesuppliercosignment/order/cgi/orderSearch?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/supply/consignmentOrderList";
string body = @"{""pageSize"":30,""page"":1,""beginTime"":"""",""endTime"":"""",""createBeginTime"":"""",
""createEndTime"":"""",""orderId"":""" + orderId + @""",""consignmentOrderId"":"""",""waybillId"":"""",""supplierName"":"""",""productCode"":"""",
""spuName"":"""",""note"":"""",""tab"":1}";
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
}
}
+117 -57
View File
@@ -36,27 +36,29 @@ namespace TemuKJD.ToolForms
public partial class PddMobileBuyOrderForm : BaseGeneralForm
{
public static string dangerItemWords = "打火机,压力罐,刀具,铡刀,充电宝,罂粟,礼炮,煤气罐,仿制枪,暖手宝,灭火器,火炮,纸炮枪,手枪,毫安,喷漆,酒精,锂电,电池,火柴,气罐,燃气,气泡弹,喷雾";
public static List<string> lstDangerItemWord { get; set; } = dangerItemWords.Split(',').ToList();
//{
// //get { return dangerItemWords.Split(',').ToList(); }
// get { return dangerItemWords.Split(',').ToList(); }
// set { }
//}
private BuyerLoginInfo buyer = null;
private oms_wei_order_item_info orderItem = null;
private WXBuyMapInfo buyMap = null;
private TransitWarehouseParam transitWarehouse = null;
private Action<oms_wei_order_info, bool> filterOrderAction = null;
public bool IsAutoBuy { get; set; } = true;
public int CloseAfterSecond { get; set; }
public string InitUrl = "";
private string shopCookieHead = "yangkeduo.com";
private string shopMainUrl = "https://mobile.yangkeduo.com/index.html";
public ChromiumWebBrowser cefWebBrowser = null;
private ChromiumWebBrowser cefWebBrowser = null;
private string currentUrl = "";
private bool IsSoldOut = false;
// 当前买手
private BuyerLoginInfo buyer = null;
// 订单商品
private oms_wei_order_item_info orderItem = null;
// 关联商品
private WXBuyMapInfo buyMap = null;
// 订单仓库
private TransitWarehouseParam transitWarehouse = null;
// (拍单后)回调函数
private Action<oms_wei_order_info, bool> filterOrderAction = null;
public PddMobileBuyOrderForm(Action<oms_wei_order_info, bool> filterOrder, oms_wei_order_item_info orderItemInfo, BuyerLoginInfo buyerInfo, WXBuyMapInfo buy_map = null)
{
InitializeComponent();
@@ -271,17 +273,22 @@ namespace TemuKJD.ToolForms
//static int GetAntiContentsTimes = 40;
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
{
if (url.StartsWith("https://mobile.yangkeduo.com/order_checkout.html") && responseData.Contains("该商品已下架"))
{
IsSoldOut = true;
}
// 个人页面
if (url.Contains("https://mobile.yangkeduo.com/personal.html"))
{
Task.Run(() =>
{
var data = responseData;
//var data = responseData;
});
}
// 商品页面
// 商品页面 获取发货地信息,如果页面没有去客服页面询问
if (url.StartsWith("https://mobile.yangkeduo.com/goods.html?goods_id="))
{
Task.Run(() =>
@@ -304,7 +311,7 @@ namespace TemuKJD.ToolForms
});
}
// 订单详情页面
// 订单详情页面 获取关联信息和拍单信息(已拍过单但是因某种原因未成功绑定仓库)
if (url.StartsWith("https://mobile.yangkeduo.com/order.html?order_sn="))
{
Task.Run(() =>
@@ -341,12 +348,11 @@ namespace TemuKJD.ToolForms
});
}
// 待提交订单确认界面
//"https://mobile.yangkeduo.com/proxy/api/api/morgan/confirm/render?pdduid=8161628055192"
//https://mobile.yangkeduo.com/order_checkout.html?sku_id=
// 待提交订单确认界面,填写拍单信息 两个接口都有可能有值,通过返回值内信息和url是否含有sku_id综合判断
//https://mobile.yangkeduo.com/proxy/api/api/morgan/confirm/render?pdduid=8161628055192
//https://mobile.yangkeduo.com/order_checkout.html?sku_id=1917755178967&group_id=168599782729&goods_id=966934985983&goods_number=1&page_from=0&detail_id=27322663212&_oak_rcto=YWJun7Qe7qhenWIlxgKO3uhsoi0WMIkr6Sb3iSrTsNPiwo_AHzvFVWwZ36KSfBTSAX-QF_CD92G9rA&order_extra_type=1&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail&refer_page_id=10014_1782220402115_blxn1wofgo&refer_page_sn=10014
//https://mobile.yangkeduo.com/order_checkout.html?sku_id=1914416497946&group_id=168211384489&goods_id=964481496910&goods_number=2&page_from=23&detail_id=27475863056&_oc_refer_ad=0&_oak_rcto=YWJQMioxuzYiHEIW34yn103Toi0WMIkr6SaYUDjBkmkvOAtI8c-ZcKMw36KSfBTSAX-QF_CD92G9rA&order_extra_type=1&refer_page_element=open_btn&source_channel=0&_x_query=%E4%B8%AD%E5%9B%BD%E5%8F%A4%E4%BB%A3%E7%AE%97%E6%9C%AF%E6%B3%95%E8%80%81%E7%89%88%E6%9C%AC%E6%B4%AA%E4%B8%95%E8%B0%9F%E8%91%97%E5%91%BD%E7%90%86%E5%AD%A6%E7%A0%94%E7%A9%B6%E5%85%A5%E9%97%A8%E9%A3%8E%E6%B0%B4%E5%AD%A6%E4%B9%A6%E7%B1%8D%E5%85%A5%E9%97%A8%E5%B1%85%E5%AE%B6&refer_page_name=goods_detail&refer_page_id=10014_1782275100226_pojdmxgpty&refer_page_sn=10014
if (responseData.Contains("\"goods_id\"") && (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/morgan/confirm/render?pdduid=") || url.Contains("sku_id")))
if (responseData.Contains("\"goods_id\"") && (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/morgan/confirm/render?pdduid=") || url.Contains("sku_id=")))
{
Task.Run(() =>
{
@@ -384,20 +390,34 @@ namespace TemuKJD.ToolForms
this.txtBuyPrice.Text = (buyPrice * 0.01m).ParseToString();
}));
// 自动修改收货地址为中转仓
Invoke(new Action(() =>
{
// 自动修改收货地址为中转仓
var transit = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransDetailAddress == txtBuyTransitWarehouse.Text.Trim());
if (transit != null && IsChangeAddress == false && HasChangeAddress == false)
{
Task.Run(() =>
if(!IsSoldOut)
{
IsChangeAddress = true;
Thread.Sleep(1000);
ChangeAddress(transit);
IsChangeAddress = false;
Task.Run(() =>
{
IsChangeAddress = true;
Thread.Sleep(1000);
ChangeAddress(transit);
IsChangeAddress = false;
});
});
}
}
// 自动下单
if (IsAutoBuy)
{
if (!IsSoldOut)
{
if (HasChangeAddress == true)
{
}
}
}
}));
}
@@ -420,6 +440,11 @@ namespace TemuKJD.ToolForms
bool IsChangeAddress = false;
bool HasChangeAddress = false;
/// <summary>
/// 自动填写地址
/// </summary>
/// <param name="transit"></param>
/// <returns></returns>
public string ChangeAddress(TransitWarehouseParam transit)
{
Thread.Sleep(1000);
@@ -622,14 +647,14 @@ namespace TemuKJD.ToolForms
{
if (order.IsWaitBuy)
{
foreach (var item in order.order_items)
foreach (var item in order.orderItems)
{
if ((item.out_product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
(item.out_product_id == map.spu_code && item.sku_attr_str == map.sku_code) ||
(item.product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
(item.product_id == map.spu_code && item.sku_attr_str == map.sku_code))
{
item.buy_map = map;
item.BuyMap = map;
if (filterOrderAction != null)
{
@@ -653,7 +678,7 @@ namespace TemuKJD.ToolForms
{
if (string.IsNullOrEmpty(txtBuyTransitWarehouse.Text.Trim()))
{
BaseMsgForm.ShowError("缺少中转地址");
BaseMsgForm.ShowError("缺少中转地址,请重新绑定商品并选择仓库地址");
return;
}
var transit = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransDetailAddress == txtBuyTransitWarehouse.Text.Trim());
@@ -673,6 +698,8 @@ namespace TemuKJD.ToolForms
return;
}
btnManualUpdateBuyOrder.Enabled = false;
JObject body = new JObject();
body["orderNo"] = orderItem.order_id;
body["orderSkuId"] = orderItem.sku_id;
@@ -691,36 +718,14 @@ namespace TemuKJD.ToolForms
var exportRst = HttpResponseWXBLL.e57PostResponse(url, dataStr, "");
//<AjaxResult><msg>保存成功</msg><code>200</code></AjaxResult>
//<AjaxResult><msg>订单不存在:373733973395494272</msg><code>500</code></AjaxResult>
if (exportRst != null && exportRst.Contains("<code>200</code>"))
{
BaseMsgForm.ShowInfo("保存成功");
orderItem.item_transit_orders.Insert(0, new oms_wei_external_procurement_log()
{
buyer_account = buyer.buyer_nick,
id = 0,
order_no = orderItem.order_id,
order_sku_id = orderItem.sku_id,
out_amount = (txtBuyPrice.Text.ParseToDecimal() * 100).ParseToInt(),
out_order_no = txtBuyOrderId.Text.Trim(),
purchaser_note = BaseClass.NickName,
});
var order = orderItem.item_order;
if (filterOrderAction != null)
{
GlobalConfig.lstFilterOrder.Remove(order);
filterOrderAction(order, true);
}
this.Close();
}
else
if (!exportRst.ParseToString().Contains("<code>200</code>"))
{
string msg = "";
string code = "";
try
{
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(exportRst);
code = xmlDoc["AjaxResult"]["code"].InnerText;
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
}
@@ -728,8 +733,63 @@ namespace TemuKJD.ToolForms
{
msg = exportRst.ParseToString();
}
BaseMsgForm.ShowError(msg);
BaseMsgForm.ShowError("接收到erp服务端传递的错误消息:" + msg, "拍单信息保存失败");
btnManualUpdateBuyOrder.Enabled = true;
return;
}
orderItem.ItemTransitOrders.Insert(0, new oms_wei_external_procurement_log()
{
buyer_account = buyer.buyer_nick,
id = 0,
order_no = orderItem.order_id,
order_sku_id = orderItem.sku_id,
out_amount = (txtBuyPrice.Text.ParseToDecimal() * 100).ParseToInt(),
out_order_no = txtBuyOrderId.Text.Trim(),
purchaser_note = BaseClass.NickName,
});
var order = orderItem.ItemOrder;
if (filterOrderAction != null)
{
GlobalConfig.lstFilterOrder.Remove(order);
filterOrderAction(order, true);
}
// 提前取号
if (DateTime.Now.Date > BaseClass.StampToDateTime(order.create_time).Date)
{
JObject data = new JObject();
data["outOrderNo"] = txtBuyOrderId.Text.Trim();
data["warehouseCode"] = transit.TransId; // 中转仓仓库对应编码
//data["warehouseCode"] = txtBuyOrderId.Text.Trim(); // 中转仓仓库对应编码
data["platform"] = "WEISHOP";
var getVirtualTicketUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/order/virtual/create";
var getVirtualTicketDataStr = JsonHelper.SerializeObject(data);
var getVirtualTicketRst = HttpResponseWXBLL.e57PostResponse(getVirtualTicketUrl, getVirtualTicketDataStr, "");
if (!getVirtualTicketRst.ParseToString().Contains("<code>200</code>") && !getVirtualTicketRst.ParseToString().Contains("<code>0</code>"))
{
string msg = "";
string code = "";
try
{
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(getVirtualTicketRst);
code = xmlDoc["AjaxResult"]["code"].InnerText;
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
}
catch
{
msg = getVirtualTicketRst.ParseToString();
}
BaseMsgForm.ShowError("拍单信息保存成功,接收到erp服务端传递的错误消息:" + msg, "订单提前取号失败");
btnManualUpdateBuyOrder.Enabled = true;
return;
}
}
BaseMsgForm.ShowInfo("拍单信息保存成功");
this.Close();
}
private void pictureBox1_Click(object sender, EventArgs e)
+448
View File
@@ -0,0 +1,448 @@
namespace Work._29Tools.Forms.ShopForms
{
partial class WXShopLoginForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopLoginForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.lblCopyResult = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtSupplierKey = new System.Windows.Forms.TextBox();
this.btnSupplierKey = new Work.UserControls.ButtonEx();
this.btnSaveUserInfo = new DevComponents.DotNetBar.PanelEx();
this.btnLoginAgain = new Work.UserControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnCopyPassword = new Work.UserControls.ButtonEx();
this.btnCopyUserName = new Work.UserControls.ButtonEx();
this.txtPassWord = new System.Windows.Forms.TextBox();
this.txtUserName = new System.Windows.Forms.TextBox();
this.btnReload = new Work.UserControls.ButtonEx();
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pnlNext = new DevComponents.DotNetBar.PanelEx();
this.pnlPrev = new DevComponents.DotNetBar.PanelEx();
this.txtAddress = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.SuspendLayout();
//
// pbCloseBase
//
this.pbCloseBase.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pbCloseBase.Location = new System.Drawing.Point(1406, 0);
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Panel2.Controls.Add(this.btnSaveUserInfo);
this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain);
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyPassword);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyUserName);
this.splitContainer1.Panel2.Controls.Add(this.txtPassWord);
this.splitContainer1.Panel2.Controls.Add(this.txtUserName);
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 676;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
// panel1
//
this.panel1.Controls.Add(this.lblCopyResult);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.txtSupplierKey);
this.panel1.Controls.Add(this.btnSupplierKey);
this.panel1.Location = new System.Drawing.Point(538, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(326, 52);
this.panel1.TabIndex = 473;
//
// lblCopyResult
//
this.lblCopyResult.AutoSize = true;
this.lblCopyResult.Location = new System.Drawing.Point(97, 4);
this.lblCopyResult.Name = "lblCopyResult";
this.lblCopyResult.Size = new System.Drawing.Size(92, 17);
this.lblCopyResult.TabIndex = 473;
this.lblCopyResult.Text = "复制供应商编码";
this.lblCopyResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(42, 27);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 17);
this.label3.TabIndex = 472;
this.label3.Text = "供应商ID";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSupplierKey
//
this.txtSupplierKey.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSupplierKey.Location = new System.Drawing.Point(99, 24);
this.txtSupplierKey.Name = "txtSupplierKey";
this.txtSupplierKey.Size = new System.Drawing.Size(133, 23);
this.txtSupplierKey.TabIndex = 470;
this.txtSupplierKey.Text = "wxfc630d60a1af6c6f";
//
// btnSupplierKey
//
this.btnSupplierKey.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSupplierKey.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.btnSupplierKey.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSupplierKey.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSupplierKey.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSupplierKey.ForeColor = System.Drawing.Color.White;
this.btnSupplierKey.Location = new System.Drawing.Point(237, 23);
this.btnSupplierKey.Margin = new System.Windows.Forms.Padding(2);
this.btnSupplierKey.Name = "btnSupplierKey";
this.btnSupplierKey.Size = new System.Drawing.Size(56, 25);
this.btnSupplierKey.TabIndex = 471;
this.btnSupplierKey.Text = "复制";
this.btnSupplierKey.UseVisualStyleBackColor = false;
this.btnSupplierKey.Click += new System.EventHandler(this.btnSupplierKey_Click);
//
// btnSaveUserInfo
//
this.btnSaveUserInfo.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSaveUserInfo.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveUserInfo.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSaveUserInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveUserInfo.Location = new System.Drawing.Point(338, 4);
this.btnSaveUserInfo.Name = "btnSaveUserInfo";
this.btnSaveUserInfo.Size = new System.Drawing.Size(104, 25);
this.btnSaveUserInfo.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveUserInfo.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveUserInfo.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveUserInfo.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSaveUserInfo.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSaveUserInfo.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSaveUserInfo.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSaveUserInfo.Style.GradientAngle = 90;
this.btnSaveUserInfo.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveUserInfo.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveUserInfo.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveUserInfo.TabIndex = 466;
this.btnSaveUserInfo.Text = "保存登录信息";
this.btnSaveUserInfo.Visible = false;
this.btnSaveUserInfo.Click += new System.EventHandler(this.btnSaveUserInfo_Click);
//
// btnLoginAgain
//
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginAgain.ForeColor = System.Drawing.Color.White;
this.btnLoginAgain.Location = new System.Drawing.Point(1247, 31);
this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginAgain.Name = "btnLoginAgain";
this.btnLoginAgain.Size = new System.Drawing.Size(91, 25);
this.btnLoginAgain.TabIndex = 462;
this.btnLoginAgain.Text = "重新登录";
this.btnLoginAgain.UseVisualStyleBackColor = false;
this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(9, 35);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 378;
this.label2.Text = "密码";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 377;
this.label1.Text = "用户名";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Visible = false;
//
// btnCopyPassword
//
this.btnCopyPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCopyPassword.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyPassword.ForeColor = System.Drawing.Color.White;
this.btnCopyPassword.Location = new System.Drawing.Point(276, 31);
this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyPassword.Name = "btnCopyPassword";
this.btnCopyPassword.Size = new System.Drawing.Size(57, 25);
this.btnCopyPassword.TabIndex = 376;
this.btnCopyPassword.Text = "复制";
this.btnCopyPassword.UseVisualStyleBackColor = false;
this.btnCopyPassword.Visible = false;
this.btnCopyPassword.Click += new System.EventHandler(this.btnCopyPassword_Click);
//
// btnCopyUserName
//
this.btnCopyUserName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCopyUserName.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyUserName.ForeColor = System.Drawing.Color.White;
this.btnCopyUserName.Location = new System.Drawing.Point(276, 4);
this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyUserName.Name = "btnCopyUserName";
this.btnCopyUserName.Size = new System.Drawing.Size(57, 25);
this.btnCopyUserName.TabIndex = 375;
this.btnCopyUserName.Text = "复制";
this.btnCopyUserName.UseVisualStyleBackColor = false;
this.btnCopyUserName.Visible = false;
this.btnCopyUserName.Click += new System.EventHandler(this.btnCopyUserName_Click);
//
// txtPassWord
//
this.txtPassWord.Location = new System.Drawing.Point(53, 32);
this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.PasswordChar = '●';
this.txtPassWord.ReadOnly = true;
this.txtPassWord.Size = new System.Drawing.Size(221, 23);
this.txtPassWord.TabIndex = 374;
this.txtPassWord.Visible = false;
//
// txtUserName
//
this.txtUserName.Location = new System.Drawing.Point(53, 5);
this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtUserName.Name = "txtUserName";
this.txtUserName.ReadOnly = true;
this.txtUserName.Size = new System.Drawing.Size(221, 23);
this.txtUserName.TabIndex = 373;
this.txtUserName.Visible = false;
//
// btnReload
//
this.btnReload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnReload.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReload.ForeColor = System.Drawing.Color.White;
this.btnReload.Location = new System.Drawing.Point(1341, 31);
this.btnReload.Margin = new System.Windows.Forms.Padding(2);
this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(91, 25);
this.btnReload.TabIndex = 371;
this.btnReload.Text = "重新加载";
this.btnReload.UseVisualStyleBackColor = false;
this.btnReload.Visible = false;
this.btnReload.Click += new System.EventHandler(this.btnReload_Click);
//
// chkCloseAfterLogin
//
this.chkCloseAfterLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.chkCloseAfterLogin.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.chkCloseAfterLogin.Checked = true;
this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkCloseAfterLogin.CheckValue = "Y";
this.chkCloseAfterLogin.Location = new System.Drawing.Point(1306, 6);
this.chkCloseAfterLogin.Name = "chkCloseAfterLogin";
this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23);
this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.chkCloseAfterLogin.TabIndex = 8;
this.chkCloseAfterLogin.Text = "登录成功后关闭窗口";
this.chkCloseAfterLogin.Visible = false;
//
// splitContainer2
//
this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(1, 33);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pnlNext);
this.splitContainer2.Panel1.Controls.Add(this.pnlPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer2.Size = new System.Drawing.Size(1438, 766);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 5;
//
// pnlNext
//
this.pnlNext.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlNext.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlNext.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlNext.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlNext.Location = new System.Drawing.Point(36, 3);
this.pnlNext.Name = "pnlNext";
this.pnlNext.Size = new System.Drawing.Size(32, 24);
this.pnlNext.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlNext.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.pnlNext.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.pnlNext.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pnlNext.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.pnlNext.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.pnlNext.Style.CornerDiameter = 3;
this.pnlNext.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.pnlNext.Style.ForeColor.Color = System.Drawing.Color.White;
this.pnlNext.Style.GradientAngle = 90;
this.pnlNext.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.pnlNext.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(147)))));
this.pnlNext.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(147)))));
this.pnlNext.TabIndex = 474;
this.pnlNext.Text = "→";
this.pnlNext.Click += new System.EventHandler(this.btnNext_Click);
//
// pnlPrev
//
this.pnlPrev.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlPrev.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlPrev.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlPrev.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlPrev.Location = new System.Drawing.Point(3, 3);
this.pnlPrev.Name = "pnlPrev";
this.pnlPrev.Size = new System.Drawing.Size(32, 24);
this.pnlPrev.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlPrev.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.pnlPrev.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(99)))), ((int)(((byte)(143)))));
this.pnlPrev.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pnlPrev.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.pnlPrev.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.pnlPrev.Style.CornerDiameter = 3;
this.pnlPrev.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.pnlPrev.Style.ForeColor.Color = System.Drawing.Color.White;
this.pnlPrev.Style.GradientAngle = 90;
this.pnlPrev.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.pnlPrev.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(147)))));
this.pnlPrev.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(107)))), ((int)(((byte)(83)))), ((int)(((byte)(147)))));
this.pnlPrev.TabIndex = 470;
this.pnlPrev.Text = "←";
this.pnlPrev.Click += new System.EventHandler(this.btnPrev_Click);
//
// txtAddress
//
this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtAddress.Location = new System.Drawing.Point(69, 3);
this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtAddress.Name = "txtAddress";
this.txtAddress.Size = new System.Drawing.Size(1367, 23);
this.txtAddress.TabIndex = 7;
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
//
// WXShopLoginForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1440, 800);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsShowMaxBox = true;
this.Name = "WXShopLoginForm";
this.Padding = new System.Windows.Forms.Padding(1);
this.Text = "店铺登录";
this.TitleText = "店铺登录";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed);
this.Load += new System.EventHandler(this.ShopLoginForm_Load);
this.Controls.SetChildIndex(this.splitContainer2, 0);
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).EndInit();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnReload;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private UserControls.ButtonEx btnCopyPassword;
private UserControls.ButtonEx btnCopyUserName;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.TextBox txtAddress;
private UserControls.ButtonEx btnLoginAgain;
public DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin;
public System.Windows.Forms.TextBox txtPassWord;
public System.Windows.Forms.TextBox txtUserName;
public DevComponents.DotNetBar.PanelEx btnSaveUserInfo;
public DevComponents.DotNetBar.PanelEx pnlPrev;
public DevComponents.DotNetBar.PanelEx pnlNext;
private UserControls.ButtonEx btnSupplierKey;
private System.Windows.Forms.TextBox txtSupplierKey;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblCopyResult;
}
}
@@ -0,0 +1,869 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Local;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.WinForms;
using Microsoft.Win32;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work;
using Work._29Tools.BLL;
using Work._29Tools.CefTools;
using Work.BaseForms;
using Work.Pinduoduo;
namespace Work._29Tools.Forms.ShopForms
{
public enum EnumOpenType
{
login,
manage,
refresh_cookie,
multi_login,
}
public partial class WXShopLoginForm : BaseGeneralForm
{
public static WXShopLoginForm shopLoginInstance { get; set; } = null;
public bool IsGetSupplierPage { get; set; } = false;
public int CloseAfterSecond { get; set; }
public EnumOpenType openType = EnumOpenType.manage;
public bool isMultiLogin = false;
public string MultiLoginCookieName = "";
public string InitUrl = "";
private string shopCookieHead = "qq.com";
private string shopLoginUrl = "https://store.weixin.qq.com/shop?redirect_url=%2Fhome";
private string shopMainUrl = "https://store.weixin.qq.com/shop/home";
public ChromiumWebBrowser cefWebBrowser { get; set; } = null;
private ShopLoginInfo shop = null;
private ConcurrentList<ShopCompany> lstShopCompany = new ConcurrentList<ShopCompany>();
private string currentUrl = "";
public WXShopLoginForm(ShopLoginInfo shopInfo)
{
shopLoginInstance = this;
InitializeComponent();
this.shop = shopInfo;
this.txtUserName.Text = (shopInfo?.LoginName).ParseToString();
this.txtPassWord.Text = DataOpenSSL.DecryptString((shopInfo?.Password).ParseToString());
}
private void ShopLoginForm_Load(object sender, EventArgs e)
{
lblCopyResult.Text = "";
this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62;
if (CloseAfterSecond > 0)
{
Task.Run(() =>
{
Thread.Sleep(1000 * CloseAfterSecond);
if (this.Created)
{
Invoke(new Action(() => { this.Close(); }));
}
});
}
if (!isMultiLogin)
AutoLogin();
CheckAndSaveShop(); //判断登录是否成功,成功则保存店铺信息和店铺cookie
//ClosePopWindow(); //自动关闭弹窗
if (IsGetSupplierPage)
{
Task.Run(() =>
{
while (this.Created)
{
Thread.Sleep(1000);
if (!cefWebBrowser.GetBrowser().MainFrame.IsValid)
continue;
Thread.Sleep(3000);
var jsStr = @"const element = document.getElementsByName('supply')[0];
const shadowRoot = element.shadowRoot;
var btns = shadowRoot.querySelector('micro-app-body').getElementsByClassName('weui-desktop-btn weui-desktop-btn_default');
btns[0].click();";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
break;
}
});
}
}
/// <summary>
/// 判断登录,保存店铺
/// </summary>
private void CheckAndSaveShop()
{
Task.Run(() =>
{
// 自动判断是否登录成功,登录成功后记录cookie保存到服务端。
while (this.Created)
{
Thread.Sleep(3000);
if (!this.Created)
break;
if (currentUrl.TrimEnd('/') == shopMainUrl)
{
if (!cefWebBrowser.GetBrowser().MainFrame.IsValid)
continue;
if (!lstShopCompany.Any())
continue;
else // 检测到登录成功后
{
string cookies = "";
List<Cookie> cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null));
foreach (var cookie in cookieList)
{
cookie.Domain = cookie.Domain.Replace(".store.weixin.qq.com", "store.weixin.qq.com");
}
List<Cookie> cookieListNew = new List<Cookie>();
if (cookieList != null && cookieList.Count > 0)
{
foreach (var cookie in cookieList)
{
cookies += cookie.Name + "=" + cookie.Value + "; ";
cookieListNew.Add(cookie);
}
cookies = JsonHelper.SerializeObject(cookieListNew);
}
if (!string.IsNullOrEmpty(cookies))
{
var lstShopCompanyCopy = lstShopCompany.ToList();
foreach (ShopCompany sc in lstShopCompanyCopy)
{
ShopLoginInfo newShop = new ShopLoginInfo()
{
LoginName = shop?.LoginName ?? sc.AccountId,
Password = shop?.Password,
GroupName = shop?.GroupName,
ShopAccount = sc.AccountName,
ShopId = sc.AccountId,
SubUserName = shop?.SubUserName,
Notes = shop?.Notes,
openid = sc.openid,
};
var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l => l.ShopId == newShop.ShopId);
if (oldShop == null)
{
GlobalConfig.ShopLoginList.Add(newShop);
ShopBLL.AddServerShop(newShop); // 店铺写入到服务端
if (shop == null)
shop = newShop;
}
else
{
oldShop.ShopId = newShop.ShopId;
oldShop.LoginName = newShop.LoginName;
oldShop.ShopAccount = newShop.ShopAccount;
oldShop.openid = newShop.openid;
// 店铺更新写入到服务端
var url = BaseClass.Build29WxObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + oldShop.LoginName
+ "&shop_id=" + oldShop.ShopId
+ "&shop_account=" + oldShop.ShopAccount;
var result = GetHtml.PostUtf8(url, data);
}
}
// 店铺cookie写入服务端,多店共用一个登录账号一组cookie
// 手动更新内存中的店铺cookie
var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop?.LoginName).ToList();
foreach (var s in lstShop)
{
s.LoginStatus = "登录成功";
s.Cookies = cookies;
s.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
ShopBLL.UpdateServerShopCookies(shop);
OnSaveComplete(shop);
if (this.Created && this.chkCloseAfterLogin.Checked)
{
Invoke(new Action(() => { this.Close(); }));
}
else
{
break;
}
}
}
}
}
});
}
/// <summary>
/// 自动关闭弹窗
/// </summary>
private void ClosePopWindow()
{
// 关闭弹窗
Task.Run(() =>
{
var sleepTime = 2500;
int i = 0;
while (true && i++ < 50)
{
try
{
Thread.Sleep(sleepTime);
var jsStr1 = "function ClosePopWindow(txt) {\r\n" +
" var result = 'no_pop'\r\n" +
" var item = document.getElementsByClassName(txt);\r\n" +
" for(i = 0; i < item.length; i++) {\r\n" +
" item[i].click();\r\n" +
" result = 'success'\r\n" +
" }\r\n" +
" return result;\r\n" +
"}\r\n" +
"ClosePopWindow('anticon-close-circle');\r\n" +
"ClosePopWindow('ant-modal-close-x');\r\n";
var jsStr2 = "function clickPopWindow(txt) {\r\n"
+ "var child = document.body.firstElementChild;\r\n"
+ "var element1 = null;\r\n"
+ " while (child) {\r\n"
+ " if (child.innerHTML.indexOf(txt) >= 0) {\r\n"
+ " element1 = child;\r\n"
+ " if (child.firstElementChild) {\r\n"
+ " child = child.firstElementChild; continue;\r\n"
+ " } else break;\r\n"
+ " }\r\n"
+ " child = child.nextElementSibling;\r\n"
+ " }\r\n"
+ " if (element1) {\r\n"
+ " element1.click(); return 'success';\r\n"
+ " } else return 'no_pop';\r\n"
+ "}\r\n"
+ "clickPopWindow('我知道了');\r\n"
+ "clickPopWindow('知道了');\r\n";
if (cefWebBrowser != null && cefWebBrowser.IsBrowserInitialized)
{
var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr1);
t1.Wait();
var t2 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr2);
t2.Wait();
if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success")
sleepTime = Randomx.GetId(550, 650);
else
sleepTime = Randomx.GetId(1500, 2000);
}
}
catch (Exception ex) { }
}
});
}
/// <summary>
/// 自动登录店铺后台
/// </summary>
private void AutoLogin()
{
if (openType != EnumOpenType.login && shop == null)
return;
if (cefWebBrowser == null)
{
if (!string.IsNullOrEmpty(InitUrl))
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
else
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false);
LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
var lifeSapnHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
cefWebBrowser.KeyboardHandler = new KeyboardHandler();
cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
cefWebBrowser.LoadError += CefWebBrowser_LoadError;
cefWebBrowser.Dock = DockStyle.Fill;
//js绑定C#对象
//WXShopBrowserObject shopObj = new WXShopBrowserObject();
//shopObj.OnInfoReceived += ShopObj_OnInfoReceived;
//CefSharpSettings.WcfEnabled = true;
//cefWebBrowser.JavascriptObjectRepository.Register(
// name: "shopObj",
// objectToBind: shopObj,
// isAsync: false,
// options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ }
//);
List<Cookie> cookieLst = new List<Cookie>();
try
{
if (shop != null)
{
cookieLst = JsonHelper.DeserializeJsonToList<CefSharp.Cookie>(shop.Cookies.ParseToString());
if (cookieLst == null)
cookieLst = new List<Cookie>();
}
}
catch
{
}
Task.Run(() =>
{
Invoke(new Action(() =>
{
splitContainer1.Panel1.Controls.Add(cefWebBrowser);
//cefWebBrowser.Load(shopMainUrl);
}));
// cef138必须init后方可设置或删除cookie
while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
Thread.Sleep(20);
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
//cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager
//if (this.openType != EnumOpenType.login)
{
//var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null));
string address = "";
if (!string.IsNullOrEmpty(InitUrl))
address = InitUrl;
else
address = shopMainUrl;
foreach (var cook in cookieLst)
{
// 同步设置cookie
cefWebBrowser.GetCookieManager(null).SetCookie(address, cook);
//var t = CEFBrowser.SetCookieAsync(cook.Domain, cook.Name + "=" + cook.Value + ";", cefWebBrowser.GetCookieManager(null));
//t.Wait(5000);
}
}
//根据登录的具体店铺设置local storage
if (!string.IsNullOrEmpty(shop?.ShopId))
{
//var storageJsCode = "window.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');\r\n";
//storageJsCode += "window.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');\r\n";
//while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
// Thread.Sleep(20);
//cefWebBrowser.GetBrowser().MainFrame.ExecuteJavaScriptAsync(storageJsCode);
}
if (!string.IsNullOrEmpty(InitUrl))
cefWebBrowser.Load(InitUrl);
else
cefWebBrowser.Load(shopMainUrl);
//不是登录的话就此返回
if (openType != EnumOpenType.login)
{
Invoke(new Action(() =>
{
chkCloseAfterLogin.Visible = false;
btnLoginAgain.Visible = false;
}));
return;
}
for (int i = 0; i < 50; i++)
{
if (cefWebBrowser.IsLoading)
Thread.Sleep(100);
}
Thread.Sleep(Randomx.GetId(1500,2000));
if (!this.Created)
return;
while (!cefWebBrowser.Address.StartsWith(shopLoginUrl))
{
Thread.Sleep(1000);
if (!this.Created)
return;
}
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
// 扫码登录,无输入密码环节
// InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password));
});
}
}
private void ShopObj_OnInfoReceived(string information)
{
//BaseMsgForm.ShowInfo(information);
if (!string.IsNullOrEmpty(information))
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');");
}
private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e)
{
}
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
{
if (this.Created && !this.Disposing && !this.IsDisposed)
Invoke(new Action(() =>
{
currentUrl = e.Address;
txtAddress.Text = e.Address;
}));
if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && shop != null && !string.IsNullOrEmpty(shop.LoginName))
{
Task.Run(() =>
{
Thread.Sleep(2000);
// var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');"
var _account = shop.LoginName;
var _password = DataOpenSSL.DecryptString(shop.Password);
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2);
var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " +
"changeReactInputValue(usernameId,'" + _account + "');";
var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
response1.Wait(1000);
Thread.Sleep(Randomx.GetId(50, 100));
if (!string.IsNullOrEmpty(_password))
{
string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " +
"changeReactInputValue(passwordId,'" + _password + "');";
var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
response.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
}
});
}
}
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
{
//js绑定C#对象 html页面内声明绑定的C#对象
StringBuilder sb = new StringBuilder();
sb.Append("(function(){");
sb.Append("CefSharp.BindObjectAsync('shopObj');");
sb.Append("})();");
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
}
//public Func<object, string, string, request, bool> BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行)
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
{
if (url.Contains("listingAuditFree") /*|| url.Contains("uploadPartBinary")*/)
{
}
return false;
}
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
{
if (url == "https://store.weixin.qq.com/shop/home" && this.openType == EnumOpenType.login)
{
Task.Run(() =>
{
var data = responseData;
var index = data.IndexOf("window.__INITIAL_PINIA_DATA__=") + "window.__INITIAL_PINIA_DATA__=".Length;
var indexEnd = data.IndexOf(";window.__USE_VITE__=");
if (index < 1000)
{
//BaseMsgForm.ShowError("cookie已失效!");
return;
}
var dataStr = data.Substring(index, indexEnd - index);
dataStr = GetHtml.Unicode2String(dataStr);
var shopId = BaseRegex.GetStringJson(ref data, "appid");
var nickName = BaseRegex.GetStringJson(ref data, "nickName");
var openId = BaseRegex.GetStringJson(ref data, "openid"); // oGu7k7HxmUyOmc1X6VM7GQwS-9cI
if (shopId.IsNullOrEmpty() || nickName.IsNullOrEmpty() || openId.IsNullOrEmpty())
return;
if (shop != null && shop.ShopId != shopId)
{
BaseMsgForm.ShowError("cookie与店铺不匹配,请核对店铺!");
return;
}
if (shop == null && GlobalConfig.ShopLoginList.Any(s=>s.ShopId == shopId))
{
BaseMsgForm.ShowError("录入的新店铺已存在,请核对店铺!");
return;
}
ShopCompany sc = new ShopCompany()
{
UserName = BaseClass.UserName, // 登录的用户信息
AccountId = shopId,
AccountName = nickName,
LoginName = shopId,
openid = openId,
LoginStatus = "登录成功",
};
this.lstShopCompany.RemoveAll(s => s.AccountId == sc.AccountId);
this.lstShopCompany.Add(sc);
});
}
if ((BaseClass.UserAuthority.ParseToString().Contains("微信回采") || BaseClass.UserAuthority.ParseToString().Contains("商品采集")) &&
currentUrl.StartsWith("https://store.weixin.qq.com/shop/goods/list"))
{
//Task.Run(() => {
string sAddInputJs = @"
document.addEventListener('wheel', function(event) {
// 检查滚动方向
//if (event.deltaY < 0) {
// console.log('向上滚动');
//} else {
// console.log('向下滚动');
//}
// 或者使用 event.deltaX 来检查水平滚动
//if (event.deltaX < 0) {
// console.log('向左滚动');
//} else if (event.deltaX > 0) {
// console.log('向右滚动');
//}
// 阻止默认的滚动行为(如果有需要)
//event.preventDefault();
addGetProdButton();
});
addGetProdButton();
function addGetProdButton() {
const element = document.getElementsByName('goods')[0];
const shadowRoot = element.shadowRoot;
var productLst = shadowRoot.querySelector('micro-app-body').getElementsByClassName('goods_info')
for ( i= 0; i < productLst.length; i++) {
var addBtnItem = productLst[i]; //.parentElement.parentElement.parentElement;
var pos = addBtnItem.innerHTML.indexOf('ID:')
if (addBtnItem.innerHTML.indexOf('回采') < 0 && addBtnItem.innerHTML.indexOf('采集') < 0 && pos >= 0) {
var sSpuId = addBtnItem.innerHTML.substring(pos + 3);
sSpuId = sSpuId.substring(0, sSpuId.indexOf('<span')).trim();
//addBtnItem.innerHTML += ""<input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">""
//addBtnItem.innerHTML += ""<input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""alert('"" + sSpuId + ""')\"">""
//addBtnItem.innerHTML = addBtnItem.innerHTML.replace(""分享 </a></div>"", ""分享 </a></div><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
var newDiv = document.createElement(""div"");
newDiv.innerHTML=""<div style=\""padding:5px 0px\"">";
int margin = 0;
if (BaseClass.UserAuthority.ParseToString().Contains("商品采集"))
{
sAddInputJs += @"<a style=\""display:inline; margin-left:" + margin + @"px; margin-top:10px; padding:2px 5px; cursor:pointer; border:1px solid\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"', false, true)\"">采集入库<\a>";
margin = 5;
}
else if (BaseClass.UserAuthority.ParseToString().Contains("微信回采"))
{
sAddInputJs += @"<a style=\""display:inline; margin-left:" + margin + @"px; margin-top:10px; padding:2px 5px; cursor:pointer; border:1px solid\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">回采<\a>";
margin = 5;
}
sAddInputJs += @"</div>"";";
sAddInputJs += @"addBtnItem.lastChild.appendChild(newDiv);
}
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
//});
//const element = document.getElementsByName('goods')[0]
//const shadowRoot = element.shadowRoot;
//shadowRoot.querySelector('micro-app-body').getElementsByClassName('goods_info')
}
}
/// <summary>
/// 自动登录
/// </summary>
/// <param name="webBrowser"></param>
/// <param name="_account"></param>
/// <param name="_password"></param>
private void InputUserNameAndPassword(ChromiumWebBrowser webBrowser, string _account, string _password)
{
webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText);
var jsStr0 = "var clickBox1 = getElementWithText('账号登录'); clickBox1.click()";
var response0 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr0);
response0.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
string jsStr1 = "function getInputItem () {var usernameId = document.getElementById('usernameId'); if (usernameId) return 'true';} getInputItem();";
Task<JavascriptResponse> response1 = null;
while (response1?.Result?.Result == null || !response1.Result.Result.ParseToString().Contains("true"))
{
Thread.Sleep(250);
if (!this.Created)
return;
response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
response1.Wait(5000);
if (!this.Created)
return;
}
webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2);
jsStr1 = "var usernameId = document.getElementById('usernameId'); " +
"changeReactInputValue(usernameId,'" + _account + "');";
response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
response1.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
string jsStr = "var passwordId = document.getElementById('passwordId'); "+
"changeReactInputValue(passwordId,'" + _password + "');";
var response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
response.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
jsStr = "var clickBox = getElementWithText('我已阅读并同意'); " +
"clickBox.click()";
response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
response.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
jsStr = "var clickBox = getElementWithText('登录'); " +
"clickBox.click()";
response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
response.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
}
// 鼠标左键按下,移动,移动...左键抬起。
public static void CefMouseDragDou(ChromiumWebBrowser webBrowser, int x1, int y1, int x2, int y2)
{
Thread.Sleep(100);
var host = webBrowser.GetBrowser().GetHost();
var rx = -6 + Randomx.GetId(13);
x2 = x2 + rx;
// 随机按下点的位置(正负6像素),提高仿真性
int x = x1 + rx;
int y = y1 - 6 + Randomx.GetId(13);
// 按下鼠标左键
host.SendMouseClickEvent(x, y, MouseButtonType.Left, false, 1, CefEventFlags.None);
Thread.Sleep(100 + Randomx.GetId(300));
// 滑动光标
int times = -20;
while (x < x2 + 4 - Randomx.GetId(9))
{
times++;
x += (15 + Randomx.GetId(15)) / 8;
if (times % 5 == 0)
y = y - 1 + Randomx.GetId(3);
Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16));
host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton);
}
if (x < x2 - 1)
while (x < x2)
{
times++;
x += (8 + Randomx.GetId(8)) / 8;
if (times % 5 == 0)
y = y - 1 + Randomx.GetId(3);
Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16));
host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton);
}
else if (x > x2 + 1)
while (x > x2)
{
times++;
x -= (8 + Randomx.GetId(8)) / 8;
if (times % 5 == 0)
y = y - 1 + Randomx.GetId(3);
Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16));
host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton);
}
// 如果最后位置偏差较多,再做一次调整
x = x2 - 1 + Randomx.GetId(3);
x = x2;
Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16));
Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16));
host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton);
// 抬起鼠标左键
Thread.Sleep(300 + Randomx.GetId(500));
host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None);
host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None);
}
private void btnCopyUserName_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtUserName.Text))
Clipboard.SetDataObject(txtUserName.Text);
}
private void btnCopyPassword_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtPassWord.Text))
Clipboard.SetDataObject(txtPassWord.Text);
}
private void btnReload_Click(object sender, EventArgs e)
{
if (cefWebBrowser != null)
{
if (txtAddress.Text != "about:blank")
cefWebBrowser.Load(txtAddress.Text);
else
cefWebBrowser.Load(shopMainUrl);
}
}
private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e)
{
//OnSaveComplete(shop);
Task.Run(() => {
Thread.Sleep(500);
if (!this.Disposing && !this.IsDisposed)
{
//MainForm.instance.Invoke(new Action(() => { this.Dispose(); }));
}
});
}
private void txtAddress_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (cefWebBrowser != null)
{
cefWebBrowser.Load(txtAddress.Text);
}
}
}
string sInputValueChange2 { get; set; } = @"
function changeReactInputValue(inputDom,newText){
let lastValue = inputDom.value;
inputDom.value = newText;
let event = new Event('input', { bubbles: true });
event.simulated = true;
let tracker = inputDom._valueTracker;
if (tracker) {
tracker.setValue(lastValue);
}
inputDom.dispatchEvent(event);
}
";
string sGetElementWithText { get; set; } = @"
function getElementWithText(sText)
{
var elem=null;
const elements = document.querySelectorAll('*'); // 选择所有元素
elements.forEach(element => {
if (element.textContent.includes(sText)) {
// 对每个匹配的元素执行操作
//console.log(element);
elem=element;
}
});
return elem;
};
";
private void btnLoginAgain_Click(object sender, EventArgs e)
{
if (this.currentUrl != shopLoginUrl)
this.cefWebBrowser.Load(shopLoginUrl);
Task.Run(() =>
{
InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password));
});
}
private void btnPrev_Click(object sender, EventArgs e)
{
cefWebBrowser.Back();
}
private void btnNext_Click(object sender, EventArgs e)
{
cefWebBrowser.Forward();
}
private void btnSaveUserInfo_Click(object sender, EventArgs e)
{
if (shop == null)
return;
shop.LoginName = this.txtUserName.Text;
shop.Password = DataOpenSSL.EncryptString(this.txtPassWord.Text);
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_dian_tong_ling_login_info", shop);
Task.Run(() =>
{
Thread.Sleep(100);
// var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');"
var _account = shop.LoginName;
var _password = DataOpenSSL.DecryptString(shop.Password);
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2);
var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " +
"changeReactInputValue(usernameId,'" + _account + "');";
var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
response1.Wait(1000);
Thread.Sleep(Randomx.GetId(50, 100));
if (!string.IsNullOrEmpty(_password))
{
string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " +
"changeReactInputValue(passwordId,'" + _password + "');";
var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
response.Wait(1000);
Thread.Sleep(Randomx.GetId(500, 1000));
}
});
}
private void btnSupplierKey_Click(object sender, EventArgs e)
{
try
{
Clipboard.SetText(txtSupplierKey.Text.Trim());
lblCopyResult.ForeColor = DefaultForeColor;
lblCopyResult.Text = "复制成功";
}
catch
{
lblCopyResult.ForeColor = Color.Red;
lblCopyResult.Text = "复制失败,请重试";
}
}
}
}
@@ -0,0 +1,298 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM
zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM
zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP////////////////////////////////////////
//iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI////////////////////////////////////
////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4////////////////////////////////
//////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj///////////////////////////
/////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP//////////////////////
///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4//////////////////
/////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj/////////////
///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI////////
/////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj///
//////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM
eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM
zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM
zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM
zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM
zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4
fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI
j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4
iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI//////////
////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj///
//////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI
iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4//
/4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP////////////
///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/
///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H
fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP//////
///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/
////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM
zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM
zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM
zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM
zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP////////
+MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj///
//////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM
eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I
j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI//////////////////////
/////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP//////////////////
/////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I//////////////
///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP////////
/////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj///////////////
//////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI//////////
//////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP////
////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM
eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM
zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM
zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM
zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM
zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I////////////////////////////////////////////
//h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij/////////////////////////////////////
//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4
////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP//////////////////////
////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////////////
///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////
//////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////
//////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////
///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////
////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI
j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj///////
+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI//
//////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI
iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj/////
/4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM
j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM
zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI////
//jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI
iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI
iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP////
///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH
j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM
zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM
zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM
zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM
zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM
zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI////
///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI
iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4
iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP//
/////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM
zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM
zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4
fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP////////////////
////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH////////////
//////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP//////
//////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/
////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM
zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM
zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM
zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM
zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8
zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj///////////////
///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj/////////
////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj///
/////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM
x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM
zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM
zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM
zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8
zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP////////
//iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP//
//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM
zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM
zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA
AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>