1拼多多买手读单优化 2商品类目查询优化

This commit is contained in:
wule committed 2026-06-02 16:09:57 +08:00
1 parent 7601f5b2f3
commit 4ae8e4f1b2
40 files changed
+4743 -745

No files matched your search

@@ -51,6 +51,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucTabControlMetro1 = new TemuKJD.UserControls.UcTabControlMetro();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnTitleFission = new DevComponents.DotNetBar.PanelEx();
this.btnExportIdImg = new DevComponents.DotNetBar.PanelEx();
this.btnSetGroup = new DevComponents.DotNetBar.PanelEx();
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
@@ -240,6 +241,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// tabPage1
//
this.tabPage1.Controls.Add(this.btnTitleFission);
this.tabPage1.Controls.Add(this.btnExportIdImg);
this.tabPage1.Controls.Add(this.btnSetGroup);
this.tabPage1.Controls.Add(this.btnDelSelect);
@@ -255,6 +257,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.tabPage1.Text = "数据操作";
this.tabPage1.UseVisualStyleBackColor = true;
//
// btnTitleFission
//
this.btnTitleFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnTitleFission.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnTitleFission.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnTitleFission.DisabledBackColor = System.Drawing.Color.Empty;
this.btnTitleFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTitleFission.Location = new System.Drawing.Point(6, 39);
this.btnTitleFission.Name = "btnTitleFission";
this.btnTitleFission.Size = new System.Drawing.Size(82, 25);
this.btnTitleFission.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnTitleFission.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnTitleFission.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnTitleFission.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnTitleFission.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnTitleFission.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnTitleFission.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnTitleFission.Style.GradientAngle = 90;
this.btnTitleFission.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnTitleFission.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnTitleFission.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnTitleFission.TabIndex = 784;
this.btnTitleFission.Text = "标题裂变";
this.btnTitleFission.Click += new System.EventHandler(this.btnTitleFission_Click);
//
// btnExportIdImg
//
this.btnExportIdImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -827,7 +854,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"是",
"否"});
this.cmbPddRelation.Location = new System.Drawing.Point(693, 5);
this.cmbPddRelation.Location = new System.Drawing.Point(693, 7);
this.cmbPddRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbPddRelation.Name = "cmbPddRelation";
this.cmbPddRelation.Size = new System.Drawing.Size(38, 25);
@@ -882,7 +909,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat2.FormattingEnabled = true;
this.cmbCat2.Location = new System.Drawing.Point(262, 75);
this.cmbCat2.Location = new System.Drawing.Point(262, 77);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(38, 25);
@@ -961,14 +988,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"厂商直采",
"1688厂家",
"1688外部数据",
"已采集数据",
"微信小店",
"微信店采",
"母店采集",
"机会商品",
"以图搜品",
"外部数据"});
this.cmbSourceType.Location = new System.Drawing.Point(262, 40);
"多多外部数据"});
this.cmbSourceType.Location = new System.Drawing.Point(262, 42);
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(38, 25);
@@ -1014,7 +1041,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"是",
"否"});
this.cmbWxCat.Location = new System.Drawing.Point(581, 5);
this.cmbWxCat.Location = new System.Drawing.Point(581, 7);
this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxCat.Name = "cmbWxCat";
this.cmbWxCat.Size = new System.Drawing.Size(38, 25);
@@ -1036,7 +1063,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"曝光量"});
this.cmbSort.Location = new System.Drawing.Point(357, 40);
this.cmbSort.Location = new System.Drawing.Point(357, 42);
this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(38, 25);
@@ -1100,7 +1127,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroupFilter.FormattingEnabled = true;
this.cmbGroupFilter.Location = new System.Drawing.Point(167, 40);
this.cmbGroupFilter.Location = new System.Drawing.Point(167, 42);
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbGroupFilter.Name = "cmbGroupFilter";
this.cmbGroupFilter.Size = new System.Drawing.Size(38, 25);
@@ -1115,7 +1142,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"是",
"否",
"导出未拉回"});
this.cmbExportToOutServer.Location = new System.Drawing.Point(581, 40);
this.cmbExportToOutServer.Location = new System.Drawing.Point(581, 42);
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
this.cmbExportToOutServer.Size = new System.Drawing.Size(38, 25);
@@ -1151,7 +1178,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"安全商品",
"违规商品",
"未校验"});
this.cmbWxSafe.Location = new System.Drawing.Point(469, 40);
this.cmbWxSafe.Location = new System.Drawing.Point(469, 42);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(38, 25);
@@ -1193,7 +1220,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat1.FormattingEnabled = true;
this.cmbCat1.Location = new System.Drawing.Point(167, 75);
this.cmbCat1.Location = new System.Drawing.Point(167, 77);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(38, 25);
@@ -1215,7 +1242,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbCat3.FormattingEnabled = true;
this.cmbCat3.Location = new System.Drawing.Point(357, 75);
this.cmbCat3.Location = new System.Drawing.Point(357, 77);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(38, 25);
@@ -1311,7 +1338,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"",
"普通商品",
"爆款数据"});
this.cmbSpProdType.Location = new System.Drawing.Point(805, 5);
this.cmbSpProdType.Location = new System.Drawing.Point(805, 7);
this.cmbSpProdType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSpProdType.Name = "cmbSpProdType";
this.cmbSpProdType.Size = new System.Drawing.Size(38, 25);
@@ -2102,5 +2129,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private System.Windows.Forms.TextBox txtViewUvMin;
private UserComponent.UcCheckBox chkViewUvMin;
private DevComponents.DotNetBar.PanelEx btnTitleFission;
}
}
@@ -242,7 +242,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
prod.head_words,
prod.end_words,
prod.fission_words,
prod.product_get_type_text == "厂商直采" ? (prod.product_get_type_text + " " + prod.skc_id).Trim() : prod.product_get_type_text,
(prod.product_get_type_text == "厂商直采" ? (prod.product_get_type_text + " " + prod.skc_id).Trim() : prod.product_get_type_text)?.Replace("1688外部数据", "已采集数据"),
prod.special_prod_type == "爆款数据" ? "爆款数据" : "普通商品",
prod.wx_safe_status,
prod.add_time.ToString("yy-MM-dd HH:mm"),
@@ -407,7 +407,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (cmbSourceType.Text.Trim() != "全部")
{
data += "&product_get_type=" + cmbSourceType.Text.Trim();
data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("已采集数据", "1688外部数据");
}
if (shop != null && !string.IsNullOrEmpty(shop.ShopId))
{
@@ -821,7 +821,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var url = BaseClass.BuildPDDObjString("product/get_product_groups");
var data = UserLogin.GetSignaturex();
if (!string.IsNullOrWhiteSpace(product_get_type))
data += "&product_get_type=" + product_get_type.Replace("多多商品", "机会商品").Replace("1688商品", "1688厂家,1688外部数据");
{
data += "&product_get_type=" + product_get_type.Replace("已采集数据", "1688外部数据")
.Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据");
}
if (!string.IsNullOrWhiteSpace(group_add_user_name))
data += "&add_user_name=" + group_add_user_name;
var html = GetHtml.PostUtf8(url, data);
@@ -1146,7 +1149,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
using (StreamReader sr = new StreamReader(path))
{
content = sr.ReadToEnd();
}
if (content.Contains("\"spec_keys\"") && content.Contains("\"spec_values\"") && content.Contains("\"is_sku_pre_sale\""))
@@ -1322,9 +1324,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
string productTitle = "";
if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "1688外部数据" ||
dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "机会商品")
dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "微信店采" || dbProd.product_get_type_text == "机会商品" ||
dbProd.product_get_type_text == "多多外部数据")
{
if (dbProd.product_get_type_text == "微信小店" && dbProd.wx_cat_leaf != null)
if ((dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "微信店采") && dbProd.wx_cat_leaf != null)
{
List<WxCatInfo> catInfoLst = new List<WxCatInfo>();
var cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString());
@@ -1395,6 +1398,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
mainImgLst3 = pInfo.detail.galleries.Where(g => g.type == 1).Take(3).Select(s => s.url).ToList();
productTitle = pInfo.detail.goods_name;
}
if (dbProd.product_get_type_text == "机会商品" || dbProd.product_get_type_text == "多多外部数据")
{
string convertRst = "";
var pInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
mainImgLst3 = pInfo.detail.galleries.Where(g => g.type == 1).Take(3).Select(s => s.url).ToList();
productTitle = pInfo.detail.goods_name;
}
//bool is404 = false;
foreach (var img in mainImgLst3)
@@ -1513,8 +1523,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
mdyWxCat:
if ((dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "1688外部数据" ||
dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "机会商品") &&
dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "微信店采" || dbProd.product_get_type_text == "机会商品" ||
dbProd.product_get_type_text == "多多外部数据") && dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
{
var url = BaseClass.BuildPDDObjString("product/mdy_product");
var data = Work.UserLogin.GetSignaturex() +
@@ -2379,5 +2389,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
File.WriteAllText(dialog.FileName, data);
BaseMsgForm.ShowInfo("导出成功!");
}
private void btnTitleFission_Click(object sender, EventArgs e)
{
var lstProdId = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["col_spu_id"]?.Value.ToString()).ToList();
if (lstProdId.Count == 0)
return;
var prodList = lstTemuDbProduct.Where(p => lstProdId.Contains(p.spu_id)).ToList();
DouBaoTitleFissionCefForm fissionCefForm = new DouBaoTitleFissionCefForm(prodList);
fissionCefForm.ShowDialog();
}
}
}
@@ -1212,7 +1212,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"厂商直采",
"母店采集",
"机会商品",
"外部数据"});
"多多外部数据"});
this.cmbSourceType.Location = new System.Drawing.Point(39, 74);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(88, 25);
@@ -6294,7 +6294,7 @@ Content-Type: image/jpeg
data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList());
}
data += "&product_get_type=" + cmbSourceType.Text.Trim();
data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("已采集数据", "1688外部数据");
if (cmbSourceType.Text.Trim() == "厂商直采")
{
// 聚水潭商品 // 分销已设置,类目已识别
@@ -30,15 +30,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnImportShop = new DevComponents.DotNetBar.PanelEx();
this.btnAddShop = new DevComponents.DotNetBar.PanelEx();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.btnShowMyCollect = new DevComponents.DotNetBar.PanelEx();
this.btnSelectNotGetDetail = new DevComponents.DotNetBar.PanelEx();
this.cmbFilterType = new System.Windows.Forms.ComboBox();
@@ -61,17 +64,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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.txtFilterShopId = 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.txtFilterShopName = new System.Windows.Forms.TextBox();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.btnRestoreEmpty = new DevComponents.DotNetBar.PanelEx();
this.txtNotes = new System.Windows.Forms.TextBox();
this.txtFilterNotes = new System.Windows.Forms.TextBox();
this.lblGroupFilter = new System.Windows.Forms.Label();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.btnSearchShop = new DevComponents.DotNetBar.PanelEx();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
@@ -80,6 +83,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtMinPrice = new System.Windows.Forms.TextBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.pnlAddEditShop = new System.Windows.Forms.Panel();
this.btnCancelAddEditShop = new DevComponents.DotNetBar.PanelEx();
this.btnAddEditShop = new DevComponents.DotNetBar.PanelEx();
this.label12 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label13 = new System.Windows.Forms.Label();
this.txtShopPassword = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtShopLoginName = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -120,6 +133,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
this.splitContainer3.SuspendLayout();
this.pnlAddEditShop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
@@ -153,6 +167,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| 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.btnImportShop);
this.ucGroupBoxEx1.Controls.Add(this.btnAddShop);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Controls.Add(this.btnShowMyCollect);
this.ucGroupBoxEx1.Controls.Add(this.btnSelectNotGetDetail);
this.ucGroupBoxEx1.Controls.Add(this.cmbFilterType);
@@ -175,17 +192,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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.txtFilterShopId);
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.txtFilterShopName);
this.ucGroupBoxEx1.Controls.Add(this.btnSearch);
this.ucGroupBoxEx1.Controls.Add(this.btnRestoreEmpty);
this.ucGroupBoxEx1.Controls.Add(this.txtNotes);
this.ucGroupBoxEx1.Controls.Add(this.txtFilterNotes);
this.ucGroupBoxEx1.Controls.Add(this.lblGroupFilter);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Controls.Add(this.btnSearchShop);
this.ucGroupBoxEx1.Controls.Add(this.label4);
this.ucGroupBoxEx1.Controls.Add(this.label3);
this.ucGroupBoxEx1.Controls.Add(this.label7);
@@ -199,6 +216,81 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "操作";
//
// btnImportShop
//
this.btnImportShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnImportShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImportShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImportShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImportShop.Location = new System.Drawing.Point(201, 13);
this.btnImportShop.Name = "btnImportShop";
this.btnImportShop.Size = new System.Drawing.Size(58, 23);
this.btnImportShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnImportShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImportShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImportShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnImportShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnImportShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnImportShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnImportShop.Style.GradientAngle = 90;
this.btnImportShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnImportShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImportShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImportShop.TabIndex = 1142;
this.btnImportShop.Text = "导入店铺";
this.btnImportShop.Visible = false;
this.btnImportShop.Click += new System.EventHandler(this.btnImportShop_Click);
//
// btnAddShop
//
this.btnAddShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddShop.Location = new System.Drawing.Point(141, 13);
this.btnAddShop.Name = "btnAddShop";
this.btnAddShop.Size = new System.Drawing.Size(58, 23);
this.btnAddShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddShop.Style.GradientAngle = 90;
this.btnAddShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddShop.TabIndex = 1141;
this.btnAddShop.Text = "添加店铺";
this.btnAddShop.Visible = false;
this.btnAddShop.Click += new System.EventHandler(this.btnAddShop_Click);
//
// 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(103, 109);
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 = 1092;
this.btnRefreshShop.Text = "过滤店铺";
this.btnRefreshShop.Visible = false;
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// btnShowMyCollect
//
this.btnShowMyCollect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -546,12 +638,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnGetDetail.Text = "获取机会商品详情";
this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click);
//
// txtShopId
// txtFilterShopId
//
this.txtShopId.Location = new System.Drawing.Point(76, 28);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(183, 23);
this.txtShopId.TabIndex = 704;
this.txtFilterShopId.Location = new System.Drawing.Point(76, 37);
this.txtFilterShopId.Name = "txtFilterShopId";
this.txtFilterShopId.Size = new System.Drawing.Size(183, 23);
this.txtFilterShopId.TabIndex = 704;
//
// txtSearchChance
//
@@ -563,7 +655,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(30, 31);
this.label2.Location = new System.Drawing.Point(30, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 17);
this.label2.TabIndex = 705;
@@ -583,7 +675,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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, 100);
this.btnEmpty.Location = new System.Drawing.Point(223, 109);
this.btnEmpty.Name = "btnEmpty";
this.btnEmpty.Size = new System.Drawing.Size(36, 23);
this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -602,12 +694,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnEmpty.Text = "重置";
this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click);
//
// txtShopName
// txtFilterShopName
//
this.txtShopName.Location = new System.Drawing.Point(76, 52);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(183, 23);
this.txtShopName.TabIndex = 706;
this.txtFilterShopName.Location = new System.Drawing.Point(76, 61);
this.txtFilterShopName.Name = "txtFilterShopName";
this.txtFilterShopName.Size = new System.Drawing.Size(183, 23);
this.txtFilterShopName.TabIndex = 706;
//
// btnSearch
//
@@ -657,12 +749,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnRestoreEmpty.Text = "清空条件";
this.btnRestoreEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// txtNotes
// txtFilterNotes
//
this.txtNotes.Location = new System.Drawing.Point(76, 76);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(183, 23);
this.txtNotes.TabIndex = 708;
this.txtFilterNotes.Location = new System.Drawing.Point(76, 85);
this.txtFilterNotes.Name = "txtFilterNotes";
this.txtFilterNotes.Size = new System.Drawing.Size(183, 23);
this.txtFilterNotes.TabIndex = 708;
//
// lblGroupFilter
//
@@ -673,34 +765,34 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblGroupFilter.TabIndex = 641;
this.lblGroupFilter.Text = "热门主题:";
//
// btnRefreshShop
// btnSearchShop
//
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, 100);
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);
this.btnSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearchShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearchShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearchShop.Location = new System.Drawing.Point(163, 109);
this.btnSearchShop.Name = "btnSearchShop";
this.btnSearchShop.Size = new System.Drawing.Size(58, 23);
this.btnSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearchShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearchShop.Style.GradientAngle = 90;
this.btnSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearchShop.TabIndex = 710;
this.btnSearchShop.Text = "查询店铺";
this.btnSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(19, 79);
this.label4.Location = new System.Drawing.Point(19, 88);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(68, 17);
this.label4.TabIndex = 709;
@@ -709,7 +801,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(19, 55);
this.label3.Location = new System.Drawing.Point(19, 64);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 707;
@@ -786,6 +878,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.pnlAddEditShop);
this.splitContainer3.Panel1.Controls.Add(this.pbShopLoading);
this.splitContainer3.Panel1.Controls.Add(this.dgvShop);
//
@@ -798,6 +891,154 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer3.SplitterDistance = 290;
this.splitContainer3.TabIndex = 9;
//
// pnlAddEditShop
//
this.pnlAddEditShop.BackColor = System.Drawing.Color.White;
this.pnlAddEditShop.Controls.Add(this.btnCancelAddEditShop);
this.pnlAddEditShop.Controls.Add(this.btnAddEditShop);
this.pnlAddEditShop.Controls.Add(this.label12);
this.pnlAddEditShop.Controls.Add(this.txtNotes);
this.pnlAddEditShop.Controls.Add(this.label13);
this.pnlAddEditShop.Controls.Add(this.txtShopPassword);
this.pnlAddEditShop.Controls.Add(this.label17);
this.pnlAddEditShop.Controls.Add(this.txtShopLoginName);
this.pnlAddEditShop.Controls.Add(this.label18);
this.pnlAddEditShop.Location = new System.Drawing.Point(21, 57);
this.pnlAddEditShop.Name = "pnlAddEditShop";
this.pnlAddEditShop.Size = new System.Drawing.Size(240, 220);
this.pnlAddEditShop.TabIndex = 9;
this.pnlAddEditShop.Visible = false;
//
// btnCancelAddEditShop
//
this.btnCancelAddEditShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancelAddEditShop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnCancelAddEditShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancelAddEditShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancelAddEditShop.Location = new System.Drawing.Point(101, 175);
this.btnCancelAddEditShop.Name = "btnCancelAddEditShop";
this.btnCancelAddEditShop.Size = new System.Drawing.Size(55, 26);
this.btnCancelAddEditShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancelAddEditShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancelAddEditShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancelAddEditShop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnCancelAddEditShop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancelAddEditShop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnCancelAddEditShop.Style.GradientAngle = 90;
this.btnCancelAddEditShop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancelAddEditShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancelAddEditShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancelAddEditShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancelAddEditShop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnCancelAddEditShop.TabIndex = 811;
this.btnCancelAddEditShop.Text = "取消";
this.btnCancelAddEditShop.Click += new System.EventHandler(this.btnCancelAddEditShop_Click);
//
// btnAddEditShop
//
this.btnAddEditShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddEditShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddEditShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddEditShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddEditShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddEditShop.Location = new System.Drawing.Point(158, 175);
this.btnAddEditShop.Name = "btnAddEditShop";
this.btnAddEditShop.Size = new System.Drawing.Size(55, 26);
this.btnAddEditShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddEditShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddEditShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddEditShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddEditShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddEditShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddEditShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddEditShop.Style.GradientAngle = 90;
this.btnAddEditShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddEditShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddEditShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddEditShop.TabIndex = 804;
this.btnAddEditShop.Text = "新增";
this.btnAddEditShop.Click += new System.EventHandler(this.btnAddEditShop_Click);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(29, 102);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(56, 17);
this.label12.TabIndex = 386;
this.label12.Text = " 备注";
//
// txtNotes
//
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtNotes.Border.PaddingBottom = 2;
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 100);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(122, 23);
this.txtNotes.TabIndex = 385;
//
// label13
//
this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label13.AutoSize = true;
this.label13.ForeColor = System.Drawing.Color.DarkGray;
this.label13.Location = new System.Drawing.Point(25, 136);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(188, 17);
this.label13.TabIndex = 384;
this.label13.Text = "注:登录密码为空表示不更新密码";
this.label13.Visible = false;
//
// txtShopPassword
//
this.txtShopPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopPassword.Location = new System.Drawing.Point(91, 64);
this.txtShopPassword.Name = "txtShopPassword";
this.txtShopPassword.PasswordChar = '●';
this.txtShopPassword.Size = new System.Drawing.Size(122, 23);
this.txtShopPassword.TabIndex = 338;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(29, 67);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(56, 17);
this.label17.TabIndex = 337;
this.label17.Text = "登录密码";
//
// txtShopLoginName
//
this.txtShopLoginName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopLoginName.Location = new System.Drawing.Point(91, 29);
this.txtShopLoginName.Name = "txtShopLoginName";
this.txtShopLoginName.Size = new System.Drawing.Size(122, 23);
this.txtShopLoginName.TabIndex = 336;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(29, 32);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(56, 17);
this.label18.TabIndex = 0;
this.label18.Text = "登录账号";
//
// pbShopLoading
//
this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
@@ -813,19 +1054,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
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,
@@ -946,20 +1187,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvChanceProduct.AllowUserToAddRows = false;
this.dgvChanceProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvChanceProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
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)))));
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.dgvChanceProduct.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.dgvChanceProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvChanceProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvChanceProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1025,8 +1266,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colGoodsName
//
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle5;
this.colGoodsName.FillWeight = 120F;
this.colGoodsName.HeaderText = "商品名称";
this.colGoodsName.Name = "colGoodsName";
@@ -1047,8 +1288,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colPrice
//
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPrice.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPrice.DefaultCellStyle = dataGridViewCellStyle6;
this.colPrice.FillWeight = 70F;
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
@@ -1056,8 +1297,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colMsg
//
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle7;
this.colMsg.FillWeight = 200F;
this.colMsg.HeaderText = "操作结果";
this.colMsg.Name = "colMsg";
@@ -1129,6 +1370,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
this.pnlAddEditShop.ResumeLayout(false);
this.pnlAddEditShop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
@@ -1157,11 +1400,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private DevComponents.DotNetBar.PanelEx btnGetDetail;
private System.Windows.Forms.TextBox txtSearchChance;
private DevComponents.DotNetBar.PanelEx btnEmpty;
private System.Windows.Forms.TextBox txtNotes;
private System.Windows.Forms.TextBox txtFilterNotes;
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx btnRefreshShop;
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.TextBox txtShopName;
private DevComponents.DotNetBar.PanelEx btnSearchShop;
private System.Windows.Forms.TextBox txtFilterShopId;
private System.Windows.Forms.TextBox txtFilterShopName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
@@ -1209,5 +1452,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private DevComponents.DotNetBar.PanelEx btnShowMyCollect;
private DevComponents.DotNetBar.PanelEx btnRefreshShop;
private DevComponents.DotNetBar.PanelEx btnImportShop;
private DevComponents.DotNetBar.PanelEx btnAddShop;
private System.Windows.Forms.Panel pnlAddEditShop;
private DevComponents.DotNetBar.PanelEx btnCancelAddEditShop;
private DevComponents.DotNetBar.PanelEx btnAddEditShop;
private System.Windows.Forms.Label label12;
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtShopPassword;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtShopLoginName;
private System.Windows.Forms.Label label18;
}
}
@@ -1,4 +1,5 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using AllBase.Model.Result.PDDResult;
using NaiBa.Util;
@@ -22,6 +23,7 @@ using TemuKJD.Extension;
using TemuKJD.PDDForms.AdminForms;
using TemuKJD.PDDForms.ShopForms;
using TemuKJD.ToolForms;
using TemuKJD.UserControls;
using TemuKJD.WXForms.ProductForms;
using Work;
@@ -40,6 +42,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public ConcurrentList<ShopLoginInfo> lstAdminPddShopInfo { get; set; } = new ConcurrentList<ShopLoginInfo>();
public ConcurrentList<ChanceProductResult> lstChanceProductResult { get; set; } = new ConcurrentList<ChanceProductResult>();
public List<ChanceCateInfo> lstChanceCateInfo { get; set; } = new List<ChanceCateInfo>();
bool isInit = false;
/// <summary>
/// 查找机会商品
/// </summary>
@@ -50,8 +55,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void PDDGetChanceProd_Load(object sender, EventArgs e)
{
pnlAddEditShop.Dock = DockStyle.Fill;
//if (IsAuthorityUser)
// btnShowMyCollect.Visible = true;
if (IsAuthorityUser)
{
btnRefreshShop.Visible = true;
btnAddShop.Visible = true;
btnImportShop.Visible = true;
}
this.panel2.Location = new Point(45, 55);
this.panel2.Width = Math.Max(10, this.panel2.Parent.Width - 90);
@@ -66,15 +78,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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.txtFilterNotes.Text = chanceProductConfig.SearchNotes;
this.txtFilterShopId.Text = chanceProductConfig.SearchShopId;
this.txtFilterShopName.Text = chanceProductConfig.SearchShopName;
this.txtNotes.TextChanged += Txt_TextChanged;
this.txtShopId.TextChanged += Txt_TextChanged;
this.txtShopName.TextChanged += Txt_TextChanged;
this.txtFilterNotes.TextChanged += Txt_TextChanged;
this.txtFilterShopId.TextChanged += Txt_TextChanged;
this.txtFilterShopName.TextChanged += Txt_TextChanged;
Task.Run(() => { ReacCate(); });
Task.Run(() => { ReadCate(); });
var tmpChanceProductLst = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<ChanceProductResult>>("pdd_chance_product_list_" + MainForm.ProcessCount);
if (tmpChanceProductLst == null)
@@ -122,7 +134,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
});
}
void ReacCate()
void ReadCate()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\pdd_chance_cate.cty");
if (!File.Exists(filePath))
@@ -170,9 +182,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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();
chanceProductConfig.SearchNotes = this.txtFilterNotes.Text.Trim();
chanceProductConfig.SearchShopId = this.txtFilterShopId.Text.Trim();
chanceProductConfig.SearchShopName = this.txtFilterShopName.Text.Trim();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_config", chanceProductConfig);
}
@@ -188,7 +200,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
else
{
var list = lstAdminPddShopInfo.Where(s => s.LoginStatus == "登录成功").ToList();
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
if (this.IsAuthorityUser && BaseClass.MainPath == "29wx")
{
list = GlobalConfig._29WxPddShopLoginList.Where(s => s.LoginStatus == "登录成功").ToList();
}
else
{
list = lstAdminPddShopInfo.Where(s => s.LoginStatus == "登录成功").ToList();
}
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l.ShopId == row.Cells["colShopId"]?.Value?.ToString()))
@@ -200,21 +220,99 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void PDDGetChanceProdForm_VisibleChanged(object sender, EventArgs e)
{
this.pbShopLoading.Visible = true;
SearchShop(this.ucSplitPage1.CurrentPage);
if (!isInit && this.Visible == true)
{
btnSearchShop_Click(null, null);
isInit = true;
}
}
private void btnRefreshShop_Click(object sender, EventArgs e)
private void btnSearchShop_Click(object sender, EventArgs e)
{
if (this.ucSplitPage1.CurrentPage != 1)
this.ucSplitPage1.CurrentPage = 1;
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
{
Search29WxPddShop();
}
else
SearchShop(1);
{
this.pbShopLoading.Visible = true;
if (this.ucSplitPage1.CurrentPage != 1)
this.ucSplitPage1.CurrentPage = 1;
else
SearchAdminShop(1);
}
}
public void SearchShop(int page)
public void Search29WxPddShop()
{
List<string> userShopIdList = dgvShop.Rows.Cast<DataGridViewRow>()
Invoke(new Action(() =>
{
this.pbShopLoading.Visible = true;
}));
Task.Run(() =>
{
List<string> selectShopIdList = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
.Select(r => r.Cells["colShopId"].Value.ParseToString() + r.Cells["colUserName"].Value.ParseToString()).ToList();
// 获取微信小店用户服务端拼多多店铺
var serverShopList = _29WxPddShopManage.Get29WxPddShop();
GlobalConfig._29WxPddShopLoginList.RemoveAll(s => !serverShopList.Any(ss => ss.UserName == s.UserName && ss.ShopId == s.ShopId));
foreach (var serverShop in serverShopList)
{
var localShop = GlobalConfig._29WxPddShopLoginList.FirstOrDefault(s => s.LoginName == serverShop.LoginName && s.ShopId == serverShop.ShopId);
if (localShop != null)
{
localShop.ShopAccount = serverShop.ShopAccount;
localShop.LoginName = serverShop.LoginName;
localShop.Password = serverShop.Password;
localShop.Cookies = serverShop.Cookies;
localShop.DbId = serverShop.DbId;
localShop.UserName = serverShop.UserName;
localShop.SubUserName = serverShop.SubUserName;
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.UpdateTime = serverShop.BuyApiAuth.UpdateTime;
localShop.BuyApiAuth.AppKey = serverShop.BuyApiAuth.AppKey;
localShop.BuyApiAuth.ExpiresTime = serverShop.BuyApiAuth.ExpiresTime;
localShop.BuyApiAuth.RefreshToken = serverShop.BuyApiAuth.RefreshToken;
localShop.PayStatus = serverShop.PayStatus;
localShop.GroupName = serverShop.GroupName;
localShop.Notes = serverShop.Notes;
localShop.LoginStatus = serverShop.LoginStatus;
localShop.LoginStatus2 = serverShop.LoginStatus2;
localShop.AntiContents = serverShop.AntiContents;
localShop.AddProductRemaining = serverShop.AddProductRemaining;
localShop.OperateSubSaName = serverShop.OperateSubSaName;
localShop.TrialUploadCount = Math.Max(0, serverShop.TrialUploadCount);
}
else
{
GlobalConfig._29WxPddShopLoginList.Add(serverShop);
}
}
Invoke(new Action(() =>
{
this.dgvShop.Rows.Clear();
}));
foreach (var shop in GlobalConfig._29WxPddShopLoginList)
{
displayShop(shop, selectShopIdList);
}
Invoke(new Action(() =>
{
this.pbShopLoading.Visible = false;
}));
});
}
public void SearchAdminShop(int page)
{
List<string> selectShopIdList = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
.Select(r => r.Cells["colShopId"].Value.ParseToString() + r.Cells["colUserName"].Value.ParseToString()).ToList();
if (InvokeRequired)
@@ -243,22 +341,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
foreach (var shop in lstAdminPddShopInfo)
{
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);
}));
displayShop(shop, selectShopIdList);
}
Invoke(new Action(() =>
@@ -268,6 +351,26 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}, cancellationTokenSource.Token);
}
void displayShop(ShopLoginInfo shop, List<string> selectShopIdList)
{
bool canUse = shop.LoginStatus == "登录成功";
Invoke(new Action(() =>
{
int rowIndex = this.dgvShop.Rows.Add(
selectShopIdList?.Contains(shop.ShopId + shop.UserName),
shop.UserName,
shop.LoginName,
shop.ShopId,
shop.ShopAccount.IsNullOrEmpty() ? shop.LoginName : shop.ShopAccount,
shop.Notes,
canUse ? "在线" : "掉线",
canUse,
string.Empty
);
displayShopStatus(shop);
}));
}
void displayShopStatus(ShopLoginInfo shop)
{
bool canUse = shop.LoginStatus == "登录成功";
@@ -293,9 +396,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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(',');
"&shop_ids=" + string.Join(",", txtFilterShopId.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) +
"&shop_names=" + string.Join(",", txtFilterShopName.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) +
"&search_notes=" + txtFilterNotes.Text.Trim().Trim(',');
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -316,12 +419,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void ucSplitPage1_PageChange(object obj)
{
SearchShop(this.ucSplitPage1.CurrentPage);
SearchAdminShop(this.ucSplitPage1.CurrentPage);
}
private void btnEmpty_Click(object sender, EventArgs e)
{
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
txtFilterNotes.Text = txtFilterShopId.Text = txtFilterShopName.Text = "";
btnRefreshShop_Click(null, null);
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -332,18 +436,43 @@ namespace TemuKJD.PDDForms.ProductSelectForms
string loginName = dgvShop.Rows[e.RowIndex].Cells["colShopLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
ShopLoginInfo shop = null;
shop = lstAdminPddShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId);
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
shop = GlobalConfig._29WxPddShopLoginList.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId);
else
shop = lstAdminPddShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId);
switch (headerText)
{
case "登录":
case "状态":
{
if (shop == null)
return;
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
{
_29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar);
if (shop.LoginStatus == "登录成功")
{
WXForms.ShopForms.WXPDDShopLoginForm shopLoginForm = new WXForms.ShopForms.WXPDDShopLoginForm(shop);
shopLoginForm.openType = WXForms.ShopForms.EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://mms.pinduoduo.com/home/";
shopLoginForm.Show();
}
else
{
WXForms.ShopForms.WXPDDShopLoginForm shopLoginForm = new WXForms.ShopForms.WXPDDShopLoginForm(shop);
shopLoginForm.openType = WXForms.ShopForms.EnumOpenType.login;
shopLoginForm.ShowDialog();
_29WxPddShopManage.Update29WxPddShopCookie(shop);
btnSearchShop_Click(null, null);
}
displayShopStatus(shop);
}
else
{
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (IsAuthorityUser)
displayShopStatus(shop);
else if (shop.LoginStatus == "登录成功")
if (shop.LoginStatus == "登录成功")
{
PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
@@ -355,7 +484,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
//shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
displayShopStatus(shop);
}
@@ -369,14 +497,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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)
{
@@ -437,27 +557,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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();
}));
GetAntiContent(shop);
}
else
{
@@ -481,7 +581,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var rst = GetChanceGoodsList(shop, searchTxt, searchLabels, "hot_index", page, cat1, cat2, price1, price2);
if (!rst.Contains("success\":true"))
{
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
_29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar);
else
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
while (shop == null || shop.LoginStatus != "登录成功")
{
shop = GetOneShop(shopIds);
@@ -560,6 +663,58 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}, cancellationTokenSource.Token);
}
void GetAntiContent(ShopLoginInfo shop)
{
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
{
WXForms.ShopForms.WXPDDShopLoginForm loginForm = null;
Invoke(new Action(() =>
{
this.panel2.SendToBack();
//this.panel2.BringToFront();
loginForm = new WXForms.ShopForms.WXPDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = WXForms.ShopForms.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
{
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();
}));
}
}
private void dgvChanceProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
@@ -670,28 +825,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
if (shop == null) break;
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();
}));
GetAntiContent(shop);
}
else
{
@@ -784,7 +918,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
try
{
var shopList = lstAdminPddShopInfo.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList();
var shopList = new List<ShopLoginInfo>();
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
shopList = GlobalConfig._29WxPddShopLoginList.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList();
else
shopList = lstAdminPddShopInfo.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList();
if (shopList.Count == 0)
{
Invoke(new Action(() =>
@@ -794,7 +932,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
return null;
}
var shop = shopList[Randomx.GetId(shopList.Count)];
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (IsAuthorityUser && BaseClass.MainPath == "29wx")
_29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar);
else
PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
return shop;
}
catch (Exception ex)
@@ -1146,6 +1287,287 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//WXUserCollectAuthProdListForm userCollectAuthProdListForm = new WXUserCollectAuthProdListForm();
//userCollectAuthProdListForm.ShowDialog();
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (!row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text))
{
row.Visible = false;
continue;
}
if (!row.Cells["colShopNotes"].Value.ParseToString().Contains(txtFilterNotes.Text))
{
row.Visible = false;
continue;
}
if (!row.Cells["colShopId"].Value.ParseToString().Contains(txtFilterShopId.Text))
{
row.Visible = false;
continue;
}
row.Visible = true;
}
}
private void btnImportShop_Click(object sender, EventArgs e)
{
Import29WxPddShop();
}
void Import29WxPddShop()
{
this.btnImportShop.Enabled = false;
string text = "店铺导入格式:\r\n\r\n1.店铺账号(手机/用户名/邮箱)-----店铺密码\r\n2.店铺账号-----密码-----备注\r\n\r\n多个店铺请每个店铺新起一行。";
BaseMsgForm.ShowInfo(text, "", FormLevel.LARGE);
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "文本文件(*.txt)|*.txt";
openFileDialog.RestoreDirectory = true;
openFileDialog.FilterIndex = 1;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
using (StreamReader sr = new StreamReader(openFileDialog.FileName, System.Text.Encoding.UTF8))
{
string fileName = openFileDialog.FileName;
string importStr = sr.ReadToEnd().Trim();
var strArr = importStr.Replace("\r", "").Split('\n');
for (int i = 0; i < strArr.Length; i++)
{
try
{
// 通用格式
if (strArr[i].Contains("-----"))
{
var productArr = strArr[i].Split(new string[] { "-----" }, StringSplitOptions.RemoveEmptyEntries);
if (productArr.Length > 1)
{
ShopLoginInfo shop = new ShopLoginInfo
{
LoginName = productArr[0],
Password = DataOpenSSL.EncryptString(productArr[1]),
};
if (productArr.Length > 2)
{
shop.Notes = productArr[2];
}
var shopInfo = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == shop.LoginName);
if (shopInfo != null)
{
shopInfo.Password = shop.Password;
shopInfo.GroupName = shop.GroupName;
}
else
GlobalConfig.ShopLoginList.Add(shop);
_29WxPddShopManage.AddMdf29WxPddShop(shop);
}
}
}
catch (Exception ex)
{
}
}
}
btnSearchShop_Click(null, null);
}
this.btnImportShop.Enabled = true;
}
private void btnAddShop_Click(object sender, EventArgs e)
{
this.pnlAddEditShop.Visible = true;
txtShopLoginName.Text = "";
txtShopPassword.Text = "";
txtNotes.Text = "";
btnAddEditShop.Text = "新增";
}
private void btnAddEditShop_Click(object sender, EventArgs e)
{
btnAddEditShop.Enabled = false;
var shop = new ShopLoginInfo();
shop.LoginName = txtShopLoginName.Text.Trim();
shop.Password = DataOpenSSL.EncryptString(this.txtShopPassword.Text.Trim());
shop.Notes = txtNotes.Text.Trim();
if (shop.LoginName.IsNullOrEmpty())
{
BaseMsgForm.ShowError("店铺登录名不能为空");
btnAddEditShop.Enabled = true;
return;
}
var addMdyRst = _29WxPddShopManage.AddMdf29WxPddShop(shop);
if (!addMdyRst.Contains("success"))
{
BaseMsgForm.ShowError(addMdyRst);
}
Task.Run(() =>
{
Thread.Sleep(500);
Invoke(new Action(() =>
{
btnAddEditShop.Enabled = true;
if (addMdyRst.Contains("success"))
pnlAddEditShop.Visible = false;
}));
btnSearchShop_Click(null, null);
});
}
private void btnCancelAddEditShop_Click(object sender, EventArgs e)
{
}
}
public class _29WxPddShopManage
{
public static string AddMdf29WxPddShop(ShopLoginInfo shop)
{
var url = BaseClass.BuildObjString("shop/wx_add_mdy_29wx_pdd_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&login_pass=" + GetHtml.UrlEncodeUtf8(shop.Password)
+ "&shop_id=" + shop.ShopId
+ "&shop_account=" + shop.ShopAccount
+ "&mall_id" + shop.MallId
+ "&cookie=" + shop.Cookies
+ "&cookie2=" + shop.Cookies2
+ "&group_name=" + GetHtml.UrlEncodeUtf8(shop.GroupName)
+ "&sub_user_name=" + GetHtml.UrlEncodeUtf8(shop.SubUserName)
+ "&notes=" + GetHtml.UrlEncodeUtf8(shop.Notes)
+ "&login_status=" + shop.LoginStatus
+ "&anti_contents=" + JsonHelper.SerializeObject(shop.AntiContents);
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg");
if (string.IsNullOrEmpty(msg))
msg = "店铺保存失败!";
return msg;
}
return "success";
}
public static string Update29WxPddShopCookie(ShopLoginInfo shop)
{
var url = BaseClass.BuildObjString("shop/wx_mdy_29wx_pdd_cookie_and_login_status");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&cookie=" + shop.Cookies
+ "&login_status=" + shop.LoginStatus;
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg");
if (string.IsNullOrEmpty(msg))
msg = "店铺cookie保存失败!";
return msg;
}
return "success";
}
public static List<ShopLoginInfo> Get29WxPddShop(List<string> shop_ids = null)
{
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
int page = 0;
while (true)
{
page++;
var url = BaseClass.BuildObjString("shop/wx_get_29wx_pdd_shop");
var data = UserLogin.GetSignaturex() + "&page=" + page;
if (shop_ids != null && shop_ids.Count > 0)
data += "&shop_ids=" + string.Join(",", shop_ids);
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"))
{
break;
}
var jArr = JObject.Parse(html)["data"];
if (jArr.Count() == 0)
break;
list.AddRange(ShopBLL.DeserializationShop(html));
}
return list;
}
public static void Check29WxPddShopLogin(ShopLoginInfo[] shops, StatusBarUserControl statusBar)
{
for (int i = 0; i < shops.Length; i++)
{
var shop = shops[i];
var localShops = shops.Where(s => s.ShopId == shop.ShopId);
// 先从服务端取最新cookie
var serverShops = Get29WxPddShop(new List<string>() { shop.ShopId });
var serverShop = serverShops.FirstOrDefault();
if (shop != null && serverShop != null)
{
shop.Cookies = serverShop.Cookies;
shop.Cookies2 = serverShop.Cookies2;
foreach (var sh in localShops)
{
sh.Cookies = serverShop.Cookies;
sh.Cookies2 = serverShop.Cookies2;
}
}
if (shop != null)
{
var loginResult = PDDShopListForm.CheckShopLogin(shop);
if (loginResult.Contains("\"success\":true") && !loginResult.Contains("\"login\":true"))
{
shop.Cookies = "[]";
foreach (var sh in localShops)
{
sh.LoginStatus = "未登录";
shop.Cookies = "[]";
}
}
else
{
foreach (var sh in localShops)
{
sh.LoginStatus = "登录成功";
sh.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
}
Update29WxPddShopCookie(shop); // 店铺cookie写入服务端
}
if (statusBar != null && statusBar.Created)
{
statusBar.Invoke(new Action(() =>
{
statusBar.lblTaskStatus.Text = "正在检测...";
statusBar.pgbTaskProgress.Value = i + 1;
statusBar.pgbTaskProgress.Maximum = shops.Length;
statusBar.pgbTaskProgress.Text = statusBar.pgbTaskProgress.Value + "/" + shops.Length;
}));
}
}
}
}
public class ChanceProductConfig