1产品数据库认领次数计数 2图片后加载功能 3二级超管显示昵称
This commit is contained in:
1 parent
dfcf5e8a2c
commit
bf7b32fb28
20 files changed
+344
-92
No files matched your search
@@ -27,8 +27,8 @@ namespace AllBase
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本ID
|
/// 版本ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int VersionCount = 377;
|
public static int VersionCount = 381;
|
||||||
//public static int VersionCount = 377;
|
//public static int VersionCount = 381;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本号
|
/// 版本号
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace AllBase.Model.Result
|
|||||||
public string Signature { get; set; }
|
public string Signature { get; set; }
|
||||||
public string TouTiaoId { get; set; }
|
public string TouTiaoId { get; set; }
|
||||||
public string Cookies { get; set; } = "";
|
public string Cookies { get; set; } = "";
|
||||||
|
public string Cookies2 { get; set; } = "";
|
||||||
public Dictionary<string, string> DictMultiCookies { get; set; } = new Dictionary<string, string>();
|
public Dictionary<string, string> DictMultiCookies { get; set; } = new Dictionary<string, string>();
|
||||||
public string LoginStatus { get; set; }
|
public string LoginStatus { get; set; }
|
||||||
public string ApiAuthStatus { get; set; }
|
public string ApiAuthStatus { get; set; }
|
||||||
|
|||||||
@@ -28,5 +28,6 @@ namespace AllBase.Model.Result
|
|||||||
/// (某个店铺)上传次数
|
/// (某个店铺)上传次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int select_count { get; set; }
|
public int select_count { get; set; }
|
||||||
|
public int select_total_count { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,8 @@ namespace AllBase.Model.Result
|
|||||||
public int add_times { get; set; }
|
public int add_times { get; set; }
|
||||||
public DateTime add_time { get; set; }
|
public DateTime add_time { get; set; }
|
||||||
public DateTime mdy_time { get; set; }
|
public DateTime mdy_time { get; set; }
|
||||||
public string operate_sub_sa_name { get; set; }
|
public string operate_sub_sa_name { get; set; } = "";
|
||||||
|
public string operate_sub_sa_nick { get; set; } = "";
|
||||||
public DateTime? add_sub_sa_time { get; set; }
|
public DateTime? add_sub_sa_time { get; set; }
|
||||||
|
|
||||||
#region 外键连接属性
|
#region 外键连接属性
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ namespace KJD_Web.BLL
|
|||||||
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
||||||
var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'");
|
var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'");
|
||||||
var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'");
|
var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'");
|
||||||
|
var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'");
|
||||||
|
|
||||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||||
int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||||
@@ -122,17 +123,20 @@ namespace KJD_Web.BLL
|
|||||||
sql = "select * from kjd.product p where 1=1";
|
sql = "select * from kjd.product p where 1=1";
|
||||||
else if (string.IsNullOrEmpty(get_select_count))
|
else if (string.IsNullOrEmpty(get_select_count))
|
||||||
sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
|
sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
|
||||||
"p.add_time,p.mdy_time from kjd.product p where 1=1";
|
"p.add_time,p.mdy_time,p.select_total_count from kjd.product p where 1=1";
|
||||||
else
|
else
|
||||||
sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
|
sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
|
||||||
"p.add_time,p.mdy_time,COUNT(s.id) AS select_count FROM kjd.product p " +
|
"p.add_time,p.mdy_time,p.select_total_count,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 + "' WHERE 1=1";
|
"LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' WHERE 1=1";
|
||||||
|
|
||||||
//where子句
|
//where子句
|
||||||
sql += where;
|
sql += where;
|
||||||
|
|
||||||
sql += " group by p.id";
|
sql += " group by p.id";
|
||||||
sql += " order by p.id desc";
|
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 += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||||
dt = mySql.ExecuteDataTable(sql);
|
dt = mySql.ExecuteDataTable(sql);
|
||||||
}
|
}
|
||||||
@@ -160,6 +164,7 @@ namespace KJD_Web.BLL
|
|||||||
add_time = Convert.ToDateTime(row["add_time"]),
|
add_time = Convert.ToDateTime(row["add_time"]),
|
||||||
mdy_time = Convert.ToDateTime(row["mdy_time"]),
|
mdy_time = Convert.ToDateTime(row["mdy_time"]),
|
||||||
notes = row["notes"].ToString(),
|
notes = row["notes"].ToString(),
|
||||||
|
select_total_count = row["select_total_count"].ParseToInt(),
|
||||||
};
|
};
|
||||||
if (isDetail)
|
if (isDetail)
|
||||||
{
|
{
|
||||||
@@ -298,6 +303,7 @@ namespace KJD_Web.BLL
|
|||||||
add_product_remaining = add_product_remaining - 1;
|
add_product_remaining = add_product_remaining - 1;
|
||||||
sql += "\r\n";
|
sql += "\r\n";
|
||||||
sql += "update kjd.shop 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 += "update kjd.shop_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";";
|
//sql += "update kjd.shop_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";";
|
||||||
}
|
}
|
||||||
var rst = mySql.ExecuteNonQuery(sql);
|
var rst = mySql.ExecuteNonQuery(sql);
|
||||||
@@ -379,6 +385,7 @@ namespace KJD_Web.BLL
|
|||||||
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
|
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
|
||||||
var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'");
|
var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'");
|
||||||
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
||||||
|
var search_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "search_sub_sa_name")?.Replace("'", "\\'");
|
||||||
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
|
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
|
||||||
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
|
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
|
||||||
|
|
||||||
@@ -390,14 +397,18 @@ namespace KJD_Web.BLL
|
|||||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||||
MysqlUtils mySql = new MysqlUtils(conn);
|
MysqlUtils mySql = new MysqlUtils(conn);
|
||||||
|
|
||||||
string sql = "select count(s.id) from kjd.product_select s left join kjd.product p on s.out_product_id=p.id" +
|
string sql = "select count(s.id) from kjd.product_select s " +
|
||||||
" where 1=1";
|
"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 where = "";
|
string where = "";
|
||||||
if (!isAdmin)
|
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 like'%" + user_name + "%')";
|
||||||
if (!string.IsNullOrEmpty(operate_sub_sa_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")
|
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))
|
if (!string.IsNullOrEmpty(search_db_ids))
|
||||||
@@ -422,6 +433,11 @@ namespace KJD_Web.BLL
|
|||||||
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
||||||
if (!string.IsNullOrWhiteSpace(search_prod_name))
|
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 + "%')";
|
||||||
|
}
|
||||||
|
|
||||||
sql += where;
|
sql += where;
|
||||||
|
|
||||||
@@ -440,8 +456,11 @@ namespace KJD_Web.BLL
|
|||||||
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
|
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
|
||||||
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
|
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
|
||||||
"s.operate_sub_sa_name,s.add_sub_sa_time," +
|
"s.operate_sub_sa_name,s.add_sub_sa_time," +
|
||||||
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img " +
|
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," +
|
||||||
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id where 1=1";
|
"u.nick_name as operate_sub_sa_nick " +
|
||||||
|
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " +
|
||||||
|
"left join kjd.user u on u.user_name=s.operate_sub_sa_name " +
|
||||||
|
"where 1=1";
|
||||||
|
|
||||||
sql += where; // where子句
|
sql += where; // where子句
|
||||||
|
|
||||||
@@ -479,7 +498,8 @@ namespace KJD_Web.BLL
|
|||||||
add_times = row["add_times"].ParseToInt(),
|
add_times = row["add_times"].ParseToInt(),
|
||||||
skc_id = row["skc_id"].ToString(),
|
skc_id = row["skc_id"].ToString(),
|
||||||
spu_id = row["spu_id"].ToString(),
|
spu_id = row["spu_id"].ToString(),
|
||||||
operate_sub_sa_name = row["operate_sub_sa_name"].ToString()
|
operate_sub_sa_name = row["operate_sub_sa_name"].ToString(),
|
||||||
|
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString()
|
||||||
//product_json = row["product_json"].ToString(),
|
//product_json = row["product_json"].ToString(),
|
||||||
//size_json = row["size_json"].ToString(),
|
//size_json = row["size_json"].ToString(),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -406,6 +406,7 @@ namespace KJD_Web.BLL
|
|||||||
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
|
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
|
||||||
var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'");
|
var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'");
|
||||||
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
|
||||||
|
var search_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "search_sub_sa_name")?.Replace("'", "\\'");
|
||||||
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
|
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
|
||||||
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
|
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
|
||||||
|
|
||||||
@@ -417,14 +418,18 @@ namespace KJD_Web.BLL
|
|||||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||||
MysqlUtils mySql = new MysqlUtils(conn);
|
MysqlUtils mySql = new MysqlUtils(conn);
|
||||||
|
|
||||||
string sql = "select count(s.id) from kjd.third_product_select s left join kjd.third_product p on s.out_product_id=p.id" +
|
string sql = "select count(s.id) from kjd.third_product_select s " +
|
||||||
" where 1=1";
|
"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 where = "";
|
string where = "";
|
||||||
if (!isAdmin)
|
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 like'%" + user_name + "%')";
|
||||||
if (!string.IsNullOrEmpty(operate_sub_sa_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")
|
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))
|
if (!string.IsNullOrEmpty(search_db_ids))
|
||||||
@@ -449,6 +454,11 @@ namespace KJD_Web.BLL
|
|||||||
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
||||||
if (!string.IsNullOrWhiteSpace(search_prod_name))
|
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 + "%')";
|
||||||
|
}
|
||||||
|
|
||||||
sql += where;
|
sql += where;
|
||||||
|
|
||||||
@@ -467,8 +477,11 @@ namespace KJD_Web.BLL
|
|||||||
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
|
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
|
||||||
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
|
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
|
||||||
"s.operate_sub_sa_name,s.add_sub_sa_time," +
|
"s.operate_sub_sa_name,s.add_sub_sa_time," +
|
||||||
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img " +
|
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," +
|
||||||
"from kjd.third_product_select s left join kjd.third_product p on s.out_product_id=p.id where 1=1";
|
"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";
|
||||||
|
|
||||||
sql += where; // where子句
|
sql += where; // where子句
|
||||||
|
|
||||||
@@ -506,12 +519,13 @@ namespace KJD_Web.BLL
|
|||||||
add_times = row["add_times"].ParseToInt(),
|
add_times = row["add_times"].ParseToInt(),
|
||||||
skc_id = row["skc_id"].ToString(),
|
skc_id = row["skc_id"].ToString(),
|
||||||
spu_id = row["spu_id"].ToString(),
|
spu_id = row["spu_id"].ToString(),
|
||||||
operate_sub_sa_name = row["operate_sub_sa_name"].ToString()
|
operate_sub_sa_name = row["operate_sub_sa_name"].ToString(),
|
||||||
|
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString()
|
||||||
//product_json = row["product_json"].ToString(),
|
//product_json = row["product_json"].ToString(),
|
||||||
//size_json = row["size_json"].ToString(),
|
//size_json = row["size_json"].ToString(),
|
||||||
};
|
};
|
||||||
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
||||||
productLst.Add(prodSelect);
|
productLst.Add(prodSelect);
|
||||||
}
|
}
|
||||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ namespace KJD_Web.Model
|
|||||||
public DateTime add_time { get; set; }
|
public DateTime add_time { get; set; }
|
||||||
public DateTime mdy_time { get; set; }
|
public DateTime mdy_time { get; set; }
|
||||||
public string notes { get; set; }
|
public string notes { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 店铺选品次数
|
||||||
|
/// </summary>
|
||||||
public int select_count { get; set; } = 0;
|
public int select_count { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 被选中的总次数
|
||||||
|
/// </summary>
|
||||||
|
public int select_total_count { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,7 @@ namespace KJD_Web.Model
|
|||||||
public DateTime add_time { get; set; }
|
public DateTime add_time { get; set; }
|
||||||
public DateTime mdy_time { get; set; }
|
public DateTime mdy_time { get; set; }
|
||||||
public string operate_sub_sa_name { get; set; }
|
public string operate_sub_sa_name { get; set; }
|
||||||
|
public string operate_sub_sa_nick { get; set; }
|
||||||
public DateTime? add_sub_sa_time { get; set; }
|
public DateTime? add_sub_sa_time { get; set; }
|
||||||
|
|
||||||
#region 外键连接属性
|
#region 外键连接属性
|
||||||
|
|||||||
@@ -63,10 +63,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.con_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.con_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colAddTimes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
|
this.cmbSort = new System.Windows.Forms.ComboBox();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
this.splitContainer1.Panel2.SuspendLayout();
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
@@ -90,6 +93,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
//
|
//
|
||||||
// splitContainer1.Panel1
|
// splitContainer1.Panel1
|
||||||
//
|
//
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.cmbSort);
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
|
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.txtNotes);
|
this.splitContainer1.Panel1.Controls.Add(this.txtNotes);
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.lblNotes);
|
this.splitContainer1.Panel1.Controls.Add(this.lblNotes);
|
||||||
@@ -105,6 +109,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.splitContainer1.Panel1.Controls.Add(this.label3);
|
this.splitContainer1.Panel1.Controls.Add(this.label3);
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.txtCat);
|
this.splitContainer1.Panel1.Controls.Add(this.txtCat);
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.label2);
|
this.splitContainer1.Panel1.Controls.Add(this.label2);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.label6);
|
||||||
//
|
//
|
||||||
// splitContainer1.Panel2
|
// splitContainer1.Panel2
|
||||||
//
|
//
|
||||||
@@ -329,6 +334,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.col_cat_name,
|
this.col_cat_name,
|
||||||
this.con_ext_code,
|
this.con_ext_code,
|
||||||
this.colAddTimes,
|
this.colAddTimes,
|
||||||
|
this.colSelectTotalCount,
|
||||||
this.col_notes,
|
this.col_notes,
|
||||||
this.col_edit,
|
this.col_edit,
|
||||||
this.col_delete,
|
this.col_delete,
|
||||||
@@ -433,10 +439,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
// colAddTimes
|
// colAddTimes
|
||||||
//
|
//
|
||||||
this.colAddTimes.FillWeight = 52F;
|
this.colAddTimes.FillWeight = 52F;
|
||||||
this.colAddTimes.HeaderText = "认领次数";
|
this.colAddTimes.HeaderText = "单店认领次数";
|
||||||
this.colAddTimes.Name = "colAddTimes";
|
this.colAddTimes.Name = "colAddTimes";
|
||||||
this.colAddTimes.ReadOnly = true;
|
this.colAddTimes.ReadOnly = true;
|
||||||
//
|
//
|
||||||
|
// colSelectTotalCount
|
||||||
|
//
|
||||||
|
this.colSelectTotalCount.FillWeight = 52F;
|
||||||
|
this.colSelectTotalCount.HeaderText = "认领总数";
|
||||||
|
this.colSelectTotalCount.Name = "colSelectTotalCount";
|
||||||
|
this.colSelectTotalCount.ReadOnly = true;
|
||||||
|
//
|
||||||
// col_notes
|
// col_notes
|
||||||
//
|
//
|
||||||
this.col_notes.HeaderText = "备注";
|
this.col_notes.HeaderText = "备注";
|
||||||
@@ -468,6 +481,27 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||||
//
|
//
|
||||||
|
// cmbSort
|
||||||
|
//
|
||||||
|
this.cmbSort.FormattingEnabled = true;
|
||||||
|
this.cmbSort.Items.AddRange(new object[] {
|
||||||
|
"入库时间",
|
||||||
|
"认领总数"});
|
||||||
|
this.cmbSort.Location = new System.Drawing.Point(1001, 15);
|
||||||
|
this.cmbSort.Name = "cmbSort";
|
||||||
|
this.cmbSort.Size = new System.Drawing.Size(79, 25);
|
||||||
|
this.cmbSort.TabIndex = 448;
|
||||||
|
this.cmbSort.Text = "入库时间";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(944, 19);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(68, 17);
|
||||||
|
this.label6.TabIndex = 449;
|
||||||
|
this.label6.Text = "排序方式:";
|
||||||
|
//
|
||||||
// DbProductListForm
|
// DbProductListForm
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
@@ -529,9 +563,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name;
|
private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn con_ext_code;
|
private System.Windows.Forms.DataGridViewTextBoxColumn con_ext_code;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTimes;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_notes;
|
private System.Windows.Forms.DataGridViewTextBoxColumn col_notes;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
|
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
|
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
|
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
|
||||||
|
private System.Windows.Forms.ComboBox cmbSort;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,6 +124,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
prod.cat_name,
|
prod.cat_name,
|
||||||
prod.ext_code,
|
prod.ext_code,
|
||||||
prod.select_count,
|
prod.select_count,
|
||||||
|
prod.select_total_count,
|
||||||
prod.notes,
|
prod.notes,
|
||||||
"编辑",
|
"编辑",
|
||||||
"删除",
|
"删除",
|
||||||
@@ -202,6 +203,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
data += "&get_select_count=true";
|
data += "&get_select_count=true";
|
||||||
data += "&select_shop_id=" + shop.ShopId;
|
data += "&select_shop_id=" + shop.ShopId;
|
||||||
}
|
}
|
||||||
|
if (this.cmbSort.Text == "认领总数")
|
||||||
|
{
|
||||||
|
data += "&sort_field=select_total_count";
|
||||||
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
var html = GetHtml.PostUtf8(url, data);
|
var html = GetHtml.PostUtf8(url, data);
|
||||||
@@ -211,7 +216,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
html = GetHtml.PostUtf8(url, data);
|
html = GetHtml.PostUtf8(url, data);
|
||||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||||
{
|
{
|
||||||
BaseMsgForm.ShowError("获取商品列表失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
BaseMsgForm.ShowError("获取商品列表失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||||
|
}));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,13 +363,16 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
prod.select_count++;
|
prod.select_count++;
|
||||||
|
prod.select_total_count++;
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
var row = this.dgvDbProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["col_db_id"].Value.ParseToInt() == prod.id);
|
var row = this.dgvDbProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["col_db_id"].Value.ParseToInt() == prod.id);
|
||||||
if (row != null)
|
if (row != null)
|
||||||
|
{
|
||||||
row.Cells["colAddTimes"].Value = prod.select_count;
|
row.Cells["colAddTimes"].Value = prod.select_count;
|
||||||
|
row.Cells["colSelectTotalCount"].Value = prod.select_total_count;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
shop.AddProductRemaining = shop.AddProductRemaining - 1;
|
shop.AddProductRemaining = shop.AddProductRemaining - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,9 @@
|
|||||||
<metadata name="colAddTimes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colAddTimes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colSelectTotalCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
+22
-1
@@ -69,6 +69,7 @@
|
|||||||
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
|
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
||||||
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colSubSaNick = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
@@ -412,6 +414,7 @@
|
|||||||
this.colCopyCookies,
|
this.colCopyCookies,
|
||||||
this.colSpuId,
|
this.colSpuId,
|
||||||
this.colSkcId,
|
this.colSkcId,
|
||||||
|
this.colImgUrl,
|
||||||
this.colProductSkcPic,
|
this.colProductSkcPic,
|
||||||
this.colProductName,
|
this.colProductName,
|
||||||
this.colProductCat,
|
this.colProductCat,
|
||||||
@@ -420,6 +423,7 @@
|
|||||||
this.colDraftId,
|
this.colDraftId,
|
||||||
this.colMdyTime,
|
this.colMdyTime,
|
||||||
this.colSubSa,
|
this.colSubSa,
|
||||||
|
this.colSubSaNick,
|
||||||
this.colNotes,
|
this.colNotes,
|
||||||
this.colEditNotes,
|
this.colEditNotes,
|
||||||
this.ColDelete,
|
this.ColDelete,
|
||||||
@@ -433,6 +437,7 @@
|
|||||||
this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552);
|
this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552);
|
||||||
this.dgvSelectProduct.TabIndex = 189;
|
this.dgvSelectProduct.TabIndex = 189;
|
||||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||||
|
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
|
||||||
//
|
//
|
||||||
// ucSplitPage1
|
// ucSplitPage1
|
||||||
//
|
//
|
||||||
@@ -539,6 +544,13 @@
|
|||||||
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||||
this.colSkcId.Width = 90;
|
this.colSkcId.Width = 90;
|
||||||
//
|
//
|
||||||
|
// colImgUrl
|
||||||
|
//
|
||||||
|
this.colImgUrl.HeaderText = "图片路径";
|
||||||
|
this.colImgUrl.Name = "colImgUrl";
|
||||||
|
this.colImgUrl.ReadOnly = true;
|
||||||
|
this.colImgUrl.Visible = false;
|
||||||
|
//
|
||||||
// colProductSkcPic
|
// colProductSkcPic
|
||||||
//
|
//
|
||||||
this.colProductSkcPic.HeaderText = "Skc图片";
|
this.colProductSkcPic.HeaderText = "Skc图片";
|
||||||
@@ -593,9 +605,16 @@
|
|||||||
//
|
//
|
||||||
// colSubSa
|
// colSubSa
|
||||||
//
|
//
|
||||||
this.colSubSa.HeaderText = "二级超管";
|
this.colSubSa.HeaderText = "二级超管账号";
|
||||||
this.colSubSa.Name = "colSubSa";
|
this.colSubSa.Name = "colSubSa";
|
||||||
this.colSubSa.ReadOnly = true;
|
this.colSubSa.ReadOnly = true;
|
||||||
|
this.colSubSa.Visible = false;
|
||||||
|
//
|
||||||
|
// colSubSaNick
|
||||||
|
//
|
||||||
|
this.colSubSaNick.HeaderText = "二级超管";
|
||||||
|
this.colSubSaNick.Name = "colSubSaNick";
|
||||||
|
this.colSubSaNick.ReadOnly = true;
|
||||||
//
|
//
|
||||||
// colNotes
|
// colNotes
|
||||||
//
|
//
|
||||||
@@ -694,6 +713,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
|
||||||
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
||||||
@@ -702,6 +722,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaNick;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
|
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
if (BaseClass.SaLevel != 1)
|
if (BaseClass.SaLevel != 1)
|
||||||
{
|
{
|
||||||
dgvSelectProduct.Columns["colSubSa"].Visible = false;
|
dgvSelectProduct.Columns["colSubSa"].Visible = false;
|
||||||
|
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
|
||||||
btnSetSubSa.Visible = false;
|
btnSetSubSa.Visible = false;
|
||||||
chkNoSubSa.Visible = false;
|
chkNoSubSa.Visible = false;
|
||||||
}
|
}
|
||||||
@@ -96,16 +97,16 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
lstAdminTemuDBProductSelect.AddRange(list);
|
lstAdminTemuDBProductSelect.AddRange(list);
|
||||||
this.ucSplitPage1.TotalPage = pageCount;
|
this.ucSplitPage1.TotalPage = pageCount;
|
||||||
|
|
||||||
|
if (defaultBitmap == null)
|
||||||
|
defaultBitmap = new Bitmap(80, 80);
|
||||||
|
// 获取Bitmap的Graphics对象
|
||||||
|
using (Graphics g = Graphics.FromImage(defaultBitmap))
|
||||||
|
{
|
||||||
|
// 清除整个Bitmap为蓝色
|
||||||
|
g.Clear(Color.White);
|
||||||
|
}
|
||||||
foreach (var prodSelect in lstAdminTemuDBProductSelect)
|
foreach (var prodSelect in lstAdminTemuDBProductSelect)
|
||||||
{
|
{
|
||||||
Image image = null;
|
|
||||||
string imgUrl = prodSelect?.main_img?.Replace("https", "http");
|
|
||||||
string rst = "";
|
|
||||||
if (!string.IsNullOrWhiteSpace(imgUrl))
|
|
||||||
image = GetHtml.GetUrlImg(imgUrl, out rst);
|
|
||||||
if (!string.IsNullOrEmpty(rst))
|
|
||||||
BaseMsgForm.ShowError(rst);
|
|
||||||
|
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||||
@@ -119,7 +120,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
"复制Cookies",
|
"复制Cookies",
|
||||||
prodSelect.spu_id,
|
prodSelect.spu_id,
|
||||||
prodSelect.skc_id,
|
prodSelect.skc_id,
|
||||||
image,//prod.main_img,
|
prodSelect.main_img.Replace("https:","http:"),
|
||||||
|
defaultBitmap,//prod.main_img,
|
||||||
prodSelect.product_name,
|
prodSelect.product_name,
|
||||||
prodSelect.cat_name,
|
prodSelect.cat_name,
|
||||||
prodSelect.ext_code,
|
prodSelect.ext_code,
|
||||||
@@ -127,6 +129,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
prodSelect.draft_id,
|
prodSelect.draft_id,
|
||||||
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd HH:mm"),
|
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd HH:mm"),
|
||||||
prodSelect.operate_sub_sa_name == "" ? "-" : prodSelect.operate_sub_sa_name,
|
prodSelect.operate_sub_sa_name == "" ? "-" : prodSelect.operate_sub_sa_name,
|
||||||
|
prodSelect.operate_sub_sa_nick == "" ? "-" : prodSelect.operate_sub_sa_nick,
|
||||||
prodSelect.notes,
|
prodSelect.notes,
|
||||||
"编辑",
|
"编辑",
|
||||||
"删除",
|
"删除",
|
||||||
@@ -138,11 +141,51 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
|
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
|
ShowDgvImg();
|
||||||
this.pbLoading.Visible = false;
|
this.pbLoading.Visible = false;
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bitmap defaultBitmap = null;
|
||||||
|
void ShowDgvImg()
|
||||||
|
{
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
|
||||||
|
{
|
||||||
|
if (row.Cells["colProductSkcPic"].Displayed == false)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (row.Cells["colProductSkcPic"].Value != null && row.Cells["colProductSkcPic"].Value != defaultBitmap)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Image image = null;
|
||||||
|
string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString();
|
||||||
|
string getImgError = "";
|
||||||
|
if (!string.IsNullOrWhiteSpace(imgUrl))
|
||||||
|
image = GetHtml.GetUrlImg(imgUrl, out getImgError);
|
||||||
|
if (!string.IsNullOrEmpty(getImgError))
|
||||||
|
BaseMsgForm.ShowError(getImgError);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
row.Cells["colProductSkcPic"].Value = image;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgvSelectProduct_Scroll(object sender, ScrollEventArgs e)
|
||||||
|
{
|
||||||
|
ShowDgvImg();
|
||||||
|
}
|
||||||
|
|
||||||
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
||||||
{
|
{
|
||||||
@@ -1011,13 +1054,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
|
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
|
||||||
|
|
||||||
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true);
|
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true);
|
||||||
|
|
||||||
|
var subSa = subSaName.ParseToString().Split(new string[] { "&&&&&" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
row.Cells["colSubSa"].Value = subSaName.ParseToString();
|
row.Cells["colSubSa"].Value = subSa[0];
|
||||||
|
row.Cells["colSubSaNick"].Value = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
foreach (var p in prodList)
|
foreach (var p in prodList)
|
||||||
{
|
{
|
||||||
p.operate_sub_sa_name = subSaName.ParseToString();
|
p.operate_sub_sa_name = subSa[0];
|
||||||
|
p.operate_sub_sa_nick = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1028,13 +1075,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstSupplierId.Contains(p.shop_id.ParseToString())).ToArray();
|
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstSupplierId.Contains(p.shop_id.ParseToString())).ToArray();
|
||||||
|
|
||||||
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => lstSupplierId.Contains(row.Cells["colSupplierId"]?.Value.ParseToString()));
|
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => lstSupplierId.Contains(row.Cells["colSupplierId"]?.Value.ParseToString()));
|
||||||
|
|
||||||
|
var subSa = subSaName.ParseToString().Split(new string[] { "&&&&&" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
row.Cells["colSubSa"].Value = subSaName.ParseToString();
|
row.Cells["colSubSa"].Value = subSa[0];
|
||||||
|
row.Cells["colSubSaNick"].Value = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
foreach (var p in prodList)
|
foreach (var p in prodList)
|
||||||
{
|
{
|
||||||
p.operate_sub_sa_name = subSaName.ParseToString();
|
p.operate_sub_sa_name = subSa[0];
|
||||||
|
p.operate_sub_sa_nick = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,9 @@
|
|||||||
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colImgUrl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@@ -168,6 +171,9 @@
|
|||||||
<metadata name="colSubSa.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSubSa.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colSubSaNick.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="colNotes.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>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
+40
-40
@@ -36,12 +36,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.panel2 = new System.Windows.Forms.Panel();
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
this.dgvSaUser = new TemuKJD.UserComponent.DataGridViewEx();
|
this.dgvSaUser = new TemuKJD.UserComponent.DataGridViewEx();
|
||||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
|
||||||
this.colSubSaId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.colSubSaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||||
this.btnOk = new TemuKJD.UserControls.ButtonEx();
|
this.btnOk = new TemuKJD.UserControls.ButtonEx();
|
||||||
|
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||||
|
this.colSubSaId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colSubSaNick = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colSubSaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
@@ -100,7 +100,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.dgvSaUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.dgvSaUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.colSelect,
|
this.colSelect,
|
||||||
this.colSubSaId,
|
this.colSubSaId,
|
||||||
this.colSubUserName,
|
this.colSubSaNick,
|
||||||
this.colSubSaName});
|
this.colSubSaName});
|
||||||
this.dgvSaUser.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.dgvSaUser.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.dgvSaUser.Location = new System.Drawing.Point(4, 4);
|
this.dgvSaUser.Location = new System.Drawing.Point(4, 4);
|
||||||
@@ -112,39 +112,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.dgvSaUser.TabIndex = 189;
|
this.dgvSaUser.TabIndex = 189;
|
||||||
this.dgvSaUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSaUser_CellContentClick);
|
this.dgvSaUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSaUser_CellContentClick);
|
||||||
//
|
//
|
||||||
// colSelect
|
|
||||||
//
|
|
||||||
this.colSelect.HeaderText = "选择";
|
|
||||||
this.colSelect.MinimumWidth = 6;
|
|
||||||
this.colSelect.Name = "colSelect";
|
|
||||||
this.colSelect.ReadOnly = true;
|
|
||||||
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
|
||||||
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
|
||||||
this.colSelect.Width = 30;
|
|
||||||
//
|
|
||||||
// colSubSaId
|
|
||||||
//
|
|
||||||
this.colSubSaId.HeaderText = "二级超管Id";
|
|
||||||
this.colSubSaId.MinimumWidth = 6;
|
|
||||||
this.colSubSaId.Name = "colSubSaId";
|
|
||||||
this.colSubSaId.ReadOnly = true;
|
|
||||||
this.colSubSaId.Visible = false;
|
|
||||||
this.colSubSaId.Width = 125;
|
|
||||||
//
|
|
||||||
// colSubUserName
|
|
||||||
//
|
|
||||||
this.colSubUserName.HeaderText = "昵称";
|
|
||||||
this.colSubUserName.Name = "colSubUserName";
|
|
||||||
this.colSubUserName.ReadOnly = true;
|
|
||||||
this.colSubUserName.Width = 150;
|
|
||||||
//
|
|
||||||
// colSubSaName
|
|
||||||
//
|
|
||||||
this.colSubSaName.HeaderText = "账户";
|
|
||||||
this.colSubSaName.Name = "colSubSaName";
|
|
||||||
this.colSubSaName.ReadOnly = true;
|
|
||||||
this.colSubSaName.Width = 150;
|
|
||||||
//
|
|
||||||
// ucCheckBox1
|
// ucCheckBox1
|
||||||
//
|
//
|
||||||
this.ucCheckBox1.AutoSize = true;
|
this.ucCheckBox1.AutoSize = true;
|
||||||
@@ -174,6 +141,39 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
this.btnOk.UseVisualStyleBackColor = false;
|
this.btnOk.UseVisualStyleBackColor = false;
|
||||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||||
//
|
//
|
||||||
|
// colSelect
|
||||||
|
//
|
||||||
|
this.colSelect.HeaderText = "选择";
|
||||||
|
this.colSelect.MinimumWidth = 6;
|
||||||
|
this.colSelect.Name = "colSelect";
|
||||||
|
this.colSelect.ReadOnly = true;
|
||||||
|
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
|
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||||
|
this.colSelect.Width = 30;
|
||||||
|
//
|
||||||
|
// colSubSaId
|
||||||
|
//
|
||||||
|
this.colSubSaId.HeaderText = "二级超管Id";
|
||||||
|
this.colSubSaId.MinimumWidth = 6;
|
||||||
|
this.colSubSaId.Name = "colSubSaId";
|
||||||
|
this.colSubSaId.ReadOnly = true;
|
||||||
|
this.colSubSaId.Visible = false;
|
||||||
|
this.colSubSaId.Width = 125;
|
||||||
|
//
|
||||||
|
// colSubSaNick
|
||||||
|
//
|
||||||
|
this.colSubSaNick.HeaderText = "昵称";
|
||||||
|
this.colSubSaNick.Name = "colSubSaNick";
|
||||||
|
this.colSubSaNick.ReadOnly = true;
|
||||||
|
this.colSubSaNick.Width = 150;
|
||||||
|
//
|
||||||
|
// colSubSaName
|
||||||
|
//
|
||||||
|
this.colSubSaName.HeaderText = "账户";
|
||||||
|
this.colSubSaName.Name = "colSubSaName";
|
||||||
|
this.colSubSaName.ReadOnly = true;
|
||||||
|
this.colSubSaName.Width = 150;
|
||||||
|
//
|
||||||
// ProductSelectSetSubSaForm
|
// ProductSelectSetSubSaForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
@@ -203,10 +203,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
private UserComponent.DataGridViewEx dgvSaUser;
|
private UserComponent.DataGridViewEx dgvSaUser;
|
||||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
private UserControls.ButtonEx btnOk;
|
private UserControls.ButtonEx btnOk;
|
||||||
|
private UserComponent.UcCheckBox ucCheckBox1;
|
||||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaId;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaId;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaNick;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaName;
|
||||||
private UserComponent.UcCheckBox ucCheckBox1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,6 +68,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
return "请选择要分配的二级管理员!";
|
return "请选择要分配的二级管理员!";
|
||||||
}
|
}
|
||||||
var sub_sa = selectRow.Cells["colSubSaName"].Value.ParseToString();
|
var sub_sa = selectRow.Cells["colSubSaName"].Value.ParseToString();
|
||||||
|
var sub_sa_nick = selectRow.Cells["colSubSaNick"].Value.ParseToString();
|
||||||
|
|
||||||
StringBuilder data = new StringBuilder();
|
StringBuilder data = new StringBuilder();
|
||||||
data.Append(UserLogin.GetSignaturex());
|
data.Append(UserLogin.GetSignaturex());
|
||||||
@@ -91,7 +92,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
|||||||
{
|
{
|
||||||
if (html.Contains("\"code\":200"))
|
if (html.Contains("\"code\":200"))
|
||||||
{
|
{
|
||||||
OnSaveComplete(isShopAllSameSaCheck, sub_sa);
|
OnSaveComplete(isShopAllSameSaCheck, sub_sa + "&&&&&" + sub_sa_nick);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
<metadata name="colSubSaId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSubSaId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="colSubUserName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSubSaNick.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="colSubSaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSubSaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
|||||||
+22
-1
@@ -69,6 +69,7 @@
|
|||||||
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
|
this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
||||||
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colSubSaNick = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||||
@@ -412,6 +414,7 @@
|
|||||||
this.colCopyCookies,
|
this.colCopyCookies,
|
||||||
this.colSpuId,
|
this.colSpuId,
|
||||||
this.colSkcId,
|
this.colSkcId,
|
||||||
|
this.colImgUrl,
|
||||||
this.colProductSkcPic,
|
this.colProductSkcPic,
|
||||||
this.colProductName,
|
this.colProductName,
|
||||||
this.colProductCat,
|
this.colProductCat,
|
||||||
@@ -420,6 +423,7 @@
|
|||||||
this.colDraftId,
|
this.colDraftId,
|
||||||
this.colMdyTime,
|
this.colMdyTime,
|
||||||
this.colSubSa,
|
this.colSubSa,
|
||||||
|
this.colSubSaNick,
|
||||||
this.colNotes,
|
this.colNotes,
|
||||||
this.colEditNotes,
|
this.colEditNotes,
|
||||||
this.ColDelete,
|
this.ColDelete,
|
||||||
@@ -433,6 +437,7 @@
|
|||||||
this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552);
|
this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552);
|
||||||
this.dgvSelectProduct.TabIndex = 190;
|
this.dgvSelectProduct.TabIndex = 190;
|
||||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||||
|
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
|
||||||
//
|
//
|
||||||
// ucSplitPage1
|
// ucSplitPage1
|
||||||
//
|
//
|
||||||
@@ -539,6 +544,13 @@
|
|||||||
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||||
this.colSkcId.Width = 90;
|
this.colSkcId.Width = 90;
|
||||||
//
|
//
|
||||||
|
// colImgUrl
|
||||||
|
//
|
||||||
|
this.colImgUrl.HeaderText = "主图路径";
|
||||||
|
this.colImgUrl.Name = "colImgUrl";
|
||||||
|
this.colImgUrl.ReadOnly = true;
|
||||||
|
this.colImgUrl.Visible = false;
|
||||||
|
//
|
||||||
// colProductSkcPic
|
// colProductSkcPic
|
||||||
//
|
//
|
||||||
this.colProductSkcPic.HeaderText = "Skc图片";
|
this.colProductSkcPic.HeaderText = "Skc图片";
|
||||||
@@ -593,9 +605,16 @@
|
|||||||
//
|
//
|
||||||
// colSubSa
|
// colSubSa
|
||||||
//
|
//
|
||||||
this.colSubSa.HeaderText = "二级超管";
|
this.colSubSa.HeaderText = "二级超管账号";
|
||||||
this.colSubSa.Name = "colSubSa";
|
this.colSubSa.Name = "colSubSa";
|
||||||
this.colSubSa.ReadOnly = true;
|
this.colSubSa.ReadOnly = true;
|
||||||
|
this.colSubSa.Visible = false;
|
||||||
|
//
|
||||||
|
// colSubSaNick
|
||||||
|
//
|
||||||
|
this.colSubSaNick.HeaderText = "二级超管";
|
||||||
|
this.colSubSaNick.Name = "colSubSaNick";
|
||||||
|
this.colSubSaNick.ReadOnly = true;
|
||||||
//
|
//
|
||||||
// colNotes
|
// colNotes
|
||||||
//
|
//
|
||||||
@@ -694,6 +713,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl;
|
||||||
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
||||||
@@ -702,6 +722,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaNick;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
|
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
|
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
|
||||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
if (BaseClass.SaLevel != 1)
|
if (BaseClass.SaLevel != 1)
|
||||||
{
|
{
|
||||||
dgvSelectProduct.Columns["colSubSa"].Visible = false;
|
dgvSelectProduct.Columns["colSubSa"].Visible = false;
|
||||||
|
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
|
||||||
btnSetSubSa.Visible = false;
|
btnSetSubSa.Visible = false;
|
||||||
chkNoSubSa.Visible = false;
|
chkNoSubSa.Visible = false;
|
||||||
}
|
}
|
||||||
@@ -98,16 +99,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
lstAdminTemuDBProductSelect.AddRange(list);
|
lstAdminTemuDBProductSelect.AddRange(list);
|
||||||
this.ucSplitPage1.TotalPage = pageCount;
|
this.ucSplitPage1.TotalPage = pageCount;
|
||||||
|
|
||||||
|
if (defaultBitmap == null)
|
||||||
|
defaultBitmap = new Bitmap(80, 80);
|
||||||
|
// 获取Bitmap的Graphics对象
|
||||||
|
using (Graphics g = Graphics.FromImage(defaultBitmap))
|
||||||
|
{
|
||||||
|
// 清除整个Bitmap为蓝色
|
||||||
|
g.Clear(Color.White);
|
||||||
|
}
|
||||||
foreach (var prodSelect in lstAdminTemuDBProductSelect)
|
foreach (var prodSelect in lstAdminTemuDBProductSelect)
|
||||||
{
|
{
|
||||||
Image image = null;
|
|
||||||
string imgUrl = prodSelect?.main_img?.Replace("https", "http");
|
|
||||||
string rst = "";
|
|
||||||
if (!string.IsNullOrWhiteSpace(imgUrl))
|
|
||||||
image = GetHtml.GetUrlImg(imgUrl, out rst);
|
|
||||||
if (!string.IsNullOrEmpty(rst))
|
|
||||||
BaseMsgForm.ShowError(rst);
|
|
||||||
|
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||||
@@ -121,14 +122,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
"复制Cookies",
|
"复制Cookies",
|
||||||
prodSelect.spu_id,
|
prodSelect.spu_id,
|
||||||
prodSelect.skc_id,
|
prodSelect.skc_id,
|
||||||
image,//prod.main_img,
|
prodSelect.main_img.Replace("https:", "http:"),
|
||||||
|
defaultBitmap,//prod.main_img,
|
||||||
prodSelect.product_name,
|
prodSelect.product_name,
|
||||||
prodSelect.cat_name,
|
prodSelect.cat_name,
|
||||||
prodSelect.ext_code,
|
prodSelect.ext_code,
|
||||||
prodSelect.status,
|
prodSelect.status,
|
||||||
prodSelect.draft_id,
|
prodSelect.draft_id,
|
||||||
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd HH:mm"),
|
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd HH:mm"),
|
||||||
prodSelect.operate_sub_sa_name == "" ? "-" : prodSelect.operate_sub_sa_name,
|
string.IsNullOrEmpty(prodSelect.operate_sub_sa_name) ? "-" : prodSelect.operate_sub_sa_name,
|
||||||
|
string.IsNullOrEmpty(prodSelect.operate_sub_sa_nick) ? "-" : prodSelect.operate_sub_sa_nick,
|
||||||
prodSelect.notes,
|
prodSelect.notes,
|
||||||
"编辑",
|
"编辑",
|
||||||
"删除",
|
"删除",
|
||||||
@@ -140,11 +143,52 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
|
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
|
ShowDgvImg();
|
||||||
this.pbLoading.Visible = false;
|
this.pbLoading.Visible = false;
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bitmap defaultBitmap = null;
|
||||||
|
void ShowDgvImg()
|
||||||
|
{
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
|
||||||
|
{
|
||||||
|
if (row.Cells["colProductSkcPic"].Displayed == false)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (row.Cells["colProductSkcPic"].Value != null && row.Cells["colProductSkcPic"].Value != defaultBitmap)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Image image = null;
|
||||||
|
string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString();
|
||||||
|
string getImgError = "";
|
||||||
|
if (!string.IsNullOrWhiteSpace(imgUrl))
|
||||||
|
image = GetHtml.GetUrlImg(imgUrl, out getImgError);
|
||||||
|
if (!string.IsNullOrEmpty(getImgError))
|
||||||
|
BaseMsgForm.ShowError(getImgError);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
row.Cells["colProductSkcPic"].Value = image;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgvSelectProduct_Scroll(object sender, ScrollEventArgs e)
|
||||||
|
{
|
||||||
|
ShowDgvImg();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
||||||
{
|
{
|
||||||
@@ -1023,13 +1067,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
|
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
|
||||||
|
|
||||||
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true);
|
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true);
|
||||||
|
var subSa = subSaName.ParseToString().Split(new string[] { "&&&&&" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
row.Cells["colSubSa"].Value = subSaName.ParseToString();
|
row.Cells["colSubSa"].Value = subSa[0];
|
||||||
|
row.Cells["colSubSaNick"].Value = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
foreach (var p in prodList)
|
foreach (var p in prodList)
|
||||||
{
|
{
|
||||||
p.operate_sub_sa_name = subSaName.ParseToString();
|
p.operate_sub_sa_name = subSa[0];
|
||||||
|
p.operate_sub_sa_nick = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1040,13 +1087,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
|||||||
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstSupplierId.Contains(p.shop_id.ParseToString())).ToArray();
|
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstSupplierId.Contains(p.shop_id.ParseToString())).ToArray();
|
||||||
|
|
||||||
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => lstSupplierId.Contains(row.Cells["colSupplierId"]?.Value.ParseToString()));
|
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row => lstSupplierId.Contains(row.Cells["colSupplierId"]?.Value.ParseToString()));
|
||||||
|
var subSa = subSaName.ParseToString().Split(new string[] { "&&&&&" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
row.Cells["colSubSa"].Value = subSaName.ParseToString();
|
row.Cells["colSubSa"].Value = subSa[0];
|
||||||
|
row.Cells["colSubSaNick"].Value = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
foreach (var p in prodList)
|
foreach (var p in prodList)
|
||||||
{
|
{
|
||||||
p.operate_sub_sa_name = subSaName.ParseToString();
|
p.operate_sub_sa_name = subSa[0];
|
||||||
|
p.operate_sub_sa_nick = subSa.Length > 1 ? subSa[1] : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,9 @@
|
|||||||
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colImgUrl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@@ -168,6 +171,9 @@
|
|||||||
<metadata name="colSubSa.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colSubSa.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colSubSaNick.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="colNotes.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>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
Reference in new issue
Block a user