代理版本调试
This commit is contained in:
1 parent
dcdfa30419
commit
1669305479
33 files changed
+4845
-157
No files matched your search
+8
-8
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36221.1
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.4.11620.152 stable
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "29WxOrderAllBase", "AllBase\29WxOrderAllBase.csproj", "{6461D807-B1C8-45F0-B388-E0CA1A418DE0}"
|
||||
EndProject
|
||||
@@ -39,8 +39,8 @@ Global
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.Build.0 = Release|x86
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x64.ActiveCfg = Release|x64
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x64.Build.0 = Release|x64
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x86.ActiveCfg = Release|x86
|
||||
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x86.Build.0 = Release|x86
|
||||
{D51A1BB0-17BB-44C3-9129-1F3187E82729}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
@@ -71,8 +71,8 @@ Global
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|Any CPU.Build.0 = Release|x86
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x64.Build.0 = Release|Any CPU
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x64.ActiveCfg = Release|x64
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x64.Build.0 = Release|x64
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x86.ActiveCfg = Release|x86
|
||||
{1AD45D66-6872-4522-ACF0-04E2C0514048}.Release|x86.Build.0 = Release|x86
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
@@ -87,8 +87,8 @@ Global
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x64.ActiveCfg = Release|x64
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x64.Build.0 = Release|x64
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
<ApplicationIcon>29_common_icon_orange.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
@@ -537,6 +537,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\default_pic.png" />
|
||||
<Content Include="29_common_icon_orange.ico" />
|
||||
<Content Include="buy.ico" />
|
||||
<Content Include="main.ico" />
|
||||
<Content Include="Resources\jzz.png" />
|
||||
<Content Include="Resources\qrcode.png" />
|
||||
<Content Include="Resources\weixin_bg.jpg" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -43,9 +43,11 @@ namespace _29WxOrder
|
||||
string IgPakFile = "locales/ig.pak";//贴牌客服端码
|
||||
string OenVersionFile = "locales/igv.pak";//贴牌资源配置版本
|
||||
string IaPakFile = "locales/ia.pak";//logo
|
||||
string IbPakFile = "locales/ib.pak";//ico
|
||||
//string IbPakFile = "locales/ib.pak";//ico
|
||||
string LoPakFile = "locales/lo.pak";
|
||||
string IcPakFile = "locales/ic.pak";//功能配置
|
||||
OenMechanism(IgPakFile, OenVersionFile, IaPakFile, IbPakFile, IcPakFile);
|
||||
|
||||
OenMechanism(IgPakFile, OenVersionFile, IaPakFile, LoPakFile, IcPakFile);
|
||||
#endregion
|
||||
|
||||
//启动界面
|
||||
@@ -115,7 +117,7 @@ namespace _29WxOrder
|
||||
/// <param name="sIaPakFile">ico本地缓存文件</param>
|
||||
/// <param name="sIbPakFile">logo本地缓存文件</param>
|
||||
/// <param name="sIcPakFile">贴牌配置本地缓存文件</param>
|
||||
private static void OenMechanism(string IgPakFile, string OenVersionFile, string IaPakFile, string IbPakFile, string IcPakFile)
|
||||
private static void OenMechanism(string IgPakFile, string OenVersionFile, string IaPakFile, string LogoBitmapFile, string IcPakFile)
|
||||
{
|
||||
//先检测是否是贴牌版本
|
||||
if (!FileBase.Exists(IgPakFile))
|
||||
@@ -156,7 +158,7 @@ namespace _29WxOrder
|
||||
{
|
||||
OenArchieveFailedToExit();
|
||||
}
|
||||
if (!GetHtml.DownloadFile(oem_icon_link, IbPakFile))//icon图片
|
||||
if (!GetHtml.DownloadFile(oem_icon_link, LogoBitmapFile))//icon图片
|
||||
{
|
||||
OenArchieveFailedToExit();
|
||||
}
|
||||
@@ -180,7 +182,7 @@ namespace _29WxOrder
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!FileBase.Exists(IbPakFile))
|
||||
if (!FileBase.Exists(LogoBitmapFile))
|
||||
{
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
string oem_icon_link = JObject.Parse(html)["data"]["oem_icon_link"].ToString();//icon图片 ib
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
@@ -55,7 +55,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>29wx.ico</ApplicationIcon>
|
||||
<ApplicationIcon>29_common_icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -375,6 +375,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\loading.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="29_common_icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
+85
-13
@@ -1,15 +1,18 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using AllBase;
|
||||
using CefSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Work;
|
||||
using Work.BaseForms;
|
||||
@@ -56,19 +59,49 @@ namespace _29WxOrderWpf
|
||||
string IgPakFile = "locales/ig.pak";//贴牌客服端码
|
||||
string OenVersionFile = "locales/igv.pak";//贴牌资源配置版本
|
||||
string IaPakFile = "locales/ia.pak";//logo
|
||||
string IbPakFile = "locales/ib.pak";//ico
|
||||
//string IbPakFile = "locales/ib.pak";//ico
|
||||
string IcPakFile = "locales/ic.pak";//功能配置
|
||||
//OenMechanism(IgPakFile, OenVersionFile, IaPakFile, IbPakFile, IcPakFile);
|
||||
|
||||
#region 后台修改logo 贴牌用
|
||||
//// 替换字典程序logo等
|
||||
//Uri imageUri = new Uri("pack://application:,,,/Resources/WindowBoxes/close.hover.png"); // 新的图片路径
|
||||
//BitmapImage newBitmapImage = new BitmapImage(imageUri);
|
||||
//// 获取资源字典
|
||||
//ResourceDictionary dict = Application.Current.Resources;
|
||||
//// 添加或更新资源
|
||||
//dict["main29WeixinIcon"] = newBitmapImage;
|
||||
#endregion
|
||||
if (!File.Exists("locales/io.pak"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var ioTxt = FileBase.ReadAllText("locales/io.pak");
|
||||
if (ioTxt.StartsWith("MThd") || !ioTxt.Contains("MThd"))
|
||||
return;
|
||||
|
||||
string agentNameFile = "locales/na.pak";
|
||||
if (File.Exists(agentNameFile))
|
||||
{
|
||||
var config = FileBase.ReadAllText(agentNameFile, Encoding.UTF8);
|
||||
var configArr = config.Split(new string[] { "\r\n", "MThd" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (configArr.Length >= 2)
|
||||
{
|
||||
BaseClass.ProgramName = configArr[1];
|
||||
BaseClass.ToolName = configArr[1];
|
||||
BaseClass.AgentName = configArr[0];
|
||||
}
|
||||
}
|
||||
|
||||
string LogoPakFile = "locales/lo.pak"; // ico
|
||||
if (File.Exists(LogoPakFile))
|
||||
{
|
||||
BitmapImage bitmap = new BitmapImage(new Uri(LogoPakFile, UriKind.Relative));
|
||||
Application.Current.Resources["main29WeixinIcon"] = bitmap;
|
||||
// winform部分,直接指定路径,从bitmap转换的会丢失颜色
|
||||
BaseClass.Ico = new Icon(LogoPakFile); //BitmapImageToIcon(Application.Current.Resources["main29WeixinIcon"] as BitmapImage);
|
||||
}
|
||||
//BaseClass.ProgromLogo = Environment.CurrentDirectory + "\\locales\\ia.pak";//logo
|
||||
//BaseClass.ProgromLogoIco = Environment.CurrentDirectory + "\\locales\\ib.pak";//ico
|
||||
string ImgPakFile = "locales/im.pak";
|
||||
if (File.Exists(ImgPakFile))
|
||||
{
|
||||
BaseClass.LogoImage = Image.FromFile(ImgPakFile);
|
||||
}
|
||||
|
||||
// 待后续完善
|
||||
OenMechanism(IgPakFile, OenVersionFile, IaPakFile, LogoPakFile, IcPakFile);
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -168,9 +201,48 @@ namespace _29WxOrderWpf
|
||||
/// <param name="sIaPakFile">ico本地缓存文件</param>
|
||||
/// <param name="sIbPakFile">logo本地缓存文件</param>
|
||||
/// <param name="sIcPakFile">贴牌配置本地缓存文件</param>
|
||||
private static void OenMechanism(string IgPakFile, string OenVersionFile, string IaPakFile, string IbPakFile, string IcPakFile)
|
||||
private void OenMechanism(string IgPakFile, string OenVersionFile, string IaPakFile, string logoBitmapFile, string IcPakFile)
|
||||
{
|
||||
//todo: 贴牌相关处理逻辑
|
||||
return;
|
||||
|
||||
#region 贴牌修改logo
|
||||
//// 替换字典程序logo等
|
||||
//Uri imageUri = new Uri("pack://application:,,,/Resources/WindowBoxes/close.hover.png"); // 新的图片路径
|
||||
//BitmapImage newBitmapImage = new BitmapImage(imageUri);
|
||||
//// 获取资源字典
|
||||
//ResourceDictionary dict = Application.Current.Resources;
|
||||
//// 添加或更新资源
|
||||
//dict["main29WeixinIcon"] = newBitmapImage;
|
||||
|
||||
if (File.Exists(logoBitmapFile))
|
||||
{
|
||||
BitmapImage bitmap = new BitmapImage(new Uri(logoBitmapFile, UriKind.Relative));
|
||||
Application.Current.Resources["main29WeixinIcon"] = bitmap;
|
||||
}
|
||||
BaseClass.Ico = BitmapImageToIcon(Application.Current.Resources["main29WeixinIcon"] as BitmapImage);
|
||||
#endregion
|
||||
}
|
||||
|
||||
public Icon BitmapImageToIcon(BitmapImage bitmapImage)
|
||||
{
|
||||
// 将BitmapImage转换为BitmapSource
|
||||
BitmapSource bitmapSource = BitmapFrame.Create(bitmapImage);
|
||||
|
||||
// 创建一个MemoryStream来存储BitmapSource的像素数据
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
PngBitmapEncoder encoder = new PngBitmapEncoder();
|
||||
encoder.Frames.Add(BitmapFrame.Create(bitmapSource));
|
||||
encoder.Save(memoryStream);
|
||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
// 从MemoryStream中创建一个System.Drawing.Bitmap对象
|
||||
using (var bitmap = new Bitmap(memoryStream))
|
||||
{
|
||||
// 现在你可以将System.Drawing.Bitmap转换为System.Drawing.Icon了
|
||||
return Icon.FromHandle(bitmap.GetHicon());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
||||
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d" DataContextChanged="UserControl_DataContextChanged"
|
||||
d:DesignHeight="250" d:DesignWidth="1200">
|
||||
d:DesignHeight="180" d:DesignWidth="1200">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -36,7 +36,8 @@
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<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>
|
||||
<Image Grid.Row="1" x:Name="imgOrderItem" Grid.Column="0" VerticalAlignment="Top" Height="100" Width="100" Margin="0,2,8,2"
|
||||
Cursor="Hand" MouseEnter="imgOrderItem_MouseEnter" MouseLeave="imgOrderItem_MouseLeave" MouseDown="imgOrderItem_MouseDown"></Image>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -176,7 +177,7 @@
|
||||
x:Name="txtRefundResult" BorderThickness="0" Foreground="#f56c6c" HorizontalAlignment="Center"
|
||||
Visibility="{Binding ElementName=txtRefundResult,Path=Text,Converter={StaticResource HasTextVisibility}}"/>
|
||||
|
||||
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5">
|
||||
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5" Width="auto" HorizontalAlignment="Center">
|
||||
<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 ItemOrder.address_str}" Grid.Column="1" Grid.Row="5" Margin="0,2,4,2" VerticalAlignment="Top"
|
||||
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -22,8 +23,10 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using TemuKJD.ToolForms;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.Forms.ShopForms;
|
||||
using Work._29Tools.Forms.ToolForms;
|
||||
using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
@@ -97,120 +100,211 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
BaseMsgWindow.ShowError("请选择买手号");
|
||||
return;
|
||||
}
|
||||
// 拍单的时候检测一下买手号
|
||||
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
||||
{
|
||||
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
||||
}
|
||||
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
||||
{
|
||||
BaseMsgWindow.ShowError("买手号掉线");
|
||||
return;
|
||||
}
|
||||
|
||||
if (orderItem.BuyGoodsBtnTxt == "去店铺后台绑定代发")
|
||||
btnBuyOrder.Cursor = Cursors.Wait;
|
||||
btnBuyOrder.IsEnabled = false;
|
||||
Task.Run(() =>
|
||||
{
|
||||
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 != "登录成功")
|
||||
Thread.Sleep(2000);
|
||||
Dispatcher.Invoke(new Action(() => { btnBuyOrder.IsEnabled = true; }));
|
||||
});
|
||||
Task.Run(() =>
|
||||
{
|
||||
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == orderItem.Shop.ErpShopId).ToList())
|
||||
// 拍单的时候检测一下买手号
|
||||
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
||||
{
|
||||
// 更新代发管理情况
|
||||
foreach (var oi in ord.orderItems)
|
||||
Dispatcher.Invoke(new Action(() => { oi.UpdateOrderItemBuyButton(); }));
|
||||
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
||||
}
|
||||
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供货商"
|
||||
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
||||
{
|
||||
orderItem.Shop.Is29Supplier = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopBLL.CheckShopLogin(orderItem.Shop);
|
||||
if (orderItem.Shop?.LoginStatus != "登录成功")
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
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("店铺后台未查询到该代发单,请确认店铺在线且商品加入代发");
|
||||
BaseMsgWindow.ShowError("买手号掉线");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
|
||||
var url = BaseClass.Build29WxObjString("shop/get_shop_erp_merchant");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&corporate_account_user_id=" + orderItem.Shop.ErpCorporateAccountUserId;
|
||||
data += "&manage_user_id=" + orderItem.Shop.ErpManageUserId;
|
||||
data += "&shop_id=" + orderItem.Shop.ErpShopId;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var erpMs = JsonHelper.DeserializeJsonToList<ErpMerchantInfo>(JsonHelper.JObjectParse(html)["data"].ParseToString());
|
||||
var erpM = erpMs.FirstOrDefault();
|
||||
if (erpM == null)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
// 未关联拍单的跳到所有订单页面
|
||||
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;
|
||||
var balance = erpM.balance.ParseToDecimal();
|
||||
if (balance < 10)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("ERP账户余额不足(剩余" + balance.ToString("0.00") + "元,拍单至少需保留10元),无法中转拍单,请先充值!");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("拍单校验出错,请稍后重试");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 已有拍单关联的跳的到订单确认界面
|
||||
if (orderItem.BuyMap != null)
|
||||
{
|
||||
//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";
|
||||
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();
|
||||
|
||||
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";
|
||||
// 不是立即生效的,不用立即刷新
|
||||
//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(); }));
|
||||
//}
|
||||
}
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
//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";
|
||||
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(); }));
|
||||
}
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("请登录店铺");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
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(); }));
|
||||
}
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("请登录店铺");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("店铺后台未查询到该代发单,请确认店铺在线且商品加入代发");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
buyOrderForm.pnlBuy.Visible = true;
|
||||
buyOrderForm.pnlMap.Visible = false;
|
||||
}
|
||||
buyOrderForm.ShowDialog();
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
|
||||
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.BuyMap != null)
|
||||
{
|
||||
//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.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.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";
|
||||
|
||||
buyOrderForm.pnlBuy.Visible = true;
|
||||
buyOrderForm.pnlMap.Visible = false;
|
||||
}
|
||||
buyOrderForm.ShowDialog();
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||
@@ -329,6 +423,25 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void imgOrderItem_MouseEnter(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void imgOrderItem_MouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void imgOrderItem_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_item_info orderItem)
|
||||
{
|
||||
ShowImgForm imgFrom = new ShowImgForm(orderItem.thumb_img);
|
||||
imgFrom.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,5 +55,6 @@
|
||||
</Border.Effect>
|
||||
<TextBlock Text="这里是默认提示信息" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="tbMessage"></TextBlock>
|
||||
</Border>
|
||||
<!--<Image x:Name="imageBig" HorizontalAlignment="Left" Height="800" Width="800" VerticalAlignment="Center" Grid.Row="1" Margin="200,0,0,0"/>-->
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -60,6 +60,7 @@ namespace _29WxOrderWpf
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ucWindowBox.SetWindowMax();
|
||||
this.Title = BaseClass.ToolName;
|
||||
|
||||
new Thread(AutoAntiGrabbingMechanism).Start(); // 反抓包
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -166,6 +166,7 @@
|
||||
<Compile Include="DouYinModel\Param\ShopManage\DouShopSettingParam.cs" />
|
||||
<Compile Include="DouYinModel\Result\DouGoodsInfo.cs" />
|
||||
<Compile Include="DouYinModel\Result\DouOrderListInfo.cs" />
|
||||
<Compile Include="Model\Local\ErpMerchantInfo.cs" />
|
||||
<Compile Include="Model\Local\oms_wei_external_procurement_log.cs" />
|
||||
<Compile Include="Model\Local\TransitWarehouseParam.cs" />
|
||||
<Compile Include="Model\Local\WaybillHelper.cs" />
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace AllBase
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
|
||||
public static int VersionCount = 126;
|
||||
public static int VersionCount = 130;
|
||||
|
||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace AllBase
|
||||
{
|
||||
@@ -325,5 +326,13 @@ namespace AllBase
|
||||
DeleteObject(h);
|
||||
return icon;
|
||||
}
|
||||
|
||||
public static Icon ConvertToIcon(Bitmap bmp)
|
||||
{
|
||||
IntPtr h = bmp.GetHicon();
|
||||
Icon icon = Icon.FromHandle(h);
|
||||
DeleteObject(h);
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.Local
|
||||
{
|
||||
/// <summary>
|
||||
/// erp 账户信息
|
||||
/// </summary>
|
||||
public class ErpMerchantInfo
|
||||
{
|
||||
public long id { get; set; }
|
||||
/// <summary>
|
||||
/// 唯一用户标识
|
||||
/// </summary>
|
||||
public long user_id { get; set; }
|
||||
/// <summary>
|
||||
/// 账户类型,1:分销商账户,2:供应商账户
|
||||
/// </summary>
|
||||
public int? account_type { get; set; }
|
||||
/// <summary>
|
||||
/// 账户名称
|
||||
/// </summary>
|
||||
public string account_name { get; set; }
|
||||
/// <summary>
|
||||
/// 账户状态(1-正常 2-冻结 3-注销)
|
||||
/// </summary>
|
||||
public int account_status { get; set; }
|
||||
/// <summary>
|
||||
/// 账户累计充值金额
|
||||
/// </summary>
|
||||
public decimal recharge_amount_total { get; set; }
|
||||
/// <summary>
|
||||
/// 可用余额
|
||||
/// </summary>
|
||||
public decimal balance { get; set; }
|
||||
/// <summary>
|
||||
/// 冻结金额
|
||||
/// </summary>
|
||||
public decimal frozen_amount { get; set; }
|
||||
/// <summary>
|
||||
/// 提现账户收款图片
|
||||
/// </summary>
|
||||
public string withdraw_account_image_url { get; set; }
|
||||
/// <summary>
|
||||
/// 已提现金额
|
||||
/// </summary>
|
||||
public decimal? withdrawn_amount { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime create_time { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime update_time { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public long? create_by { get; set; }
|
||||
/// <summary>
|
||||
/// 修改人
|
||||
/// </summary>
|
||||
public long? update_by { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,8 @@ namespace AllBase.Model.Local
|
||||
public string ShopAccount { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public string ErpShopId { get; set; }
|
||||
public string ErpCorporateAccountUserId { get; set; }
|
||||
public string ErpManageUserId { get; set; }
|
||||
public string SubUserName { get; set; }
|
||||
public string ShopToken { get; set; }
|
||||
public string Signature { get; set; }
|
||||
|
||||
@@ -325,6 +325,10 @@ namespace AllBase.Model.Local
|
||||
}
|
||||
return profitCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
profitCount = decimal.MinValue;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过计算的利润文本
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,2 @@
|
||||
ЫКАУс
|
||||
РЎДМНГ1.27
|
||||
@@ -0,0 +1 @@
|
||||
dy-d09598f92530
|
||||
@@ -0,0 +1 @@
|
||||
dy-310b07e8d39c
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,2 @@
|
||||
iyIeZmaRyTA9IwFw/fHNvydagwTMGGJKbpO2t+4nNtIoJoviKJYCMxgJuFRRYZFIFtfPg9OSVBW0sU0YwzCl2keG2e0mFGbCJo73rMUrXYd4z9Q9mjyKgtLnUsyixAQxblM1gMgTUiYyxhh6sItluMT4cm8DRafddVhek/3bI33rh/bMn/3o/F7QJl+SPudRYgizy3GosQ5YA2moirOuRS4yCWW9tNVRV5nbNNgb++uqNwvH791y92cuIr/G5NP0FmEBdpWmVgtQl+0/CouWEi64FcTjI8nZaOYMDz/58PmJsLbbQ+uDcw0ZmSjkli9TL+UAh3eIxcdudbe+MDsY9SdFztStkbCXhBcw8/9la1di69fWYjf4HaA6xTlUwdEYzICR2L8d+zDNCj/vvHkEwgI/gD8H+v1ZYbAjmOHlcFygNJB3DHSp2c/9gWDwMT73cpix2rtYSxHHS9WmWzQ+JezANYngQACQ4Qg+C1r4cOI71tRR32Dlbwnarv6/uxI2
|
||||
iyIeZmaRyTB1LQSB8Kw5cz6e3uRZ6D76cElF6Q6QVcI+ysq0CBE8k/cNTolZCc/n+q6B6qlUm98=
|
||||
@@ -76,7 +76,7 @@
|
||||
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -291,6 +291,12 @@
|
||||
<Compile Include="_29Tools\Forms\ShopForms\WXShopLoginForm.Designer.cs">
|
||||
<DependentUpon>WXShopLoginForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="_29Tools\Forms\ToolForms\ShowImgForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="_29Tools\Forms\ToolForms\ShowImgForm.Designer.cs">
|
||||
<DependentUpon>ShowImgForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj">
|
||||
@@ -364,6 +370,9 @@
|
||||
<EmbeddedResource Include="_29Tools\Forms\ShopForms\WXShopLoginForm.resx">
|
||||
<DependentUpon>WXShopLoginForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="_29Tools\Forms\ToolForms\ShowImgForm.resx">
|
||||
<DependentUpon>ShowImgForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -142,6 +142,8 @@ namespace Work._29Tools.BLL
|
||||
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");
|
||||
shop.ErpCorporateAccountUserId = BaseRegex.GetStringJson(ref shopStr, "erp_corporate_account_user_id");
|
||||
shop.ErpManageUserId = BaseRegex.GetStringJson(ref shopStr, "erp_manage_user_id");
|
||||
|
||||
return shop;
|
||||
}
|
||||
|
||||
@@ -748,6 +748,8 @@ namespace TemuKJD.ToolForms
|
||||
out_order_no = txtBuyOrderId.Text.Trim(),
|
||||
purchaser_note = BaseClass.NickName,
|
||||
});
|
||||
// 利润计算重置为最小值,控件Resource更新时将计算利润
|
||||
orderItem.ProfitCount = decimal.MinValue;
|
||||
var order = orderItem.ItemOrder;
|
||||
if (filterOrderAction != null)
|
||||
{
|
||||
|
||||
+24
-24
@@ -83,6 +83,8 @@
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.txtShopName = new System.Windows.Forms.TextBox();
|
||||
this.label27 = new System.Windows.Forms.Label();
|
||||
this.label26 = new System.Windows.Forms.Label();
|
||||
this.txtOrderId = new System.Windows.Forms.TextBox();
|
||||
this.pnlBuy = new System.Windows.Forms.Panel();
|
||||
@@ -92,8 +94,6 @@
|
||||
this.pnlMap = new System.Windows.Forms.Panel();
|
||||
this.chkChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label27 = new System.Windows.Forms.Label();
|
||||
this.txtShopName = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -728,6 +728,26 @@
|
||||
this.panel1.Size = new System.Drawing.Size(487, 730);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// txtShopName
|
||||
//
|
||||
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtShopName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtShopName.Location = new System.Drawing.Point(321, 60);
|
||||
this.txtShopName.Name = "txtShopName";
|
||||
this.txtShopName.Size = new System.Drawing.Size(152, 23);
|
||||
this.txtShopName.TabIndex = 876;
|
||||
//
|
||||
// label27
|
||||
//
|
||||
this.label27.AutoSize = true;
|
||||
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label27.Location = new System.Drawing.Point(253, 63);
|
||||
this.label27.Name = "label27";
|
||||
this.label27.Size = new System.Drawing.Size(68, 17);
|
||||
this.label27.TabIndex = 875;
|
||||
this.label27.Text = "店铺名称:";
|
||||
//
|
||||
// label26
|
||||
//
|
||||
this.label26.AutoSize = true;
|
||||
@@ -867,26 +887,6 @@
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||
//
|
||||
// label27
|
||||
//
|
||||
this.label27.AutoSize = true;
|
||||
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label27.Location = new System.Drawing.Point(253, 63);
|
||||
this.label27.Name = "label27";
|
||||
this.label27.Size = new System.Drawing.Size(68, 17);
|
||||
this.label27.TabIndex = 875;
|
||||
this.label27.Text = "店铺名称:";
|
||||
//
|
||||
// txtShopName
|
||||
//
|
||||
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtShopName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtShopName.Location = new System.Drawing.Point(321, 60);
|
||||
this.txtShopName.Name = "txtShopName";
|
||||
this.txtShopName.Size = new System.Drawing.Size(152, 23);
|
||||
this.txtShopName.TabIndex = 876;
|
||||
//
|
||||
// PddMobileBuyOrderForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -897,8 +897,8 @@
|
||||
this.IsShowMaxBox = true;
|
||||
this.Name = "PddMobileBuyOrderForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.Text = "买手登录";
|
||||
this.TitleText = "买手登录";
|
||||
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);
|
||||
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
|
||||
namespace Work._29Tools.Forms.ToolForms
|
||||
{
|
||||
partial class ShowImgForm
|
||||
{
|
||||
/// <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(ShowImgForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnSave = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnCopy = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnClose = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
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(616, 0);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(1, 33);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.pictureBox1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnSave);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCopy);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCopyUrl);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnClose);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(648, 686);
|
||||
this.splitContainer1.SplitterDistance = 648;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
this.splitContainer1.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(648, 648);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(263, 7);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(188, 17);
|
||||
this.label1.TabIndex = 518;
|
||||
this.label1.Text = "点击图片或按空格键切换列表图片";
|
||||
this.label1.Visible = false;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSave.Location = new System.Drawing.Point(178, 2);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(65, 26);
|
||||
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSave.Style.GradientAngle = 90;
|
||||
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.TabIndex = 505;
|
||||
this.btnSave.Text = "保存本地";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// btnCopy
|
||||
//
|
||||
this.btnCopy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCopy.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCopy.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCopy.Location = new System.Drawing.Point(107, 2);
|
||||
this.btnCopy.Name = "btnCopy";
|
||||
this.btnCopy.Size = new System.Drawing.Size(65, 26);
|
||||
this.btnCopy.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopy.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnCopy.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnCopy.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnCopy.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnCopy.Style.GradientAngle = 90;
|
||||
this.btnCopy.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopy.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.TabIndex = 492;
|
||||
this.btnCopy.Text = "复制图片";
|
||||
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
|
||||
//
|
||||
// btnCopyUrl
|
||||
//
|
||||
this.btnCopyUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCopyUrl.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCopyUrl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCopyUrl.Location = new System.Drawing.Point(6, 2);
|
||||
this.btnCopyUrl.Name = "btnCopyUrl";
|
||||
this.btnCopyUrl.Size = new System.Drawing.Size(94, 26);
|
||||
this.btnCopyUrl.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopyUrl.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnCopyUrl.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnCopyUrl.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnCopyUrl.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnCopyUrl.Style.GradientAngle = 90;
|
||||
this.btnCopyUrl.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopyUrl.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.TabIndex = 488;
|
||||
this.btnCopyUrl.Text = "复制图片地址";
|
||||
this.btnCopyUrl.Click += new System.EventHandler(this.btnCopyUrl_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnClose.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnClose.Location = new System.Drawing.Point(586, 2);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(56, 26);
|
||||
this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClose.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClose.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClose.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnClose.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnClose.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnClose.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClose.Style.GradientAngle = 90;
|
||||
this.btnClose.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClose.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClose.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClose.TabIndex = 481;
|
||||
this.btnClose.Text = "关闭";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// ShowImgForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(650, 720);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
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.KeyPreview = true;
|
||||
this.Name = "ShowImgForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.Text = "图片查看";
|
||||
this.TitleText = "图片查看";
|
||||
this.Load += new System.EventHandler(this.ShowImgForm_Load);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowImgForm_KeyDown);
|
||||
this.Controls.SetChildIndex(this.splitContainer1, 0);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).EndInit();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private DevComponents.DotNetBar.PanelEx btnClose;
|
||||
private DevComponents.DotNetBar.PanelEx btnCopy;
|
||||
private DevComponents.DotNetBar.PanelEx btnCopyUrl;
|
||||
private DevComponents.DotNetBar.PanelEx btnSave;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
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.BaseForms;
|
||||
|
||||
namespace Work._29Tools.Forms.ToolForms
|
||||
{
|
||||
public partial class ShowImgForm : BaseGeneralForm
|
||||
{
|
||||
string currentImgUrl = null;
|
||||
Dictionary<string, string> imgDic = new Dictionary<string, string>();
|
||||
|
||||
public ShowImgForm(string picUrl)
|
||||
{
|
||||
InitializeComponent();
|
||||
currentImgUrl = picUrl;
|
||||
|
||||
if (!string.IsNullOrEmpty(currentImgUrl))
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
|
||||
//string getImgError = "";
|
||||
//var image = AllBase.GetHtml.GetUrlImg(currentImgUrl, out getImgError);
|
||||
//if (!string.IsNullOrEmpty(getImgError))
|
||||
// //BaseMsgForm.ShowError("图片加载失败 " + getImgError);
|
||||
// image = TemuKJD.Properties.Resources.errpic;
|
||||
//this.pictureBox1.Image = image;
|
||||
}
|
||||
}
|
||||
|
||||
public ShowImgForm(string picUrl, Dictionary<string, string> picDic)
|
||||
{
|
||||
InitializeComponent();
|
||||
currentImgUrl = picUrl;
|
||||
if (picDic != null)
|
||||
imgDic = picDic;
|
||||
|
||||
if (!string.IsNullOrEmpty(currentImgUrl))
|
||||
{
|
||||
if (picDic != null)
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
}
|
||||
}
|
||||
|
||||
public ShowImgForm(Image img)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (img != null)
|
||||
{
|
||||
this.pictureBox1.Image = img;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void ShowImgForm_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
//case Keys.A: MessageBox.Show("您按下的是A"); break;
|
||||
//case Keys.B: MessageBox.Show("您按下的是B"); break;
|
||||
case Keys.Enter: break;
|
||||
case Keys.Escape: this.Close(); break;
|
||||
case Keys.Space:
|
||||
if (imgDic != null && imgDic.Keys.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < imgDic.Keys.ToList().Count; i++)
|
||||
{
|
||||
if (imgDic.Keys.ToList()[i] == currentImgUrl)
|
||||
{
|
||||
int index = i + 1;
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic.Keys.ToList()[index];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
break;
|
||||
}
|
||||
if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl)
|
||||
{
|
||||
int index = i + 1;
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic[imgDic.Keys.ToList()[index]];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCopyUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(currentImgUrl); // 设置剪贴板内容
|
||||
BaseMsgForm.ShowInfo("图片地址已复制到剪贴板");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("复制图片地址到剪贴板失败: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetImage(this.pictureBox1.Image); // 设置剪贴板内容
|
||||
this.btnCopy.Text = "已复制";
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(2500);
|
||||
Invoke(new Action(() => { this.btnCopy.Text = "复制图片"; }));
|
||||
});
|
||||
//BaseMsgForm.ShowInfo("图片已复制到剪贴板");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(this.pictureBox1.Image == null)
|
||||
{
|
||||
BaseMsgForm.ShowError("图片为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
string fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg";
|
||||
if (!string.IsNullOrEmpty(this.pictureBox1.ImageLocation))
|
||||
{
|
||||
fileName = this.pictureBox1.ImageLocation.Replace("://",".").Replace('/', '.');
|
||||
}
|
||||
SaveFileDialog sfd = new SaveFileDialog();
|
||||
sfd.Filter = "JPeg Image|*.jpg;*.jpeg";
|
||||
sfd.Title = "保存图片";
|
||||
sfd.FileName = fileName;
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
pictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (imgDic != null && imgDic.Keys.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < imgDic.Keys.ToList().Count; i++)
|
||||
{
|
||||
if (imgDic.Keys.ToList()[i] == currentImgUrl)
|
||||
{
|
||||
int index = i + 1;
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic.Keys.ToList()[index];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
break;
|
||||
}
|
||||
if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl)
|
||||
{
|
||||
int index = i + 1;
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic[imgDic.Keys.ToList()[index]];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowImgForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
label1.Visible = this.imgDic != null && this.imgDic.Keys.Count > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user