机会商品信息获取功能 70%

This commit is contained in:
wule_5900x committed 2025-12-28 23:46:50 +08:00
1 parent 96ca090fc4
commit dae2bea6ef
11 files changed
+1545 -86

No files matched your search

+7 -1
View File
@@ -432,7 +432,13 @@ namespace TemuKJD.BLL
public static string PDDPostResponse(ShopLoginInfo shop, string _url, string _data, string referer, string AntiContent = null)
{
if (string.IsNullOrEmpty(AntiContent))
AntiContent = "0apAfa5e-wCEXaTg0FNtNj4PklUKt0E_FNynruEIx9qGLdY6b5YUhnqi7QxYqQqi2Ugraphm85CrR0oU0XYn0dYX5dqXqXJnqg8npDTnpTJnpAaX9swaKE20Tbw_yKnoaXIXxHGB_IxWWlIXMnxghvniTodnXt2wcA7sxhbV_CEBcCez4H92maXI2d1qgoYswoG4Mf_ojlph0nGig8nqWzXqwTYh0j4W6jYs6PxHjXvJslpHyXjseoqZhfqdydn5_Jj0g2TPpCaGDgSgL1FT_lZPGmxIq9UXkPCQpBhPtTZaqGAq06gXkNxXZPrXO0gQ4SHl0bZSZth9LG_j0dKS54JX1PCPZM4XObhaxYjH0oMqm06oiXHYmpnOkTbo-z4QlrCxT43eEBgmrk8AvVbKI3FKz-FAL4pwdFveGf5c1JO_csO50lnqQNy9909u6zLUrFMiTy";
{
if (shop.AntiContents == null || shop.AntiContents.Count == 0)
AntiContent = "0apAfa5e-wCEXaTg0FNtNj4PklUKt0E_FNynruEIx9qGLdY6b5YUhnqi7QxYqQqi2Ugraphm85CrR0oU0XYn0dYX5dqXqXJnqg8npDTnpTJnpAaX9swaKE20Tbw_yKnoaXIXxHGB_IxWWlIXMnxghvniTodnXt2wcA7sxhbV_CEBcCez4H92maXI2d1qgoYswoG4Mf_ojlph0nGig8nqWzXqwTYh0j4W6jYs6PxHjXvJslpHyXjseoqZhfqdydn5_Jj0g2TPpCaGDgSgL1FT_lZPGmxIq9UXkPCQpBhPtTZaqGAq06gXkNxXZPrXO0gQ4SHl0bZSZth9LG_j0dKS54JX1PCPZM4XObhaxYjH0oMqm06oiXHYmpnOkTbo-z4QlrCxT43eEBgmrk8AvVbKI3FKz-FAL4pwdFveGf5c1JO_csO50lnqQNy9909u6zLUrFMiTy";
else
AntiContent = shop.AntiContents.FirstOrDefault();
}
string rckk = "Z07QGtUzw1cgd58IPWnC1OAGCW9xcH1m";
string cookies = "";
try
+6 -3
View File
@@ -650,11 +650,11 @@
<Compile Include="PDDForms\ProductSelectForms\PDDDBProdEditForm.Designer.cs">
<DependentUpon>PDDDBProdEditForm.cs</DependentUpon>
</Compile>
<Compile Include="PDDForms\ProductSelectForms\PDDGetChanceProd.cs">
<Compile Include="PDDForms\ProductSelectForms\PDDGetChanceProdForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PDDForms\ProductSelectForms\PDDGetChanceProd.Designer.cs">
<DependentUpon>PDDGetChanceProd.cs</DependentUpon>
<Compile Include="PDDForms\ProductSelectForms\PDDGetChanceProdForm.Designer.cs">
<DependentUpon>PDDGetChanceProdForm.cs</DependentUpon>
</Compile>
<Compile Include="PDDForms\ProductSelectForms\PDDThirdProdSelectAddShopForm.cs">
<SubType>Form</SubType>
@@ -1223,6 +1223,9 @@
<EmbeddedResource Include="PDDForms\ProductSelectForms\PDDDBProdEditForm.resx">
<DependentUpon>PDDDBProdEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\ProductSelectForms\PDDGetChanceProdForm.resx">
<DependentUpon>PDDGetChanceProdForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\ProductSelectForms\PDDThirdProdSelectAddShopForm.resx">
<DependentUpon>PDDThirdProdSelectAddShopForm.cs</DependentUpon>
</EmbeddedResource>
+21 -17
View File
@@ -32,11 +32,12 @@
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("超级用户管理");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("产品数据库");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("SKU替换图");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("选品加价管理");
System.Windows.Forms.TreeNode treeNode6 = 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("超级权限管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("机会商品采集");
System.Windows.Forms.TreeNode treeNode6 = 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();
@@ -143,18 +145,20 @@
treeNode3.Text = "产品数据库";
treeNode4.Name = "SKU替换图";
treeNode4.Text = "SKU替换图";
treeNode5.Name = "选品加价管理";
treeNode5.Text = "选品加价管理";
treeNode6.Name = "认领待上传";
treeNode6.Text = "认领待上传";
treeNode7.Name = "库存上传";
treeNode7.Text = "库存上传";
treeNode8.Name = "商品核价";
treeNode8.Text = "商品核价";
treeNode9.Name = "超级权限管理";
treeNode9.Text = "超级权限管理";
treeNode5.Name = "机会商品采集";
treeNode5.Text = "机会商品采集";
treeNode6.Name = "选品加价管理";
treeNode6.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;
@@ -22,6 +22,7 @@ namespace TemuKJD.PDDForms.AdminForms
public Lazy<PDDAdminShopListForm> adminShopForm = new Lazy<PDDAdminShopListForm>();
public Lazy<PDDDBProdListForm> dbProdListForm = new Lazy<PDDDBProdListForm>();
public Lazy<PDDDBProdImgListForm> dbProdImgListForm = new Lazy<PDDDBProdImgListForm>();
public Lazy<PDDGetChanceProdForm> getChanceProdForm = new Lazy<PDDGetChanceProdForm>();
//public Lazy<DbPriceMarkUpForm> dbPriceMarkUpForm = new Lazy<DbPriceMarkUpForm>();
//public Lazy<DbProductSelectListManageForm> dbProductSelectListManageForm = new Lazy<DbProductSelectListManageForm>();
//public Lazy<ProductThirdSelectListManageForm> productThirdSelectListManageForm = new Lazy<ProductThirdSelectListManageForm>();
@@ -89,6 +90,9 @@ namespace TemuKJD.PDDForms.AdminForms
case "SKU替换图":
SetForm(dbProdImgListForm.Value);
break;
case "机会商品采集":
SetForm(getChanceProdForm.Value);
break;
//case "选品加价管理":
// SetForm(dbPriceMarkUpForm.Value);
// break;
@@ -20,6 +20,7 @@ using TemuKJD.Extension;
using TemuKJD.BaseForms;
using TemuKJD.PDDForms.ShopForms;
using Work;
using NaiBa.Util;
namespace TemuKJD.PDDForms.AdminForms
{
@@ -32,7 +33,7 @@ namespace TemuKJD.PDDForms.AdminForms
set { inst = value; }
}
public static List<ShopLoginInfo> lstAdminShopInfo { get; set; } = new List<ShopLoginInfo>();
public static ConcurrentList<ShopLoginInfo> lstAdminShopInfo { get; set; } = new ConcurrentList<ShopLoginInfo>();
public PDDAdminShopListForm()
{
@@ -2933,7 +2933,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
loginForm = null;
if (pddUploadRule.IsSignActivity && 1 == 1)
if (pddUploadRule.IsSignActivity && 1 == 1 && 1 == 2)
{
Invoke(new Action(() =>
{
@@ -3027,6 +3027,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
loginForm.Close();
loginForm = null;
}));
Thread.Sleep(Randomx.GetId(12000, 15000));
string activityErr = SignActivity(shop, prodParam, sign22347, sign20981, sign23165, sign15996);
@@ -4733,16 +4734,44 @@ Content-Disposition: form-data; name=""pic_operations""
rst = GoodsSubmit(shop, goods_id.ToString(), draftId, "");
}
private string GetChanceGoodsList(ShopLoginInfo shop, string searchWord)
public static string GetChanceGoodsList(ShopLoginInfo shop, string searchWord, List<string> labels = null, int page = 1)
{
//labels
//newinfashion_new 当季新品
//hot_follow 热门跟款
//wide_popular 全网热销
//thousand_rec 潜力商品
//hot_favorites_goods 热门商品
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
//string url = "https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_release";
string url = "https://mms.pinduoduo.com/opportunity-goods/chance-goods/home_list";
//https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_release
string body = @"{""size"":35,""page"":1,""search_word"":""" + searchWord + @"""}";
JObject jObj = new JObject();
jObj["size"] = 35;
jObj["page"] = page;
if (labels != null)
{
JArray lblArr = new JArray();
jObj["labels"] = lblArr;
foreach (var label in labels)
lblArr.Add(label);
}
if (string.IsNullOrEmpty(searchWord))
{
jObj["banner_type"] = 0;
}
else
{
jObj["search_word"] = searchWord;
}
//全网热销/不搜索 string body = @"{""size"":35,""page"":1,""labels"":[""wide_popular""],""banner_type"":0}";
//不限/搜索 string body = @"{""size"":35,""page"":1,""search_word"":""" + searchWord + @"""}";
string body = JsonHelper.SerializeObject(jObj);
string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?search_word=" + GetHtml.UrlEncodeUtf8(searchWord) +
"&sourcePage=goodsListTopButton";
if (string.IsNullOrEmpty(searchWord))
refere = "https://mms.pinduoduo.com/goods/goods_list/chance?sourcePage=goodsListTopButton";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
{
@@ -1,40 +0,0 @@
namespace TemuKJD.PDDForms.ProductSelectForms
{
partial class PDDGetChanceProd
{
/// <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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "PDDGetChanceProd";
}
#endregion
}
}
@@ -1,20 +0,0 @@
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;
namespace TemuKJD.PDDForms.ProductSelectForms
{
public partial class PDDGetChanceProd : Form
{
public PDDGetChanceProd()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,824 @@
namespace TemuKJD.PDDForms.ProductSelectForms
{
partial class PDDGetChanceProdForm
{
/// <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();
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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtSearchCount = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.cmbSearchLabel = new System.Windows.Forms.ComboBox();
this.btnAddToDb = new DevComponents.DotNetBar.PanelEx();
this.btnGetDetail = new DevComponents.DotNetBar.PanelEx();
this.txtShopId = new System.Windows.Forms.TextBox();
this.txtSearchChance = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnEmpty = new DevComponents.DotNetBar.PanelEx();
this.txtShopName = new System.Windows.Forms.TextBox();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
this.txtNotes = new System.Windows.Forms.TextBox();
this.lblGroupFilter = new System.Windows.Forms.Label();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel2 = new System.Windows.Forms.Panel();
this.dgvChanceProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colChanceId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colImg = new System.Windows.Forms.DataGridViewImageColumn();
this.colImgType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.chk = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
this.splitContainer3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.White;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1119, 635);
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 4;
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtSearchCount);
this.ucGroupBoxEx1.Controls.Add(this.label5);
this.ucGroupBoxEx1.Controls.Add(this.cmbSearchLabel);
this.ucGroupBoxEx1.Controls.Add(this.btnAddToDb);
this.ucGroupBoxEx1.Controls.Add(this.btnGetDetail);
this.ucGroupBoxEx1.Controls.Add(this.txtShopId);
this.ucGroupBoxEx1.Controls.Add(this.txtSearchChance);
this.ucGroupBoxEx1.Controls.Add(this.label2);
this.ucGroupBoxEx1.Controls.Add(this.label1);
this.ucGroupBoxEx1.Controls.Add(this.btnEmpty);
this.ucGroupBoxEx1.Controls.Add(this.txtShopName);
this.ucGroupBoxEx1.Controls.Add(this.btnSearch);
this.ucGroupBoxEx1.Controls.Add(this.pnlEmpty);
this.ucGroupBoxEx1.Controls.Add(this.txtNotes);
this.ucGroupBoxEx1.Controls.Add(this.lblGroupFilter);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Controls.Add(this.label4);
this.ucGroupBoxEx1.Controls.Add(this.label3);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(1114, 118);
this.ucGroupBoxEx1.TabIndex = 0;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "操作";
//
// txtSearchCount
//
this.txtSearchCount.Location = new System.Drawing.Point(665, 23);
this.txtSearchCount.Name = "txtSearchCount";
this.txtSearchCount.Size = new System.Drawing.Size(100, 23);
this.txtSearchCount.TabIndex = 738;
this.txtSearchCount.Text = "500";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(604, 26);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(68, 17);
this.label5.TabIndex = 737;
this.label5.Text = "搜索数量:";
//
// cmbSearchLabel
//
this.cmbSearchLabel.FormattingEnabled = true;
this.cmbSearchLabel.Items.AddRange(new object[] {
"不限",
"当季新品",
"热门跟款",
"全网热销",
"潜力商品",
"热门商品"});
this.cmbSearchLabel.Location = new System.Drawing.Point(343, 22);
this.cmbSearchLabel.Name = "cmbSearchLabel";
this.cmbSearchLabel.Size = new System.Drawing.Size(100, 25);
this.cmbSearchLabel.TabIndex = 653;
this.cmbSearchLabel.Text = "不限";
//
// btnAddToDb
//
this.btnAddToDb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddToDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddToDb.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddToDb.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddToDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddToDb.Location = new System.Drawing.Point(973, 62);
this.btnAddToDb.Name = "btnAddToDb";
this.btnAddToDb.Size = new System.Drawing.Size(106, 25);
this.btnAddToDb.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddToDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddToDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddToDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddToDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddToDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddToDb.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddToDb.Style.GradientAngle = 90;
this.btnAddToDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddToDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddToDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddToDb.TabIndex = 718;
this.btnAddToDb.Text = "机会商品入库";
//
// btnGetDetail
//
this.btnGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnGetDetail.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnGetDetail.DisabledBackColor = System.Drawing.Color.Empty;
this.btnGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGetDetail.Location = new System.Drawing.Point(973, 22);
this.btnGetDetail.Name = "btnGetDetail";
this.btnGetDetail.Size = new System.Drawing.Size(106, 25);
this.btnGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnGetDetail.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnGetDetail.Style.GradientAngle = 90;
this.btnGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnGetDetail.TabIndex = 683;
this.btnGetDetail.Text = "获取机会商品详情";
//
// txtShopId
//
this.txtShopId.Location = new System.Drawing.Point(76, 16);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(183, 23);
this.txtShopId.TabIndex = 704;
//
// txtSearchChance
//
this.txtSearchChance.Location = new System.Drawing.Point(499, 23);
this.txtSearchChance.Name = "txtSearchChance";
this.txtSearchChance.Size = new System.Drawing.Size(100, 23);
this.txtSearchChance.TabIndex = 679;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(30, 19);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 17);
this.label2.TabIndex = 705;
this.label2.Text = "店铺ID:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(449, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 678;
this.label1.Text = "搜索词:";
//
// btnEmpty
//
this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.btnEmpty.Location = new System.Drawing.Point(223, 88);
this.btnEmpty.Name = "btnEmpty";
this.btnEmpty.Size = new System.Drawing.Size(36, 23);
this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnEmpty.Style.GradientAngle = 90;
this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnEmpty.TabIndex = 711;
this.btnEmpty.Text = "重置";
this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click);
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(76, 40);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(183, 23);
this.txtShopName.TabIndex = 706;
//
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
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(780, 23);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(106, 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)))));
this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearch.Style.GradientAngle = 90;
this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
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.Click += new System.EventHandler(this.btnSearch_Click);
//
// pnlEmpty
//
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(892, 23);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 25);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.pnlEmpty.Style.GradientAngle = 90;
this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.pnlEmpty.TabIndex = 431;
this.pnlEmpty.Text = "清空条件";
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// txtNotes
//
this.txtNotes.Location = new System.Drawing.Point(76, 64);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(183, 23);
this.txtNotes.TabIndex = 708;
//
// lblGroupFilter
//
this.lblGroupFilter.AutoSize = true;
this.lblGroupFilter.Location = new System.Drawing.Point(307, 26);
this.lblGroupFilter.Name = "lblGroupFilter";
this.lblGroupFilter.Size = new System.Drawing.Size(44, 17);
this.lblGroupFilter.TabIndex = 641;
this.lblGroupFilter.Text = "标签:";
//
// btnRefreshShop
//
this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.Location = new System.Drawing.Point(163, 88);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(58, 23);
this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshShop.Style.GradientAngle = 90;
this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshShop.TabIndex = 710;
this.btnRefreshShop.Text = "查询店铺";
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(19, 67);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(68, 17);
this.label4.TabIndex = 709;
this.label4.Text = "店铺分组:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(19, 43);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 707;
this.label3.Text = "店铺名称:";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.splitContainer3);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.chk);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Size = new System.Drawing.Size(1119, 511);
this.splitContainer2.SplitterDistance = 482;
this.splitContainer2.TabIndex = 0;
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer3.Location = new System.Drawing.Point(4, 0);
this.splitContainer3.Name = "splitContainer3";
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.pbShopLoading);
this.splitContainer3.Panel1.Controls.Add(this.dgvShop);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.pbLoading);
this.splitContainer3.Panel2.Controls.Add(this.panel2);
this.splitContainer3.Panel2.Controls.Add(this.dgvChanceProduct);
this.splitContainer3.Size = new System.Drawing.Size(1111, 482);
this.splitContainer3.SplitterDistance = 290;
this.splitContainer3.TabIndex = 9;
//
// pbShopLoading
//
this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbShopLoading.Location = new System.Drawing.Point(120, 216);
this.pbShopLoading.Name = "pbShopLoading";
this.pbShopLoading.Size = new System.Drawing.Size(50, 50);
this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbShopLoading.TabIndex = 8;
this.pbShopLoading.TabStop = false;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
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)))));
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,
this.colUserName,
this.colShopLoginName,
this.colShopId,
this.colShopName,
this.colShopNotes,
this.colLoginStatus,
this.colCanUse,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(0, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(290, 482);
this.dgvShop.TabIndex = 7;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colUserName
//
this.colUserName.HeaderText = "店铺所属用户名称";
this.colUserName.Name = "colUserName";
this.colUserName.ReadOnly = true;
this.colUserName.Visible = false;
//
// colShopLoginName
//
this.colShopLoginName.HeaderText = "店铺登录名";
this.colShopLoginName.Name = "colShopLoginName";
this.colShopLoginName.ReadOnly = true;
this.colShopLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 40;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// 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(383, 216);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 7;
this.pbLoading.TabStop = false;
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Location = new System.Drawing.Point(409, 355);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(385, 107);
this.panel2.TabIndex = 8;
//
// dgvChanceProduct
//
this.dgvChanceProduct.AllowUserToAddRows = false;
this.dgvChanceProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvChanceProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvChanceProduct.AutoRowNumber = true;
this.dgvChanceProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvChanceProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvChanceProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
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.dgvChanceProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvChanceProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvChanceProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
this.colChanceId,
this.colImgUrl,
this.colImg,
this.colImgType,
this.colGroup,
this.colCate,
this.colPrice,
this.colMsg});
this.dgvChanceProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvChanceProduct.Location = new System.Drawing.Point(0, 0);
this.dgvChanceProduct.Name = "dgvChanceProduct";
this.dgvChanceProduct.ReadOnly = true;
this.dgvChanceProduct.RowTemplate.Height = 23;
this.dgvChanceProduct.Size = new System.Drawing.Size(817, 482);
this.dgvChanceProduct.TabIndex = 6;
//
// colCheck
//
this.colCheck.FillWeight = 26F;
this.colCheck.HeaderText = "选";
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colChanceId
//
this.colChanceId.FillWeight = 50F;
this.colChanceId.HeaderText = "机会Id";
this.colChanceId.Name = "colChanceId";
this.colChanceId.ReadOnly = true;
//
// colImgUrl
//
this.colImgUrl.FillWeight = 300F;
this.colImgUrl.HeaderText = "图片路径";
this.colImgUrl.Name = "colImgUrl";
this.colImgUrl.ReadOnly = true;
this.colImgUrl.Visible = false;
//
// colImg
//
this.colImg.FillWeight = 40F;
this.colImg.HeaderText = "图片";
this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colImg.Name = "colImg";
this.colImg.ReadOnly = true;
this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colImgType
//
this.colImgType.FillWeight = 120F;
this.colImgType.HeaderText = "商品名称";
this.colImgType.Name = "colImgType";
this.colImgType.ReadOnly = true;
//
// colGroup
//
this.colGroup.FillWeight = 60F;
this.colGroup.HeaderText = "热度";
this.colGroup.Name = "colGroup";
this.colGroup.ReadOnly = true;
//
// colCate
//
this.colCate.HeaderText = "类目";
this.colCate.Name = "colCate";
this.colCate.ReadOnly = true;
this.colCate.Visible = false;
//
// colPrice
//
this.colPrice.FillWeight = 70F;
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
//
// colMsg
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle5;
this.colMsg.FillWeight = 200F;
this.colMsg.HeaderText = "操作结果";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// chk
//
this.chk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chk.AutoSize = true;
this.chk.Checked = true;
this.chk.CheckState = System.Windows.Forms.CheckState.Checked;
this.chk.Location = new System.Drawing.Point(1052, 3);
this.chk.Name = "chk";
this.chk.Size = new System.Drawing.Size(63, 21);
this.chk.TabIndex = 671;
this.chk.Text = "多选框";
this.chk.UseVisualStyleBackColor = true;
this.chk.Visible = false;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Left;
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(296, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(743, 25);
this.statusBar.TabIndex = 5;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(0, 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 = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(296, 25);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// PDDGetChanceProdForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1119, 635);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "PDDGetChanceProdForm";
this.Text = "PDDGetChanceProd";
this.Load += new System.EventHandler(this.PDDGetChanceProd_Load);
this.VisibleChanged += new System.EventHandler(this.PDDGetChanceProdForm_VisibleChanged);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx1.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private DevComponents.DotNetBar.PanelEx btnSearch;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private System.Windows.Forms.ComboBox cmbSearchLabel;
private System.Windows.Forms.Label lblGroupFilter;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.PictureBox pbLoading;
private System.Windows.Forms.Panel panel2;
private UserComponent.DataGridViewEx dgvChanceProduct;
private UserControls.UcSplitPage ucSplitPage1;
private UserControls.StatusBarUserControl statusBar;
private UserComponent.UcCheckBox chk;
private System.Windows.Forms.SplitContainer splitContainer3;
private UserComponent.DataGridViewEx dgvShop;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx btnGetDetail;
private System.Windows.Forms.TextBox txtSearchChance;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colChanceId;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
private System.Windows.Forms.DataGridViewImageColumn colImg;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgType;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroup;
private System.Windows.Forms.DataGridViewTextBoxColumn colCate;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private DevComponents.DotNetBar.PanelEx btnEmpty;
private System.Windows.Forms.TextBox txtNotes;
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx btnRefreshShop;
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.PanelEx btnAddToDb;
private System.Windows.Forms.PictureBox pbShopLoading;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.TextBox txtSearchCount;
private System.Windows.Forms.Label label5;
}
}
@@ -0,0 +1,477 @@
using AllBase;
using AllBase.Model.Result;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.PDDForms.AdminForms;
using TemuKJD.PDDForms.ShopForms;
using Work;
namespace TemuKJD.PDDForms.ProductSelectForms
{
public partial class PDDGetChanceProdForm : Form
{
CheckBox chkSelectAll;
ChanceProductConfig chanceProductConfig;
public ConcurrentList<ShopLoginInfo> lstAdminShopInfo { get; set; } = new ConcurrentList<ShopLoginInfo>();
public ConcurrentList<ChanceProductResult> lstChanceProductResult { get; set; } = new ConcurrentList<ChanceProductResult>();
/// <summary>
/// 查找机会商品
/// </summary>
public PDDGetChanceProdForm()
{
InitializeComponent();
}
private void PDDGetChanceProd_Load(object sender, EventArgs e)
{
this.panel2.Location = new Point(45, 55);
this.panel2.Width = Math.Max(10, this.panel2.Parent.Width - 90);
this.panel2.Height = Math.Max(10, this.panel2.Parent.Height - 90);
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
this.dgvChanceProduct.AddSelectorColumn("colCheck");
this.dgvChanceProduct.AddImgColumn("colImg", "colImgUrl");
chanceProductConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ChanceProductConfig>("pdd_chance_product_config");
if (chanceProductConfig == null)
chanceProductConfig = new ChanceProductConfig();
this.txtNotes.Text = chanceProductConfig.SearchNotes;
this.txtShopId.Text = chanceProductConfig.SearchShopId;
this.txtShopName.Text = chanceProductConfig.SearchShopName;
this.txtNotes.TextChanged += Txt_TextChanged;
this.txtShopId.TextChanged += Txt_TextChanged;
this.txtShopName.TextChanged += Txt_TextChanged;
}
private void Txt_TextChanged(object sender, EventArgs e)
{
chanceProductConfig.SearchNotes = this.txtNotes.Text.Trim();
chanceProductConfig.SearchShopId = this.txtShopId.Text.Trim();
chanceProductConfig.SearchShopName = this.txtShopName.Text.Trim();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_config", chanceProductConfig);
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
var list = lstAdminShopInfo.Where(s => s.LoginStatus == "登录成功").ToList();
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l.ShopId == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void PDDGetChanceProdForm_VisibleChanged(object sender, EventArgs e)
{
this.pbShopLoading.Visible = true;
SearchShop(this.ucSplitPage1.CurrentPage);
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
if (this.ucSplitPage1.CurrentPage != 1)
this.ucSplitPage1.CurrentPage = 1;
else
SearchShop(1);
}
public void SearchShop(int page)
{
List<string> userShopIdList = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
.Select(r => r.Cells["colShopId"].Value.ParseToString() + r.Cells["colUser"].Value.ParseToString()).ToList();
if (InvokeRequired)
{
Invoke(new Action(() =>
{
this.pbShopLoading.Visible = true;
this.dgvShop.Rows.Clear();
lstAdminShopInfo.Clear();
}));
}
else
{
this.pbShopLoading.Visible = true;
this.dgvShop.Rows.Clear();
lstAdminShopInfo.Clear();
}
Task.Run(() =>
{
int pageCount;
var list = AdminGetServerShopLst(out pageCount, page);
lstAdminShopInfo.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount;
foreach (var shop in lstAdminShopInfo)
{
bool canUse = shop.LoginStatus2 == "国际版在线";
Invoke(new Action(() =>
{
int rowIndex = this.dgvShop.Rows.Add(
userShopIdList.Contains(shop.ShopId + shop.UserName),
shop.UserName,
shop.LoginName,
shop.ShopId,
shop.ShopAccount,
shop.Notes,
canUse ? "在线" : "掉线",
canUse,
string.Empty
);
displayShopStatus(shop);
}));
}
Invoke(new Action(() =>
{
this.pbShopLoading.Visible = false;
}));
});
}
void displayShopStatus(ShopLoginInfo shop)
{
bool canUse = shop.LoginStatus == "登录成功";
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ParseToString() == shop?.LoginName);
foreach (var row in rows)
{
row.Cells["colCanUse"].Value = canUse;
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
}
}
public List<ShopLoginInfo> AdminGetServerShopLst(out int pageCount, int page = 1, int pageSize = 50)
{
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
pageCount = 1;
var url = BaseClass.BuildObjString("shop/admin_get_shop_list");
var data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
"&shop_ids=" + string.Join(",", txtShopId.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) +
"&shop_names=" + string.Join(",", txtShopName.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) +
"&search_notes=" + txtNotes.Text.Trim().Trim(',');
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("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass"))
{
return list;
}
int count = BaseRegex.GetIntJson(ref html, "count");
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
return ShopBLL.DeserializationShop(html);
}
private void ucSplitPage1_PageChange(object obj)
{
SearchShop(this.ucSplitPage1.CurrentPage);
}
private void btnEmpty_Click(object sender, EventArgs e)
{
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string loginName = dgvShop.Rows[e.RowIndex].Cells["colShopLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
ShopLoginInfo shop = null;
shop = lstAdminShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId);
switch (headerText)
{
case "登录":
case "状态":
{
{
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus == "登录成功")
{
PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://mms.pinduoduo.com/home/";
shopLoginForm.Show();
}
else
{
PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
//shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
displayShopStatus(shop);
}
}
}
break;
case "":
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value;
break;
default:
break;
}
}
private void shopLoginForm_SaveComplete(object obj)
{
//var shop = obj as ShopLoginInfo;
//if (shop == null)
// return;
//displayShopStatus(shop);
}
private void btnSearch_Click(object sender, EventArgs e)
{
dgvChanceProduct.Rows.Clear();
lstChanceProductResult.Clear();
pbLoading.Visible = true;
Task.Run(() =>
{
ShopLoginInfo shop = null;
while (shop == null || shop.LoginStatus != "登录成功")
{
var shopList = lstAdminShopInfo.Where(s => s.LoginStatus == "登录成功").ToList();
if (shopList.Count == 0)
{
BaseMsgForm.ShowError("没有可用的店铺,无法搜索机会商品!");
return;
}
shop = shopList[Randomx.GetId(shopList.Count)];
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
}
string searchTxt = "";
int searchCount = txtSearchCount.Text.ParseToInt();
Invoke(new Action(() =>
{
searchTxt = txtSearchChance.Text.Trim();
}));
List<string> searchLabels = null;
Invoke(new Action(() =>
{
if (cmbSearchLabel.Text == "当季新品")
searchLabels = new List<string>() { "newinfashion_new" };
if (cmbSearchLabel.Text == "热门跟款")
searchLabels = new List<string>() { "hot_follow" };
if (cmbSearchLabel.Text == "全网热销")
searchLabels = new List<string>() { "wide_popular" };
if (cmbSearchLabel.Text == "潜力商品")
searchLabels = new List<string>() { "thousand_rec" };
if (cmbSearchLabel.Text == "热门商品")
searchLabels = new List<string>() { "hot_favorites_goods" };
}));
int page = 1;
int totalPage = 1;
int getCount = 0;
int total = 2000;
while(getCount < searchCount && getCount < total && page <=totalPage)
{
if ((page - 1) % 10 == 0)
{
PDDShopLoginForm loginForm = null;
Invoke(new Action(() =>
{
this.panel2.SendToBack();
//this.panel2.BringToFront();
loginForm = new PDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/goods/goods_list/chance?sourcePage=goodsListTopButton";
loginForm.Dock = DockStyle.Fill;
this.panel2.Controls.Add(loginForm);
loginForm.Show();
}));
Thread.Sleep(Randomx.GetId(3000, 5000));
Invoke(new Action(() =>
{
this.panel2.SendToBack();
if (loginForm != null)
loginForm.Close();
}));
}
else
{
Thread.Sleep(Randomx.GetId(3000, 8000));
}
var rst = GetChanceGoodsList(shop, searchTxt, searchLabels, page);
if (!rst.Contains("success\":true"))
{
while (shop == null || shop.LoginStatus != "登录成功")
{
var shopList = lstAdminShopInfo.Where(s => s.LoginStatus == "登录成功").ToList();
if (shopList.Count == 0)
{
BaseMsgForm.ShowError("没有可用的店铺,无法搜索机会商品!");
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
shop = shopList[Randomx.GetId(shopList.Count)];
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
}
continue;
}
GetChanceProductResult getResult = null;
try
{
JObject jObj = JObject.Parse(rst);
getResult = JsonHelper.DeserializeJsonToObject<GetChanceProductResult>(JsonHelper.SerializeObject(jObj["result"]));
lstChanceProductResult.AddRange(getResult.list);
foreach(var chanceProductResult in getResult.list)
{
Invoke(new Action(() =>
{
var rowId = this.dgvChanceProduct.Rows.Add(
true,
chanceProductResult.chance_id,
chanceProductResult.pic_url.Replace("https://", "http://"),
DataGridViewExtension.defaultBitmap,
chanceProductResult.keywords,
chanceProductResult.hot_index,
chanceProductResult.cat_id_3.ParseToLong() == 0 ? new long?() : chanceProductResult.cat_id_3.ParseToLong()
);
dgvChanceProduct.Rows[rowId].Height = 60;
}));
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError("查询失败" + ex.Message);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
getCount = lstChanceProductResult.Count;
total = BaseRegex.GetIntJson(ref rst, "total");
totalPage = total / getResult.list.Count;
page++;
}
Invoke(new Action(() =>
{
pbLoading.Visible = false;
BaseMsgForm.ShowInfo("列表获取完毕!");
}));
});
}
private string GetChanceGoodsList(ShopLoginInfo shop, string searchWord, List<string> labels = null, int page = 1)
{
return PDDDBProdUserSelectForm.GetChanceGoodsList(shop, searchWord, labels, page);
}
private void pnlEmpty_Click(object sender, EventArgs e)
{
cmbSearchLabel.Text = "不限";
txtSearchChance.Text = "";
txtSearchCount.Text = "500";
}
}
public class ChanceProductConfig
{
public string SearchShopId { get; set; } = "";
public string SearchShopName { get; set; } = "";
public string SearchNotes { get; set; } = "";
}
public class GetChanceProductResult
{
public int? total { get; set; } // 2000
public List<ChanceProductResult> list { get; set; }
}
public class ChanceProductResult
{
public string chance_id { get; set; } // "f773c4152ef295d6b89955df40531ed2",
public string keywords { get; set; } // "包气质托特百搭新款",
public int refer_price { get; set; } // 5690,
public object mall_id { get; set; } // null,
public int? price_label { get; set; } // 1,
public string pic_url { get; set; } // "https://img.pddpic.com/mms-material-img/2025-11-23/ea0866e0-8f0d-43aa-a00f-615c15387129.jpeg.a.jpeg",
public object is_collection { get; set; } // null,
public int? hot_index { get; set; } // 100, // 热度值
public int? mms_hot_index { get; set; } // 100,
public object mms_oprty_index { get; set; } // null,
public int? mms_index_target { get; set; } // 0,
public List<ChanceProductLabelResult> labels { get; set; }
public List<string> gallery_img_url_list { get; set; } // ["https://img.pddpic.com/mms-material-img/2025-11-23/ea0866e0-8f0d-43aa-a00f-615c15387129.jpeg.a.jpeg", ...],
public long? potential_index { get; set; } // 8500,
public long? cat_id_1 { get; set; } // 8538,
public long? cat_id_2 { get; set; } // 8544,
public long? cat_id_3 { get; set; } // 25141
}
public class ChanceProductLabelResult
{
public string name { get; set; } // "newinfashion",
public int? priority { get; set; } // -7,
public string title { get; set; } // "当季新品",
public string color { get; set; } // "#FF7300",
public string background_color { get; set; } // "#FFF2DF",
public string gradient_color { get; set; } // "#F20054",
public string short_essay { get; set; } // "可获新品标",
public string hover_title { get; set; } // "抢先发布当季新款,更容易获得新品标,获得流量先机",
public object link { get; set; } // null,
public object show_icon { get; set; } // null,
public string popup_url { get; set; } // "https://commimg.pddpic.com/upload/0e69360e-dd19-41c0-909a-759c74b58280.png",
public string theme_url { get; set; } // "https://commimg.pddpic.com/upload/9a5b1fb8-1daf-4050-8909-5f084d37b455.png",
public string theme_icon { get; set; } // "https://commimg.pddpic.com/upload/44b7943f-30ea-4498-895c-527850bb5e17.png",
public string theme_detail_url { get; set; } // "https://pfile.pddpic.com/galerie-go/mms_img/season_goods.png"
}
}
@@ -0,0 +1,171 @@
<?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>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colUserName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopLoginName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colChanceId.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">
<value>True</value>
</metadata>
<metadata name="colImg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImgType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colGroup.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMsg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>