选品上传翻译商品标题 库存上传逻辑优化提高直接上传成功率 拼多多优化限时限量优惠结束逻辑

This commit is contained in:
wule committed 2025-10-24 18:15:17 +08:00
1 parent 73f9fcd8bc
commit ab33a9c0c0
19 files changed
+856 -320

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 650;
public static int VersionCount = 652;
//public static int VersionCount = 613;
/// <summary>
@@ -141,17 +141,18 @@ namespace AllBase.Model.Param.TemuProductManage
public class ProductSkuSensitiveAttrReq
{
/// <summary>
///
/// 是否敏感属性
/// </summary>
public long? isSensitive { get; set; }
/// <summary>
///
/// 敏感属性列表
/// </summary>
public List<object> sensitiveList { get; set; }
}
public class ProductSkuSensitiveLimitReq
{
public int? maxLiquidCapacityHp { get; set; } // 1000 代表1毫升
}
public class ProductSkuWhExtAttrReq
@@ -185,25 +186,37 @@ namespace AllBase.Model.Param.TemuProductManage
public class ProductSkuMultiPackReq
{
/// <summary>
///
/// sku 1单品 2同款多件 3混合套装
/// </summary>
public long? skuClassification { get; set; }
/// <summary>
///
/// 单品数量
/// </summary>
public long? numberOfPieces { get; set; }
/// <summary>
///
/// 1件 2双 3包
/// </summary>
public long? pieceUnitCode { get; set; }
/// <summary>
///
/// </summary>
public ProductSkuNetContentReq productSkuNetContentReq { get; set; }
public ProductSkuNetContentReq totalNetContent { get; set; }
public int? mixedType { get; set; }
//子类中实现
//public int? individuallyPacked { get; set; }
/// <summary>
/// 共计内含
/// </summary>
public int? numberOfPiecesNew { get; set; }
/// <summary>
/// 件
/// </summary>
public int? pieceNewUnitCode { get; set; } // 锁定为1
}
public class ProductSkuMultiPackReq2 : ProductSkuMultiPackReq
{
{
/// <summary>
/// 非单品sku 1独立包装 0非独立包装
/// </summary>
public int? individuallyPacked { get; set; }
}
@@ -563,6 +576,10 @@ namespace AllBase.Model.Param.TemuProductManage
/// <summary>
///
/// </summary>
public List<productI18nParam> productI18nReqs { get; set; }
/// <summary>
///
/// </summary>
public List<ProductPropertyReqsItem> productPropertyReqs { get; set; }
/// <summary>
///
@@ -666,6 +683,12 @@ namespace AllBase.Model.Param.TemuProductManage
public long? productDraftId { get; set; } = 0;
}
public class productI18nParam
{
public string productName { get; set; } // "Men's slippers sandals, outdoor summer thick-soled wedge sandals, Korean-style men's summer flip-flops, house slippers",
public string language { get; set; } // "en"
}
public class productCarouseVideoReqItem
{
public string vid { get; set; }
@@ -334,9 +334,16 @@ namespace AllBase.Model.Result
{
public int? skuClassification { get; set; }
public int? numberOfPieces { get; set; }
/// <summary>
/// 1件 2双 3包
/// </summary>
public int? pieceUnitCode { get; set; }
public object individuallyPacked { get; set; }
public int? numberOfPiecesNew { get; set; }
public int? pieceNewUnitCode { get; set; }
public int? individuallyPacked { get; set; }
public TemuProductSkuNetContent productSkuNetContent { get; set; }
public int? mixedType { get; set; }
public TemuProductSkuNetContent totalNetContent { get; set; }
}
public class TemuProductSkuImageProcessExtVO
+95
View File
@@ -9,6 +9,7 @@ using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using TemuKJD.Helper;
namespace TemuKJD.BLL
{
@@ -625,5 +626,99 @@ namespace TemuKJD.BLL
result = GetProxyHtml.ReadResponse(response);
return result;
}
/// <summary>
/// 国际版调用接口
/// </summary>
/// <param name="shop"></param>
/// <param name="_url"></param>
/// <param name="_data"></param>
/// <param name="referer"></param>
/// <returns></returns>
public static string BaiduPostResponse(ShopLoginInfo shop, string _url, string _data, string referer)
{
//{\"d0\":\"gbgo3qifjng1j88aiar3\",\"ua\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36\",\"baiduid\":\"A2AACB419326AE9A7EA5C1538865CF5D:FG=1\",\"platform\":\"Win32\",\"d23\":0,\"hfe\":\"\",\"d1\":\"\",\"d2\":0,\"d420\":0,\"clientTs\":1761216113507,\"version\":\"1.4.0.3\",\"extra\":\"\",\"odkp\":0,\"hf\":\"\",\"d78\":6745,\"h0\":false,\"h1\":0}
string data = "{\"d0\":\"gbgo3qifjng1j88aiar3\"," +
"\"ua\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36\"," +
"\"baiduid\":\"A2AACB419326AE9A7EA5C1538865CF5D:FG=1\"," +
"\"platform\":\"Win32\",\"d23\":0,\"hfe\":\"\",\"d1\":\"\",\"d2\":0,\"d420\":0," +
"\"clientTs\":" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + ",\"version\":\"1.4.0.3\"," +
"\"extra\":\"\",\"odkp\":0,\"hf\":\"\",\"d78\":6745,\"h0\":false,\"h1\":0}";
string aesKey = "11115678901234561111567890123456";
string aesIv = "12345678111511111111111133331111";
string encrypted = "";
try
{
AesHelper helper = new AesHelper(aesKey, aesIv);
encrypted = helper.Encrypt(data);
encrypted = BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-6)) + "_" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + "_" + encrypted;
}
catch (Exception ex)
{
}
var cookiesArr = shop.Cookies2.Split(';').Select(s => s.Trim());
string cookies = "";
foreach (var cook in cookiesArr)
{
if (cook.StartsWith("mallid"))
cookies += "mallid=" + shop.ShopId + "; ";
else
cookies += cook + "; ";
}
cookies = cookies.Trim().TrimEnd(';');
HttpWebResponse response = null;
string result;
try
{
string url = _url;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36";
request.Accept = "text/event-stream";
request.Headers.Add("sec-ch-ua", @"""Google Chrome"";v=""141"", ""Not?A_Brand"";v=""8"", ""Chromium"";v=""141""");
request.Headers.Add("Acs-Token",data);
request.ContentType = "application/json";
request.Headers.Add("sec-ch-ua-mobile", @"?0");
request.Headers.Add("Origin", @"https://fanyi.baidu.com");
request.Headers.Add("Sec-Fetch-Site", @"same-origin");
request.Headers.Add("Sec-Fetch-Mode", @"cors");
request.Headers.Add("Sec-Fetch-Dest", @"empty");
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd");
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
request.Method = "POST";
request.ServicePoint.Expect100Continue = false;
string body = _data;
byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body);
request.ContentLength = postBytes.Length;
Stream stream = request.GetRequestStream();
stream.Write(postBytes, 0, postBytes.Length);
stream.Close();
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
return result;
}
}
}
+59
View File
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace TemuKJD.Helper
{
public class AesHelper
{
private readonly byte[] _key; // 256位密钥
private readonly byte[] _iv; // 128位初始化向量
public AesHelper(string base64Key, string base64Iv)
{
_key = Convert.FromBase64String(base64Key);
_iv = Convert.FromBase64String(base64Iv);
}
public string Encrypt(string plainText)
{
using (var aes = Aes.Create())
{
aes.Key = _key;
//aes.IV = _iv;
using (var encryptor = aes.CreateEncryptor())
using (var ms = new MemoryStream())
{
using (var cs = new CryptoStream(ms, encryptor, CryptoStreamMode.Write))
using (var sw = new StreamWriter(cs))
{
sw.Write(plainText);
}
return Convert.ToBase64String(ms.ToArray());
}
}
}
public string Decrypt(string cipherText)
{
using (var aes = Aes.Create())
{
aes.Key = _key;
aes.IV = _iv;
using (var decryptor = aes.CreateDecryptor())
using (var ms = new MemoryStream(Convert.FromBase64String(cipherText)))
using (var cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read))
using (var sr = new StreamReader(cs))
{
return sr.ReadToEnd();
}
}
}
}
}
+1
View File
@@ -123,6 +123,7 @@
</Compile>
<Compile Include="CookieVisitor.cs" />
<Compile Include="Extension\DataGridViewExtension.cs" />
<Compile Include="Helper\AesHelper.cs" />
<Compile Include="Helper\CustomResourceRequestHandlerLocal.cs" />
<Compile Include="Helper\FddlHelper.cs" />
<Compile Include="Helper\LifeSpanHandlerLocal.cs" />
@@ -1396,29 +1396,33 @@ namespace TemuKJD.KJDForms.AdminForms
return filterProdName != RestoreProductName(filterProdName);
}
string RestoreProductName(string pName)
public static string RestoreProductName(string pName)
{
string checkChineseName = pName.Replace("适合不同的搭配风格", "").Replace("个", "").Replace("适合不同的搭配场景", "");
bool containsChinese = Regex.IsMatch(checkChineseName, @"[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]");
string newPName = pName;
if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("个") < 4 && pName.IndexOf("个") > 0)
if ((pName.EndsWith("适合不同的搭配风格") || pName.EndsWith("适合不同的搭配场景")) && pName.IndexOf("个") < 4 && pName.IndexOf("个") > 0)
{
var headword = pName.Substring(0, pName.IndexOf("个") + 1);
newPName = pName.Substring(pName.IndexOf("个") + "个".Length);
if (containsChinese)
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格");
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格")
.Replace("适合不同的搭配场景", "适合" + headword + "不同的搭配场景");
else
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim();
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim()
.Replace("适合不同的搭配场景", "Suitable for " + headword + " different matching scenarios").Trim();
}
if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("pcs") < 4 && pName.IndexOf("pcs") > 0)
if ((pName.EndsWith("适合不同的搭配风格") || pName.EndsWith("适合不同的搭配场景")) && pName.IndexOf("pcs") < 4 && pName.IndexOf("pcs") > 0)
{
var headword = pName.Substring(0, pName.IndexOf("pcs"));
newPName = pName.Substring(pName.IndexOf("pcs") + "pcs".Length);
if (containsChinese)
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格");
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格")
.Replace("适合不同的搭配场景", "适合" + headword + "不同的搭配场景");
else
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim();
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim()
.Replace("适合不同的搭配场景", "Suitable for " + headword + " different matching scenarios").Trim();
}
return newPName;
}
@@ -110,6 +110,7 @@
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkUploadProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkEnglishProdName = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.lblCustomImgNum = new System.Windows.Forms.Label();
@@ -146,6 +147,8 @@
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.pnlError = new System.Windows.Forms.Panel();
this.lblError = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -172,6 +175,7 @@
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numSeconds)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
this.pnlError.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
@@ -216,6 +220,7 @@
this.splitContainer1.Panel1.Controls.Add(this.btnDel);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkAddPrice);
this.splitContainer1.Panel1.Controls.Add(this.chkEnglishProdName);
//
// splitContainer1.Panel2
//
@@ -228,7 +233,7 @@
//
this.chkLongTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkLongTitle.AutoSize = true;
this.chkLongTitle.Location = new System.Drawing.Point(1276, 71);
this.chkLongTitle.Location = new System.Drawing.Point(1276, 73);
this.chkLongTitle.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkLongTitle.Name = "chkLongTitle";
this.chkLongTitle.Size = new System.Drawing.Size(96, 21);
@@ -240,7 +245,7 @@
//
this.chkSameExtcodeRandomMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkSameExtcodeRandomMainImg.AutoSize = true;
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(1372, 71);
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(1372, 73);
this.chkSameExtcodeRandomMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkSameExtcodeRandomMainImg.Name = "chkSameExtcodeRandomMainImg";
this.chkSameExtcodeRandomMainImg.Size = new System.Drawing.Size(188, 21);
@@ -251,11 +256,12 @@
// lblSkuRandomLetterNotes
//
this.lblSkuRandomLetterNotes.AutoSize = true;
this.lblSkuRandomLetterNotes.Font = new System.Drawing.Font("微软雅黑", 8F);
this.lblSkuRandomLetterNotes.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(974, 75);
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(959, 75);
this.lblSkuRandomLetterNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes";
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17);
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(138, 16);
this.lblSkuRandomLetterNotes.TabIndex = 641;
this.lblSkuRandomLetterNotes.Text = "备注:当前特殊字符包括--";
//
@@ -1292,6 +1298,20 @@
this.chkAddPrice.Text = "加价";
this.chkAddPrice.UseVisualStyleBackColor = true;
//
// chkEnglishProdName
//
this.chkEnglishProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkEnglishProdName.AutoSize = true;
this.chkEnglishProdName.Checked = true;
this.chkEnglishProdName.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkEnglishProdName.Location = new System.Drawing.Point(1179, 73);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkEnglishProdName.Name = "chkEnglishProdName";
this.chkEnglishProdName.Size = new System.Drawing.Size(99, 21);
this.chkEnglishProdName.TabIndex = 679;
this.chkEnglishProdName.Text = "英文标题翻译";
this.chkEnglishProdName.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1302,6 +1322,7 @@
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pnlError);
this.splitContainer2.Panel1.Controls.Add(this.pbLoading);
this.splitContainer2.Panel1.Controls.Add(this.lblCustomImgNum);
this.splitContainer2.Panel1.Controls.Add(this.numSeconds);
@@ -1697,6 +1718,26 @@
this.statusBar.Size = new System.Drawing.Size(1558, 25);
this.statusBar.TabIndex = 5;
//
// pnlError
//
this.pnlError.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pnlError.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(244)))), ((int)(((byte)(224)))));
this.pnlError.Controls.Add(this.lblError);
this.pnlError.Location = new System.Drawing.Point(650, 95);
this.pnlError.Name = "pnlError";
this.pnlError.Size = new System.Drawing.Size(259, 120);
this.pnlError.TabIndex = 488;
this.pnlError.Visible = false;
//
// lblError
//
this.lblError.ForeColor = System.Drawing.Color.Red;
this.lblError.Location = new System.Drawing.Point(32, 26);
this.lblError.Name = "lblError";
this.lblError.Size = new System.Drawing.Size(200, 69);
this.lblError.TabIndex = 0;
this.lblError.Text = "错误tip";
//
// DbProductSelectListManageForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1740,6 +1781,7 @@
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numSeconds)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
this.pnlError.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -1854,5 +1896,8 @@
private System.Windows.Forms.Label lblSkuRandomLetterNotes;
private UserComponent.UcCheckBox chkSameExtcodeRandomMainImg;
private UserComponent.UcCheckBox chkLongTitle;
private UserComponent.UcCheckBox chkEnglishProdName;
private System.Windows.Forms.Panel pnlError;
private System.Windows.Forms.Label lblError;
}
}
@@ -1297,6 +1297,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
region2Id = prodInfo.productWhExtAttr.productOrigin.region2Id,
},
};
if (prodParam.productWhExtAttrReq.productOrigin.countryShortName == "CN" && prodParam.productWhExtAttrReq.productOrigin.region2Id == null)
{
prodParam.productWhExtAttrReq.productOrigin.region2Id = 43000000000006; //广东省
}
prodParam.sensitiveTransNormalFileReqs = prodInfo.productWhExtAttr.sensitiveTransNormalFiles;
prodParam.showSizeTemplateIds = prodInfo.showSizeTemplateIds != null ? prodInfo.showSizeTemplateIds : new List<long?>();
prodParam.sizeTemplateIds = prodInfo.sizeTemplateIds != null ? prodInfo.sizeTemplateIds : new List<long?>();
@@ -1411,28 +1415,37 @@ namespace TemuKJD.KJDForms.ProductSelectForms
skuItem.extCode = skuInfo.extCode;
skuItem.productSkuAccessoriesReq = new ProductSkuAccessoriesReq()
{
productSkuAccessories = skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories,
productSkuAccessories = skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories == null ?
new List<object>() : skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories,
};
skuItem.productSkuId = 0;
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
//skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
//{
// skuClassification = skuInfo.productSkuMultiPack.skuClassification,
// numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
// pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
// productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
// JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
//};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
mixedType = skuInfo.productSkuMultiPack.mixedType,
numberOfPiecesNew = skuInfo.productSkuMultiPack.numberOfPiecesNew,
pieceNewUnitCode = skuInfo.productSkuMultiPack.pieceNewUnitCode,
totalNetContent = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.totalNetContent)),
individuallyPacked = skuInfo.productSkuMultiPack.individuallyPacked,
};
if (skuInfo.productSkuMultiPack.individuallyPacked != null)
// 如果母店为多件但没有指定是否独立包装,强制指定非独立包装
var packReq = skuItem.productSkuMultiPackReq as ProductSkuMultiPackReq2;
if (packReq.skuClassification > 1 && packReq.individuallyPacked == null)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = skuInfo.productSkuMultiPack.individuallyPacked.ParseToInt(),
};
packReq.individuallyPacked = 0;
}
if (chkChangeSizeAndNumber.Checked)
{
@@ -1497,13 +1510,16 @@ namespace TemuKJD.KJDForms.ProductSelectForms
skuItem.productSkuThumbUrlI18nReqs = skuInfo.productSkuThumbUrlI18nVOList;
skuItem.productSkuUsSuggestedPriceReq = JsonHelper.DeserializeJsonToObject<ProductSkuUsSuggestedPriceReq>(
JsonHelper.SerializeObject(skuInfo.productSkuUsSuggestedPrice));
//敏感属性
skuItem.productSkuWhExtAttrReq = new ProductSkuWhExtAttrReq()
{
productSkuBarCodeReqs = skuInfo.productSkuWhExtAttr.productSkuBarCodes,
productSkuBarCodeReqs = skuInfo.productSkuWhExtAttr.productSkuBarCodes == null ? new List<object>() : skuInfo.productSkuWhExtAttr.productSkuBarCodes,
productSkuSensitiveAttrReq = new ProductSkuSensitiveAttrReq()
{
isSensitive = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.isSensitive,
sensitiveList = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.sensitiveList,
//isSensitive = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.isSensitive,
//sensitiveList = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.sensitiveList,
isSensitive = 0,
sensitiveList = new List<object>(),
},
productSkuSensitiveLimitReq = JsonHelper.DeserializeJsonToObject<ProductSkuSensitiveLimitReq>(
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuSensitiveLimit)),
@@ -1512,6 +1528,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms
productSkuWeightReq = JsonHelper.DeserializeJsonToObject<ProductSkuWeightReq>(
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuWeight)),
};
if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList == null)
skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList = new List<object>();
// 如果是液体,赋默认值1毫升(暂时注释)
//if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList.Any(s => s.ParseToInt() == 140001))
//{
// if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq == null)
// {
// skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq = new ProductSkuSensitiveLimitReq();
// }
// if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq.maxLiquidCapacityHp == null)
// {
// skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq.maxLiquidCapacityHp = 1000;
// }
//}
if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量
{
skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.len = len * 10;
@@ -1670,6 +1701,85 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//var length = prodParam.productName.Length;
//var length2 = Encoding.GetEncoding("gb2312").GetBytes(prodParam.productName).Length;
//string data = "{'text':'" + prodParam.productName + "','lan':'ch'}";
//data = "{'text':Hello,'lan':'en'}";
//本地翻译库,速度慢翻译不够准
//try
//{
// var client = new System.Net.Http.HttpClient();
// var content = new System.Net.Http.FormUrlEncodedContent(new[]
// {
// new KeyValuePair<string, string>("text", prodParam.productName),
// //new KeyValuePair<string, string>("lan", "en")
// new KeyValuePair<string, string>("lan", "ch")
// });
// var t = client.PostAsync("http://127.0.0.1:5690/report", content);
// t.Wait();
// var t1 = t.Result.Content.ReadAsStringAsync();
// t1.Wait();
// var rstText = t1.Result;
// prodParam.productI18nReqs = new List<productI18nParam>();
// productI18nParam productI18nEn = new productI18nParam
// {
// language = "en",
// productName = rstText,
// };
// ////测试得到英文标题最多可输入500个字符
// //while (productI18nEn.productName.Length < 501)
// // productI18nEn.productName += "a";
// //var length = prodParam.productName.Length;
// //prodParam.productI18nReqs.Add(productI18nEn);
//}
//catch (Exception ex)
//{
//}
//翻译英文标题
if (chkEnglishProdName.Checked)
{
var realName = AdminProductPriceCheckForm.RestoreProductName(prodParam.productName);
var transRst = translate(shop, realName);
var transRstTxt = BaseRegex.GetStringJson(ref transRst, "dst");
if (!string.IsNullOrEmpty(transRstTxt))
{
var transEndWords = "";
if (realName.EndsWith("不同的搭配场景") || realName.EndsWith("不同的搭配风格") ||
realName.EndsWith("different matching scenarios") || realName.EndsWith("different matching styles"))
{
transEndWords = transRstTxt.Substring(Math.Max(0, transRstTxt.LastIndexOf(',')));
}
while ((transRstTxt.Replace(transEndWords, "") + transEndWords).Length > 500)
{
transRstTxt = transRstTxt.Substring(0, Math.Max(1, transRstTxt.LastIndexOf(',')));
}
if (!string.IsNullOrEmpty(transEndWords))
transRstTxt = (transRstTxt.Replace(transEndWords, "") + transEndWords);
prodParam.productI18nReqs = new List<productI18nParam>();
productI18nParam productI18nEn = new productI18nParam
{
language = "en",
productName = transRstTxt,
};
prodParam.productI18nReqs.Add(productI18nEn);
}
else
{
Invoke(new Action(() =>
{
this.pnlError.Visible = true;
this.lblError.Text = "调用翻译功能失败……";
}));
Task.Run(() =>
{
Thread.Sleep(5000);
this.pnlError.Visible = false;
});
}
}
html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam);
if (html.Contains("\"success\":true"))
{
@@ -2036,6 +2146,18 @@ Content-Disposition: form-data; name=""upload_sign""
return HttpResponseBLL.PostResponseUpload(shop, url, body, refere, boundary);
}
private string translate(ShopLoginInfo shop, string text)
{
string url = "https://fanyi.baidu.com/ait/text/translate";
string tick = BaseClass.DateTimeToTimestampSeconds(DateTime.Now).ToString();
string body = "{\"isAi\":false,\"sseStartTime\":" + tick + ",\"query\":\"" + text + "\"," +
"\"from\":\"zh\",\"to\":\"en\",\"reference\":\"\",\"corpusIds\":[],\"needPhonetic\":true,\"domain\":\"common\",\"detectLang\":\"\"," +
"\"isIncognitoAI\":false,\"milliTimestamp\":" + tick + "}";
string refere = "";
return HttpResponseBLL.BaiduPostResponse(shop, url, body, refere);
}
private void btnSetSubSa_Click(object sender, EventArgs e)
{
@@ -231,11 +231,12 @@
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 8F);
this.label14.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.label14.Location = new System.Drawing.Point(974, 75);
this.label14.Location = new System.Drawing.Point(959, 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.Size = new System.Drawing.Size(277, 16);
this.label14.TabIndex = 640;
this.label14.Text = "备注:新的商品上传货号为固定前缀 EC + 上家商品SKC";
//
@@ -217,16 +217,17 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
if (!string.IsNullOrEmpty(getImgError))
BaseMsgForm.ShowError("图片加载失败" + getImgError);
try
Invoke(new Action(() =>
{
Invoke(new Action(() =>
try
{
row.Cells["colProductSkcPic"].Value = image;
}));
}
catch
{
}
}
catch
{
}
}));
}
});
}
@@ -1165,6 +1166,10 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
region2Id = prodInfo.productWhExtAttr.productOrigin.region2Id,
},
};
if (prodParam.productWhExtAttrReq.productOrigin.countryShortName == "CN" && prodParam.productWhExtAttrReq.productOrigin.region2Id == null)
{
prodParam.productWhExtAttrReq.productOrigin.region2Id = 43000000000006; //广东省
}
prodParam.sensitiveTransNormalFileReqs = prodInfo.productWhExtAttr.sensitiveTransNormalFiles;
prodParam.showSizeTemplateIds = prodInfo.showSizeTemplateIds != null ? prodInfo.showSizeTemplateIds : new List<long?>();
prodParam.sizeTemplateIds = prodInfo.sizeTemplateIds != null ? prodInfo.sizeTemplateIds : new List<long?>();
@@ -1281,28 +1286,37 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
skuItem.extCode = skuInfo.extCode;
skuItem.productSkuAccessoriesReq = new ProductSkuAccessoriesReq()
{
productSkuAccessories = skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories,
productSkuAccessories = skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories == null ?
new List<object>() : skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories,
};
skuItem.productSkuId = 0;
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
//skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
//{
// skuClassification = skuInfo.productSkuMultiPack.skuClassification,
// numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
// pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
// productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
// JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
//};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
mixedType = skuInfo.productSkuMultiPack.mixedType,
numberOfPiecesNew = skuInfo.productSkuMultiPack.numberOfPiecesNew,
pieceNewUnitCode = skuInfo.productSkuMultiPack.pieceNewUnitCode,
totalNetContent = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.totalNetContent)),
individuallyPacked = skuInfo.productSkuMultiPack.individuallyPacked,
};
if (skuInfo.productSkuMultiPack.individuallyPacked != null)
// 如果母店为多件但没有指定是否独立包装,强制指定非独立包装
var packReq = skuItem.productSkuMultiPackReq as ProductSkuMultiPackReq2;
if (packReq.skuClassification > 1 && packReq.individuallyPacked == null)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = skuInfo.productSkuMultiPack.individuallyPacked.ParseToInt(),
};
packReq.individuallyPacked = 0;
}
if (chkChangeSizeAndNumber.Checked)
{
@@ -1368,13 +1382,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
skuItem.productSkuThumbUrlI18nReqs = skuInfo.productSkuThumbUrlI18nVOList;
skuItem.productSkuUsSuggestedPriceReq = JsonHelper.DeserializeJsonToObject<ProductSkuUsSuggestedPriceReq>(
JsonHelper.SerializeObject(skuInfo.productSkuUsSuggestedPrice));
//敏感属性
skuItem.productSkuWhExtAttrReq = new ProductSkuWhExtAttrReq()
{
productSkuBarCodeReqs = skuInfo.productSkuWhExtAttr.productSkuBarCodes,
productSkuBarCodeReqs = skuInfo.productSkuWhExtAttr.productSkuBarCodes == null ? new List<object>() : skuInfo.productSkuWhExtAttr.productSkuBarCodes,
productSkuSensitiveAttrReq = new ProductSkuSensitiveAttrReq()
{
isSensitive = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.isSensitive,
sensitiveList = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.sensitiveList,
//isSensitive = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.isSensitive,
//sensitiveList = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.sensitiveList,
isSensitive = 0,
sensitiveList = new List<object>(),
},
productSkuSensitiveLimitReq = JsonHelper.DeserializeJsonToObject<ProductSkuSensitiveLimitReq>(
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuSensitiveLimit)),
@@ -1383,6 +1400,20 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
productSkuWeightReq = JsonHelper.DeserializeJsonToObject<ProductSkuWeightReq>(
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuWeight)),
};
if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList == null)
skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList = new List<object>();
// 如果是液体,赋默认值1毫升(暂时注释)
//if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveAttrReq.sensitiveList.Any(s => s.ParseToInt() == 140001))
//{
// if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq == null)
// {
// skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq = new ProductSkuSensitiveLimitReq();
// }
// if (skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq.maxLiquidCapacityHp == null)
// {
// skuItem.productSkuWhExtAttrReq.productSkuSensitiveLimitReq.maxLiquidCapacityHp = 1000;
// }
//}
if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量
{
skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.len = len * 10;
@@ -678,7 +678,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -36,8 +36,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
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.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.label3 = new System.Windows.Forms.Label();
this.numMinSaleCount = new System.Windows.Forms.NumericUpDown();
this.btnStopActvity = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.pnlTime = new System.Windows.Forms.Panel();
this.dtpCoupon1StartTime = new System.Windows.Forms.DateTimePicker();
this.lblStartTime = new System.Windows.Forms.Label();
@@ -102,6 +105,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).BeginInit();
this.ucGroupBoxEx2.SuspendLayout();
this.pnlTime.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numCoupon1KeepDays)).BeginInit();
@@ -137,6 +142,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
//
@@ -147,6 +153,76 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 15;
//
// ucGroupBoxEx3
//
this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.Controls.Add(this.label3);
this.ucGroupBoxEx3.Controls.Add(this.numMinSaleCount);
this.ucGroupBoxEx3.Controls.Add(this.btnStopActvity);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(901, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(280, 140);
this.ucGroupBoxEx3.TabIndex = 668;
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "结束活动";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(35, 25);
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 17);
this.label3.TabIndex = 755;
this.label3.Text = "销量≥";
//
// numMinSaleCount
//
this.numMinSaleCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMinSaleCount.Location = new System.Drawing.Point(76, 22);
this.numMinSaleCount.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.numMinSaleCount.Name = "numMinSaleCount";
this.numMinSaleCount.Size = new System.Drawing.Size(41, 23);
this.numMinSaleCount.TabIndex = 753;
this.numMinSaleCount.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// btnStopActvity
//
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopActvity.Location = new System.Drawing.Point(154, 22);
this.btnStopActvity.Name = "btnStopActvity";
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnStopActvity.Style.GradientAngle = 90;
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.TabIndex = 746;
this.btnStopActvity.Text = "一键结束活动";
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -154,7 +230,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
| 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.btnStopActvity);
this.ucGroupBoxEx2.Controls.Add(this.pnlTime);
this.ucGroupBoxEx2.Controls.Add(this.numQuantity);
this.ucGroupBoxEx2.Controls.Add(this.lblQuantity);
@@ -173,36 +248,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.ucGroupBoxEx2.Controls.Add(this.btnCreate);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1034, 140);
this.ucGroupBoxEx2.Size = new System.Drawing.Size(754, 140);
this.ucGroupBoxEx2.TabIndex = 667;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品查询创建";
//
// btnStopActvity
//
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopActvity.Location = new System.Drawing.Point(898, 87);
this.btnStopActvity.Name = "btnStopActvity";
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnStopActvity.Style.GradientAngle = 90;
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnStopActvity.TabIndex = 746;
this.btnStopActvity.Text = "一键结束活动";
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
//
// pnlTime
//
this.pnlTime.Controls.Add(this.dtpCoupon1StartTime);
@@ -310,7 +360,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
// chkTime
//
this.chkTime.AutoSize = true;
this.chkTime.Location = new System.Drawing.Point(160, 19);
this.chkTime.Location = new System.Drawing.Point(160, 23);
this.chkTime.Name = "chkTime";
this.chkTime.Size = new System.Drawing.Size(99, 21);
this.chkTime.TabIndex = 731;
@@ -407,7 +457,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.chkQuantity.AutoSize = true;
this.chkQuantity.Checked = true;
this.chkQuantity.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkQuantity.Location = new System.Drawing.Point(14, 19);
this.chkQuantity.Enabled = false;
this.chkQuantity.Location = new System.Drawing.Point(14, 23);
this.chkQuantity.Name = "chkQuantity";
this.chkQuantity.Size = new System.Drawing.Size(99, 21);
this.chkQuantity.TabIndex = 659;
@@ -427,17 +478,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
//
// txtCoupon1Name
//
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 18);
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 22);
this.txtCoupon1Name.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtCoupon1Name.Name = "txtCoupon1Name";
this.txtCoupon1Name.Size = new System.Drawing.Size(74, 23);
this.txtCoupon1Name.Size = new System.Drawing.Size(110, 23);
this.txtCoupon1Name.TabIndex = 489;
this.txtCoupon1Name.Text = "限量优惠";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(396, 21);
this.label2.Location = new System.Drawing.Point(396, 25);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
@@ -451,7 +502,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.btnCreate.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCreate.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCreate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCreate.Location = new System.Drawing.Point(898, 32);
this.btnCreate.Location = new System.Drawing.Point(627, 22);
this.btnCreate.Name = "btnCreate";
this.btnCreate.Size = new System.Drawing.Size(104, 23);
this.btnCreate.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -967,6 +1018,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx3.ResumeLayout(false);
this.ucGroupBoxEx3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).EndInit();
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.pnlTime.ResumeLayout(false);
@@ -1061,5 +1115,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays;
private System.Windows.Forms.DataGridViewTextBoxColumn colIsCanSet;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numMinSaleCount;
}
}
@@ -312,6 +312,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.dgvProduct.Columns["colActivityPrice"].Visible = false;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
@@ -675,6 +676,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
ucGroupBoxEx3.Enabled = true;
string sRst = "设置结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消设置!";
@@ -684,6 +686,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}));
}, cancellationTokenSource.Token);
}
public void GetToken(ShopLoginInfo shop)
{
if (!dicShopGetCount.Keys.Contains(shop))
@@ -728,7 +731,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -835,6 +838,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
this.dgvProduct.Columns["colActivityPrice"].Visible = true;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
@@ -894,14 +898,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
int totalPage = 1;
bool isError = false;
string errMsg = "";
while (page < totalPage)
while (page <= totalPage)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
if (page == 0)
page++;
int tryCount = 0;
tryAgain:
@@ -910,6 +911,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
if (page >= 1)
Thread.Sleep(Randomx.GetId(3000, 7000));
if (page == 0)
page++;
//long startStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value);
//long endStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value.Date.AddDays(numCoupon1KeepDays.Value.ParseToInt())) - 1;
string jsonStr = get_xianshixianliang_activity_prod_list(shop, page, pageSize);
@@ -935,6 +939,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
if (jsonStr.Contains("\"success\":true"))
{
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
MarketingActivityResult marketingActivityRst = new MarketingActivityResult();
try
{
@@ -947,6 +954,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
BaseMsgForm.ShowError(ex.Message);
}
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
.Where(r => !activityGoodsInfoLst.Any(a => a.activity_id == r.activity_id)).ToList();
if (marketingActivityRst.marketing_activity_list.Count == 0)
{
page++;
continue;
}
foreach (var pInfo in marketingActivityRst.marketing_activity_list)
{
if (pInfo.online_quantity < pInfo.online_activity_quantity)
@@ -954,7 +969,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}
pInfo.shopId = shop.ShopId;
pInfo.shopName = shop.ShopAccount;
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.goods_id == pInfo.goods_id))
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.activity_id == pInfo.activity_id))
{
activityGoodsInfoLst.Add(pInfo);
string url = pInfo.hd_thumb_url;
@@ -983,6 +998,10 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}));
}
}
//筛选销量达标的,如果没有则下一页
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
.Where(r => r.sold_activity_quantity >= numMinSaleCount.Value).ToList();
if (marketingActivityRst.marketing_activity_list.Count == 0)
{
page++;
@@ -991,6 +1010,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
foreach (var activityGoods in marketingActivityRst.marketing_activity_list)
{
Thread.Sleep(Randomx.GetId(500, 1500));
if (cancellationTokenSource.IsCancellationRequested)
break;
@@ -1020,9 +1040,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
}
}
}
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
}
}
@@ -1049,6 +1066,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
ucGroupBoxEx3.Enabled = true;
string sRst = "结束活动已完成!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消结束活动!";
@@ -1094,8 +1112,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
public string hd_thumb_url { get; set; }
public int? min_on_sale_group_price { get; set; }
public int? max_on_sale_group_price { get; set; }
/// <summary>
/// 商品总库存
/// </summary>
public int? online_quantity { get; set; }// 1584,
/// <summary>
/// 剩余库存
/// </summary>
public int? online_activity_quantity { get; set; }// 100,
/// <summary>
/// 已售出库存
/// </summary>
public int? sold_activity_quantity { get; set; }// 0,
public List<price_info> price_info { get; set; }
@@ -1107,5 +1134,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
{
public int? max_pre_sale_price { get; set; }// 8613,
public int? min_pre_sale_price { get; set; }// 8343,
/// <summary>
/// 活动开始时的库存
/// </summary>
public int? activity_quantity { get; set; }// 100,
/// <summary>
/// 活动剩余库存
/// </summary>
public int? activity_stock_quantity{ get; set; }// 94,
}
}
@@ -592,7 +592,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
@@ -577,7 +577,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
// loginForm.TopLevel = false;
// loginForm.openType = EnumOpenType.manage;
// loginForm.WindowState = FormWindowState.Maximized;
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool/surprise-coupon/create/";
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
// loginForm.Dock = DockStyle.Fill;
// this.panel1.Controls.Add(loginForm);
// loginForm.Show();
@@ -593,7 +593,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
+238 -186
View File
@@ -30,19 +30,12 @@ namespace TemuKJD.PDDForms.ProductForms
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 dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnUp = new DevComponents.DotNetBar.PanelEx();
this.btnDown = new DevComponents.DotNetBar.PanelEx();
@@ -66,6 +59,8 @@ namespace TemuKJD.PDDForms.ProductForms
this.label6 = 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();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -77,6 +72,8 @@ namespace TemuKJD.PDDForms.ProductForms
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -96,11 +93,20 @@ namespace TemuKJD.PDDForms.ProductForms
this.colIsOnSale = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.txtMinPrice = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtMaxPrice = new System.Windows.Forms.TextBox();
this.label9 = 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();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
@@ -109,16 +115,14 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -141,139 +145,6 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.TabIndex = 12;
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1362, 437);
this.splitContainer3.SplitterDistance = 407;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1362, 407);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.TabIndex = 0;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(504, 178);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 188;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.ucSplitPage1);
this.panel1.Location = new System.Drawing.Point(36, 53);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(984, 321);
this.panel1.TabIndex = 189;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1362, 26);
this.splitContainer4.SplitterDistance = 671;
this.splitContainer4.TabIndex = 3;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(4, 2);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(568, 3);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -281,6 +152,10 @@ namespace TemuKJD.PDDForms.ProductForms
| 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.txtMinPrice);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtMaxPrice);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.btnUp);
this.ucGroupBoxEx2.Controls.Add(this.btnDown);
this.ucGroupBoxEx2.Controls.Add(this.label3);
@@ -288,19 +163,14 @@ namespace TemuKJD.PDDForms.ProductForms
this.ucGroupBoxEx2.Controls.Add(this.txtSkuSns);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.pnlEmpty);
this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv);
this.ucGroupBoxEx2.Controls.Add(this.txtShopId);
this.ucGroupBoxEx2.Controls.Add(this.label5);
this.ucGroupBoxEx2.Controls.Add(this.btnSearch);
this.ucGroupBoxEx2.Controls.Add(this.cmbStatus);
this.ucGroupBoxEx2.Controls.Add(this.label8);
this.ucGroupBoxEx2.Controls.Add(this.txtSPU);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.txtExtCode);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.btnDelSelect);
this.ucGroupBoxEx2.Controls.Add(this.txtShopName);
this.ucGroupBoxEx2.Controls.Add(this.label6);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1212, 140);
@@ -417,6 +287,7 @@ namespace TemuKJD.PDDForms.ProductForms
this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.pnlEmpty.TabIndex = 504;
this.pnlEmpty.Text = "清空条件";
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// btnClearDgv
//
@@ -424,7 +295,7 @@ namespace TemuKJD.PDDForms.ProductForms
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(1056, 72);
this.btnClearDgv.Location = new System.Drawing.Point(822, 18);
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearDgv.Name = "btnClearDgv";
this.btnClearDgv.Size = new System.Drawing.Size(124, 23);
@@ -447,7 +318,7 @@ namespace TemuKJD.PDDForms.ProductForms
//
// txtShopId
//
this.txtShopId.Location = new System.Drawing.Point(384, 76);
this.txtShopId.Location = new System.Drawing.Point(577, 18);
this.txtShopId.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(85, 23);
@@ -521,7 +392,7 @@ namespace TemuKJD.PDDForms.ProductForms
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(473, 79);
this.label7.Location = new System.Drawing.Point(666, 21);
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 17);
@@ -574,7 +445,7 @@ namespace TemuKJD.PDDForms.ProductForms
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(529, 76);
this.txtShopName.Location = new System.Drawing.Point(722, 18);
this.txtShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(86, 23);
@@ -584,7 +455,7 @@ namespace TemuKJD.PDDForms.ProductForms
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(340, 79);
this.label6.Location = new System.Drawing.Point(533, 21);
this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 17);
@@ -631,22 +502,63 @@ namespace TemuKJD.PDDForms.ProductForms
this.btnRefreshShop.Text = "刷新店铺";
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1362, 437);
this.splitContainer3.SplitterDistance = 407;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1362, 407);
this.splitContainer2.SplitterDistance = 300;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle26.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle26;
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;
dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle27;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -751,6 +663,34 @@ namespace TemuKJD.PDDForms.ProductForms
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(504, 178);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 188;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.ucSplitPage1);
this.panel1.Controls.Add(this.txtShopName);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.txtShopId);
this.panel1.Controls.Add(this.btnClearDgv);
this.panel1.Location = new System.Drawing.Point(36, 53);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(984, 321);
this.panel1.TabIndex = 189;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
@@ -769,18 +709,18 @@ namespace TemuKJD.PDDForms.ProductForms
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle28.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle28;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.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.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle29.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle29.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle29.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle29.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -864,8 +804,8 @@ namespace TemuKJD.PDDForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle30;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -933,6 +873,25 @@ namespace TemuKJD.PDDForms.ProductForms
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 200;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1362, 26);
this.splitContainer4.SplitterDistance = 671;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
@@ -944,6 +903,94 @@ namespace TemuKJD.PDDForms.ProductForms
this.statusBar.Size = new System.Drawing.Size(671, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(4, 1);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(568, 2);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click);
//
// txtMinPrice
//
this.txtMinPrice.Location = new System.Drawing.Point(383, 73);
this.txtMinPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtMinPrice.Name = "txtMinPrice";
this.txtMinPrice.Size = new System.Drawing.Size(85, 23);
this.txtMinPrice.TabIndex = 658;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(472, 76);
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);
this.label4.TabIndex = 661;
this.label4.Text = "最高价格";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtMaxPrice
//
this.txtMaxPrice.Location = new System.Drawing.Point(528, 73);
this.txtMaxPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtMaxPrice.Name = "txtMaxPrice";
this.txtMaxPrice.Size = new System.Drawing.Size(86, 23);
this.txtMaxPrice.TabIndex = 660;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(327, 76);
this.label9.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 659;
this.label9.Text = "最低价格";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// PDDProductUpDownForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -959,6 +1006,9 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
@@ -967,17 +1017,15 @@ namespace TemuKJD.PDDForms.ProductForms
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
@@ -1046,5 +1094,9 @@ namespace TemuKJD.PDDForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colIsOnSale;
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private System.Windows.Forms.TextBox txtMinPrice;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtMaxPrice;
private System.Windows.Forms.Label label9;
}
}
@@ -196,9 +196,6 @@ namespace TemuKJD.PDDForms.ProductForms
row.Cells["colMessage"].Value = "";
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -209,9 +206,6 @@ namespace TemuKJD.PDDForms.ProductForms
foreach (var shopId in lstShopIdTemp)
{
int sleepTime = 0;
int sleepTimeTotal = 0;
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
@@ -295,7 +289,12 @@ namespace TemuKJD.PDDForms.ProductForms
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);
long? minPrice = null, maxPrice = null;
if (!string.IsNullOrWhiteSpace(txtMinPrice.Text))
minPrice = (txtMinPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
if (!string.IsNullOrWhiteSpace(txtMaxPrice.Text))
maxPrice = (txtMaxPrice.Text.Trim().ParseToDecimal() * 100).ParseToLong();
string jsonStr = shop_goods_search(shop, goods_id_list, txtGoodsName.Text.Trim(), out_goods_sn_list, skuSns, isOnsale, minPrice, maxPrice, page, pageSize);
if (jsonStr.Contains("繁忙") && tryCount < 5)
{
tryCount++;
@@ -411,7 +410,7 @@ namespace TemuKJD.PDDForms.ProductForms
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)
List<string> out_goods_sn_list = null, List<string> out_sku_sns = null, int? isOnsale = null, long? minPrice=null, long? maxPrice=null, int page=1, int pageSize = 100)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
@@ -434,6 +433,15 @@ namespace TemuKJD.PDDForms.ProductForms
dicParam["out_sku_sns"] = out_sku_sns;
dicParam["sold_out"] = 0;
dicParam["size"] = pageSize;
if (minPrice != null || maxPrice != null)
{
long[] nArr = new long[] { 0, 1000000000 };
if (minPrice != null)
nArr[0] = minPrice.Value;
if (maxPrice != null)
nArr[1] = maxPrice.Value;
dicParam["sku_price_range"] = nArr;
}
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";
@@ -553,8 +561,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -672,8 +678,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -792,30 +796,25 @@ namespace TemuKJD.PDDForms.ProductForms
{
dicShopGetCount[shop] = 0;
while (PDDShopLoginForm.shopLoginInstance != null && !PDDShopLoginForm.shopLoginInstance.IsDisposed)
{
Thread.Sleep(500);
}
PDDShopLoginForm loginForm = null;
Invoke(new Action(() =>
{
this.panel1.SendToBack();
PDDShopLoginForm loginForm = new PDDShopLoginForm(shop);
loginForm = new PDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
loginForm.WindowState = FormWindowState.Maximized;
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
loginForm.InitUrl = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
loginForm.Dock = DockStyle.Fill;
this.panel1.Controls.Add(loginForm);
loginForm.Show();
}));
int sleepTime = Randomx.GetId(2000, 3000);
Thread.Sleep(sleepTime);
Thread.Sleep(Randomx.GetId(3000, 5000));
Invoke(new Action(() =>
{
if (PDDShopLoginForm.shopLoginInstance != null)
PDDShopLoginForm.shopLoginInstance.Dispose();
if (loginForm != null)
loginForm.Close();
}));
}
}
@@ -835,8 +834,6 @@ namespace TemuKJD.PDDForms.ProductForms
return;
}
if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true)
PDDShopLoginForm.shopLoginInstance.Dispose();
ucGroupBoxEx2.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
@@ -984,5 +981,11 @@ namespace TemuKJD.PDDForms.ProductForms
{
}
private void pnlEmpty_Click(object sender, EventArgs e)
{
cmbStatus.Text = "在售";
txtSPU.Text = txtGoodsName.Text = txtExtCode.Text = txtSkuSns.Text = txtMinPrice.Text = txtMaxPrice.Text = "";
}
}
}