模拟提交商品,测试最多能传50件左右就会出限制
This commit is contained in:
1 parent
6639224771
commit
6509233208
37 files changed
+2576
-450
No files matched your search
@@ -796,6 +796,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.colImportCookies.ReadOnly = true;
|
||||
this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colImportCookies.Visible = false;
|
||||
//
|
||||
// colCopyCookies
|
||||
//
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
|
||||
this.splitContainer1.SplitterDistance = 675;
|
||||
this.splitContainer1.SplitterDistance = 676;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -102,6 +102,7 @@
|
||||
this.btnReturnPackage.TabIndex = 463;
|
||||
this.btnReturnPackage.Text = "提交退货到库存管理";
|
||||
this.btnReturnPackage.UseVisualStyleBackColor = false;
|
||||
this.btnReturnPackage.Visible = false;
|
||||
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
|
||||
//
|
||||
// btnLoginAgain
|
||||
@@ -356,8 +357,8 @@
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "PDDAdminShopLoginForm";
|
||||
this.ShowMaximizeBox = true;
|
||||
this.Text = "店铺登录";
|
||||
this.TitleText = "店铺登录";
|
||||
this.Text = "店铺登录 - 管理员";
|
||||
this.TitleText = "店铺登录 - 管理员";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed);
|
||||
this.Load += new System.EventHandler(this.ShopLoginForm_Load);
|
||||
this.Controls.SetChildIndex(this.splitContainer2, 0);
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
UserName = shop.UserName,
|
||||
Notes = shop.Notes,
|
||||
Cookies = cookies,
|
||||
AntiContents = new List<string> { sc.AntiContent },
|
||||
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(shop.Cookies)) // 有cookie的认为是已登录过的
|
||||
@@ -179,11 +179,12 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
else
|
||||
{
|
||||
shop.AntiContents = newShop.AntiContents;
|
||||
var urlAddress = BaseClass.BuildObjString("shop/mdy_anti_content");
|
||||
var data = UserLogin.GetSignaturex()
|
||||
+ "&login_name=" + shop.LoginName
|
||||
+ "&shop_id=" + shop.ShopId
|
||||
+ "&anti_contents=" + JsonHelper.SerializeObject(shop.AntiContents);
|
||||
+ "&anti_contents=" + JsonHelper.SerializeObject(newShop.AntiContents);
|
||||
var result = GetHtml.PostUtf8(urlAddress, data);
|
||||
}
|
||||
}
|
||||
@@ -485,7 +486,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
||||
}
|
||||
|
||||
int GetAntiContentsTimes = 0;
|
||||
int GetAntiContentsTimes = 40;
|
||||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||
{
|
||||
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
|
||||
@@ -493,9 +494,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
{
|
||||
GetAntiContentsTimes++;
|
||||
shop.AntiContents.Add(antiContent);
|
||||
while (shop.AntiContents.Count > 10)
|
||||
while (shop.AntiContents.Count > 50)
|
||||
shop.AntiContents.RemoveAt(0);
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 5)
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 50)
|
||||
{
|
||||
GetAntiContentsTimes = 0;
|
||||
var antis = shop.AntiContents;
|
||||
@@ -512,7 +513,23 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
//var data = responseData;
|
||||
var data = responseData;
|
||||
if (data.Contains("\"validate_message\""))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("out_goods_sn"))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("手指涂胶手套") || data.Contains("\\u624b\\u5957"))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("劳保手套橡胶手套防护手套工地防护工地手套"))
|
||||
{
|
||||
|
||||
}
|
||||
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
|
||||
//{
|
||||
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
|
||||
@@ -561,7 +578,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
if (currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
|
||||
{
|
||||
Task.Run(() => {
|
||||
//Task.Run(() => {
|
||||
string sAddInputJs = @"
|
||||
document.addEventListener('wheel', function(event) {
|
||||
// 检查滚动方向
|
||||
@@ -596,7 +613,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
}";
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
|
||||
});
|
||||
//});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
{
|
||||
public partial class PDDDBProdEditNotesForm : LRBaseForm
|
||||
{
|
||||
TemuDBProduct dbProd = null;
|
||||
KJDDBProduct dbProd = null;
|
||||
|
||||
public PDDDBProdEditNotesForm(TemuDBProduct prod)
|
||||
public PDDDBProdEditNotesForm(KJDDBProduct prod)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
+56
-33
@@ -38,6 +38,7 @@ 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.btnDelSelect = new TemuKJD.UserControls.ButtonEx();
|
||||
this.cmbSort = new System.Windows.Forms.ComboBox();
|
||||
this.btnSelect = new TemuKJD.UserControls.ButtonEx();
|
||||
this.txtNotes = new System.Windows.Forms.TextBox();
|
||||
@@ -58,8 +59,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.col_product_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -79,6 +78,8 @@ 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();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -102,6 +103,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnDelSelect);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmbSort);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtNotes);
|
||||
@@ -123,10 +125,28 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1278, 686);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1358, 686);
|
||||
this.splitContainer1.SplitterDistance = 53;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// btnDelSelect
|
||||
//
|
||||
this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDelSelect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
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.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnDelSelect.Name = "btnDelSelect";
|
||||
this.btnDelSelect.Size = new System.Drawing.Size(91, 26);
|
||||
this.btnDelSelect.TabIndex = 452;
|
||||
this.btnDelSelect.Text = "删除选中商品";
|
||||
this.btnDelSelect.UseVisualStyleBackColor = false;
|
||||
this.btnDelSelect.Visible = false;
|
||||
this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_Click);
|
||||
//
|
||||
// cmbSort
|
||||
//
|
||||
this.cmbSort.FormattingEnabled = true;
|
||||
@@ -147,7 +167,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(1171, 14);
|
||||
this.btnSelect.Location = new System.Drawing.Point(1251, 14);
|
||||
this.btnSelect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(91, 26);
|
||||
@@ -320,7 +340,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1278, 629);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1358, 629);
|
||||
this.splitContainer2.SplitterDistance = 600;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
@@ -328,7 +348,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(614, 275);
|
||||
this.pbLoading.Location = new System.Drawing.Point(654, 275);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -378,34 +398,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.dgvDbProduct.Name = "dgvDbProduct";
|
||||
this.dgvDbProduct.ReadOnly = true;
|
||||
this.dgvDbProduct.RowTemplate.Height = 23;
|
||||
this.dgvDbProduct.Size = new System.Drawing.Size(1270, 600);
|
||||
this.dgvDbProduct.Size = new System.Drawing.Size(1350, 600);
|
||||
this.dgvDbProduct.TabIndex = 6;
|
||||
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.Location = new System.Drawing.Point(916, 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.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(1278, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -552,14 +549,39 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// DbProductListForm
|
||||
// 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;
|
||||
//
|
||||
// PDDDBProdListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(1280, 720);
|
||||
this.ClientSize = new System.Drawing.Size(1360, 720);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
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 = "DbProductListForm";
|
||||
this.Name = "PDDDBProdListForm";
|
||||
this.Text = "产品数据库";
|
||||
this.TitleText = "产品数据库";
|
||||
this.Load += new System.EventHandler(this.ProductListForm_Load);
|
||||
@@ -624,5 +646,6 @@ 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 UserControls.ButtonEx btnDelSelect;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
{
|
||||
ShopLoginInfo shop = null;
|
||||
|
||||
List<TemuDBProduct> lstTemuDbProduct = new List<TemuDBProduct>();
|
||||
List<KJDDBProduct> lstTemuDbProduct = new List<KJDDBProduct>();
|
||||
|
||||
public PDDDBProdListForm()
|
||||
{
|
||||
@@ -50,6 +50,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//this.dgvDbProduct.Columns["col_notes"].Visible = true;
|
||||
//this.lblNotes.Visible = true;
|
||||
//this.txtNotes.Visible = true;
|
||||
|
||||
btnDelSelect.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -61,6 +63,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//this.dgvDbProduct.Columns["col_notes"].Visible = false;
|
||||
//this.lblNotes.Visible = false;
|
||||
//this.txtNotes.Visible = false;
|
||||
|
||||
btnDelSelect.Visible = false;
|
||||
}
|
||||
|
||||
btnSelect.Visible = false;
|
||||
@@ -202,9 +206,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
});
|
||||
}
|
||||
|
||||
public List<TemuDBProduct> GetProductList(out int pageCount, int page = 1, int pageSize = 200)
|
||||
public List<KJDDBProduct> GetProductList(out int pageCount, int page = 1, int pageSize = 200)
|
||||
{
|
||||
List<TemuDBProduct> list = new List<TemuDBProduct>();
|
||||
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
||||
pageCount = 1;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_product_list");
|
||||
@@ -259,12 +263,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<TemuDBProduct>(sProd);
|
||||
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd);
|
||||
return list;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new List<TemuDBProduct>();
|
||||
return new List<KJDDBProduct>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +326,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
imgFrom.ShowDialog();
|
||||
break;
|
||||
case "认领":
|
||||
Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
|
||||
Task.Run(() => { SelectProduct(new KJDDBProduct[] { dbProduct }); });
|
||||
break;
|
||||
case "":
|
||||
dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
|
||||
@@ -332,7 +336,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectProduct(TemuDBProduct[] prods)
|
||||
private void SelectProduct(KJDDBProduct[] prods)
|
||||
{
|
||||
if (shop == null)
|
||||
{
|
||||
@@ -440,7 +444,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}));
|
||||
}
|
||||
|
||||
public static string GetFissionProductName(TemuDBProduct prod)
|
||||
public static string GetFissionProductName(KJDDBProduct prod)
|
||||
{
|
||||
|
||||
string headWords = "";
|
||||
@@ -488,7 +492,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
return (headWords + prod.product_name + centerWords + endWords).Trim(',');
|
||||
}
|
||||
|
||||
private void DeleteProduct(string dbId)
|
||||
private void DeleteProduct(string dbId, bool isUpdate = true)
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product/del_db_product");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
@@ -505,7 +509,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchDbProd(this.ucSplitPage1.CurrentPage);
|
||||
if (isUpdate)
|
||||
SearchDbProd(this.ucSplitPage1.CurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,5 +541,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
{
|
||||
ShowDgvImg();
|
||||
}
|
||||
|
||||
private void btnDelSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
var lstProdId = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["col_spu_id"]?.Value.ToString()).ToList();
|
||||
var prodList = this.lstTemuDbProduct.Where(p => lstProdId.Contains(p.spu_id)).ToArray();
|
||||
|
||||
if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
|
||||
return;
|
||||
this.pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
foreach (var prod in prodList)
|
||||
{
|
||||
DeleteProduct(prod.id.ToString(), false);
|
||||
}
|
||||
SearchDbProd(this.ucSplitPage1.CurrentPage);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
pbLoading.Visible = false;
|
||||
BaseMsgForm.ShowInfo("删除完成!");
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+241
-53
@@ -36,6 +36,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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.btnStop = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.txtAddMorePrice = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.txtAddTimes = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.btnUpload = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtStockNum = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
@@ -54,7 +65,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.txtProdName = new System.Windows.Forms.TextBox();
|
||||
this.cmbUserNotes = new System.Windows.Forms.ComboBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.cmbStatus = new System.Windows.Forms.ComboBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
|
||||
@@ -74,13 +84,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colInShop = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colInShop = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -93,6 +104,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colUserNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
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();
|
||||
@@ -102,6 +114,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.ucGroupBoxEx2.SuspendLayout();
|
||||
this.ucGroupBoxEx4.SuspendLayout();
|
||||
this.ucGroupBoxEx1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
||||
@@ -131,6 +144,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
|
||||
//
|
||||
@@ -141,11 +155,177 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer1.SplitterDistance = 120;
|
||||
this.splitContainer1.TabIndex = 11;
|
||||
//
|
||||
// ucGroupBoxEx4
|
||||
// ucGroupBoxEx2
|
||||
//
|
||||
this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.ucGroupBoxEx2.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.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.btnStop);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label11);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label10);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label9);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.btnUpload);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.txtStockNum);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label4);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.btnDelSelect);
|
||||
this.ucGroupBoxEx2.Location = new System.Drawing.Point(884, 2);
|
||||
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
|
||||
this.ucGroupBoxEx2.Size = new System.Drawing.Size(398, 120);
|
||||
this.ucGroupBoxEx2.TabIndex = 667;
|
||||
this.ucGroupBoxEx2.TabStop = false;
|
||||
this.ucGroupBoxEx2.Text = "商品上传";
|
||||
//
|
||||
// btnStop
|
||||
//
|
||||
this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
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(317, 70);
|
||||
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnStop.Name = "btnStop";
|
||||
this.btnStop.Size = new System.Drawing.Size(56, 23);
|
||||
this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.btnStop.Style.GradientAngle = 90;
|
||||
this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnStop.TabIndex = 546;
|
||||
this.btnStop.Text = "停止上传";
|
||||
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(188, 35);
|
||||
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(20, 17);
|
||||
this.label11.TabIndex = 536;
|
||||
this.label11.Text = "元";
|
||||
//
|
||||
// txtAddMorePrice
|
||||
//
|
||||
this.txtAddMorePrice.Location = new System.Drawing.Point(157, 32);
|
||||
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);
|
||||
this.txtAddMorePrice.TabIndex = 535;
|
||||
this.txtAddMorePrice.Text = "5";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(114, 35);
|
||||
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);
|
||||
this.label10.TabIndex = 534;
|
||||
this.label10.Text = "倍再加";
|
||||
//
|
||||
// txtAddTimes
|
||||
//
|
||||
this.txtAddTimes.Location = new System.Drawing.Point(83, 32);
|
||||
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);
|
||||
this.txtAddTimes.TabIndex = 532;
|
||||
this.txtAddTimes.Text = "2";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(28, 35);
|
||||
this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(56, 17);
|
||||
this.label9.TabIndex = 533;
|
||||
this.label9.Text = "加价金额";
|
||||
//
|
||||
// btnUpload
|
||||
//
|
||||
this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
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(226, 70);
|
||||
this.btnUpload.Name = "btnUpload";
|
||||
this.btnUpload.Size = new System.Drawing.Size(89, 23);
|
||||
this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnUpload.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnUpload.Style.GradientAngle = 90;
|
||||
this.btnUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUpload.TabIndex = 517;
|
||||
this.btnUpload.Text = "批量上传选中";
|
||||
this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
|
||||
//
|
||||
// txtStockNum
|
||||
//
|
||||
this.txtStockNum.Location = new System.Drawing.Point(83, 67);
|
||||
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.TabIndex = 530;
|
||||
this.txtStockNum.Text = "99";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(28, 70);
|
||||
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 = 531;
|
||||
this.label4.Text = "库存数量";
|
||||
//
|
||||
// btnDelSelect
|
||||
//
|
||||
this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnDelSelect.Location = new System.Drawing.Point(226, 32);
|
||||
this.btnDelSelect.Name = "btnDelSelect";
|
||||
this.btnDelSelect.Size = new System.Drawing.Size(147, 23);
|
||||
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnDelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnDelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnDelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnDelSelect.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnDelSelect.Style.GradientAngle = 90;
|
||||
this.btnDelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnDelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.TabIndex = 468;
|
||||
this.btnDelSelect.Text = "删除选中记录";
|
||||
this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_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.pnlEmpty);
|
||||
@@ -165,23 +345,22 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.ucGroupBoxEx4.Controls.Add(this.txtProdName);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.cmbUserNotes);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.label12);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.btnDelSelect);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.cmbStatus);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.label8);
|
||||
this.ucGroupBoxEx4.Controls.Add(this.btnSearch);
|
||||
this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2);
|
||||
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
|
||||
this.ucGroupBoxEx4.Size = new System.Drawing.Size(1135, 120);
|
||||
this.ucGroupBoxEx4.Size = new System.Drawing.Size(737, 120);
|
||||
this.ucGroupBoxEx4.TabIndex = 666;
|
||||
this.ucGroupBoxEx4.TabStop = false;
|
||||
this.ucGroupBoxEx4.Text = "认领商品查询";
|
||||
this.ucGroupBoxEx4.Text = "待传商品查询";
|
||||
//
|
||||
// pnlEmpty
|
||||
//
|
||||
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(705, 32);
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(664, 32);
|
||||
this.pnlEmpty.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.pnlEmpty.Name = "pnlEmpty";
|
||||
this.pnlEmpty.Size = new System.Drawing.Size(56, 23);
|
||||
@@ -361,31 +540,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label12.TabIndex = 485;
|
||||
this.label12.Text = "备注";
|
||||
//
|
||||
// btnDelSelect
|
||||
//
|
||||
this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnDelSelect.Location = new System.Drawing.Point(982, 32);
|
||||
this.btnDelSelect.Name = "btnDelSelect";
|
||||
this.btnDelSelect.Size = new System.Drawing.Size(126, 23);
|
||||
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnDelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnDelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnDelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnDelSelect.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnDelSelect.Style.GradientAngle = 90;
|
||||
this.btnDelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnDelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnDelSelect.TabIndex = 468;
|
||||
this.btnDelSelect.Text = "删除选中记录";
|
||||
this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_Click);
|
||||
//
|
||||
// cmbStatus
|
||||
//
|
||||
this.cmbStatus.FormattingEnabled = true;
|
||||
@@ -417,7 +571,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSearch.Location = new System.Drawing.Point(572, 32);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(126, 23);
|
||||
this.btnSearch.Size = new System.Drawing.Size(90, 23);
|
||||
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -430,7 +584,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSearch.TabIndex = 427;
|
||||
this.btnSearch.Text = "认领商品查询";
|
||||
this.btnSearch.Text = "待传商品查询";
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// ucGroupBoxEx1
|
||||
@@ -506,6 +660,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
|
||||
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(1284, 392);
|
||||
@@ -592,7 +747,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colSelectProduct
|
||||
//
|
||||
this.colSelectProduct.HeaderText = "认领商品";
|
||||
this.colSelectProduct.HeaderText = "选择商品";
|
||||
this.colSelectProduct.Name = "colSelectProduct";
|
||||
this.colSelectProduct.ReadOnly = true;
|
||||
this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
@@ -640,6 +795,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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.Location = new System.Drawing.Point(36, 53);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(906, 306);
|
||||
this.panel1.TabIndex = 189;
|
||||
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
|
||||
//
|
||||
// dgvSelectProduct
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
@@ -662,8 +828,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSelectId,
|
||||
this.colSupplierId,
|
||||
this.colSupplierName,
|
||||
this.colInShop,
|
||||
this.colLogin,
|
||||
this.colInShop,
|
||||
this.colSpuId,
|
||||
this.colSkcId,
|
||||
this.colImgUrl,
|
||||
@@ -675,7 +841,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colDraftId,
|
||||
this.colNotes,
|
||||
this.colUserNotes,
|
||||
this.ColDelete});
|
||||
this.ColDelete,
|
||||
this.colOpResult});
|
||||
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
|
||||
this.dgvSelectProduct.Name = "dgvSelectProduct";
|
||||
@@ -718,16 +885,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSupplierName.ReadOnly = true;
|
||||
this.colSupplierName.Width = 110;
|
||||
//
|
||||
// colInShop
|
||||
//
|
||||
this.colInShop.Frozen = true;
|
||||
this.colInShop.HeaderText = "进店";
|
||||
this.colInShop.Name = "colInShop";
|
||||
this.colInShop.ReadOnly = true;
|
||||
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colInShop.Width = 45;
|
||||
//
|
||||
// colLogin
|
||||
//
|
||||
this.colLogin.HeaderText = "登录";
|
||||
@@ -735,9 +892,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colLogin.ReadOnly = true;
|
||||
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colLogin.Visible = false;
|
||||
this.colLogin.Width = 45;
|
||||
//
|
||||
// colInShop
|
||||
//
|
||||
this.colInShop.HeaderText = "进店";
|
||||
this.colInShop.Name = "colInShop";
|
||||
this.colInShop.ReadOnly = true;
|
||||
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colInShop.Width = 45;
|
||||
//
|
||||
// colSpuId
|
||||
//
|
||||
this.colSpuId.HeaderText = "商品SPU";
|
||||
@@ -779,7 +944,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
this.colProductName.Width = 200;
|
||||
this.colProductName.Width = 120;
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
@@ -821,6 +986,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colUserNotes.Name = "colUserNotes";
|
||||
this.colUserNotes.ReadOnly = true;
|
||||
this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colUserNotes.Visible = false;
|
||||
this.colUserNotes.Width = 75;
|
||||
//
|
||||
// ColDelete
|
||||
@@ -830,6 +996,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.ColDelete.ReadOnly = true;
|
||||
this.ColDelete.Width = 75;
|
||||
//
|
||||
// colOpResult
|
||||
//
|
||||
this.colOpResult.HeaderText = "操作结果";
|
||||
this.colOpResult.Name = "colOpResult";
|
||||
this.colOpResult.ReadOnly = true;
|
||||
//
|
||||
// splitContainer4
|
||||
//
|
||||
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
@@ -915,22 +1087,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = false;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(114, 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(573, 26);
|
||||
this.ucSplitPage1.TabIndex = 675;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// DbProductUserSelectForm
|
||||
// PDDDBProdUserSelectForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(1284, 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 = "DbProductUserSelectForm";
|
||||
this.Name = "PDDDBProdUserSelectForm";
|
||||
this.Text = "UserSelectDbProductForm";
|
||||
this.Load += new System.EventHandler(this.UserSelectDbProductForm_Load);
|
||||
this.VisibleChanged += new System.EventHandler(this.UserSelectDbProductForm_VisibleChanged);
|
||||
@@ -938,6 +1112,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ucGroupBoxEx2.ResumeLayout(false);
|
||||
this.ucGroupBoxEx2.PerformLayout();
|
||||
this.ucGroupBoxEx4.ResumeLayout(false);
|
||||
this.ucGroupBoxEx4.PerformLayout();
|
||||
this.ucGroupBoxEx1.ResumeLayout(false);
|
||||
@@ -997,12 +1173,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.TextBox txtSPU;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private DevComponents.DotNetBar.PanelEx pnlEmpty;
|
||||
private DevComponents.DotNetBar.PanelEx btnUpload;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colInShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colLogin;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colInShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
|
||||
@@ -1015,6 +1192,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colUserNotes;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
|
||||
@@ -1025,5 +1204,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
|
||||
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.TextBox txtAddMorePrice;
|
||||
private System.Windows.Forms.Label label10;
|
||||
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;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -156,10 +156,10 @@
|
||||
<metadata name="colSupplierName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colInShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="colLogin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colLogin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="colInShop.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">
|
||||
@@ -195,4 +195,7 @@
|
||||
<metadata name="ColDelete.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>
|
||||
@@ -46,35 +46,104 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
var sourceShop = shop;
|
||||
var sourceProdId = prodId;
|
||||
string success_err_msg = "";
|
||||
string errorMsg = "";
|
||||
var html = GetProdCommitId(sourceShop, sourceProdId.ToString());
|
||||
if (!html.Contains("\"success\":true") || !html.Contains("\"result\""))
|
||||
//string errorMsg = "";
|
||||
var commit_id_rst = GetPddProdCommitId(sourceShop, sourceProdId.ToString());
|
||||
if (!commit_id_rst.Contains("\"success\":true") || !commit_id_rst.Contains("\"result\""))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref html, "error_msg");
|
||||
var errMsg = BaseRegex.GetStringJson(ref commit_id_rst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = html;
|
||||
errMsg = commit_id_rst;
|
||||
OnInfoReceived("商品获取失败!" + errMsg);
|
||||
return;
|
||||
}
|
||||
var commitId = BaseRegex.GetStringJson(ref html, "goods_commit_id");
|
||||
var commitId = BaseRegex.GetStringJson(ref commit_id_rst, "goods_commit_id");
|
||||
if (string.IsNullOrEmpty(commitId))
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品提交编号获取失败!");
|
||||
return;
|
||||
}
|
||||
html = GetPddProduct(sourceShop, sourceProdId.ToString(), commitId);
|
||||
|
||||
JObject obj = JObject.Parse(html);
|
||||
var result = JsonHelper.SerializeObject(obj["result"]);
|
||||
var sizeRst = "";
|
||||
PDDProductDetailInfo product = JsonHelper.DeserializeJsonToObject<PDDProductDetailInfo>(result);
|
||||
if (product == null)
|
||||
var detail_json = "{}";
|
||||
PDDProductDetailInfo product = null;
|
||||
try
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品数据格式获取失败!");
|
||||
var prod_detail_rst = GetPddProdDetail(sourceShop, sourceProdId.ToString(), commitId);
|
||||
JObject prod_detail_obj = JObject.Parse(prod_detail_rst);
|
||||
detail_json = JsonHelper.SerializeObject(prod_detail_obj["result"]);
|
||||
product = JsonHelper.DeserializeJsonToObject<PDDProductDetailInfo>(detail_json);
|
||||
if (product == null)
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品数据格式获取失败!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
|
||||
var property_json = "{}";
|
||||
PDDProductPropertyInfo property = null;
|
||||
try
|
||||
{
|
||||
var prod_property_rst = GetPddProdProperty(sourceShop, sourceProdId.ToString(), commitId);
|
||||
prod_property_rst = GetHtml.Unicode2String(prod_property_rst);
|
||||
JObject prod_property_obj = JObject.Parse(prod_property_rst);
|
||||
property_json = JsonHelper.SerializeObject(prod_property_obj["result"]);
|
||||
property = JsonHelper.DeserializeJsonToObject<PDDProductPropertyInfo>(property_json);
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
if (property == null)
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品属性获取失败!");
|
||||
return;
|
||||
}
|
||||
|
||||
//尺码表注释
|
||||
var decoration_json = "{}";
|
||||
PDDProductDecorationInfo decoration = null;
|
||||
try
|
||||
{
|
||||
var prod_decoration_rst = GetPddProdDecoration(sourceShop, sourceProdId.ToString(), commitId);
|
||||
if (!prod_decoration_rst.Contains("\"success\":true"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref prod_decoration_rst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = commit_id_rst;
|
||||
OnInfoReceived("商品获取失败!商品详情图获取失败!" + errMsg);
|
||||
return;
|
||||
}
|
||||
JObject prod_decoration_obj = JObject.Parse(prod_decoration_rst);
|
||||
if (!prod_decoration_obj["result"].IsNullOrEmpty())
|
||||
decoration_json = JsonHelper.SerializeObject(prod_decoration_obj["result"]);
|
||||
decoration = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(decoration_json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品详情图获取失败!" + ex.Message);
|
||||
return;
|
||||
}
|
||||
if (decoration == null)
|
||||
{
|
||||
OnInfoReceived("商品获取失败!商品详情图获取失败!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 属性模板暂时注释
|
||||
//var prop_template_json = "{}";
|
||||
//PDDProductTemplateInfo templateInfo = null;
|
||||
//try
|
||||
//{
|
||||
// var prop_template_rst = GetPddCatPropTemplate(sourceShop, product.cat_id.ParseToString(), sourceProdId.ToString(), commitId);
|
||||
// JObject prop_template_obj = JObject.Parse(prop_template_rst);
|
||||
// prop_template_json = JsonHelper.SerializeObject(prop_template_obj["result"]);
|
||||
// templateInfo = JsonHelper.DeserializeJsonToObject<PDDProductTemplateInfo>(prop_template_json);
|
||||
//}
|
||||
//catch (Exception ex) { }
|
||||
//if (templateInfo == null)
|
||||
//{
|
||||
// OnInfoReceived("商品获取失败!商品属性模板获取失败!");
|
||||
// return;
|
||||
//}
|
||||
|
||||
var sizeRst = "";
|
||||
//尺码表暂时注释
|
||||
//if (product.sizeTemplateId > 0)
|
||||
//{
|
||||
// html = SizeSpecQuery(shop1, prodId1.ToString(), product.sizeTemplateId.ToString());
|
||||
@@ -92,7 +161,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
bool isExist = false;
|
||||
var existUrl = BaseClass.BuildObjString("product/get_product_list");
|
||||
string existData = UserLogin.GetSignaturex() + "&search_spu=" + product.goods_id;
|
||||
html = GetHtml.PostUtf8(existUrl, existData);
|
||||
string html = GetHtml.PostUtf8(existUrl, existData);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(existUrl, existData);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -103,7 +172,8 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
isExist = true;
|
||||
}
|
||||
|
||||
var main_img = product.image_url;
|
||||
string product_json = "{\"detail\":" + detail_json + ",\"decoration\":" + decoration_json + ",\"property\":" + property_json + "}";
|
||||
string main_img = product.image_url;
|
||||
if (string.IsNullOrEmpty(main_img))
|
||||
main_img = product.hd_thumb_url;
|
||||
if (string.IsNullOrEmpty(main_img))
|
||||
@@ -134,7 +204,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
"&cat_name=" + HttpUtility.UrlEncode((product.cats?.LastOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(), Encoding.UTF8) +
|
||||
"&ext_code=" + HttpUtility.UrlEncode(product.out_goods_sn, Encoding.UTF8) +
|
||||
"&product_name=" + HttpUtility.UrlEncode(product.goods_name, Encoding.UTF8) +
|
||||
"&product_json=" + HttpUtility.UrlEncode(result, Encoding.UTF8) +
|
||||
"&product_json=" + HttpUtility.UrlEncode(product_json, Encoding.UTF8) +
|
||||
"&size_json=" + HttpUtility.UrlEncode(sizeRst, Encoding.UTF8) +
|
||||
"&main_img=" + HttpUtility.UrlEncode(main_img, Encoding.UTF8);
|
||||
|
||||
@@ -218,7 +288,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
var sourceProdId = prodId;
|
||||
string success_err_msg = "";
|
||||
string errorMsg = "";
|
||||
var html = GetProdCommitId(sourceShop, sourceProdId.ToString());
|
||||
var html = GetPddProdCommitId(sourceShop, sourceProdId.ToString());
|
||||
if (!html.Contains("\"success\":true") || !html.Contains("\"result\""))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref html, "error_msg");
|
||||
@@ -233,7 +303,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
OnInfoReceived("商品获取失败!商品提交编号获取失败!");
|
||||
return;
|
||||
}
|
||||
html = GetPddProduct(sourceShop, sourceProdId.ToString(), commitId);
|
||||
html = GetPddProdDetail(sourceShop, sourceProdId.ToString(), commitId);
|
||||
|
||||
JObject obj = JObject.Parse(html);
|
||||
var result = JsonHelper.SerializeObject(obj["result"]);
|
||||
@@ -245,7 +315,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
return;
|
||||
}
|
||||
|
||||
//拼多多暂时注释
|
||||
//拼多多暂时注释尺码
|
||||
//if (product.sizeTemplateId > 0)
|
||||
//{
|
||||
// html = SizeSpecQuery(sourceShop, sourceProdId.ToString(), product.sizeTemplateId.ToString());
|
||||
@@ -380,24 +450,109 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
|
||||
|
||||
|
||||
private string GetProdCommitId(ShopLoginInfo shop, string prodId)
|
||||
{
|
||||
string url = "https://mms.pinduoduo.com/glide/v2/mms/edit/commit/create_by_sn";
|
||||
string body = @"{""goods_id"":" + prodId + "}";
|
||||
string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav";
|
||||
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, shop.AntiContents.LastOrDefault().ParseToString());
|
||||
return result;
|
||||
}
|
||||
private string GetPddProduct(ShopLoginInfo shop, string prodId, string commitId)
|
||||
private string GetPddProdCommitId(ShopLoginInfo shop, string prodId)
|
||||
{
|
||||
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/glide/v2/mms/edit/commit/create_by_sn";
|
||||
string body = @"{""goods_id"":" + prodId + "}";
|
||||
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("网络繁忙,请不要频繁操作"); i++)
|
||||
{
|
||||
shop.AntiContents.Remove(anti);
|
||||
anti = shop.AntiContents.FirstOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
|
||||
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private string GetPddProdDetail(ShopLoginInfo shop, string prodId, string commitId)
|
||||
{
|
||||
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/glide/v2/mms/query/commit/on_shop/detail"; //on_shop获取到的结构不对
|
||||
string url = "https://mms.pinduoduo.com/glide/v2/mms/query/commit/detail";
|
||||
//string body = @"{""goods_id"":" + prodId + "}";
|
||||
string body = @"{""goods_commit_id"":""" + commitId + @""",""goods_id"":""" + prodId + @"""}";
|
||||
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit";
|
||||
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
for (int i = 0; i < 2 && result.Contains("网络繁忙,请不要频繁操作"); i++)
|
||||
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
|
||||
{
|
||||
shop.AntiContents.Remove(anti);
|
||||
anti = shop.AntiContents.FirstOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
|
||||
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private string GetPddProdProperty(ShopLoginInfo shop, string prodId, string commitId)
|
||||
{
|
||||
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/draco-ms/mms/query-goods-property";
|
||||
string body = @"{""goods_id"":" + prodId + "}";
|
||||
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit";
|
||||
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
|
||||
{
|
||||
shop.AntiContents.Remove(anti);
|
||||
anti = shop.AntiContents.FirstOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
|
||||
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private string GetPddProdDecoration(ShopLoginInfo shop, string prodId, string commitId)
|
||||
{
|
||||
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/gorse/mms/goods/decoration/commit/query/V2";
|
||||
string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + prodId + @"}";
|
||||
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit";
|
||||
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
|
||||
{
|
||||
shop.AntiContents.Remove(anti);
|
||||
anti = shop.AntiContents.FirstOrDefault().ParseToString();
|
||||
if (shop.AntiContents.Count > 0)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
|
||||
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetPddCatPropTemplate(ShopLoginInfo shop, string catId, string prodId, string commitId)
|
||||
{
|
||||
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/draco-ms/mms/template/mall?catId=" + catId +
|
||||
"&goodsCommitId=" + commitId + "&goodsId=" + prodId;
|
||||
string body = @"";
|
||||
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId +
|
||||
"&goods_id=" + prodId + "&sourcePage=goodsList";
|
||||
var result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti);
|
||||
for (int i = 0; i < 5 && (result.Contains("操作太过频繁") || result.Contains("网络繁忙,请不要频繁操作")); i++)
|
||||
{
|
||||
shop.AntiContents.Remove(anti);
|
||||
anti = shop.AntiContents.LastOrDefault().ParseToString();
|
||||
@@ -405,7 +560,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
|
||||
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
|
||||
result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -625,6 +625,7 @@
|
||||
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
|
||||
//
|
||||
|
||||
@@ -647,24 +647,24 @@ 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");
|
||||
}
|
||||
}
|
||||
//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
|
||||
@@ -686,6 +686,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
string url = "https://mms.pinduoduo.com/janus/api/userinfo";
|
||||
string refere = "https://mms.pinduoduo.com/login/";
|
||||
refere = "https://mms.pinduoduo.com/home";
|
||||
string body = @"{}";
|
||||
return HttpResponseBLL.PDDPostResponse(shop, url, body, refere);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
ShopId = sc.AccountId,
|
||||
SubUserName = shop.SubUserName,
|
||||
Notes = shop.Notes,
|
||||
AntiContents = new List<string> { sc.AntiContent },
|
||||
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
|
||||
};
|
||||
|
||||
var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l =>
|
||||
@@ -177,7 +177,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
oldShop.SubUserName = newShop.SubUserName;
|
||||
oldShop.Notes = newShop.Notes;
|
||||
oldShop.AntiContents.AddRange(newShop.AntiContents);
|
||||
while (oldShop.AntiContents.Count > 10)
|
||||
while (oldShop.AntiContents.Count > 50)
|
||||
oldShop.AntiContents.RemoveAt(0);
|
||||
|
||||
// 店铺更新写入到服务端
|
||||
@@ -460,7 +460,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
||||
}
|
||||
|
||||
int GetAntiContentsTimes = 0;
|
||||
int GetAntiContentsTimes = 40;
|
||||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||
{
|
||||
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
|
||||
@@ -468,9 +468,9 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
GetAntiContentsTimes++;
|
||||
shop.AntiContents.Add(antiContent);
|
||||
while (shop.AntiContents.Count > 10)
|
||||
while (shop.AntiContents.Count > 50)
|
||||
shop.AntiContents.RemoveAt(0);
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 5)
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 50)
|
||||
{
|
||||
GetAntiContentsTimes = 0;
|
||||
var antis = shop.AntiContents;
|
||||
@@ -487,7 +487,11 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
//var data = responseData;
|
||||
var data = responseData;
|
||||
if (data.Contains("\"validate_message\""))
|
||||
{
|
||||
|
||||
}
|
||||
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
|
||||
//{
|
||||
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
|
||||
@@ -560,7 +564,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
addGetProdButton();
|
||||
|
||||
function addGetProdButton() {
|
||||
var productLst = document.getElementsByClassName('goods-id');
|
||||
var productLst = document.getElementsByClassName('goods-id0000000000');
|
||||
for(i=0; i<productLst.length; i++) {
|
||||
var addBtnItem = productLst[i].parentElement.parentElement;
|
||||
if (addBtnItem.parentElement.innerHTML.indexOf('库存上传') < 0 && addBtnItem.parentElement.innerHTML.indexOf('ID:') >= 0) {
|
||||
|
||||
Reference in new issue
Block a user