标题分词功能

This commit is contained in:
wule committed 2025-07-29 19:15:50 +08:00
1 parent 22e5ae4ab7
commit c032747651
22 files changed
+746 -185

No files matched your search

+2 -2
View File
@@ -27,8 +27,8 @@ namespace AllBase
/// <summary> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 386; public static int VersionCount = 388;
//public static int VersionCount = 386; //public static int VersionCount = 388;
/// <summary> /// <summary>
/// 版本号 /// 版本号
+3
View File
@@ -29,5 +29,8 @@ namespace AllBase.Model.Result
/// </summary> /// </summary>
public int select_count { get; set; } public int select_count { get; set; }
public int select_total_count { get; set; } public int select_total_count { get; set; }
public string head_words { get; set; }
public string end_words { get; set; }
public string fission_words { get; set; }
} }
} }
@@ -26,6 +26,12 @@ namespace AllBase.Model.Result
public string operate_sub_sa_name { get; set; } = ""; public string operate_sub_sa_name { get; set; } = "";
public string operate_sub_sa_nick { get; set; } = ""; public string operate_sub_sa_nick { get; set; } = "";
public DateTime? add_sub_sa_time { get; set; } public DateTime? add_sub_sa_time { get; set; }
string _fission_product_name = "";
public string fission_product_name
{
get { return string.IsNullOrWhiteSpace(_fission_product_name) ? product_name : _fission_product_name; }
set { _fission_product_name = value; }
}
#region 外键连接属性 #region 外键连接属性
+27 -8
View File
@@ -123,11 +123,12 @@ namespace KJD_Web.BLL
sql = "select * from kjd.product p where 1=1"; sql = "select * from kjd.product p where 1=1";
else if (string.IsNullOrEmpty(get_select_count)) else if (string.IsNullOrEmpty(get_select_count))
sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," + sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count from kjd.product p where 1=1"; "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from kjd.product p where 1=1";
else else
sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," + sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,COUNT(s.id) AS select_count FROM kjd.product p " + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,COUNT(s.id) AS select_count " +
"LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' WHERE 1=1"; "FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " +
"WHERE 1=1";
//where子句 //where子句
sql += where; sql += where;
@@ -165,6 +166,9 @@ namespace KJD_Web.BLL
mdy_time = Convert.ToDateTime(row["mdy_time"]), mdy_time = Convert.ToDateTime(row["mdy_time"]),
notes = row["notes"].ToString(), notes = row["notes"].ToString(),
select_total_count = row["select_total_count"].ParseToInt(), select_total_count = row["select_total_count"].ParseToInt(),
end_words = row["end_words"].ParseToString(),
fission_words = row["fission_words"].ParseToString(),
head_words = row["head_words"].ParseToString(),
}; };
if (isDetail) if (isDetail)
{ {
@@ -275,6 +279,9 @@ namespace KJD_Web.BLL
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'");
string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'");
string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'");
string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name)) if (string.IsNullOrEmpty(user_name))
{ {
@@ -288,6 +295,12 @@ namespace KJD_Web.BLL
sql += " notes='" + notes + "',"; sql += " notes='" + notes + "',";
if (ext_code != null) if (ext_code != null)
sql += " ext_code='" + ext_code + "',"; sql += " ext_code='" + ext_code + "',";
if (fission_words != null)
sql += " fission_words='" + fission_words + "',";
if (head_words != null)
sql += " head_words='" + head_words + "',";
if (end_words != null)
sql += " end_words='" + end_words + "',";
sql = sql.TrimEnd(','); sql = sql.TrimEnd(',');
sql += " where id=" + id + ";"; sql += " where id=" + id + ";";
@@ -323,6 +336,7 @@ namespace KJD_Web.BLL
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt(); var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt();
var add_fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_fission_product_name").ParseToString())?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name)) if (string.IsNullOrEmpty(user_name))
{ {
@@ -336,9 +350,10 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn); MysqlUtils mySql = new MysqlUtils(conn);
string sql = "insert into kjd.product_select (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,add_time,mdy_time) " + string sql = "insert into kjd.product_select " +
"values ('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" + "(out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,fission_product_name,add_time,mdy_time) values " +
notes + "','" + status + "','" + "('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" +
notes + "','" + status + "','" + add_fission_product_name + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
if (add_product_remaining > 0) if (add_product_remaining > 0)
@@ -498,7 +513,7 @@ namespace KJD_Web.BLL
//else //else
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," + sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," + "s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
"s.operate_sub_sa_name,s.add_sub_sa_time," + "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," +
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," + "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," +
"u.nick_name as operate_sub_sa_nick " + "u.nick_name as operate_sub_sa_nick " +
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " + "from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " +
@@ -542,7 +557,8 @@ namespace KJD_Web.BLL
skc_id = row["skc_id"].ToString(), skc_id = row["skc_id"].ToString(),
spu_id = row["spu_id"].ToString(), spu_id = row["spu_id"].ToString(),
operate_sub_sa_name = row["operate_sub_sa_name"].ToString(), operate_sub_sa_name = row["operate_sub_sa_name"].ToString(),
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString() operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(),
fission_product_name = row["fission_product_name"].ToString(),
//product_json = row["product_json"].ToString(), //product_json = row["product_json"].ToString(),
//size_json = row["size_json"].ToString(), //size_json = row["size_json"].ToString(),
}; };
@@ -669,6 +685,7 @@ namespace KJD_Web.BLL
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name)) if (string.IsNullOrEmpty(user_name))
{ {
@@ -680,6 +697,8 @@ namespace KJD_Web.BLL
string sql = "update kjd.product_select set"; string sql = "update kjd.product_select set";
if (notes != null) if (notes != null)
sql += " notes='" + notes + "',"; sql += " notes='" + notes + "',";
if (fission_product_name != null)
sql += " fission_product_name='" + fission_product_name + "',";
sql = sql.TrimEnd(','); sql = sql.TrimEnd(',');
sql += " where id=" + id + ";"; sql += " where id=" + id + ";";
@@ -31,5 +31,8 @@ namespace KJD_Web.Model
/// 被选中的总次数 /// 被选中的总次数
/// </summary> /// </summary>
public int select_total_count { get; set; } public int select_total_count { get; set; }
public string fission_words { get; set; }
public string head_words { get; set; }
public string end_words { get; set; }
} }
} }
@@ -26,6 +26,7 @@ namespace KJD_Web.Model
public string operate_sub_sa_name { get; set; } public string operate_sub_sa_name { get; set; }
public string operate_sub_sa_nick { get; set; } public string operate_sub_sa_nick { get; set; }
public DateTime? add_sub_sa_time { get; set; } public DateTime? add_sub_sa_time { get; set; }
public string fission_product_name { get; set; }
#region 外键连接属性 #region 外键连接属性
+1 -1
View File
@@ -367,7 +367,7 @@ namespace TemuKJD.KJDForms.AdminForms
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group"); shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group");
shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie"); shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie");
shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+"); shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+");
shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2"); shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2").ParseToString();
shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+"); shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+");
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name"); shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes"); shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
@@ -30,17 +30,23 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductEditNotesForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductEditNotesForm));
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.txtFissionWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.txtEndWords = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHeadWords = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtProductName = new System.Windows.Forms.TextBox();
this.txtSkcId = new System.Windows.Forms.TextBox();
this.txtSpuId = new System.Windows.Forms.TextBox();
this.txtExtCode = new System.Windows.Forms.TextBox(); this.txtExtCode = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblSkcId = new System.Windows.Forms.Label();
this.lblSPUId = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.lblProductTitle = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx(); this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
@@ -49,35 +55,139 @@
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.White; this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.txtFissionWords);
this.panel2.Controls.Add(this.txtEndWords);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.txtHeadWords);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.txtProductName);
this.panel2.Controls.Add(this.txtSkcId);
this.panel2.Controls.Add(this.txtSpuId);
this.panel2.Controls.Add(this.txtExtCode); this.panel2.Controls.Add(this.txtExtCode);
this.panel2.Controls.Add(this.label4); this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label3); this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.label2); this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.label1); this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.pictureBox1); this.panel2.Controls.Add(this.pictureBox1);
this.panel2.Controls.Add(this.lblSkcId);
this.panel2.Controls.Add(this.lblSPUId);
this.panel2.Controls.Add(this.label8); this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.txtNotes); this.panel2.Controls.Add(this.txtNotes);
this.panel2.Controls.Add(this.lblProductTitle);
this.panel2.Controls.Add(this.btnOk); this.panel2.Controls.Add(this.btnOk);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33); this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(366, 461); this.panel2.Size = new System.Drawing.Size(465, 686);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(31, 391);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 17);
this.label7.TabIndex = 403;
this.label7.Text = "裂变分词";
//
// txtFissionWords
//
this.txtFissionWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtFissionWords.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtFissionWords.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtFissionWords.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtFissionWords.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtFissionWords.Border.Class = "CrumbBarBackgroundKey";
this.txtFissionWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtFissionWords.Border.PaddingBottom = 2;
this.txtFissionWords.Border.PaddingLeft = 2;
this.txtFissionWords.Border.PaddingRight = 2;
this.txtFissionWords.Border.PaddingTop = 2;
this.txtFissionWords.Location = new System.Drawing.Point(90, 391);
this.txtFissionWords.Multiline = true;
this.txtFissionWords.Name = "txtFissionWords";
this.txtFissionWords.Size = new System.Drawing.Size(338, 238);
this.txtFissionWords.TabIndex = 402;
this.txtFissionWords.WatermarkText = "一行一个";
//
// txtEndWords
//
this.txtEndWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtEndWords.Location = new System.Drawing.Point(292, 353);
this.txtEndWords.Name = "txtEndWords";
this.txtEndWords.Size = new System.Drawing.Size(136, 23);
this.txtEndWords.TabIndex = 401;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(234, 356);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 400;
this.label6.Text = "标题后缀";
//
// txtHeadWords
//
this.txtHeadWords.Location = new System.Drawing.Point(90, 353);
this.txtHeadWords.Name = "txtHeadWords";
this.txtHeadWords.Size = new System.Drawing.Size(136, 23);
this.txtHeadWords.TabIndex = 399;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 356);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 398;
this.label5.Text = "标题前缀";
//
// 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, 205);
this.txtProductName.Multiline = true;
this.txtProductName.Name = "txtProductName";
this.txtProductName.ReadOnly = true;
this.txtProductName.Size = new System.Drawing.Size(338, 46);
this.txtProductName.TabIndex = 397;
//
// txtSkcId
//
this.txtSkcId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSkcId.Location = new System.Drawing.Point(292, 171);
this.txtSkcId.Name = "txtSkcId";
this.txtSkcId.ReadOnly = true;
this.txtSkcId.Size = new System.Drawing.Size(136, 23);
this.txtSkcId.TabIndex = 396;
//
// txtSpuId
//
this.txtSpuId.Location = new System.Drawing.Point(90, 171);
this.txtSpuId.Name = "txtSpuId";
this.txtSpuId.ReadOnly = true;
this.txtSpuId.Size = new System.Drawing.Size(136, 23);
this.txtSpuId.TabIndex = 395;
//
// txtExtCode // txtExtCode
// //
this.txtExtCode.Location = new System.Drawing.Point(90, 264); this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtExtCode.Location = new System.Drawing.Point(90, 262);
this.txtExtCode.Name = "txtExtCode"; this.txtExtCode.Name = "txtExtCode";
this.txtExtCode.Size = new System.Drawing.Size(238, 23); this.txtExtCode.Size = new System.Drawing.Size(338, 23);
this.txtExtCode.TabIndex = 394; this.txtExtCode.TabIndex = 394;
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 267); this.label4.Location = new System.Drawing.Point(31, 265);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17); this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 393; this.label4.TabIndex = 393;
@@ -86,7 +196,7 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(27, 236); this.label3.Location = new System.Drawing.Point(31, 209);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17); this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 392; this.label3.TabIndex = 392;
@@ -95,7 +205,7 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 205); this.label2.Location = new System.Drawing.Point(234, 174);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17); this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 391; this.label2.TabIndex = 391;
@@ -104,7 +214,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(27, 174); this.label1.Location = new System.Drawing.Point(31, 174);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17); this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 390; this.label1.TabIndex = 390;
@@ -113,35 +223,17 @@
// pictureBox1 // pictureBox1
// //
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pictureBox1.Location = new System.Drawing.Point(116, 22); this.pictureBox1.Location = new System.Drawing.Point(165, 18);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(136, 136); this.pictureBox1.Size = new System.Drawing.Size(136, 136);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 389; this.pictureBox1.TabIndex = 389;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
// //
// lblSkcId
//
this.lblSkcId.AutoSize = true;
this.lblSkcId.Location = new System.Drawing.Point(87, 205);
this.lblSkcId.Name = "lblSkcId";
this.lblSkcId.Size = new System.Drawing.Size(56, 17);
this.lblSkcId.TabIndex = 388;
this.lblSkcId.Text = "登录账号";
//
// lblSPUId
//
this.lblSPUId.AutoSize = true;
this.lblSPUId.Location = new System.Drawing.Point(87, 174);
this.lblSPUId.Name = "lblSPUId";
this.lblSPUId.Size = new System.Drawing.Size(56, 17);
this.lblSPUId.TabIndex = 387;
this.lblSPUId.Text = "登录账号";
//
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(27, 298); this.label8.Location = new System.Drawing.Point(31, 296);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17); this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386; this.label8.TabIndex = 386;
@@ -149,6 +241,8 @@
// //
// txtNotes // txtNotes
// //
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
// //
// //
// //
@@ -162,28 +256,21 @@
this.txtNotes.Border.PaddingLeft = 2; this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2; this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2; this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(90, 301); this.txtNotes.Location = new System.Drawing.Point(90, 296);
this.txtNotes.Multiline = true; this.txtNotes.Multiline = true;
this.txtNotes.Name = "txtNotes"; this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(239, 94); this.txtNotes.Size = new System.Drawing.Size(338, 47);
this.txtNotes.TabIndex = 385; this.txtNotes.TabIndex = 385;
// //
// lblProductTitle
//
this.lblProductTitle.Location = new System.Drawing.Point(87, 236);
this.lblProductTitle.Name = "lblProductTitle";
this.lblProductTitle.Size = new System.Drawing.Size(242, 17);
this.lblProductTitle.TabIndex = 0;
this.lblProductTitle.Text = "登录账号";
//
// btnOk // btnOk
// //
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White; this.btnOk.ForeColor = System.Drawing.Color.White;
this.btnOk.Location = new System.Drawing.Point(274, 405); this.btnOk.Location = new System.Drawing.Point(373, 640);
this.btnOk.Margin = new System.Windows.Forms.Padding(2); this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk"; this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26); this.btnOk.Size = new System.Drawing.Size(55, 26);
@@ -195,7 +282,7 @@
// DbProductEditNotesForm // DbProductEditNotesForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(368, 495); this.ClientSize = new System.Drawing.Size(467, 720);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -214,7 +301,6 @@
#endregion #endregion
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblProductTitle;
private UserControls.ButtonEx btnOk; private UserControls.ButtonEx btnOk;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes; private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
@@ -222,9 +308,16 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblSkcId;
private System.Windows.Forms.Label lblSPUId;
private System.Windows.Forms.TextBox txtExtCode; private System.Windows.Forms.TextBox txtExtCode;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtSpuId;
private System.Windows.Forms.TextBox txtSkcId;
private System.Windows.Forms.TextBox txtProductName;
private System.Windows.Forms.Label label7;
private DevComponents.DotNetBar.Controls.TextBoxX txtFissionWords;
private System.Windows.Forms.TextBox txtEndWords;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtHeadWords;
private System.Windows.Forms.Label label5;
} }
} }
@@ -30,12 +30,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
if (dbProd != null) if (dbProd != null)
{ {
lblProductTitle.Text = dbProd.product_name; txtProductName.Text = dbProd.product_name;
lblSkcId.Text = dbProd.skc_id; txtSkcId.Text = dbProd.skc_id;
lblSPUId.Text = dbProd.spu_id; txtSpuId.Text = dbProd.spu_id;
this.pictureBox1.ImageLocation = dbProd.main_img.Replace("https", "http"); this.pictureBox1.ImageLocation = dbProd.main_img.Replace("https", "http");
this.txtNotes.Text = dbProd.notes; this.txtNotes.Text = dbProd.notes;
this.txtExtCode.Text = dbProd.ext_code; this.txtExtCode.Text = dbProd.ext_code;
this.txtFissionWords.Text = dbProd.fission_words;
this.txtHeadWords.Text = string.IsNullOrWhiteSpace(dbProd.head_words) ? "5-99个" : dbProd.head_words;
this.txtEndWords.Text = string.IsNullOrWhiteSpace(dbProd.end_words) ? "适合不同的搭配风格" : dbProd.end_words;
} }
} }
@@ -46,6 +49,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var data = UserLogin.GetSignaturex() + var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProd.id + "&notes=" + this.txtNotes.Text.Trim(); "&db_id=" + dbProd.id + "&notes=" + this.txtNotes.Text.Trim();
data += "&ext_code=" + this.txtExtCode.Text.Trim(); data += "&ext_code=" + this.txtExtCode.Text.Trim();
data += "&fission_words=" + this.txtFissionWords.Text.Trim();
data += "&head_words=" + this.txtHeadWords.Text.Trim();
data += "&end_words=" + this.txtEndWords.Text.Trim();
var html = GetHtml.PostUtf8(url, data); var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data); html = GetHtml.PostUtf8(url, data);
@@ -59,6 +65,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
dbProd.notes = this.txtNotes.Text.Trim(); dbProd.notes = this.txtNotes.Text.Trim();
dbProd.ext_code = this.txtExtCode.Text.Trim(); dbProd.ext_code = this.txtExtCode.Text.Trim();
dbProd.head_words = this.txtHeadWords.Text.Trim();
dbProd.end_words = this.txtEndWords.Text.Trim();
dbProd.fission_words = this.txtFissionWords.Text.Trim();
this.Close(); this.Close();
} }
} }
@@ -31,6 +31,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = 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 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductListForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.cmbSort = new System.Windows.Forms.ComboBox(); this.cmbSort = new System.Windows.Forms.ComboBox();
@@ -67,6 +72,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colHeadWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEndWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFissionWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
@@ -357,6 +365,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colAddTimes, this.colAddTimes,
this.colSelectTotalCount, this.colSelectTotalCount,
this.col_notes, this.col_notes,
this.colHeadWords,
this.colEndWords,
this.colFissionWords,
this.col_edit, this.col_edit,
this.col_delete, this.col_delete,
this.col_select_product}); this.col_select_product});
@@ -411,6 +422,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// //
// col_product_name // col_product_name
// //
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_product_name.DefaultCellStyle = dataGridViewCellStyle3;
this.col_product_name.FillWeight = 200F; this.col_product_name.FillWeight = 200F;
this.col_product_name.HeaderText = "标题"; this.col_product_name.HeaderText = "标题";
this.col_product_name.Name = "col_product_name"; this.col_product_name.Name = "col_product_name";
@@ -473,14 +486,43 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// //
// col_notes // col_notes
// //
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_notes.DefaultCellStyle = dataGridViewCellStyle4;
this.col_notes.HeaderText = "备注"; this.col_notes.HeaderText = "备注";
this.col_notes.Name = "col_notes"; this.col_notes.Name = "col_notes";
this.col_notes.ReadOnly = true; this.col_notes.ReadOnly = true;
// //
// colHeadWords
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle5;
this.colHeadWords.HeaderText = "标题前缀";
this.colHeadWords.Name = "colHeadWords";
this.colHeadWords.ReadOnly = true;
this.colHeadWords.Visible = false;
//
// colEndWords
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colEndWords.DefaultCellStyle = dataGridViewCellStyle6;
this.colEndWords.HeaderText = "标题后缀";
this.colEndWords.Name = "colEndWords";
this.colEndWords.ReadOnly = true;
this.colEndWords.Visible = false;
//
// colFissionWords
//
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle7;
this.colFissionWords.HeaderText = "裂变词";
this.colFissionWords.Name = "colFissionWords";
this.colFissionWords.ReadOnly = true;
this.colFissionWords.Visible = false;
//
// col_edit // col_edit
// //
this.col_edit.FillWeight = 80F; this.col_edit.FillWeight = 60F;
this.col_edit.HeaderText = "编辑备注/货号"; this.col_edit.HeaderText = "编辑/详情";
this.col_edit.Name = "col_edit"; this.col_edit.Name = "col_edit";
this.col_edit.ReadOnly = true; this.col_edit.ReadOnly = true;
this.col_edit.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.col_edit.Resizable = System.Windows.Forms.DataGridViewTriState.True;
@@ -567,6 +609,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes; private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount;
private System.Windows.Forms.DataGridViewTextBoxColumn col_notes; private System.Windows.Forms.DataGridViewTextBoxColumn col_notes;
private System.Windows.Forms.DataGridViewTextBoxColumn colHeadWords;
private System.Windows.Forms.DataGridViewTextBoxColumn colEndWords;
private System.Windows.Forms.DataGridViewTextBoxColumn colFissionWords;
private System.Windows.Forms.DataGridViewLinkColumn col_edit; private System.Windows.Forms.DataGridViewLinkColumn col_edit;
private System.Windows.Forms.DataGridViewLinkColumn col_delete; private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product; private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
@@ -42,6 +42,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
this.dgvDbProduct.Columns["col_delete"].Visible = true; this.dgvDbProduct.Columns["col_delete"].Visible = true;
this.dgvDbProduct.Columns["col_edit"].Visible = true; this.dgvDbProduct.Columns["col_edit"].Visible = true;
this.dgvDbProduct.Columns["colHeadWords"].Visible = true;
this.dgvDbProduct.Columns["colEndWords"].Visible = true;
this.dgvDbProduct.Columns["colFissionWords"].Visible = true;
//this.dgvDbProduct.Columns["col_notes"].Visible = true; //this.dgvDbProduct.Columns["col_notes"].Visible = true;
//this.lblNotes.Visible = true; //this.lblNotes.Visible = true;
//this.txtNotes.Visible = true; //this.txtNotes.Visible = true;
@@ -50,6 +53,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
this.dgvDbProduct.Columns["col_delete"].Visible = false; this.dgvDbProduct.Columns["col_delete"].Visible = false;
this.dgvDbProduct.Columns["col_edit"].Visible = false; this.dgvDbProduct.Columns["col_edit"].Visible = false;
this.dgvDbProduct.Columns["colHeadWords"].Visible = false;
this.dgvDbProduct.Columns["colEndWords"].Visible = false;
this.dgvDbProduct.Columns["colFissionWords"].Visible = false;
//this.dgvDbProduct.Columns["col_notes"].Visible = false; //this.dgvDbProduct.Columns["col_notes"].Visible = false;
//this.lblNotes.Visible = false; //this.lblNotes.Visible = false;
//this.txtNotes.Visible = false; //this.txtNotes.Visible = false;
@@ -126,6 +132,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prod.select_count, prod.select_count,
prod.select_total_count, prod.select_total_count,
prod.notes, prod.notes,
prod.head_words,
prod.end_words,
prod.fission_words,
"编辑", "编辑",
"删除", "删除",
"认领"); "认领");
@@ -282,11 +291,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms
return; return;
DeleteProduct(dbId); DeleteProduct(dbId);
break; break;
case "编辑备注/货号": case "编辑/详情":
DbProductEditNotesForm editForm = new DbProductEditNotesForm(dbProduct); DbProductEditNotesForm editForm = new DbProductEditNotesForm(dbProduct);
editForm.ShowDialog(); editForm.ShowDialog();
dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes; dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code; dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words;
dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words;
dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
break; break;
case "认领": case "认领":
Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); }); Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
@@ -344,6 +356,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
try try
{ {
var fissionProductName = GetFissionProductName(prod);
var url = BaseClass.BuildObjString("product/add_user_select_product"); var url = BaseClass.BuildObjString("product/add_user_select_product");
var data = UserLogin.GetSignaturex() + var data = UserLogin.GetSignaturex() +
"&out_product_id=" + prod.id + "&out_product_id=" + prod.id +
@@ -352,6 +366,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
"&main_user_name=" + shop.UserName + "&main_user_name=" + shop.UserName +
"&sub_user_name=" + shop.SubUserName + "&sub_user_name=" + shop.SubUserName +
"&add_product_remaining=" + shop.AddProductRemaining + "&add_product_remaining=" + shop.AddProductRemaining +
"&add_fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName) +
"&status=待上传"; "&status=待上传";
var html = GetHtml.PostUtf8(url, data); var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -404,6 +419,52 @@ namespace TemuKJD.KJDForms.ProductSelectForms
})); }));
} }
public static string GetFissionProductName(TemuDBProduct prod)
{
string headWords = "";
if (!string.IsNullOrWhiteSpace(prod.head_words))
{
var numbers = prod.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
int minNum = 5;
int maxNum = 19;
if (numbers.Count > 0 && numbers[0] > 0)
{
minNum = numbers[0];
}
if (numbers.Count > 1 && numbers[1] > 0)
{
maxNum = numbers[1];
}
if (maxNum < minNum)
{
maxNum = minNum;
}
headWords += Randomx.GetId(minNum, maxNum + 1) + "个";
}
//string endWords = string.IsNullOrEmpty(prod.end_words) ? "适合不同的搭配风格" : prod.end_words;
string endWords = string.IsNullOrWhiteSpace(prod.end_words) ? "" : prod.end_words;
List<string> fissionLst = new List<string>();
fissionLst.AddRange(prod.fission_words.ParseToString().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries));
string centerWords = ",";
while (fissionLst.Count > 0)
{
int id = Randomx.GetId(fissionLst.Count);
var fissionTxt = fissionLst[id];
fissionLst.RemoveAt(id);
var allTxt = headWords + prod.product_name + centerWords + fissionTxt + "," + endWords;
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(allTxt);
if (bytes.Length > 250)
{
break;
}
centerWords += fissionTxt + ",";
}
return (headWords + prod.product_name + centerWords + endWords).Trim(',');
}
private void DeleteProduct(string dbId) private void DeleteProduct(string dbId)
{ {
var url = BaseClass.BuildObjString("product/del_db_product"); var url = BaseClass.BuildObjString("product/del_db_product");
@@ -153,6 +153,15 @@
<metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colHeadWords.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEndWords.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colFissionWords.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_edit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="col_edit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@@ -31,8 +31,11 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = 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 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnReFission = new TemuKJD.UserControls.ButtonEx();
this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
@@ -109,6 +112,7 @@
// //
// splitContainer1.Panel1 // splitContainer1.Panel1
// //
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
this.splitContainer1.Panel1.Controls.Add(this.chkShowDel); this.splitContainer1.Panel1.Controls.Add(this.chkShowDel);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1); this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa); this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa);
@@ -122,15 +126,32 @@
this.splitContainer1.SplitterDistance = 53; this.splitContainer1.SplitterDistance = 53;
this.splitContainer1.TabIndex = 2; this.splitContainer1.TabIndex = 2;
// //
// btnReFission
//
this.btnReFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnReFission.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReFission.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReFission.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReFission.ForeColor = System.Drawing.Color.White;
this.btnReFission.Location = new System.Drawing.Point(1153, 14);
this.btnReFission.Margin = new System.Windows.Forms.Padding(2);
this.btnReFission.Name = "btnReFission";
this.btnReFission.Size = new System.Drawing.Size(90, 26);
this.btnReFission.TabIndex = 469;
this.btnReFission.Text = "批量重组标题";
this.btnReFission.UseVisualStyleBackColor = false;
this.btnReFission.Click += new System.EventHandler(this.btnReFission_Click);
//
// chkShowDel // chkShowDel
// //
this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkShowDel.AutoSize = true; this.chkShowDel.AutoSize = true;
this.chkShowDel.Location = new System.Drawing.Point(1081, 17); this.chkShowDel.Location = new System.Drawing.Point(1044, 17);
this.chkShowDel.Name = "chkShowDel"; this.chkShowDel.Name = "chkShowDel";
this.chkShowDel.Size = new System.Drawing.Size(123, 21); this.chkShowDel.Size = new System.Drawing.Size(99, 21);
this.chkShowDel.TabIndex = 468; this.chkShowDel.TabIndex = 468;
this.chkShowDel.Text = "显示删除功能按钮"; this.chkShowDel.Text = "显示删除功能";
this.chkShowDel.UseVisualStyleBackColor = true; this.chkShowDel.UseVisualStyleBackColor = true;
this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged); this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged);
// //
@@ -179,7 +200,7 @@
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(944, 28); this.tableLayoutPanel1.Size = new System.Drawing.Size(945, 28);
this.tableLayoutPanel1.TabIndex = 190; this.tableLayoutPanel1.TabIndex = 190;
// //
// label6 // label6
@@ -392,11 +413,11 @@
// //
this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkNoSubSa.AutoSize = true; this.chkNoSubSa.AutoSize = true;
this.chkNoSubSa.Location = new System.Drawing.Point(958, 17); this.chkNoSubSa.Location = new System.Drawing.Point(949, 17);
this.chkNoSubSa.Name = "chkNoSubSa"; this.chkNoSubSa.Name = "chkNoSubSa";
this.chkNoSubSa.Size = new System.Drawing.Size(123, 21); this.chkNoSubSa.Size = new System.Drawing.Size(99, 21);
this.chkNoSubSa.TabIndex = 467; this.chkNoSubSa.TabIndex = 467;
this.chkNoSubSa.Text = "仅显示未分配超管"; this.chkNoSubSa.Text = "仅未分配超管";
this.chkNoSubSa.UseVisualStyleBackColor = true; this.chkNoSubSa.UseVisualStyleBackColor = true;
// //
// btnSetSubSa // btnSetSubSa
@@ -407,10 +428,10 @@
this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetSubSa.ForeColor = System.Drawing.Color.White; this.btnSetSubSa.ForeColor = System.Drawing.Color.White;
this.btnSetSubSa.Location = new System.Drawing.Point(1240, 14); this.btnSetSubSa.Location = new System.Drawing.Point(1247, 14);
this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2); this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2);
this.btnSetSubSa.Name = "btnSetSubSa"; this.btnSetSubSa.Name = "btnSetSubSa";
this.btnSetSubSa.Size = new System.Drawing.Size(91, 26); this.btnSetSubSa.Size = new System.Drawing.Size(90, 26);
this.btnSetSubSa.TabIndex = 463; this.btnSetSubSa.TabIndex = 463;
this.btnSetSubSa.Text = "分配二级超管"; this.btnSetSubSa.Text = "分配二级超管";
this.btnSetSubSa.UseVisualStyleBackColor = false; this.btnSetSubSa.UseVisualStyleBackColor = false;
@@ -427,7 +448,7 @@
this.btnAdd.Location = new System.Drawing.Point(1341, 14); this.btnAdd.Location = new System.Drawing.Point(1341, 14);
this.btnAdd.Margin = new System.Windows.Forms.Padding(2); this.btnAdd.Margin = new System.Windows.Forms.Padding(2);
this.btnAdd.Name = "btnAdd"; this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(91, 26); this.btnAdd.Size = new System.Drawing.Size(90, 26);
this.btnAdd.TabIndex = 444; this.btnAdd.TabIndex = 444;
this.btnAdd.Text = "一键上传草稿"; this.btnAdd.Text = "一键上传草稿";
this.btnAdd.UseVisualStyleBackColor = false; this.btnAdd.UseVisualStyleBackColor = false;
@@ -618,6 +639,8 @@
// //
// colProductName // colProductName
// //
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle3;
this.colProductName.HeaderText = "商品标题"; this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName"; this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true; this.colProductName.ReadOnly = true;
@@ -676,6 +699,8 @@
// //
// colNotes // colNotes
// //
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNotes.DefaultCellStyle = dataGridViewCellStyle4;
this.colNotes.HeaderText = "备注"; this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes"; this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true; this.colNotes.ReadOnly = true;
@@ -785,6 +810,8 @@
private UserControls.ButtonEx btnSetSubSa; private UserControls.ButtonEx btnSetSubSa;
private UserComponent.UcCheckBox chkNoSubSa; private UserComponent.UcCheckBox chkNoSubSa;
private UserComponent.DataGridViewEx dgvSelectProduct; private UserComponent.DataGridViewEx dgvSelectProduct;
private UserComponent.UcCheckBox chkShowDel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -809,7 +836,6 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes; private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn colDelete; private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chkShowDel; private UserControls.ButtonEx btnReFission;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
} }
} }
@@ -44,6 +44,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
chkShowDel.Visible = false; chkShowDel.Visible = false;
btnSetSubSa.Visible = false; btnSetSubSa.Visible = false;
chkNoSubSa.Visible = false; chkNoSubSa.Visible = false;
btnReFission.Visible = false;
if (BaseClass.SaLevel == 1) if (BaseClass.SaLevel == 1)
{ {
@@ -51,6 +52,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
chkShowDel.Visible = true; chkShowDel.Visible = true;
btnSetSubSa.Visible = true; btnSetSubSa.Visible = true;
chkNoSubSa.Visible = true; chkNoSubSa.Visible = true;
btnReFission.Visible = true;
} }
} }
@@ -128,7 +130,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.skc_id, prodSelect.skc_id,
prodSelect.main_img.Replace("https:","http:"), prodSelect.main_img.Replace("https:","http:"),
defaultBitmap,//prod.main_img, defaultBitmap,//prod.main_img,
prodSelect.product_name, prodSelect.fission_product_name,
prodSelect.cat_name, prodSelect.cat_name,
prodSelect.ext_code, prodSelect.ext_code,
prodSelect.status, prodSelect.status,
@@ -289,6 +291,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
ProductSelectEditNotesForm editForm = new ProductSelectEditNotesForm(dbSelectProduct); ProductSelectEditNotesForm editForm = new ProductSelectEditNotesForm(dbSelectProduct);
editForm.ShowDialog(); editForm.ShowDialog();
dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes; dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes;
dgvSelectProduct.Rows[e.RowIndex].Cells["colProductName"].Value = dbSelectProduct.fission_product_name;
break; break;
case "认领": case "认领":
//Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); }); //Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
@@ -535,7 +538,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var result = ""; var result = "";
try try
{ {
result = UploadProduct(shop, temuDBProd); //将商品上传至草稿箱 result = UploadProduct(shop, temuDBProd, prod); //将商品上传至草稿箱
if (result.Contains("登录过期")) if (result.Contains("登录过期"))
{ {
@@ -653,7 +656,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
return list.FirstOrDefault(); return list.FirstOrDefault();
} }
public TemuDBProduct GetProductDetail(string prodDbId) public static TemuDBProduct GetProductDetail(string prodDbId)
{ {
if (string.IsNullOrEmpty(prodDbId)) if (string.IsNullOrEmpty(prodDbId))
return new TemuDBProduct(); return new TemuDBProduct();
@@ -694,7 +697,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
} }
} }
string UploadProduct(ShopLoginInfo shop, TemuDBProduct dbProd) string UploadProduct(ShopLoginInfo shop, TemuDBProduct dbProd, TemuDBProductSelect selectProd)
{ {
if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功") if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功")
{ {
@@ -768,7 +771,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodParam.productDraftId = 0; prodParam.productDraftId = 0;
prodParam.productGuideFileI18nReqs = prodInfo.productGuideFileI18nList; prodParam.productGuideFileI18nReqs = prodInfo.productGuideFileI18nList;
prodParam.productGuideFileNewReqList = prodInfo.productGuideFileNewVOList; prodParam.productGuideFileNewReqList = prodInfo.productGuideFileNewVOList;
prodParam.productName = prodInfo.productName; //prodParam.productName = prodInfo.productName;
prodParam.productName = selectProd.fission_product_name;
prodParam.productNonAuditExtAttrReq = new ProductNonAuditExtAttrReq() prodParam.productNonAuditExtAttrReq = new ProductNonAuditExtAttrReq()
{ {
california65WarningInfoReq = new California65WarningInfoReq() california65WarningInfoReq = new California65WarningInfoReq()
@@ -1129,5 +1133,140 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
dgvSelectProduct.Columns["colDelete"].Visible = this.chkShowDel.Checked; dgvSelectProduct.Columns["colDelete"].Visible = this.chkShowDel.Checked;
} }
private void btnReFission_Click(object sender, EventArgs e)
{
var lstProdId = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colSelectId"]?.Value.ToString()).ToList();
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
if (prodList.Count() > 0)
{
this.btnAdd.Enabled = false;
Task.Run(() =>
{
ReFissionProdSelect(prodList);
Invoke(new Action(() =>
{
this.btnAdd.Enabled = true;
}));
});
}
else
{
BaseMsgForm.ShowError("请选择要重组标题的商品!");
}
}
void ReFissionProdSelect(TemuDBProductSelect[] prodSelect)
{
if (prodSelect == null || prodSelect.Count() == 0)
{
BaseMsgForm.ShowError("标题重组的内容不能为空!");
return;
}
Invoke(new Action(() =>
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在重组标题...";
this.statusBar.pgbTaskProgress.Maximum = prodSelect.Length;
this.statusBar.UpdateProgressBar(0);
}));
foreach (var prod in prodSelect)
{
Invoke(new Action(() =>
{
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
}));
if (prod == null)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("商品为空,将为您跳过该商品!");
}));
continue;
}
var row = dgvSelectProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r =>
r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString());
if (row == null)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("商品已被清除,跳过该商品!");
}));
continue;
}
var shop = shopLst.FirstOrDefault(s => s.ShopId == prod.shop_id);
var temuDBProd = GetProductDetail(prod.out_product_Id.ToString());
if (temuDBProd == null || temuDBProd.id == 0)
{
if (temuDBProd?.id == 0)
{
prod.status = "已清除";
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "选品数据库商品已被清除";
if (temuDBProd?.id == 0)
row.Cells["colStatus"].Value = "已清除";
}));
continue;
}
var fissionProductName = DbProductListForm.GetFissionProductName(temuDBProd);
prod.fission_product_name = fissionProductName;
var url = "";
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id;
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.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"))
{
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "标题重组失败," + BaseRegex.GetStringJson(ref html, "msg");
}));
}
else
{
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "标题重组成功";
row.Cells["colProductName"].Value = fissionProductName;
}));
}
Thread.Sleep(50);
}
Invoke(new Action(() =>
{
BaseMsgForm.ShowInfo("标题重组完成!");
}));
Invoke(new Action(() =>
{
this.pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "标题重组完成";
this.statusBar.UpdateProgressBar(prodSelect.Length);
}));
}
} }
} }
@@ -30,6 +30,12 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductSelectEditNotesForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductSelectEditNotesForm));
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.lblTextCount = new System.Windows.Forms.Label();
this.txtSkc = new System.Windows.Forms.TextBox();
this.txtSpu = new System.Windows.Forms.TextBox();
this.txtProdName = new System.Windows.Forms.TextBox();
this.txtShopName = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
@@ -37,11 +43,7 @@
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnOk = new TemuKJD.UserControls.ButtonEx(); this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.label4 = new System.Windows.Forms.Label(); this.btnFission = new DevComponents.DotNetBar.PanelEx();
this.txtShopName = new System.Windows.Forms.TextBox();
this.txtProdName = new System.Windows.Forms.TextBox();
this.txtSpu = new System.Windows.Forms.TextBox();
this.txtSkc = new System.Windows.Forms.TextBox();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@@ -49,6 +51,8 @@
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.White; this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.btnFission);
this.panel2.Controls.Add(this.lblTextCount);
this.panel2.Controls.Add(this.txtSkc); this.panel2.Controls.Add(this.txtSkc);
this.panel2.Controls.Add(this.txtSpu); this.panel2.Controls.Add(this.txtSpu);
this.panel2.Controls.Add(this.txtProdName); this.panel2.Controls.Add(this.txtProdName);
@@ -64,9 +68,71 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33); this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(365, 477); this.panel2.Size = new System.Drawing.Size(391, 546);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// lblTextCount
//
this.lblTextCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblTextCount.Location = new System.Drawing.Point(247, 160);
this.lblTextCount.Name = "lblTextCount";
this.lblTextCount.Size = new System.Drawing.Size(106, 17);
this.lblTextCount.TabIndex = 399;
this.lblTextCount.Text = "label5";
this.lblTextCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSkc
//
this.txtSkc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSkc.Location = new System.Drawing.Point(90, 365);
this.txtSkc.Name = "txtSkc";
this.txtSkc.ReadOnly = true;
this.txtSkc.Size = new System.Drawing.Size(265, 23);
this.txtSkc.TabIndex = 398;
//
// txtSpu
//
this.txtSpu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSpu.Location = new System.Drawing.Point(90, 332);
this.txtSpu.Name = "txtSpu";
this.txtSpu.ReadOnly = true;
this.txtSpu.Size = new System.Drawing.Size(265, 23);
this.txtSpu.TabIndex = 397;
//
// txtProdName
//
this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtProdName.Location = new System.Drawing.Point(90, 180);
this.txtProdName.Multiline = true;
this.txtProdName.Name = "txtProdName";
this.txtProdName.ReadOnly = true;
this.txtProdName.Size = new System.Drawing.Size(265, 142);
this.txtProdName.TabIndex = 396;
this.txtProdName.TextChanged += new System.EventHandler(this.txtProdName_TextChanged);
//
// txtShopName
//
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopName.Location = new System.Drawing.Point(90, 398);
this.txtShopName.Name = "txtShopName";
this.txtShopName.ReadOnly = true;
this.txtShopName.Size = new System.Drawing.Size(265, 23);
this.txtShopName.TabIndex = 395;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 401);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 394;
this.label4.Text = "上传店铺";
//
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
@@ -79,7 +145,7 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 249); this.label2.Location = new System.Drawing.Point(27, 368);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17); this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 391; this.label2.TabIndex = 391;
@@ -88,7 +154,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(27, 216); this.label1.Location = new System.Drawing.Point(27, 335);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17); this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 390; this.label1.TabIndex = 390;
@@ -97,7 +163,7 @@
// pictureBox1 // pictureBox1
// //
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pictureBox1.Location = new System.Drawing.Point(115, 22); this.pictureBox1.Location = new System.Drawing.Point(128, 22);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(136, 136); this.pictureBox1.Size = new System.Drawing.Size(136, 136);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -107,7 +173,7 @@
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(28, 314); this.label8.Location = new System.Drawing.Point(28, 433);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17); this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386; this.label8.TabIndex = 386;
@@ -115,6 +181,8 @@
// //
// txtNotes // txtNotes
// //
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
// //
// //
// //
@@ -128,20 +196,21 @@
this.txtNotes.Border.PaddingLeft = 2; this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2; this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2; this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(90, 312); this.txtNotes.Location = new System.Drawing.Point(90, 431);
this.txtNotes.Multiline = true; this.txtNotes.Multiline = true;
this.txtNotes.Name = "txtNotes"; this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(239, 94); this.txtNotes.Size = new System.Drawing.Size(265, 44);
this.txtNotes.TabIndex = 385; this.txtNotes.TabIndex = 385;
// //
// btnOk // btnOk
// //
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White; this.btnOk.ForeColor = System.Drawing.Color.White;
this.btnOk.Location = new System.Drawing.Point(274, 416); this.btnOk.Location = new System.Drawing.Point(300, 483);
this.btnOk.Margin = new System.Windows.Forms.Padding(2); this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk"; this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26); this.btnOk.Size = new System.Drawing.Size(55, 26);
@@ -150,51 +219,35 @@
this.btnOk.UseVisualStyleBackColor = false; this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click); this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
// //
// label4 // btnFission
// //
this.label4.AutoSize = true; this.btnFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.Location = new System.Drawing.Point(27, 282); this.btnFission.CanvasColor = System.Drawing.SystemColors.Control;
this.label4.Name = "label4"; this.btnFission.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.label4.Size = new System.Drawing.Size(56, 17); this.btnFission.DisabledBackColor = System.Drawing.Color.Empty;
this.label4.TabIndex = 394; this.btnFission.Location = new System.Drawing.Point(90, 483);
this.label4.Text = "上传店铺"; this.btnFission.Name = "btnFission";
// this.btnFission.Size = new System.Drawing.Size(56, 26);
// textBox1 this.btnFission.Style.Alignment = System.Drawing.StringAlignment.Center;
// this.btnFission.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.txtShopName.Location = new System.Drawing.Point(90, 279); this.btnFission.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.txtShopName.Name = "textBox1"; this.btnFission.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.txtShopName.ReadOnly = true; this.btnFission.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.txtShopName.Size = new System.Drawing.Size(239, 23); this.btnFission.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.txtShopName.TabIndex = 395; this.btnFission.Style.GradientAngle = 90;
// this.btnFission.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
// txtProdName this.btnFission.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
// this.btnFission.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.txtProdName.Location = new System.Drawing.Point(90, 180); this.btnFission.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.txtProdName.Name = "txtProdName"; this.btnFission.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.txtProdName.ReadOnly = true; this.btnFission.TabIndex = 435;
this.txtProdName.Size = new System.Drawing.Size(239, 23); this.btnFission.Text = "裂变标题";
this.txtProdName.TabIndex = 396; this.btnFission.Click += new System.EventHandler(this.btnFission_Click);
//
// txtSpu
//
this.txtSpu.Location = new System.Drawing.Point(90, 213);
this.txtSpu.Name = "txtSpu";
this.txtSpu.ReadOnly = true;
this.txtSpu.Size = new System.Drawing.Size(239, 23);
this.txtSpu.TabIndex = 397;
//
// txtSkc
//
this.txtSkc.Location = new System.Drawing.Point(90, 246);
this.txtSkc.Name = "txtSkc";
this.txtSkc.ReadOnly = true;
this.txtSkc.Size = new System.Drawing.Size(239, 23);
this.txtSkc.TabIndex = 398;
// //
// ProductSelectEditNotesForm // ProductSelectEditNotesForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(367, 511); this.ClientSize = new System.Drawing.Size(393, 580);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -225,5 +278,7 @@
private System.Windows.Forms.TextBox txtSpu; private System.Windows.Forms.TextBox txtSpu;
private System.Windows.Forms.TextBox txtProdName; private System.Windows.Forms.TextBox txtProdName;
private System.Windows.Forms.TextBox txtShopName; private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label lblTextCount;
private DevComponents.DotNetBar.PanelEx btnFission;
} }
} }
@@ -22,27 +22,40 @@ namespace TemuKJD.KJDForms.ProductSelectForms
} }
public partial class ProductSelectEditNotesForm : LRBaseForm public partial class ProductSelectEditNotesForm : LRBaseForm
{ {
TemuDBProductSelect dbProd = null; TemuDBProductSelect dbProdSelect = null;
SetProductSelectNotesType selectNotesType; SetProductSelectNotesType selectNotesType;
public ProductSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectNotesType notesType= SetProductSelectNotesType.DbProduct) public ProductSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectNotesType notesType= SetProductSelectNotesType.DbProduct)
{ {
InitializeComponent(); InitializeComponent();
dbProd = prod; dbProdSelect = prod;
selectNotesType = notesType; selectNotesType = notesType;
} }
private void ProductSelectListForm_Load(object sender, EventArgs e) private void ProductSelectListForm_Load(object sender, EventArgs e)
{ {
if (dbProd != null) if (dbProdSelect != null)
{ {
txtProdName.Text = dbProd.product_name; txtProdName.Text = dbProdSelect.fission_product_name;
txtSkc.Text = dbProd.skc_id; txtSkc.Text = dbProdSelect.skc_id;
txtSpu.Text = dbProd.spu_id; txtSpu.Text = dbProdSelect.spu_id;
txtShopName.Text = dbProd.shop_account; txtShopName.Text = dbProdSelect.shop_account;
this.pictureBox1.ImageLocation = dbProd.main_img.Replace("https", "http"); this.pictureBox1.ImageLocation = dbProdSelect.main_img.Replace("https", "http");
this.txtNotes.Text = dbProd.notes; this.txtNotes.Text = dbProdSelect.notes;
}
if (selectNotesType == SetProductSelectNotesType.DbProduct)
{
this.txtProdName.ReadOnly = false;
this.lblTextCount.Visible = true;
this.btnFission.Visible = true;
}
else
{
this.txtProdName.ReadOnly = true;
this.lblTextCount.Visible = false;
this.btnFission.Visible = false;
} }
} }
@@ -54,7 +67,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
else else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes"); url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() + var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProd.id + "&notes=" + this.txtNotes.Text.Trim(); "&db_id=" + dbProdSelect.id + "&notes=" + this.txtNotes.Text.Trim();
if (selectNotesType == SetProductSelectNotesType.DbProduct)
{
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(txtProdName.Text.Trim());
if (bytes.Length > 250)
{
BaseMsgForm.ShowError("商品标题不能大于250个字符!");
return;
}
data += "&fission_product_name=" + txtProdName.Text.Trim();
}
var html = GetHtml.PostUtf8(url, data); var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data); html = GetHtml.PostUtf8(url, data);
@@ -66,7 +89,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
} }
else else
{ {
dbProd.notes = this.txtNotes.Text.Trim(); dbProdSelect.notes = this.txtNotes.Text.Trim();
if (selectNotesType == SetProductSelectNotesType.DbProduct)
{
dbProdSelect.fission_product_name = this.txtProdName.Text.Trim();
}
this.Close(); this.Close();
} }
} }
@@ -75,5 +102,27 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
} }
private void txtProdName_TextChanged(object sender, EventArgs e)
{
var textNumber = Encoding.GetEncoding("gb2312").GetBytes(txtProdName.Text.Trim()).Length;
lblTextCount.Text = "" + textNumber + "/250";
if (textNumber > 250)
lblTextCount.ForeColor = Color.Red;
else
lblTextCount.ForeColor = Color.Gray;
}
private void btnFission_Click(object sender, EventArgs e)
{
var temuDBProd = DbProductSelectListManageForm.GetProductDetail(dbProdSelect.out_product_Id.ToString());
if (temuDBProd == null || temuDBProd.id == 0)
{
BaseMsgForm.ShowError("商品已清除!");
return;
}
this.txtProdName.Text = DbProductListForm.GetFissionProductName(temuDBProd);
}
} }
} }
@@ -243,7 +243,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
"",//prodSelect.spu_id, "",//prodSelect.spu_id,
"",//prodSelect.skc_id, "",//prodSelect.skc_id,
image,//prod.main_img, image,//prod.main_img,
prodSelect.product_name, prodSelect.product_name, // 用户端显示商品原名
prodSelect.cat_name, prodSelect.cat_name,
prodSelect.ext_code, prodSelect.ext_code,
prodSelect.status, prodSelect.status,
@@ -31,6 +31,8 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = 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 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -126,11 +128,11 @@
// //
this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkShowDel.AutoSize = true; this.chkShowDel.AutoSize = true;
this.chkShowDel.Location = new System.Drawing.Point(1081, 17); this.chkShowDel.Location = new System.Drawing.Point(1044, 17);
this.chkShowDel.Name = "chkShowDel"; this.chkShowDel.Name = "chkShowDel";
this.chkShowDel.Size = new System.Drawing.Size(123, 21); this.chkShowDel.Size = new System.Drawing.Size(99, 21);
this.chkShowDel.TabIndex = 471; this.chkShowDel.TabIndex = 471;
this.chkShowDel.Text = "显示删除功能按钮"; this.chkShowDel.Text = "显示删除功能";
this.chkShowDel.UseVisualStyleBackColor = true; this.chkShowDel.UseVisualStyleBackColor = true;
this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged); this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged);
// //
@@ -392,11 +394,11 @@
// //
this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkNoSubSa.AutoSize = true; this.chkNoSubSa.AutoSize = true;
this.chkNoSubSa.Location = new System.Drawing.Point(958, 17); this.chkNoSubSa.Location = new System.Drawing.Point(950, 17);
this.chkNoSubSa.Name = "chkNoSubSa"; this.chkNoSubSa.Name = "chkNoSubSa";
this.chkNoSubSa.Size = new System.Drawing.Size(123, 21); this.chkNoSubSa.Size = new System.Drawing.Size(99, 21);
this.chkNoSubSa.TabIndex = 470; this.chkNoSubSa.TabIndex = 470;
this.chkNoSubSa.Text = "仅显示未分配超管"; this.chkNoSubSa.Text = "仅未分配超管";
this.chkNoSubSa.UseVisualStyleBackColor = true; this.chkNoSubSa.UseVisualStyleBackColor = true;
// //
// btnSetSubSa // btnSetSubSa
@@ -618,6 +620,8 @@
// //
// colProductName // colProductName
// //
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle3;
this.colProductName.HeaderText = "商品标题"; this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName"; this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true; this.colProductName.ReadOnly = true;
@@ -676,6 +680,8 @@
// //
// colNotes // colNotes
// //
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNotes.DefaultCellStyle = dataGridViewCellStyle4;
this.colNotes.HeaderText = "备注"; this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes"; this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true; this.colNotes.ReadOnly = true;
@@ -767,6 +773,27 @@
private UserControls.StatusBarUserControl statusBar; private UserControls.StatusBarUserControl statusBar;
private UserControls.ButtonEx btnSetSubSa; private UserControls.ButtonEx btnSetSubSa;
private UserComponent.DataGridViewEx dgvSelectProduct; private UserComponent.DataGridViewEx dgvSelectProduct;
private UserComponent.UcCheckBox chkShowDel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.ComboBox cmbStatus;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label label5;
private UserControls.ButtonEx btnSearch;
private System.Windows.Forms.TextBox txtSKC;
private System.Windows.Forms.TextBox txtSPU;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtCat;
private System.Windows.Forms.TextBox txtExtCode;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtProdName;
private UserComponent.UcCheckBox chkNoSubSa;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -791,26 +818,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes; private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn ColDelete; private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chkShowDel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.ComboBox cmbStatus;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label label5;
private UserControls.ButtonEx btnSearch;
private System.Windows.Forms.TextBox txtSKC;
private System.Windows.Forms.TextBox txtSPU;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtCat;
private System.Windows.Forms.TextBox txtExtCode;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtProdName;
private UserComponent.UcCheckBox chkNoSubSa;
} }
} }
+1 -1
View File
@@ -183,7 +183,7 @@ namespace TemuKJD.KJDForms.ShopForms
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group"); shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group");
shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie"); shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie");
shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+"); shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+");
shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2"); shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2").ParseToString();
shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+"); shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+");
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name"); shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes"); shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
+8 -8
View File
@@ -183,19 +183,19 @@ namespace TemuKJD.KJDForms.ShopForms
} }
StartUp.SaveLocalShopLoginInfo(); // 店铺保存到本地 StartUp.SaveLocalShopLoginInfo(); // 店铺保存到本地
ShopListForm.UpdateServerShopCookies(shop, shop.Cookies); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie ShopListForm.UpdateServerShopCookies(shop, shop.Cookies); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
//OnSaveComplete(shop); OnSaveComplete(shop);
//if (this.Created && this.chkCloseAfterLogin.Checked) if (this.Created && this.chkCloseAfterLogin.Checked)
//{ {
// Invoke(new Action(() => { this.Close(); })); Invoke(new Action(() => { this.Close(); }));
//} }
//else else
// break; break;
} }
//cefWebBrowser.Load(shopMainUrl2); //cefWebBrowser.Load(shopMainUrl2);
} }
if (this.shop != null && currentUrl.TrimEnd('/') == shopMainUrl2) if (1 == 2 && this.shop != null && currentUrl.TrimEnd('/') == shopMainUrl2)
{//https://agentseller.temu.com {//https://agentseller.temu.com
if (!cefWebBrowser.GetBrowser().MainFrame.IsValid) if (!cefWebBrowser.GetBrowser().MainFrame.IsValid)
continue; continue;
+21 -2
View File
@@ -35,12 +35,14 @@
this.txtLoginName = new System.Windows.Forms.TextBox(); this.txtLoginName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx(); this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.buttonEx1 = new TemuKJD.UserControls.ButtonEx();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.White; this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.buttonEx1);
this.panel2.Controls.Add(this.label8); this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.txtCookieJs); this.panel2.Controls.Add(this.txtCookieJs);
this.panel2.Controls.Add(this.txtLoginName); this.panel2.Controls.Add(this.txtLoginName);
@@ -61,7 +63,7 @@
this.label8.TabIndex = 386; this.label8.TabIndex = 386;
this.label8.Text = "CookieJs"; this.label8.Text = "CookieJs";
// //
// txtNotes // txtCookieJs
// //
// //
// //
@@ -78,7 +80,7 @@
this.txtCookieJs.Border.PaddingTop = 2; this.txtCookieJs.Border.PaddingTop = 2;
this.txtCookieJs.Location = new System.Drawing.Point(91, 58); this.txtCookieJs.Location = new System.Drawing.Point(91, 58);
this.txtCookieJs.Multiline = true; this.txtCookieJs.Multiline = true;
this.txtCookieJs.Name = "txtNotes"; this.txtCookieJs.Name = "txtCookieJs";
this.txtCookieJs.Size = new System.Drawing.Size(452, 370); this.txtCookieJs.Size = new System.Drawing.Size(452, 370);
this.txtCookieJs.TabIndex = 385; this.txtCookieJs.TabIndex = 385;
// //
@@ -114,6 +116,22 @@
this.btnOk.UseVisualStyleBackColor = false; this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click); this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
// //
// buttonEx1
//
this.buttonEx1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.buttonEx1.Cursor = System.Windows.Forms.Cursors.Hand;
this.buttonEx1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonEx1.ForeColor = System.Drawing.Color.White;
this.buttonEx1.Location = new System.Drawing.Point(91, 443);
this.buttonEx1.Margin = new System.Windows.Forms.Padding(2);
this.buttonEx1.Name = "buttonEx1";
this.buttonEx1.Size = new System.Drawing.Size(171, 26);
this.buttonEx1.TabIndex = 387;
this.buttonEx1.Text = "去Temu首页获取cookie js";
this.buttonEx1.UseVisualStyleBackColor = false;
this.buttonEx1.Click += new System.EventHandler(this.btnGetCookie_Click);
//
// ShopUpdateCookieForm // ShopUpdateCookieForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -140,5 +158,6 @@
private UserControls.ButtonEx btnOk; private UserControls.ButtonEx btnOk;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.Controls.TextBoxX txtCookieJs; private DevComponents.DotNetBar.Controls.TextBoxX txtCookieJs;
private UserControls.ButtonEx buttonEx1;
} }
} }
@@ -262,5 +262,23 @@ namespace TemuKJD.KJDForms.ShopForms
} }
return "success"; return "success";
} }
private void btnGetCookie_Click(object sender, EventArgs e)
{
//复制cookie
var cookJs = @"
document.body.innerHTML = '<button id=""button1"" onclick=""geCookie();"" style=""margin:10px;"">点击我复制cookie</button>' + document.body.innerHTML;
function geCookie()
{
var cookieText = document.cookie;
navigator.clipboard.writeText(cookieText).then(function() {
alert('复制cookie成功!');
}, function(err) {
alert('复制cookie失败: ', err);
});
}";
Clipboard.SetDataObject(cookJs);
BaseMsgForm.ShowInfo("js复制成功");
}
} }
} }