1拼多多商品分组 2拼多多登录逻辑优化

This commit is contained in:
wule committed 2025-10-01 16:05:39 +08:00
1 parent 8fb90422a2
commit 378170ffb5
36 files changed
+4272 -736

No files matched your search

+6 -4
View File
@@ -583,7 +583,7 @@ namespace TemuKJD.Extension
if (row.Index >= 0 && row.Cells[imgColumn].Value != null && row.Cells[imgColumn].Value != defaultBitmap)
continue;
Image image = null;
Image image = defaultBitmap;
if (row.Index >= 0)
{
string imgUrl = row.Cells[imgPathColumn]?.Value.ParseToString();
@@ -591,10 +591,12 @@ namespace TemuKJD.Extension
imgUrl = imgUrl.Replace("https://", "http://");
string getImgError = "";
if (!string.IsNullOrWhiteSpace(imgUrl))
{
image = GetHtml.GetUrlImg(imgUrl, out getImgError);
if (!string.IsNullOrEmpty(getImgError))
//BaseMsgForm.ShowError("图片加载失败 " + getImgError);
image = TemuKJD.Properties.Resources.errpic;
if (!string.IsNullOrEmpty(getImgError))
//BaseMsgForm.ShowError("图片加载失败 " + getImgError);
image = TemuKJD.Properties.Resources.errpic;
}
}
try
+9
View File
@@ -425,6 +425,12 @@
<Compile Include="PDDForms\ProductForms\PDDProductForm.Designer.cs">
<DependentUpon>PDDProductForm.cs</DependentUpon>
</Compile>
<Compile Include="PDDForms\ProductForms\PDDProductUpDownForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PDDForms\ProductForms\PDDProductUpDownForm.Designer.cs">
<DependentUpon>PDDProductUpDownForm.cs</DependentUpon>
</Compile>
<Compile Include="PDDForms\ProductSelectForms\PDDDBProdUserSelectCacheForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -887,6 +893,9 @@
<EmbeddedResource Include="PDDForms\ProductForms\PDDProductForm.resx">
<DependentUpon>PDDProductForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\ProductForms\PDDProductUpDownForm.resx">
<DependentUpon>PDDProductUpDownForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PDDForms\ProductSelectForms\PDDDBProdUserSelectCacheForm.resx">
<DependentUpon>PDDDBProdUserSelectCacheForm.cs</DependentUpon>
</EmbeddedResource>
@@ -39,6 +39,7 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label14 = new System.Windows.Forms.Label();
this.btnAdd = new DevComponents.DotNetBar.PanelEx();
this.btnSetSubSa = new DevComponents.DotNetBar.PanelEx();
this.btnReFission = new DevComponents.DotNetBar.PanelEx();
@@ -176,6 +177,7 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.label14);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
@@ -213,6 +215,17 @@
this.splitContainer1.SplitterDistance = 100;
this.splitContainer1.TabIndex = 2;
//
// label14
//
this.label14.AutoSize = true;
this.label14.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.label14.Location = new System.Drawing.Point(974, 75);
this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(307, 17);
this.label14.TabIndex = 640;
this.label14.Text = "备注:新的商品上传货号为固定前缀 EC + 上家商品SKC";
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1700,5 +1713,6 @@
private DevComponents.DotNetBar.PanelEx btnReFission;
private DevComponents.DotNetBar.PanelEx btnAdd;
private DevComponents.DotNetBar.PanelEx btnSetSubSa;
private System.Windows.Forms.Label label14;
}
}
@@ -156,7 +156,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
defaultBitmap,//prod.main_img,
prodSelect.fission_product_name,
string.IsNullOrWhiteSpace(prodSelect.change_cat_name) ? prodSelect.cat_name : prodSelect.change_cat_name.Split('>').LastOrDefault(),
prodSelect.ext_code,
"EC" + prodSelect.skc_id + (string.IsNullOrWhiteSpace(prodSelect.ext_code) ? "" : " \r\n" + prodSelect.ext_code),
prodSelect.status,
prodSelect.draft_id,
prodSelect.add_time.ToString("yy/MM/dd\r\n HH:mm"),
@@ -1154,7 +1154,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
foreach (var skcInfo in prodInfo.productSkcList)
{
ProductSkcReqsItem skcItem = new ProductSkcReqsItem();
skcItem.extCode = skcInfo.extCode;
//skcItem.extCode = skcInfo.extCode;
skcItem.extCode = "EC" + skcInfo.productSkcId;
skcItem.isBasePlate = 0;
skcItem.mainProductSkuSpecReqs = new List<MainProductSkuSpecReqsItem>();
foreach (var skuSpecInfo in skcInfo.productSkcSpecList)
+13 -1
View File
@@ -28,7 +28,19 @@ namespace TemuKJD.KJDForms.ShopForms
public partial class ShopListForm : BaseForm
{
public static List<ShopListForm> LstShopListFormInatance = new List<ShopListForm>();
public static ShopListForm Instance { get; set; } = null;
private static ShopListForm _instance = null;
public static ShopListForm Instance
{
get
{
if (_instance == null)
{
_instance = new ShopListForm();
}
return _instance;
}
set { _instance = value; }
}
public static bool IsOperate { get; set; } = false;
private bool isLoading { get; set; } = false;
+1 -1
View File
@@ -440,7 +440,7 @@ namespace TemuKJD
private void OpenWebBrower()
{
int count = 0;
while (true)
while (false)
{
Thread.Sleep(30);
if (count == 1000)
@@ -502,7 +502,7 @@ namespace TemuKJD.PDDForms.AdminForms
if (shop != null)
{
var loginResult = PDDShopListForm.GetShopStatus(shop);
var loginResult = PDDShopListForm.CheckShopLogin(shop);
if (!loginResult.Contains("\"success\":true"))
{
shop.Cookies = "empty=true;";
@@ -205,7 +205,9 @@ namespace TemuKJD.PDDForms.AdminForms
Invoke(new Action(() => { this.Close(); }));
}
else
{
break;
}
}
}
}
@@ -547,9 +549,13 @@ namespace TemuKJD.PDDForms.AdminForms
var data = responseData;
if (this.shop != null && data.Contains("\"success\":true"))
{
var username = BaseRegex.GetStringJson(ref data, "username");
var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
maskMobile = maskMobile.Split('*').Last();
if (!string.IsNullOrEmpty(maskMobile) && shop.LoginName.EndsWith(maskMobile))
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
return;
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
{
lstShopCompany.Clear();
var jObj = JObject.Parse(data);
+29 -25
View File
@@ -28,19 +28,21 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("商品认领");
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("活动报名");
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("商品管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("选品上传");
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("调价管理");
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("商品管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5,
treeNode6});
treeNode6,
treeNode7});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -131,35 +133,37 @@
this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tv.Name = "tv";
treeNode1.Name = "商品认领";
treeNode1.Text = "商品认领";
treeNode2.Name = "备货管理";
treeNode2.Text = "备货管理";
treeNode3.Name = "调价管理";
treeNode3.Text = "调价管理";
treeNode4.Name = "活动报名";
treeNode4.Text = "活动报名";
treeNode5.Name = "库存上传";
treeNode5.Text = "库存上传";
treeNode6.Name = "设置进货价";
treeNode6.Text = "设置进货价";
treeNode7.Name = "商品管理";
treeNode7.Text = "商品管理";
treeNode1.Name = "选品上传";
treeNode1.Text = "选品上传";
treeNode2.Name = "商品列表";
treeNode2.Text = "商品列表";
treeNode3.Name = "备货管理";
treeNode3.Text = "备货管理";
treeNode4.Name = "调价管理";
treeNode4.Text = "调价管理";
treeNode5.Name = "活动报名";
treeNode5.Text = "活动报名";
treeNode6.Name = "库存上传";
treeNode6.Text = "库存上传";
treeNode7.Name = "设置进货价";
treeNode7.Text = "设置进货价";
treeNode8.Name = "商品管理";
treeNode8.Text = "商品管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode7});
treeNode8});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 521);
this.tv.TabIndex = 1;
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
//
// ProductForm
// PDDProductForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(934, 521);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "ProductForm";
this.Name = "PDDProductForm";
this.Text = "UploadForms";
this.Load += new System.EventHandler(this.ShopForm_Load);
this.panel1.ResumeLayout(false);
@@ -20,6 +20,8 @@ namespace TemuKJD.PDDForms.ProductForms
//public Lazy<SaleStockUpForm> saleStockUpForm = new Lazy<SaleStockUpForm>();
//public Lazy<PriceManageForm> priceManageForm = new Lazy<PriceManageForm>();
public Lazy<PDDDBProdUserSelectForm> userSelectDbProductForm = new Lazy<PDDDBProdUserSelectForm>();
public Lazy<PDDProductUpDownForm> productUpDownForm = new Lazy<PDDProductUpDownForm>();
//public Lazy<ProductThirdUserSelectForm> userSelectThirdProductForm = new Lazy<ProductThirdUserSelectForm>();
//public Lazy<MarketingActivityForm> marketingActivityForm = new Lazy<MarketingActivityForm>();
//public Lazy<PurchasePriceForm> purchasePriceForm = new Lazy<PurchasePriceForm>();
@@ -33,7 +35,7 @@ namespace TemuKJD.PDDForms.ProductForms
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
List<string> hideName = new List<string>() { "备货管理", "调价管理", "活动报名", "库存上传", "设置进货价" };
List<string> hideName = new List<string>() { "备货管理", "调价管理", "活动报名", "库存上传", "设置进货价", /*"商品列表"*/ };
if (BaseClass.GroupId == 3)
{
@@ -84,9 +86,12 @@ namespace TemuKJD.PDDForms.ProductForms
//case "设置进货价":
// SetForm(purchasePriceForm.Value);
// break;
case "商品认领":
case "选品上传":
SetForm(userSelectDbProductForm.Value);
break;
case "商品列表":
SetForm(productUpDownForm.Value);
break;
//case "库存上传":
// SetForm(userSelectThirdProductForm.Value);
// break;
@@ -117,4 +117,25 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="panel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="panel3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="panel2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="splitContainer1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tv.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,987 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using AllBase.Model.Result.PDDResult;
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.ShopForms;
using TemuKJD.ToolForms;
namespace TemuKJD.PDDForms.ProductForms
{
public partial class PDDProductUpDownForm : Form
{
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
bool isInit = false;
List<PDDShopListProductInfo> lstPDDShopListProductInfo = new List<PDDShopListProductInfo>();
Dictionary<ShopLoginInfo, int> dicShopGetCount = new Dictionary<ShopLoginInfo, int>();
public PDDProductUpDownForm()
{
InitializeComponent();
}
private void PDDProductUpDownForm_Load(object sender, EventArgs e)
{
this.dgvShop.AddSelectorColumn("colSelect");
this.dgvProduct.AddSelectorColumn("colCheck");
dgvProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void PDDProductUpDownForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
{
RefreshShop();
isInit = true;
}
}
private void RefreshShop()
{
// 店铺Id
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
if (!string.IsNullOrEmpty(shopEntity.ShopId))
BindShop(shopEntity, selectIds);
}
}
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
{
if (shopEntity == null)
return;
if (selectShopId == null)
selectShopId = new List<string>();
bool canUse = shopEntity.LoginStatus == "登录成功";
//canUse = true; // 内部库不需要校验登录状态
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
{
this.dgvShop.Rows.Add(
!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
shopEntity.Notes,
"选择商品",
canUse ? "在线" : "掉线",
canUse,
shopEntity.AddProductRemaining,
string.Empty
);
}
else
{
row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red;
row.Cells["colCanUse"].Value = canUse;
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
string shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
break;
case "colLoginStatus":
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
if (shop.LoginStatus != "登录成功")
{
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
}
else
{
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.Show();
}
break;
}
}
private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText;
switch (headerText)
{
case "删除":
//if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
// return;
//var rst = DeleteProduct(dbId);
//if (rst)
//{
// SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
//}
break;
case "图片":
{
ShowImgForm imgFrom = new ShowImgForm(dgvProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString());
imgFrom.ShowDialog();
}
break;
case "":
dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value;
break;
default:
break;
}
}
private void btnSearch_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true && row.Cells["colLoginStatus"]?.Value.ParseToString() == "在线")
.Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择登录的店铺!");
return;
}
lstPDDShopListProductInfo.Clear();
dgvProduct.Rows.Clear();
var dgvRows = this.dgvShop.Rows.Cast<DataGridViewRow>();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString()));
foreach (var row in dgvRows)
{
row.Cells["colMessage"].Value = "";
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
var lstShopIdTemp = new List<string>();
lstShopIdTemp.AddRange(lstShopId);
int i = 0;
foreach (var shopId in lstShopIdTemp)
{
int sleepTime = 0;
int sleepTimeTotal = 0;
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
continue;
#region 检测登录
if (shop.LoginStatus == "登录成功")
{
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
}
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName);
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "店铺掉线";
row.Cells["colLoginStatus"].Value = "掉线";
row.Cells["colCanUse"].Value = false;
}
}));
continue;
}
#endregion
Invoke(new Action(() =>
{
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId);
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "正在查询";
}
}));
int page = 0;
int pageSize = 100;
int totalPage = 1;
bool isError = false;
string errMsg = "";
while (page < totalPage)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
page++;
int tryCount = 0;
tryAgain:
GetToken(shop);
if (page > 1)
Thread.Sleep(Randomx.GetId(3000, 7000));
int? isOnsale = null;
Invoke(new Action(() =>
{
if (cmbStatus.Text == "在售")
isOnsale = 1;
else if (cmbStatus.Text == "下架")
isOnsale = 0;
}));
//,"goods_id_list":["819969337632","819963304053"],"
List<string> goods_id_list = null;
if (!string.IsNullOrWhiteSpace(txtSPU.Text))
goods_id_list = txtSPU.Text.Split(new string[] { ",", " " }, StringSplitOptions.RemoveEmptyEntries).ToList();
List<string> out_goods_sn_list = null;
if (!string.IsNullOrWhiteSpace(txtExtCode.Text))
out_goods_sn_list = txtExtCode.Text.Split(new string[] { ",", " " }, StringSplitOptions.RemoveEmptyEntries).ToList();
List<string> skuSns = null;
if (!string.IsNullOrWhiteSpace(txtSkuSns.Text))
skuSns = new List<string>() { txtSkuSns.Text.Trim() };
string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, page, pageSize);
if (jsonStr.Contains("繁忙") && tryCount < 5)
{
tryCount++;
Thread.Sleep(Randomx.GetId(5000, 10000));
goto tryAgain;
}
if (!jsonStr.Contains("\"success\":true"))
{
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus != "登录成功")
break;
isError = true;
string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg");
if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr))
errMsg += sErr + " ";
page++;
continue;
}
if (jsonStr.Contains("\"success\":true"))
{
var jArr = new JArray();
try
{
var jObj = JObject.Parse(jsonStr);
jArr = jObj["result"]?["goods_list"] as JArray;
if (jArr == null)
jArr = new JArray();
}
catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); }
foreach (var item in jArr)
{
string sItem = item.ToString();
PDDShopListProductInfo pInfo = JsonHelper.DeserializeJsonToObject<PDDShopListProductInfo>(sItem); // 反序列化得到类
pInfo.shopId = shop.ShopId;
pInfo.shopName = shop.ShopAccount;
if (pInfo != null && !lstPDDShopListProductInfo.Any(a => a.id == pInfo.id))
{
lstPDDShopListProductInfo.Add(pInfo);
string url = pInfo.hd_url;
if (string.IsNullOrEmpty(url))
url = pInfo.image_url;
if (string.IsNullOrEmpty(url))
url = pInfo.hd_thumb_url;
if (string.IsNullOrEmpty(url))
url = pInfo.thumb_url;
Invoke(new Action(() =>
{
int rowId = this.dgvProduct.Rows.Add(
true,
shop.ShopId,
shop.ShopAccount,
url.Replace("https", "http"),
null, // 列表图片
pInfo.id,
pInfo.out_goods_sn,
pInfo.goods_name,
string.Join("~", pInfo.sku_group_price.Select(s => s / 100m)),
pInfo.quantity,
"", //收藏
"", //总销量
"", //30日销量
BaseClass.StampToDateTime(pInfo.created_at.ParseToInt()),
pInfo.is_onsale == true ? "在售" : "下架",
(pInfo.edit_check == null || pInfo.edit_check.check_status != 3)? "" : "商品修改被驳回",
"" // 操作结果,状态
);
dgvProduct.Rows[rowId].Height = 60;
}));
}
}
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
}
}
Invoke(new Action(() =>
{
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId);
if (!isError)
{
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "已查询";
}
}
else
{
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "查询失败 " + errMsg;
}
}
}));
}
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
string sRst = "查询结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消查询!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
}));
}, cancellationTokenSource.Token);
}
private string shop_goods_search(ShopLoginInfo shop, List<string> goods_id_list, string goods_name,
List<string> out_goods_sn_list = null, List<string> out_sku_sns = null, int? isOnsale = null, int page=1, int pageSize = 100)
{
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/vodka/v2/mms/query/display/mall/goodsList";
Dictionary<string, object> dicParam = new Dictionary<string, object>();
dicParam["out_goods_sn_gray_flag"] = true;
dicParam["pre_sale_type"] = 4;
dicParam["page"] = page;
dicParam["shipment_time_type"] = 3;
if (isOnsale != null)
dicParam["is_onsale"] = isOnsale;
if (goods_id_list != null)
dicParam["goods_id_list"] = goods_id_list;
if (out_goods_sn_list != null)
dicParam["out_goods_sn_list"] = out_goods_sn_list;
if (!string.IsNullOrEmpty(goods_name))
dicParam["goods_name"] = goods_name;
if (out_sku_sns != null)
dicParam["out_sku_sns"] = out_sku_sns;
dicParam["sold_out"] = 0;
dicParam["size"] = pageSize;
string body = JsonHelper.SerializeObject(dicParam); //"{\"out_goods_sn_gray_flag\":true,\"pre_sale_type\":4,\"page\":1,\"shipment_time_type\":3,\"is_onsale\":1,\"sold_out\":0," + "\"size\":" + pageSize + "}";
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && (result.Contains("当前请求频繁,请2小时后重试") || result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(500, 1500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
}
}
return result;
}
public string up_goods(ShopLoginInfo shop, string prodIds)
{
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/vodka/v2/mms/batchOnSale";
string body = @"{""goodsIds"":[" + prodIds + @"],""crawlerInfo"":""" + anti + @"""}";
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav&activeKeyNew=key_4";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(500, 1500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
body = @"{""goodsIds"":" + prodIds + @",""crawlerInfo"":""" + anti + @"""}";
result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti);
}
}
return result;
}
public string down_goods(ShopLoginInfo shop, string prodIds)
{
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/vodka/v2/mms/batchOffSale";
string body = @"{""goodsIds"":[" + prodIds + @"],""crawlerInfo"":""" + anti + @"""}";
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(500, 1500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
body = @"{""goodsIds"":" + prodIds + @",""crawlerInfo"":""" + anti + @"""}";
result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti);
}
}
return result;
}
public string del_goods(ShopLoginInfo shop, string prodIds)
{
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/plutus/api/plutus/bin/goods/delete/batch";
string body = @"{""goods_ids"":[" + prodIds + @"]}";
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav&activeKeyNew=key_4";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(500, 1500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
body = @"{""goodsIds"":" + prodIds + @",""crawlerInfo"":""" + anti + @"""}";
result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti);
}
}
return result;
}
private void btnCancel_Click(object sender, EventArgs e)
{
if (this.cancellationTokenSource != null)
this.cancellationTokenSource.Cancel();
}
private void btnDown_Click(object sender, EventArgs e)
{
var selectIds = dgvProduct.Rows.Cast<DataGridViewRow>()
.Where(row => row.Cells["colCheck"]?.Value.ParseToBool() == true)
.Select(r => r.Cells["colSpuId"]?.Value.ToString()).ToList();
var prodLst = lstPDDShopListProductInfo.Where(p => selectIds.Contains(p.id.ParseToString())).ToList();
var shopIdLst = prodLst.Select(p => p.shopId).Distinct().ToList();
var shopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId)).ToList();
if (prodLst.Count == 0 || shopLst.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺商品!");
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shop in shopLst)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shopProdLst = prodLst.Where(p => p.shopId == shop.ShopId).ToList();
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus != "登录成功")
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
continue;
}
while (shopProdLst.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
GetToken(shop);
var shopProdLstTmp = shopProdLst;
if (shopProdLstTmp.Count > 100)
shopProdLstTmp = shopProdLst.Take(100).ToList();
else
shopProdLstTmp = shopProdLst.Take(shopProdLst.Count).ToList();
var ids = string.Join(",", shopProdLstTmp.Select(p => p.id));
var result = down_goods(shop, ids);
for (int i = 0; i < 3 && result.Contains("http error:500"); i++)
{
Thread.Sleep(Randomx.GetId(6000, 15000));
result = up_goods(shop, ids);
}
if (result.Contains("会话已过期"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() =>
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
break;
}
if (!result.Contains("\"success\":true"))
{
var errMsg = BaseRegex.GetStringJson(ref result, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = result;
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = errMsg;
}
}));
}
else
{
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
prod.is_onsale = false;
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "已提交下架";
row.Cells["colIsOnSale"].Value = "下架";
}
}));
}
foreach (var prod in shopProdLstTmp)
{
shopProdLst.Remove(prod);
}
Thread.Sleep(Randomx.GetId(4500, 7500));
}
}
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
string sRst = "下架已结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消下架!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
}));
}, cancellationTokenSource.Token);
}
private void btnUp_Click(object sender, EventArgs e)
{
var selectIds = dgvProduct.Rows.Cast<DataGridViewRow>()
.Where(row => row.Cells["colCheck"]?.Value.ParseToBool() == true)
.Select(r => r.Cells["colSpuId"]?.Value.ToString()).ToList();
var prodLst = lstPDDShopListProductInfo.Where(p => selectIds.Contains(p.id.ParseToString())).ToList();
var shopIdLst = prodLst.Select(p => p.shopId).Distinct().ToList();
var shopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId)).ToList();
if (prodLst.Count == 0 || shopLst.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺商品!");
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shop in shopLst)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shopProdLst = prodLst.Where(p => p.shopId == shop.ShopId).ToList();
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus != "登录成功")
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
continue;
}
//while (shopProdLst.FirstOrDefault(p=>p.is_onsale == true) != null)
//{
// var prod = shopProdLst.FirstOrDefault(p => p.is_onsale == true);
// var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
// row.Cells["colOpResult"].Value = "已在售无需上架";
// shopProdLst.Remove(prod);
//}
while (shopProdLst.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
GetToken(shop);
var shopProdLstTmp = shopProdLst;
if (shopProdLstTmp.Count > 100)
shopProdLstTmp = shopProdLst.Take(100).ToList();
else
shopProdLstTmp = shopProdLst.Take(shopProdLst.Count).ToList();
var ids = string.Join(",", shopProdLstTmp.Select(p => p.id));
var result = up_goods(shop, ids);
for (int i = 0; i < 3 && result.Contains("http error:500"); i++)
{
Thread.Sleep(Randomx.GetId(6000, 15000));
result = up_goods(shop, ids);
}
if (result.Contains("会话已过期"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() =>
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
break;
}
if (!result.Contains("\"success\":true"))
{
var errMsg = BaseRegex.GetStringJson(ref result, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = result;
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = errMsg;
}
}));
}
else
{
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
prod.is_onsale = true;
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "已提交上架";
row.Cells["colIsOnSale"].Value = "在售";
}
}));
}
foreach (var prod in shopProdLstTmp)
{
shopProdLst.Remove(prod);
}
Thread.Sleep(Randomx.GetId(4500, 7500));
}
}
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
string sRst = "上架已结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消上架!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
}));
}, cancellationTokenSource.Token);
}
public void GetToken(ShopLoginInfo shop)
{
if (!dicShopGetCount.Keys.Contains(shop))
dicShopGetCount[shop] = 100;
else
dicShopGetCount[shop]++;
if (dicShopGetCount[shop] > 5)
{
dicShopGetCount[shop] = 0;
while (PDDShopLoginForm.shopLoginInstance != null && !PDDShopLoginForm.shopLoginInstance.IsDisposed)
{
Thread.Sleep(500);
}
Invoke(new Action(() =>
{
this.panel1.SendToBack();
PDDShopLoginForm loginForm = new PDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
}));
int sleepTime = Randomx.GetId(2000, 3000);
Thread.Sleep(sleepTime);
Invoke(new Action(() =>
{
if (PDDShopLoginForm.shopLoginInstance != null)
PDDShopLoginForm.shopLoginInstance.Dispose();
}));
}
}
private void btnDelSelect_Click(object sender, EventArgs e)
{
var selectIds = dgvProduct.Rows.Cast<DataGridViewRow>()
.Where(row => row.Cells["colCheck"]?.Value.ParseToBool() == true)
.Select(r => r.Cells["colSpuId"]?.Value.ToString()).ToList();
var prodLst = lstPDDShopListProductInfo.Where(p => selectIds.Contains(p.id.ParseToString())).ToList();
var shopIdLst = prodLst.Select(p => p.shopId).Distinct().ToList();
var shopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId)).ToList();
if (prodLst.Count == 0 || shopLst.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺商品!");
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shop in shopLst)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shopProdLst = prodLst.Where(p => p.shopId == shop.ShopId).ToList();
PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus != "登录成功")
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
continue;
}
while (shopProdLst.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
GetToken(shop);
var shopProdLstTmp = shopProdLst;
if (shopProdLstTmp.Count > 100)
shopProdLstTmp = shopProdLst.Take(100).ToList();
else
shopProdLstTmp = shopProdLst.Take(shopProdLst.Count).ToList();
var ids = string.Join(",", shopProdLstTmp.Select(p => p.id));
string result = "";
// 先下架
if (shopProdLstTmp.Any(p => p.is_onsale == true))
{
result = down_goods(shop, ids);
for (int i = 0; i < 3 && result.Contains("http error:500"); i++)
{
Thread.Sleep(Randomx.GetId(6000, 15000));
result = up_goods(shop, ids);
}
if (result.Contains("会话已过期"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() =>
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
break;
}
if (!result.Contains("\"success\":true"))
{
var errMsg = BaseRegex.GetStringJson(ref result, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = result;
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = errMsg;
}
}));
}
Thread.Sleep(Randomx.GetId(4000, 7000));
}
// 删除
result = del_goods(shop, ids);
for (int i = 0; i < 3 && result.Contains("http error:500"); i++)
{
Thread.Sleep(Randomx.GetId(6000, 15000));
result = up_goods(shop, ids);
}
if (result.Contains("会话已过期"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() =>
{
foreach (var prod in shopProdLst)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
break;
}
if (!result.Contains("\"success\":true"))
{
var errMsg = BaseRegex.GetStringJson(ref result, "error_msg");
if (string.IsNullOrEmpty(errMsg))
errMsg = result;
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = errMsg;
}
}));
}
else
{
Invoke(new Action(() =>
{
foreach (var prod in shopProdLstTmp)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => prod.id.ToString() == r.Cells["colSpuId"]?.Value.ToString());
row.Cells["colOpResult"].Value = "已提交删除";
row.Cells["colIsOnSale"].Value = "已删除";
}
}));
}
foreach (var prod in shopProdLstTmp)
{
shopProdLst.Remove(prod);
}
Thread.Sleep(Randomx.GetId(4500, 7500));
}
}
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
string sRst = "删除已结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消删除!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
}));
}, cancellationTokenSource.Token);
}
private void btnClearDgv_Click(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,198 @@
<?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="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="colSelectProduct.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="colRemaining.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="colSupplierId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSupplierName.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="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colExtCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.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="colStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colFavorites.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSales.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSalesThirtyDays.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAddTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colIsOnSale.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colOpResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -48,7 +48,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var prodTmp = GetProductDetail(dbProd.id.ToString());
dbProd.sku_img_replace_base64 = prodTmp.sku_img_replace_base64;
if (!string.IsNullOrWhiteSpace(dbProd.sku_img_replace_base64))
dbProd.sku_img_replace_url = prodTmp.sku_img_replace_url;
if (!string.IsNullOrWhiteSpace(dbProd.sku_img_replace_url))
this.pictureBox2.ImageLocation = dbProd.sku_img_replace_url;
else if (!string.IsNullOrWhiteSpace(dbProd.sku_img_replace_base64))
this.pictureBox2.Image = Base64ChangeImgUrl.Base64ToImage(dbProd.sku_img_replace_base64); // Convert.FromBase64String(dbProd.sku_img_replace_base64);
}
}
@@ -38,6 +38,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDDBProdListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.btnSetGroup = new DevComponents.DotNetBar.PanelEx();
this.btnDelSelect = new TemuKJD.UserControls.ButtonEx();
this.cmbSort = new System.Windows.Forms.ComboBox();
this.btnSelect = new TemuKJD.UserControls.ButtonEx();
@@ -54,13 +56,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtCat = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.lblGroup = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.txtSKC = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFromShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -71,6 +72,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_skc_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPriceText = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -83,6 +85,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.txtGroup = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -106,6 +112,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.txtGroup);
this.splitContainer1.Panel1.Controls.Add(this.label7);
this.splitContainer1.Panel1.Controls.Add(this.cmbGroup);
this.splitContainer1.Panel1.Controls.Add(this.btnSetGroup);
this.splitContainer1.Panel1.Controls.Add(this.btnDelSelect);
this.splitContainer1.Panel1.Controls.Add(this.cmbSort);
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
@@ -122,6 +132,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1.Panel1.Controls.Add(this.txtCat);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.label6);
this.splitContainer1.Panel1.Controls.Add(this.lblGroup);
//
// splitContainer1.Panel2
//
@@ -130,6 +141,38 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1.SplitterDistance = 53;
this.splitContainer1.TabIndex = 1;
//
// cmbGroup
//
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Location = new System.Drawing.Point(981, 16);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(85, 25);
this.cmbGroup.TabIndex = 640;
//
// btnSetGroup
//
this.btnSetGroup.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSetGroup.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetGroup.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetGroup.Location = new System.Drawing.Point(1068, 17);
this.btnSetGroup.Name = "btnSetGroup";
this.btnSetGroup.Size = new System.Drawing.Size(84, 23);
this.btnSetGroup.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSetGroup.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSetGroup.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSetGroup.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSetGroup.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSetGroup.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSetGroup.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSetGroup.Style.GradientAngle = 90;
this.btnSetGroup.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSetGroup.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetGroup.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetGroup.TabIndex = 639;
this.btnSetGroup.Text = "批量设置分组";
this.btnSetGroup.Click += new System.EventHandler(this.btnSetGroup_Click);
//
// btnDelSelect
//
this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -138,7 +181,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnDelSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelSelect.ForeColor = System.Drawing.Color.White;
this.btnDelSelect.Location = new System.Drawing.Point(1156, 14);
this.btnDelSelect.Location = new System.Drawing.Point(1161, 15);
this.btnDelSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnDelSelect.Name = "btnDelSelect";
this.btnDelSelect.Size = new System.Drawing.Size(91, 26);
@@ -154,7 +197,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"认领总数"});
this.cmbSort.Location = new System.Drawing.Point(887, 16);
this.cmbSort.Location = new System.Drawing.Point(857, 16);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(79, 25);
this.cmbSort.TabIndex = 448;
@@ -168,7 +211,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelect.ForeColor = System.Drawing.Color.White;
this.btnSelect.Location = new System.Drawing.Point(1251, 14);
this.btnSelect.Location = new System.Drawing.Point(1256, 15);
this.btnSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(91, 26);
@@ -180,15 +223,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtNotes
//
this.txtNotes.Location = new System.Drawing.Point(569, 17);
this.txtNotes.Location = new System.Drawing.Point(498, 17);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(90, 23);
this.txtNotes.Size = new System.Drawing.Size(77, 23);
this.txtNotes.TabIndex = 439;
//
// lblNotes
//
this.lblNotes.AutoSize = true;
this.lblNotes.Location = new System.Drawing.Point(535, 20);
this.lblNotes.Location = new System.Drawing.Point(464, 20);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Size = new System.Drawing.Size(44, 17);
this.lblNotes.TabIndex = 440;
@@ -196,15 +239,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtSPU
//
this.txtSPU.Location = new System.Drawing.Point(57, 16);
this.txtSPU.Location = new System.Drawing.Point(54, 16);
this.txtSPU.Name = "txtSPU";
this.txtSPU.Size = new System.Drawing.Size(90, 23);
this.txtSPU.Size = new System.Drawing.Size(77, 23);
this.txtSPU.TabIndex = 434;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(11, 19);
this.label5.Location = new System.Drawing.Point(8, 19);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(57, 17);
this.label5.TabIndex = 435;
@@ -215,7 +258,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
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(729, 15);
this.pnlEmpty.Location = new System.Drawing.Point(739, 15);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 26);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -241,10 +284,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.Location = new System.Drawing.Point(668, 15);
this.btnSearch.Location = new System.Drawing.Point(690, 15);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 26);
this.btnSearch.Size = new System.Drawing.Size(46, 26);
this.btnSearch.TabIndex = 424;
this.btnSearch.Text = "搜索";
this.btnSearch.UseVisualStyleBackColor = false;
@@ -252,15 +295,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtExtCode
//
this.txtExtCode.Location = new System.Drawing.Point(441, 17);
this.txtExtCode.Location = new System.Drawing.Point(387, 17);
this.txtExtCode.Name = "txtExtCode";
this.txtExtCode.Size = new System.Drawing.Size(90, 23);
this.txtExtCode.Size = new System.Drawing.Size(77, 23);
this.txtExtCode.TabIndex = 429;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(407, 20);
this.label4.Location = new System.Drawing.Point(353, 20);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 430;
@@ -268,15 +311,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtProdName
//
this.txtProdName.Location = new System.Drawing.Point(313, 17);
this.txtProdName.Location = new System.Drawing.Point(276, 17);
this.txtProdName.Name = "txtProdName";
this.txtProdName.Size = new System.Drawing.Size(90, 23);
this.txtProdName.Size = new System.Drawing.Size(77, 23);
this.txtProdName.TabIndex = 427;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(279, 20);
this.label3.Location = new System.Drawing.Point(242, 20);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 428;
@@ -284,15 +327,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtCat
//
this.txtCat.Location = new System.Drawing.Point(185, 17);
this.txtCat.Location = new System.Drawing.Point(165, 17);
this.txtCat.Name = "txtCat";
this.txtCat.Size = new System.Drawing.Size(90, 23);
this.txtCat.Size = new System.Drawing.Size(77, 23);
this.txtCat.TabIndex = 425;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(151, 20);
this.label2.Location = new System.Drawing.Point(131, 20);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 426;
@@ -301,12 +344,21 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(830, 20);
this.label6.Location = new System.Drawing.Point(800, 20);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(68, 17);
this.label6.TabIndex = 449;
this.label6.Text = "排序方式:";
//
// lblGroup
//
this.lblGroup.AutoSize = true;
this.lblGroup.Location = new System.Drawing.Point(948, 20);
this.lblGroup.Name = "lblGroup";
this.lblGroup.Size = new System.Drawing.Size(44, 17);
this.lblGroup.TabIndex = 641;
this.lblGroup.Text = "分组:";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -389,6 +441,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_skc_id,
this.col_cat_name,
this.col_ext_code,
this.colGroup,
this.colPriceText,
this.colAddTimes,
this.colSelectTotalCount,
@@ -411,31 +464,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll);
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(996, 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(362, 25);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1358, 25);
this.statusBar.TabIndex = 5;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -511,6 +539,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_ext_code.Name = "col_ext_code";
this.col_ext_code.ReadOnly = true;
//
// colGroup
//
this.colGroup.HeaderText = "分组";
this.colGroup.Name = "colGroup";
this.colGroup.ReadOnly = true;
//
// colPriceText
//
this.colPriceText.FillWeight = 60F;
@@ -606,6 +640,47 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(996, 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(362, 25);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1358, 25);
this.statusBar.TabIndex = 5;
//
// txtGroup
//
this.txtGroup.Location = new System.Drawing.Point(610, 17);
this.txtGroup.Name = "txtGroup";
this.txtGroup.Size = new System.Drawing.Size(77, 23);
this.txtGroup.TabIndex = 647;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(576, 20);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 648;
this.label7.Text = "分组:";
//
// PDDDBProdListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -661,6 +736,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.ComboBox cmbSort;
private System.Windows.Forms.Label label6;
private UserControls.ButtonEx btnDelSelect;
private System.Windows.Forms.ComboBox cmbGroup;
private DevComponents.DotNetBar.PanelEx btnSetGroup;
private System.Windows.Forms.Label lblGroup;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId;
@@ -671,6 +749,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn col_skc_id;
private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name;
private System.Windows.Forms.DataGridViewTextBoxColumn col_ext_code;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroup;
private System.Windows.Forms.DataGridViewTextBoxColumn colPriceText;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount;
@@ -683,5 +762,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private System.Windows.Forms.TextBox txtGroup;
private System.Windows.Forms.Label label7;
}
}
@@ -55,6 +55,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//this.txtNotes.Visible = true;
btnDelSelect.Visible = true;
lblGroup.Visible = cmbGroup.Visible = btnSetGroup.Visible = true;
GetGroup();
}
else
{
@@ -71,6 +75,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//this.txtNotes.Visible = false;
btnDelSelect.Visible = false;
lblGroup.Visible = cmbGroup.Visible = btnSetGroup.Visible = false;
}
btnSelect.Visible = false;
@@ -142,6 +148,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
prod.skc_id,
prod.cat_name,
prod.ext_code,
prod.group,
prod.price_text,
prod.select_count,
prod.select_total_count,
@@ -235,6 +242,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"&search_notes=" + txtNotes.Text.Trim() +
"&search_cat=" + txtCat.Text.Trim() +
"&search_ext_code=" + txtExtCode.Text.Trim() +
"&search_group=" + txtGroup.Text.Trim() +
"&search_prod_name=" + txtProdName.Text.Trim();
if (shop != null && !string.IsNullOrEmpty(shop.ShopId))
{
@@ -303,6 +311,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.txtSKC.Text = "";
this.txtSPU.Text = "";
this.txtNotes.Text = "";
this.txtGroup.Text = "";
}
private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -574,5 +583,78 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}));
});
}
private void btnSetGroup_Click(object sender, EventArgs e)
{
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true);
var lstProdDbId = rows.Select(r => r.Cells["col_db_id"]?.Value.ToString()).ToList();
var prodList = this.lstTemuDbProduct.Where(p => lstProdDbId.Contains(p.id.ParseToString())).ToList();
if (prodList.Count <= 0)
{
BaseMsgForm.ShowError("请选择商品!");
return;
}
string in_db_ids=string.Join(",", lstProdDbId);
var url = BaseClass.BuildObjString("product/mdy_db_product");
var data = UserLogin.GetSignaturex() +
"&in_db_ids=" + in_db_ids + "&group=" + cmbGroup.Text.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("\"code\":200"))
{
BaseMsgForm.ShowError("商品分组编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}
else
{
foreach (var prod in prodList)
{
prod.group = cmbGroup.Text.Trim();
}
foreach (var row in rows)
{
row.Cells["colGroup"].Value = cmbGroup.Text.Trim();
}
}
GetGroup();
}
void GetGroup()
{
var url = BaseClass.BuildObjString("product/get_product_groups");
var data = UserLogin.GetSignaturex();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
//BaseMsgForm.ShowError("商品分组编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
}
else
{
//foreach (var prod in prodList)
//{
// prod.group = cmbGroup.Text.Trim();
//}
//foreach (var row in rows)
//{
// row.Cells["colGroup"].Value = cmbGroup.Text.Trim();
//}
this.cmbGroup.Items.Clear();
var groups = BaseRegex.GetStringJson(ref html, "data");
foreach (var item in groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
this.cmbGroup.Items.Add(item);
}
this.cmbGroup.Items.Add("");
}
}
}
}
@@ -147,6 +147,9 @@
<metadata name="col_ext_code.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="colPriceText.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -30,13 +30,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
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 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.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkKeepChanceGoodsImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.pbSkuImg = new System.Windows.Forms.PictureBox();
this.label19 = new System.Windows.Forms.Label();
this.txtLowPriceSkuPrice = new System.Windows.Forms.TextBox();
this.txtLowPriceSkuName = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.txtAddTimesFake = new System.Windows.Forms.TextBox();
this.chkActivity = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label17 = new System.Windows.Forms.Label();
@@ -63,12 +69,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.label9 = new System.Windows.Forms.Label();
this.chkStepAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkChance = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLowPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.lblLowPriceSkuImg = new System.Windows.Forms.Label();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.panelEx3 = new DevComponents.DotNetBar.PanelEx();
this.txtExtCodeFilter = new System.Windows.Forms.TextBox();
this.btnClearUpload = new DevComponents.DotNetBar.PanelEx();
this.lblWaitToUp = new System.Windows.Forms.Label();
this.lblGoodsCount = new System.Windows.Forms.Label();
this.txtAddCount = new System.Windows.Forms.TextBox();
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
this.label16 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
@@ -119,6 +130,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
this.colSkuFakeImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSkuFakeImg = new System.Windows.Forms.DataGridViewImageColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -134,14 +147,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.txtExtCodeFilter = new System.Windows.Forms.TextBox();
this.panelEx3 = new DevComponents.DotNetBar.PanelEx();
this.label16 = new System.Windows.Forms.Label();
this.txtGroupFilter = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbSkuImg)).BeginInit();
this.panel4.SuspendLayout();
this.panel3.SuspendLayout();
this.fPnlPriceRule.SuspendLayout();
@@ -182,7 +195,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1344, 546);
this.splitContainer1.Size = new System.Drawing.Size(1350, 546);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 11;
//
@@ -193,6 +206,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.chkKeepChanceGoodsImg);
this.ucGroupBoxEx2.Controls.Add(this.pbSkuImg);
this.ucGroupBoxEx2.Controls.Add(this.label19);
this.ucGroupBoxEx2.Controls.Add(this.txtLowPriceSkuPrice);
this.ucGroupBoxEx2.Controls.Add(this.txtLowPriceSkuName);
this.ucGroupBoxEx2.Controls.Add(this.label18);
this.ucGroupBoxEx2.Controls.Add(this.txtAddTimesFake);
this.ucGroupBoxEx2.Controls.Add(this.chkActivity);
this.ucGroupBoxEx2.Controls.Add(this.label17);
@@ -215,20 +234,87 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.chkStepAddPrice);
this.ucGroupBoxEx2.Controls.Add(this.chkChance);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(485, 2);
this.ucGroupBoxEx2.Controls.Add(this.chkLowPriceSku);
this.ucGroupBoxEx2.Controls.Add(this.lblLowPriceSkuImg);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(476, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(857, 140);
this.ucGroupBoxEx2.Size = new System.Drawing.Size(872, 140);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
// chkKeepChanceGoodsImg
//
this.chkKeepChanceGoodsImg.AutoSize = true;
this.chkKeepChanceGoodsImg.Checked = true;
this.chkKeepChanceGoodsImg.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkKeepChanceGoodsImg.Location = new System.Drawing.Point(535, 65);
this.chkKeepChanceGoodsImg.Name = "chkKeepChanceGoodsImg";
this.chkKeepChanceGoodsImg.Size = new System.Drawing.Size(135, 21);
this.chkKeepChanceGoodsImg.TabIndex = 669;
this.chkKeepChanceGoodsImg.Text = "保留新接口上货标识";
this.chkKeepChanceGoodsImg.UseVisualStyleBackColor = true;
this.chkKeepChanceGoodsImg.CheckedChanged += new System.EventHandler(this.chkKeepChanceGoodsImg_CheckedChanged);
//
// pbSkuImg
//
this.pbSkuImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pbSkuImg.Location = new System.Drawing.Point(503, 108);
this.pbSkuImg.Name = "pbSkuImg";
this.pbSkuImg.Size = new System.Drawing.Size(27, 27);
this.pbSkuImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbSkuImg.TabIndex = 664;
this.pbSkuImg.TabStop = false;
//
// label19
//
this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(749, 113);
this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(20, 17);
this.label19.TabIndex = 663;
this.label19.Text = "元";
//
// txtLowPriceSkuPrice
//
this.txtLowPriceSkuPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtLowPriceSkuPrice.Location = new System.Drawing.Point(717, 110);
this.txtLowPriceSkuPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtLowPriceSkuPrice.Name = "txtLowPriceSkuPrice";
this.txtLowPriceSkuPrice.Size = new System.Drawing.Size(32, 23);
this.txtLowPriceSkuPrice.TabIndex = 658;
this.txtLowPriceSkuPrice.Text = "5";
//
// txtLowPriceSkuName
//
this.txtLowPriceSkuName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtLowPriceSkuName.Location = new System.Drawing.Point(611, 110);
this.txtLowPriceSkuName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtLowPriceSkuName.Name = "txtLowPriceSkuName";
this.txtLowPriceSkuName.Size = new System.Drawing.Size(50, 23);
this.txtLowPriceSkuName.TabIndex = 662;
this.txtLowPriceSkuName.Text = "福利款";
//
// label18
//
this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(661, 113);
this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(56, 17);
this.label18.TabIndex = 661;
this.label18.Text = "保底价格";
//
// txtAddTimesFake
//
this.txtAddTimesFake.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddTimesFake.Location = new System.Drawing.Point(694, 63);
this.txtAddTimesFake.Location = new System.Drawing.Point(662, 87);
this.txtAddTimesFake.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddTimesFake.Name = "txtAddTimesFake";
this.txtAddTimesFake.Size = new System.Drawing.Size(31, 23);
this.txtAddTimesFake.Size = new System.Drawing.Size(32, 23);
this.txtAddTimesFake.TabIndex = 645;
this.txtAddTimesFake.Text = "3";
//
@@ -237,7 +323,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkActivity.AutoSize = true;
this.chkActivity.Checked = true;
this.chkActivity.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkActivity.Location = new System.Drawing.Point(567, 64);
this.chkActivity.Location = new System.Drawing.Point(535, 88);
this.chkActivity.Name = "chkActivity";
this.chkActivity.Size = new System.Drawing.Size(135, 21);
this.chkActivity.TabIndex = 648;
@@ -249,7 +335,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(725, 66);
this.label17.Location = new System.Drawing.Point(693, 90);
this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(20, 17);
@@ -261,7 +347,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkSizeSpec.AutoSize = true;
this.chkSizeSpec.Checked = true;
this.chkSizeSpec.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkSizeSpec.Location = new System.Drawing.Point(567, 87);
this.chkSizeSpec.Location = new System.Drawing.Point(535, 42);
this.chkSizeSpec.Name = "chkSizeSpec";
this.chkSizeSpec.Size = new System.Drawing.Size(111, 21);
this.chkSizeSpec.TabIndex = 635;
@@ -272,7 +358,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// chkAddMorePriceFirst
//
this.chkAddMorePriceFirst.AutoSize = true;
this.chkAddMorePriceFirst.Location = new System.Drawing.Point(567, 111);
this.chkAddMorePriceFirst.Location = new System.Drawing.Point(312, 111);
this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst";
this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21);
this.chkAddMorePriceFirst.TabIndex = 625;
@@ -286,7 +372,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearDgv.Location = new System.Drawing.Point(754, 92);
this.btnClearDgv.Location = new System.Drawing.Point(769, 92);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(84, 23);
@@ -311,18 +397,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label14.AutoSize = true;
this.label14.ForeColor = System.Drawing.SystemColors.GrayText;
this.label14.Location = new System.Drawing.Point(317, 113);
this.label14.Location = new System.Drawing.Point(12, 62);
this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(248, 17);
this.label14.Size = new System.Drawing.Size(68, 51);
this.label14.TabIndex = 599;
this.label14.Text = "说明:阶梯加价未勾选或不满足,按默认加价";
this.label14.Text = "阶梯加价未\r\n勾选或条件\r\n不满足,按";
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(298, 113);
this.label15.Location = new System.Drawing.Point(289, 113);
this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
@@ -332,7 +418,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtSinglePriceAdd
//
this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtSinglePriceAdd.Location = new System.Drawing.Point(267, 110);
this.txtSinglePriceAdd.Location = new System.Drawing.Point(258, 110);
this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtSinglePriceAdd.Name = "txtSinglePriceAdd";
this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23);
@@ -346,7 +432,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Left)));
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panel4.Controls.Add(this.panel3);
this.panel4.Location = new System.Drawing.Point(80, 18);
this.panel4.Location = new System.Drawing.Point(80, 17);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(450, 89);
this.panel4.TabIndex = 577;
@@ -454,7 +540,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(199, 113);
this.label11.Location = new System.Drawing.Point(190, 113);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(68, 17);
@@ -466,7 +552,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblNewAddPrice.AutoSize = true;
this.lblNewAddPrice.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblNewAddPrice.ForeColor = System.Drawing.SystemColors.HotTrack;
this.lblNewAddPrice.Location = new System.Drawing.Point(24, 47);
this.lblNewAddPrice.Location = new System.Drawing.Point(24, 42);
this.lblNewAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblNewAddPrice.Name = "lblNewAddPrice";
this.lblNewAddPrice.Size = new System.Drawing.Size(56, 17);
@@ -477,7 +563,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtAddMorePrice
//
this.txtAddMorePrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddMorePrice.Location = new System.Drawing.Point(168, 110);
this.txtAddMorePrice.Location = new System.Drawing.Point(159, 110);
this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddMorePrice.Name = "txtAddMorePrice";
this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23);
@@ -488,7 +574,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// txtAddTimes
//
this.txtAddTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtAddTimes.Location = new System.Drawing.Point(93, 110);
this.txtAddTimes.Location = new System.Drawing.Point(84, 110);
this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddTimes.Name = "txtAddTimes";
this.txtAddTimes.Size = new System.Drawing.Size(31, 23);
@@ -500,7 +586,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(124, 113);
this.label10.Location = new System.Drawing.Point(115, 113);
this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(44, 17);
@@ -513,7 +599,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStop.Location = new System.Drawing.Point(754, 62);
this.btnStop.Location = new System.Drawing.Point(769, 62);
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(84, 23);
@@ -540,7 +626,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpload.Location = new System.Drawing.Point(754, 32);
this.btnUpload.Location = new System.Drawing.Point(769, 32);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(84, 23);
this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -560,17 +646,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtStockNum
//
this.txtStockNum.Location = new System.Drawing.Point(587, 20);
this.txtStockNum.Location = new System.Drawing.Point(587, 19);
this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtStockNum.Name = "txtStockNum";
this.txtStockNum.Size = new System.Drawing.Size(31, 23);
this.txtStockNum.Size = new System.Drawing.Size(32, 23);
this.txtStockNum.TabIndex = 530;
this.txtStockNum.Text = "99";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(531, 23);
this.label4.Location = new System.Drawing.Point(531, 22);
this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
@@ -581,17 +667,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(9, 113);
this.label9.Location = new System.Drawing.Point(12, 113);
this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(84, 17);
this.label9.Size = new System.Drawing.Size(68, 17);
this.label9.TabIndex = 533;
this.label9.Text = "默认加价 加价";
this.label9.Text = "默认加价加";
//
// chkStepAddPrice
//
this.chkStepAddPrice.AutoSize = true;
this.chkStepAddPrice.Location = new System.Drawing.Point(12, 23);
this.chkStepAddPrice.Location = new System.Drawing.Point(12, 20);
this.chkStepAddPrice.Name = "chkStepAddPrice";
this.chkStepAddPrice.Size = new System.Drawing.Size(75, 21);
this.chkStepAddPrice.TabIndex = 598;
@@ -605,7 +691,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkChance.AutoSize = true;
this.chkChance.Checked = true;
this.chkChance.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkChance.Location = new System.Drawing.Point(668, 33);
this.chkChance.Location = new System.Drawing.Point(683, 33);
this.chkChance.Name = "chkChance";
this.chkChance.Size = new System.Drawing.Size(87, 21);
this.chkChance.TabIndex = 556;
@@ -613,12 +699,40 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkChance.UseVisualStyleBackColor = true;
this.chkChance.CheckedChanged += new System.EventHandler(this.chkChance_CheckedChanged);
//
// chkLowPriceSku
//
this.chkLowPriceSku.AutoSize = true;
this.chkLowPriceSku.Checked = true;
this.chkLowPriceSku.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkLowPriceSku.Location = new System.Drawing.Point(535, 111);
this.chkLowPriceSku.Name = "chkLowPriceSku";
this.chkLowPriceSku.Size = new System.Drawing.Size(83, 21);
this.chkLowPriceSku.TabIndex = 660;
this.chkLowPriceSku.Text = "低价sku名";
this.chkLowPriceSku.UseVisualStyleBackColor = true;
this.chkLowPriceSku.CheckedChanged += new System.EventHandler(this.chkLowPriceSku_CheckedChanged);
//
// lblLowPriceSkuImg
//
this.lblLowPriceSkuImg.AutoSize = true;
this.lblLowPriceSkuImg.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblLowPriceSkuImg.ForeColor = System.Drawing.SystemColors.HotTrack;
this.lblLowPriceSkuImg.Location = new System.Drawing.Point(452, 113);
this.lblLowPriceSkuImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblLowPriceSkuImg.Name = "lblLowPriceSkuImg";
this.lblLowPriceSkuImg.Size = new System.Drawing.Size(52, 17);
this.lblLowPriceSkuImg.TabIndex = 668;
this.lblLowPriceSkuImg.Text = "传sku图";
this.lblLowPriceSkuImg.Click += new System.EventHandler(this.lblLowPriceSkuImg_Click);
//
// ucGroupBoxEx4
//
this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx4.Controls.Add(this.txtGroupFilter);
this.ucGroupBoxEx4.Controls.Add(this.label20);
this.ucGroupBoxEx4.Controls.Add(this.panelEx3);
this.ucGroupBoxEx4.Controls.Add(this.txtExtCodeFilter);
this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload);
@@ -629,17 +743,54 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx4.Controls.Add(this.label16);
this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
this.ucGroupBoxEx4.Size = new System.Drawing.Size(338, 140);
this.ucGroupBoxEx4.Size = new System.Drawing.Size(329, 140);
this.ucGroupBoxEx4.TabIndex = 666;
this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "待传商品";
//
// panelEx3
//
this.panelEx3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panelEx3.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx3.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx3.Location = new System.Drawing.Point(247, 48);
this.panelEx3.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.panelEx3.Name = "panelEx3";
this.panelEx3.Size = new System.Drawing.Size(60, 23);
this.panelEx3.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx3.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx3.Style.GradientAngle = 90;
this.panelEx3.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx3.TabIndex = 559;
this.panelEx3.Text = "清除筛选";
this.panelEx3.Click += new System.EventHandler(this.btnClearFilter_Click);
//
// txtExtCodeFilter
//
this.txtExtCodeFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtExtCodeFilter.Location = new System.Drawing.Point(70, 48);
this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtExtCodeFilter.Name = "txtExtCodeFilter";
this.txtExtCodeFilter.Size = new System.Drawing.Size(173, 23);
this.txtExtCodeFilter.TabIndex = 555;
//
// btnClearUpload
//
this.btnClearUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearUpload.Location = new System.Drawing.Point(240, 98);
this.btnClearUpload.Location = new System.Drawing.Point(231, 103);
this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearUpload.Name = "btnClearUpload";
this.btnClearUpload.Size = new System.Drawing.Size(76, 23);
@@ -665,7 +816,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.lblWaitToUp.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblWaitToUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWaitToUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.lblWaitToUp.Location = new System.Drawing.Point(18, 104);
this.lblWaitToUp.Location = new System.Drawing.Point(18, 109);
this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblWaitToUp.Name = "lblWaitToUp";
this.lblWaitToUp.Size = new System.Drawing.Size(95, 17);
@@ -676,7 +827,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// lblGoodsCount
//
this.lblGoodsCount.AutoSize = true;
this.lblGoodsCount.Location = new System.Drawing.Point(164, 64);
this.lblGoodsCount.Location = new System.Drawing.Point(164, 78);
this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblGoodsCount.Name = "lblGoodsCount";
this.lblGoodsCount.Size = new System.Drawing.Size(131, 17);
@@ -686,7 +837,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// txtAddCount
//
this.txtAddCount.Location = new System.Drawing.Point(20, 61);
this.txtAddCount.Location = new System.Drawing.Point(20, 75);
this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtAddCount.Name = "txtAddCount";
this.txtAddCount.Size = new System.Drawing.Size(47, 23);
@@ -699,7 +850,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand;
this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panelEx2.Location = new System.Drawing.Point(70, 61);
this.panelEx2.Location = new System.Drawing.Point(70, 75);
this.panelEx2.Name = "panelEx2";
this.panelEx2.Size = new System.Drawing.Size(90, 23);
this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -717,6 +868,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx2.Text = "随机添加商品";
this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(16, 51);
this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(56, 17);
this.label16.TabIndex = 560;
this.label16.Text = "筛选货号";
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -771,7 +932,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1344, 402);
this.splitContainer3.Size = new System.Drawing.Size(1350, 402);
this.splitContainer3.SplitterDistance = 372;
this.splitContainer3.TabIndex = 1;
//
@@ -794,7 +955,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1344, 372);
this.splitContainer2.Size = new System.Drawing.Size(1350, 372);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.TabIndex = 0;
//
@@ -802,18 +963,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
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,
@@ -1208,7 +1369,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(495, 161);
this.pbLoading.Location = new System.Drawing.Point(498, 161);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1223,7 +1384,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Location = new System.Drawing.Point(36, 53);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(966, 286);
this.panel1.Size = new System.Drawing.Size(972, 286);
this.panel1.TabIndex = 189;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
@@ -1231,18 +1392,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.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.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1255,6 +1416,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colSkcId,
this.colImgUrl,
this.colProductSkcPic,
this.colSkuFakeImgUrl,
this.colSkuFakeImg,
this.colProductName,
this.colProductCat,
this.colExtCode,
@@ -1270,7 +1433,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1036, 372);
this.dgvSelectProduct.Size = new System.Drawing.Size(1042, 372);
this.dgvSelectProduct.TabIndex = 187;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
@@ -1360,10 +1523,28 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colSkuFakeImgUrl
//
this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址";
this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl";
this.colSkuFakeImgUrl.ReadOnly = true;
this.colSkuFakeImgUrl.Visible = false;
//
// colSkuFakeImg
//
this.colSkuFakeImg.HeaderText = "SKU替换图";
this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuFakeImg.Name = "colSkuFakeImg";
this.colSkuFakeImg.ReadOnly = true;
this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuFakeImg.Visible = false;
this.colSkuFakeImg.Width = 60;
//
// colProductName
//
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle5;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -1451,8 +1632,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer4.Size = new System.Drawing.Size(1344, 26);
this.splitContainer4.SplitterDistance = 653;
this.splitContainer4.Size = new System.Drawing.Size(1350, 26);
this.splitContainer4.SplitterDistance = 659;
this.splitContainer4.TabIndex = 3;
//
// statusBar
@@ -1463,7 +1644,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(653, 26);
this.statusBar.Size = new System.Drawing.Size(659, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
@@ -1530,54 +1711,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucSplitPage1.TabIndex = 675;
this.ucSplitPage1.TotalPage = 1;
//
// txtExtCodeFilter
// txtGroup
//
this.txtExtCodeFilter.Location = new System.Drawing.Point(70, 32);
this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtExtCodeFilter.Name = "txtExtCodeFilter";
this.txtExtCodeFilter.Size = new System.Drawing.Size(182, 23);
this.txtExtCodeFilter.TabIndex = 555;
this.txtGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtGroupFilter.Location = new System.Drawing.Point(70, 22);
this.txtGroupFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtGroupFilter.Name = "txtGroup";
this.txtGroupFilter.Size = new System.Drawing.Size(237, 23);
this.txtGroupFilter.TabIndex = 569;
//
// panelEx3
// label20
//
this.panelEx3.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx3.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx3.Location = new System.Drawing.Point(256, 32);
this.panelEx3.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.panelEx3.Name = "panelEx3";
this.panelEx3.Size = new System.Drawing.Size(60, 23);
this.panelEx3.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx3.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx3.Style.GradientAngle = 90;
this.panelEx3.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx3.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx3.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx3.TabIndex = 559;
this.panelEx3.Text = "清除筛选";
this.panelEx3.Click += new System.EventHandler(this.btnClearFilter_Click);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(16, 35);
this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(56, 17);
this.label16.TabIndex = 560;
this.label16.Text = "筛选货号";
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(16, 25);
this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(56, 17);
this.label20.TabIndex = 570;
this.label20.Text = "筛选分组";
//
// PDDDBProdUserSelectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1344, 546);
this.ClientSize = new System.Drawing.Size(1350, 546);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "PDDDBProdUserSelectForm";
@@ -1590,6 +1748,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbSkuImg)).EndInit();
this.panel4.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
@@ -1662,7 +1821,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtAddMorePrice;
private System.Windows.Forms.TextBox txtAddTimes;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtStockNum;
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx btnStop;
@@ -1695,6 +1853,23 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule;
private UcAddPrice ucAddPrice1;
private UcAddPrice ucAddPrice3;
private UserComponent.UcCheckBox chkSizeSpec;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtAddTimesFake;
private System.Windows.Forms.Label label10;
private UserComponent.UcCheckBox chkActivity;
private DevComponents.DotNetBar.PanelEx panelEx3;
private System.Windows.Forms.TextBox txtExtCodeFilter;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtLowPriceSkuPrice;
private System.Windows.Forms.TextBox txtLowPriceSkuName;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label9;
private UserComponent.UcCheckBox chkLowPriceSku;
private UserComponent.UcCheckBox chkKeepChanceGoodsImg;
private System.Windows.Forms.PictureBox pbSkuImg;
private System.Windows.Forms.Label lblLowPriceSkuImg;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1705,6 +1880,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuFakeImgUrl;
private System.Windows.Forms.DataGridViewImageColumn colSkuFakeImg;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
@@ -1715,13 +1892,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chkSizeSpec;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtAddTimesFake;
private System.Windows.Forms.Label label10;
private UserComponent.UcCheckBox chkActivity;
private DevComponents.DotNetBar.PanelEx panelEx3;
private System.Windows.Forms.TextBox txtExtCodeFilter;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txtGroupFilter;
private System.Windows.Forms.Label label20;
}
}
File diff suppressed because it is too large. Load diff
@@ -171,6 +171,12 @@
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSkuFakeImgUrl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSkuFakeImg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
-1
View File
@@ -625,7 +625,6 @@
this.colUpdateCookies.ReadOnly = true;
this.colUpdateCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colUpdateCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colUpdateCookies.Visible = false;
//
// colCopyCookies
//
+14 -23
View File
@@ -28,7 +28,8 @@ namespace TemuKJD.PDDForms.ShopForms
public partial class PDDShopListForm : BaseForm
{
public static List<PDDShopListForm> LstShopListFormInatance = new List<PDDShopListForm>();
public static PDDShopListForm Instance { get; set; } = null;
private static PDDShopListForm _instance = null;
public static PDDShopListForm Instance { get { if (_instance == null) { _instance = new PDDShopListForm(); } return _instance; } set { _instance = value; } }
public static bool IsOperate { get; set; } = false;
private bool isLoading { get; set; } = false;
@@ -288,7 +289,10 @@ namespace TemuKJD.PDDForms.ShopForms
{
//CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName });
StartUp.SaveLocalShopLoginInfo();
btnRefreshCookie_Click(null, null);
Invoke(new Action(() =>
{
btnRefreshCookie_Click(null, null);
}));
});
}
@@ -571,7 +575,7 @@ namespace TemuKJD.PDDForms.ShopForms
if (shop != null)
{
var loginResult = GetShopStatus(shop);
var loginResult = CheckShopLogin(shop);
if (!loginResult.Contains("\"success\":true"))
{
shop.Cookies = "empty=true;";
@@ -589,26 +593,6 @@ namespace TemuKJD.PDDForms.ShopForms
sc.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
}
//loginResult = PDDShopListForm.GetShopStatus2(shop);
//if (!loginResult.Contains("\"success\":true"))
//{
// shop.Cookies2 = "empty=true;";
// foreach (var sc in campanys)
// {
// sc.LoginStatus2 = "国际版未登录";
// sc.Cookies2 = "empty=true;";
// }
//}
//else
//{
// foreach (var sc in campanys)
// {
// sc.LoginStatus2 = "国际版在线";
// sc.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
// }
//}
//if (!string.IsNullOrEmpty(loginResult))
// shop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
StartUp.SaveLocalShopLoginInfo();
}
@@ -633,6 +617,13 @@ namespace TemuKJD.PDDForms.ShopForms
return HttpResponseBLL.PDDPostResponse(shop, url, body, refere);
}
public static string CheckShopLogin(ShopLoginInfo shop, string refere = "https://mms.pinduoduo.com/home/")
{
string url = "https://mms.pinduoduo.com/janus/api/checkLogin";
string body = @"{}";
return HttpResponseBLL.PDDPostResponse(shop, url, body, refere);
}
/// <summary>
/// 获取国际版登录状态
/// </summary>
+137 -80
View File
@@ -32,6 +32,7 @@ namespace TemuKJD.PDDForms.ShopForms
{
login,
manage,
refresh_cookie,
}
public partial class PDDShopLoginForm : LRBaseForm
{
@@ -122,99 +123,147 @@ namespace TemuKJD.PDDForms.ShopForms
if (!cefWebBrowser.GetBrowser().MainFrame.IsValid)
continue;
if (openType == EnumOpenType.refresh_cookie)
{
string cookies = "";
List<Cookie> cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null));
foreach (var cookie in cookieList)
{
cookie.Domain = cookie.Domain.Replace(".mms.pinduoduo.com", "mms.pinduoduo.com");
}
List<Cookie> cookieListNew = new List<Cookie>();
if (cookieList != null && cookieList.Count > 0)
{
foreach (var cookie in cookieList)
{
//PASS_ID同时出现两个,domain是mms.pinduoduo.com才是能登录店铺后台的
if (cookie.Name == "PASS_ID" && cookie.Domain != "mms.pinduoduo.com"
&& cookieList.Any(c => c.Name == "PASS_ID" && c.Domain == "mms.pinduoduo.com"))
continue;
cookies += cookie.Name + "=" + cookie.Value + "; ";
cookieListNew.Add(cookie);
}
cookies = JsonHelper.SerializeObject(cookieListNew);
if (!string.IsNullOrEmpty(cookies))
{
shop.Cookies = cookies;
shop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
PDDShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端
if (this.Created && this.chkCloseAfterLogin.Checked)
{
Invoke(new Action(() => { this.Close(); }));
}
else
{
break;
}
}
}
}
if (openType!= EnumOpenType.login)
continue;
if (!lstShopCompany.Any(c => c.LoginName == shop.LoginName))
continue;
string cookies = "";
List<Cookie> cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null));
List<Cookie> cookieListNew = new List<Cookie>();
if (cookieList != null && cookieList.Count > 0)
else // 检测到登录成功后
{
string cookies = "";
List<Cookie> cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null));
foreach (var cookie in cookieList)
{
//PASS_ID同时出现两个,domain是mms.pinduoduo.com才是能登录店铺后台的
if (cookie.Name == "PASS_ID" && cookie.Domain != "mms.pinduoduo.com"
&& cookieList.Any(c => c.Name == "PASS_ID" && c.Domain == "mms.pinduoduo.com"))
continue;
cookies += cookie.Name + "=" + cookie.Value + "; ";
cookieListNew.Add(cookie);
cookie.Domain = cookie.Domain.Replace(".mms.pinduoduo.com", "mms.pinduoduo.com");
}
//cookies = cookies.Trim().TrimEnd(';');
cookies = JsonHelper.SerializeObject(cookieListNew);
}
if (!string.IsNullOrEmpty(cookies)
&& lstShopCompany.Any(c => c.LoginName == shop.LoginName))
{
var lstShopCompanyCopy = lstShopCompany.ToList();
lstShopCompanyCopy = lstShopCompanyCopy.Where(l => l.LoginName == shop.LoginName).ToList();
foreach (ShopCompany sc in lstShopCompanyCopy)
List<Cookie> cookieListNew = new List<Cookie>();
if (cookieList != null && cookieList.Count > 0)
{
ShopLoginInfo newShop = new ShopLoginInfo()
foreach (var cookie in cookieList)
{
LoginName = shop.LoginName,
Password = shop.Password,
GroupName = shop.GroupName,
ShopAccount = sc.AccountName,
ShopId = sc.AccountId,
SubUserName = shop.SubUserName,
Notes = shop.Notes,
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
};
//PASS_ID同时出现两个,domain是mms.pinduoduo.com才是能登录店铺后台的
if (cookie.Name == "PASS_ID" && cookie.Domain != "mms.pinduoduo.com"
&& cookieList.Any(c => c.Name == "PASS_ID" && c.Domain == "mms.pinduoduo.com"))
continue;
var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l =>
l.LoginName == newShop.LoginName);
if (oldShop == null)
cookies += cookie.Name + "=" + cookie.Value + "; ";
cookieListNew.Add(cookie);
}
//cookies = cookies.Trim().TrimEnd(';');
cookies = JsonHelper.SerializeObject(cookieListNew);
}
if (!string.IsNullOrEmpty(cookies)
&& lstShopCompany.Any(c => c.LoginName == shop.LoginName))
{
var lstShopCompanyCopy = lstShopCompany.ToList();
lstShopCompanyCopy = lstShopCompanyCopy.Where(l => l.LoginName == shop.LoginName).ToList();
foreach (ShopCompany sc in lstShopCompanyCopy)
{
GlobalConfig.ShopLoginList.Add(newShop);
ShopBLL.AddServerShop(newShop); // 店铺写入到服务端
ShopLoginInfo newShop = new ShopLoginInfo()
{
LoginName = shop.LoginName,
Password = shop.Password,
GroupName = shop.GroupName,
ShopAccount = sc.AccountName,
ShopId = sc.AccountId,
SubUserName = shop.SubUserName,
Notes = shop.Notes,
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
};
var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l =>
l.LoginName == newShop.LoginName);
if (oldShop == null)
{
GlobalConfig.ShopLoginList.Add(newShop);
ShopBLL.AddServerShop(newShop); // 店铺写入到服务端
}
else
{
oldShop.LoginName = newShop.LoginName;
oldShop.Password = newShop.Password;
oldShop.GroupName = newShop.GroupName;
oldShop.ShopAccount = newShop.ShopAccount;
oldShop.ShopId = newShop.ShopId;
oldShop.SubUserName = newShop.SubUserName;
oldShop.Notes = newShop.Notes;
oldShop.AntiContents.AddRange(newShop.AntiContents);
while (oldShop.AntiContents.Count > 50)
oldShop.AntiContents.RemoveAt(0);
// 店铺更新写入到服务端
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + oldShop.LoginName
+ "&new_shop_id=" + oldShop.ShopId
+ "&shop_account=" + oldShop.ShopAccount;
var result = GetHtml.PostUtf8(url, data);
ShopBLL.MdyAntiContent(oldShop);
}
}
var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop.LoginName).ToList();
foreach (var s in lstShop)
{
s.LoginStatus = "登录成功";
s.Cookies = cookies;
s.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
StartUp.SaveLocalShopLoginInfo(); // 店铺保存到本地
PDDShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
OnSaveComplete(shop);
if (this.Created && this.chkCloseAfterLogin.Checked)
{
Invoke(new Action(() => { this.Close(); }));
}
else
{
oldShop.LoginName = newShop.LoginName;
oldShop.Password = newShop.Password;
oldShop.GroupName = newShop.GroupName;
oldShop.ShopAccount = newShop.ShopAccount;
oldShop.ShopId = newShop.ShopId;
oldShop.SubUserName = newShop.SubUserName;
oldShop.Notes = newShop.Notes;
oldShop.AntiContents.AddRange(newShop.AntiContents);
while (oldShop.AntiContents.Count > 50)
oldShop.AntiContents.RemoveAt(0);
// 店铺更新写入到服务端
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + oldShop.LoginName
+ "&new_shop_id=" + oldShop.ShopId
+ "&shop_account=" + oldShop.ShopAccount;
var result = GetHtml.PostUtf8(url, data);
ShopBLL.MdyAntiContent(oldShop);
break;
}
}
var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop.LoginName).ToList();
foreach(var s in lstShop)
{
s.LoginStatus = "登录成功";
s.Cookies = cookies;
s.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd");
}
StartUp.SaveLocalShopLoginInfo(); // 店铺保存到本地
PDDShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
OnSaveComplete(shop);
if (this.Created && this.chkCloseAfterLogin.Checked)
{
Invoke(new Action(() => { this.Close(); }));
}
else
break;
}
}
}
@@ -429,7 +478,7 @@ namespace TemuKJD.PDDForms.ShopForms
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
{
if (this.Created)
if (this.Created && !this.IsDisposed)
Invoke(new Action(() =>
{
currentUrl = e.Address;
@@ -497,7 +546,11 @@ namespace TemuKJD.PDDForms.ShopForms
Task.Run(() =>
{
GetAntiContentsTimes++;
Invoke(new Action(() => { try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; } }));
if (this.Created && !this.IsDisposed)
Invoke(new Action(() =>
{
try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; }
}));
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
@@ -515,9 +568,13 @@ namespace TemuKJD.PDDForms.ShopForms
var data = responseData;
if (this.shop != null && data.Contains("\"success\":true"))
{
var username = BaseRegex.GetStringJson(ref data, "username");
var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
maskMobile = maskMobile.Split('*').Last();
if (!string.IsNullOrEmpty(maskMobile) && shop.LoginName.EndsWith(maskMobile))
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
return;
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
{
lstShopCompany.Clear();
var jObj = JObject.Parse(data);
@@ -1124,7 +1181,7 @@ function getElementWithText(sText)
}
var newData = JsonHelper.SerializeObject(prodParamObj);
var saveProdRst = prodUserSelectForm.save_goods_edit_data(shop, newData, goodsId, commitId, false, "edit");
var saveProdRst = prodUserSelectForm.save_goods_edit_data(shop, newData, goodsId, commitId, true, "edit");
if (!saveProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref saveProdRst, "error_msg");
@@ -1134,7 +1191,7 @@ function getElementWithText(sText)
return;
}
Thread.Sleep(Randomx.GetId(100, 600));
var submitProdRst = prodUserSelectForm.submit_goods_edit(shop, goodsId, commitId, false, "edit");
var submitProdRst = prodUserSelectForm.submit_goods_edit(shop, goodsId, commitId, true, "edit");
if (!submitProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref submitProdRst, "error_msg");
+29 -27
View File
@@ -37,6 +37,7 @@
this.txtSubPassId = new System.Windows.Forms.TextBox();
this.txtLoginName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.txtSellerTemp = new System.Windows.Forms.TextBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
@@ -44,7 +45,6 @@
this.buttonEx1 = new TemuKJD.UserControls.ButtonEx();
this.label8 = new System.Windows.Forms.Label();
this.txtCookieJs2 = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -95,11 +95,11 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(40, 103);
this.label4.Location = new System.Drawing.Point(37, 83);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(60, 34);
this.label4.Size = new System.Drawing.Size(63, 17);
this.label4.TabIndex = 399;
this.label4.Text = " 国内版\r\nCookieJs";
this.label4.Text = "cookie_id";
//
// txtCookieJs1
//
@@ -119,29 +119,31 @@
this.txtCookieJs1.Border.PaddingLeft = 2;
this.txtCookieJs1.Border.PaddingRight = 2;
this.txtCookieJs1.Border.PaddingTop = 2;
this.txtCookieJs1.Location = new System.Drawing.Point(100, 101);
this.txtCookieJs1.Location = new System.Drawing.Point(100, 80);
this.txtCookieJs1.Multiline = true;
this.txtCookieJs1.Name = "txtCookieJs1";
this.txtCookieJs1.Size = new System.Drawing.Size(569, 198);
this.txtCookieJs1.Size = new System.Drawing.Size(569, 219);
this.txtCookieJs1.TabIndex = 398;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 72);
this.label3.Location = new System.Drawing.Point(16, 54);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(84, 17);
this.label3.TabIndex = 397;
this.label3.Text = "SUB_PASS_ID";
this.label3.Visible = false;
//
// txtSubPassId
//
this.txtSubPassId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSubPassId.Location = new System.Drawing.Point(100, 69);
this.txtSubPassId.Location = new System.Drawing.Point(100, 51);
this.txtSubPassId.Name = "txtSubPassId";
this.txtSubPassId.Size = new System.Drawing.Size(569, 23);
this.txtSubPassId.TabIndex = 396;
this.txtSubPassId.Visible = false;
//
// txtLoginName
//
@@ -161,6 +163,23 @@
this.label1.TabIndex = 394;
this.label1.Text = "登录账号";
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White;
this.btnOk.Location = new System.Drawing.Point(614, 0);
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26);
this.btnOk.TabIndex = 392;
this.btnOk.Text = "保存";
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// label2
//
this.label2.AutoSize = true;
@@ -259,31 +278,14 @@
this.txtCookieJs2.TabIndex = 393;
this.txtCookieJs2.Visible = false;
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White;
this.btnOk.Location = new System.Drawing.Point(614, 0);
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26);
this.btnOk.TabIndex = 392;
this.btnOk.Text = "保存";
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// ShopUpdateCookieForm
// PDDShopUpdateCookieForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(700, 407);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ShopUpdateCookieForm";
this.Name = "PDDShopUpdateCookieForm";
this.Text = "更新Cookie";
this.TitleText = "更新Cookie";
this.Load += new System.EventHandler(this.ShopUpdateCookieForm_Load);
@@ -15,6 +15,7 @@ using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using Work;
using TemuKJD.BLL;
using CefSharp;
namespace TemuKJD.PDDForms.ShopForms
{
@@ -86,7 +87,7 @@ namespace TemuKJD.PDDForms.ShopForms
cookieVersion = this.radioButton1.Checked ? "国内版" : "国际版";
bool ok1 = false;
bool ok2 = false;
if (this.txtCookieJs1.Text.Contains("SUB_PASS_ID") || !string.IsNullOrWhiteSpace(txtSubPassId.Text))
if ((this.txtCookieJs1.Text.Contains("PASS_ID") && this.txtCookieJs1.Text.Contains("api_uid")) || !string.IsNullOrWhiteSpace(txtSubPassId.Text))
{
ok1 = GetCookie1();
}
@@ -105,53 +106,100 @@ namespace TemuKJD.PDDForms.ShopForms
bool GetCookie1()
{
string txt = this.txtCookieJs1.Text;
txt = txt.Replace("SUB_PASS_ID=;", "").Replace("_nano_fp=;", "").Replace("api_uid=;", "")
.Replace("_bee=;", "").Replace("ru2k=;", "").Replace("_f77=;", "")
.Replace("_a42=;", "").Replace("rckk=;", "").Replace("ru1k=;", "");
txt = txt.Replace("PASS_ID=;", "").Replace("JSESSIONID=;", "").Replace("_nano_fp=;", "").Replace("api_uid=;", "")
.Replace("_bee=;", "").Replace("_f77=;", "").Replace("mms_b84d1838=", "")
.Replace("_a42=;", "").Replace("rckk=;", "").Replace("ru1k=;", "").Replace("ru2k=;", "")
.Replace("webp=;", "").Replace("x-visit-time=;", "");
string api_uid = BaseRegex.GetStringCookie(ref txt, "api_uid").ParseToString().Trim('\'');
string _nano_fp = BaseRegex.GetStringCookie(ref txt, "_nano_fp").ParseToString().Trim('\'');
string _bee = BaseRegex.GetStringCookie(ref txt, "_bee").ParseToString().Trim('\'');
string _f77 = BaseRegex.GetStringCookie(ref txt, "_f77").ParseToString().Trim('\'');
string _a42 = BaseRegex.GetStringCookie(ref txt, "_a42").ParseToString().Trim('\'');
string rckk = BaseRegex.GetStringCookie(ref txt, "rckk").ParseToString().Trim('\'');
string ru1k = BaseRegex.GetStringCookie(ref txt, "ru1k").ParseToString().Trim('\'');
string ru2k = BaseRegex.GetStringCookie(ref txt, "ru2k").ParseToString().Trim('\'');
string SUB_PASS_ID = BaseRegex.GetStringCookie(ref txt, "SUB_PASS_ID").ParseToString().Trim('\'');
string JSESSIONID = BaseRegex.GetStringCookie(ref txt, "JSESSIONID").ParseToString().Trim('\'', '\n', '\r');
string _nano_fp = BaseRegex.GetStringCookie(ref txt, "_nano_fp").ParseToString().Trim('\'', '\n', '\r');
string api_uid = BaseRegex.GetStringCookie(ref txt, "api_uid").ParseToString().Trim('\'', '\n', '\r');
string _bee = BaseRegex.GetStringCookie(ref txt, "_bee").ParseToString().Trim('\'', '\n', '\r');
string _f77 = BaseRegex.GetStringCookie(ref txt, "_f77").ParseToString().Trim('\'', '\n', '\r');
string mms_b84d1838 = BaseRegex.GetStringCookie(ref txt, "mms_b84d1838").ParseToString().Trim('\'', '\n', '\r');
string _a42 = BaseRegex.GetStringCookie(ref txt, "_a42").ParseToString().Trim('\'', '\n', '\r');
string rckk = BaseRegex.GetStringCookie(ref txt, "rckk").ParseToString().Trim('\'', '\n', '\r');
string ru1k = BaseRegex.GetStringCookie(ref txt, "ru1k").ParseToString().Trim('\'', '\n', '\r');
string ru2k = BaseRegex.GetStringCookie(ref txt, "ru2k").ParseToString().Trim('\'', '\n', '\r');
string webp = BaseRegex.GetStringCookie(ref txt, "webp").ParseToString().Trim('\'', '\n', '\r');
string x_visit_time = BaseRegex.GetStringCookie(ref txt, "x-visit-time").ParseToString().Trim('\'', '\n', '\r');
string PASS_ID = BaseRegex.GetStringCookie(ref txt, "PASS_ID").ParseToString().Trim('\'', '\n', '\r');
if (!string.IsNullOrWhiteSpace(this.txtSubPassId.Text))
SUB_PASS_ID = this.txtSubPassId.Text.Trim();
string cookie = "api_uid=" + api_uid + ";" +
"_nano_fp=" + _nano_fp + ";" +
"_bee=" + _bee + ";" +
"_f77=" + _f77 + ";" +
"_a42=" + _a42 + ";" +
"rckk=" + rckk + ";" +
"ru1k=" + ru1k + ";" +
"ru2k=" + ru2k + ";" +
"SUB_PASS_ID=" + SUB_PASS_ID + ";";
PASS_ID = this.txtSubPassId.Text.Trim();
if (string.IsNullOrEmpty(SUB_PASS_ID))
if (string.IsNullOrEmpty(PASS_ID))
{
BaseMsgForm.ShowError("Cookie缺少关键字段,请检查!");
return false;
}
string cookie = "_a42=" + _a42 + ";" +
"_bee=" + _bee + ";" +
"_f77=" + _f77 + ";" +
"_nano_fp=" + _nano_fp + ";" +
"api_uid=" + api_uid + ";" +
"JSESSIONID=" + JSESSIONID + ";" +
"mms_b84d1838=" + mms_b84d1838 + ";" +
"PASS_ID=" + PASS_ID + ";" +
"rckk=" + rckk + ";" +
"ru1k=" + ru1k + ";" +
"ru2k=" + ru2k + ";" +
"webp=" + webp + ";" +
"x-visit-time=" + x_visit_time + ";";
List<Cookie> cookieList = new List<Cookie>();
if (!string.IsNullOrEmpty(_a42))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "_a42", Value = _a42, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(_bee))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "_bee", Value = _bee, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(_f77))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "_f77", Value = _f77, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(_nano_fp))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "_nano_fp", Value = _nano_fp, Expires = DateTime.Now.AddDays(400), });
if (!string.IsNullOrEmpty(api_uid))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "api_uid", Value = api_uid, Expires = DateTime.Now.AddDays(400), });
if (!string.IsNullOrEmpty(JSESSIONID))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "JSESSIONID", Value = JSESSIONID, HttpOnly = true, });
if (!string.IsNullOrEmpty(mms_b84d1838))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "mms_b84d1838", Value = mms_b84d1838, Expires = DateTime.Now.AddDays(100), });
if (!string.IsNullOrEmpty(PASS_ID))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "PASS_ID", Value = PASS_ID, Expires = DateTime.Now.AddDays(30), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(rckk))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "rckk", Value = rckk, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(ru1k))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "ru1k", Value = ru1k, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(ru2k))
cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "ru2k", Value = ru2k, Expires = DateTime.Now.AddYears(1), HttpOnly = true, Secure = true, });
if (!string.IsNullOrEmpty(webp))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "webp", Value = webp, Expires = DateTime.Now.AddDays(14), Path= "/home" });
if (!string.IsNullOrEmpty(x_visit_time))
cookieList.Add(new Cookie() { Domain = "mms.pinduoduo.com", Name = "x-visit-time", Value = x_visit_time, Expires = DateTime.Now.AddDays(100), });
cookie = JsonHelper.SerializeObject(cookieList);
var cookieShop = new ShopLoginInfo();
cookieShop.Cookies = cookie;
cookieShop.Cookies = JsonHelper.SerializeObject(cookieList);
var data = "";
data = PDDShopListForm.GetShopStatus(cookieShop);
if (!data.Contains("\"success\":true"))
if (!data.Contains("\"success\":true") || data.Contains("会话已过期"))
{
BaseMsgForm.ShowError("cookie已失效!");
return false;
}
var maskMobile = BaseRegex.GetStringJson(ref data, "maskOwnerMobile");
if (!shopLoginInfo.LoginName.EndsWith(maskMobile))
var username = BaseRegex.GetStringJson(ref data, "username");
var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
var mallName = BaseRegex.GetStringJson(ref data, "mall_name");
maskMobile = maskMobile.Split('*').Last();
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(mallName))
{
BaseMsgForm.ShowError("cookie与国内版店铺不匹配,请核对店铺!");
BaseMsgForm.ShowError("店铺信息获取失败!");
return false;
}
if (!shopLoginInfo.LoginName.EndsWith(maskMobile) && shopLoginInfo.LoginName != username && shopLoginInfo.LoginName != mallName)
{
BaseMsgForm.ShowError("cookie与店铺不匹配,请核对店铺!");
return false;
}
@@ -177,8 +225,24 @@ namespace TemuKJD.PDDForms.ShopForms
}
}
shopLoginInfo.Cookies = cookie;
shopLoginInfo.ShopId = username;
shopLoginInfo.ShopAccount = mallName;
shopLoginInfo.LoginStatus = "登录成功";
PDDShopListForm.UpdateServerShopCookies(shopLoginInfo); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
// 店铺更新写入到服务端
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data1 = UserLogin.GetSignaturex()
+ "&login_name=" + shopLoginInfo.LoginName
+ "&new_shop_id=" + shopLoginInfo.ShopId
+ "&shop_account=" + shopLoginInfo.ShopAccount;
var result = GetHtml.PostUtf8(url, data1);
PDDShopListForm.UpdateServerShopCookies(shopLoginInfo); // 店铺cookie写入服务端,不同账号下的同名店铺一起更新cookie
PDDShopLoginForm loginForm = new PDDShopLoginForm(shopLoginInfo);
loginForm.openType = EnumOpenType.refresh_cookie;
loginForm.ShowDialog();
return true;
}