1添加随机上传商品 2优化pdd api授权逻辑

This commit is contained in:
wule committed 2026-04-02 19:48:38 +08:00
1 parent 07b912e9eb
commit c0b7c2d986
34 files changed
+1651 -603

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 937;
public static int VersionCount = 953;
//public static int VersionCount = 613;
/// <summary>
@@ -2822,6 +2822,98 @@ namespace KJD_Web.BLL.BXX
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string SetRandomCompanyProductConfig(string inputData)
{
var timeCalc = DateTime.Now;
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
return "{\"code\":50000,\"msg\":\"用户不存在\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string product_group = RegexUtils.GetStringQuery(ref inputData, "product_group")?.Replace("'", "\\'");
string product_interval = RegexUtils.GetStringQuery(ref inputData, "product_interval")?.Replace("'", "\\'");
string is_on = RegexUtils.GetStringQuery(ref inputData, "is_on")?.Replace("'", "\\'");
string sql = "update bxx.product_com_random set ";
if (product_group != null)
sql += "product_group='" + product_group + "',";
if (product_interval != null)
sql += "product_interval=" + product_interval + ",";
if (is_on != null)
sql += "is_on=" + is_on + ",";
sql = sql.TrimEnd(',');
sql += " where 1=1;";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":200,\"msg\":\"success\"}";
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string GetRandomCompanyProductConfig(string inputData)
{
var timeCalc = DateTime.Now;
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
return "{\"code\":50000,\"msg\":\"用户不存在\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select p.* from bxx.product_com_random p" +
" where 1=1;";
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
if (dt != null)
{
try
{
string product_group = dt.Rows[0]["product_group"].ParseToString();
string product_interval = dt.Rows[0]["product_interval"].ParseToString();
string is_on = dt.Rows[0]["is_on"].ParseToString();
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
return "{\"code\":200,\"msg\":\"success\"" +
",\"product_group\":\"" + product_group + "\"" +
",\"product_interval\":" + product_interval +
",\"is_on\":" + is_on +
",\"seconds\":" + seconds + "}";
}
catch (Exception ex)
{
return "{\"code\":500,\"msg\":\"" + ex.Message + "\"}";
}
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}
@@ -532,6 +532,101 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string SetRandomCompanyProductConfig(string inputData)
{
var timeCalc = DateTime.Now;
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
return "{\"code\":50000,\"msg\":\"用户不存在\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string product_group = RegexUtils.GetStringQuery(ref inputData, "product_group")?.Replace("'", "\\'");
string product_interval = RegexUtils.GetStringQuery(ref inputData, "product_interval")?.Replace("'", "\\'");
string is_on = RegexUtils.GetStringQuery(ref inputData, "is_on")?.Replace("'", "\\'");
string sql = "update wxxd.product_com_random set ";
if (product_group != null)
sql += "product_group='" + product_group + "',";
if (product_interval != null)
sql += "product_interval=" + product_interval + ",";
if (is_on != null)
sql += "is_on=" + is_on + ",";
sql = sql.TrimEnd(',');
sql += " where 1=1;";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":200,\"msg\":\"success\"}";
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string GetRandomCompanyProductConfig(string inputData)
{
var timeCalc = DateTime.Now;
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
return "{\"code\":50000,\"msg\":\"用户不存在\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select p.* from wxxd.product_com_random p" +
" where 1=1;";
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
if (dt != null)
{
try
{
string product_group = dt.Rows[0]["product_group"].ParseToString();
string product_interval = dt.Rows[0]["product_interval"].ParseToString();
string is_on = dt.Rows[0]["is_on"].ParseToString();
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
return "{\"code\":200,\"msg\":\"success\"" +
",\"product_group\":\"" + product_group + "\"" +
",\"product_interval\":" + product_interval +
",\"is_on\":" + is_on +
",\"seconds\":" + seconds + "}";
}
catch (Exception ex)
{
return "{\"code\":500,\"msg\":\"" + ex.Message + "\"}";
}
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXAddMdyAfterSale(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
@@ -504,5 +504,28 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void set_random_company_product_config()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().SetRandomCompanyProductConfig(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_random_company_product_config()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().GetRandomCompanyProductConfig(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
}
}
@@ -134,6 +134,29 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void set_random_company_product_config()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXProductManage().SetRandomCompanyProductConfig(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_random_company_product_config()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXProductManage().GetRandomCompanyProductConfig(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void add_secret_spu_id_shop_id_map()
{
+4 -2
View File
@@ -272,6 +272,10 @@ namespace TemuKJD.BLL.PddApi
return upResult;
}
public static string clientId { get; set; } = "ad502ec19e0c49ab9df14f83494e153c";
public static string clientSecret { get; set; } = "bd52aba51737d03fc073711d386b3b0779d010ad";
/// <summary>
///
/// </summary>
@@ -280,8 +284,6 @@ namespace TemuKJD.BLL.PddApi
/// <returns></returns>
static string PddApiRequest(string type, Dictionary<string,object> dict)
{
string clientId = "ad502ec19e0c49ab9df14f83494e153c";
string clientSecret = "bd52aba51737d03fc073711d386b3b0779d010ad";
if (string.IsNullOrEmpty(type))
return "{\"success\":false, \"error_msg\":\"调用接口不能为空\"}";
+19 -11
View File
@@ -15,12 +15,15 @@ namespace TemuKJD.BLL.PddApi
{
public static void RefreshApi(ShopLoginInfo shop, bool isForceRefresh = false)
{
if (isForceRefresh || shop.AuthAddTime <= DateTime.Now.AddDays(-1))
if (isForceRefresh || (shop.AuthAddTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
{
shop.ApiAuthInfoList.Clear();
var authInfo = PddApiHelper.GetShopPddToken(shop);
shop.ApiAuthInfoList.Add(authInfo);
string errStr = "";
var authInfo = PddApiHelper.GetE57ShopPddToken(shop, out errStr);
if (errStr.IsNullOrEmpty())
{
shop.ApiAuthInfoList.RemoveAll(a => a.AppKey.IsNullOrEmpty() || a.AppKey == PddApi.clientId);
shop.ApiAuthInfoList.Add(authInfo);
}
}
}
@@ -32,14 +35,18 @@ namespace TemuKJD.BLL.PddApi
}
}
public static AuthInfo GetShopPddToken(ShopLoginInfo shop)
public static AuthInfo GetE57ShopPddToken(ShopLoginInfo shop, out string errorStr)
{
errorStr = "";
var url = BaseClass.BuildObjString("shop/e57_get_pdd_shop_token");
var data = UserLogin.GetSignaturex();
data += "&mall_id=" + shop.MallId;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":0"))
{
errorStr = BaseRegex.GetStringJson(ref html, "msg");
if (string.IsNullOrEmpty(errorStr))
errorStr = html;
}
else
{
@@ -47,7 +54,7 @@ namespace TemuKJD.BLL.PddApi
{
ShopId = shop.ShopId,
AddTime = DateTime.Now,
AppKey = BaseRegex.GetStringJson(ref html, "appKey").ParseToString(),
AppKey = PddApi.clientId, // BaseRegex.GetStringJson(ref html, "appKey").ParseToString(),
AccessToken = BaseRegex.GetStringJson(ref html, "accessToken"),
ExpiresTime = BaseClass.StampToDateTime(BaseRegex.GetIntJson(ref html, "tokenExpiresTime")),
ApiAuthStatus = "授权成功",
@@ -57,16 +64,17 @@ namespace TemuKJD.BLL.PddApi
return new AuthInfo() { ShopId = shop.ShopId, AddTime = DateTime.Now, ExpiresTime = DateTime.Now };
}
public static List<List<AuthInfo>> LstAuthInfos;
public static void PddGetLocalTokens()
{
if (BaseClass.MainPath == "binxixi")
{
List<List<AuthInfo>> lsts = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<List<AuthInfo>>>("pdd_shop_api_auth_info_lists");
if (lsts == null)
lsts = new List<List<AuthInfo>>();
LstAuthInfos = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<List<AuthInfo>>>("pdd_shop_api_auth_info_lists");
if (LstAuthInfos == null)
LstAuthInfos = new List<List<AuthInfo>>();
foreach (var shop in GlobalConfig.ShopLoginList)
{
shop.ApiAuthInfoList = lsts.FirstOrDefault(l => l.FirstOrDefault()?.ShopId == shop.ShopId);
shop.ApiAuthInfoList = LstAuthInfos.FirstOrDefault(l => l.FirstOrDefault()?.ShopId == shop.ShopId);
if (shop.ApiAuthInfoList == null)
shop.ApiAuthInfoList = new List<AuthInfo>();
}
+9
View File
@@ -142,6 +142,12 @@
</Compile>
<Compile Include="CookieVisitor.cs" />
<Compile Include="Extension\ControlExtension.cs" />
<Compile Include="PDDForms\AdminForms\RandomComProductForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PDDForms\AdminForms\RandomComProductForm.Designer.cs">
<DependentUpon>RandomComProductForm.cs</DependentUpon>
</Compile>
<Compile Include="PDDForms\ProductSelectForms\PDDGetChanceProdByImgForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -1157,6 +1163,9 @@
<EmbeddedResource Include="ChangeForm.resx">
<DependentUpon>ChangeForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\AdminForms\RandomComProductForm.resx">
<DependentUpon>RandomComProductForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\ProductSelectForms\PDDGetChanceProdByImgForm.resx">
<DependentUpon>PDDGetChanceProdByImgForm.cs</DependentUpon>
</EmbeddedResource>
+9 -5
View File
@@ -39,7 +39,8 @@
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("认领待上传");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("库存上传");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品核价");
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("随机厂商商品");
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
@@ -50,7 +51,8 @@
treeNode8,
treeNode9,
treeNode10,
treeNode11});
treeNode11,
treeNode12});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -163,10 +165,12 @@
treeNode10.Text = "库存上传";
treeNode11.Name = "商品核价";
treeNode11.Text = "商品核价";
treeNode12.Name = "超级权限管理";
treeNode12.Text = "超级权限管理";
treeNode12.Name = "随机厂商商品";
treeNode12.Text = "随机厂商商品";
treeNode13.Name = "超级权限管理";
treeNode13.Text = "超级权限管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode12});
treeNode13});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 446);
this.tv.TabIndex = 1;
@@ -26,6 +26,7 @@ namespace TemuKJD.PDDForms.AdminForms
public Lazy<PDDGetChanceProdForm> getChanceProdForm = new Lazy<PDDGetChanceProdForm>();
public Lazy<PDDGetChanceProdByImgForm> getChanceProdByImgForm = new Lazy<PDDGetChanceProdByImgForm>();
public Lazy<GetJuShuitanProdForm> getJuShuitanProdForm = new Lazy<GetJuShuitanProdForm>();
public Lazy<RandomComProductForm> randomComProductForm = new Lazy<RandomComProductForm>();
//public Lazy<DbPriceMarkUpForm> dbPriceMarkUpForm = new Lazy<DbPriceMarkUpForm>();
//public Lazy<DbProductSelectListManageForm> dbProductSelectListManageForm = new Lazy<DbProductSelectListManageForm>();
//public Lazy<ProductThirdSelectListManageForm> productThirdSelectListManageForm = new Lazy<ProductThirdSelectListManageForm>();
@@ -102,6 +103,9 @@ namespace TemuKJD.PDDForms.AdminForms
case "厂家商品采集":
SetForm(getJuShuitanProdForm.Value);
break;
case "随机厂商商品":
SetForm(randomComProductForm.Value);
break;
//case "选品加价管理":
// SetForm(dbPriceMarkUpForm.Value);
// break;
@@ -0,0 +1,158 @@
namespace TemuKJD.PDDForms.AdminForms
{
partial class RandomComProductForm
{
/// <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()
{
this.components = new System.ComponentModel.Container();
this.chkIsOn = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtProductInterval = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cmbProductGroup = new System.Windows.Forms.ComboBox();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.SuspendLayout();
//
// ucCheckBox1
//
this.chkIsOn.AutoSize = true;
this.chkIsOn.Checked = true;
this.chkIsOn.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkIsOn.Location = new System.Drawing.Point(38, 39);
this.chkIsOn.Name = "ucCheckBox1";
this.chkIsOn.Size = new System.Drawing.Size(147, 21);
this.chkIsOn.TabIndex = 0;
this.chkIsOn.Text = "打开随机厂商商品功能";
this.chkIsOn.UseVisualStyleBackColor = true;
//
// textBox1
//
this.txtProductInterval.Location = new System.Drawing.Point(274, 38);
this.txtProductInterval.Name = "textBox1";
this.txtProductInterval.Size = new System.Drawing.Size(58, 23);
this.txtProductInterval.TabIndex = 1;
this.txtProductInterval.Text = "50";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(218, 41);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 2;
this.label1.Text = "随机间隔";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(378, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 4;
this.label2.Text = "随机分组";
//
// comboBox1
//
this.cmbProductGroup.FormattingEnabled = true;
this.cmbProductGroup.Location = new System.Drawing.Point(434, 37);
this.cmbProductGroup.Name = "comboBox1";
this.cmbProductGroup.Size = new System.Drawing.Size(121, 25);
this.cmbProductGroup.TabIndex = 5;
//
// btnSave
//
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(609, 38);
this.btnSave.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(60, 23);
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 = 802;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(375, 200);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 803;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// RandomComProductForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.pbLoading);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.cmbProductGroup);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtProductInterval);
this.Controls.Add(this.chkIsOn);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "RandomComProductForm";
this.Text = "RandomComProductForm";
this.Load += new System.EventHandler(this.RandomComProductForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private UserComponent.UcCheckBox chkIsOn;
private System.Windows.Forms.TextBox txtProductInterval;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbProductGroup;
private DevComponents.DotNetBar.PanelEx btnSave;
private System.Windows.Forms.PictureBox pbLoading;
}
}
@@ -0,0 +1,94 @@
using AllBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.PDDForms.ProductSelectForms;
using Work;
namespace TemuKJD.PDDForms.AdminForms
{
public partial class RandomComProductForm : Form
{
public RandomComProductForm()
{
InitializeComponent();
}
private void RandomComProductForm_Load(object sender, EventArgs e)
{
pbLoading.Visible = true;
Task.Run(() =>
{
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbProductGroup, });
var url = BaseClass.BuildObjString("product/get_random_company_product_config");
var data = UserLogin.GetSignaturex();
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"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
BaseMsgForm.ShowError("获取随机厂商商品配置失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}
else
{
//this.pictureBox2.ImageLocation = imgListForm.SelectDbImgUrl;
//dbProd.sku_img_replace_id = imgListForm.SelectDbImgId;
//dbProd.sku_img_replace_url = imgListForm.SelectDbImgUrl;
Invoke(new Action(() => {
this.txtProductInterval.Text = BaseRegex.GetStringJson(ref html, "product_interval");
this.cmbProductGroup.Text = BaseRegex.GetStringJson(ref html, "product_group");
this.chkIsOn.Checked = BaseRegex.GetStringJson(ref html, "is_on") == "1";
}));
}
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
});
}
private void btnSave_Click(object sender, EventArgs e)
{
pbLoading.Visible = true;
Task.Run(() =>
{
var url = BaseClass.BuildObjString("product/set_random_company_product_config");
var data = UserLogin.GetSignaturex();
Invoke(new Action(() =>
{
data += "&product_interval=" + txtProductInterval.Text.Trim();
data += "&product_group=" + cmbProductGroup.Text.Trim();
data += "&is_on=" + (chkIsOn.Checked ? 1 : 0);
}));
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"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
BaseMsgForm.ShowError("配置随机厂商商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}
else
{
BaseMsgForm.ShowInfo("配置随机厂商商品成功");
}
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
});
}
}
}
@@ -0,0 +1,120 @@
<?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>
</root>
@@ -29,6 +29,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void PDDDBProdUserSelectCacheForm_Load(object sender, EventArgs e)
{
if (BaseClass.MainPath == "binxixi")
{
dgvSelectProduct.Columns["colBound"].Visible = false;
}
dgvSelectProduct.AddSelectorColumn("colCheck");
dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
@@ -30,15 +30,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtAddShippingFeeTimes = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.btnApiUpload = new DevComponents.DotNetBar.PanelEx();
@@ -207,7 +208,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1523, 546);
this.splitContainer1.Size = new System.Drawing.Size(1571, 546);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 11;
//
@@ -218,6 +219,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.chkRandomCompanyProd);
this.ucGroupBoxEx2.Controls.Add(this.txtAddShippingFeeTimes);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload);
@@ -268,11 +270,23 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(459, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 140);
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1110, 140);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
// chkRandomCompanyProd
//
this.chkRandomCompanyProd.Checked = true;
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkRandomCompanyProd.Location = new System.Drawing.Point(846, 111);
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21);
this.chkRandomCompanyProd.TabIndex = 808;
this.chkRandomCompanyProd.Text = "随机工厂商品";
this.chkRandomCompanyProd.UseVisualStyleBackColor = true;
this.chkRandomCompanyProd.Visible = false;
//
// txtAddShippingFeeTimes
//
this.txtAddShippingFeeTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -302,9 +316,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnApiUpload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnApiUpload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnApiUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnApiUpload.Location = new System.Drawing.Point(965, 40);
this.btnApiUpload.Location = new System.Drawing.Point(1031, 40);
this.btnApiUpload.Name = "btnApiUpload";
this.btnApiUpload.Size = new System.Drawing.Size(84, 23);
this.btnApiUpload.Size = new System.Drawing.Size(66, 23);
this.btnApiUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnApiUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnApiUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -327,9 +341,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpload.Location = new System.Drawing.Point(965, 81);
this.btnUpload.Location = new System.Drawing.Point(1031, 81);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(84, 23);
this.btnUpload.Size = new System.Drawing.Size(66, 23);
this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -349,7 +363,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(944, 43);
this.label7.Location = new System.Drawing.Point(992, 43);
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(20, 17);
@@ -359,7 +373,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtWaitSeconds
//
this.txtWaitSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtWaitSeconds.Location = new System.Drawing.Point(912, 40);
this.txtWaitSeconds.Location = new System.Drawing.Point(960, 40);
this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtWaitSeconds.Name = "txtWaitSeconds";
this.txtWaitSeconds.Size = new System.Drawing.Size(32, 23);
@@ -371,7 +385,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(858, 43);
this.label6.Location = new System.Drawing.Point(906, 43);
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
@@ -476,10 +490,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStop.Location = new System.Drawing.Point(965, 110);
this.btnStop.Location = new System.Drawing.Point(1031, 110);
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(84, 23);
this.btnStop.Size = new System.Drawing.Size(66, 23);
this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -671,7 +685,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearDgv.Location = new System.Drawing.Point(879, 110);
this.btnClearDgv.Location = new System.Drawing.Point(944, 110);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(84, 23);
@@ -918,7 +932,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkChance.AutoSize = true;
this.chkChance.Checked = true;
this.chkChance.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkChance.Location = new System.Drawing.Point(968, 17);
this.chkChance.Location = new System.Drawing.Point(1020, 17);
this.chkChance.Name = "chkChance";
this.chkChance.Size = new System.Drawing.Size(87, 21);
this.chkChance.TabIndex = 556;
@@ -1066,6 +1080,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(92, 25);
this.cmbSourceType.TabIndex = 671;
this.cmbSourceType.Text = "厂商直采";
//
// label8
//
@@ -1339,7 +1354,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1523, 402);
this.splitContainer3.Size = new System.Drawing.Size(1571, 402);
this.splitContainer3.SplitterDistance = 372;
this.splitContainer3.TabIndex = 1;
//
@@ -1363,7 +1378,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1523, 372);
this.splitContainer2.Size = new System.Drawing.Size(1571, 372);
this.splitContainer2.SplitterDistance = 326;
this.splitContainer2.TabIndex = 0;
//
@@ -1383,19 +1398,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1512,7 +1527,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtTest20981
//
this.txtTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTest20981.Location = new System.Drawing.Point(970, 30);
this.txtTest20981.Location = new System.Drawing.Point(1018, 30);
this.txtTest20981.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtTest20981.Name = "txtTest20981";
this.txtTest20981.Size = new System.Drawing.Size(127, 23);
@@ -1525,7 +1540,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnTest20981.CanvasColor = System.Drawing.SystemColors.Control;
this.btnTest20981.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnTest20981.DisabledBackColor = System.Drawing.Color.Empty;
this.btnTest20981.Location = new System.Drawing.Point(1101, 30);
this.btnTest20981.Location = new System.Drawing.Point(1149, 30);
this.btnTest20981.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnTest20981.Name = "btnTest20981";
this.btnTest20981.Size = new System.Drawing.Size(84, 23);
@@ -1550,7 +1565,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(571, 161);
this.pbLoading.Location = new System.Drawing.Point(595, 161);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1562,19 +1577,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle24.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle24;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle25;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1605,7 +1620,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1189, 372);
this.dgvSelectProduct.Size = new System.Drawing.Size(1237, 372);
this.dgvSelectProduct.TabIndex = 187;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
@@ -1636,8 +1651,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colSupplierName
//
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle26;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -1715,8 +1730,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colProductName
//
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle27;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1776,8 +1791,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colAddTime
//
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle28;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle7;
this.colAddTime.FillWeight = 80F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
@@ -1805,8 +1820,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1523, 26);
this.splitContainer4.SplitterDistance = 832;
this.splitContainer4.Size = new System.Drawing.Size(1571, 26);
this.splitContainer4.SplitterDistance = 880;
this.splitContainer4.TabIndex = 3;
//
// statusBar
@@ -1817,7 +1832,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(832, 26);
this.statusBar.Size = new System.Drawing.Size(880, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
@@ -2057,5 +2072,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.Label label12;
private System.Windows.Forms.PictureBox pbShopLoading;
private DevComponents.DotNetBar.PanelEx btnProdDb;
private UserComponent.UcCheckBox chkRandomCompanyProd;
}
}
@@ -187,7 +187,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
IsLoadComplate = true;
}
// 测试全局access_token
// 测试全局access_token 测试用,目前作废
void InitPddToken()
{
return;
@@ -5988,8 +5988,8 @@ Content-Type: image/jpeg
var selectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(prod));
selectProd.out_product_Id = prod.id.ToString();
selectProd.id = 1;
if(lstTemuDBProductSelect.Count > 0)
selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1;
if (lstTemuDBProductSelect.Count > 0)
selectProd.id = lstTemuDBProductSelect.Max(p => p.id).ParseToInt() + 1;
this.lstTemuDBProductSelect.Add(selectProd);
Invoke(new Action(() =>
@@ -6067,7 +6067,7 @@ Content-Type: image/jpeg
try
{
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd);
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x => Randomx.GetId(999999)).ToList();
return list;
}
catch (Exception ex)
@@ -6076,6 +6076,67 @@ Content-Type: image/jpeg
}
}
/// <summary>
/// 随机添加黄总厂商商品(或其他指定分组产品,由服务端控制)
/// </summary>
/// <param name="totalCount"></param>
/// <param name="page"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
public List<KJDDBProduct> GetRandomCompanyProductList(out int totalCount, string groupName = "黄总数据包", int page = 1, int pageSize = 200)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
List<KJDDBProduct> list = new List<KJDDBProduct>();
int pageCount = 1;
totalCount = 0;
var url = BaseClass.BuildObjString("product/get_product_list_random");
var data = "";
Invoke(new Action(() =>
{
data = UserLogin.GetSignaturex() +
"&page=" + 1 +
"&page_size=" + pageSize;
data += "&in_groups=" + groupName;
}));
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"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("获取商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}));
return new List<KJDDBProduct>();
}
int count = BaseRegex.GetIntJson(ref html, "count");
totalCount = count;
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
var jArr = JObject.Parse(html)["data"];
if (jArr.Count() == 0)
return list;
var sProd = JsonHelper.SerializeObject(jArr);
try
{
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x=> Randomx.GetId(999999)).ToList();
return list;
}
catch (Exception ex)
{
return new List<KJDDBProduct>();
}
}
private void btnClearUpload_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定清空待上传商品吗?清空后不可恢复!").DialogResult == DialogResult.Cancel)
@@ -6083,7 +6144,7 @@ Content-Type: image/jpeg
this.lstTemuDBProductSelect.Clear();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
}
private void lblNewAddPrice_Click(object sender, EventArgs e)
@@ -6675,13 +6736,27 @@ Content-Type: image/jpeg
}
this.btnUpload.Enabled = false;
this.btnApiUpload.Enabled = false;
Task.Run(() =>
{
Thread.Sleep(10000);
Invoke(new Action(() => {
this.btnUpload.Enabled = true;
this.btnApiUpload.Enabled = true;
}));
});
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
// 随机店铺并分配商品
try
{
GetShopAndUpProduct();
GetShopAndUpProduct(cancellationTokenSource.Token);
}
catch (Exception ex)
{
@@ -6689,16 +6764,34 @@ Content-Type: image/jpeg
}
Invoke(new Action(() =>
{
if (!cancellationTokenSource.Token.IsCancellationRequested)
BaseMsgForm.ShowConfirm("上传完成");
this.btnUpload.Enabled = true;
}));
}, cancellationTokenSource.Token);
}
void GetShopAndUpProduct()
void GetShopAndUpProduct(CancellationToken token)
{
NaiBa.Util.ConcurrentList<ShopLoginInfo> currentUpShopLst = new NaiBa.Util.ConcurrentList<ShopLoginInfo>();
// 随机厂商商品
var url = BaseClass.BuildObjString("product/get_random_company_product_config");
var data = UserLogin.GetSignaturex();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
chkRandomCompanyProd.Checked = BaseRegex.GetStringJson(ref html, "is_on") == "1";
int randomComProdInterval = Math.Max(1, BaseRegex.GetIntJson(ref html, "product_interval"));
string randomComProdGroup = BaseRegex.GetStringJson(ref html, "product_group");
int waitCompanyProdCnt = 0;
List<TemuDBProductSelect> CompanyProdLst = new List<TemuDBProductSelect>();
while (lstTemuDBProductSelect.Count > 0)
{
if (token.IsCancellationRequested)
break;
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (shopIdLst.Count <= 0)
@@ -6727,10 +6820,39 @@ Content-Type: image/jpeg
currentUpShopLst.Add(canUpShop);
// 每次挑选列表第一件商品
var selectProd = lstTemuDBProductSelect.FirstOrDefault();
var selectProd = lstTemuDBProductSelect.FirstOrDefault();
selectProd.shop_id = canUpShop.ShopId;
selectProd.shop_account = canUpShop.ShopAccount;
lstTemuDBProductSelect.Remove(selectProd);
// 每若干个个商品插一件黄总商品包或其他组商品
waitCompanyProdCnt++;
if (chkRandomCompanyProd.Checked && waitCompanyProdCnt > randomComProdInterval)
{
waitCompanyProdCnt = 0;
if (CompanyProdLst.Count == 0)
{
int dbCompanyProdCount;
var dbComProdLst = GetRandomCompanyProductList(out dbCompanyProdCount, randomComProdGroup);
foreach (var comProd in dbComProdLst)
{
var comSelectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(comProd));
comSelectProd.out_product_Id = comProd.id.ToString();
comSelectProd.id = 1;
if (CompanyProdLst.Count > 0)
comSelectProd.id = CompanyProdLst.Max(p => p.id).ParseToInt() + 1;
CompanyProdLst.Add(comSelectProd);
}
}
selectProd = CompanyProdLst.FirstOrDefault();
selectProd.shop_id = canUpShop.ShopId;
selectProd.shop_account = canUpShop.ShopAccount;
CompanyProdLst.Remove(selectProd);
}
else
{
lstTemuDBProductSelect.Remove(selectProd);
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
Invoke(new Action(() =>
{
@@ -6787,7 +6909,7 @@ Content-Type: image/jpeg
// 接口上传
try
{
result = ApiUploadProduct(canUpShop, selectProd, row);
result = ApiUploadProduct(canUpShop, selectProd, row, token);
}
catch (Exception ex)
{
@@ -6816,7 +6938,7 @@ Content-Type: image/jpeg
selectProd.status = BaseRegex.GetStringJson(ref result, "status");
if (string.IsNullOrWhiteSpace(selectProd.status))
selectProd.status = "待上传";
var goodsId = BaseRegex.GetStringJson(ref result, "goodsId");
var goodsId = BaseRegex.GetStringJson(ref result, "goods_id");
Invoke(new Action(() =>
{
@@ -6842,9 +6964,17 @@ Content-Type: image/jpeg
}, cancellationTokenSource.Token);
}
if (token.IsCancellationRequested)
BaseMsgForm.ShowConfirm("上传终止,正在上传的商品将继续上传");
while (currentUpShopLst.Count > 0)
{
Thread.Sleep(1000);
}
}
string ApiUploadProduct(ShopLoginInfo shop, TemuDBProductSelect selectProd, DataGridViewRow row)
string ApiUploadProduct(ShopLoginInfo shop, TemuDBProductSelect selectProd, DataGridViewRow row, CancellationToken token)
{
DataGridViewCell cell = row.Cells["colOpResult"];
Invoke(new Action(() =>
@@ -6891,7 +7021,7 @@ Content-Type: image/jpeg
// 主图
int cnt = 0;
string carousel_gallery = "";
foreach (var img in prodInfo.detail.galleries.Where(g => g.type ==1).ToList())
foreach (var img in prodInfo.detail.galleries.Where(g => g.type == 1).ToList())
{
cnt++;
Invoke(new Action(() =>
@@ -7055,6 +7185,9 @@ Content-Type: image/jpeg
foreach (var propApiInfo in apiCatRuleInfo.properties)
{
if (propApiInfo.name == "成分含量")
{
}
if (propApiInfo.required == true && !propParamLst.Any(p => p.ref_pid == propApiInfo.ref_pid))
{
var contentOther = propApiInfo.values?.FirstOrDefault(c => c.value == "其他");
@@ -7071,7 +7204,7 @@ Content-Type: image/jpeg
if (contentValue != null)
{
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
propParam.values = new List<ApiPddPropertyValue>() { contentOther };
propParam.values = new List<ApiPddPropertyValue>() { contentValue };
propParamLst.Add(propParam);
}
}
@@ -7087,6 +7220,8 @@ Content-Type: image/jpeg
foreach (var pp in propParamLst)
{
var pv = pp.values.FirstOrDefault();
if (pv == null)
continue;
var value_unit = pp.value_unit.FirstOrDefault().ParseToString();
var str = "{\"ref_pid\":" + pp.ref_pid + ",\"vid\":" + pv.vid + ",\"value\":\"" + pv.value + "\",\"value_unit\":\"" + value_unit + "\"},";
string temp = BaseRegex.GetMatchRegexString(ref str, @"(\d{2,4}-\d{1,2}-\d{1,2})"); // 如果有时间替换成最新的
@@ -7110,9 +7245,13 @@ Content-Type: image/jpeg
// 厂商直采获取推单运费模板
#region 厂商直采获取推单运费模板,计算运费加价。
//Invoke(new Action(() =>
//{
// cell.Value = "正在选取运费模板";
//}));
Invoke(new Action(() =>
{
//cell.Value = "正在选取运费模板";
cell.Value = "正在计算加价";
}));
var shippingTemplateJson = "";
@@ -7287,8 +7426,15 @@ Content-Type: image/jpeg
specNameDic[parent_spec_id] = parent_spec_name;
}
Dictionary<string, long?> specNameIdMapDic = new Dictionary<string, long?>();
for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
{
Invoke(new Action(() =>
{
cell.Value = "正在生成Sku规格 " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
}));
for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
{
var specInfo = addPriceSkuInfoLst[i].spec[j];
@@ -7304,19 +7450,26 @@ Content-Type: image/jpeg
parent_id = specNameDic.ToList()[j].Key;
specInfo.parent_id = parent_id;
PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
if (specNameIdMapDic.Keys.Contains(specInfo.spec_name + specInfo.parent_name))
{
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = PddGoodsSpecIdGetApiRst;
return "Sku属性生成失败 " + errMsg;
specInfo.spec_id = specNameIdMapDic[specInfo.spec_name + specInfo.parent_name];
}
else
{
PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
{
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = PddGoodsSpecIdGetApiRst;
return "Sku属性生成失败 " + errMsg;
}
specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
specNameIdMapDic[specInfo.spec_name + specInfo.parent_name] = specInfo.spec_id;
}
specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
}
}
}
@@ -7327,7 +7480,7 @@ Content-Type: image/jpeg
{
Invoke(new Action(() =>
{
cell.Value = "正在生成Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
cell.Value = "正在拼接Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
}));
string spec = "";
@@ -7736,20 +7889,41 @@ Content-Type: image/jpeg
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
foreach (var shop in GlobalConfig.ShopLoginList)
{
Invoke(new Action(() =>
if (isForceRefresh || (shop.AuthAddTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
{
shop.Message = "";
BindShop(shop, selectIds);
}));
PddApiHelper.RefreshApi(shop, isForceRefresh);
Invoke(new Action(() =>
{
shop.Message = "授权更新完成";
BindShop(shop, selectIds);
}));
Invoke(new Action(() =>
{
shop.Message = "";
BindShop(shop, selectIds);
}));
PddApiHelper.RefreshApi(shop, isForceRefresh);
Invoke(new Action(() =>
{
shop.Message = "授权更新完成";
BindShop(shop, selectIds);
}));
}
}
List<List<AuthInfo>> lsts = GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", lsts);
List<List<AuthInfo>> NewApiInfolsts = JsonHelper.DeserializeJsonToList<List<AuthInfo>>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList()));
foreach (var newLst in NewApiInfolsts)
{
if (newLst.FirstOrDefault()!= null)
{
var oldApiAuths = PddApiHelper.LstAuthInfos.FirstOrDefault(oldLst => oldLst.FirstOrDefault()?.ShopId == newLst.FirstOrDefault().ShopId);
if (oldApiAuths != null)
{
oldApiAuths.Clear();
oldApiAuths.AddRange(newLst);
}
else
{
PddApiHelper.LstAuthInfos.Add(newLst);
}
}
}
PddApiHelper.LstAuthInfos = PddApiHelper.LstAuthInfos.Where(a => a.OrderBy(o => o.AddTime).LastOrDefault().AddTime > DateTime.Now.AddDays(-30)).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", PddApiHelper.LstAuthInfos);
Invoke(new Action(() => { pbShopLoading.Visible = false; }));
});
}
+74 -42
View File
@@ -39,6 +39,7 @@
this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx();
this.btnCheck = new TemuKJD.UserControls.ButtonEx();
this.panel4 = new System.Windows.Forms.Panel();
this.btnOpenOrder = new TemuKJD.UserControls.ButtonEx();
this.chkUsePddWorkbanch = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.cmbNotes = new System.Windows.Forms.ComboBox();
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
@@ -54,8 +55,6 @@
this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMallId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -70,6 +69,7 @@
this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBuyApi = new System.Windows.Forms.DataGridViewLinkColumn();
this.colBindApi = new System.Windows.Forms.DataGridViewLinkColumn();
this.colGotoShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.colShopOperate = new System.Windows.Forms.DataGridViewLinkColumn();
this.colRelogin = new System.Windows.Forms.DataGridViewLinkColumn();
@@ -81,6 +81,8 @@
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -146,9 +148,9 @@
this.panel5.Controls.Add(this.btnRefreshShop);
this.panel5.Controls.Add(this.btnLoginSelect);
this.panel5.Controls.Add(this.btnCheck);
this.panel5.Location = new System.Drawing.Point(1032, 3);
this.panel5.Location = new System.Drawing.Point(1044, 3);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(229, 40);
this.panel5.Size = new System.Drawing.Size(217, 40);
this.panel5.TabIndex = 1;
//
// btnRefreshShop
@@ -158,7 +160,7 @@
this.btnRefreshShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.ForeColor = System.Drawing.Color.White;
this.btnRefreshShop.Location = new System.Drawing.Point(21, 9);
this.btnRefreshShop.Location = new System.Drawing.Point(7, 9);
this.btnRefreshShop.Margin = new System.Windows.Forms.Padding(2);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(66, 26);
@@ -174,7 +176,7 @@
this.btnLoginSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginSelect.ForeColor = System.Drawing.Color.White;
this.btnLoginSelect.Location = new System.Drawing.Point(162, 9);
this.btnLoginSelect.Location = new System.Drawing.Point(148, 9);
this.btnLoginSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginSelect.Name = "btnLoginSelect";
this.btnLoginSelect.Size = new System.Drawing.Size(66, 26);
@@ -190,7 +192,7 @@
this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCheck.ForeColor = System.Drawing.Color.White;
this.btnCheck.Location = new System.Drawing.Point(92, 9);
this.btnCheck.Location = new System.Drawing.Point(78, 9);
this.btnCheck.Margin = new System.Windows.Forms.Padding(2);
this.btnCheck.Name = "btnCheck";
this.btnCheck.Size = new System.Drawing.Size(66, 26);
@@ -201,6 +203,7 @@
//
// panel4
//
this.panel4.Controls.Add(this.btnOpenOrder);
this.panel4.Controls.Add(this.chkUsePddWorkbanch);
this.panel4.Controls.Add(this.cmbNotes);
this.panel4.Controls.Add(this.pnlEmpty);
@@ -215,13 +218,30 @@
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1023, 40);
this.panel4.Size = new System.Drawing.Size(1035, 40);
this.panel4.TabIndex = 0;
//
// btnOpenOrder
//
this.btnOpenOrder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnOpenOrder.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOpenOrder.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOpenOrder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenOrder.ForeColor = System.Drawing.Color.White;
this.btnOpenOrder.Location = new System.Drawing.Point(933, 9);
this.btnOpenOrder.Margin = new System.Windows.Forms.Padding(2);
this.btnOpenOrder.Name = "btnOpenOrder";
this.btnOpenOrder.Size = new System.Drawing.Size(100, 25);
this.btnOpenOrder.TabIndex = 466;
this.btnOpenOrder.Text = "登录订单系统";
this.btnOpenOrder.UseVisualStyleBackColor = false;
this.btnOpenOrder.Click += new System.EventHandler(this.btnOpenOrder_Click);
//
// chkUsePddWorkbanch
//
this.chkUsePddWorkbanch.AutoSize = true;
this.chkUsePddWorkbanch.Location = new System.Drawing.Point(897, 11);
this.chkUsePddWorkbanch.Location = new System.Drawing.Point(800, 11);
this.chkUsePddWorkbanch.Name = "chkUsePddWorkbanch";
this.chkUsePddWorkbanch.Size = new System.Drawing.Size(128, 21);
this.chkUsePddWorkbanch.TabIndex = 417;
@@ -233,7 +253,7 @@
// cmbNotes
//
this.cmbNotes.FormattingEnabled = true;
this.cmbNotes.Location = new System.Drawing.Point(584, 10);
this.cmbNotes.Location = new System.Drawing.Point(522, 10);
this.cmbNotes.Name = "cmbNotes";
this.cmbNotes.Size = new System.Drawing.Size(120, 25);
this.cmbNotes.TabIndex = 413;
@@ -244,7 +264,7 @@
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlEmpty.Location = new System.Drawing.Point(786, 9);
this.pnlEmpty.Location = new System.Drawing.Point(718, 9);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(66, 26);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -270,7 +290,7 @@
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.Location = new System.Drawing.Point(715, 9);
this.btnSearch.Location = new System.Drawing.Point(647, 9);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(66, 26);
@@ -282,7 +302,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(525, 14);
this.label4.Location = new System.Drawing.Point(462, 14);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(68, 17);
this.label4.TabIndex = 377;
@@ -290,7 +310,7 @@
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(402, 11);
this.txtShopName.Location = new System.Drawing.Point(352, 11);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(110, 23);
this.txtShopName.TabIndex = 374;
@@ -298,7 +318,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(354, 14);
this.label3.Location = new System.Drawing.Point(304, 14);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 375;
@@ -306,7 +326,7 @@
//
// txtShopId
//
this.txtShopId.Location = new System.Drawing.Point(232, 11);
this.txtShopId.Location = new System.Drawing.Point(194, 11);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(110, 23);
this.txtShopId.TabIndex = 372;
@@ -314,7 +334,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(184, 14);
this.label2.Location = new System.Drawing.Point(146, 14);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 17);
this.label2.TabIndex = 373;
@@ -438,6 +458,7 @@
this.colChatAccount,
this.colLoginStatus,
this.colBuyApi,
this.colBindApi,
this.colGotoShop,
this.colShopOperate,
this.colRelogin,
@@ -459,31 +480,6 @@
this.dgvShop.TabIndex = 5;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, -1);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1264, 29);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -586,6 +582,15 @@
this.colBuyApi.Name = "colBuyApi";
this.colBuyApi.ReadOnly = true;
//
// colBindApi
//
this.colBindApi.FillWeight = 46F;
this.colBindApi.HeaderText = "绑定授权";
this.colBindApi.Name = "colBindApi";
this.colBindApi.ReadOnly = true;
this.colBindApi.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colBindApi.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colGotoShop
//
this.colGotoShop.FillWeight = 46F;
@@ -686,6 +691,31 @@
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, -1);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1264, 29);
this.statusBar.TabIndex = 1;
//
// PDDShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -761,6 +791,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
private System.Windows.Forms.DataGridViewLinkColumn colBuyApi;
private System.Windows.Forms.DataGridViewLinkColumn colBindApi;
private System.Windows.Forms.DataGridViewLinkColumn colGotoShop;
private System.Windows.Forms.DataGridViewLinkColumn colShopOperate;
private System.Windows.Forms.DataGridViewLinkColumn colRelogin;
@@ -772,5 +803,6 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
public UserControls.ButtonEx btnOpenOrder;
}
}
+35 -3
View File
@@ -22,6 +22,7 @@ using NaiBa.Util;
using System.Globalization;
using TemuKJD.BLL;
using System.Diagnostics;
using TemuKJD.BLL.PddApi;
//using TemuKJD.PDDForms.AdminForms;
namespace TemuKJD.PDDForms.ShopForms
@@ -58,8 +59,11 @@ namespace TemuKJD.PDDForms.ShopForms
localShop.DbId = serverShop.DbId;
localShop.UserName = serverShop.UserName;
localShop.SubUserName = serverShop.SubUserName;
localShop.ApiAuthInfoList = new List<AuthInfo>();
localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList);
if (serverShop.ApiAuthInfoList != null && serverShop.ApiAuthInfoList.Count > 0)
{
localShop.ApiAuthInfoList = new List<AuthInfo>();
localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList);
}
localShop.BuyApiAuth.AccessToken = serverShop.BuyApiAuth.AccessToken;
localShop.BuyApiAuth.AddTime = serverShop.BuyApiAuth.AddTime;
localShop.BuyApiAuth.AppKey = serverShop.BuyApiAuth.AppKey;
@@ -78,6 +82,7 @@ namespace TemuKJD.PDDForms.ShopForms
GlobalConfig.ShopLoginList.Add(localShop);
}
}
PddApiHelper.PddGetLocalTokens();
}
public static List<ShopLoginInfo> GetServerShop()
@@ -483,6 +488,7 @@ namespace TemuKJD.PDDForms.ShopForms
param.ChatAccount,
"",
"购买授权",
"绑定授权",
"进入",
"检测",
string.IsNullOrWhiteSpace(param.LoginStatus) ? "未登录" : param.LoginStatus.Trim(),
@@ -857,7 +863,18 @@ namespace TemuKJD.PDDForms.ShopForms
{
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/service-detail?detailId=84862";
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
btnRefreshCookie_Click(null, null);
}
break;
case "绑定授权":
{
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/auth?client_id=" + PddApi.clientId + "&redirect_uri=" +
GetHtml.UrlEncodeUtf8("http://po.e57.cn/login") + "?source=pdd_code&response_type=code";
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
btnRefreshCookie_Click(null, null);
@@ -1163,5 +1180,20 @@ function setCookie(name, value, daysToLive, path, domain, secure, httpOnly, same
BaseMsgForm.ShowInfo("您已切换Cookie来源,请重启软件生效!");
NaiBa.Util.Helper.ConfigHelper.SaveConfig("use_pdd_workbanch", chkUsePddWorkbanch.Checked);
}
private void btnOpenOrder_Click(object sender, EventArgs e)
{
ShopLoginInfo shop = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ShopLoginInfo>("pdd_dian_tong_ling_login_info");
if (shop == null)
shop = new ShopLoginInfo();
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.txtUserName.ReadOnly = false;
shopLoginForm.txtPassWord.ReadOnly = false;
shopLoginForm.btnSaveUserInfo.Visible = true;
shopLoginForm.InitUrl = "https://po.e57.cn/login?redirect=%2Findex";
shopLoginForm.Show();
}
}
}
@@ -159,6 +159,9 @@
<metadata name="colBuyApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colBindApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colGotoShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+84 -56
View File
@@ -36,6 +36,10 @@
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
this.btnDel = new DevComponents.DotNetBar.PanelEx();
this.pnlUploadOpBtns = new System.Windows.Forms.Panel();
this.pictureBox9 = new System.Windows.Forms.PictureBox();
this.label6 = new System.Windows.Forms.Label();
this.txtSendPrice = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtSendCount = new System.Windows.Forms.TextBox();
this.btnSendToUpload = new DevComponents.DotNetBar.PanelEx();
this.numMinPrice = new System.Windows.Forms.NumericUpDown();
@@ -64,16 +68,14 @@
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtSendPrice = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.pictureBox9 = new System.Windows.Forms.PictureBox();
this.btnSaveUserInfo = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.pnlMultiLogin.SuspendLayout();
this.pnlUploadOpBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
@@ -87,7 +89,6 @@
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -108,6 +109,7 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.btnSaveUserInfo);
this.splitContainer1.Panel2.Controls.Add(this.pnlUploadOpBtns);
this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain);
this.splitContainer1.Panel2.Controls.Add(this.label2);
@@ -120,7 +122,7 @@
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 = 668;
this.splitContainer1.SplitterDistance = 669;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -244,6 +246,47 @@
this.pnlUploadOpBtns.Size = new System.Drawing.Size(812, 53);
this.pnlUploadOpBtns.TabIndex = 463;
//
// pictureBox9
//
this.pictureBox9.Location = new System.Drawing.Point(586, 27);
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(24, 24);
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox9.TabIndex = 494;
this.pictureBox9.TabStop = false;
this.pictureBox9.Tag = "11";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(699, 6);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(20, 17);
this.label6.TabIndex = 493;
this.label6.Text = "元";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSendPrice
//
this.txtSendPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtSendPrice.Location = new System.Drawing.Point(668, 3);
this.txtSendPrice.Name = "txtSendPrice";
this.txtSendPrice.Size = new System.Drawing.Size(31, 23);
this.txtSendPrice.TabIndex = 492;
this.txtSendPrice.Text = "20";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(613, 6);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 491;
this.label5.Text = "提交价格";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSendCount
//
this.txtSendCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -518,7 +561,7 @@
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.Location = new System.Drawing.Point(191, 31);
this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyPassword.Name = "btnCopyPassword";
this.btnCopyPassword.Size = new System.Drawing.Size(57, 25);
@@ -534,7 +577,7 @@
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.Location = new System.Drawing.Point(191, 4);
this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyUserName.Name = "btnCopyUserName";
this.btnCopyUserName.Size = new System.Drawing.Size(57, 25);
@@ -550,7 +593,7 @@
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.PasswordChar = '●';
this.txtPassWord.ReadOnly = true;
this.txtPassWord.Size = new System.Drawing.Size(221, 23);
this.txtPassWord.Size = new System.Drawing.Size(135, 23);
this.txtPassWord.TabIndex = 374;
//
// txtUserName
@@ -559,7 +602,7 @@
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.Size = new System.Drawing.Size(135, 23);
this.txtUserName.TabIndex = 373;
//
// btnStop
@@ -644,46 +687,30 @@
this.txtAddress.TabIndex = 7;
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
//
// label5
// btnSaveUserInfo
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(613, 6);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 491;
this.label5.Text = "提交价格";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSendPrice
//
this.txtSendPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtSendPrice.Location = new System.Drawing.Point(668, 3);
this.txtSendPrice.Name = "txtSendPrice";
this.txtSendPrice.Size = new System.Drawing.Size(31, 23);
this.txtSendPrice.TabIndex = 492;
this.txtSendPrice.Text = "20";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(699, 6);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(20, 17);
this.label6.TabIndex = 493;
this.label6.Text = "元";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// pictureBox9
//
this.pictureBox9.Location = new System.Drawing.Point(586, 27);
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(24, 24);
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox9.TabIndex = 494;
this.pictureBox9.TabStop = false;
this.pictureBox9.Tag = "11";
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(251, 4);
this.btnSaveUserInfo.Name = "btnSaveUserInfo";
this.btnSaveUserInfo.Size = new System.Drawing.Size(88, 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 = 470;
this.btnSaveUserInfo.Text = "保存登录信息";
this.btnSaveUserInfo.Visible = false;
this.btnSaveUserInfo.Click += new System.EventHandler(this.btnSaveUserInfo_Click);
//
// PDDShopLoginForm
//
@@ -707,6 +734,7 @@
this.pnlMultiLogin.ResumeLayout(false);
this.pnlUploadOpBtns.ResumeLayout(false);
this.pnlUploadOpBtns.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
@@ -721,7 +749,6 @@
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
this.ResumeLayout(false);
}
@@ -731,12 +758,6 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnStop;
private UserControls.ButtonEx btnReload;
private System.Windows.Forms.TextBox txtPassWord;
private System.Windows.Forms.TextBox txtUserName;
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;
@@ -767,5 +788,12 @@
private System.Windows.Forms.TextBox txtSendPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.PictureBox pictureBox9;
public System.Windows.Forms.TextBox txtPassWord;
public System.Windows.Forms.TextBox txtUserName;
public System.Windows.Forms.Label label2;
public System.Windows.Forms.Label label1;
public UserControls.ButtonEx btnCopyPassword;
public UserControls.ButtonEx btnCopyUserName;
public DevComponents.DotNetBar.PanelEx btnSaveUserInfo;
}
}
@@ -505,11 +505,40 @@ namespace TemuKJD.PDDForms.ShopForms
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)
@@ -690,9 +719,40 @@ namespace TemuKJD.PDDForms.ShopForms
this.lstShopCompany.Add(sc);
}
}
if (openType == EnumOpenType.manage && string.IsNullOrWhiteSpace(shop.MallId))
{
shop.MallId = BaseRegex.GetStringJson(ref data, "mall_id");
shop.ShopId = BaseRegex.GetStringJson(ref data, "username");
shop.ShopAccount = BaseRegex.GetStringJson(ref data, "mall_name");
var mdyShopUrl = BaseClass.BuildObjString("shop/mdy_shop");
var mdyShopData = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&new_shop_id=" + shop.ShopId
+ "&shop_account=" + shop.ShopAccount
+ "&mall_id=" + shop.MallId;
var result = GetHtml.PostUtf8(mdyShopUrl, mdyShopData);
}
}
});
}
// 有些店铺mall_id未获取,补救(260401,临时,后面等店铺重新登录后就可以移除)
if (url.Contains("https://mms.pinduoduo.com/janus/api/new/userinfo") && responseData.Contains("mall_id"))
{
if (openType == EnumOpenType.manage && string.IsNullOrWhiteSpace(shop.MallId))
{
var data = responseData;
shop.MallId = BaseRegex.GetStringJson(ref data, "mall_id");
shop.ShopId = BaseRegex.GetStringJson(ref data, "username");
var mdyShopUrl = BaseClass.BuildObjString("shop/mdy_shop");
var mdyShopData = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&new_shop_id=" + shop.ShopId
+ "&shop_account=" + shop.ShopAccount
+ "&mall_id=" + shop.MallId;
var result = GetHtml.PostUtf8(mdyShopUrl, mdyShopData);
}
}
//if (responseData.Contains("球球小小店铺55") && responseData.Contains("pdd24873711027"))
//{
@@ -1671,5 +1731,41 @@ function getElementWithText(sText)
BaseMsgForm.ShowError(ex.Message);
}
}
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("pdd_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));
}
});
}
}
}
+15 -11
View File
@@ -34,9 +34,10 @@
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("厂家商品采集");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Sku采集回传");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("1688厂家采集");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("地址管理");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("图片工具");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("随机厂商商品");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("地址管理");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("图片工具");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
@@ -44,7 +45,8 @@
treeNode5,
treeNode6,
treeNode7,
treeNode8});
treeNode8,
treeNode9});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -147,14 +149,16 @@
treeNode5.Text = "Sku采集回传";
treeNode6.Name = "1688厂家采集";
treeNode6.Text = "1688厂家采集";
treeNode7.Name = "地址管理";
treeNode7.Text = "地址管理";
treeNode8.Name = "图片工具";
treeNode8.Text = "图片工具";
treeNode9.Name = "超级权限管理";
treeNode9.Text = "超级权限管理";
treeNode7.Name = "随机厂商商品";
treeNode7.Text = "随机厂商商品";
treeNode8.Name = "地址管理";
treeNode8.Text = "地址管理";
treeNode9.Name = "图片工具";
treeNode9.Text = "图片工具";
treeNode10.Name = "超级权限管理";
treeNode10.Text = "超级权限管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode9});
treeNode10});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 446);
this.tv.TabIndex = 1;
@@ -10,6 +10,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.PDDForms.AdminForms;
using TemuKJD.PDDForms.ProductSelectForms;
using TemuKJD.ToolForms;
@@ -25,6 +26,7 @@ namespace TemuKJD.WXForms.AdminForms
public Lazy<Get1688ProductForm> get1688ProdForm = new Lazy<Get1688ProductForm>();
public Lazy<ImgToolForm> imgToolForm = new Lazy<ImgToolForm>();
public Lazy<GetAddressForm> getAddressForm = new Lazy<GetAddressForm>();
public Lazy<RandomComProductForm> randomComProductForm = new Lazy<RandomComProductForm>();
public WXAdminForm()
{
@@ -100,6 +102,9 @@ namespace TemuKJD.WXForms.AdminForms
case "图片工具":
SetForm(imgToolForm.Value);
break;
case "随机厂商商品":
SetForm(randomComProductForm.Value);
break;
}
//}));
//}).Start();
+106 -91
View File
@@ -32,13 +32,13 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkUseWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -93,23 +93,18 @@ namespace TemuKJD.WXForms.ProductForms
this.chkWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.txtAddCount = new System.Windows.Forms.TextBox();
this.txtSearchGoodsName = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.pbSelectProd = new System.Windows.Forms.PictureBox();
this.cmbSourceType = new System.Windows.Forms.ComboBox();
this.cmbJstInitSet = new System.Windows.Forms.ComboBox();
this.lblSourceType = new System.Windows.Forms.Label();
this.cmbCateFilter3 = new System.Windows.Forms.ComboBox();
this.label21 = new System.Windows.Forms.Label();
this.cmbGroupFilter = new System.Windows.Forms.ComboBox();
this.txtIdFilter = new System.Windows.Forms.TextBox();
this.lblGroupFilter = new System.Windows.Forms.Label();
this.lblIdFilter = new System.Windows.Forms.Label();
this.cmbCateFilter2 = new System.Windows.Forms.ComboBox();
this.label19 = new System.Windows.Forms.Label();
this.btnClearFilter = new DevComponents.DotNetBar.PanelEx();
this.lblGoodsCount = new System.Windows.Forms.Label();
this.cmbWxSafe = new System.Windows.Forms.ComboBox();
this.lblWxSafe = new System.Windows.Forms.Label();
this.btnClearUpload = new DevComponents.DotNetBar.PanelEx();
this.cmbCateFilter1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
@@ -117,7 +112,12 @@ namespace TemuKJD.WXForms.ProductForms
this.btnRandomAdd = new DevComponents.DotNetBar.PanelEx();
this.chkSevenDays = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkSkipQualification = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.lblSourceType = new System.Windows.Forms.Label();
this.lblGroupFilter = new System.Windows.Forms.Label();
this.lblWxSafe = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.lblJstInitSet = new System.Windows.Forms.Label();
this.lblIdFilter = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshAuthor = new DevComponents.DotNetBar.PanelEx();
this.btnSelectOffline = new DevComponents.DotNetBar.PanelEx();
@@ -186,6 +186,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.panel1 = new System.Windows.Forms.Panel();
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -243,6 +244,7 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.chkRandomCompanyProd);
this.ucGroupBoxEx2.Controls.Add(this.chkUseWXComplateProd);
this.ucGroupBoxEx2.Controls.Add(this.chkSaveBound);
this.ucGroupBoxEx2.Controls.Add(this.chkAiShortTitle);
@@ -1023,16 +1025,6 @@ namespace TemuKJD.WXForms.ProductForms
this.txtSearchGoodsName.Size = new System.Drawing.Size(223, 25);
this.txtSearchGoodsName.TabIndex = 795;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(147, 51);
this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(32, 17);
this.label20.TabIndex = 794;
this.label20.Text = "标题";
//
// pbSelectProd
//
this.pbSelectProd.Image = global::TemuKJD.Properties.Resources.loading_blue;
@@ -1081,17 +1073,6 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbJstInitSet.Text = "已设置";
this.cmbJstInitSet.Visible = false;
//
// lblSourceType
//
this.lblSourceType.AutoSize = true;
this.lblSourceType.Location = new System.Drawing.Point(16, 78);
this.lblSourceType.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSourceType.Name = "lblSourceType";
this.lblSourceType.Size = new System.Drawing.Size(32, 17);
this.lblSourceType.TabIndex = 672;
this.lblSourceType.Text = "来源";
this.lblSourceType.Visible = false;
//
// cmbCateFilter3
//
this.cmbCateFilter3.FormattingEnabled = true;
@@ -1130,28 +1111,6 @@ namespace TemuKJD.WXForms.ProductForms
this.txtIdFilter.TabIndex = 652;
this.txtIdFilter.Visible = false;
//
// lblGroupFilter
//
this.lblGroupFilter.AutoSize = true;
this.lblGroupFilter.Location = new System.Drawing.Point(147, 78);
this.lblGroupFilter.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblGroupFilter.Name = "lblGroupFilter";
this.lblGroupFilter.Size = new System.Drawing.Size(32, 17);
this.lblGroupFilter.TabIndex = 570;
this.lblGroupFilter.Text = "分组";
this.lblGroupFilter.Visible = false;
//
// lblIdFilter
//
this.lblIdFilter.AutoSize = true;
this.lblIdFilter.Location = new System.Drawing.Point(27, 104);
this.lblIdFilter.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblIdFilter.Name = "lblIdFilter";
this.lblIdFilter.Size = new System.Drawing.Size(21, 17);
this.lblIdFilter.TabIndex = 651;
this.lblIdFilter.Text = "ID";
this.lblIdFilter.Visible = false;
//
// cmbCateFilter2
//
this.cmbCateFilter2.FormattingEnabled = true;
@@ -1221,16 +1180,6 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbWxSafe.TabIndex = 675;
this.cmbWxSafe.Text = "安全+未校验";
//
// lblWxSafe
//
this.lblWxSafe.AutoSize = true;
this.lblWxSafe.Location = new System.Drawing.Point(4, 50);
this.lblWxSafe.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblWxSafe.Name = "lblWxSafe";
this.lblWxSafe.Size = new System.Drawing.Size(44, 17);
this.lblWxSafe.TabIndex = 674;
this.lblWxSafe.Text = "微安检";
//
// btnClearUpload
//
this.btnClearUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1333,6 +1282,48 @@ namespace TemuKJD.WXForms.ProductForms
this.chkSkipQualification.Text = "跳过资质商品";
this.chkSkipQualification.UseVisualStyleBackColor = true;
//
// lblSourceType
//
this.lblSourceType.AutoSize = true;
this.lblSourceType.Location = new System.Drawing.Point(16, 78);
this.lblSourceType.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSourceType.Name = "lblSourceType";
this.lblSourceType.Size = new System.Drawing.Size(32, 17);
this.lblSourceType.TabIndex = 672;
this.lblSourceType.Text = "来源";
this.lblSourceType.Visible = false;
//
// lblGroupFilter
//
this.lblGroupFilter.AutoSize = true;
this.lblGroupFilter.Location = new System.Drawing.Point(147, 78);
this.lblGroupFilter.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblGroupFilter.Name = "lblGroupFilter";
this.lblGroupFilter.Size = new System.Drawing.Size(32, 17);
this.lblGroupFilter.TabIndex = 570;
this.lblGroupFilter.Text = "分组";
this.lblGroupFilter.Visible = false;
//
// lblWxSafe
//
this.lblWxSafe.AutoSize = true;
this.lblWxSafe.Location = new System.Drawing.Point(4, 50);
this.lblWxSafe.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblWxSafe.Name = "lblWxSafe";
this.lblWxSafe.Size = new System.Drawing.Size(44, 17);
this.lblWxSafe.TabIndex = 674;
this.lblWxSafe.Text = "微安检";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(147, 51);
this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(32, 17);
this.label20.TabIndex = 794;
this.label20.Text = "标题";
//
// lblJstInitSet
//
this.lblJstInitSet.AutoSize = true;
@@ -1344,6 +1335,17 @@ namespace TemuKJD.WXForms.ProductForms
this.lblJstInitSet.Text = "分销";
this.lblJstInitSet.Visible = false;
//
// lblIdFilter
//
this.lblIdFilter.AutoSize = true;
this.lblIdFilter.Location = new System.Drawing.Point(27, 104);
this.lblIdFilter.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblIdFilter.Name = "lblIdFilter";
this.lblIdFilter.Size = new System.Drawing.Size(21, 17);
this.lblIdFilter.TabIndex = 651;
this.lblIdFilter.Text = "ID";
this.lblIdFilter.Visible = false;
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -1741,19 +1743,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1973,19 +1975,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -2046,8 +2048,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -2125,8 +2127,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -2186,8 +2188,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle7;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -2290,6 +2292,18 @@ namespace TemuKJD.WXForms.ProductForms
this.panel1.Size = new System.Drawing.Size(873, 86);
this.panel1.TabIndex = 189;
//
// chkRandomCompanyProd
//
this.chkRandomCompanyProd.Checked = true;
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkRandomCompanyProd.Location = new System.Drawing.Point(856, 110);
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21);
this.chkRandomCompanyProd.TabIndex = 889;
this.chkRandomCompanyProd.Text = "随机工厂商品";
this.chkRandomCompanyProd.UseVisualStyleBackColor = true;
this.chkRandomCompanyProd.Visible = false;
//
// WXDBProdUploadForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -2490,5 +2504,6 @@ namespace TemuKJD.WXForms.ProductForms
private UserComponent.UcCheckBox chkWXComplateProd;
private UserComponent.UcCheckBox chkUseWXComplateProd;
private DevComponents.DotNetBar.PanelEx btnProdDb;
private UserComponent.UcCheckBox chkRandomCompanyProd;
}
}
@@ -814,6 +814,18 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar.UpdateProgressBar(0);
}));
// 随机厂商商品
var url = BaseClass.BuildObjString("product/get_random_company_product_config");
var data = UserLogin.GetSignaturex();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
chkRandomCompanyProd.Checked = BaseRegex.GetStringJson(ref html, "is_on") == "1";
int randomComProdInterval = Math.Max(1, BaseRegex.GetIntJson(ref html, "product_interval"));
string randomComProdGroup = BaseRegex.GetStringJson(ref html, "product_group");
int waitCompanyProdCnt = 0;
List<TemuDBProductSelect> CompanyProdLst = new List<TemuDBProductSelect>();
NaiBa.Util.ConcurrentList<ShopLoginInfo> currentShopList = new NaiBa.Util.ConcurrentList<ShopLoginInfo>();
while (lstTemuDBProductSelect.Count > 0)
{
@@ -884,13 +896,7 @@ namespace TemuKJD.WXForms.ProductForms
currentShopList.Remove(randomShop);
break;
}
var selectProd = lstTemuDBProductSelect[0];
if (randomShop != null)
{
selectProd.shop_id = randomShop.ShopId;
selectProd.shop_account = randomShop.ShopAccount = randomShop.ShopAccount;
}
else
if (randomShop == null)
{
currentShopList.Remove(randomShop);
continue;
@@ -898,7 +904,40 @@ namespace TemuKJD.WXForms.ProductForms
if (cancellationTokenSource.IsCancellationRequested)
break;
lstTemuDBProductSelect.RemoveAt(0);
// 每次挑选列表第一件商品
var selectProd = lstTemuDBProductSelect[0];
selectProd.shop_id = randomShop.ShopId;
selectProd.shop_account = randomShop.ShopAccount;
// 每若干个个商品插一件黄总商品包或其他组商品
waitCompanyProdCnt++;
if (chkRandomCompanyProd.Checked && waitCompanyProdCnt > randomComProdInterval)
{
waitCompanyProdCnt = 0;
if (CompanyProdLst.Count == 0)
{
int dbCompanyProdCount;
var dbComProdLst = GetRandomCompanyProductList(out dbCompanyProdCount, randomComProdGroup);
foreach (var comProd in dbComProdLst)
{
var comSelectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(comProd));
comSelectProd.out_product_Id = comProd.id.ToString();
comSelectProd.id = 1;
if (CompanyProdLst.Count > 0)
comSelectProd.id = CompanyProdLst.Max(p => p.id).ParseToInt() + 1;
CompanyProdLst.Add(comSelectProd);
}
}
selectProd = CompanyProdLst.FirstOrDefault();
selectProd.shop_id = randomShop.ShopId;
selectProd.shop_account = randomShop.ShopAccount;
CompanyProdLst.Remove(selectProd);
}
else
{
lstTemuDBProductSelect.RemoveAt(0);
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect);
Invoke(new Action(() =>
{
@@ -4377,7 +4416,67 @@ namespace TemuKJD.WXForms.ProductForms
try
{
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd);
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x => Randomx.GetId(999999)).ToList();
return list;
}
catch (Exception ex)
{
return new List<KJDDBProduct>();
}
}
/// <summary>
/// 随机添加黄总厂商商品(或其他指定分组产品,由服务端控制)
/// </summary>
/// <param name="totalCount"></param>
/// <param name="page"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
public List<KJDDBProduct> GetRandomCompanyProductList(out int totalCount, string groupName = "黄总数据包", int page = 1, int pageSize = 200)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
List<KJDDBProduct> list = new List<KJDDBProduct>();
int pageCount = 1;
totalCount = 0;
var url = BaseClass.BuildObjString("product/get_pdd_product_list_random");
var data = "";
Invoke(new Action(() =>
{
data = UserLogin.GetSignaturex() +
"&page=" + 1 +
"&page_size=" + pageSize;
data += "&in_groups=" + groupName;
}));
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"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("获取商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}));
return new List<KJDDBProduct>();
}
int count = BaseRegex.GetIntJson(ref html, "count");
totalCount = count;
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
var jArr = JObject.Parse(html)["data"];
if (jArr.Count() == 0)
return list;
var sProd = JsonHelper.SerializeObject(jArr);
try
{
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x => Randomx.GetId(999999)).ToList();
return list;
}
catch (Exception ex)
+5 -5
View File
@@ -404,7 +404,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat3.DropDownWidth = 1;
this.cmbCat3.FormattingEnabled = true;
this.cmbCat3.IntegralHeight = false;
this.cmbCat3.Location = new System.Drawing.Point(883, 5);
this.cmbCat3.Location = new System.Drawing.Point(883, 7);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(201, 25);
@@ -432,7 +432,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat2.DropDownWidth = 1;
this.cmbCat2.FormattingEnabled = true;
this.cmbCat2.IntegralHeight = false;
this.cmbCat2.Location = new System.Drawing.Point(625, 5);
this.cmbCat2.Location = new System.Drawing.Point(625, 7);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(201, 25);
@@ -460,7 +460,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat1.DropDownWidth = 1;
this.cmbCat1.FormattingEnabled = true;
this.cmbCat1.IntegralHeight = false;
this.cmbCat1.Location = new System.Drawing.Point(348, 5);
this.cmbCat1.Location = new System.Drawing.Point(348, 7);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(201, 25);
@@ -520,7 +520,7 @@ namespace TemuKJD.WXForms.ProductForms
"安全+未校验",
"安全商品",
"未校验"});
this.cmbWxSafe.Location = new System.Drawing.Point(71, 40);
this.cmbWxSafe.Location = new System.Drawing.Point(71, 42);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(201, 25);
@@ -541,7 +541,7 @@ namespace TemuKJD.WXForms.ProductForms
"机会商品",
"以图搜品",
"外部数据"});
this.cmbSourceType.Location = new System.Drawing.Point(883, 40);
this.cmbSourceType.Location = new System.Drawing.Point(883, 42);
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(201, 25);
@@ -54,20 +54,31 @@ namespace TemuKJD.WXForms.ProductForms
private void ProductListForm_Load(object sender, EventArgs e)
{
if (BaseClass.MainPath == "binxixi")
{
chkCatBoundLessThan.Visible = false;
chkCatBoundMoreThan.Visible = false;
lblWxSafe.Visible = false;
cmbWxSafe.Visible = false;
tableLayoutPanel1.SetColumn(lblSourceType, 0);
tableLayoutPanel1.SetColumn(cmbSourceType, 1);
dgvDbProduct.Columns["colCatBound"].Visible = false;
dgvDbProduct.Columns["colWxSafe"].Visible = false;
dgvDbProduct.Columns["colMainImg"].FillWeight = 25;
}
Task.Run(() =>
{
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, });
GetPddProductCate();
});
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
{
this.dgvDbProduct.Columns["colPriceText"].Visible = true;
Task.Run(() =>
{
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, });
GetPddProductCate();
});
}
else
{
this.dgvDbProduct.Columns["colPriceText"].Visible = true;
lblGroup.Visible = false;
}
if (BaseClass.MainPath != "binxixi")
@@ -103,7 +114,7 @@ namespace TemuKJD.WXForms.ProductForms
ucSplitPage1.cmbPageSize.DropDownStyle = ComboBoxStyle.DropDownList;
ucSplitPage1.cmbPageSize.SelectedIndex = 0;
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("货源选择"))
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.ParseToString().Contains("货源选择"))
{
lblSourceType.Visible = true;
cmbSourceType.Visible = true;
@@ -773,14 +784,7 @@ namespace TemuKJD.WXForms.ProductForms
private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
{
fillPddCate();
}
else
{
fillWxCate();
}
fillCate();
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采")
{
@@ -816,17 +820,23 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
if (cmbSourceType.Text != "厂商直采")
{
fillPddCate();
}
else
{
fillWxCate();
}
fillCate();
}));
}
public void fillCate()
{
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) &&
cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
{
fillPddCate();
}
else
{
fillWxCate();
}
}
public string pdd_product_cates = "";
void fillPddCate()
{
+1
View File
@@ -491,6 +491,7 @@
this.btnOpenOrder.TabIndex = 465;
this.btnOpenOrder.Text = "登录订单系统";
this.btnOpenOrder.UseVisualStyleBackColor = false;
this.btnOpenOrder.Visible = false;
this.btnOpenOrder.Click += new System.EventHandler(this.btnOpenOrder_Click);
//
// btnAddShop
+1 -1
View File
@@ -89,7 +89,7 @@
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 = 675;
this.splitContainer1.SplitterDistance = 669;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
+131 -216
View File
@@ -54,29 +54,27 @@ namespace TemuKJD.WXForms.TalkForms
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
this.cmbCat3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
this.label17 = new System.Windows.Forms.Label();
this.cmbCat2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
this.label14 = new System.Windows.Forms.Label();
this.cmbCat1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
this.label2 = new System.Windows.Forms.Label();
this.txtProdName = new System.Windows.Forms.TextBox();
this.txtOrderSn = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.lblWxSafe = new System.Windows.Forms.Label();
this.cmbWxSafe = new System.Windows.Forms.ComboBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.dtpStartTime = new System.Windows.Forms.DateTimePicker();
this.dtpEndTime = new System.Windows.Forms.DateTimePicker();
this.txtMobile = new System.Windows.Forms.TextBox();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFromShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFromShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_product_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOrderSn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMainImg = new System.Windows.Forms.DataGridViewImageColumn();
this.colSkuReplaceImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSkuReplaceImg = new System.Windows.Forms.DataGridViewImageColumn();
this.col_spu_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductInfo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRealPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_skc_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMainCate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -102,8 +100,6 @@ namespace TemuKJD.WXForms.TalkForms
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -201,6 +197,7 @@ namespace TemuKJD.WXForms.TalkForms
this.btnSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelect.TabIndex = 647;
this.btnSelect.Text = "添加选中商品";
this.btnSelect.Visible = false;
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
//
// tableLayoutPanel1
@@ -222,18 +219,16 @@ namespace TemuKJD.WXForms.TalkForms
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.txtMobile, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.btnSearch, 8, 0);
this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 9, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbCat3, 7, 0);
this.tableLayoutPanel1.Controls.Add(this.label17, 6, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbCat2, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.label14, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbCat1, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.txtProdName, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.txtOrderSn, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblWxSafe, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.cmbWxSafe, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.dtpEndTime, 7, 0);
this.tableLayoutPanel1.Controls.Add(this.dtpStartTime, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.label14, 6, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.label17, 2, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
@@ -250,9 +245,9 @@ namespace TemuKJD.WXForms.TalkForms
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(868, 5);
this.btnSearch.Location = new System.Drawing.Point(851, 5);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(46, 25);
this.btnSearch.Size = new System.Drawing.Size(65, 25);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -265,7 +260,7 @@ namespace TemuKJD.WXForms.TalkForms
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.TabIndex = 643;
this.btnSearch.Text = "搜索";
this.btnSearch.Text = "搜索订单";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// pnlEmpty
@@ -274,7 +269,7 @@ namespace TemuKJD.WXForms.TalkForms
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlEmpty.Location = new System.Drawing.Point(920, 5);
this.pnlEmpty.Location = new System.Drawing.Point(922, 5);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(46, 25);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -293,98 +288,47 @@ namespace TemuKJD.WXForms.TalkForms
this.pnlEmpty.Text = "清空";
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// cmbCat3
//
this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat3.DefaultText = "全部";
this.cmbCat3.DropDownHeight = 1;
this.cmbCat3.DropDownWidth = 1;
this.cmbCat3.FormattingEnabled = true;
this.cmbCat3.IntegralHeight = false;
this.cmbCat3.Location = new System.Drawing.Point(707, 7);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(155, 25);
this.cmbCat3.TabIndex = 811;
this.cmbCat3.Text = "全部";
this.cmbCat3.SelectedIndexChanged += new System.EventHandler(this.cmbCat3_SelectedIndexChanged);
this.cmbCat3.TextChanged += new System.EventHandler(this.cmbCat3_MultiSelectChanged);
//
// label17
//
this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(656, 9);
this.label17.Location = new System.Drawing.Point(209, 9);
this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(51, 17);
this.label17.Size = new System.Drawing.Size(56, 17);
this.label17.TabIndex = 811;
this.label17.Text = "类目3:";
//
// cmbCat2
//
this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat2.DefaultText = "全部";
this.cmbCat2.DropDownHeight = 1;
this.cmbCat2.DropDownWidth = 1;
this.cmbCat2.FormattingEnabled = true;
this.cmbCat2.IntegralHeight = false;
this.cmbCat2.Location = new System.Drawing.Point(495, 7);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(155, 25);
this.cmbCat2.TabIndex = 804;
this.cmbCat2.Text = "全部";
this.cmbCat2.SelectedIndexChanged += new System.EventHandler(this.cmbCat2_SelectedIndexChanged);
this.cmbCat2.TextChanged += new System.EventHandler(this.cmbCat2_MultiSelectChanged);
this.label17.Text = "手机号:";
//
// label14
//
this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(444, 9);
this.label14.Location = new System.Drawing.Point(633, 9);
this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(51, 17);
this.label14.Size = new System.Drawing.Size(68, 17);
this.label14.TabIndex = 784;
this.label14.Text = "类目2:";
//
// cmbCat1
//
this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat1.DefaultText = "全部";
this.cmbCat1.DropDownHeight = 1;
this.cmbCat1.DropDownWidth = 1;
this.cmbCat1.FormattingEnabled = true;
this.cmbCat1.IntegralHeight = false;
this.cmbCat1.Location = new System.Drawing.Point(283, 7);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(155, 25);
this.cmbCat1.TabIndex = 805;
this.cmbCat1.Text = "全部";
this.cmbCat1.SelectedIndexChanged += new System.EventHandler(this.cmbCat1_SelectedIndexChanged);
this.cmbCat1.TextChanged += new System.EventHandler(this.cmbCat1_MultiSelectChanged);
this.label14.Text = "结束时间:";
//
// label2
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(232, 9);
this.label2.Location = new System.Drawing.Point(415, 9);
this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 17);
this.label2.Size = new System.Drawing.Size(68, 17);
this.label2.TabIndex = 426;
this.label2.Text = "类目1:";
this.label2.Text = "开始时间:";
//
// txtProdName
// txtOrderSn
//
this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtProdName.Location = new System.Drawing.Point(71, 6);
this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtProdName.Name = "txtProdName";
this.txtProdName.Size = new System.Drawing.Size(155, 23);
this.txtProdName.TabIndex = 427;
this.txtOrderSn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtOrderSn.Location = new System.Drawing.Point(59, 6);
this.txtOrderSn.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtOrderSn.Name = "txtOrderSn";
this.txtOrderSn.Size = new System.Drawing.Size(144, 23);
this.txtOrderSn.TabIndex = 427;
//
// label3
//
@@ -393,36 +337,9 @@ namespace TemuKJD.WXForms.TalkForms
this.label3.Location = new System.Drawing.Point(3, 9);
this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 428;
this.label3.Text = "商品标题:";
//
// lblWxSafe
//
this.lblWxSafe.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblWxSafe.AutoSize = true;
this.lblWxSafe.Location = new System.Drawing.Point(3, 44);
this.lblWxSafe.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblWxSafe.Name = "lblWxSafe";
this.lblWxSafe.Size = new System.Drawing.Size(68, 17);
this.lblWxSafe.TabIndex = 651;
this.lblWxSafe.Text = "微信安检:";
//
// cmbWxSafe
//
this.cmbWxSafe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbWxSafe.FormattingEnabled = true;
this.cmbWxSafe.Items.AddRange(new object[] {
"",
"安全+未校验",
"安全商品",
"未校验"});
this.cmbWxSafe.Location = new System.Drawing.Point(71, 42);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(155, 25);
this.cmbWxSafe.TabIndex = 676;
this.cmbWxSafe.Text = "安全+未校验";
this.label3.Text = "订单号:";
//
// splitContainer2
//
@@ -478,15 +395,13 @@ namespace TemuKJD.WXForms.TalkForms
this.dgvDbProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvDbProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.col_db_id,
this.colFromShopId,
this.colFromShopName,
this.col_product_name,
this.colShopId,
this.colShopName,
this.colOrderSn,
this.colImgUrl,
this.colMainImg,
this.colSkuReplaceImgUrl,
this.colSkuReplaceImg,
this.col_spu_id,
this.colProductInfo,
this.colRealPrice,
this.col_skc_id,
this.colMainCate,
this.col_cat_name,
@@ -523,6 +438,56 @@ namespace TemuKJD.WXForms.TalkForms
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll);
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1438, 25);
this.statusBar.TabIndex = 5;
//
// dtpStartTime
//
this.dtpStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.dtpStartTime.Location = new System.Drawing.Point(486, 6);
this.dtpStartTime.Name = "dtpStartTime";
this.dtpStartTime.Size = new System.Drawing.Size(141, 23);
this.dtpStartTime.TabIndex = 812;
//
// dtpEndTime
//
this.dtpEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.dtpEndTime.Location = new System.Drawing.Point(704, 6);
this.dtpEndTime.Name = "dtpEndTime";
this.dtpEndTime.Size = new System.Drawing.Size(141, 23);
this.dtpEndTime.TabIndex = 813;
//
// txtMobile
//
this.txtMobile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtMobile.Location = new System.Drawing.Point(265, 6);
this.txtMobile.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtMobile.Name = "txtMobile";
this.txtMobile.Size = new System.Drawing.Size(144, 23);
this.txtMobile.TabIndex = 428;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -532,36 +497,24 @@ namespace TemuKJD.WXForms.TalkForms
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// col_db_id
// colShopId
//
this.col_db_id.FillWeight = 50F;
this.col_db_id.HeaderText = "数据库Id";
this.col_db_id.Name = "col_db_id";
this.col_db_id.ReadOnly = true;
this.col_db_id.Visible = false;
this.colShopId.HeaderText = "店铺编号";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
//
// colFromShopId
// colShopName
//
this.colFromShopId.HeaderText = "来源店铺Id";
this.colFromShopId.Name = "colFromShopId";
this.colFromShopId.ReadOnly = true;
this.colFromShopId.Visible = false;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
//
// colFromShopName
// colOrderSn
//
this.colFromShopName.HeaderText = "来源店铺名称";
this.colFromShopName.Name = "colFromShopName";
this.colFromShopName.ReadOnly = true;
this.colFromShopName.Visible = false;
//
// col_product_name
//
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_product_name.DefaultCellStyle = dataGridViewCellStyle3;
this.col_product_name.FillWeight = 140F;
this.col_product_name.HeaderText = "标题";
this.col_product_name.Name = "col_product_name";
this.col_product_name.ReadOnly = true;
this.colOrderSn.HeaderText = "订单号";
this.colOrderSn.Name = "colOrderSn";
this.colOrderSn.ReadOnly = true;
//
// colImgUrl
//
@@ -580,32 +533,23 @@ namespace TemuKJD.WXForms.TalkForms
this.colMainImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colMainImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colSkuReplaceImgUrl
// colProductInfo
//
this.colSkuReplaceImgUrl.HeaderText = "sku替换图路径";
this.colSkuReplaceImgUrl.Name = "colSkuReplaceImgUrl";
this.colSkuReplaceImgUrl.ReadOnly = true;
this.colSkuReplaceImgUrl.Visible = false;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductInfo.DefaultCellStyle = dataGridViewCellStyle3;
this.colProductInfo.FillWeight = 140F;
this.colProductInfo.HeaderText = "商品信息";
this.colProductInfo.Name = "colProductInfo";
this.colProductInfo.ReadOnly = true;
//
// colSkuReplaceImg
//
this.colSkuReplaceImg.FillWeight = 70F;
this.colSkuReplaceImg.HeaderText = "sku替换图";
this.colSkuReplaceImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuReplaceImg.Name = "colSkuReplaceImg";
this.colSkuReplaceImg.ReadOnly = true;
this.colSkuReplaceImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuReplaceImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuReplaceImg.Visible = false;
//
// col_spu_id
// colRealPrice
//
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_spu_id.DefaultCellStyle = dataGridViewCellStyle4;
this.col_spu_id.HeaderText = "商品Id";
this.col_spu_id.Name = "col_spu_id";
this.col_spu_id.ReadOnly = true;
this.col_spu_id.Visible = false;
this.colRealPrice.DefaultCellStyle = dataGridViewCellStyle4;
this.colRealPrice.HeaderText = "实收款/优惠信息";
this.colRealPrice.Name = "colRealPrice";
this.colRealPrice.ReadOnly = true;
this.colRealPrice.Visible = false;
//
// col_skc_id
//
@@ -825,31 +769,6 @@ namespace TemuKJD.WXForms.TalkForms
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.col_select_product.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1438, 25);
this.statusBar.TabIndex = 5;
//
// WxOrderListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -890,7 +809,7 @@ namespace TemuKJD.WXForms.TalkForms
private UserControls.UcSplitPage ucSplitPage1;
private UserControls.StatusBarUserControl statusBar;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private System.Windows.Forms.TextBox txtProdName;
private System.Windows.Forms.TextBox txtOrderSn;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private UserComponent.DataGridViewEx dgvDbProduct;
@@ -898,25 +817,21 @@ namespace TemuKJD.WXForms.TalkForms
private DevComponents.DotNetBar.PanelEx btnSearch;
private DevComponents.DotNetBar.PanelEx btnSelect;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblWxSafe;
private System.Windows.Forms.ComboBox cmbWxSafe;
private UserComponent.UcComboBoxMutiSelect cmbCat2;
private System.Windows.Forms.Label label14;
private UserComponent.UcComboBoxMutiSelect cmbCat1;
private DevComponents.DotNetBar.PanelEx btnStopStop;
private System.Windows.Forms.Label label17;
private UserComponent.UcComboBoxMutiSelect cmbCat3;
private System.Windows.Forms.Label lblCurrentShop;
private System.Windows.Forms.DateTimePicker dtpStartTime;
private System.Windows.Forms.DateTimePicker dtpEndTime;
private System.Windows.Forms.TextBox txtMobile;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn col_product_name;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderSn;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
private System.Windows.Forms.DataGridViewImageColumn colMainImg;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuReplaceImgUrl;
private System.Windows.Forms.DataGridViewImageColumn colSkuReplaceImg;
private System.Windows.Forms.DataGridViewTextBoxColumn col_spu_id;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductInfo;
private System.Windows.Forms.DataGridViewTextBoxColumn colRealPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn col_skc_id;
private System.Windows.Forms.DataGridViewTextBoxColumn colMainCate;
private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name;
+1 -5
View File
@@ -107,11 +107,7 @@ namespace TemuKJD.WXForms.TalkForms
private void pnlEmpty_Click(object sender, EventArgs e)
{
this.cmbCat1.Text = "全部";
this.cmbCat2.Text = "全部";
this.cmbCat3.Text = "全部";
this.txtProdName.Text = "";
this.cmbWxSafe.Text = "安全+未校验";
this.txtOrderSn.Text = "";
}
private void cmbCat1_SelectedIndexChanged(object sender, EventArgs e)
+5 -11
View File
@@ -120,16 +120,13 @@
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_db_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colFromShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colShopName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colFromShopName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_product_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colOrderSn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImgUrl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -138,13 +135,10 @@
<metadata name="colMainImg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSkuReplaceImgUrl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colProductInfo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSkuReplaceImg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_spu_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colRealPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_skc_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+1 -15
View File
@@ -94,7 +94,6 @@ namespace TemuKJD.WXForms.TalkForms
this.tabPage2 = new System.Windows.Forms.TabPage();
this.mainPanel = new System.Windows.Forms.Panel();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.panel4 = new System.Windows.Forms.Panel();
this.ColumnShopStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.ColumnShopID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -128,7 +127,6 @@ namespace TemuKJD.WXForms.TalkForms
this.splitContainer3.SuspendLayout();
this.pnlTalk.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// pbLogo
@@ -138,7 +136,7 @@ namespace TemuKJD.WXForms.TalkForms
// lblVersionName
//
this.lblVersionName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVersionName.Location = new System.Drawing.Point(30627, 33);
this.lblVersionName.Location = new System.Drawing.Point(31161, 33);
//
// panel3
//
@@ -1047,7 +1045,6 @@ namespace TemuKJD.WXForms.TalkForms
//
// tabPage3
//
this.tabPage3.Controls.Add(this.panel4);
this.tabPage3.Location = new System.Drawing.Point(2, 35);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
@@ -1056,15 +1053,6 @@ namespace TemuKJD.WXForms.TalkForms
this.tabPage3.Text = "订单管理";
this.tabPage3.UseVisualStyleBackColor = true;
//
// panel4
//
this.panel4.BackColor = System.Drawing.Color.White;
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(985, 573);
this.panel4.TabIndex = 0;
//
// ColumnShopStatus
//
this.ColumnShopStatus.HeaderText = "登录状态";
@@ -1180,7 +1168,6 @@ namespace TemuKJD.WXForms.TalkForms
this.pnlTalk.ResumeLayout(false);
this.pnlTalk.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -1257,6 +1244,5 @@ namespace TemuKJD.WXForms.TalkForms
private DevComponents.DotNetBar.Controls.ProgressBarX progressBarX1;
private System.Windows.Forms.Label lblProgress;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Panel panel4;
}
}
+6 -1
View File
@@ -108,6 +108,11 @@ namespace TemuKJD.WXForms.TalkForms
lblProgress.Text = "";
//SetTitle();
#if DEBUG
#else
ucTabControl1.TabPages.Remove(tabPage3);
#endif
// 点击变绿的按钮
LstTagShop = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<string>>("wx_talk_tag_shop_list");
if (LstTagShop == null)
@@ -334,7 +339,7 @@ namespace TemuKJD.WXForms.TalkForms
WxOrderListForm.TopLevel = false;
WxOrderListForm.FormBorderStyle = FormBorderStyle.None;
WxOrderListForm.Dock = DockStyle.Fill;
panel4.Controls.Add(WxOrderListForm);
tabPage3.Controls.Add(WxOrderListForm);
WxOrderListForm.Show();
//var _1688AddressForm = new GetAddressForm() { AddressType = "1688" };