diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index f891a51..e1c0839 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,8 +27,9 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 1119;
- public static string MainPath = "29pdd";
+ public static int VersionCount = 1120;
+ public static string MainPath = "29wx";
+ //public static string MainPath = "29wx";
//public static string MainPath = "29pdd";
//public static string MainPath = "kuajingda";
//public static int VersionCount = 613;
diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs
index 4e031a3..4a0fb10 100644
--- a/AllBase/Model/Result/KJDDBProduct.cs
+++ b/AllBase/Model/Result/KJDDBProduct.cs
@@ -102,5 +102,6 @@ namespace AllBase.Model.Result
/// 是否有完善后的微信回采商品数据(详情存在微信回采数据表内)
///
public string has_wx_format { get; set; }
+ public string add_user_name { get; set; }
}
}
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index f802dd3..3e52019 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -622,7 +622,7 @@ namespace KJD_Web.BLL.BXX
if (!string.IsNullOrWhiteSpace(ext_code_in))
where += " and p.ext_code in ('" + string.Join("','", ext_code_in.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + "')";
if (!string.IsNullOrEmpty(product_get_type))
- where += " and p.product_get_type ='" + product_get_type + "'";
+ where += " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(wx_safe_status))
where += " and p.wx_safe_status in ('" + wx_safe_status.Replace(",", "','") + "')";
//if (!string.IsNullOrEmpty(wx_safe_status))
@@ -789,7 +789,7 @@ namespace KJD_Web.BLL.BXX
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
- " p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv," +
+ " p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name," +
" s.img_url,e.ext_code_price" +
" FROM bxx.product p " +
" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
@@ -800,7 +800,7 @@ namespace KJD_Web.BLL.BXX
sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
- " p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv" +
+ " p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name," +
" s.img_url,COUNT(se.id) AS select_count,e.ext_code_price" +
" FROM bxx.product p" +
" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " +
@@ -876,6 +876,7 @@ namespace KJD_Web.BLL.BXX
real_coid = row["real_coid"].IsNullOrEmpty() ? null : row["real_coid"].ParseToString(),
real_spu_id = row["real_spu_id"].IsNullOrEmpty() ? null : row["real_spu_id"].ParseToString(),
is_relation = row["is_relation"].ParseToInt(),
+ add_user_name = row["add_user_name"].ParseToString(),
};
if (isDetail)
{
@@ -1276,7 +1277,7 @@ namespace KJD_Web.BLL.BXX
string where = "";
if (!string.IsNullOrEmpty(product_get_type))
- where += " and p.product_get_type ='" + product_get_type + "'";
+ where += " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(add_user_name))
{
add_user_name = "'" + string.Join("','", add_user_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
@@ -1610,7 +1611,7 @@ namespace KJD_Web.BLL.BXX
where += " and p.wx_cat_3 in (" + wx_cat_3 + ")";
}
if (!string.IsNullOrEmpty(product_get_type))
- where += " and p.product_get_type ='" + product_get_type + "'";
+ where += " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(wx_safe_status))
where += " and p.wx_safe_status in ('" + wx_safe_status.Replace(",", "','") + "')";
//if (!string.IsNullOrEmpty(special_prod_type)) // 普通商品 爆款数据
@@ -1738,7 +1739,7 @@ namespace KJD_Web.BLL.BXX
//sale_count = row["sale_count"].ParseToInt(),
//sale_count_text = row["sale_count_text"].ToString(),
wx_safe_status = row["wx_safe_status"].ToString(),
- special_prod_type = row["special_prod_type"].ToString(),
+ special_prod_type = row["special_prod_type"].ParseToString(),
send_to_out_server = row["send_to_out_server"].ParseToInt(),
is_relation = row["is_relation"].ParseToInt(),
};
diff --git a/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs b/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs
index a0f925c..bcd96ae 100644
--- a/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs
+++ b/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs
@@ -24,7 +24,7 @@ namespace KJD_Web.BLL
var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
var serverVersion = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateVersion"].ConnectionString;
- var UpdateFiles = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateFiles"].ConnectionString;
+ var UpdateFiles = ""; //System.Configuration.ConfigurationManager.ConnectionStrings["UpdateFiles"].ConnectionString;
var UpdateExe = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExe"].ConnectionString;
var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString;
diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
index cf12524..325ddc4 100644
--- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs
+++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
@@ -105,6 +105,7 @@ namespace KJD_Web.Model
public string has_wx_format { get; set; }
public string problem_prod_data { get; set; }
public int is_relation { get; set; }
+ public string add_user_name { get; set; }
}
public class KJDDBProduct : DBProductResultParam
diff --git a/PackTools/package260528pdd.nsi b/PackTools/package260528pdd.nsi
index fb542a1..3ae82f0 100644
--- a/PackTools/package260528pdd.nsi
+++ b/PackTools/package260528pdd.nsi
@@ -36,6 +36,7 @@ SetCompressor lzma
!insertmacro MUI_PAGE_INSTFILES
; °²װÍê³ÉҳÃæ
;!define MUI_FINISHPAGE_RUN "$INSTDIR\29¹©ӦÁ´.exe"
+!define MUI_FINISHPAGE_RUN "$INSTDIR\29pdd.lnk"
!insertmacro MUI_PAGE_FINISH
; °²װжÔعý³ÌҳÃæ
diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj
index 690d057..fdc1135 100644
--- a/TEMUKJD/KJD.csproj
+++ b/TEMUKJD/KJD.csproj
@@ -173,6 +173,12 @@
JstBanPlatformForm.cs
+
+ Form
+
+
+ PDDDBProdEditNotesForm.cs
+
Form
@@ -1321,6 +1327,9 @@
JstBanPlatformForm.cs
+
+ PDDDBProdEditNotesForm.cs
+
PDDFissionProdByChanceImgForm.cs
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs
index 072266f..b20652f 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs
@@ -717,6 +717,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
+ public bool IsSave { get; set; } = false;
private void btnSaveSkuLst_Click(object sender, EventArgs e)
{
// 焦点移动到别的控件上自动更新表格内的数值
@@ -743,7 +744,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
- var url = BaseClass.BuildObjString("product/mdy_db_product");
+ var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + DbProd.id + "&sku_edit_json=" + JsonHelper.SerializeObject(this.lstSkuEditItem);
var html = GetHtml.PostUtf8(url, data);
@@ -755,6 +756,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
else
{
+ IsSave = true;
this.Close();
}
}
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
index 4812594..799b874 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
@@ -247,7 +247,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//{"goodsId":"2032007952082477057","warehouseGoodsId":"171C2881E8C6491CA65728683483EDE9","spuCode":"987651321321","skus":[{"skuId":"2032007952837451777","warehouseSkuId":"6B710CE261B240C38B5245006F3622A3","skuCode":"20190311002"},{"skuId":"2032007953839890434","warehouseSkuId":"2FA14AAB600541CAA72DDE7697D8D27A","skuCode":"201607090622"}]}
if (dbProd.product_get_type_text == "厂商直采")
{
- canEdit = false;
+ canEdit = true;
string convertRst = "";
var pInfo = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
@@ -264,7 +264,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
if (dbProd.product_get_type_text == "微信店采")
{
- canEdit = false;
+ canEdit = true;
string convertRst = "";
var pInfo = new PDDProdFormConverter().WXProdToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
@@ -275,7 +275,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
if (dbProd.product_get_type_text == "1688厂家")
{
- canEdit = false;
+ canEdit = true;
string convertRst = "";
var pInfo = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
@@ -297,7 +297,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
#region 微信小店app
if (dbProd.product_get_type_text == "微信小店")
{
- canEdit = false;
+ canEdit = true;
string convertRst = "";
var pInfo = new PDDProdFormConverter().WXClientToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
@@ -311,8 +311,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
PDDDBProdEditDetailForm editDetailForm = new PDDDBProdEditDetailForm(this.dbProd);
if (!canEdit)
{
- //editDetailForm.btnRestoreAll.Visible = false;
- //editDetailForm.btnSaveSkuLst.Visible = false;
+ editDetailForm.btnRestoreAll.Visible = false;
+ editDetailForm.btnSaveSkuLst.Visible = false;
}
editDetailForm.ShowDialog();
}
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.Designer.cs
new file mode 100644
index 0000000..3b5f1b9
--- /dev/null
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.Designer.cs
@@ -0,0 +1,226 @@
+namespace TemuKJD.PDDForms.ProductSelectForms
+{
+ partial class PDDDBProdEditNotesForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDDBProdEditNotesForm));
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.txtProductName = new System.Windows.Forms.TextBox();
+ this.txtSpuId = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.label8 = new System.Windows.Forms.Label();
+ this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btnEditDetail = new DevComponents.DotNetBar.PanelEx();
+ this.btnOK1 = new DevComponents.DotNetBar.PanelEx();
+ this.panel2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // panel2
+ //
+ this.panel2.BackColor = System.Drawing.Color.White;
+ this.panel2.Controls.Add(this.btnOK1);
+ this.panel2.Controls.Add(this.btnEditDetail);
+ this.panel2.Controls.Add(this.txtProductName);
+ this.panel2.Controls.Add(this.txtSpuId);
+ this.panel2.Controls.Add(this.label3);
+ this.panel2.Controls.Add(this.label1);
+ this.panel2.Controls.Add(this.pictureBox1);
+ this.panel2.Controls.Add(this.label8);
+ this.panel2.Controls.Add(this.txtNotes);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel2.Location = new System.Drawing.Point(1, 33);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(464, 372);
+ this.panel2.TabIndex = 1;
+ //
+ // txtProductName
+ //
+ this.txtProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtProductName.Location = new System.Drawing.Point(90, 200);
+ this.txtProductName.Multiline = true;
+ this.txtProductName.Name = "txtProductName";
+ this.txtProductName.ReadOnly = true;
+ this.txtProductName.Size = new System.Drawing.Size(337, 46);
+ this.txtProductName.TabIndex = 397;
+ //
+ // txtSpuId
+ //
+ this.txtSpuId.Location = new System.Drawing.Point(90, 166);
+ this.txtSpuId.Name = "txtSpuId";
+ this.txtSpuId.ReadOnly = true;
+ this.txtSpuId.Size = new System.Drawing.Size(337, 23);
+ this.txtSpuId.TabIndex = 395;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(31, 204);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(56, 17);
+ this.label3.TabIndex = 392;
+ this.label3.Text = "商品标题";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(31, 169);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(56, 17);
+ this.label1.TabIndex = 390;
+ this.label1.Text = " SPU ID";
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.pictureBox1.Location = new System.Drawing.Point(165, 18);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(136, 136);
+ this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.pictureBox1.TabIndex = 389;
+ this.pictureBox1.TabStop = false;
+ this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(31, 258);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(56, 17);
+ this.label8.TabIndex = 386;
+ this.label8.Text = " 备注";
+ //
+ // txtNotes
+ //
+ this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ //
+ //
+ //
+ this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
+ this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txtNotes.Border.PaddingBottom = 2;
+ this.txtNotes.Border.PaddingLeft = 2;
+ this.txtNotes.Border.PaddingRight = 2;
+ this.txtNotes.Border.PaddingTop = 2;
+ this.txtNotes.Location = new System.Drawing.Point(90, 258);
+ this.txtNotes.Multiline = true;
+ this.txtNotes.Name = "txtNotes";
+ this.txtNotes.Size = new System.Drawing.Size(337, 47);
+ this.txtNotes.TabIndex = 385;
+ //
+ // btnEditDetail
+ //
+ this.btnEditDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnEditDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnEditDetail.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnEditDetail.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnEditDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnEditDetail.Location = new System.Drawing.Point(308, 337);
+ this.btnEditDetail.Name = "btnEditDetail";
+ this.btnEditDetail.Size = new System.Drawing.Size(85, 26);
+ this.btnEditDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnEditDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnEditDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnEditDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnEditDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnEditDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnEditDetail.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnEditDetail.Style.GradientAngle = 90;
+ this.btnEditDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnEditDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnEditDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnEditDetail.TabIndex = 647;
+ this.btnEditDetail.Text = "编辑商品SKU";
+ this.btnEditDetail.Click += new System.EventHandler(this.btnEditDetail_Click);
+ //
+ // btnOK1
+ //
+ this.btnOK1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnOK1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnOK1.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnOK1.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnOK1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnOK1.Location = new System.Drawing.Point(400, 337);
+ this.btnOK1.Name = "btnOK1";
+ this.btnOK1.Size = new System.Drawing.Size(46, 26);
+ this.btnOK1.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnOK1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnOK1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnOK1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnOK1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnOK1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnOK1.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnOK1.Style.GradientAngle = 90;
+ this.btnOK1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnOK1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnOK1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnOK1.TabIndex = 651;
+ this.btnOK1.Text = "提交";
+ this.btnOK1.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // PDDDBProdEditNotesForm
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.ClientSize = new System.Drawing.Size(466, 406);
+ this.Controls.Add(this.panel2);
+ this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "PDDDBProdEditNotesForm";
+ this.Text = "编辑商品备注/货号";
+ this.TitleText = "编辑商品备注/货号";
+ this.Load += new System.EventHandler(this.ProductSelectListForm_Load);
+ this.Controls.SetChildIndex(this.panel2, 0);
+ this.panel2.ResumeLayout(false);
+ this.panel2.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel panel2;
+ private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.TextBox txtSpuId;
+ public System.Windows.Forms.TextBox txtProductName;
+ private System.Windows.Forms.Label label8;
+ private DevComponents.DotNetBar.PanelEx btnOK1;
+ private DevComponents.DotNetBar.PanelEx btnEditDetail;
+ }
+}
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.cs
new file mode 100644
index 0000000..6e8d330
--- /dev/null
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.cs
@@ -0,0 +1,262 @@
+using AllBase.Helper;
+using AllBase.Model.Result;
+using TemuKJD.BaseForms;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using AllBase;
+using Work;
+using TemuKJD.ToolForms;
+using Newtonsoft.Json.Linq;
+using System.IO;
+using Work.BLL.Tools;
+using TemuKJD.BLL;
+
+namespace TemuKJD.PDDForms.ProductSelectForms
+{
+ public partial class PDDDBProdEditNotesForm : BaseGeneralForm
+ {
+ KJDDBProduct dbProd = null;
+ KJDDBProduct dbProdDetail = null;
+
+ public PDDDBProdEditNotesForm(KJDDBProduct prod)
+ {
+ InitializeComponent();
+
+ dbProd = prod;
+ }
+
+ private void ProductSelectListForm_Load(object sender, EventArgs e)
+ {
+ if (dbProd != null)
+ {
+ txtProductName.Text = dbProd.product_name;
+ txtSpuId.Text = dbProd.spu_id;
+ this.pictureBox1.ImageLocation = dbProd.main_img.Replace("https", "http");
+ this.txtNotes.Text = dbProd.notes;
+
+ if(string.IsNullOrWhiteSpace(dbProd?.product_json))
+ {
+ dbProdDetail = GetPddProductDetail(dbProd.id.ToString());
+ //if (prodTmp != null)
+ //{
+ // dbProd = prodTmp;
+ //}
+ }
+ }
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ //var url = BaseClass.BuildPDDObjString("product/mdy_product_notes");
+ var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
+ var data = UserLogin.GetSignaturex() +
+ "&db_id=" + dbProd.id + "¬es=" + this.txtNotes.Text.Trim();
+ data += "&product_name=" + this.txtProductName.Text.Trim();
+ var html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ {
+ BaseMsgForm.ShowError("商品备注编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
+ }
+ else
+ {
+ dbProd.notes = this.txtNotes.Text.Trim();
+ dbProd.product_name = this.txtProductName.Text.Trim();
+ this.Close();
+ }
+ }
+
+ private void pictureBox1_Click(object sender, EventArgs e)
+ {
+ ShowImgForm imgFrom = new ShowImgForm(pictureBox1.ImageLocation);
+ imgFrom.ShowDialog();
+ }
+
+ public static KJDDBProduct GetPddProductDetail(string prodDbId)
+ {
+ if (string.IsNullOrEmpty(prodDbId))
+ return new KJDDBProduct();
+
+ List list = new List();
+
+ var url = BaseClass.BuildPDDObjString("product/get_product_detail_list");
+ var data = "";
+
+ data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId;
+ if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据"))
+ data += "&special_prod_type=普通商品,书籍,爆款数据";
+
+ var html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ {
+ return null;
+ }
+
+ var jArr = JObject.Parse(html)["data"];
+ if (jArr.Count() == 0)
+ return null;
+ var sProd = JsonHelper.SerializeObject(jArr);
+
+ try
+ {
+ list = JsonHelper.DeserializeJsonToList(sProd);
+ var item = list.FirstOrDefault();
+ if (item == null)
+ item = new KJDDBProduct();
+ return item;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
+
+ private void btnEditDetail_Click(object sender, EventArgs e)
+ {
+ bool canEdit = false;
+ var kjdDbProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(dbProdDetail));
+ //{"goodsId":"2032007952082477057","warehouseGoodsId":"171C2881E8C6491CA65728683483EDE9","spuCode":"987651321321","skus":[{"skuId":"2032007952837451777","warehouseSkuId":"6B710CE261B240C38B5245006F3622A3","skuCode":"20190311002"},{"skuId":"2032007953839890434","warehouseSkuId":"2FA14AAB600541CAA72DDE7697D8D27A","skuCode":"201607090622"}]}
+ if (kjdDbProd.product_get_type_text == "厂商直采")
+ {
+ canEdit = true;
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, kjdDbProd);
+ if (!string.IsNullOrEmpty(convertRst))
+ {
+ BaseMsgForm.ShowError("商品结构获取失败 " + convertRst);
+ return;
+ }
+ }
+ if (kjdDbProd.product_get_type_text == "微信店采")
+ {
+ canEdit = true;
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter().WXProdToPddConvert(out convertRst, kjdDbProd);
+ if (!string.IsNullOrEmpty(convertRst))
+ {
+ BaseMsgForm.ShowError("商品结构获取失败");
+ return;
+ }
+ }
+ #region 微信小店app
+ if (dbProd.product_get_type_text == "微信小店")
+ {
+ canEdit = true;
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter().WXClientToPddConvert(out convertRst, kjdDbProd);
+ if (!string.IsNullOrEmpty(convertRst))
+ {
+ BaseMsgForm.ShowError("商品结构获取失败");
+ return;
+ }
+ }
+ #endregion
+ if (kjdDbProd.product_get_type_text == "1688厂家")
+ {
+ canEdit = true;
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, kjdDbProd);
+ if (!string.IsNullOrEmpty(convertRst))
+ {
+ BaseMsgForm.ShowError("商品结构获取失败");
+ return;
+ }
+ }
+ if (kjdDbProd.product_get_type_text == "1688外部数据")
+ {
+ canEdit = true;
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter()._1688OutToPddConvert(out convertRst, kjdDbProd);
+ if (!string.IsNullOrEmpty(convertRst))
+ {
+ BaseMsgForm.ShowError("商品结构获取失败");
+ return;
+ }
+ }
+
+ PDDDBProdEditDetailForm editDetailForm = new PDDDBProdEditDetailForm(kjdDbProd);
+ if (!canEdit)
+ {
+ editDetailForm.btnRestoreAll.Visible = false;
+ editDetailForm.btnSaveSkuLst.Visible = false;
+ }
+ editDetailForm.ShowDialog();
+ if (editDetailForm.IsSave)
+ this.Close();
+ }
+
+ private void btnBookImg_Click(object sender, EventArgs e)
+ {
+ var prodJson = this.dbProd.product_json;
+ var prodInfo = JsonHelper.DeserializeJsonToObject(prodJson);
+ if (prodInfo != null)
+ {
+ string publisher = "出版社:" + new List () { "技术出版社", "文化出版社", "美术出版社" }[Randomx.GetId(3)];
+ string isbn = "ISBN:";
+ string bookName = "书名:";
+ string bookPrice = "定价:" + prodInfo.detail.sku.Max(s => s.multi_price) * 0.01;
+ string author = "作者:王老师";
+ string publishTime = "出版时间:" + DateTime.Now.AddMonths(-3);
+ string edition = "版次:1";
+ string binding = "装帧:平装";
+
+ foreach (var propInfo in prodInfo.property.goods_properties)
+ {
+ if (propInfo.name.Contains("出版社名称"))
+ publisher = "出版社:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("ISBN"))
+ isbn = "ISBN:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("书名"))
+ bookName = "书名:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("定价"))
+ bookPrice = "定价:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("作者"))
+ author = "作者:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("出版时间"))
+ publishTime = "出版时间:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("版次"))
+ edition = "版次:" + propInfo.values.FirstOrDefault()?.value;
+ else if (propInfo.name.Contains("装帧"))
+ binding = "装帧:" + propInfo.values.FirstOrDefault()?.value;
+ }
+
+ var bookStr = publisher + "\r\n" + "\r\n" +
+ isbn + "\r\n" + "\r\n" +
+ bookName + "\r\n" + "\r\n" +
+ bookPrice + "\r\n" + "\r\n" +
+ author + "\r\n" + "\r\n" +
+ publishTime + "\r\n" + "\r\n" +
+ edition + "\r\n" + "\r\n" +
+ binding;
+
+ var imageBg = new Bitmap(800, 800);
+ using (Graphics g = Graphics.FromImage(imageBg))
+ {
+ g.Clear(Color.White);
+ //Font font = new Font("宋体", 15, FontStyle.Bold);
+ Font font = new Font("微软雅黑", 15, FontStyle.Regular);
+ Brush textBrush = Brushes.Black;
+ g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
+ RectangleF rectF = new RectangleF(80, 80, 800 - 80, 800 - 80);
+ g.DrawString(bookStr, font, textBrush, rectF);
+ }
+ ShowImgForm imgFrom = new ShowImgForm(imageBg);
+ imgFrom.ShowDialog();
+ }
+ }
+ }
+}
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.resx
new file mode 100644
index 0000000..c963c3c
--- /dev/null
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditNotesForm.resx
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
+ AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
+ zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
+ zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM
+ zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA
+ AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA
+ AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM
+ zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM
+ zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM
+ zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP////////////////////////////////////////
+ //iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI////////////////////////////////////
+ ////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4////////////////////////////////
+ //////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj///////////////////////////
+ /////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP//////////////////////
+ ///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4//////////////////
+ /////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj/////////////
+ ///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI////////
+ /////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj///
+ //////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM
+ eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM
+ zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM
+ zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM
+ zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM
+ zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4
+ fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI
+ j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4
+ iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI//////////
+ ////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj///
+ //////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI
+ iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4//
+ /4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP////////////
+ ///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/
+ ///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H
+ fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP//////
+ ///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/
+ ////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM
+ zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM
+ zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM
+ zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM
+ zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP////////
+ +MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj///
+ //////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM
+ eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I
+ j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI//////////////////////
+ /////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP//////////////////
+ /////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I//////////////
+ ///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP////////
+ /////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj///////////////
+ //////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI//////////
+ //////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP////
+ ////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM
+ eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM
+ zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I////////////////////////////////////////////
+ //h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij/////////////////////////////////////
+ //////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4
+ ////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP//////////////////////
+ ////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////////////
+ ///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////
+ //////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////
+ //////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////
+ ///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////
+ ////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI
+ j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj///////
+ +MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI//
+ //////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI
+ iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj/////
+ /4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM
+ j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM
+ zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI////
+ //jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI
+ iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI
+ iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP////
+ ///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH
+ j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM
+ zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM
+ zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM
+ zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI////
+ ///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI
+ iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4
+ iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP//
+ /////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM
+ zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM
+ zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4
+ fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP////////////////
+ ////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH////////////
+ //////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP//////
+ //////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/
+ ////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM
+ zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM
+ zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM
+ zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM
+ zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8
+ zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj///////////////
+ ///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj/////////
+ ////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj///
+ /////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM
+ x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM
+ zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM
+ zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM
+ zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8
+ zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP////////
+ //iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP//
+ //////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM
+ zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM
+ zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA
+ AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA
+ AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
+ zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
+ AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
+ AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
+ B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
+ AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
+ AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
+ AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
+ AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
+ AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
+ AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
+ AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
+ AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
+ AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
+ AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
+ AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
+ AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
+ AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+ +AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
+
+
+
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
index 7227c45..874dcf0 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
@@ -393,6 +393,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
data += "&has_wx_cat=" + (cmbWxCat.Text.Trim() == "是").ParseToString().ToLower();
}
+
if (!string.IsNullOrEmpty(cmbExportToOutServer.Text))
{
//data += "&has_send_to_out_server=" + (cmbExportToOutServer.Text.Trim() == "是").ParseToString().ToLower();
@@ -428,7 +429,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (chkWXComplateProd.Checked)
data += "&has_wx_format=1";
-
+ // 回传修复是否完成
if (cmbHasReturn.Text.Trim() == "是")
data += "&problem_prod_data=1";
else if (cmbHasReturn.Text.Trim() == "否")
@@ -808,12 +809,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
GetPDDProductGroup(new List { box }, product_get_type, addMoreItems, group_add_user_name);
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 商品组由哪个用户采集的
public static void GetPDDProductGroup(List boxs, string product_get_type = "", string addMoreItems = "", string group_add_user_name = "")
{
var url = BaseClass.BuildPDDObjString("product/get_product_groups");
var data = UserLogin.GetSignaturex();
if (!string.IsNullOrWhiteSpace(product_get_type))
- data += "&product_get_type=" + product_get_type;
+ data += "&product_get_type=" + product_get_type.Replace("多多商品", "机会商品").Replace("1688商品", "1688厂家,1688外部数据");
if (!string.IsNullOrWhiteSpace(group_add_user_name))
data += "&add_user_name=" + group_add_user_name;
var html = GetHtml.PostUtf8(url, data);
@@ -1244,7 +1252,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["col_spu_id"]?.Value.ToString().Split(' ').FirstOrDefault()).ToList();
var prodList = this.lstTemuDbProduct.Where(p => lstProdId.Contains(p.spu_id)).ToList();
if (prodList.Count == 0)
+ {
+ BaseMsgForm.ShowInfo("请选择商品");
return;
+ }
this.statusBar.pgbTaskProgress.Maximum = prodList.Count;
this.statusBar.UpdateProgressBar(0);
@@ -1285,288 +1296,297 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
this.statusBar.lblTaskStatus.Text = "正在识别微信类目 " + this.statusBar.pgbTaskProgress.Value + "/" + dbProdLst.Count;
}));
- // 获取微信accessToken
- var token = new WxApiBLL().GetRandomWxToken();
- try
+
+ var row = dgvDbProduct.Rows.Cast().FirstOrDefault(r => r.Cells["col_spu_id"].Value.ParseToString() == prod.spu_id);
+ GetProdWxCat(prod, row);
+ }
+ }
+
+ public static void GetProdWxCat(KJDDBProduct prod, DataGridViewRow row)
+ {
+ // 获取微信accessToken
+ var token = new WxApiBLL().GetRandomWxToken();
+ try
+ {
+ JObject obj = new JObject();
+ obj["req_type"] = 1;
+ obj["head_imgs"] = new JArray();
+
+ var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
+ List mainImgLst3 = new List();
+ string productTitle = "";
+
+ if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "1688外部数据" ||
+ dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "机会商品")
{
- JObject obj = new JObject();
- obj["req_type"] = 1;
- obj["head_imgs"] = new JArray();
-
- var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
- List mainImgLst3 = new List();
- string productTitle = "";
-
-
- if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" ||
- dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "1688外部数据")
+ if (dbProd.product_get_type_text == "微信小店" && dbProd.wx_cat_leaf != null)
{
-
- if (dbProd.product_get_type_text == "微信小店" && dbProd.wx_cat_leaf != null)
+ List catInfoLst = new List();
+ var cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString());
+ while (cat != null)
{
- List catInfoLst = new List();
- var cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString());
- while(cat != null)
- {
- catInfoLst.Add(cat);
- if (cat.level == 0)
- break;
+ catInfoLst.Add(cat);
+ if (cat.level == 0)
+ break;
- cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == cat.f_cat_id);
- }
- foreach (WxCatInfo wxCat in catInfoLst)
+ cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == cat.f_cat_id);
+ }
+ foreach (WxCatInfo wxCat in catInfoLst)
+ {
+ if (wxCat.level == 1)
{
- if (wxCat.level == 1)
- {
- dbProd.wx_cat_1 = wxCat.cat_id.ParseToLong();
- dbProd.main_cat_id = wxCat.cat_id;
- dbProd.main_cat_name = wxCat.name;
- }
- if (wxCat.level == 2)
- {
- dbProd.wx_cat_2 = wxCat.cat_id.ParseToLong();
- }
- if (wxCat.level == 3)
- {
- dbProd.wx_cat_3 = wxCat.cat_id.ParseToLong();
- }
- if (wxCat.leaf)
- {
- dbProd.wx_cat_leaf = wxCat.cat_id.ParseToLong();
- dbProd.cat_id = wxCat.cat_id;
- dbProd.cat_name = wxCat.name;
- }
+ dbProd.wx_cat_1 = wxCat.cat_id.ParseToLong();
+ dbProd.main_cat_id = wxCat.cat_id;
+ dbProd.main_cat_name = wxCat.name;
}
- if (dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null && catInfoLst.Any(c => c.cat_id == dbProd.wx_cat_1.ParseToString()))
+ if (wxCat.level == 2)
{
- goto mdyWxCat;
+ dbProd.wx_cat_2 = wxCat.cat_id.ParseToLong();
+ }
+ if (wxCat.level == 3)
+ {
+ dbProd.wx_cat_3 = wxCat.cat_id.ParseToLong();
+ }
+ if (wxCat.leaf)
+ {
+ dbProd.wx_cat_leaf = wxCat.cat_id.ParseToLong();
+ dbProd.cat_id = wxCat.cat_id;
+ dbProd.cat_name = wxCat.name;
}
}
-
- #region 非微信数据使用图片+标题识别类目
- if (dbProd.product_get_type_text == "厂商直采")
+ if (dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null && catInfoLst.Any(c => c.cat_id == dbProd.wx_cat_1.ParseToString()))
{
- var prodObj = JsonHelper.JObjectParse(dbProd.product_json);
- var jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prodObj["jstProd"]));
- mainImgLst3 = jstProd.itemMainImage.Take(3).ToList();
- productTitle = jstProd.itemName;
+ goto mdyWxCat;
}
- if (dbProd.product_get_type_text == "1688厂家")
- {
- var prod_json = dbProd.product_json;
- var _1688Json = BaseRegex.GetOneJsonObjStrJson(ref prod_json, "_1688DetailData");
- _1688ClientProductInfo _1688ClentProdInfo = JsonHelper.DeserializeJsonToObject<_1688ClientProductInfo>(_1688Json);
- mainImgLst3 = _1688ClentProdInfo.mainImage.Take(3).ToList();
- productTitle = _1688ClentProdInfo.offerDetail.subject.IsNullOrEmpty() ? _1688ClentProdInfo.tempModel.offerTitle : _1688ClentProdInfo.offerDetail.subject;
- }
- if (dbProd.product_get_type_text == "微信小店")
- {
- var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
- WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData);
- mainImgLst3 = wxClientProdInfo.info.head_img.Take(3).ToList();
- productTitle = wxClientProdInfo.info.title;
- }
- if (dbProd.product_get_type_text == "1688外部数据")
- {
- string convertRst = "";
- var pInfo = new PDDProdFormConverter()._1688OutToPddConvert(out convertRst, dbProd);
- mainImgLst3 = pInfo.detail.galleries.Where(g => g.type == 1).Take(3).Select(s => s.url).ToList();
- productTitle = pInfo.detail.goods_name;
- }
- //bool is404 = false;
-
- foreach (var img in mainImgLst3)
- {
- // 盗链识别
- var urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
- var upDate = UserLogin.GetSignaturex();
- var upDateRst = "";
-
- if (!img.Contains("wst.wxapp.tc.qq.com"))
- {
- upDate += "&token=" + token.accessToken;
- upDate += "&post_data=" + GetHtml.UrlEncodeUtf8("{\"img_url\":\"" + img.Replace("https://", "http://") + "\"}");
- upDateRst = GetHtml.PostUtf8(urlImg, upDate);
-
- for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
- {
- token.mdyTime = DateTime.Now.AddDays(-100);
- token = new WxApiBLL().GetRandomWxToken();
- upDateRst = GetHtml.PostUtf8(urlImg, upDate);
- }
-
- if (upDateRst.Contains("原图url打开返回404"))
- {
- string in_db_ids = dbProd.id.ParseToString();
- var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
- var data = UserLogin.GetSignaturex() +
- "&in_db_ids=" + in_db_ids + "&wx_safe_status=违规商品";
- if (dbProd.notes.IsNullOrEmpty())
- data += "¬es=商品图片链接失效";
- var html = GetHtml.PostUtf8(url, data);
- if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
- html = GetHtml.PostUtf8(url, data);
- }
- }
- // 上传图片识别
- if (img.Contains("wst.wxapp.tc.qq.com") || upDateRst.Contains("图片URL非法") || upDateRst.Contains("图片格式不合法") || upDateRst.Contains("文件大小超出限制"))
- {
- string errMsg = "";
- var imgBase64 = WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img, false, false, 800, 800);
- if (!string.IsNullOrEmpty(errMsg))
- {
- //break;
- }
-
- urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
- upDate = UserLogin.GetSignaturex();
- upDate += "&token=" + token.accessToken;
- //upDate += "&is_file=true";
- //if (needAddRandomBlock || wantAddRandomBlock)
- // upDate += "&random_code=true";
- upDate += "&img_url=" + img;
- upDate += "&img_base64=" + imgBase64;
-
- upDateRst = GetHtml.PostUtf8(urlImg, upDate);
- for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
- {
- token.mdyTime = DateTime.Now.AddDays(-100);
- token = new WxApiBLL().GetRandomWxToken();
- upDateRst = GetHtml.PostUtf8(urlImg, upDate);
- }
- }
-
- var upImgUrl = BaseRegex.GetStringJson(ref upDateRst, "img_url");
- //if (upImgUrl != null)
- (obj["head_imgs"] as JArray).Add(upImgUrl);
- //else
- //{
- //}
- }
-
- obj["title"] = productTitle;
- string post_data = JsonHelper.SerializeObject(obj);
-
- var url1 = BaseClass.BuildPDDObjString("product/wx_api_category_classify");
- var data1 = UserLogin.GetSignaturex();
- data1 += "&token=" + token.accessToken;
- data1 += "&post_data=" + GetHtml.UrlEncodeUtf8(post_data);
- var html1 = GetHtml.PostUtf8(url1, data1);
- var catId = BaseRegex.GetStringJson(ref html1, "cat_id");
-
- var jCatFirstLst = JsonHelper.JObjectParse(html1)["categories"].FirstOrDefault()["cats"] as JArray;
- int index = 0;
- foreach (JObject jCatObj in jCatFirstLst)
- {
- index++;
- if (index == 1)
- {
- var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
- dbProd.wx_cat_1 = catStr.ParseToLong();
- dbProd.main_cat_id = catStr;
- dbProd.main_cat_name = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString()).name;
- }
- if (index == 2)
- {
- var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
- dbProd.wx_cat_2 = catStr.ParseToLong();
- var wxCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_2.ParseToString()).name;
- }
- if (index == 3)
- {
- var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
- dbProd.wx_cat_3 = catStr.ParseToLong();
- var wxCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_3.ParseToString()).name;
- }
- if (index == jCatFirstLst.Count)
- {
- var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
- dbProd.wx_cat_leaf = catStr.ParseToLong();
- dbProd.cat_id = catStr;
- dbProd.cat_name = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString()).name;
- }
- }
- #endregion
}
- mdyWxCat:
- if ((dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" ||
- dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "1688外部数据")
- && dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
+ #region 非微信数据使用图片+标题识别类目
+ if (dbProd.product_get_type_text == "厂商直采")
{
- var row = dgvDbProduct.Rows.Cast().FirstOrDefault(r => r.Cells["col_spu_id"].Value.ParseToString() == dbProd.spu_id);
+ var prodObj = JsonHelper.JObjectParse(dbProd.product_json);
+ var jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prodObj["jstProd"]));
+ mainImgLst3 = jstProd.itemMainImage.Take(3).ToList();
+ productTitle = jstProd.itemName;
+ }
+ if (dbProd.product_get_type_text == "1688厂家")
+ {
+ var prod_json = dbProd.product_json;
+ var _1688Json = BaseRegex.GetOneJsonObjStrJson(ref prod_json, "_1688DetailData");
+ _1688ClientProductInfo _1688ClentProdInfo = JsonHelper.DeserializeJsonToObject<_1688ClientProductInfo>(_1688Json);
+ mainImgLst3 = _1688ClentProdInfo.mainImage.Take(3).ToList();
+ productTitle = _1688ClentProdInfo.offerDetail.subject.IsNullOrEmpty() ? _1688ClentProdInfo.tempModel.offerTitle : _1688ClentProdInfo.offerDetail.subject;
+ }
+ if (dbProd.product_get_type_text == "微信小店")
+ {
+ var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
+ WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData);
+ mainImgLst3 = wxClientProdInfo.info.head_img.Take(3).ToList();
+ productTitle = wxClientProdInfo.info.title;
+ }
+ if (dbProd.product_get_type_text == "1688外部数据")
+ {
+ string convertRst = "";
+ var pInfo = new PDDProdFormConverter()._1688OutToPddConvert(out convertRst, dbProd);
+ mainImgLst3 = pInfo.detail.galleries.Where(g => g.type == 1).Take(3).Select(s => s.url).ToList();
+ productTitle = pInfo.detail.goods_name;
+ }
+ //bool is404 = false;
- var url = BaseClass.BuildPDDObjString("product/mdy_product");
- var data = Work.UserLogin.GetSignaturex() +
- "&spu_id=" + dbProd.spu_id +
- "&wx_cat_1=" + dbProd.wx_cat_1 +
- "&wx_cat_2=" + dbProd.wx_cat_2 +
- "&wx_cat_3=" + dbProd.wx_cat_3 +
- "&wx_cat_leaf=" + dbProd.wx_cat_leaf;
- // 上面限制了必须是聚水潭商品才转类目,此处可以一起把主类目等一起改成微信类目
- data += "&cat_id=" + dbProd.cat_id +
- "&cat_name=" + HttpUtility.UrlEncode(dbProd.cat_name, Encoding.UTF8) +
- "&main_cat_id=" + dbProd.main_cat_id +
- "&main_cat_name=" + HttpUtility.UrlEncode(dbProd.main_cat_name, Encoding.UTF8);
- //// 临时将详细数据的销量赋值给列表并保存
- //if (dbProd.product_get_type_text == "微信小店")
- //{
- // var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
- // WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData);
- // data += "&sale_count=" + wxClientProdInfo.info.total_sold_num +
- // "&sale_count_text=" + wxClientProdInfo.info.total_sold_num;
- //}
- var html = GetHtml.PostUtf8(url, data);
- if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
- html = GetHtml.PostUtf8(url, data);
- if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ foreach (var img in mainImgLst3)
+ {
+ // 盗链识别
+ var urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
+ var upDate = UserLogin.GetSignaturex();
+ var upDateRst = "";
+
+ if (!img.Contains("wst.wxapp.tc.qq.com"))
{
- if (row != null)
- Invoke(new Action(() =>
- {
- row.Cells["col_cat_name"].Value = "类目获取失败" + BaseRegex.GetStringJson(ref html, "msg");
- }));
+ upDate += "&token=" + token.accessToken;
+ upDate += "&post_data=" + GetHtml.UrlEncodeUtf8("{\"img_url\":\"" + img.Replace("https://", "http://") + "\"}");
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+
+ for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
+ {
+ token.mdyTime = DateTime.Now.AddDays(-100);
+ token = new WxApiBLL().GetRandomWxToken();
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ }
+
+ if (upDateRst.Contains("原图url打开返回404"))
+ {
+ string in_db_ids = dbProd.id.ParseToString();
+ var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
+ var data = UserLogin.GetSignaturex() +
+ "&in_db_ids=" + in_db_ids + "&wx_safe_status=违规商品";
+ if (dbProd.notes.IsNullOrEmpty())
+ data += "¬es=商品图片链接失效";
+ var html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ }
}
- else
+ // 上传图片识别
+ if (img.Contains("wst.wxapp.tc.qq.com") || upDateRst.Contains("图片URL非法") || upDateRst.Contains("图片格式不合法") || upDateRst.Contains("文件大小超出限制"))
{
+ string errMsg = "";
+ var imgBase64 = WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img, false, false, 800, 800);
+ if (!string.IsNullOrEmpty(errMsg))
+ {
+ //break;
+ }
+
+ urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
+ upDate = UserLogin.GetSignaturex();
+ upDate += "&token=" + token.accessToken;
+ //upDate += "&is_file=true";
+ //if (needAddRandomBlock || wantAddRandomBlock)
+ // upDate += "&random_code=true";
+ upDate += "&img_url=" + img;
+ upDate += "&img_base64=" + imgBase64;
+
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
+ {
+ token.mdyTime = DateTime.Now.AddDays(-100);
+ token = new WxApiBLL().GetRandomWxToken();
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ }
+ }
+
+ var upImgUrl = BaseRegex.GetStringJson(ref upDateRst, "img_url");
+ //if (upImgUrl != null)
+ (obj["head_imgs"] as JArray).Add(upImgUrl);
+ //else
+ //{
+ //}
+ }
+
+ obj["title"] = productTitle;
+ string post_data = JsonHelper.SerializeObject(obj);
+
+ var url1 = BaseClass.BuildPDDObjString("product/wx_api_category_classify");
+ var data1 = UserLogin.GetSignaturex();
+ data1 += "&token=" + token.accessToken;
+ data1 += "&post_data=" + GetHtml.UrlEncodeUtf8(post_data);
+ var html1 = GetHtml.PostUtf8(url1, data1);
+ var catId = BaseRegex.GetStringJson(ref html1, "cat_id");
+
+ var jCatFirstLst = JsonHelper.JObjectParse(html1)["categories"].FirstOrDefault()["cats"] as JArray;
+ int index = 0;
+ foreach (JObject jCatObj in jCatFirstLst)
+ {
+ index++;
+ if (index == 1)
+ {
+ var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
+ dbProd.wx_cat_1 = catStr.ParseToLong();
+ dbProd.main_cat_id = catStr;
+ dbProd.main_cat_name = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString()).name;
+ }
+ if (index == 2)
+ {
+ var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
+ dbProd.wx_cat_2 = catStr.ParseToLong();
+ var wxCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_2.ParseToString()).name;
+ }
+ if (index == 3)
+ {
+ var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
+ dbProd.wx_cat_3 = catStr.ParseToLong();
+ var wxCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_3.ParseToString()).name;
+ }
+ if (index == jCatFirstLst.Count)
+ {
+ var catStr = jCatObj["cat_info"]["cat_id"].ParseToString();
+ dbProd.wx_cat_leaf = catStr.ParseToLong();
+ dbProd.cat_id = catStr;
+ dbProd.cat_name = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString()).name;
+ }
+ }
+ #endregion
+ }
+
+ mdyWxCat:
+ if ((dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "1688外部数据" ||
+ dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "机会商品") &&
+ dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
+ {
+ var url = BaseClass.BuildPDDObjString("product/mdy_product");
+ var data = Work.UserLogin.GetSignaturex() +
+ "&spu_id=" + dbProd.spu_id +
+ "&wx_cat_1=" + dbProd.wx_cat_1 +
+ "&wx_cat_2=" + dbProd.wx_cat_2 +
+ "&wx_cat_3=" + dbProd.wx_cat_3 +
+ "&wx_cat_leaf=" + dbProd.wx_cat_leaf;
+ // 上面限制了必须是聚水潭商品才转类目,此处可以一起把主类目等一起改成微信类目
+ data += "&cat_id=" + dbProd.cat_id +
+ "&cat_name=" + HttpUtility.UrlEncode(dbProd.cat_name, Encoding.UTF8) +
+ "&main_cat_id=" + dbProd.main_cat_id +
+ "&main_cat_name=" + HttpUtility.UrlEncode(dbProd.main_cat_name, Encoding.UTF8);
+ //// 临时将详细数据的销量赋值给列表并保存
+ //if (dbProd.product_get_type_text == "微信小店")
+ //{
+ // var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
+ // WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData);
+ // data += "&sale_count=" + wxClientProdInfo.info.total_sold_num +
+ // "&sale_count_text=" + wxClientProdInfo.info.total_sold_num;
+ //}
+ var html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ {
+ if (row != null)
+ {
+ row.DataGridView.Invoke(new Action(() =>
+ {
+ row.Cells["col_cat_name"].Value = "类目获取失败" + BaseRegex.GetStringJson(ref html, "msg");
+ }));
+
+ }
+ }
+ else
+ {
+ if (row != null)
+ {
+ string catName = dbProd.cat_name;
+ string mainCatName = dbProd.main_cat_name ?? prod.main_cat_id;
+ if (dbProd.wx_cat_leaf != null)
+ {
+ var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString())?.name;
+ if (!string.IsNullOrEmpty(catN))
+ {
+ catName = catN;
+ }
+ }
+ if (dbProd.wx_cat_3 != null)
+ {
+ var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_3.ParseToString())?.name;
+ if (!string.IsNullOrEmpty(catN))
+ {
+ catName = catN + " >> " + catName;
+ }
+ }
+ if (dbProd.wx_cat_2 != null)
+ {
+ var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_2.ParseToString())?.name;
+ if (!string.IsNullOrEmpty(catN))
+ {
+ catName = catN + " >> " + catName;
+ }
+ }
+ if (dbProd.wx_cat_1 != null)
+ {
+ var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString())?.name;
+ if (!string.IsNullOrEmpty(catN))
+ {
+ catName = catN + " >> " + catName;
+ mainCatName = catN;
+ }
+ }
if (row != null)
{
- string catName = dbProd.cat_name;
- string mainCatName = dbProd.main_cat_name ?? prod.main_cat_id;
- if (dbProd.wx_cat_leaf != null)
- {
- var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString())?.name;
- if (!string.IsNullOrEmpty(catN))
- {
- catName = catN;
- }
- }
- if (dbProd.wx_cat_3 != null)
- {
- var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_3.ParseToString())?.name;
- if (!string.IsNullOrEmpty(catN))
- {
- catName = catN + " >> " + catName;
- }
- }
- if (dbProd.wx_cat_2 != null)
- {
- var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_2.ParseToString())?.name;
- if (!string.IsNullOrEmpty(catN))
- {
- catName = catN + " >> " + catName;
- }
- }
- if (dbProd.wx_cat_1 != null)
- {
- var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString())?.name;
- if (!string.IsNullOrEmpty(catN))
- {
- catName = catN + " >> " + catName;
- mainCatName = catN;
- }
- }
- Invoke(new Action(() =>
+ row.DataGridView.Invoke(new Action(() =>
{
row.Cells["colMainCate"].Value = mainCatName;
row.Cells["col_cat_name"].Value = catName;
@@ -1575,12 +1595,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
}
- catch (Exception ex)
- {
- }
+ }
+ catch (Exception ex)
+ {
}
}
+
private void btnPushToOutServer_Click(object sender, EventArgs e)
{
var lstProdId = dgvDbProduct.Rows.Cast().Where(row
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs
index 2c37d41..c0e9411 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs
@@ -30,7 +30,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public partial class PDDGetChanceProdForm : BaseForm
{
///
- /// 是否是普通授权用户
+ /// 是否是普通商品采集授权用户
///
public bool IsAuthorityUser { get; set; } = false;
@@ -888,7 +888,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
continue;
}
- // 机会商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
+ // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
string userAuthorityTag = "";
if (IsAuthorityUser)
userAuthorityTag = "-" + BaseClass.UserName;
diff --git a/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs b/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs
index 00000d4..41d85fa 100644
--- a/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs
+++ b/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs
@@ -98,8 +98,6 @@ namespace TemuKJD.ToolForms
this.tabPage4 = new System.Windows.Forms.TabPage();
this.panel2 = new System.Windows.Forms.Panel();
this.dgvOut1688Prod = new TemuKJD.UserComponent.DataGridViewEx();
- this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components);
- this.btnGetDetail = new DevComponents.DotNetBar.PanelEx();
this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colFileName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOutSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -113,6 +111,9 @@ namespace TemuKJD.ToolForms
this.colOutStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewLinkColumn1 = new System.Windows.Forms.DataGridViewLinkColumn();
this.colOutMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.btnOutProdSaveDb = new DevComponents.DotNetBar.PanelEx();
+ this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.btnGetDetail = new DevComponents.DotNetBar.PanelEx();
this.pnlMultiLogin.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -136,7 +137,7 @@ namespace TemuKJD.ToolForms
//
this.line1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.line1.ForeColor = System.Drawing.SystemColors.AppWorkspace;
- this.line1.Location = new System.Drawing.Point(298, 7);
+ this.line1.Location = new System.Drawing.Point(256, 7);
this.line1.Name = "line1";
this.line1.Size = new System.Drawing.Size(20, 74);
this.line1.TabIndex = 790;
@@ -160,7 +161,7 @@ namespace TemuKJD.ToolForms
this.btnImportCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImportCookie.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnImportCookie.Location = new System.Drawing.Point(153, 3);
+ this.btnImportCookie.Location = new System.Drawing.Point(111, 3);
this.btnImportCookie.Name = "btnImportCookie";
this.btnImportCookie.Size = new System.Drawing.Size(146, 25);
this.btnImportCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -184,7 +185,7 @@ namespace TemuKJD.ToolForms
this.btnSaveCookie.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSaveCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveCookie.DisabledBackColor = System.Drawing.Color.Empty;
- this.btnSaveCookie.Location = new System.Drawing.Point(153, 30);
+ this.btnSaveCookie.Location = new System.Drawing.Point(111, 30);
this.btnSaveCookie.Name = "btnSaveCookie";
this.btnSaveCookie.Size = new System.Drawing.Size(146, 25);
this.btnSaveCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -210,7 +211,7 @@ namespace TemuKJD.ToolForms
this.txtCookie.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtCookie.Multiline = true;
this.txtCookie.Name = "txtCookie";
- this.txtCookie.Size = new System.Drawing.Size(145, 78);
+ this.txtCookie.Size = new System.Drawing.Size(105, 78);
this.txtCookie.TabIndex = 766;
this.txtCookie.Text = "填写cookie后点击导入cookie并刷新";
//
@@ -227,7 +228,7 @@ namespace TemuKJD.ToolForms
//
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(324, 8);
+ this.label3.Location = new System.Drawing.Point(269, 8);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 807;
@@ -236,7 +237,7 @@ namespace TemuKJD.ToolForms
// txtPageStart
//
this.txtPageStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.txtPageStart.Location = new System.Drawing.Point(368, 5);
+ this.txtPageStart.Location = new System.Drawing.Point(313, 5);
this.txtPageStart.Name = "txtPageStart";
this.txtPageStart.Size = new System.Drawing.Size(43, 23);
this.txtPageStart.TabIndex = 808;
@@ -246,7 +247,7 @@ namespace TemuKJD.ToolForms
// txtPageEnd
//
this.txtPageEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.txtPageEnd.Location = new System.Drawing.Point(461, 5);
+ this.txtPageEnd.Location = new System.Drawing.Point(406, 5);
this.txtPageEnd.Name = "txtPageEnd";
this.txtPageEnd.Size = new System.Drawing.Size(43, 23);
this.txtPageEnd.TabIndex = 809;
@@ -257,7 +258,7 @@ namespace TemuKJD.ToolForms
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(417, 8);
+ this.label4.Location = new System.Drawing.Point(362, 8);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 810;
@@ -268,10 +269,10 @@ namespace TemuKJD.ToolForms
this.statusBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.statusBar.BackColor = System.Drawing.Color.White;
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(315, 60);
+ this.statusBar.Location = new System.Drawing.Point(267, 60);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
- this.statusBar.Size = new System.Drawing.Size(689, 25);
+ this.statusBar.Size = new System.Drawing.Size(686, 25);
this.statusBar.TabIndex = 823;
//
// btnSaveDb
@@ -281,9 +282,9 @@ namespace TemuKJD.ToolForms
this.btnSaveDb.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveDb.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSaveDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnSaveDb.Location = new System.Drawing.Point(1221, 58);
+ this.btnSaveDb.Location = new System.Drawing.Point(1227, 58);
this.btnSaveDb.Name = "btnSaveDb";
- this.btnSaveDb.Size = new System.Drawing.Size(86, 23);
+ this.btnSaveDb.Size = new System.Drawing.Size(82, 23);
this.btnSaveDb.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -296,7 +297,7 @@ namespace TemuKJD.ToolForms
this.btnSaveDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveDb.TabIndex = 831;
- this.btnSaveDb.Text = "商品入库";
+ this.btnSaveDb.Text = "采集商品入库";
this.btnSaveDb.Click += new System.EventHandler(this.btnSaveDb_Click);
//
// btnStopStop
@@ -342,7 +343,7 @@ namespace TemuKJD.ToolForms
this.btnSearchTitle.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearchTitle.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearchTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnSearchTitle.Location = new System.Drawing.Point(523, 33);
+ this.btnSearchTitle.Location = new System.Drawing.Point(475, 33);
this.btnSearchTitle.Name = "btnSearchTitle";
this.btnSearchTitle.Size = new System.Drawing.Size(56, 23);
this.btnSearchTitle.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -363,7 +364,7 @@ namespace TemuKJD.ToolForms
// txtTitle
//
this.txtTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.txtTitle.Location = new System.Drawing.Point(319, 33);
+ this.txtTitle.Location = new System.Drawing.Point(271, 33);
this.txtTitle.Name = "txtTitle";
this.txtTitle.Size = new System.Drawing.Size(202, 23);
this.txtTitle.TabIndex = 968;
@@ -375,7 +376,7 @@ namespace TemuKJD.ToolForms
this.btnCancelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCancelSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnCancelSelect.Location = new System.Drawing.Point(581, 33);
+ this.btnCancelSelect.Location = new System.Drawing.Point(533, 33);
this.btnCancelSelect.Name = "btnCancelSelect";
this.btnCancelSelect.Size = new System.Drawing.Size(115, 23);
this.btnCancelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -400,9 +401,9 @@ namespace TemuKJD.ToolForms
this.btnGetGoods.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnGetGoods.DisabledBackColor = System.Drawing.Color.Empty;
this.btnGetGoods.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnGetGoods.Location = new System.Drawing.Point(1041, 58);
+ this.btnGetGoods.Location = new System.Drawing.Point(1059, 58);
this.btnGetGoods.Name = "btnGetGoods";
- this.btnGetGoods.Size = new System.Drawing.Size(86, 23);
+ this.btnGetGoods.Size = new System.Drawing.Size(82, 23);
this.btnGetGoods.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnGetGoods.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnGetGoods.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -458,7 +459,7 @@ namespace TemuKJD.ToolForms
this.btnExportCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExportCookie.DisabledBackColor = System.Drawing.Color.Empty;
this.btnExportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnExportCookie.Location = new System.Drawing.Point(153, 57);
+ this.btnExportCookie.Location = new System.Drawing.Point(111, 57);
this.btnExportCookie.Name = "btnExportCookie";
this.btnExportCookie.Size = new System.Drawing.Size(146, 25);
this.btnExportCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -566,6 +567,7 @@ namespace TemuKJD.ToolForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
+ this.splitContainer1.Panel2.Controls.Add(this.btnOutProdSaveDb);
this.splitContainer1.Panel2.Controls.Add(this.chkSkip);
this.splitContainer1.Panel2.Controls.Add(this.btnGetDetail);
this.splitContainer1.Panel2.Controls.Add(this.btnStopStop);
@@ -591,7 +593,7 @@ namespace TemuKJD.ToolForms
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.line1);
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
- this.splitContainer1.SplitterDistance = 469;
+ this.splitContainer1.SplitterDistance = 462;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -609,7 +611,7 @@ namespace TemuKJD.ToolForms
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
this.ucTabControlMetro1.SelectedIndex = 0;
this.ucTabControlMetro1.ShowCloseButton = false;
- this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 469);
+ this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 462);
this.ucTabControlMetro1.TabIndex = 462;
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
@@ -623,7 +625,7 @@ namespace TemuKJD.ToolForms
this.tabPage1.Margin = new System.Windows.Forms.Padding(5);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(1396, 437);
+ this.tabPage1.Size = new System.Drawing.Size(1396, 430);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "商品页面";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -642,7 +644,7 @@ namespace TemuKJD.ToolForms
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
- this.splitContainer2.Size = new System.Drawing.Size(1390, 431);
+ this.splitContainer2.Size = new System.Drawing.Size(1390, 424);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 6;
//
@@ -684,7 +686,7 @@ namespace TemuKJD.ToolForms
this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(1396, 436);
+ this.tabPage2.Size = new System.Drawing.Size(1396, 443);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "采集商品列表";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -693,7 +695,7 @@ namespace TemuKJD.ToolForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoading.Location = new System.Drawing.Point(673, 191);
+ this.pbLoading.Location = new System.Drawing.Point(673, 194);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -744,7 +746,7 @@ namespace TemuKJD.ToolForms
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
this.dgvProduct.RowTemplate.Height = 23;
- this.dgvProduct.Size = new System.Drawing.Size(1390, 430);
+ this.dgvProduct.Size = new System.Drawing.Size(1390, 437);
this.dgvProduct.TabIndex = 7;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
@@ -886,7 +888,7 @@ namespace TemuKJD.ToolForms
this.tabPage3.Location = new System.Drawing.Point(4, 28);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage3.Size = new System.Drawing.Size(1396, 436);
+ this.tabPage3.Size = new System.Drawing.Size(1396, 443);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "1688地址管理";
this.tabPage3.UseVisualStyleBackColor = true;
@@ -896,7 +898,7 @@ namespace TemuKJD.ToolForms
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(1390, 430);
+ this.panel1.Size = new System.Drawing.Size(1390, 437);
this.panel1.TabIndex = 0;
//
// tabPage4
@@ -905,7 +907,7 @@ namespace TemuKJD.ToolForms
this.tabPage4.Location = new System.Drawing.Point(4, 28);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage4.Size = new System.Drawing.Size(1396, 437);
+ this.tabPage4.Size = new System.Drawing.Size(1396, 443);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "1688外部数据";
this.tabPage4.UseVisualStyleBackColor = true;
@@ -916,7 +918,7 @@ namespace TemuKJD.ToolForms
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 3);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(1390, 431);
+ this.panel2.Size = new System.Drawing.Size(1390, 437);
this.panel2.TabIndex = 1;
//
// dgvOut1688Prod
@@ -958,47 +960,9 @@ namespace TemuKJD.ToolForms
this.dgvOut1688Prod.Name = "dgvOut1688Prod";
this.dgvOut1688Prod.ReadOnly = true;
this.dgvOut1688Prod.RowTemplate.Height = 23;
- this.dgvOut1688Prod.Size = new System.Drawing.Size(1390, 431);
+ this.dgvOut1688Prod.Size = new System.Drawing.Size(1390, 437);
this.dgvOut1688Prod.TabIndex = 839;
//
- // chkSkip
- //
- this.chkSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.chkSkip.AutoSize = true;
- this.chkSkip.Checked = true;
- this.chkSkip.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkSkip.Location = new System.Drawing.Point(1055, 33);
- this.chkSkip.Name = "chkSkip";
- this.chkSkip.Size = new System.Drawing.Size(171, 21);
- this.chkSkip.TabIndex = 1119;
- this.chkSkip.Text = "采集时跳过库中已存在商品";
- this.chkSkip.UseVisualStyleBackColor = true;
- //
- // btnGetDetail
- //
- this.btnGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.btnGetDetail.Cursor = System.Windows.Forms.Cursors.Hand;
- this.btnGetDetail.DisabledBackColor = System.Drawing.Color.Empty;
- this.btnGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnGetDetail.Location = new System.Drawing.Point(1131, 58);
- this.btnGetDetail.Name = "btnGetDetail";
- this.btnGetDetail.Size = new System.Drawing.Size(86, 23);
- this.btnGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
- this.btnGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.btnGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
- this.btnGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
- this.btnGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
- this.btnGetDetail.Style.ForeColor.Color = System.Drawing.Color.White;
- this.btnGetDetail.Style.GradientAngle = 90;
- this.btnGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
- this.btnGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.btnGetDetail.TabIndex = 1091;
- this.btnGetDetail.Text = "采集商品详情";
- this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click);
- //
// dataGridViewCheckBoxColumn1
//
this.dataGridViewCheckBoxColumn1.FillWeight = 26F;
@@ -1104,6 +1068,70 @@ namespace TemuKJD.ToolForms
this.colOutMsg.Name = "colOutMsg";
this.colOutMsg.ReadOnly = true;
//
+ // btnOutProdSaveDb
+ //
+ this.btnOutProdSaveDb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnOutProdSaveDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnOutProdSaveDb.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnOutProdSaveDb.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnOutProdSaveDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnOutProdSaveDb.Location = new System.Drawing.Point(956, 58);
+ this.btnOutProdSaveDb.Name = "btnOutProdSaveDb";
+ this.btnOutProdSaveDb.Size = new System.Drawing.Size(82, 23);
+ this.btnOutProdSaveDb.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnOutProdSaveDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnOutProdSaveDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnOutProdSaveDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnOutProdSaveDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnOutProdSaveDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnOutProdSaveDb.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnOutProdSaveDb.Style.GradientAngle = 90;
+ this.btnOutProdSaveDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnOutProdSaveDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnOutProdSaveDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnOutProdSaveDb.TabIndex = 1150;
+ this.btnOutProdSaveDb.Text = "外部商品入库";
+ this.btnOutProdSaveDb.Visible = false;
+ this.btnOutProdSaveDb.Click += new System.EventHandler(this.btnOutProdSaveDb_Click);
+ //
+ // chkSkip
+ //
+ this.chkSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkSkip.AutoSize = true;
+ this.chkSkip.Checked = true;
+ this.chkSkip.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkSkip.Location = new System.Drawing.Point(1055, 33);
+ this.chkSkip.Name = "chkSkip";
+ this.chkSkip.Size = new System.Drawing.Size(171, 21);
+ this.chkSkip.TabIndex = 1119;
+ this.chkSkip.Text = "采集时跳过库中已存在商品";
+ this.chkSkip.UseVisualStyleBackColor = true;
+ //
+ // btnGetDetail
+ //
+ this.btnGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnGetDetail.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.btnGetDetail.DisabledBackColor = System.Drawing.Color.Empty;
+ this.btnGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btnGetDetail.Location = new System.Drawing.Point(1143, 58);
+ this.btnGetDetail.Name = "btnGetDetail";
+ this.btnGetDetail.Size = new System.Drawing.Size(82, 23);
+ this.btnGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.btnGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.btnGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.btnGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.btnGetDetail.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.btnGetDetail.Style.GradientAngle = 90;
+ this.btnGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.btnGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.btnGetDetail.TabIndex = 1091;
+ this.btnGetDetail.Text = "采集商品详情";
+ this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click);
+ //
// Get1688ProductForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1212,5 +1240,6 @@ namespace TemuKJD.ToolForms
private System.Windows.Forms.DataGridViewTextBoxColumn colOutStock;
private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colOutMsg;
+ private DevComponents.DotNetBar.PanelEx btnOutProdSaveDb;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/ToolForms/Get1688ProductForm.cs b/TEMUKJD/ToolForms/Get1688ProductForm.cs
index deb7937..3318035 100644
--- a/TEMUKJD/ToolForms/Get1688ProductForm.cs
+++ b/TEMUKJD/ToolForms/Get1688ProductForm.cs
@@ -35,6 +35,11 @@ namespace TemuKJD.ToolForms
{
public partial class Get1688ProductForm : BaseForms.BaseForm
{
+ ///
+ /// 是否是普通商品采集授权用户
+ ///
+ public bool IsAuthorityUser { get; set; } = false;
+
List lst1688cookie = null;
public bool isGetProdLst = false;
Dictionary dicAfterSale = new Dictionary();
@@ -48,7 +53,7 @@ namespace TemuKJD.ToolForms
private string currentGet1688ListParamData = "";
private string currentGet1688ListProductData = "";
private string appVersion = "";
- private string currentSupplierId = "";
+ //private string currentSupplierId = "";
int getDetailWait = 5;
int pageStart = 1;
int pageEnd = 9999;
@@ -61,6 +66,14 @@ namespace TemuKJD.ToolForms
private void GetJuShuitanProdForm_Load(object sender, EventArgs e)
{
+ if(IsAuthorityUser)
+ {
+ tabPage2.Controls.Add(dgvOut1688Prod);
+ this.ucTabControlMetro1.TabPages.RemoveAt(3);
+ this.ucTabControlMetro1.TabPages.RemoveAt(2);
+ btnOutProdSaveDb.Visible = true;
+ }
+
this.splitContainer1.SplitterDistance = 472;
this.dgvProduct.AddSelectorColumn("colCheck");
this.dgvProduct.AddImgColumn("colImg", "colImgUrl");
@@ -300,18 +313,6 @@ namespace TemuKJD.ToolForms
List cookieList = CEFBrowser.GetCookieList(".1688.com", cefWebBrowser.GetCookieManager(null));
NaiBa.Util.Helper.ConfigHelper.SaveConfig("1688_cookies", cookieList);
BaseMsgForm.ShowInfo("保存成功");
-
- //var url = BaseClass.BuildPDDObjString("user/update_scm121_cookie");
- //var data = UserLogin.GetSignaturex();
- //data += "&cookie=" + GetHtml.UrlEncodeUtf8(JsonHelper.SerializeObject(cookieList));
- //var result = GetHtml.PostUtf8(url, data);
- //if (!result.Contains("\"code\":200"))
- // result = GetHtml.PostUtf8(url, data);
-
- //if (result.Contains("\"code\":200"))
- // BaseMsgForm.ShowInfo("保存成功");
- //else
- // BaseMsgForm.ShowInfo("保存失败,请重试");
}
private void btnPrev_Click(object sender, EventArgs e)
@@ -410,6 +411,9 @@ namespace TemuKJD.ToolForms
}
}
+ dgvProduct.BringToFront();
+ this.pbLoading.BringToFront();
+
this.pbLoading.Visible = true;
dgvProduct.Rows.Clear();
lst1688OneProductListInfo.Clear();
@@ -568,6 +572,9 @@ namespace TemuKJD.ToolForms
return;
}
+ dgvProduct.BringToFront();
+ pbLoading.BringToFront();
+
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
@@ -624,6 +631,8 @@ namespace TemuKJD.ToolForms
}
}
Thread.Sleep(Randomx.GetId(500, 1500));
+ if (this.IsAuthorityUser)
+ Thread.Sleep(1000);
// 采集商品详情
currentDetailData = "";
@@ -802,12 +811,10 @@ namespace TemuKJD.ToolForms
private void btnSaveDb_Click(object sender, EventArgs e)
{
- if (btnSaveDb.Text == "商品入库")
+ if (btnSaveDb.Text == "采集商品入库")
{
- //"&product_get_type=" + HttpUtility.UrlEncode("厂商直采", Encoding.UTF8);
- List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null));
- var shop = new ShopLoginInfo();
- shop.Cookies = JsonHelper.SerializeObject(cookieList);
+ dgvProduct.BringToFront();
+ pbLoading.BringToFront();
List rowLst = new List();
rowLst.AddRange(dgvProduct.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true));
@@ -860,12 +867,19 @@ namespace TemuKJD.ToolForms
}
Thread.Sleep(25);
+ if (this.IsAuthorityUser)
+ Thread.Sleep(1000);
if (row.Index % 20 == 0)
NaiBa.Util.Helper.ConfigHelper.SaveConfig("1688_product_list_" + MainForm.ProcessCount, lst1688OneProductListInfo);
+ // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
+ string collectAuthorityTag = "";
+ if (IsAuthorityUser)
+ collectAuthorityTag = "-" + BaseClass.UserName;
+
bool isExist = false;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
- string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prod.offerId;
+ string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prod.offerId + collectAuthorityTag;
string html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
@@ -909,7 +923,7 @@ namespace TemuKJD.ToolForms
"&from_shop_name=" + prod.dbProduct.from_shop_name +
//"&offline_supplier_id=" + prod.dbProduct.offline_supplier_id +
//"&offline_supplier_name=" + prod.dbProduct.offline_supplier_name +
- "&spu_id=" + prod.dbProduct.spu_id.ParseToString() +
+ "&spu_id=" + prod.dbProduct.spu_id.ParseToString() + collectAuthorityTag +
"&skc_id=" + prod.dbProduct.skc_id.ParseToString() +
"&price_text=" + prod.dbProduct.price_text +
"&ext_code=" + HttpUtility.UrlEncode(prod.dbProduct.ext_code, Encoding.UTF8) +
@@ -920,7 +934,12 @@ namespace TemuKJD.ToolForms
"&sale_count_text=" + HttpUtility.UrlEncode(dbProd.sale_count_text, Encoding.UTF8) +
"&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) +
"&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) +
- "&product_get_type=" + HttpUtility.UrlEncode("1688厂家", Encoding.UTF8);
+ "&product_get_type=" + HttpUtility.UrlEncode("1688厂家", Encoding.UTF8);
+ if (IsAuthorityUser)
+ {
+ data += "&add_user_name=" + BaseClass.UserName;
+ data += "&group=用户" + BaseClass.UserName;
+ }
if (!isExist)
{
data += "&main_cat_id=" + prod.dbProduct.main_cat_id +
@@ -1090,7 +1109,7 @@ namespace TemuKJD.ToolForms
private void btnExportCookie_Click(object sender, EventArgs e)
{
- List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null));
+ List cookieList = CEFBrowser.GetCookieList(".1688.com", cefWebBrowser.GetCookieManager(null));
var shop = new ShopLoginInfo();
shop.Cookies = JsonHelper.SerializeObject(cookieList);
@@ -1100,23 +1119,23 @@ namespace TemuKJD.ToolForms
cooks = new List();
string cookJs = "";
- var keys = new string[] { "acw_tc", "DISTRYBUTION_TOKEN" };
+ //var keys = new string[] { "acw_tc", "DISTRYBUTION_TOKEN" };
+ //foreach (var shopCook in cooks)
+ //{
+ // var cookie = shopCook.Name + "=" + shopCook.Value;
+ // if (!keys.Any(k => cookie.StartsWith(k)))
+ // continue;
+ // cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';";
+ //}
foreach (var shopCook in cooks)
{
var cookie = shopCook.Name + "=" + shopCook.Value;
- if (!keys.Any(k => cookie.StartsWith(k)))
- continue;
- cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';";
- }
- foreach (var shopCook in cooks)
- {
- var cookie = shopCook.Name + "=" + shopCook.Value;
- if (!keys.Any(k => cookie.StartsWith(k)))
- continue;
- cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.scm121.com; expires=" +
+ //if (!keys.Any(k => cookie.StartsWith(k)))
+ // continue;
+ cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.1688.com; expires=" +
DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';";
}
- cookJs += "\r\nsetTimeout(() => { window.location.href='https://sc.scm121.com/suppliersManage/suppliersList/onlineSuppliers'; }, 200)";
+ cookJs += "\r\nsetTimeout(() => { window.location.href='" + InitUrl + "'; }, 200)";
Clipboard.SetDataObject(cookJs);
BaseMsgForm.ShowInfo("复制成功");
}
@@ -1138,7 +1157,7 @@ namespace TemuKJD.ToolForms
}
else
{
- btnSaveDb.Text = "商品入库";
+ btnSaveDb.Text = "采集商品入库";
btnGetDetail.Visible = true;
btnGetGoods.Visible = true;
}
@@ -1153,6 +1172,9 @@ namespace TemuKJD.ToolForms
// 显示对话框并获取结果
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
+ dgvOut1688Prod.BringToFront();
+ pbLoading.BringToFront();
+
var filePathLst = openFileDialog.FileNames.ToList();
dgvOut1688Prod.Rows.Clear();
pbLoading.Visible = true;
@@ -1174,6 +1196,8 @@ namespace TemuKJD.ToolForms
}
rst = Out1688ProdImportOne(path, content);
Thread.Sleep(100);
+ if (this.IsAuthorityUser)
+ Thread.Sleep(1000);
}
catch (Exception ex)
{
@@ -1230,9 +1254,14 @@ namespace TemuKJD.ToolForms
//if (row.Index % 20 == 0)
// NaiBa.Util.Helper.ConfigHelper.SaveConfig("1688_product_list_" + MainForm.ProcessCount, lst1688OneProductListInfo);
+ // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
+ string collectAuthorityTag = "";
+ if (IsAuthorityUser)
+ collectAuthorityTag = "-" + BaseClass.UserName;
+
bool isExist = false;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
- string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + outProd.productId;
+ string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + outProd.productId + collectAuthorityTag;
string html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
@@ -1297,12 +1326,13 @@ namespace TemuKJD.ToolForms
//return "起批数量超过1,跳过";
}
+ string from_shop_id = (string.IsNullOrEmpty(outProd.shopId) ? outProd.shopName : outProd.shopId);
var data = Work.UserLogin.GetSignaturex() +
- "&from_shop_id=" + (string.IsNullOrEmpty(outProd.shopId) ? outProd.shopName : outProd.shopId) +
+ "&from_shop_id=" + from_shop_id +
"&from_shop_name=" + outProd.shopName +
//"&offline_supplier_id=" + prod.dbProduct.offline_supplier_id +
//"&offline_supplier_name=" + prod.dbProduct.offline_supplier_name +
- "&spu_id=" + prodInfo.detail.goods_id.ParseToString() +
+ "&spu_id=" + prodInfo.detail.goods_id.ParseToString() + collectAuthorityTag +
"&skc_id=" + prodInfo.detail.goods_id.ParseToString() +
"&price_text=" + priceMin + "-" + priceMax +
"&ext_code=" + HttpUtility.UrlEncode(prodInfo.detail.out_goods_sn, Encoding.UTF8) +
@@ -1314,6 +1344,11 @@ namespace TemuKJD.ToolForms
"&main_img=" + HttpUtility.UrlEncode(prodInfo.detail.image_url, Encoding.UTF8) +
"&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) +
"&product_get_type=" + HttpUtility.UrlEncode("1688外部数据", Encoding.UTF8);
+ if (IsAuthorityUser)
+ {
+ data += "&add_user_name=" + BaseClass.UserName;
+ data += "&group=用户" + BaseClass.UserName;
+ }
if (!isExist)
{
data += "&main_cat_id=" + "" +
@@ -1363,5 +1398,10 @@ namespace TemuKJD.ToolForms
}
return "";
}
+
+ private void btnOutProdSaveDb_Click(object sender, EventArgs e)
+ {
+ Out1688ProductImport();
+ }
}
}
diff --git a/TEMUKJD/UserComponent/DataGridViewEx.cs b/TEMUKJD/UserComponent/DataGridViewEx.cs
index 108977b..2137548 100644
--- a/TEMUKJD/UserComponent/DataGridViewEx.cs
+++ b/TEMUKJD/UserComponent/DataGridViewEx.cs
@@ -73,7 +73,8 @@ namespace TemuKJD.UserComponent
{
this.Rows[i].Cells[colIndex].Value = this.Rows[rowIndex1].Cells[colIndex].Value;
}
- this.Rows[rowIndex1].Cells[rowIndex1].Value = !this.Rows[rowIndex1].Cells[rowIndex2].Value.ParseToBool();
+ if (this.Rows[rowIndex2].Cells[colIndex].Value == this.Rows[rowIndex1].Cells[colIndex].Value && rowIndex1 != rowIndex2)
+ this.Rows[rowIndex2].Cells[colIndex].Value = !this.Rows[rowIndex2].Cells[colIndex].Value.ParseToBool();
}
else
{
@@ -81,8 +82,11 @@ namespace TemuKJD.UserComponent
{
this.Rows[i].Cells[colIndex].Value = this.Rows[rowIndex1].Cells[colIndex].Value;
}
- this.Rows[rowIndex1].Cells[rowIndex2].Value = !this.Rows[rowIndex1].Cells[rowIndex1].Value.ParseToBool();
+ if (this.Rows[rowIndex2].Cells[colIndex].Value == this.Rows[rowIndex1].Cells[colIndex].Value && rowIndex1 != rowIndex2)
+ this.Rows[rowIndex2].Cells[colIndex].Value = !this.Rows[rowIndex2].Cells[colIndex].Value.ParseToBool();
}
+ //this.ClearSelection();
+ //this.SetSelectedCellCore(colIndex, rowIndex2, true);
}
catch
{
diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
index 7d8db44..6b1c69c 100644
--- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs
@@ -32,14 +32,14 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtShippingPriceTimes = new System.Windows.Forms.TextBox();
@@ -96,6 +96,7 @@ namespace TemuKJD.WXForms.ProductForms
this.label22 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.佣金上货 = new System.Windows.Forms.TabPage();
+ this.label31 = new System.Windows.Forms.Label();
this.txtCommissionChangeValue = new System.Windows.Forms.TextBox();
this.label30 = new System.Windows.Forms.Label();
this.cmbCommissionAddOrReduce = new System.Windows.Forms.ComboBox();
@@ -209,7 +210,6 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
- this.label31 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -1054,6 +1054,18 @@ namespace TemuKJD.WXForms.ProductForms
this.佣金上货.Text = "佣金上货";
this.佣金上货.UseVisualStyleBackColor = true;
//
+ // label31
+ //
+ this.label31.AutoSize = true;
+ this.label31.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.label31.ForeColor = System.Drawing.SystemColors.HotTrack;
+ this.label31.Location = new System.Drawing.Point(180, 19);
+ this.label31.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.label31.Name = "label31";
+ this.label31.Size = new System.Drawing.Size(212, 17);
+ this.label31.TabIndex = 862;
+ this.label31.Text = "注:佣金上货前请先登录微信上货助手";
+ //
// txtCommissionChangeValue
//
this.txtCommissionChangeValue.Font = new System.Drawing.Font("微软雅黑", 9F);
@@ -1236,6 +1248,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbHot.TabIndex = 837;
this.cmbHot.Text = "普通商品";
this.cmbHot.Visible = false;
+ this.cmbHot.SelectedIndexChanged += new System.EventHandler(this.cmbHot_TextChanged);
this.cmbHot.TextChanged += new System.EventHandler(this.cmbHot_TextChanged);
//
// btnProdDb
@@ -1349,7 +1362,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbSourceType.Text = "厂商直采";
this.cmbSourceType.Visible = false;
this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged);
- this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_TextChanged);
+ this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged);
//
// cmbCateFilter3
//
@@ -1384,6 +1397,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25);
this.cmbGroupFilter.TabIndex = 641;
this.cmbGroupFilter.Visible = false;
+ this.cmbGroupFilter.SelectedIndexChanged += new System.EventHandler(this.cmbGroupFilter_SelectedIndexChanged);
//
// txtIdFilter
//
@@ -2063,19 +2077,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
- dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
+ dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
+ dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -2307,19 +2321,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
- dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
+ dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
+ dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -2381,8 +2395,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
- dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle13;
+ dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -2462,8 +2476,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
- dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductName.DefaultCellStyle = dataGridViewCellStyle14;
+ dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -2471,8 +2485,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductCat
//
- dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colProductCat.DefaultCellStyle = dataGridViewCellStyle15;
+ dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7;
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
@@ -2527,8 +2541,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
- dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16;
+ dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -2621,18 +2635,6 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
- // label31
- //
- this.label31.AutoSize = true;
- this.label31.Cursor = System.Windows.Forms.Cursors.Hand;
- this.label31.ForeColor = System.Drawing.SystemColors.HotTrack;
- this.label31.Location = new System.Drawing.Point(180, 19);
- this.label31.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
- this.label31.Name = "label31";
- this.label31.Size = new System.Drawing.Size(212, 17);
- this.label31.TabIndex = 862;
- this.label31.Text = "注:佣金上货前请先登录微信上货助手";
- //
// WXDBProdUploadForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
index 3f07bf4..a3075af 100644
--- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
+++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs
@@ -329,6 +329,12 @@ namespace TemuKJD.WXForms.ProductForms
cmbGroupFilter.Visible = true;
}
}
+ if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
+ {
+ cmbSourceType.Items.Insert(1, "------");
+ cmbSourceType.Items.Insert(1, "1688商品");
+ cmbSourceType.Items.Insert(1, "多多商品");
+ }
//#endif
if (BaseClass.SaLevel == 1)
{
@@ -490,14 +496,24 @@ namespace TemuKJD.WXForms.ProductForms
private void RefreshDbProdGroupAndCate()
{
- string sourceType = cmbSourceType.Text.Trim();
Task.Run(() =>
{
// 同时刷新下商品分组
- string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
- if (BaseClass.GroupId != 3)
- addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
- PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
+ //string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
+ //if (BaseClass.GroupId != 3)
+ // addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
+ //PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
+ PDDDBProdListForm.GetPDDProductGroup(new List { cmbGroupFilter, }, "", "", "admin");
+ if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
+ {
+ Invoke(new Action(() =>
+ {
+ cmbGroupFilter.Items.Remove("------");
+ cmbGroupFilter.Items.Remove("我的商品");
+ cmbGroupFilter.Items.Insert(1, "------");
+ cmbGroupFilter.Items.Insert(1, "我的商品");
+ }));
+ }
GetPddProductCate();
Invoke(new Action(() =>
{
@@ -2513,7 +2529,8 @@ namespace TemuKJD.WXForms.ProductForms
}
}
- else if (dbProd.product_get_type_text == "1688厂家")
+ // 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址
+ else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin")
{
var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
var dataAfterSale = Work.UserLogin.GetSignaturex();
@@ -4652,17 +4669,27 @@ namespace TemuKJD.WXForms.ProductForms
data += "&in_ext_codes=" + txtExtCodeFilter.Text;
data += "&in_spu_ids=" + txtIdFilter.Text;
- data += "&in_groups=" + cmbGroupFilter.Text;
+
+ string serach_group = cmbGroupFilter.Text.Trim();
+ if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
+ {
+ if (BaseClass.GroupId == 3)
+ serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.UserName);
+ else
+ serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.ParentUserName);
+ }
+ data += "&in_groups=" + serach_group;
+
data += "&product_name=" + txtSearchGoodsName.Text.Trim();
// 同时刷新下商品分组
- string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
+ string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
- addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
+ addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
data += "&add_user_name=" + addUserName;
// 采集来源判断
- data += "&product_get_type=" + cmbSourceType.Text.Trim();
+ data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("多多商品","机会商品").Replace("1688商品", "1688厂家,1688外部数据");
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text);
else
@@ -5118,6 +5145,14 @@ namespace TemuKJD.WXForms.ProductForms
}
+ private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品")
+ {
+ cmbSourceType.Text = "";
+ }
+ }
+
private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
@@ -5125,7 +5160,6 @@ namespace TemuKJD.WXForms.ProductForms
else
fillWxCate();
-
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家")
{
cmbJstInitSet.Text = "";
@@ -5139,12 +5173,27 @@ namespace TemuKJD.WXForms.ProductForms
Task.Run(() =>
{
// 同时刷新下商品分组
- string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
+ string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
- addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
+ addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
+ if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
+ {
+ var mainUserName = BaseClass.GroupId == 3 ? BaseClass.UserName : BaseClass.ParentUserName;
+ if (cmbGroupFilter.Items.Cast