temu客户端上传功能 2.拼多多商品提取问题修复(25%)
This commit is contained in:
1 parent
2bb124e2d7
commit
62465769fe
13 files changed
+402
-210
No files matched your search
+12
-12
@@ -110,7 +110,7 @@
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtProdName = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.lblUserNotes = new System.Windows.Forms.Label();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -1035,7 +1035,7 @@
|
||||
this.tableLayoutPanel1.Controls.Add(this.label3, 10, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label4, 12, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.txtProdName, 11, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label12, 18, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblUserNotes, 18, 0);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(2, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
@@ -1254,16 +1254,16 @@
|
||||
this.txtProdName.Size = new System.Drawing.Size(61, 23);
|
||||
this.txtProdName.TabIndex = 427;
|
||||
//
|
||||
// label12
|
||||
// lblUserNotes
|
||||
//
|
||||
this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(952, 12);
|
||||
this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(56, 17);
|
||||
this.label12.TabIndex = 460;
|
||||
this.label12.Text = "用户备注";
|
||||
this.lblUserNotes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblUserNotes.AutoSize = true;
|
||||
this.lblUserNotes.Location = new System.Drawing.Point(952, 12);
|
||||
this.lblUserNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.lblUserNotes.Name = "lblUserNotes";
|
||||
this.lblUserNotes.Size = new System.Drawing.Size(56, 17);
|
||||
this.lblUserNotes.TabIndex = 460;
|
||||
this.lblUserNotes.Text = "用户备注";
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
@@ -1809,7 +1809,7 @@
|
||||
private System.Windows.Forms.NumericUpDown numSkuRandomPrice;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private UserComponent.UcCheckBox chkUploadProd;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Label lblUserNotes;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.ComboBox cmbUserNotes;
|
||||
private System.Windows.Forms.ComboBox cmbNotes;
|
||||
|
||||
@@ -36,6 +36,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
/// </summary>
|
||||
public partial class ProductThirdSelectListManageForm : LRBaseForm
|
||||
{
|
||||
public enum EnumClientMode
|
||||
{
|
||||
Admin,
|
||||
Client,
|
||||
ClientJit,
|
||||
}
|
||||
|
||||
public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin;
|
||||
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
|
||||
List<string> skuRandomLetterArr = new List<string> { "~", "#", "¥", "%", "&", "*", "(", ")", "(", ")", "+", "-", "_", "=", "【", "】", "·", "|", "《", "》" };
|
||||
@@ -80,6 +89,34 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
ucSplitPage1.IsShowPageSize = true; // 可调整分页
|
||||
tableLayoutPanel1.Width -= 86;
|
||||
}
|
||||
|
||||
if (ClientMode != EnumClientMode.Admin)
|
||||
{
|
||||
chkShowDel.Visible = true;
|
||||
pbFissionSetting.Visible = true;
|
||||
btnReFission.Visible = true;
|
||||
cmbUserNotes.Visible = false;
|
||||
lblUserNotes.Visible = false;
|
||||
colUserNotes.Visible = false;
|
||||
ucSplitPage1.IsShowPageSize = true;
|
||||
var columnStyles = tableLayoutPanel1.ColumnStyles.Cast<ColumnStyle>().ToList();
|
||||
columnStyles[columnStyles.Count - 1].SizeType = SizeType.Absolute;
|
||||
columnStyles[columnStyles.Count - 1].Width = 0;
|
||||
columnStyles[columnStyles.Count - 2].SizeType = SizeType.Absolute;
|
||||
columnStyles[columnStyles.Count - 2].Width = 0;
|
||||
int colsWidth = 0;
|
||||
foreach (DataGridViewColumn col in dgvSelectProduct.Columns)
|
||||
{
|
||||
if (col.Visible)
|
||||
{
|
||||
colsWidth += col.Width;
|
||||
}
|
||||
}
|
||||
if (dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth > 0)
|
||||
{
|
||||
colOpResult.Width += dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isFirst = true;
|
||||
@@ -249,6 +286,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
pageCount = 1;
|
||||
|
||||
var url = BaseClass.BuildObjString("product_third/admin_get_user_select_product_list");
|
||||
if (ClientMode != EnumClientMode.Admin)
|
||||
url = BaseClass.BuildObjString("product_third/get_user_select_product_list");
|
||||
|
||||
var data = "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -269,6 +309,11 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
data += "&operate_sub_sa_name=" + BaseClass.UserName;
|
||||
if (chkNoSubSa.Checked)
|
||||
data += "&no_sub_sa=true";
|
||||
if (ClientMode != EnumClientMode.Admin)
|
||||
{
|
||||
string shopIds = string.Join(",", GlobalConfig.ShopLoginList.Where(s => !s.ShopId.IsNullOrEmpty()).Select(s => s.ShopId).Distinct()) ?? "default";
|
||||
data += "&shop_ids=" + shopIds;
|
||||
}
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -405,35 +450,70 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
if (flag)
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
{
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopLoginForm loginForm = new ShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
loginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "进店":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
{
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopLoginForm loginForm = new ShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
|
||||
loginForm.InitUrl = "https://agentseller.temu.com/goods/draft";
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "登录":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
// 登录店铺
|
||||
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
|
||||
shopLoginForm.openType = EnumOpenType.login;
|
||||
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
{
|
||||
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
|
||||
shopLoginForm.openType = EnumOpenType.login;
|
||||
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
|
||||
shopLoginForm.openType = EnumOpenType.login;
|
||||
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
}
|
||||
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
|
||||
{
|
||||
if (row.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId)
|
||||
@@ -552,17 +632,25 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
|
||||
ShopLoginInfo GetShop(string shopId)
|
||||
{
|
||||
var shop = shopLst.FirstOrDefault(s => s.ShopId == shopId);
|
||||
if (shop == null)
|
||||
ShopLoginInfo shop;
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
{
|
||||
shop = GetServerShopById(shopId);
|
||||
shop = shopLst.FirstOrDefault(s => s.ShopId == shopId);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = new ShopLoginInfo() { ShopId = shopId };
|
||||
shop.LoginStatus = "不存在";
|
||||
shop = GetServerShopById(shopId);
|
||||
}
|
||||
shopLst.Add(shop);
|
||||
}
|
||||
else
|
||||
{
|
||||
shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
|
||||
}
|
||||
if (shop == null)
|
||||
{
|
||||
shop = new ShopLoginInfo() { ShopId = shopId };
|
||||
shop.LoginStatus = "不存在";
|
||||
}
|
||||
shopLst.Add(shop);
|
||||
return shop;
|
||||
}
|
||||
|
||||
@@ -732,7 +820,10 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
|
||||
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
|
||||
{
|
||||
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
|
||||
else
|
||||
ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -2041,13 +2132,26 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
case "已上传商品ID":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
if (ClientMode == EnumClientMode.Admin)
|
||||
{
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
adminLoginForm.openType = EnumOpenType.manage;
|
||||
adminLoginForm.WindowState = FormWindowState.Maximized;
|
||||
adminLoginForm.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopLoginForm loginForm = new ShopLoginForm(shop);
|
||||
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
loginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user