1temu用户选择商品三个表及数据库id映射draftid分表操作 2拼多多读取商品显示总数 3temu可以修改单店备注

This commit is contained in:
wule committed 2025-12-19 19:47:53 +08:00
1 parent a61b8786d1
commit 4fd2a4d579
47 files changed
+2146 -1042

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 725;
public static int VersionCount = 750;
//public static int VersionCount = 613;
/// <summary>
+3 -3
View File
@@ -8,8 +8,8 @@ namespace AllBase.Model.Result
{
public class DBProdDbIdMapProductIdInfo
{
public int id { get; set; }
public int product_select_db_id { get; set; }
public long id { get; set; }
public long product_select_db_id { get; set; }
public long product_id { get; set; }
public long shop_id { get; set; }
public DateTime add_time { get; set; }
@@ -17,7 +17,7 @@ namespace AllBase.Model.Result
public class DBProdDraftIdMapUpSpuIdInfo
{
public int id { get; set; }
public long id { get; set; }
public long draft_id { get; set; }
public long from_spu_id { get; set; }
public long shop_id { get; set; }
+1 -1
View File
@@ -11,7 +11,7 @@ namespace AllBase.Model.Result
/// </summary>
public class TemuDBProductSelect
{
public int id { get; set; }
public long id { get; set; }
public string out_product_Id { get; set; }
public string shop_id { get; set; }
public string shop_account { get; set; }
@@ -154,7 +154,7 @@ namespace KJD_Web.BLL.BXX
var shopMonthList = shopList.Where(s => s.add_product_month != month);
if (shopMonthList.Count() > 0)
{
int remainCount = 100;
int remainCount = 300;
var shopMonthIdList = shopMonthList.Select(s => s.id);
mySql = new MysqlUtils(conn);
string ids = string.Join(",", shopMonthIdList);
@@ -332,7 +332,7 @@ namespace KJD_Web.BLL.BXX
var shopMonthList = shopList.Where(s => s.add_product_month != month);
if (shopMonthList.Count() > 0)
{
int remainCount = 100;
int remainCount = 300;
var shopMonthIdList = shopMonthList.Select(s => s.id);
mySql = new MysqlUtils(conn);
string ids = string.Join(",", shopMonthIdList);
+333 -130
View File
@@ -2,6 +2,7 @@
using KJD_Web.Utils;
using MySql.Data.MySqlClient;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -156,7 +157,7 @@ namespace KJD_Web.BLL
var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'");
var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'");
var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(product_get_type))
if (string.IsNullOrEmpty(product_get_type)) // 母店采集0或前端直采1
product_get_type = "0";
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
@@ -206,12 +207,24 @@ namespace KJD_Web.BLL
" FROM kjd.product p" +
" WHERE p.is_del=0";
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,p.group," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type," +
"p.cost_price,delivery_fee,p.mark_fee" +
",COUNT(s.id) AS select_count" +
" FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "'" +
" FROM kjd.product p" +
" LEFT JOIN (" +
" SELECT id,out_product_id,shop_id FROM kjd.product_select WHERE shop_id='" + select_shop_id + "'";
for (int year = Math.Max(2026, DateTime.Now.AddYears(-3).Year); year <= DateTime.Now.Year; year++)
{
sql += "UNION ALL SELECT id,out_product_id,shop_id FROM kjd_yearly.product_select_" + year + " WHERE shop_id='" + select_shop_id + "'";
}
sql += ") s" +
" ON s.out_product_id=p.id AND s.shop_id='" + select_shop_id + "'" +
" WHERE p.is_del=0";
}
//sql += "select * from " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i];
if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制
sql += " AND p.product_get_type=" + product_get_type;
@@ -224,7 +237,7 @@ namespace KJD_Web.BLL
if (sort_field == "select_total_count")
sql += " ORDER BY p.select_total_count desc, p.id desc";
else
sql += " ORDER BY p.id desc";
sql += " ORDER BY p.add_time desc";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -463,29 +476,38 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有店铺信息\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
{
tableName = "kjd.jit_product_select";
}
DateTime addTime = DateTime.Now;
string addTimeStr = addTime.ToString("yyyy-MM-dd HH:mm:ss");
string dbName = "kjd";
if (addTime.Year >= 2026)
dbName = "kjd_yearly";
bool is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (addTime.Year >= 2026)
tableName += "_" + addTime.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "insert into " + tableName +
" (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,fission_product_name,add_time,mdy_time) values" +
string sql = "INSERT INTO " + tableName +
" (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,fission_product_name,add_time,mdy_time) VALUES" +
" ('" + 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") + "');";
addTimeStr + "','" +
addTimeStr + "');";
if (add_product_remaining > 0)
{
add_product_remaining = add_product_remaining - 1;
sql += "\r\n";
sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id='" + shop_id + "';";
sql += "update kjd.product set select_total_count=select_total_count+1 where id=" + out_product_Id + ";";
//sql += "update kjd.shop_add_prod_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";";
sql += "UPDATE kjd.shop SET add_product_remaining=" + add_product_remaining + " WHERE shop_id='" + shop_id + "';";
sql += "UPDATE kjd.product SET select_total_count=select_total_count+1 WHERE id=" + out_product_Id + ";";
sql += "INSERT INTO kjd.shop_add_prod_count(shop_id, add_product_remaining) VALUES('" + shop_id + "'," + add_product_remaining + ")" +
"ON DUPLICATE KEY UPDATE add_product_remaining=VALUES(add_product_remaining)";
"ON DUPLICATE KEY UPDATE add_product_remaining=add_product_remaining-1";
}
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
@@ -510,46 +532,73 @@ namespace KJD_Web.BLL
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var select_db_id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'");
var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'");
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
tableName = "kjd.jit_product_select";
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
long l_draft_id = draft_id.ParseToLong();
long l_spu_map_table_id = l_draft_id % 128;
long l_select_map_table_id = id.ParseToLong() % 64;
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
// 使用事务一次提交多个sql操作
//sql += "set @@autocommit=0;\r\n";
sql += "START TRANSACTION;\r\n";
if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id))
{
sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id +
" (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n";
if (is_client_jit)
sql += "INSERT INTO kjd_map.spu_map_" + l_spu_map_table_id +
" (draft_id,from_spu_id,shop_id) VALUES(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n";
if (!select_add_time.HasValue || select_add_time.Value.Year < 2026)
{
sql += "insert into kjd_map.jit_product_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n";
if (!is_client_jit)
{
sql += "INSERT INTO kjd_map.product_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) VALUES(" + draft_id + "," + select_db_id + ",'" + shop_id + "');\r\n";
}
else
{
sql += "INSERT INTO kjd_map.jit_product_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) VALUES(" + draft_id + "," + select_db_id + ",'" + shop_id + "');\r\n";
}
}
else
else //(select_add_time.HasValue && select_add_time.Value.Year >= 2026)
{
sql += "insert into kjd_map.product_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n";
string select_type;
if (!is_client_jit)
select_type = "normal";
else
select_type = "jit";
sql += "INSERT INTO kjd_map_yearly.product_select_map_" + select_add_time.Value.Year +
"(product_select_db_id,product_id,shop_id,select_type) VALUES" +
"(" + select_db_id + ",'" + draft_id + "','" + shop_id + "','" + select_type + "');\r\n";
}
}
sql += "update " + tableName + " set";
string dbName = "kjd";
if (select_add_time.HasValue && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (select_add_time.HasValue && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
sql += "update " + tableName + " set";
if (draft_id != null)
sql += " draft_id='" + draft_id + "',";
if (status != null)
@@ -558,7 +607,7 @@ namespace KJD_Web.BLL
sql += " add_times=add_times+1,";
sql += " mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + ";\r\n";
sql += " WHERE id=" + select_db_id + ";\r\n";
var rst = mySql.ExecuteNonQuery(sql);
string errMsg = mySql.Message;
if (string.IsNullOrEmpty(errMsg))
@@ -609,77 +658,97 @@ namespace KJD_Web.BLL
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
var search_end_time = RegexUtils.GetStringJson(ref inputData, "search_end_time")?.ParseToDateTimeNullable();
if (search_end_time == null || search_end_time.Value > DateTime.Now.Date.AddDays(1)) search_end_time = DateTime.Now.Date.AddDays(1);
var search_start_time = RegexUtils.GetStringJson(ref inputData, "search_start_time")?.ParseToDateTimeNullable();
if (search_start_time == null || search_start_time.Value >= search_end_time.Value) search_start_time = search_end_time.Value.AddMonths(-6);
int startTableId = Math.Max(2025, search_start_time.Value.Year);
int endTableId = Math.Max(2025, search_end_time.Value.Year);
var no_sub_sa = RegexUtils.GetStringQuery(ref inputData, "no_sub_sa")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
{
tableName = "kjd.jit_product_select";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(s.id) from " + tableName + " s " +
"left join kjd.product p on s.out_product_id=p.id " +
"left join kjd.user u on s.operate_sub_sa_name=u.user_name " +
"where 1=1";
string sql = "SELECT count(s.id) from (";
for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (year >= 2026)
tableName += "_" + year;
if (year > search_start_time.Value.Year)
sql += " UNION ALL";
sql += " SELECT * FROM " + tableName;
}
sql += ") s " +
"LEFT JOIN kjd.product p ON s.out_product_id=p.id " +
"LEFT JOIN kjd.user u ON s.operate_sub_sa_name=u.user_name " +
"WHERE s.add_time BETWEEN '" + search_start_time.Value.ToString("yyyy-MM-dd") + "' AND '" + search_end_time.Value.ToString("yyyy-MM-dd") + "' ";
string where = "";
if (!isAdmin || is_client_jit)
where += " and (s.user_name='" + user_name + "' or s.sub_user_name like'%" + user_name + "%')";
where += " AND (s.user_name='" + user_name + "' or s.sub_user_name='" + user_name + "')";
if (!string.IsNullOrEmpty(operate_sub_sa_name))
{
where += " and s.operate_sub_sa_name = '" + operate_sub_sa_name + "'";
where += " AND s.operate_sub_sa_name = '" + operate_sub_sa_name + "'";
}
if (no_sub_sa == "true")
where += " and s.operate_sub_sa_name is null";
where += " AND s.operate_sub_sa_name IS null";
if (!string.IsNullOrEmpty(search_db_ids))
where += " and s.id in (" + search_db_ids + ")";
where += " AND s.id IN (" + search_db_ids + ")";
if (!string.IsNullOrEmpty(shop_ids))
where += " and s.shop_id in (" + shop_ids + ")";
where += " AND s.shop_id IN ('" + string.Join("','", shop_ids.Split(new char[] { '\"', '\'', ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)) + "')";
if (!string.IsNullOrWhiteSpace(status))
where += " and s.status = '" + status + "'";
where += " AND s.status = '" + status + "'";
if (!string.IsNullOrWhiteSpace(search_shop_id))
where += " and s.shop_id like '%" + search_shop_id + "%'";
where += " AND s.shop_id LIKE '%" + search_shop_id + "%'";
if (!string.IsNullOrWhiteSpace(search_shop_account))
where += " and s.shop_account like '%" + search_shop_account + "%'";
where += " AND s.shop_account LIKE '%" + search_shop_account + "%'";
if (!string.IsNullOrWhiteSpace(search_notes))
{
//核价成功 重复 核价成功(重复)
if (search_notes == "无备注")
where += " and s.notes = ''";
where += " AND s.notes = ''";
else if (search_notes == "重复")
where += " and s.notes like '%重复%' and s.notes not like '%核价成功%' and s.notes not like '%核价通过%'";
where += " AND s.notes LIKE '重复%' AND s.notes NOT LIKE '核价成功%' AND s.notes not LIKE '核价通过%'";
else if (search_notes == "核价成功")
where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes not like '%重复%'";
where += " AND (s.notes LIKE '核价成功%' OR s.notes LIKE '核价通过%') AND s.notes not LIKE '重复%'";
else if (search_notes == "核价成功(重复)")
where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes like '%重复%'";
where += " AND (s.notes LIKE '核价成功%' OR s.notes LIKE '核价通过%') AND s.notes LIKE '重复%'";
else
where += " and s.notes like '%" + search_notes + "%'";
where += " AND s.notes LIKE '%" + search_notes + "%'";
}
if (!string.IsNullOrWhiteSpace(search_user_notes))
where += " and s.user_notes like '%" + search_user_notes + "%'";
where += " AND s.user_notes LIKE '%" + search_user_notes + "%'";
where += " and p.is_del=0";
where += " AND p.is_del=0";
if (!string.IsNullOrWhiteSpace(search_spu))
where += " and p.spu_id like '%" + search_spu + "%'";
where += " AND p.spu_id LIKE '%" + search_spu + "%'";
if (!string.IsNullOrWhiteSpace(search_skc))
where += " and p.skc_id like '%" + search_skc + "%'";
where += " AND p.skc_id LIKE '%" + search_skc + "%'";
if (!string.IsNullOrWhiteSpace(search_cat))
where += " and p.cat_name like '%" + search_cat + "%'";
where += " AND p.cat_name LIKE '%" + search_cat + "%'";
if (!string.IsNullOrWhiteSpace(search_ext_code))
where += " and p.ext_code like '%" + search_ext_code + "%'";
where += " AND p.ext_code LIKE '%" + search_ext_code + "%'";
if (!string.IsNullOrWhiteSpace(search_prod_name))
where += " and p.product_name like '%" + search_prod_name + "%'";
where += " AND p.product_name LIKE '%" + search_prod_name + "%'";
if (!string.IsNullOrEmpty(search_sub_sa_name))
{
where += " and (s.operate_sub_sa_name like '%" + search_sub_sa_name + "%'";
where += " or u.nick_name like '%" + operate_sub_sa_name + "%')";
where += " AND (s.operate_sub_sa_name LIKE '%" + search_sub_sa_name + "%'";
where += " OR u.nick_name LIKE '%" + operate_sub_sa_name + "%')";
}
sql += where;
@@ -694,21 +763,40 @@ namespace KJD_Web.BLL
else
{
//if (isDetail)
//sql = "select * from " + tableName + " where 1=1";
//sql = "SELECT * FROM " + tableName + " where 1=1";
//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.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_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.product_get_type,u.nick_name as operate_sub_sa_nick " +
"from " + tableName + " s left join kjd.product p on s.out_product_id=p.id " +
"left join kjd.user u on u.user_name=s.operate_sub_sa_name " +
"where 1=1";
" FROM (";
for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (year >= 2026)
tableName += "_" + year;
if (year > search_start_time.Value.Year)
sql += " UNION ALL";
sql += " SELECT * FROM " + tableName;
}
sql += ") s" +
" LEFT JOIN kjd.product p ON s.out_product_id=p.id" +
" LEFT join kjd.user u ON u.user_name=s.operate_sub_sa_name" +
" WHERE 1=1";
sql += where; // where子句
sql += " order by id desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
sql += " ORDER BY add_time desc";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -722,7 +810,7 @@ namespace KJD_Web.BLL
{
ProductSelectResultParam prodSelect = new ProductSelectResultParam()
{
id = row["id"].ParseToInt(),
id = row["id"].ParseToLong(),
out_product_Id = row["out_product_Id"].ParseToString(),
shop_account = row["shop_account"].ParseToString(),
shop_id = row["shop_id"].ParseToString(),
@@ -785,13 +873,24 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
tableName = "kjd.jit_product_select";
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
string dbName = "kjd";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "delete from " + tableName + " where id='"
@@ -828,48 +927,122 @@ namespace KJD_Web.BLL
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
}
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var db_ids = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var db_id_infos = RegexUtils.GetStringQuery(ref inputData, "db_id_infos")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(shop_id))
if (operate_sub_sa_name == null)
{
return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}";
return "{\"code\":50002,\"msg\":\"未选择任何二级超管\"}";
}
if (string.IsNullOrEmpty(db_ids) && string.IsNullOrEmpty(shop_ids))
{
return "{\"code\":50002,\"msg\":\"未选择任何待设置对象\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
tableName = "kjd.jit_product_select";
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update " + tableName + " set";
if (operate_sub_sa_name != null)
string sql = "";
bool rst = false;
if (!string.IsNullOrEmpty(db_ids))
{
sql = "UPDATE kjd.product_select SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
if (!string.IsNullOrEmpty(id))
sql += " where id in (" + id + ")";
else if (!string.IsNullOrEmpty(shop_id))
sql += " where shop_id in ('" + shop_id.Replace(",", "','") + "')";
else
sql += " where 1=2";
if (!string.IsNullOrEmpty(status))
sql += " and status='" + status + "';";
var rst = mySql.ExecuteNonQuery(sql);
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE id IN (" + db_ids + ")";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
else if (!string.IsNullOrEmpty(shop_ids))
{
List<int> yearLst = new List<int>() { 2025 };
if (select_add_time != null)
{
yearLst.Clear();
yearLst.Add(select_add_time.Value.Year);
yearLst.Add(select_add_time.Value.AddMonths(-6).Year);
yearLst = yearLst.Distinct().ToList();
}
foreach (int year in yearLst)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".product_select";
if (year >= 2026)
tableName += "_" + year;
sql = "UPDATE " + tableName + " SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE shop_id in ('" + shop_ids.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
}
else if (!string.IsNullOrEmpty(db_id_infos))
{
try
{
JArray jArr = JArray.Parse(db_id_infos);
foreach (JObject jObj in jArr)
{
var year = jObj["year"].ParseToInt();
var dbIds = jObj["db_ids"].ParseToString();
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".product_select";
if (year >= 2026)
tableName += "_" + year;
sql = "UPDATE " + tableName + " SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE id IN (" + dbIds + ")";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
}
catch (Exception ex)
{
mySql.Close();
return "{\"code\":50004,\"msg\":\"" + ex.Message + "\"}";
}
}
mySql.Close();
if (rst)
{
return "{\"code\":200,\"msg\":\"success\"}";
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
return "{\"code\":200,\"msg\":\"success\"}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
@@ -884,7 +1057,7 @@ namespace KJD_Web.BLL
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
var db_id = RegexUtils.GetStringQuery(ref inputData, "db_id");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
string user_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "user_notes"));
string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name"));
@@ -894,13 +1067,24 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd.product_select";
if (is_client_jit)
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
tableName = "kjd.jit_product_select";
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
string dbName = "kjd";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName;
if (!is_client_jit)
tableName = dbName + ".product_select";
else
tableName = dbName + ".jit_product_select";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update " + tableName + " set";
@@ -911,10 +1095,10 @@ namespace KJD_Web.BLL
if (fission_product_name != null)
sql += " fission_product_name=@fission_product_name,";
sql = sql.TrimEnd(',');
sql += " where id=@id;";
sql += " where id=@db_id;";
List<MySqlParameter> paramLst = new List<MySqlParameter>();
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@id", Value = id, });
paramLst.Add(new MySqlParameter() { DbType = DbType.Int64, ParameterName = "@db_id", Value = db_id, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@fission_product_name", Value = fission_product_name, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@user_notes", Value = user_notes, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, });
@@ -955,14 +1139,29 @@ namespace KJD_Web.BLL
return "{\"code\":50002,\"msg\":\"未选择选品数据\"}";
}
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit").ParseToBool();
string tableName = "kjd_map.product_select_map_";
if (is_client_jit)
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
tableName = "kjd_map.jit_product_select_map_";
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
string dbName = "kjd_map";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_map_yearly";
string tableName;
if (!is_client_jit || (select_add_time != null && select_add_time.Value.Year >= 2026)) // 2026年以后的数据在新表,不带jit
tableName = dbName + ".product_select_map_";
else
tableName = dbName + ".jit_product_select_map_";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += select_add_time.Value.Year;
else
{
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
tableName += +l_select_map_table_id;
}
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -970,8 +1169,12 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from " + tableName + l_select_map_table_id + " where 1=1";
string sql = "SELECT COUNT(id) FROM " + tableName + " where 1=1";
string where = " and product_select_db_id=" + select_db_id;
if (select_add_time != null && select_add_time.Value.Year >= 2026) // 2026年以后的数据在新表
where += " AND select_type='" + (!is_client_jit ? "normal" : "jit") + "'";
sql += where;
var count = mySql.ExecuteRowCount(sql);
@@ -983,11 +1186,11 @@ namespace KJD_Web.BLL
}
else
{
sql = "select * from " + tableName + l_select_map_table_id + " where 1=1";
sql = "SELECT * FROM " + tableName + " where 1=1";
//where子句
sql += where;
sql += " order by id desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
sql += " ORDER BY add_time desc";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -1006,9 +1209,9 @@ namespace KJD_Web.BLL
{
DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam
{
id = row["id"].ParseToInt(),
id = row["id"].ParseToLong(),
product_select_db_id = row["product_select_db_id"].ParseToLong(),
product_id = row["product_id"].ParseToLong(),
product_select_db_id = row["product_select_db_id"].ParseToInt(),
shop_id = row["shop_id"].ParseToLong(),
add_time = Convert.ToDateTime(row["add_time"]),
};
@@ -1072,8 +1275,8 @@ namespace KJD_Web.BLL
l_spu_map_table_id = in_draft_id_list[i].ParseToLong() % 128;
sql += "select * from " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i];
}
sql += ") AS combined_query left join product p On combined_query.from_spu_id=p.spu_id";
sql += " order by add_time desc";
sql += ") AS combined_query left join product p ON combined_query.from_spu_id=p.spu_id";
sql += " ORDER BY add_time desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
DataTable dt = mySql.ExecuteDataTable(sql);
@@ -1092,7 +1295,7 @@ namespace KJD_Web.BLL
{
DBProdDraftIdMapUpSpuIdResultParam draftIdMapUpSpuId = new DBProdDraftIdMapUpSpuIdResultParam
{
id = row["id"].ParseToInt(),
id = row["id"].ParseToLong(),
draft_id = row["draft_id"].ParseToLong(),
from_spu_id = row["from_spu_id"].ParseToLong(),
shop_id = row["shop_id"].ParseToLong(),
@@ -1293,9 +1496,9 @@ namespace KJD_Web.BLL
sql += where;
if (is_random)
sql += " ORDER BY RAND(),s.id desc";
sql += " ORDER BY RAND(),s.add_time desc";
else
sql += " order by s.id desc";
sql += " ORDER BY s.add_time desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -3,6 +3,7 @@ using KJD_Web.Utils;
using MySql.Data.MySqlClient;
using MySqlX.XDevAPI.Common;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -349,22 +350,31 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有店铺信息\"}";
}
DateTime addTime = DateTime.Now;
string addTimeStr = addTime.ToString("yyyy-MM-dd HH:mm:ss");
string dbName = "kjd";
if (addTime.Year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (addTime.Year >= 2026)
tableName += "_" + addTime.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "insert into kjd.third_product_select (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,add_time,mdy_time) " +
"values ('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" +
string sql = "INSERT INTO " + tableName +
" (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,add_time,mdy_time) VALUES" +
" ('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" +
notes + "','" + status + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
addTimeStr + "','" +
addTimeStr + "');";
if (add_product_remaining > 0)
{
add_product_remaining = add_product_remaining - 1;
sql += "\r\n";
sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id='" + shop_id + "';";
//sql += "update kjd.shop_add_prod_count set add_product_remaining=" + add_product_remaining + " where shop_id='" + shop_id + "';";
sql += "UPDATE kjd.shop SET add_product_remaining=" + add_product_remaining + " where shop_id='" + shop_id + "';";
sql += "INSERT INTO kjd.shop_add_prod_count(shop_id, add_product_remaining) VALUES('" + shop_id + "'," + add_product_remaining + ")" +
"ON DUPLICATE KEY UPDATE add_product_remaining=VALUES(add_product_remaining)";
"ON DUPLICATE KEY UPDATE add_product_remaining=add_product_remaining-1";
}
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
@@ -389,31 +399,55 @@ namespace KJD_Web.BLL
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var select_db_id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'");
var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'");
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
long l_draft_id = draft_id.ParseToLong();
long l_spu_map_table_id = l_draft_id % 128;
long l_select_map_table_id = id.ParseToLong() % 64;
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
// 使用事务一次提交多个sql操作
//sql += "set @@autocommit=0;\r\n";
sql += "START TRANSACTION;\r\n";
if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id))
{
sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id +
" (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n";
sql += "insert into kjd_map.product_third_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n";
sql += "INSERT into kjd_map.spu_map_" + l_spu_map_table_id +
" (draft_id,from_spu_id,shop_id) VALUES(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n";
if (!select_add_time.HasValue || select_add_time.Value.Year < 2026)
{
sql += "INSERT into kjd_map.product_third_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) VALUES(" + draft_id + "," + select_db_id + ",'" + shop_id + "');\r\n";
}
else
{
string select_type = "third-party";
sql += "INSERT INTO kjd_map_yearly.product_select_map_" + select_add_time.Value.Year +
"(product_select_db_id,product_id,shop_id,select_type) VALUES" +
"(" + select_db_id + ",'" + draft_id + "','" + shop_id + "','" + select_type + "');\r\n";
}
}
sql += "update kjd.third_product_select set";
string dbName = "kjd";
if (select_add_time.HasValue && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (select_add_time.HasValue && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
sql += "update " + tableName + " set";
if (draft_id != null)
sql += " draft_id='" + draft_id + "',";
if (status != null)
@@ -422,7 +456,7 @@ namespace KJD_Web.BLL
sql += " add_times=add_times+1,";
sql += " mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + ";\r\n";
sql += " WHERE id=" + select_db_id + ";\r\n";
var rst = mySql.ExecuteNonQuery(sql);
string errMsg = mySql.Message;
if (string.IsNullOrEmpty(errMsg))
@@ -473,6 +507,13 @@ namespace KJD_Web.BLL
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
var search_end_time = RegexUtils.GetStringJson(ref inputData, "search_end_time")?.ParseToDateTimeNullable();
if (search_end_time == null || search_end_time.Value > DateTime.Now.Date.AddDays(1)) search_end_time = DateTime.Now.Date.AddDays(1);
var search_start_time = RegexUtils.GetStringJson(ref inputData, "search_start_time")?.ParseToDateTimeNullable();
if (search_start_time == null || search_start_time.Value >= search_end_time.Value) search_start_time = search_end_time.Value.AddMonths(-6);
int startTableId = Math.Max(2025, search_start_time.Value.Year);
int endTableId = Math.Max(2025, search_end_time.Value.Year);
var no_sub_sa = RegexUtils.GetStringQuery(ref inputData, "no_sub_sa")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
@@ -481,14 +522,30 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(s.id) from kjd.third_product_select s " +
"left join kjd.third_product p on s.out_product_id=p.id " +
"left join kjd.user u on s.operate_sub_sa_name=u.user_name " +
"where 1=1";
string sql = "select count(s.id) from (";
for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (year >= 2026)
tableName += "_" + year;
if (year > search_start_time.Value.Year)
sql += " UNION ALL";
sql += " SELECT * FROM " + tableName;
}
sql += ") s " +
"LEFT JOIN kjd.third_product p on s.out_product_id=p.id " +
"LEFT JOIN kjd.user u on s.operate_sub_sa_name=u.user_name " +
"WHERE s.add_time BETWEEN '" + search_start_time.Value.ToString("yyyy-MM-dd") + "' AND '" + search_end_time.Value.ToString("yyyy-MM-dd") + "' ";
string where = "";
if (!isAdmin)
where += " and (s.user_name='" + user_name + "' or s.sub_user_name like'%" + user_name + "%')";
where += " and (s.user_name='" + user_name + "' or s.sub_user_name ='" + user_name + "')";
if (!string.IsNullOrEmpty(operate_sub_sa_name))
{
where += " and s.operate_sub_sa_name = '" + operate_sub_sa_name + "'";
@@ -555,14 +612,30 @@ namespace KJD_Web.BLL
//if (isDetail)
//sql = "select * from kjd.third_product_select where 1=1";
//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.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_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.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img," +
"u.nick_name as operate_sub_sa_nick " +
"from kjd.third_product_select s left join kjd.third_product p on s.out_product_id=p.id " +
"left join kjd.user u on u.user_name=s.operate_sub_sa_name " +
"where 1=1";
"FROM (";
for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (year >= 2026)
tableName += "_" + year;
if (year > search_start_time.Value.Year)
sql += " UNION ALL";
sql += " SELECT * FROM " + tableName;
}
sql += ") s LEFT JOIN kjd.third_product p ON s.out_product_id=p.id " +
"LEFT JOIN kjd.user u ON u.user_name=s.operate_sub_sa_name " +
"WHERE 1=1";
sql += where; // where子句
@@ -581,7 +654,7 @@ namespace KJD_Web.BLL
{
ProductSelectResultParam prodSelect = new ProductSelectResultParam()
{
id = row["id"].ParseToInt(),
id = row["id"].ParseToLong(),
out_product_Id = row["out_product_Id"].ParseToString(),
shop_account = row["shop_account"].ParseToString(),
shop_id = row["shop_id"].ParseToString(),
@@ -645,9 +718,22 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
string dbName = "kjd";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "delete from kjd.third_product_select where id='"
string sql = "delete from " + tableName + " where id='"
+ id + "'";
var rst = mySql.ExecuteNonQuery(sql);
@@ -681,41 +767,123 @@ namespace KJD_Web.BLL
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
}
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var db_ids = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var db_id_infos = RegexUtils.GetStringQuery(ref inputData, "db_id_infos")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(shop_id))
if (operate_sub_sa_name == null)
{
return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}";
return "{\"code\":50002,\"msg\":\"未选择任何二级超管\"}";
}
if (string.IsNullOrEmpty(db_ids) && string.IsNullOrEmpty(shop_ids) && string.IsNullOrEmpty(db_id_infos))
{
return "{\"code\":50003,\"msg\":\"未选择任何待设置对象\"}";
}
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null && db_id_infos == null)
{
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update kjd.third_product_select set";
if (operate_sub_sa_name != null)
string sql = "";
bool rst = false;
if (!string.IsNullOrEmpty(db_ids))
{
sql = "UPDATE kjd.third_product_select SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
if (!string.IsNullOrEmpty(id))
sql += " where id in (" + id + ")";
else if (!string.IsNullOrEmpty(shop_id))
sql += " where shop_id in ('" + shop_id.Replace(",","','") + "')";
else
sql += " where 1=2";
if(!string.IsNullOrEmpty(status))
sql += " and status='" + status + "';";
var rst = mySql.ExecuteNonQuery(sql);
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE id IN (" + db_ids + ")";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
else if (!string.IsNullOrEmpty(shop_ids))
{
List<int> yearLst = new List<int>() { 2025 };
if (select_add_time != null)
{
yearLst.Clear();
yearLst.Add(select_add_time.Value.Year);
yearLst.Add(select_add_time.Value.AddMonths(-6).Year);
yearLst = yearLst.Distinct().ToList();
}
foreach (int year in yearLst)
{
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (year >= 2026)
tableName += "_" + year;
sql = "UPDATE " + tableName + " SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE shop_id in ('" + shop_ids.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
}
else if (!string.IsNullOrEmpty(db_id_infos))
{
try
{
JArray jArr = JArray.Parse(db_id_infos);
foreach (JObject jObj in jArr)
{
var year = jObj["year"].ParseToInt();
var dbIds = jObj["db_ids"].ParseToString();
string dbName = "kjd";
if (year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (year >= 2026)
tableName += "_" + year;
sql = "UPDATE " + tableName + " SET";
sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',";
sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " WHERE id IN (" + dbIds + ")";
if (!string.IsNullOrEmpty(status))
sql += " AND status='" + status + "';";
rst = mySql.ExecuteNonQuery(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
}
}
catch (Exception ex)
{
mySql.Close();
return "{\"code\":50004,\"msg\":\"" + ex.Message + "\"}";
}
}
mySql.Close();
if (rst)
{
return "{\"code\":200,\"msg\":\"success\"}";
}
else
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
return "{\"code\":200,\"msg\":\"success\"}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
@@ -730,7 +898,7 @@ namespace KJD_Web.BLL
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
var db_id = RegexUtils.GetStringQuery(ref inputData, "db_id");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
string user_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "user_notes"));
string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name"));
@@ -740,9 +908,22 @@ namespace KJD_Web.BLL
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
string dbName = "kjd";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += "_" + select_add_time.Value.Year;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update kjd.third_product_select set";
string sql = "update " + tableName + " set";
if (notes != null)
sql += " notes=@notes,";
if (user_notes != null)
@@ -753,7 +934,7 @@ namespace KJD_Web.BLL
sql += " where id=@id;";
List<MySqlParameter> paramLst = new List<MySqlParameter>();
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@id", Value = id, });
paramLst.Add(new MySqlParameter() { DbType = DbType.Int64, ParameterName = "@id", Value = db_id, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@fission_product_name", Value = fission_product_name, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@user_notes", Value = user_notes, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, });
@@ -793,7 +974,29 @@ namespace KJD_Web.BLL
{
return "{\"code\":50002,\"msg\":\"未选择选品数据\"}";
}
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
if (select_add_time == null)
{
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
}
string dbName = "kjd_map";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
dbName = "kjd_map_yearly";
string tableName;
if (select_add_time != null && select_add_time.Value.Year >= 2026) // 2026年以后的数据在新表
tableName = dbName + ".product_select_map_";
else
tableName = dbName + ".product_third_select_map_";
if (select_add_time != null && select_add_time.Value.Year >= 2026)
tableName += select_add_time.Value.Year;
else
{
long l_select_map_table_id = select_db_id.ParseToLong() % 64;
tableName += +l_select_map_table_id;
}
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -801,8 +1004,10 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from kjd_map.product_third_select_map_" + l_select_map_table_id + " where 1=1";
string where = " and product_select_db_id=" + select_db_id;
string sql = "SELECT COUNT(id) FROM " + tableName + " WHERE 1=1";
string where = " AND product_select_db_id=" + select_db_id;
if (select_add_time != null && select_add_time.Value.Year >= 2026) // 2026年以后的数据在新表
where += " AND select_type='third-party'";
sql += where;
var count = mySql.ExecuteRowCount(sql);
@@ -814,11 +1019,11 @@ namespace KJD_Web.BLL
}
else
{
sql = "select * from kjd_map.product_third_select_map_" + l_select_map_table_id + " where 1=1";
sql = "SELECT * FROM " + tableName + " WHERE 1=1";
//where子句
sql += where;
sql += " order by id desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
sql += " ORDER BY add_time desc";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -837,9 +1042,9 @@ namespace KJD_Web.BLL
{
DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam
{
id = row["id"].ParseToInt(),
id = row["id"].ParseToLong(),
product_select_db_id = row["product_select_db_id"].ParseToLong(),
product_id = row["product_id"].ParseToLong(),
product_select_db_id = row["product_select_db_id"].ParseToInt(),
shop_id = row["shop_id"].ParseToLong(),
add_time = Convert.ToDateTime(row["add_time"]),
};
@@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<ProjectExtensions>
@@ -7,8 +7,8 @@ namespace KJD_Web.Model
{
public class DBProdDbIdMapProductIdResultParam
{
public int id { get; set; }
public int product_select_db_id { get; set; }
public long id { get; set; }
public long product_select_db_id { get; set; }
public long product_id { get; set; }
public long shop_id { get; set; }
public DateTime add_time { get; set; }
@@ -16,7 +16,7 @@ namespace KJD_Web.Model
public class DBProdDraftIdMapUpSpuIdResultParam
{
public int id { get; set; }
public long id { get; set; }
public long draft_id { get; set; }
public long from_spu_id { get; set; }
public long shop_id { get; set; }
@@ -11,7 +11,7 @@ namespace KJD_Web.Model
/// </summary>
public class ProductSelectResultParam
{
public int id { get; set; }
public long id { get; set; }
public string out_product_Id { get; set; }
public string shop_id { get; set; }
public string shop_account { get; set; }
@@ -334,6 +334,47 @@ namespace NaiBa.Util.Extension
#endregion
#region 转换为DateTime
public static DateTime? ParseToDateTimeNullable(this string str)
{
try
{
if (string.IsNullOrWhiteSpace(str))
{
return null;
}
if (str.Contains("-") || str.Contains("/"))
{
return DateTime.Parse(str);
}
else
{
int length = str.Length;
switch (length)
{
case 4:
return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture);
case 6:
return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture);
case 8:
return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);
case 10:
return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture);
case 12:
return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture);
case 14:
return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
default:
return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
}
}
}
catch
{
return null;
}
}
/// <summary>
/// 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。
/// </summary>
+32 -15
View File
@@ -50,15 +50,23 @@ namespace TemuKJD.BLL
/// </summary>
/// <param name="_shop"></param>
/// <returns></returns>
public static string MdyServerShopSubInfo(ShopLoginInfo _shop)
public static string MdyServerShopSubInfo(ShopLoginInfo _shop, bool isEditSingleShopNotes = false)
{
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + _shop.LoginName
+ "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password)
+ "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName)
+ "&sub_user_name=" + _shop.SubUserName
+ "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
var data = UserLogin.GetSignaturex();
if (isEditSingleShopNotes)
{
data += "&login_name=" + _shop.LoginName;
data += "&shop_id=" + _shop.ShopId;
data += "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
}
else
{
data += "&login_name=" + _shop.LoginName;
data += "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password);
data += "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName);
data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName);
}
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
@@ -166,16 +174,25 @@ namespace TemuKJD.BLL
return result;
}
public static string AdminMdyServerShop(ShopLoginInfo _shop)
public static string AdminMdyServerShop(ShopLoginInfo _shop, bool isEditSingleShopNotes = false)
{
var url = BaseClass.BuildObjString("shop/admin_mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&shop_user_name=" + _shop.UserName
+ "&login_name=" + _shop.LoginName
+ "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password)
+ "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName)
+ "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName)
+ "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
var data = UserLogin.GetSignaturex();
if (isEditSingleShopNotes)
{
data += "&shop_user_name=" + _shop.UserName;
data += "&login_name=" + _shop.LoginName;
data += "&shop_id=" + _shop.ShopId;
data += "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
}
else
{
data += "&shop_user_name=" + _shop.UserName;
data += "&login_name=" + _shop.LoginName;
data += "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password);
data += "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName);
data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName);
}
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
+7 -7
View File
@@ -65,7 +65,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colExpires = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -378,7 +378,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colExpires,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEdit,
this.colDelete});
this.dgvCardCode.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -480,11 +480,11 @@ namespace TemuKJD.KJDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEdit
//
@@ -559,7 +559,7 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colExpires;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
}
@@ -141,7 +141,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -41,6 +41,7 @@ namespace TemuKJD.KJDForms.AdminForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtReplaceText = new System.Windows.Forms.TextBox();
this.btnSearchPrice3 = new DevComponents.DotNetBar.PanelEx();
this.numSleep = new System.Windows.Forms.NumericUpDown();
this.lblSleep = new System.Windows.Forms.Label();
@@ -111,6 +112,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.label20 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.chkLessThan = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label8 = new System.Windows.Forms.Label();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
@@ -156,6 +158,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.chkForceRestoreTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -223,6 +226,7 @@ namespace TemuKJD.KJDForms.AdminForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtReplaceText);
this.ucGroupBoxEx1.Controls.Add(this.btnSearchPrice3);
this.ucGroupBoxEx1.Controls.Add(this.numSleep);
this.ucGroupBoxEx1.Controls.Add(this.lblSleep);
@@ -269,6 +273,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucGroupBoxEx1.Controls.Add(this.chkFilterSize);
this.ucGroupBoxEx1.Controls.Add(this.chkSearchTime);
this.ucGroupBoxEx1.Controls.Add(this.pnlRestoreSizeAndNumber);
this.ucGroupBoxEx1.Controls.Add(this.label8);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(1480, 140);
@@ -276,6 +281,13 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "参数设置";
//
// txtReplaceText
//
this.txtReplaceText.Location = new System.Drawing.Point(964, 36);
this.txtReplaceText.Name = "txtReplaceText";
this.txtReplaceText.Size = new System.Drawing.Size(227, 23);
this.txtReplaceText.TabIndex = 1207;
//
// btnSearchPrice3
//
this.btnSearchPrice3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -412,7 +424,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnRestoreSizeAndNumber.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreSizeAndNumber.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreSizeAndNumber.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1092, 51);
this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1092, 62);
this.btnRestoreSizeAndNumber.Name = "btnRestoreSizeAndNumber";
this.btnRestoreSizeAndNumber.Size = new System.Drawing.Size(99, 23);
this.btnRestoreSizeAndNumber.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -616,7 +628,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numJudgeWeight
//
this.numJudgeWeight.Location = new System.Drawing.Point(1038, 51);
this.numJudgeWeight.Location = new System.Drawing.Point(1038, 62);
this.numJudgeWeight.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numJudgeWeight.Maximum = new decimal(new int[] {
10000,
@@ -658,7 +670,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numJudgeLen
//
this.numJudgeLen.Location = new System.Drawing.Point(964, 51);
this.numJudgeLen.Location = new System.Drawing.Point(964, 62);
this.numJudgeLen.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numJudgeLen.Maximum = new decimal(new int[] {
299,
@@ -677,7 +689,7 @@ namespace TemuKJD.KJDForms.AdminForms
// lblJudgeLen
//
this.lblJudgeLen.AutoSize = true;
this.lblJudgeLen.Location = new System.Drawing.Point(940, 54);
this.lblJudgeLen.Location = new System.Drawing.Point(940, 65);
this.lblJudgeLen.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblJudgeLen.Name = "lblJudgeLen";
this.lblJudgeLen.Size = new System.Drawing.Size(29, 17);
@@ -753,7 +765,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnRestoreProdName.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreProdName.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreProdName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreProdName.Location = new System.Drawing.Point(1092, 17);
this.btnRestoreProdName.Location = new System.Drawing.Point(1092, 12);
this.btnRestoreProdName.Name = "btnRestoreProdName";
this.btnRestoreProdName.Size = new System.Drawing.Size(99, 23);
this.btnRestoreProdName.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -993,7 +1005,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkFilterTitle
//
this.chkFilterTitle.AutoSize = true;
this.chkFilterTitle.Location = new System.Drawing.Point(927, 18);
this.chkFilterTitle.Location = new System.Drawing.Point(927, 13);
this.chkFilterTitle.Name = "chkFilterTitle";
this.chkFilterTitle.Size = new System.Drawing.Size(171, 21);
this.chkFilterTitle.TabIndex = 857;
@@ -1004,7 +1016,7 @@ namespace TemuKJD.KJDForms.AdminForms
// lblJudgeWeight
//
this.lblJudgeWeight.AutoSize = true;
this.lblJudgeWeight.Location = new System.Drawing.Point(1002, 54);
this.lblJudgeWeight.Location = new System.Drawing.Point(1002, 65);
this.lblJudgeWeight.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblJudgeWeight.Name = "lblJudgeWeight";
this.lblJudgeWeight.Size = new System.Drawing.Size(41, 17);
@@ -1024,7 +1036,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkFilterSize
//
this.chkFilterSize.AutoSize = true;
this.chkFilterSize.Location = new System.Drawing.Point(927, 55);
this.chkFilterSize.Location = new System.Drawing.Point(927, 66);
this.chkFilterSize.Name = "chkFilterSize";
this.chkFilterSize.Size = new System.Drawing.Size(15, 14);
this.chkFilterSize.TabIndex = 1076;
@@ -1061,15 +1073,15 @@ namespace TemuKJD.KJDForms.AdminForms
this.pnlRestoreSizeAndNumber.Controls.Add(this.label20);
this.pnlRestoreSizeAndNumber.Controls.Add(this.label11);
this.pnlRestoreSizeAndNumber.Controls.Add(this.chkLessThan);
this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(920, 76);
this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(920, 85);
this.pnlRestoreSizeAndNumber.Name = "pnlRestoreSizeAndNumber";
this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 58);
this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 52);
this.pnlRestoreSizeAndNumber.TabIndex = 1160;
//
// numPieces
//
this.numPieces.Enabled = false;
this.numPieces.Location = new System.Drawing.Point(125, 3);
this.numPieces.Location = new System.Drawing.Point(125, 2);
this.numPieces.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numPieces.Maximum = new decimal(new int[] {
99999,
@@ -1089,7 +1101,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(109, 6);
this.label17.Location = new System.Drawing.Point(109, 5);
this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(20, 17);
@@ -1098,7 +1110,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numHeight2
//
this.numHeight2.Location = new System.Drawing.Point(231, 31);
this.numHeight2.Location = new System.Drawing.Point(231, 27);
this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight2.Maximum = new decimal(new int[] {
299,
@@ -1116,7 +1128,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numHeight1
//
this.numHeight1.Location = new System.Drawing.Point(197, 31);
this.numHeight1.Location = new System.Drawing.Point(197, 27);
this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numHeight1.Maximum = new decimal(new int[] {
299,
@@ -1134,7 +1146,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWidth1
//
this.numWidth1.Location = new System.Drawing.Point(108, 31);
this.numWidth1.Location = new System.Drawing.Point(108, 27);
this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth1.Maximum = new decimal(new int[] {
299,
@@ -1152,7 +1164,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWidth2
//
this.numWidth2.Location = new System.Drawing.Point(142, 31);
this.numWidth2.Location = new System.Drawing.Point(142, 27);
this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWidth2.Maximum = new decimal(new int[] {
299,
@@ -1170,7 +1182,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numLen1
//
this.numLen1.Location = new System.Drawing.Point(19, 31);
this.numLen1.Location = new System.Drawing.Point(19, 27);
this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen1.Maximum = new decimal(new int[] {
299,
@@ -1188,7 +1200,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWeight2
//
this.numWeight2.Location = new System.Drawing.Point(221, 3);
this.numWeight2.Location = new System.Drawing.Point(221, 2);
this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight2.Maximum = new decimal(new int[] {
10000,
@@ -1206,7 +1218,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numWeight1
//
this.numWeight1.Location = new System.Drawing.Point(172, 3);
this.numWeight1.Location = new System.Drawing.Point(172, 2);
this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numWeight1.Maximum = new decimal(new int[] {
99999,
@@ -1224,7 +1236,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// numLen2
//
this.numLen2.Location = new System.Drawing.Point(53, 31);
this.numLen2.Location = new System.Drawing.Point(53, 27);
this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numLen2.Maximum = new decimal(new int[] {
299,
@@ -1243,7 +1255,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(3, 34);
this.label15.Location = new System.Drawing.Point(3, 30);
this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
@@ -1253,7 +1265,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(92, 34);
this.label18.Location = new System.Drawing.Point(92, 30);
this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(20, 17);
@@ -1263,7 +1275,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(181, 34);
this.label19.Location = new System.Drawing.Point(181, 30);
this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(20, 17);
@@ -1273,7 +1285,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(155, 6);
this.label20.Location = new System.Drawing.Point(155, 5);
this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(20, 17);
@@ -1283,7 +1295,7 @@ namespace TemuKJD.KJDForms.AdminForms
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(77, 6);
this.label11.Location = new System.Drawing.Point(77, 5);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
@@ -1293,7 +1305,7 @@ namespace TemuKJD.KJDForms.AdminForms
// chkLessThan
//
this.chkLessThan.AutoSize = true;
this.chkLessThan.Location = new System.Drawing.Point(7, 4);
this.chkLessThan.Location = new System.Drawing.Point(7, 3);
this.chkLessThan.Name = "chkLessThan";
this.chkLessThan.Size = new System.Drawing.Size(75, 21);
this.chkLessThan.TabIndex = 1160;
@@ -1301,6 +1313,16 @@ namespace TemuKJD.KJDForms.AdminForms
this.chkLessThan.UseVisualStyleBackColor = true;
this.chkLessThan.CheckedChanged += new System.EventHandler(this.chkLessThan_CheckedChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(924, 39);
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 17);
this.label8.TabIndex = 1208;
this.label8.Text = "过滤词";
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1831,6 +1853,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.chkForceRestoreTitle);
this.splitContainer4.Panel2.Controls.Add(this.statusBar);
this.splitContainer4.Size = new System.Drawing.Size(1484, 26);
this.splitContainer4.SplitterDistance = 322;
@@ -1850,6 +1873,18 @@ namespace TemuKJD.KJDForms.AdminForms
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// chkForceRestoreTitle
//
this.chkForceRestoreTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkForceRestoreTitle.AutoSize = true;
this.chkForceRestoreTitle.Location = new System.Drawing.Point(1031, 0);
this.chkForceRestoreTitle.Name = "chkForceRestoreTitle";
this.chkForceRestoreTitle.Size = new System.Drawing.Size(123, 21);
this.chkForceRestoreTitle.TabIndex = 1077;
this.chkForceRestoreTitle.Text = "强制还原英文标题";
this.chkForceRestoreTitle.UseVisualStyleBackColor = true;
this.chkForceRestoreTitle.Visible = false;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
@@ -1913,6 +1948,7 @@ namespace TemuKJD.KJDForms.AdminForms
((System.ComponentModel.ISupportInitialize)(this.dgvPriceCheck)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
this.splitContainer4.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ResumeLayout(false);
@@ -2039,5 +2075,8 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.Panel pnlRestoreSizeAndNumber;
private DevComponents.DotNetBar.PanelEx btnSearchPrice3;
private UserComponent.UcCheckBox chkLessThan;
private System.Windows.Forms.TextBox txtReplaceText;
private System.Windows.Forms.Label label8;
private UserComponent.UcCheckBox chkForceRestoreTitle;
}
}
@@ -74,6 +74,12 @@ namespace TemuKJD.KJDForms.AdminForms
//dgvShop.Columns["colSubSa"].Visible = false;
//btnSetSubSa.Visible = false;
}
if (BaseClass.SaLevel == 1 && ClientMode == EnumClientMode.Admin)
{
//chkForceRestoreTitle.Visible = true;
}
if (ClientMode != EnumClientMode.Admin)
{
ucSplitPage1.Visible = false;
@@ -1162,6 +1168,22 @@ namespace TemuKJD.KJDForms.AdminForms
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductNameAndEnNameBatchAdd(ShopLoginInfo shop, string productId)
{
string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/batchAdd";
string body = @"{""bizIdType"":1,""bizIds"":[" + productId + @"],""productEditItems"":[{""editItem"":1,""editAdvice"":""优化""},{""editItem"":2,""editAdvice"":""优化""}]}";
string referer = "https://agentseller.temu.com/goods/list?productId=" + productId;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductEnNameBatchAdd(ShopLoginInfo shop, string productId)
{
string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/batchAdd";
string body = @"{""bizIdType"":1,""bizIds"":[" + productId + @"],""productEditItems"":[{""editItem"":2,""editAdvice"":""优化""}]}";
string referer = "https://agentseller.temu.com/goods/list?productId=" + productId;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
@@ -1170,6 +1192,27 @@ namespace TemuKJD.KJDForms.AdminForms
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductNameAndEnName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
string body = "";
body = @"{""productId"":" + productId + @",""taskUid"":""" + taskUid + @""",""taskVersion"":0,""refuseEdit"":false," +
@"""productName"":""" + productNewName + @""",""productI18nReqs"":[{""productName"":""" + productNewName + @""",""language"":""en""}]}";
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
private string editPriceProductEnName(ShopLoginInfo shop, string taskUid, string productId, string productNewName)
{
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
string body = "";
body = @"{""productId"":" + productId + @",""taskUid"":""" + taskUid + @""",""taskVersion"":0,""refuseEdit"":false," +
@"""productI18nReqs"":[{""productName"":""" + productNewName + @""",""language"":""en""}]}";
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
}
//申请修改 SKU分类和包装清单 体积与重量 商品名称
//{"bizIdType":1,"bizIds":[8942170367],"productEditItems":[{"editItem":4,"editAdvice":"12345"},{"editItem":8,"editAdvice":"54321"},{"editItem":1,"editAdvice":"33333"}]}
@@ -1270,7 +1313,7 @@ namespace TemuKJD.KJDForms.AdminForms
}
var pName = price.productName;
if (CheckRestoreTitleWords(pName))
if (CheckRestoreTitleWords(pName) || chkForceRestoreTitle.Checked)
{
}
else
@@ -1283,16 +1326,44 @@ namespace TemuKJD.KJDForms.AdminForms
continue;
}
var html = editPriceProductNameBatchAdd(shop, price.productId.ParseToString());
var html = "";
var isRestoreEnName = false;
//// 中文标题不为空大概率加了英文标题了,一并还原英文标题
//if (ProductSelectForms.DbProductSelectListManageForm.CountChineseCharacters(pName) <= 0 )
//{
// isRestoreEnName = true;
// //if (chkForceRestoreTitle.Checked) // 强制还原英文标题功能已移除
// // html = editPriceProductEnNameBatchAdd(shop, price.productId.ParseToString());
// //else
// html = editPriceProductNameAndEnNameBatchAdd(shop, price.productId.ParseToString());
//}
if (!isRestoreEnName) // 商品上传时已禁止英文标题头尾词,此处默认只还原商品主标题
{
html = editPriceProductNameBatchAdd(shop, price.productId.ParseToString());
}
//{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"handleFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again"}],"addFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again","failedReasonType":8}],"successBizId2TaskUidMap":{}}}
string taskUid = "";
if (html.Contains("This product has pending or in-progress modification tasks"))
{
Invoke(new Action(() =>
var taskHtml = editPriceProductSizeAndNumberTaskQuery(shop, price.productId.ParseToString());
taskUid = BaseRegex.GetStringJson(ref taskHtml, "taskUid");
//if (string.IsNullOrEmpty(taskUid) || !taskHtml.Contains("\"productEditTaskItems\":[{\"editItem\":1,\"editAdvice\":\"优化\"}]"))
if (string.IsNullOrEmpty(taskUid) || !taskHtml.Contains("\"productEditTaskItems\":[{\"editItem\":1,"))
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务";
}));
continue;
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务,请在后店铺台终止任务并稍候重试";
}));
return; //continue;
}
//Invoke(new Action(() =>
//{
// foreach (var row in rows)
// row.Cells["colMsg"].Value = "已提交过修改任务";
//}));
//continue;
}
if (!html.Contains("\"success\":true"))
{
@@ -1319,11 +1390,14 @@ namespace TemuKJD.KJDForms.AdminForms
try
{
JObject jObj = JObject.Parse(html);
var item = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault();
if (string.IsNullOrEmpty(taskUid))
{
JObject jObj = JObject.Parse(html);
taskUid = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault().ParseToString();
}
// 还原原始标题
var newPName = RestoreProductName(pName);
var newProdName = RestoreProductName(pName, txtReplaceText.Text.Trim());
// 测试修改标题最多字符数量
//while (newPName.Length < 500)
@@ -1331,7 +1405,15 @@ namespace TemuKJD.KJDForms.AdminForms
// newPName += "长";
//}
html = editPriceProductName(shop, item.ParseToString(), price.productId.ParseToString(), newPName);
if (isRestoreEnName)
{
//if (chkForceRestoreTitle.Checked) // 强制还原英文标题功能已移除
// html = editPriceProductEnName(shop, item.ParseToString(), price.productId.ParseToString(), newProdName);
//else
html = editPriceProductNameAndEnName(shop, taskUid, price.productId.ParseToString(), newProdName);
}
else
html = editPriceProductName(shop, taskUid, price.productId.ParseToString(), newProdName);
Thread.Sleep(Randomx.GetId(25, 75));
commonSleep();
if (html.Contains("\"success\":true"))
@@ -1707,10 +1789,10 @@ namespace TemuKJD.KJDForms.AdminForms
bool CheckRestoreTitleWords(string filterProdName)
{
return filterProdName != RestoreProductName(filterProdName);
return filterProdName != RestoreProductName(filterProdName, txtReplaceText.Text.Trim());
}
public static string RestoreProductName(string pName)
public static string RestoreProductName(string pName, string replaceTxt = "")
{
string checkChineseName = pName.Replace("适合不同的搭配风格", "").Replace("个", "").Replace("适合不同的搭配场景", "");
bool containsChinese = Regex.IsMatch(checkChineseName, @"[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]");
@@ -1738,6 +1820,9 @@ namespace TemuKJD.KJDForms.AdminForms
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim()
.Replace("适合不同的搭配场景", "Suitable for " + headword + " different matching scenarios").Trim();
}
if (!string.IsNullOrWhiteSpace(replaceTxt))
newPName = newPName.Replace(replaceTxt, "");
return newPName;
}
@@ -1805,7 +1890,7 @@ namespace TemuKJD.KJDForms.AdminForms
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务";
row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务,请在后店铺台终止任务并稍候重试";
}));
return; //continue;
}
@@ -1856,7 +1941,7 @@ namespace TemuKJD.KJDForms.AdminForms
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colMsg"].Value = "已提交过修改任务";
row.Cells["colMsg"].Value = "已提交过修改任务,请在后店铺台终止任务并稍候重试";
}));
return; // continue;
}
+99 -86
View File
@@ -29,11 +29,11 @@ namespace TemuKJD.KJDForms.AdminForms
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel5 = new System.Windows.Forms.Panel();
@@ -57,17 +57,22 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.pnlAddProdRemaining = new System.Windows.Forms.Panel();
this.lblShopId = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.pnlCancel = new DevComponents.DotNetBar.PanelEx();
this.numAddRemaining = new System.Windows.Forms.NumericUpDown();
this.btnRemainOK = new DevComponents.DotNetBar.PanelEx();
this.lblAddProdRemaining = new System.Windows.Forms.Label();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -92,10 +97,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.lblShopId = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -413,6 +414,16 @@ namespace TemuKJD.KJDForms.AdminForms
this.pnlAddProdRemaining.TabIndex = 7;
this.pnlAddProdRemaining.Visible = false;
//
// lblShopId
//
this.lblShopId.AutoSize = true;
this.lblShopId.Location = new System.Drawing.Point(20, 19);
this.lblShopId.Name = "lblShopId";
this.lblShopId.Size = new System.Drawing.Size(50, 17);
this.lblShopId.TabIndex = 455;
this.lblShopId.Text = "ShopId";
this.lblShopId.Visible = false;
//
// panel2
//
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
@@ -497,26 +508,28 @@ namespace TemuKJD.KJDForms.AdminForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEditNotes,
this.colMinus,
this.colProductRemaining,
this.colPlus,
@@ -552,6 +565,43 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(597, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(911, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1273, 25);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -581,16 +631,25 @@ namespace TemuKJD.KJDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEditNotes
//
this.colEditNotes.FillWeight = 25F;
this.colEditNotes.HeaderText = "编辑备注";
this.colEditNotes.Name = "colEditNotes";
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colMinus
//
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colMinus.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colMinus.DefaultCellStyle = dataGridViewCellStyle3;
this.colMinus.FillWeight = 15F;
this.colMinus.HeaderText = "-";
this.colMinus.Name = "colMinus";
@@ -599,8 +658,8 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colProductRemaining
//
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle4;
this.colProductRemaining.FillWeight = 30F;
this.colProductRemaining.HeaderText = "选品限额";
this.colProductRemaining.Name = "colProductRemaining";
@@ -608,8 +667,8 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colPlus
//
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle5;
this.colPlus.FillWeight = 15F;
this.colPlus.HeaderText = "+";
this.colPlus.Name = "colPlus";
@@ -793,53 +852,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(597, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(911, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1273, 25);
this.statusBar.TabIndex = 1;
//
// lblShopId
//
this.lblShopId.AutoSize = true;
this.lblShopId.Location = new System.Drawing.Point(20, 19);
this.lblShopId.Name = "lblShopId";
this.lblShopId.Size = new System.Drawing.Size(50, 17);
this.lblShopId.TabIndex = 455;
this.lblShopId.Text = "ShopId";
this.lblShopId.Visible = false;
//
// AdminShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -902,11 +914,19 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox chkShowDelete;
private UserControls.ButtonEx btnSetSubSa;
private System.Windows.Forms.Panel pnlAddProdRemaining;
private System.Windows.Forms.Label lblAddProdRemaining;
private System.Windows.Forms.NumericUpDown numAddRemaining;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx btnRemainOK;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private System.Windows.Forms.Label lblShopId;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colMinus;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colPlus;
@@ -931,12 +951,5 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.Panel pnlAddProdRemaining;
private System.Windows.Forms.Label lblAddProdRemaining;
private System.Windows.Forms.NumericUpDown numAddRemaining;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx btnRemainOK;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private System.Windows.Forms.Label lblShopId;
}
}
@@ -48,6 +48,9 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvShop.AddSelectorColumn("colSelect");
this.dgvShop.AddMergeColumnHeader(new List<string>() { /*"colMinus",*/ "colProductRemaining", "colPlus" }, "选品限额");
this.dgvShop.AddMergeColumn(new List<string>() { /*"colMinus",*/ "colProductRemaining", "colPlus" });
this.dgvShop.AddMergeColumnHeader(new List<string>() { "colNotes", "colEditNotes" }, "备注");
this.dgvShop.AddMergeColumn(new List<string>() { "colNotes", "colEditNotes" });
this.dgvShop.Columns["colEditNotes"].Width = 30;
this.dgvShop.Columns["colMinus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
@@ -112,6 +115,7 @@ namespace TemuKJD.KJDForms.AdminForms
shop.ShopId,
shop.ShopAccount,
shop.Notes,
"编辑",
"-",
shop.AddProductRemaining,
"+",
@@ -211,8 +215,10 @@ namespace TemuKJD.KJDForms.AdminForms
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
string userName = dgvShop.Rows[e.RowIndex].Cells["colUser"].Value.ParseToString();
var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId && v.UserName == userName);
switch (headerText)
{
@@ -291,9 +297,28 @@ namespace TemuKJD.KJDForms.AdminForms
SearchShop(this.ucSplitPage1.CurrentPage);
break;
case "编辑":
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe;
editForm.ShowDialog();
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe;
editForm.ShowDialog();
}
break;
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.ShowDialog();
if (editForm.HasChange)
{
ShopBLL.AdminMdyServerShop(shop, true);
SearchShop(this.ucSplitPage1.CurrentPage);
}
}
break;
case "登录":
IsOperate = true;
@@ -129,7 +129,10 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEditNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMinus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -353,17 +353,21 @@ namespace TemuKJD.KJDForms.AdminForms
private string ProductQuery(ShopLoginInfo shop, string prodId)
{
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/query";
url = "https://agentseller.temu.com/visage-agent-seller/product/query";
string body = @"{""productId"":" + prodId + @",""productEditTaskUid"":""""}";
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse(shop, url, body, refere);
refere = "https://agentseller.temu.com/goods/edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse2(shop, url, body, refere);
}
private string SizeSpecQuery(ShopLoginInfo shop, string prodId, string sizeSpecId)
{
string url = "https://seller.kuajingmaihuo.com/bg-anniston-mms/sizespec/query";
url = "https://agentseller.temu.com/anniston-agent-seller/sizespec/query";
string body = @"{""businessId"":" + sizeSpecId + @",""reusable"":false}";
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse(shop, url, body, refere);
refere = "https://agentseller.temu.com/goods/edit?from=productList&productId=" + prodId;
return HttpResponseBLL.PostResponse2(shop, url, body, refere);
}
}
}
@@ -67,8 +67,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&notes=" + this.txtNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=" + dbProdSelect.id;
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&notes=" + this.txtNotes.Text.Trim();
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
if (IsClientJit)
data += "&is_client_jit=true";
@@ -88,8 +90,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
data += "&fission_product_name=" + txtProdName.Text.Trim();
}
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -43,16 +43,14 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown();
this.label22 = new System.Windows.Forms.Label();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnForceEnable = new DevComponents.DotNetBar.PanelEx();
this.label22 = new System.Windows.Forms.Label();
this.txtNotChangeMainImg = new System.Windows.Forms.TextBox();
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNotChangeMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkAiSkuAndMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLongTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkSameExtcodeRandomMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.lblSkuRandomLetterNotes = new System.Windows.Forms.Label();
this.btnAdd = new DevComponents.DotNetBar.PanelEx();
this.lblSkuRandomLetterNotes = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.label9 = new System.Windows.Forms.Label();
this.txtSkuHeadText = new System.Windows.Forms.TextBox();
@@ -119,7 +117,12 @@
this.cmbUserNotes = new System.Windows.Forms.ComboBox();
this.lblUserNotes = new System.Windows.Forms.Label();
this.chkAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.chkAiSkuAndMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkSameExtcodeRandomMainImg = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkLongTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkEnglishProdName = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkUseGlobalProductWords = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pnlError = new DevComponents.DotNetBar.PanelEx();
this.lblError = new System.Windows.Forms.Label();
@@ -173,6 +176,7 @@
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numUnitNum2)).BeginInit();
@@ -188,6 +192,7 @@
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
@@ -212,16 +217,14 @@
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.numMaxWaitSecond);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnForceEnable);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.txtNotChangeMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa);
this.splitContainer1.Panel1.Controls.Add(this.chkNotChangeMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkAiSkuAndMainImg);
this.splitContainer1.Panel1.Controls.Add(this.chkLongTitle);
this.splitContainer1.Panel1.Controls.Add(this.chkSameExtcodeRandomMainImg);
this.splitContainer1.Panel1.Controls.Add(this.lblSkuRandomLetterNotes);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.lblSkuRandomLetterNotes);
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
@@ -254,7 +257,8 @@
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkAddPrice);
this.splitContainer1.Panel1.Controls.Add(this.chkEnglishProdName);
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel2);
this.splitContainer1.Panel1.Controls.Add(this.chkUseGlobalProductWords);
//
// splitContainer1.Panel2
//
@@ -265,7 +269,9 @@
//
// numMaxWaitSecond
//
this.numMaxWaitSecond.Location = new System.Drawing.Point(104, 95);
this.numMaxWaitSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMaxWaitSecond.Font = new System.Drawing.Font("微软雅黑", 8F);
this.numMaxWaitSecond.Location = new System.Drawing.Point(1328, 68);
this.numMaxWaitSecond.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numMaxWaitSecond.Maximum = new decimal(new int[] {
500,
@@ -278,7 +284,7 @@
0,
0});
this.numMaxWaitSecond.Name = "numMaxWaitSecond";
this.numMaxWaitSecond.Size = new System.Drawing.Size(49, 23);
this.numMaxWaitSecond.Size = new System.Drawing.Size(38, 22);
this.numMaxWaitSecond.TabIndex = 745;
this.numMaxWaitSecond.Value = new decimal(new int[] {
120,
@@ -287,15 +293,17 @@
0});
this.numMaxWaitSecond.ValueChanged += new System.EventHandler(this.numMaxWaitSecond_ValueChanged);
//
// label22
// pbFissionSetting
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(3, 98);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(112, 17);
this.label22.TabIndex = 744;
this.label22.Text = "最大等待时间(秒):";
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1228, 68);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(22, 22);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 774;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnForceEnable
//
@@ -303,10 +311,10 @@
this.btnForceEnable.CanvasColor = System.Drawing.SystemColors.Control;
this.btnForceEnable.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnForceEnable.DisabledBackColor = System.Drawing.Color.Empty;
this.btnForceEnable.Location = new System.Drawing.Point(1340, 67);
this.btnForceEnable.Location = new System.Drawing.Point(1370, 67);
this.btnForceEnable.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnForceEnable.Name = "btnForceEnable";
this.btnForceEnable.Size = new System.Drawing.Size(174, 24);
this.btnForceEnable.Size = new System.Drawing.Size(144, 24);
this.btnForceEnable.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -320,9 +328,20 @@
this.btnForceEnable.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnForceEnable.TabIndex = 722;
this.btnForceEnable.Text = "强制解锁按钮(上传卡住时用)";
this.btnForceEnable.Text = "强制解锁(上传卡住时用)";
this.btnForceEnable.Click += new System.EventHandler(this.btnForceEnable_Click);
//
// label22
//
this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(1251, 71);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(88, 17);
this.label22.TabIndex = 744;
this.label22.Text = "超时跳过(秒):";
//
// txtNotChangeMainImg
//
this.txtNotChangeMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -359,54 +378,6 @@
this.chkNotChangeMainImg.Text = "第 张主图不替换";
this.chkNotChangeMainImg.UseVisualStyleBackColor = true;
//
// chkAiSkuAndMainImg
//
this.chkAiSkuAndMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkAiSkuAndMainImg.AutoSize = true;
this.chkAiSkuAndMainImg.Location = new System.Drawing.Point(1221, 96);
this.chkAiSkuAndMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkAiSkuAndMainImg.Name = "chkAiSkuAndMainImg";
this.chkAiSkuAndMainImg.Size = new System.Drawing.Size(152, 21);
this.chkAiSkuAndMainImg.TabIndex = 680;
this.chkAiSkuAndMainImg.Text = "sku随机AI图+随机转主";
this.chkAiSkuAndMainImg.UseVisualStyleBackColor = true;
//
// chkLongTitle
//
this.chkLongTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkLongTitle.AutoSize = true;
this.chkLongTitle.Location = new System.Drawing.Point(937, 96);
this.chkLongTitle.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkLongTitle.Name = "chkLongTitle";
this.chkLongTitle.Size = new System.Drawing.Size(96, 21);
this.chkLongTitle.TabIndex = 660;
this.chkLongTitle.Text = "500字长标题";
this.chkLongTitle.UseVisualStyleBackColor = true;
//
// chkSameExtcodeRandomMainImg
//
this.chkSameExtcodeRandomMainImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkSameExtcodeRandomMainImg.AutoSize = true;
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(1033, 96);
this.chkSameExtcodeRandomMainImg.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkSameExtcodeRandomMainImg.Name = "chkSameExtcodeRandomMainImg";
this.chkSameExtcodeRandomMainImg.Size = new System.Drawing.Size(188, 21);
this.chkSameExtcodeRandomMainImg.TabIndex = 488;
this.chkSameExtcodeRandomMainImg.Text = "同货号主图随机+sku随机转主";
this.chkSameExtcodeRandomMainImg.UseVisualStyleBackColor = true;
//
// lblSkuRandomLetterNotes
//
this.lblSkuRandomLetterNotes.AutoSize = true;
this.lblSkuRandomLetterNotes.Font = new System.Drawing.Font("微软雅黑", 9F);
this.lblSkuRandomLetterNotes.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(959, 71);
this.lblSkuRandomLetterNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes";
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17);
this.lblSkuRandomLetterNotes.TabIndex = 641;
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括…";
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -432,6 +403,18 @@
this.btnAdd.Text = "一键上传";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// lblSkuRandomLetterNotes
//
this.lblSkuRandomLetterNotes.AutoSize = true;
this.lblSkuRandomLetterNotes.Font = new System.Drawing.Font("微软雅黑", 9F);
this.lblSkuRandomLetterNotes.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.lblSkuRandomLetterNotes.Location = new System.Drawing.Point(3, 98);
this.lblSkuRandomLetterNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes";
this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17);
this.lblSkuRandomLetterNotes.TabIndex = 641;
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括…";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -1420,12 +1403,61 @@
this.chkAddPrice.Text = "加价";
this.chkAddPrice.UseVisualStyleBackColor = true;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.Controls.Add(this.chkAiSkuAndMainImg);
this.flowLayoutPanel2.Controls.Add(this.chkSameExtcodeRandomMainImg);
this.flowLayoutPanel2.Controls.Add(this.chkLongTitle);
this.flowLayoutPanel2.Controls.Add(this.chkEnglishProdName);
this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel2.Location = new System.Drawing.Point(832, 96);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(538, 23);
this.flowLayoutPanel2.TabIndex = 500;
//
// chkAiSkuAndMainImg
//
this.chkAiSkuAndMainImg.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAiSkuAndMainImg.AutoSize = true;
this.chkAiSkuAndMainImg.Location = new System.Drawing.Point(386, 0);
this.chkAiSkuAndMainImg.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkAiSkuAndMainImg.Name = "chkAiSkuAndMainImg";
this.chkAiSkuAndMainImg.Size = new System.Drawing.Size(152, 21);
this.chkAiSkuAndMainImg.TabIndex = 680;
this.chkAiSkuAndMainImg.Text = "sku随机AI图+随机转主";
this.chkAiSkuAndMainImg.UseVisualStyleBackColor = true;
//
// chkSameExtcodeRandomMainImg
//
this.chkSameExtcodeRandomMainImg.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkSameExtcodeRandomMainImg.AutoSize = true;
this.chkSameExtcodeRandomMainImg.Location = new System.Drawing.Point(196, 0);
this.chkSameExtcodeRandomMainImg.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkSameExtcodeRandomMainImg.Name = "chkSameExtcodeRandomMainImg";
this.chkSameExtcodeRandomMainImg.Size = new System.Drawing.Size(188, 21);
this.chkSameExtcodeRandomMainImg.TabIndex = 488;
this.chkSameExtcodeRandomMainImg.Text = "同货号主图随机+sku随机转主";
this.chkSameExtcodeRandomMainImg.UseVisualStyleBackColor = true;
//
// chkLongTitle
//
this.chkLongTitle.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkLongTitle.AutoSize = true;
this.chkLongTitle.Location = new System.Drawing.Point(98, 0);
this.chkLongTitle.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkLongTitle.Name = "chkLongTitle";
this.chkLongTitle.Size = new System.Drawing.Size(96, 21);
this.chkLongTitle.TabIndex = 660;
this.chkLongTitle.Text = "500字长标题";
this.chkLongTitle.UseVisualStyleBackColor = true;
//
// chkEnglishProdName
//
this.chkEnglishProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkEnglishProdName.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkEnglishProdName.AutoSize = true;
this.chkEnglishProdName.Location = new System.Drawing.Point(864, 96);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.chkEnglishProdName.Location = new System.Drawing.Point(21, 0);
this.chkEnglishProdName.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.chkEnglishProdName.Name = "chkEnglishProdName";
this.chkEnglishProdName.Size = new System.Drawing.Size(75, 21);
this.chkEnglishProdName.TabIndex = 679;
@@ -1433,6 +1465,18 @@
this.chkEnglishProdName.UseVisualStyleBackColor = true;
this.chkEnglishProdName.CheckedChanged += new System.EventHandler(this.chkEnglishProdName_CheckedChanged);
//
// chkUseGlobalProductWords
//
this.chkUseGlobalProductWords.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkUseGlobalProductWords.AutoSize = true;
this.chkUseGlobalProductWords.Location = new System.Drawing.Point(1163, 60);
this.chkUseGlobalProductWords.Margin = new System.Windows.Forms.Padding(0);
this.chkUseGlobalProductWords.Name = "chkUseGlobalProductWords";
this.chkUseGlobalProductWords.Size = new System.Drawing.Size(75, 38);
this.chkUseGlobalProductWords.TabIndex = 773;
this.chkUseGlobalProductWords.Text = "使用全局\r\n重组标题";
this.chkUseGlobalProductWords.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1787,7 +1831,7 @@
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
this.colSupplierId.Width = 110;
this.colSupplierId.Width = 115;
//
// colSupplierName
//
@@ -1834,7 +1878,7 @@
this.colProdGetType.HeaderText = "商品来源";
this.colProdGetType.Name = "colProdGetType";
this.colProdGetType.ReadOnly = true;
this.colProdGetType.Width = 65;
this.colProdGetType.Width = 62;
//
// colSpuId
//
@@ -1918,7 +1962,7 @@
this.colAddTime.HeaderText = "认领时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
this.colAddTime.Width = 63;
this.colAddTime.Width = 62;
//
// colMdyTime
//
@@ -1927,7 +1971,7 @@
this.colMdyTime.HeaderText = "上传时间";
this.colMdyTime.Name = "colMdyTime";
this.colMdyTime.ReadOnly = true;
this.colMdyTime.Width = 63;
this.colMdyTime.Width = 62;
//
// colSubSa
//
@@ -1967,7 +2011,7 @@
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colEditNotes.Width = 62;
this.colEditNotes.Width = 38;
//
// colDelete
//
@@ -2027,6 +2071,7 @@
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).EndInit();
@@ -2044,6 +2089,8 @@
((System.ComponentModel.ISupportInitialize)(this.numAddPriceTimes)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
@@ -2149,6 +2196,21 @@
private DevComponents.DotNetBar.PanelEx pnlError;
private UserComponent.UcCheckBox chkNotChangeMainImg;
private System.Windows.Forms.TextBox txtNotChangeMainImg;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx panelEx1;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
private UserComponent.UcCheckBox chkUseGlobalProductWords;
private System.Windows.Forms.PictureBox pbFissionSetting;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -2176,17 +2238,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx panelEx1;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
}
}
@@ -134,6 +134,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var chkSel = this.dgvSelectProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSel.CheckedChanged += ChkSel_CheckedChanged;
this.dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
this.dgvSelectProduct.AddMergeColumnHeader(new List<string> { "colNotes", "colEditNotes" }, "备注");
this.dgvSelectProduct.AddMergeColumn(new List<string> { "colNotes", "colEditNotes" });
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
dgvSelectProduct.Columns["colDelete"].Visible = false;
@@ -200,6 +202,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
colOpResult.Width += dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth;
}
if(ClientMode == EnumClientMode.Client)
{
chkAiSkuAndMainImg.Visible = false;
}
}
this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括 " + string.Join(" ", skuRandomLetterArr) + " ";
@@ -498,6 +504,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// 查看map映射列表
var url = BaseClass.BuildObjString("product/get_select_prod_db_id_map_draft_id_list");
var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
@@ -688,6 +695,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
@@ -881,6 +890,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
if (ClientMode == EnumClientMode.ClientJit)
empty_data += "&is_client_jit=true";
@@ -940,6 +950,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
@@ -1345,6 +1356,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodParam.productName = selectProd.fission_product_name;
string headWords = "";
string centerName = "";
string endWords = "";
if (this.chkFission.Checked)
{
@@ -1362,32 +1374,26 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
//int[] heads = dbProd.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
string headTemp = dbProd.head_words.Trim();
string headTemp = dbProd.head_words.ParseToString().Trim();
if (chkUseGlobalProductWords.Checked) // 使用全局头词
headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length < 2)
{
if (GlobalConfig.ProductWords.HeadWords == null)
GlobalConfig.ProductWords.HeadWords = "";
//heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
}
if (heads.Length > 1 && heads[1] > heads[0])
if (heads.Length ==2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
// 尾词
if (this.chkEndWords.Checked)
{
endWords = string.IsNullOrEmpty(dbProd.end_words) ? "" : dbProd.end_words;
endWords = dbProd.end_words.ParseToString().Trim();
if (string.IsNullOrWhiteSpace(endWords))
endWords = string.IsNullOrEmpty(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
if (chkUseGlobalProductWords.Checked) // 使用全局尾词
endWords = GlobalConfig.ProductWords.EndWords.ParseToString().Trim();
}
// 标题部分打乱
@@ -1419,7 +1425,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
centerWords += fissionTxt + joinText;
}
string centerName = originProductName + centerWords.ParseToString();
centerName = originProductName + centerWords.ParseToString();
// 标题完全打乱
if (chkReFissionAllProdName.Checked)
@@ -1905,15 +1911,30 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
if (chkChangeSizeAndNumber.Checked)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
if (numberOfPieces > 1)
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
}
else
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
{
// 件数为1必须设置单品
skuClassification = 1,
numberOfPieces = 1,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
};
}
}
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
@@ -2484,16 +2505,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
productI18nParam productI18nEn = new productI18nParam
{
language = "en",
productName = prodParam.productName,
//productName = prodParam.productName,
productName = centerName.Trim(',', ' ') + '.',
};
if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(headWords))
{
productI18nEn.productName = productI18nEn.productName.Replace(headWords, "");
}
if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(endWords))
{
productI18nEn.productName = productI18nEn.productName.Replace(endWords, "");
}
//if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(headWords))
//{
// productI18nEn.productName = productI18nEn.productName.Replace(headWords, "");
//}
//if (CountChineseCharacters(productI18nEn.productName) > 0 && !string.IsNullOrEmpty(endWords))
//{
// productI18nEn.productName = productI18nEn.productName.Replace(endWords, "");
//}
if (CountChineseCharacters(productI18nEn.productName) > 0)
{
Invoke(new Action(() =>
@@ -3252,10 +3274,7 @@ Content-Disposition: form-data; name=""sign""
return;
}
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(
prodList.Select(p => p.id.ToString()).ToList(),
prodList.Select(p => p.shop_id).ToList()
);
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(prodList.ToList());
subSaForm.SaveCompleteWithDescribe += SubSaForm_SaveComplete;
subSaForm.ShowDialog();
}
@@ -3389,6 +3408,7 @@ Content-Disposition: form-data; name=""sign""
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
if (ClientMode == EnumClientMode.ClientJit)
empty_data += "&is_client_jit=true";
@@ -3404,13 +3424,22 @@ Content-Disposition: form-data; name=""sign""
continue;
}
var fissionProductName = DbProductListForm.GetFissionProductName(temuDBProd);
var fissionProductName = "";
if (chkUseGlobalProductWords.Checked)
{
fissionProductName = GetFissionGlobalProductName(temuDBProd);
}
else
{
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;
var data = UserLogin.GetSignaturex();
data += "&db_id=" + prod.id;
data += "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.Trim());
if (ClientMode == EnumClientMode.ClientJit)
data += "&is_client_jit=true";
@@ -3450,6 +3479,26 @@ Content-Disposition: form-data; name=""sign""
}));
}
public string GetFissionGlobalProductName(KJDDBProduct prod)
{
string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
string endWords = string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
string centerWords = ",";
return (headWords + prod.product_name + centerWords + endWords).Trim(',');
}
private void chkSkuRandomPrice_CheckedChanged(object sender, EventArgs e)
{
@@ -3615,7 +3664,8 @@ Content-Disposition: form-data; name=""sign""
public static int CountChineseCharacters(string text)
{
// 使用正则表达式匹配中文字符
string pattern = @"[\u4e00-\u9fff]";
//string pattern = @"[\u4e00-\u9fff]";
string pattern = @"[\u4e00-\u9fff。?!,、;:“”‘’()《》【】~]";
MatchCollection matches = Regex.Matches(text, pattern);
return matches.Count;
}
@@ -3682,5 +3732,11 @@ Content-Disposition: form-data; name=""sign""
break;
}
}
private void pbFissionSetting_Click(object sender, EventArgs e)
{
ProductThirdSelectForms.ProductThirdTitleForm titleForm = new ProductThirdSelectForms.ProductThirdTitleForm();
titleForm.ShowDialog();
}
}
}
@@ -25,17 +25,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
List<string> lstProductSelectId = new List<string>();
List<string> lstShopSelectId = new List<string>();
List<TemuDBProductSelect> lstDbProdSelect = new List<TemuDBProductSelect>();
SetSubSaType setSubSaType;
List<ShopSubAccountInfo> lstSubSa = new List<ShopSubAccountInfo>();
public DbProductSelectSetSubSaForm(List<string> ProductSelectIds = null,
List<string> ShopSelectIds = null, SetSubSaType type = SetSubSaType.DbProduct)
public DbProductSelectSetSubSaForm(List<TemuDBProductSelect> dbProdSelectLst, SetSubSaType type = SetSubSaType.DbProduct)
{
InitializeComponent();
if (ProductSelectIds != null)
lstProductSelectId.AddRange(ProductSelectIds);
if (ShopSelectIds != null)
lstShopSelectId.AddRange(ShopSelectIds);
if (dbProdSelectLst != null)
{
lstDbProdSelect = dbProdSelectLst;
lstProductSelectId.AddRange(dbProdSelectLst.Select(p => p.id.ToString()).ToList());
lstShopSelectId.AddRange(dbProdSelectLst.Select(p => p.shop_id).ToList());
}
this.setSubSaType = type;
}
@@ -67,6 +69,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
return "请选择要分配的二级管理员!";
}
if (lstDbProdSelect == null || lstDbProdSelect.Count == 0)
{
return "请选择需要分配二级管理员的商品!";
}
var sub_sa = selectRow.Cells["colSubSaName"].Value.ParseToString();
var sub_sa_nick = selectRow.Cells["colSubSaNick"].Value.ParseToString();
@@ -76,11 +82,27 @@ namespace TemuKJD.KJDForms.ProductSelectForms
if (isShopAllSameSaCheck)
{
data.Append("&shop_id=" + string.Join(",", lstShopSelectId));
data.Append("&select_add_time=" + lstDbProdSelect.Max(p => p.add_time).ToString("yyyy-MM-dd HH:mm:ss"));
data.Append("&status=待上传");
}
else
{
data.Append("&db_id=" + string.Join(",", lstProductSelectId));
var yearLst = lstDbProdSelect.Select(p => p.add_time.Year).Distinct().ToList();
if (yearLst.All(y => y < 2026))
{
data.Append("&db_id=" + string.Join(",", lstProductSelectId));
data.Append("&select_add_time=" + lstDbProdSelect.Max(p => p.add_time).ToString("yyyy-MM-dd HH:mm:ss"));
}
else
{
string dbIdInfo = "[";
foreach (var year in yearLst)
{
dbIdInfo += "{\"year\":" + year + ",\"db_ids\":\"" + string.Join(",", lstDbProdSelect.Where(p => p.add_time.Year == year).Select(p => p.id)) + "\"}";
}
dbIdInfo += "]";
data.Append("&db_id_infos=" + dbIdInfo);
}
}
string url = "";
if (setSubSaType == SetSubSaType.DbProduct)
@@ -63,8 +63,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=" + dbProdSelect.id;
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -422,6 +422,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -69,7 +69,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colOriginalPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMarkupTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colExtraPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -515,7 +515,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colOriginalPrice,
this.colMarkupTimes,
this.colExtraPrice,
this.conNotes,
this.colNotes,
this.colEdit,
this.colDelete});
this.dgvPrice.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -591,11 +591,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colExtraPrice.Name = "colExtraPrice";
this.colExtraPrice.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEdit
//
@@ -689,7 +689,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colOriginalPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colMarkupTimes;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtraPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
}
@@ -135,7 +135,7 @@
<metadata name="colExtraPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -42,11 +42,14 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown();
this.btnForceEnable = new DevComponents.DotNetBar.PanelEx();
this.label22 = new System.Windows.Forms.Label();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.label14 = new System.Windows.Forms.Label();
this.btnSetSubSa = new DevComponents.DotNetBar.PanelEx();
this.btnAdd = new DevComponents.DotNetBar.PanelEx();
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
this.btnReFission = new DevComponents.DotNetBar.PanelEx();
this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -111,6 +114,7 @@
this.label4 = new System.Windows.Forms.Label();
this.txtProdName = new System.Windows.Forms.TextBox();
this.lblUserNotes = new System.Windows.Forms.Label();
this.chkUseGlobalFissionSetting = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel2 = new System.Windows.Forms.Panel();
@@ -131,6 +135,7 @@
this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImportCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colProdGetType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -155,6 +160,7 @@
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).BeginInit();
@@ -192,11 +198,14 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.numMaxWaitSecond);
this.splitContainer1.Panel1.Controls.Add(this.btnForceEnable);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.label14);
this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting);
this.splitContainer1.Panel1.Controls.Add(this.btnReFission);
this.splitContainer1.Panel1.Controls.Add(this.chkShowDel);
this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa);
@@ -228,14 +237,90 @@
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.btnDel);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.chkUseGlobalFissionSetting);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1518, 638);
this.splitContainer1.SplitterDistance = 96;
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 2;
//
// numMaxWaitSecond
//
this.numMaxWaitSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numMaxWaitSecond.Font = new System.Drawing.Font("微软雅黑", 8F);
this.numMaxWaitSecond.Location = new System.Drawing.Point(1328, 68);
this.numMaxWaitSecond.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.numMaxWaitSecond.Maximum = new decimal(new int[] {
500,
0,
0,
0});
this.numMaxWaitSecond.Minimum = new decimal(new int[] {
100,
0,
0,
0});
this.numMaxWaitSecond.Name = "numMaxWaitSecond";
this.numMaxWaitSecond.Size = new System.Drawing.Size(38, 22);
this.numMaxWaitSecond.TabIndex = 780;
this.numMaxWaitSecond.Value = new decimal(new int[] {
120,
0,
0,
0});
this.numMaxWaitSecond.ValueChanged += new System.EventHandler(this.numMaxWaitSecond_ValueChanged);
//
// btnForceEnable
//
this.btnForceEnable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnForceEnable.CanvasColor = System.Drawing.SystemColors.Control;
this.btnForceEnable.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnForceEnable.DisabledBackColor = System.Drawing.Color.Empty;
this.btnForceEnable.Location = new System.Drawing.Point(1370, 67);
this.btnForceEnable.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnForceEnable.Name = "btnForceEnable";
this.btnForceEnable.Size = new System.Drawing.Size(144, 24);
this.btnForceEnable.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnForceEnable.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnForceEnable.Style.GradientAngle = 90;
this.btnForceEnable.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnForceEnable.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnForceEnable.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnForceEnable.TabIndex = 778;
this.btnForceEnable.Text = "强制解锁(上传卡住时用)";
this.btnForceEnable.Click += new System.EventHandler(this.btnForceEnable_Click);
//
// label22
//
this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(1251, 71);
this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(88, 17);
this.label22.TabIndex = 779;
this.label22.Text = "超时跳过(秒):";
//
// pbFissionSetting
//
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1228, 68);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(22, 22);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 191;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -265,12 +350,12 @@
//
this.label14.AutoSize = true;
this.label14.ForeColor = System.Drawing.SystemColors.MenuHighlight;
this.label14.Location = new System.Drawing.Point(959, 71);
this.label14.Location = new System.Drawing.Point(3, 98);
this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(307, 17);
this.label14.Size = new System.Drawing.Size(235, 17);
this.label14.TabIndex = 640;
this.label14.Text = "备注:新的商品上传货号为固定前缀 EC + 上家商品SKC";
this.label14.Text = "备注:上传货号为固定前缀 EC + 上家SKC";
//
// btnSetSubSa
//
@@ -322,19 +407,6 @@
this.btnAdd.Text = "一键上传";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// pbFissionSetting
//
this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮;
this.pbFissionSetting.Location = new System.Drawing.Point(1164, 38);
this.pbFissionSetting.Name = "pbFissionSetting";
this.pbFissionSetting.Size = new System.Drawing.Size(24, 24);
this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbFissionSetting.TabIndex = 191;
this.pbFissionSetting.TabStop = false;
this.pbFissionSetting.Visible = false;
this.pbFissionSetting.Click += new System.EventHandler(this.pbFissionSetting_Click);
//
// btnReFission
//
this.btnReFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -342,9 +414,9 @@
this.btnReFission.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReFission.DisabledBackColor = System.Drawing.Color.Empty;
this.btnReFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReFission.Location = new System.Drawing.Point(1188, 38);
this.btnReFission.Location = new System.Drawing.Point(1164, 38);
this.btnReFission.Name = "btnReFission";
this.btnReFission.Size = new System.Drawing.Size(62, 24);
this.btnReFission.Size = new System.Drawing.Size(86, 24);
this.btnReFission.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnReFission.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReFission.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -357,7 +429,7 @@
this.btnReFission.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReFission.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReFission.TabIndex = 449;
this.btnReFission.Text = "重组标题";
this.btnReFission.Text = "批量重组标题";
this.btnReFission.Click += new System.EventHandler(this.btnReFission_Click);
//
// chkShowDel
@@ -1265,6 +1337,21 @@
this.lblUserNotes.TabIndex = 460;
this.lblUserNotes.Text = "用户备注";
//
// chkUseGlobalFissionSetting
//
this.chkUseGlobalFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkUseGlobalFissionSetting.AutoSize = true;
this.chkUseGlobalFissionSetting.Checked = true;
this.chkUseGlobalFissionSetting.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseGlobalFissionSetting.Enabled = false;
this.chkUseGlobalFissionSetting.Location = new System.Drawing.Point(1163, 60);
this.chkUseGlobalFissionSetting.Margin = new System.Windows.Forms.Padding(0);
this.chkUseGlobalFissionSetting.Name = "chkUseGlobalFissionSetting";
this.chkUseGlobalFissionSetting.Size = new System.Drawing.Size(75, 38);
this.chkUseGlobalFissionSetting.TabIndex = 774;
this.chkUseGlobalFissionSetting.Text = "使用全局\r\n重组标题";
this.chkUseGlobalFissionSetting.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1284,15 +1371,15 @@
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1518, 538);
this.splitContainer2.SplitterDistance = 509;
this.splitContainer2.Size = new System.Drawing.Size(1518, 514);
this.splitContainer2.SplitterDistance = 485;
this.splitContainer2.TabIndex = 0;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(734, 227);
this.pbLoading.Location = new System.Drawing.Point(734, 215);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1450,6 +1537,7 @@
this.colLogin,
this.colImportCookies,
this.colCopyCookies,
this.colProdGetType,
this.colSpuId,
this.colSkcId,
this.colImgUrl,
@@ -1474,7 +1562,7 @@
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowHeadersWidth = 40;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 509);
this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 485);
this.dgvSelectProduct.TabIndex = 190;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
@@ -1501,7 +1589,7 @@
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
this.colSupplierId.Width = 120;
this.colSupplierId.Width = 115;
//
// colSupplierName
//
@@ -1510,7 +1598,6 @@
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
this.colSupplierName.Width = 110;
//
// colInShop
//
@@ -1528,21 +1615,28 @@
//
// colImportCookies
//
this.colImportCookies.HeaderText = "导入Cookie";
this.colImportCookies.HeaderText = "导入Cook";
this.colImportCookies.Name = "colImportCookies";
this.colImportCookies.ReadOnly = true;
this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImportCookies.Width = 80;
this.colImportCookies.Width = 70;
//
// colCopyCookies
//
this.colCopyCookies.HeaderText = "复制Cookie";
this.colCopyCookies.HeaderText = "复制Cook";
this.colCopyCookies.Name = "colCopyCookies";
this.colCopyCookies.ReadOnly = true;
this.colCopyCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCopyCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCopyCookies.Width = 80;
this.colCopyCookies.Width = 70;
//
// colProdGetType
//
this.colProdGetType.HeaderText = "商品来源";
this.colProdGetType.Name = "colProdGetType";
this.colProdGetType.ReadOnly = true;
this.colProdGetType.Width = 62;
//
// colSpuId
//
@@ -1585,7 +1679,7 @@
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 160;
this.colProductName.Width = 150;
//
// colProductCat
//
@@ -1596,14 +1690,14 @@
this.colProductCat.ReadOnly = true;
this.colProductCat.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductCat.Width = 72;
this.colProductCat.Width = 70;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
this.colExtCode.Width = 125;
this.colExtCode.Width = 122;
//
// colStatus
//
@@ -1628,7 +1722,7 @@
this.colAddTime.HeaderText = "添加时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
this.colAddTime.Width = 65;
this.colAddTime.Width = 62;
//
// colMdyTime
//
@@ -1637,7 +1731,7 @@
this.colMdyTime.HeaderText = "上传时间";
this.colMdyTime.Name = "colMdyTime";
this.colMdyTime.ReadOnly = true;
this.colMdyTime.Width = 65;
this.colMdyTime.Width = 62;
//
// colSubSa
//
@@ -1677,7 +1771,7 @@
this.colEditNotes.ReadOnly = true;
this.colEditNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colEditNotes.Width = 62;
this.colEditNotes.Width = 38;
//
// ColDelete
//
@@ -1737,6 +1831,7 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numMaxWaitSecond)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbFissionSetting)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
@@ -1846,6 +1941,17 @@
private System.Windows.Forms.Panel panel2;
private UserComponent.DataGridViewEx dgvMapDraftIds;
private UserComponent.UcCheckBox chkSkuRandomLetter;
private DevComponents.DotNetBar.PanelEx panelEx1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
private UserComponent.UcCheckBox chkUseGlobalFissionSetting;
private System.Windows.Forms.NumericUpDown numMaxWaitSecond;
private DevComponents.DotNetBar.PanelEx btnForceEnable;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1854,6 +1960,7 @@
private System.Windows.Forms.DataGridViewLinkColumn colLogin;
private System.Windows.Forms.DataGridViewLinkColumn colImportCookies;
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewTextBoxColumn colProdGetType;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
@@ -1872,12 +1979,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private DevComponents.DotNetBar.PanelEx panelEx1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId;
private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId;
private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage;
private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage;
}
}
@@ -61,13 +61,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
{
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
this.dgvSelectProduct.AddSelectorColumn("colSelect");
this.dgvSelectProduct.AddMergeColumnHeader(new List<string> { "colNotes", "colEditNotes" }, "备注");
this.dgvSelectProduct.AddMergeColumn(new List<string> { "colNotes", "colEditNotes" });
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
dgvSelectProduct.Columns["colDelete"].Visible = false;
chkShowDel.Visible = false;
btnSetSubSa.Visible = false;
chkNoSubSa.Visible = false;
pbFissionSetting.Visible = false;
pbFissionSetting.Visible = true;
btnReFission.Visible = false;
chkUploadProd.Visible = false; // 直接上传
@@ -78,7 +80,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
ucSplitPage1.IsShowPageSize = false; // 可调整分页
if (BaseClass.SaLevel == 1)
if (BaseClass.SaLevel == 1 && ClientMode == EnumClientMode.Admin)
{
dgvSelectProduct.Columns["colSubSaNick"].Visible = true;
chkShowDel.Visible = true;
@@ -194,6 +196,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
shopLst.FirstOrDefault(s => s.ShopId == prodSelect.shop_id)?.LoginStatus2 == "国际版在线" ? "在线" : "登录",
"导入Cookie",
"复制Cookie",
"库存采集",
prodSelect.spu_id,
prodSelect.skc_id,
prodSelect.main_img.Replace("https:", "http:") + "?imageMogr2/thumbnail/54x54&quot;",
@@ -412,6 +415,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
bool flag = true;
var url = BaseClass.BuildObjString("product_third/get_select_prod_db_id_map_draft_id_list");
var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -525,6 +529,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
break;
case "导入Cook":
case "导入Cookie":
{
var shop = GetShop(shopId);
@@ -533,6 +538,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
updateCookieForm.ShowDialog();
}
break;
case "复制Cook":
case "复制Cookie":
{
var shop = GetShop(shopId);
@@ -612,6 +618,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -684,6 +692,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
}
int timeOutSeconds = 120;
void AddProductDraft(TemuDBProductSelect[] prodSelect)
{
if (prodSelect == null || prodSelect.Count() == 0)
@@ -773,6 +782,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var empty_url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -816,19 +826,34 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
temuDBProd.product_json = prodDetailJsonReplace2;
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱或直接上传到未发布
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
var t = Task.Run(() =>
{
if (ClientMode == EnumClientMode.Admin)
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
else
ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
try
{
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱或直接上传到未发布
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
{
if (ClientMode == EnumClientMode.Admin)
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
else
ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
}
}
catch(Exception ex)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"上传失败:" + ex.Message + "\"}";
}
});
t.Wait(timeOutSeconds * 1000);
if (!t.IsCompleted)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"上传超时\"}";
}
}
catch (Exception ex)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}";
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"解析失败:" + ex.Message + "\"}";
}
Thread.Sleep(200);
@@ -849,6 +874,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
@@ -1157,12 +1183,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
GlobalConfig.ProductWords.HeadWords = "";
//int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length > 1 && heads[1] > heads[0])
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
// 尾词
@@ -1479,15 +1508,30 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
if (chkChangeSizeAndNumber.Checked)
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
if (numberOfPieces > 1)
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq2()
{
skuClassification = 2,
numberOfPieces = numberOfPieces,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
individuallyPacked = 1,
};
}
else
{
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
{
// 件数为1必须设置单品
skuClassification = 1,
numberOfPieces = 1,
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
};
}
}
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
@@ -1824,11 +1868,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
return;
}
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(
prodList.Select(p => p.id.ToString()).ToList(),
prodList.Select(p => p.shop_id).ToList(),
SetSubSaType.ThirdProduct
);
DbProductSelectSetSubSaForm subSaForm = new DbProductSelectSetSubSaForm(prodList.ToList(), SetSubSaType.ThirdProduct);
subSaForm.SaveCompleteWithDescribe += SubSaForm_SaveComplete;
subSaForm.ShowDialog();
}
@@ -1966,6 +2006,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var empty_url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -1984,8 +2025,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = "";
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id;
var data = UserLogin.GetSignaturex();
data += "&db_id=" + prod.id;
data += "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.Trim());
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -2028,26 +2070,35 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{
//var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
////var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
//string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
//var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
//var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
//int minNum = 5;
//int maxNum = 99;
//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) + headTemp.Replace(minNum + "-" + maxNum, "");
//}
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
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) + headTemp.Replace(minNum + "-" + maxNum, "");
}
if (heads.Length == 2 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
else
headWords = headTemp;
}
string endWords = string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
@@ -2158,5 +2209,18 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
break;
}
}
private void btnForceEnable_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定解锁吗?可能造成性能损耗或重复上传。").DialogResult == DialogResult.OK)
{
this.btnAdd.Enabled = true;
}
}
private void numMaxWaitSecond_ValueChanged(object sender, EventArgs e)
{
this.timeOutSeconds = numMaxWaitSecond.Value.ParseToInt();
}
}
}
@@ -159,6 +159,9 @@
<metadata name="colCopyCookies.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProdGetType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -428,6 +428,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
+34 -34
View File
@@ -30,6 +30,8 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopAddEditForm));
this.panel2 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label7 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtBuyAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
@@ -44,8 +46,6 @@
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label8 = new System.Windows.Forms.Label();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
@@ -75,6 +75,35 @@
this.panel2.TabIndex = 1;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386;
this.label8.Text = " 备注";
//
// txtNotes
//
//
//
//
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtNotes.Border.PaddingBottom = 2;
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 133);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(172, 23);
this.txtNotes.TabIndex = 385;
//
// label7
//
this.label7.AutoSize = true;
@@ -251,35 +280,6 @@
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// txtNotes
//
//
//
//
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtNotes.Border.PaddingBottom = 2;
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 133);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(172, 23);
this.txtNotes.TabIndex = 385;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386;
this.label8.Text = " 备注";
//
// ShopAddEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -302,7 +302,6 @@
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtShopPassword;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtLoginName;
private UserControls.ButtonEx btnOk;
@@ -311,11 +310,12 @@
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.Controls.TextBoxX txtBuyAccount;
private System.Windows.Forms.Label label6;
private DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
public System.Windows.Forms.TextBox txtShopPassword;
public DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
public DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
}
}
@@ -15,6 +15,7 @@ namespace TemuKJD.KJDForms.ShopForms
{
public partial class ShopAddEditForm : LRBaseForm
{
public bool HasChange = false;
ShopLoginInfo shopLoginInfo = null;
bool isAdd = true;
@@ -56,7 +57,8 @@ namespace TemuKJD.KJDForms.ShopForms
shop.GroupName = shopLoginInfo.GroupName;
shop.Notes = shopLoginInfo.Notes;
}
HasChange = true;
this.OnSaveComplete(shopLoginInfo, isAdd);
this.Close();
}
+59 -48
View File
@@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = 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();
this.label1 = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
@@ -54,11 +54,14 @@
this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -77,8 +80,6 @@
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -404,26 +405,28 @@
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colEditNotes,
this.colCookie,
this.colSubUser,
this.colGroupName,
@@ -451,6 +454,31 @@
this.dgvShop.TabIndex = 5;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1264, 29);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -480,11 +508,18 @@
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colEditNotes
//
this.colEditNotes.FillWeight = 25F;
this.colEditNotes.HeaderText = "编辑备注";
this.colEditNotes.Name = "colEditNotes";
this.colEditNotes.ReadOnly = true;
//
// colCookie
//
@@ -638,31 +673,6 @@
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1264, 29);
this.statusBar.TabIndex = 1;
//
// ShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -722,11 +732,14 @@
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private UserControls.ButtonEx btnRefreshShop;
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkLoginAds;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colCookie;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName;
@@ -745,7 +758,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkLoginAds;
}
}
+27 -3
View File
@@ -521,6 +521,7 @@ namespace TemuKJD.KJDForms.ShopForms
param.ShopId,
param.ShopAccount,
param.Notes,
"编辑",
param.Cookies,
param.SubUserName,
param.GroupName,
@@ -845,6 +846,10 @@ namespace TemuKJD.KJDForms.ShopForms
this.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin;
this.splitContainer2.FixedPanel = FixedPanel.Panel2;
this.dgvShop.AddMergeColumnHeader(new List<string>() { "colNotes", "colEditNotes" }, "备注");
this.dgvShop.AddMergeColumn(new List<string>() { "colNotes", "colEditNotes" });
this.dgvShop.Columns["colEditNotes"].Width = 30;
//子账号
//var url = BaseClass.BuildObjString("shop&act=get_shop_user_sub_group");
//var data = UserLogin.GetSignaturex();
@@ -974,9 +979,28 @@ namespace TemuKJD.KJDForms.ShopForms
StartUp.SaveLocalShopLoginInfo();
break;
case "编辑":
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
}
break;
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.ShowDialog();
if (editForm.HasChange)
{
ShopBLL.MdyServerShopSubInfo(shop, true);
btnSearch_Click(null, null);
}
}
break;
case "登录":
IsOperate = true;
+4 -1
View File
@@ -129,7 +129,10 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEditNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCookie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+9
View File
@@ -284,6 +284,15 @@ namespace TemuKJD
{
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
lblVersionName.Text = "[" + BaseClass.UserVersionString + "]";
#if DEBUG
lblVersionName.Visible = true;
lblVersionName.Text = "[Debug]";
#endif
if (BaseClass.LoginApiUrl.Contains("localhost") || BaseClass.LoginApiUrl.Contains("127.0.0.1"))
{
lblVersionName.Visible = true;
lblVersionName.Text = "[Dev]";
}
Text = (BaseClass.ShopName + "-" + BaseClass.ToolName).TrimStart('-');
}
+55 -55
View File
@@ -34,6 +34,8 @@ namespace TemuKJD
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.tpMainForm = new System.Windows.Forms.ToolTip(this.components);
this.picPinDuoDuoToken = new System.Windows.Forms.PictureBox();
this.pbAnnouncement = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.bodyPanelBg = new DevComponents.DotNetBar.PanelEx();
this.bodyPanel = new DevComponents.DotNetBar.PanelEx();
@@ -51,16 +53,16 @@ namespace TemuKJD
this.pnlTools = new DevComponents.DotNetBar.PanelEx();
this.pnlOrder = new DevComponents.DotNetBar.PanelEx();
this.pbLogo = new System.Windows.Forms.PictureBox();
this.lklbGetHwCode = new TemuKJD.UserComponent.LinkLabelLc();
this.plTopRight = new System.Windows.Forms.Panel();
this.lblVersionName = new System.Windows.Forms.Label();
this.lblVersionInfo = new System.Windows.Forms.Label();
this.lblContactSupport = new DevComponents.DotNetBar.LabelX();
this.picPinDuoDuoToken = new System.Windows.Forms.PictureBox();
this.pbAnnouncement = new System.Windows.Forms.PictureBox();
this.max = new DevComponents.DotNetBar.PanelEx();
this.min = new DevComponents.DotNetBar.PanelEx();
this.close = new DevComponents.DotNetBar.PanelEx();
this.lklbGetHwCode = new TemuKJD.UserComponent.LinkLabelLc();
((System.ComponentModel.ISupportInitialize)(this.picPinDuoDuoToken)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbAnnouncement)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.bodyPanelBg.SuspendLayout();
this.bodyPanel.SuspendLayout();
@@ -68,14 +70,44 @@ namespace TemuKJD
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
this.plTopRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picPinDuoDuoToken)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbAnnouncement)).BeginInit();
this.SuspendLayout();
//
// tpMainForm
//
this.tpMainForm.AutomaticDelay = 300;
//
// picPinDuoDuoToken
//
this.picPinDuoDuoToken.Cursor = System.Windows.Forms.Cursors.Hand;
this.picPinDuoDuoToken.Image = ((System.Drawing.Image)(resources.GetObject("picPinDuoDuoToken.Image")));
this.picPinDuoDuoToken.Location = new System.Drawing.Point(144, 3);
this.picPinDuoDuoToken.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.picPinDuoDuoToken.Name = "picPinDuoDuoToken";
this.picPinDuoDuoToken.Size = new System.Drawing.Size(23, 23);
this.picPinDuoDuoToken.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picPinDuoDuoToken.TabIndex = 57;
this.picPinDuoDuoToken.TabStop = false;
this.tpMainForm.SetToolTip(this.picPinDuoDuoToken, "系统设置");
this.picPinDuoDuoToken.Visible = false;
this.picPinDuoDuoToken.Click += new System.EventHandler(this.PicPinDuoDuoToken_Click);
//
// pbAnnouncement
//
this.pbAnnouncement.BackColor = System.Drawing.Color.Transparent;
this.pbAnnouncement.Image = ((System.Drawing.Image)(resources.GetObject("pbAnnouncement.Image")));
this.pbAnnouncement.Location = new System.Drawing.Point(115, 3);
this.pbAnnouncement.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.pbAnnouncement.Name = "pbAnnouncement";
this.pbAnnouncement.Size = new System.Drawing.Size(23, 23);
this.pbAnnouncement.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbAnnouncement.TabIndex = 57;
this.pbAnnouncement.TabStop = false;
this.tpMainForm.SetToolTip(this.pbAnnouncement, "产品公告");
this.pbAnnouncement.Visible = false;
this.pbAnnouncement.Click += new System.EventHandler(this.pbAnnouncement_Click);
this.pbAnnouncement.MouseEnter += new System.EventHandler(this.pbAnnouncement_MouseEnter);
this.pbAnnouncement.MouseLeave += new System.EventHandler(this.pbAnnouncement_MouseLeave);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -510,6 +542,21 @@ namespace TemuKJD
this.pbLogo.TabStop = false;
this.pbLogo.Click += new System.EventHandler(this.logo_Click);
//
// lklbGetHwCode
//
this.lklbGetHwCode.AutoSize = true;
this.lklbGetHwCode.Font = new System.Drawing.Font("Yu Gothic UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lklbGetHwCode.LinkColor = System.Drawing.Color.WhiteSmoke;
this.lklbGetHwCode.Location = new System.Drawing.Point(125, 3);
this.lklbGetHwCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lklbGetHwCode.Name = "lklbGetHwCode";
this.lklbGetHwCode.Size = new System.Drawing.Size(52, 15);
this.lklbGetHwCode.TabIndex = 89;
this.lklbGetHwCode.TabStop = true;
this.lklbGetHwCode.Text = "HwCode";
this.lklbGetHwCode.Visible = false;
this.lklbGetHwCode.Click += new System.EventHandler(this.lklbGetHwCode_Click);
//
// plTopRight
//
this.plTopRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -575,38 +622,6 @@ namespace TemuKJD
this.lblContactSupport.Visible = false;
this.lblContactSupport.Click += new System.EventHandler(this.lblContactSupport_Click);
//
// picPinDuoDuoToken
//
this.picPinDuoDuoToken.Cursor = System.Windows.Forms.Cursors.Hand;
this.picPinDuoDuoToken.Image = ((System.Drawing.Image)(resources.GetObject("picPinDuoDuoToken.Image")));
this.picPinDuoDuoToken.Location = new System.Drawing.Point(144, 3);
this.picPinDuoDuoToken.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.picPinDuoDuoToken.Name = "picPinDuoDuoToken";
this.picPinDuoDuoToken.Size = new System.Drawing.Size(23, 23);
this.picPinDuoDuoToken.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picPinDuoDuoToken.TabIndex = 57;
this.picPinDuoDuoToken.TabStop = false;
this.tpMainForm.SetToolTip(this.picPinDuoDuoToken, "系统设置");
this.picPinDuoDuoToken.Visible = false;
this.picPinDuoDuoToken.Click += new System.EventHandler(this.PicPinDuoDuoToken_Click);
//
// pbAnnouncement
//
this.pbAnnouncement.BackColor = System.Drawing.Color.Transparent;
this.pbAnnouncement.Image = ((System.Drawing.Image)(resources.GetObject("pbAnnouncement.Image")));
this.pbAnnouncement.Location = new System.Drawing.Point(115, 3);
this.pbAnnouncement.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.pbAnnouncement.Name = "pbAnnouncement";
this.pbAnnouncement.Size = new System.Drawing.Size(23, 23);
this.pbAnnouncement.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbAnnouncement.TabIndex = 57;
this.pbAnnouncement.TabStop = false;
this.tpMainForm.SetToolTip(this.pbAnnouncement, "产品公告");
this.pbAnnouncement.Visible = false;
this.pbAnnouncement.Click += new System.EventHandler(this.pbAnnouncement_Click);
this.pbAnnouncement.MouseEnter += new System.EventHandler(this.pbAnnouncement_MouseEnter);
this.pbAnnouncement.MouseLeave += new System.EventHandler(this.pbAnnouncement_MouseLeave);
//
// max
//
this.max.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -685,21 +700,6 @@ namespace TemuKJD
this.close.TabIndex = 5;
this.close.Click += new System.EventHandler(this.close_Click);
//
// lklbGetHwCode
//
this.lklbGetHwCode.AutoSize = true;
this.lklbGetHwCode.Font = new System.Drawing.Font("Yu Gothic UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lklbGetHwCode.LinkColor = System.Drawing.Color.WhiteSmoke;
this.lklbGetHwCode.Location = new System.Drawing.Point(125, 3);
this.lklbGetHwCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lklbGetHwCode.Name = "lklbGetHwCode";
this.lklbGetHwCode.Size = new System.Drawing.Size(52, 15);
this.lklbGetHwCode.TabIndex = 89;
this.lklbGetHwCode.TabStop = true;
this.lklbGetHwCode.Text = "HwCode";
this.lklbGetHwCode.Visible = false;
this.lklbGetHwCode.Click += new System.EventHandler(this.lklbGetHwCode_Click);
//
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -719,6 +719,8 @@ namespace TemuKJD
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Resize += new System.EventHandler(this.MainForm_Resize);
((System.ComponentModel.ISupportInitialize)(this.picPinDuoDuoToken)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbAnnouncement)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.bodyPanelBg.ResumeLayout(false);
this.bodyPanel.ResumeLayout(false);
@@ -728,8 +730,6 @@ namespace TemuKJD
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit();
this.plTopRight.ResumeLayout(false);
this.plTopRight.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picPinDuoDuoToken)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbAnnouncement)).EndInit();
this.ResumeLayout(false);
}
@@ -761,9 +761,9 @@ namespace TemuKJD
public DevComponents.DotNetBar.PanelEx pnlMarket;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private DevComponents.DotNetBar.PanelEx pnlSA;
private System.Windows.Forms.Label lblVersionName;
private System.Windows.Forms.Label lblVersionInfo;
public DevComponents.DotNetBar.PanelEx pnlJit;
public System.Windows.Forms.Label lblVersionName;
}
}
+36 -36
View File
@@ -121,6 +121,42 @@
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="picPinDuoDuoToken.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACwwAAAsMAT9AIsgAAAOxSURBVFhHpZdJiFVXEIaNOIJI
L3QjCioxGsdGRV3E4EJxEaIdJxxRQVFEdKMiYmzNQo2I9MaYgKCCIAQkWSQOiDguVJC4FCPaJpoYArGd
CBHDJ//zv6/rnndf93v6Q71376k6p4ZTVefcLl3qANAEHAEuAL8AbSY9a0y82em89wLQ4IVbgaM2oqGK
nHiSkazmVMjVBWAncAtYkfI6g+Z4bnPK6xT2RmHdmfLqRXCitmgAjQ5hU8p7V3hrZERjysvBnkt5h4JA
V2AcMNc0DeiZykXYsY4jYYGqngMZDQH+Ae6bXgIrA79EKbJIpOMleK8K9xyYCKwF+nlxeSxkyq4Cu8L7
DGAR0KNgrUo9Dn3ZssSTBVb2F3AZmAAcBl4HmbPARWA6sNQReQbsBXqnEanYCtduudTCwmOA/4FDwFBX
xr/AHeCrIPeFDXgMvAC2AJO9TfsLDFCJHo0DreWXvAFr7P0AvytSmhxlIk0J/A+A007qnAHW8VZn1r0S
ZkZ9gJ/suUIfeaNdAauAT7XfCf+Et+HzKgaUumr7Q54ZaYSjoDBnY1Kq7L8L/AE8AL4H+gYZbZ1ypbxW
okOOt+hBe5erTaCXs3g7cA34LSw0xwbtBj52lJYBT4AfgW6W2+Gc0BraymGJDm3nRT1U1CWw2Fn+K3AD
WBgM0KLfJFESjbRhn/hdSXvJa6gqzhTouaWftgKGMlcllyoRCWMLxkVXXOfpuKJQ0ZlKulMDPOGAa/Uj
U2qA6j1VIvod2BreB3r+wY4MyG2BJ84CXlnZU2BdWPQkcNN5EpWvtryU6l3Jq0TNcCzqsa7SFuSSMCw4
G9gE/Aw8DwoHuRFpb5Vooh+sZGOYr+q67TVUNf0S5eUkzJVh4pVI/V9QJmdjw90ddQ0TnSs4jISv41hi
QLkMO2tE8k6NaFSBcToVRbH+M1I7fuiKKjKg3fGCVqw2qv+0FU8C9vk/VSgZVc/6MPYd8GcVA9p1VjmM
dOnQYaRO9y3wGfC3SYl5Pija4wq4B/wHbAZmAo+AL1MDig6jasexIjHeRugUPOXs3uDIZHLXgePAh8AS
y4oUre7RgExX2n3FqLwoGMBgYKon611HbTRAHW9beFeLlnxtF5IMdVzJ+rv3xyvZ/MAve5zMr34lE2q9
lArO/nkmHdW5UKeo6VIqBMGqkagXNV/LM4REqf+rJsDrNNfkeRHCV83ylNcZwqdZccLVCnsRPzh1RlR4
Yznx4odshdx7IWvbPsDknSpBpGeNtdSbO28A7+2x3uIN78kAAAAASUVORK5CYII=
</value>
</data>
<data name="pbAnnouncement.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAgFJREFUWEfF
l4FxwjAMRRmBEToCG8AGsEG7Ad0ARmCDskG7AWxQNigblA1+76ffoMjGkaFc353vEkuyJVl2nNGoAQAL
AG8AdgA+AZzU+Mw+yube7i4AjDXwEcBWToyv6FFGHerSJtNrAsAawAHAi5cNQRvZrrxsEEXDtK69rBUT
RCwbACZK4cLLbkVLQycmXtZDkXPyuqKQfigyBVbPhBRCkSuqRIvNwfd3aK1Ca67Iv802/KpGZijOowHL
nhXQIOTVPIecJ9lSaO9mW02OLQG866BJLWHfmRGrQ5ulH5Noi25tx7GnIQDszWS3svPjkvOc6fQqKDxp
gI/o+lqUPdqSp4K8O1UvD7nCTMbhtfWY+pgVZAx8k9KcRVhyQHt5OtDOZ8iAA8zQng/F6vcOyCBKF1DN
AdLNzX3sBcQ7oD5Wb7ePK+28mwIOnFodYBZ8yqd9ywtRB0JLoL5r7PvWvwQc6JagpQjTyedbtotIzQFb
hP++Da8dRI924BJ46Sg2JyFvRlnhBRttSWmJL3NWPkbsv5dNYdzsY3T1c6wl8kUXbaXUd3NlWUlGvc4H
UJ2n5Up2C9UrGVF6wpfSFkKXUmIU/ywTKfJwYKZQ2v9qDBpnFYq8hAqGxs9eNoT5NSsXXBRFYX8456Vo
pEeZ/ZHN9O4iHdv6gDE63oTZ+My+TWvt/AD6qFOB8ji3AwAAAABJRU5ErkJggg==
</value>
</data>
<data name="flowLayoutPanel1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAABH4AAABaCAIAAABBpQZ9AAAABGdBTUEAALYy8W048wAAACBjSFJNAACH
@@ -942,42 +978,6 @@
1033z+vT8HCAWJhLn6oszu0lziFS5sKnrNZUbfSk/gwPCSg7c9lTN7Ws08Q5xMZcdGjk6KJeCQ8KKDNz
ybHy8/qNB+eIc4iHueRYlcW5PWf0U3hgQBmZC46rqk1VR08Q51B+/wHa1rRb0sHVbwAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="picPinDuoDuoToken.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACwwAAAsMAT9AIsgAAAOxSURBVFhHpZdJiFVXEIaNOIJI
L3QjCioxGsdGRV3E4EJxEaIdJxxRQVFEdKMiYmzNQo2I9MaYgKCCIAQkWSQOiDguVJC4FCPaJpoYArGd
CBHDJ//zv6/rnndf93v6Q71376k6p4ZTVefcLl3qANAEHAEuAL8AbSY9a0y82em89wLQ4IVbgaM2oqGK
nHiSkazmVMjVBWAncAtYkfI6g+Z4bnPK6xT2RmHdmfLqRXCitmgAjQ5hU8p7V3hrZERjysvBnkt5h4JA
V2AcMNc0DeiZykXYsY4jYYGqngMZDQH+Ae6bXgIrA79EKbJIpOMleK8K9xyYCKwF+nlxeSxkyq4Cu8L7
DGAR0KNgrUo9Dn3ZssSTBVb2F3AZmAAcBl4HmbPARWA6sNQReQbsBXqnEanYCtduudTCwmOA/4FDwFBX
xr/AHeCrIPeFDXgMvAC2AJO9TfsLDFCJHo0DreWXvAFr7P0AvytSmhxlIk0J/A+A007qnAHW8VZn1r0S
ZkZ9gJ/suUIfeaNdAauAT7XfCf+Et+HzKgaUumr7Q54ZaYSjoDBnY1Kq7L8L/AE8AL4H+gYZbZ1ypbxW
okOOt+hBe5erTaCXs3g7cA34LSw0xwbtBj52lJYBT4AfgW6W2+Gc0BraymGJDm3nRT1U1CWw2Fn+K3AD
WBgM0KLfJFESjbRhn/hdSXvJa6gqzhTouaWftgKGMlcllyoRCWMLxkVXXOfpuKJQ0ZlKulMDPOGAa/Uj
U2qA6j1VIvod2BreB3r+wY4MyG2BJ84CXlnZU2BdWPQkcNN5EpWvtryU6l3Jq0TNcCzqsa7SFuSSMCw4
G9gE/Aw8DwoHuRFpb5Vooh+sZGOYr+q67TVUNf0S5eUkzJVh4pVI/V9QJmdjw90ddQ0TnSs4jISv41hi
QLkMO2tE8k6NaFSBcToVRbH+M1I7fuiKKjKg3fGCVqw2qv+0FU8C9vk/VSgZVc/6MPYd8GcVA9p1VjmM
dOnQYaRO9y3wGfC3SYl5Pija4wq4B/wHbAZmAo+AL1MDig6jasexIjHeRugUPOXs3uDIZHLXgePAh8AS
y4oUre7RgExX2n3FqLwoGMBgYKon611HbTRAHW9beFeLlnxtF5IMdVzJ+rv3xyvZ/MAve5zMr34lE2q9
lArO/nkmHdW5UKeo6VIqBMGqkagXNV/LM4REqf+rJsDrNNfkeRHCV83ylNcZwqdZccLVCnsRPzh1RlR4
Yznx4odshdx7IWvbPsDknSpBpGeNtdSbO28A7+2x3uIN78kAAAAASUVORK5CYII=
</value>
</data>
<data name="pbAnnouncement.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAgFJREFUWEfF
l4FxwjAMRRmBEToCG8AGsEG7Ad0ARmCDskG7AWxQNigblA1+76ffoMjGkaFc353vEkuyJVl2nNGoAQAL
AG8AdgA+AZzU+Mw+yube7i4AjDXwEcBWToyv6FFGHerSJtNrAsAawAHAi5cNQRvZrrxsEEXDtK69rBUT
RCwbACZK4cLLbkVLQycmXtZDkXPyuqKQfigyBVbPhBRCkSuqRIvNwfd3aK1Ca67Iv802/KpGZijOowHL
nhXQIOTVPIecJ9lSaO9mW02OLQG866BJLWHfmRGrQ5ulH5Noi25tx7GnIQDszWS3svPjkvOc6fQqKDxp
gI/o+lqUPdqSp4K8O1UvD7nCTMbhtfWY+pgVZAx8k9KcRVhyQHt5OtDOZ8iAA8zQng/F6vcOyCBKF1DN
AdLNzX3sBcQ7oD5Wb7ePK+28mwIOnFodYBZ8yqd9ywtRB0JLoL5r7PvWvwQc6JagpQjTyedbtotIzQFb
hP++Da8dRI924BJ46Sg2JyFvRlnhBRttSWmJL3NWPkbsv5dNYdzsY3T1c6wl8kUXbaXUd3NlWUlGvc4H
UJ2n5Up2C9UrGVF6wpfSFkKXUmIU/ywTKfJwYKZQ2v9qDBpnFYq8hAqGxs9eNoT5NSsXXBRFYX8456Vo
pEeZ/ZHN9O4iHdv6gDE63oTZ+My+TWvt/AD6qFOB8ji3AwAAAABJRU5ErkJggg==
</value>
</data>
<data name="max.Style.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -71,7 +71,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -526,7 +526,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colMinus,
this.colProductRemaining,
this.colPlus,
@@ -628,11 +628,11 @@ namespace TemuKJD.PDDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colMinus
//
@@ -915,7 +915,7 @@ namespace TemuKJD.PDDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colMinus;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colPlus;
@@ -129,7 +129,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMinus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -372,6 +372,11 @@ namespace TemuKJD.PDDForms.ProductForms
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询... 店铺:" + shop.ShopAccount + " 共有 " + cmbStatus.Text + " 商品:" + total;
}));
}
}
@@ -403,7 +408,8 @@ namespace TemuKJD.PDDForms.ProductForms
sRst = "已取消查询!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
//this.statusBar.lblTaskStatus.Text = sRst;
this.statusBar.lblTaskStatus.Text = this.statusBar.lblTaskStatus.Text.Replace("正在查询...", sRst);
}));
}, cancellationTokenSource.Token);
}
@@ -64,8 +64,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=";
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -30,14 +30,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.pbUpgradeVersion = new System.Windows.Forms.PictureBox();
this.lblUpgradeVersion = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
@@ -118,6 +119,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -140,11 +145,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -251,6 +251,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
// chkUseExtCodePrice
//
this.chkUseExtCodePrice.AutoSize = true;
this.chkUseExtCodePrice.Checked = true;
this.chkUseExtCodePrice.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseExtCodePrice.Location = new System.Drawing.Point(780, 22);
this.chkUseExtCodePrice.Name = "chkUseExtCodePrice";
this.chkUseExtCodePrice.Size = new System.Drawing.Size(147, 21);
this.chkUseExtCodePrice.TabIndex = 717;
this.chkUseExtCodePrice.Text = "使用货号价格做基础价";
this.chkUseExtCodePrice.UseVisualStyleBackColor = true;
this.chkUseExtCodePrice.CheckedChanged += new System.EventHandler(this.chkUseExtCodePrice_CheckedChanged);
//
// pbUpgradeVersion
//
this.pbUpgradeVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -1166,19 +1179,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1346,19 +1359,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1393,185 +1406,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
//
// colCheck
//
this.colCheck.Frozen = true;
this.colCheck.HeaderText = "选择";
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
this.colSupplierId.Frozen = true;
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
//
// colSupplierName
//
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLogin.Width = 45;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colInShop.Width = 45;
//
// colSpuId
//
this.colSpuId.HeaderText = "商品ID";
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSpuId.Width = 80;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Visible = false;
this.colSkcId.Width = 80;
//
// colImgUrl
//
this.colImgUrl.HeaderText = "图片地址";
this.colImgUrl.Name = "colImgUrl";
this.colImgUrl.ReadOnly = true;
this.colImgUrl.Visible = false;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colSkuFakeImgUrl
//
this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址";
this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl";
this.colSkuFakeImgUrl.ReadOnly = true;
this.colSkuFakeImgUrl.Visible = false;
//
// colSkuFakeImg
//
this.colSkuFakeImg.HeaderText = "SKU替换图";
this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuFakeImg.Name = "colSkuFakeImg";
this.colSkuFakeImg.ReadOnly = true;
this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuFakeImg.Visible = false;
this.colSkuFakeImg.Width = 60;
//
// colProductName
//
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle12;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 160;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// colDraftId
//
this.colDraftId.HeaderText = "上传商品Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 80;
//
// colNotes
//
this.colNotes.HeaderText = "上传备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
this.colNotes.Visible = false;
//
// colUserNotes
//
this.colUserNotes.HeaderText = "重上/已买";
this.colUserNotes.Name = "colUserNotes";
this.colUserNotes.ReadOnly = true;
this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colUserNotes.Visible = false;
this.colUserNotes.Width = 75;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
this.ColDelete.Width = 75;
//
// colAddTime
//
this.colAddTime.FillWeight = 110F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 260;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1652,18 +1486,183 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// chkUseExtCodePrice
// colCheck
//
this.chkUseExtCodePrice.AutoSize = true;
this.chkUseExtCodePrice.Checked = true;
this.chkUseExtCodePrice.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseExtCodePrice.Location = new System.Drawing.Point(780, 22);
this.chkUseExtCodePrice.Name = "chkUseExtCodePrice";
this.chkUseExtCodePrice.Size = new System.Drawing.Size(147, 21);
this.chkUseExtCodePrice.TabIndex = 717;
this.chkUseExtCodePrice.Text = "使用货号价格做基础价";
this.chkUseExtCodePrice.UseVisualStyleBackColor = true;
this.chkUseExtCodePrice.CheckedChanged += new System.EventHandler(this.chkUseExtCodePrice_CheckedChanged);
this.colCheck.Frozen = true;
this.colCheck.HeaderText = "选择";
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
this.colSupplierId.Frozen = true;
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLogin.Width = 40;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colInShop.Width = 40;
//
// colSpuId
//
this.colSpuId.HeaderText = "源商品ID";
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Visible = false;
this.colSkcId.Width = 80;
//
// colImgUrl
//
this.colImgUrl.HeaderText = "图片地址";
this.colImgUrl.Name = "colImgUrl";
this.colImgUrl.ReadOnly = true;
this.colImgUrl.Visible = false;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colSkuFakeImgUrl
//
this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址";
this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl";
this.colSkuFakeImgUrl.ReadOnly = true;
this.colSkuFakeImgUrl.Visible = false;
//
// colSkuFakeImg
//
this.colSkuFakeImg.HeaderText = "SKU替换图";
this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuFakeImg.Name = "colSkuFakeImg";
this.colSkuFakeImg.ReadOnly = true;
this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuFakeImg.Visible = false;
this.colSkuFakeImg.Width = 60;
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 150;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// colDraftId
//
this.colDraftId.HeaderText = "上传商品Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 80;
//
// colNotes
//
this.colNotes.HeaderText = "上传备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
this.colNotes.Visible = false;
//
// colUserNotes
//
this.colUserNotes.HeaderText = "重上/已买";
this.colUserNotes.Name = "colUserNotes";
this.colUserNotes.ReadOnly = true;
this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colUserNotes.Visible = false;
this.colUserNotes.Width = 75;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
this.ColDelete.Width = 75;
//
// colAddTime
//
this.colAddTime.FillWeight = 110F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 260;
//
// PDDDBProdUserSelectForm
//
@@ -1789,6 +1788,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public System.Windows.Forms.Label lblWaitToUp;
private System.Windows.Forms.TextBox txtTest20981;
private DevComponents.DotNetBar.PanelEx btnTest20981;
private UserComponent.UcCheckBox chk15996;
private UserComponent.UcCheckBox chk21365;
private UserComponent.UcCheckBox chk20981;
private UserComponent.UcCheckBox chk22347;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtUpgradeVersionAddPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtUpgradeVersionName;
private UserComponent.UcCheckBox chkUpgradeVersion;
private System.Windows.Forms.PictureBox pbUpgradeVersion;
private System.Windows.Forms.Label lblUpgradeVersion;
private UserComponent.UcCheckBox chkUseExtCodePrice;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1811,17 +1822,5 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chk15996;
private UserComponent.UcCheckBox chk21365;
private UserComponent.UcCheckBox chk20981;
private UserComponent.UcCheckBox chk22347;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtUpgradeVersionAddPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtUpgradeVersionName;
private UserComponent.UcCheckBox chkUpgradeVersion;
private System.Windows.Forms.PictureBox pbUpgradeVersion;
private System.Windows.Forms.Label lblUpgradeVersion;
private UserComponent.UcCheckBox chkUseExtCodePrice;
}
}
@@ -448,6 +448,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -804,11 +806,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (kjdDbProd?.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);
//var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
//var empty_data = UserLogin.GetSignaturex() +
// "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
// "&db_id=" + prod.id +
// "&status=已清除";
//GetHtml.PostUtf8(empty_url, empty_data);
}
Invoke(new Action(() =>
@@ -989,6 +992,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
string UploadProduct(ShopLoginInfo shop, KJDDBProduct dbProd, TemuDBProductSelect selectProd, DataGridViewCell cell, DateTime startTime)
{
Thread.Sleep(Randomx.GetId(300, 2000));
if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功")
{
return "店铺为空或未登录!";
@@ -1009,6 +1013,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
int sleepTimeTotal = 0;
var prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上
var prodParam = new PDDProductUploadParam();
int currentCount = 0;
@@ -1197,6 +1202,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
string decoration_preview_html = preview_goods_decoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, "", prodInfo.chance_tab);
Thread.Sleep(Randomx.GetId(30, 120));
if (decoration_preview_html.Contains("\"success\":true"))
{
prodParam.decorationPreview = BaseRegex.GetStringJson(ref decoration_preview_html, "preview_url");
@@ -1284,6 +1290,68 @@ namespace TemuKJD.PDDForms.ProductSelectForms
prodParam.damage_claim = prodInfo.detail.damage_claim;
prodParam.dead_line_seconds = 86399; // 1天?
prodParam.decorationCanEdit = true;
foreach (var floorItem in prodInfo.decoration.floor_list)
{
foreach(var contentItem in floorItem.content_list)
{
}
}
//PDDProdDecorationCommitParam decorationParam = new PDDProdDecorationCommitParam();
//decorationParam.goods_id = prodParam.goods_id;
//decorationParam.goods_commit_id = prodParam.goods_commit_id.ParseToLong();
//decorationParam.preview_key = "";
//decorationParam.decoration_floor_list = new List<decoration_floor_param>();
//foreach (var floorItem in prodInfo.decoration.floor_list)
//{
// if (floorItem.type != "image")
// continue;
// var gallary = floorItem.content_list.FirstOrDefault();
// var floor_param = new decoration_floor_param();
// floor_param.type = "image"; // floorItem.type;
// floor_param.content_list = new List<decoration_content_param>();
// {
// var decorationContentParam = new decoration_content_param()
// {
// img_url = gallary.img_url,
// };
// floor_param.content_list.Add(decorationContentParam);
// }
// decorationParam.decoration_floor_list.Add(floor_param);
//}
//var addDecorationRst = save_decoration(shop, decorationParam, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab);
//Thread.Sleep(Randomx.GetId(10, 50));
// 第二次获取详情图
//try
//{
// var prod_decoration_rst = GetPddProdDecoration(sourceShop, sourceProdId.ToString(), commitId);
// if (!prod_decoration_rst.Contains("\"success\":true"))
// {
// var errMsg = BaseRegex.GetStringJson(ref prod_decoration_rst, "error_msg");
// if (string.IsNullOrEmpty(errMsg))
// errMsg = prod_decoration_rst;
// OnInfoReceived("商品获取失败!商品详情图获取失败!" + errMsg);
// return;
// }
// JObject prod_decoration_obj = JObject.Parse(prod_decoration_rst);
// if (!prod_decoration_obj["result"].IsNullOrEmpty())
// decoration_json = JsonHelper.SerializeObject(prod_decoration_obj["result"]);
// decoration = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(decoration_json);
//}
//catch (Exception ex)
//{
// OnInfoReceived("商品获取失败!商品详情图获取失败!" + ex.Message);
// return;
//}
prodParam.decorationDetail = prodInfo.decoration.floor_list;
//prodParam.decorationPreview = ""; // 商品详情图,通过接口获取
prodParam.default_template_gray = true;
@@ -1398,6 +1466,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (propTemp == null)
continue;
if (propInfo.name == "鞋底厚度")
{
//if (!propTemp.values.content.Any(c => c.value == propInfo.values.))
if (!propInfo.values.All(v => propTemp.values.content.Any(c => c.value == v.value)))
{
continue;
}
}
//var prop = new goods_property_param()
var prop = new goods_spec_property_param()
{
@@ -1961,7 +2038,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//return "上传成功";
#endregion
sleepTime = Randomx.GetId(1000, 5000);
//sleepTime = Randomx.GetId(1000, 5000);
sleepTime = Randomx.GetId(2000, 7000);
sleepTimeTotal += sleepTime;
Thread.Sleep(sleepTime);
var rand2 = Randomx.GetId(100);
@@ -2004,7 +2082,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var size_result = "";
if (prodInfo.size != null && prodInfo.size.classId != null)
{
Thread.Sleep(Randomx.GetId(15, 70));
Thread.Sleep(Randomx.GetId(20, 120));
size_result = save_sizespec(shop, prodInfo.size, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab);
if (!size_result.Contains("\"success\":true"))
{
@@ -2478,6 +2556,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
decoration_preview_html = preview_goods_decoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, "", prodInfo.chance_tab);
}
//decoration_preview_html = GetPddDecorationPreview(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id);
//var prod_decoration_rst = GetPddProdDecoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id);
//try
//{
// JObject jO = JObject.Parse(prod_decoration_rst);
// var decorationStr = jO["result"]["floor_list"].ToString();
// prodParam.decorationDetail = JsonHelper.DeserializeJsonToList<PDDProdfloorItem>(decorationStr);
//}
//catch (Exception ex)
//{
//}
if (decoration_preview_html.Contains("\"success\":true"))
{
prodParam.decorationPreview = BaseRegex.GetStringJson(ref decoration_preview_html, "preview_url");
@@ -4069,6 +4157,30 @@ Content-Disposition: form-data; name=""pic_operations""
return result;
}
private string GetPddProdDecoration(ShopLoginInfo shop, string prodId, string commitId)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/query/V2";
url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/query/V2";
string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + prodId + @"}";
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(300, 500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
}
}
return result;
}
/// <summary>
/// 保存商品详情
/// glide/mms/goodsCommit/action/edit
+7 -7
View File
@@ -58,7 +58,7 @@
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -425,7 +425,7 @@
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colCookie,
this.colSubUser,
this.colGroupName,
@@ -482,11 +482,11 @@
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colCookie
//
@@ -729,7 +729,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colCookie;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName;
@@ -129,7 +129,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCookie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">