子帐户界面访问权管理,主账户可以禁止子账户操作某些界面。
This commit is contained in:
1 parent
b1afcd2cd8
commit
e7ece386e9
20 files changed
+364
-154
No files matched your search
@@ -27,7 +27,7 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 1182;
|
||||
public static int VersionCount = 1183;
|
||||
public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29pdd";
|
||||
@@ -317,6 +317,7 @@ namespace AllBase
|
||||
public static int SaLevel = 0;
|
||||
public static string UserAuthority = "";
|
||||
public static string ParentAuthority = "";
|
||||
public static string ForbiddenPage = "";
|
||||
public static int Points = 0;
|
||||
public static int ShopPointsPerMonth = 30;
|
||||
public static decimal? AuthorizedAmount = null;
|
||||
|
||||
@@ -291,6 +291,10 @@ namespace AllBase.Model.Result
|
||||
/// 店铺每续费一个月需要的积分
|
||||
/// </summary>
|
||||
public int shop_points_per_month { get; set; }
|
||||
/// <summary>
|
||||
/// 子账号禁止访问的页面
|
||||
/// </summary>
|
||||
public string forbidden_page { get; set; }
|
||||
}
|
||||
|
||||
public class UserSubAccountInfo : UserAccountInfo
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using KJD_Web.Model;
|
||||
using KJD_Web.BLL.WXXD;
|
||||
using KJD_Web.Model;
|
||||
using KJD_Web.Model.PddModel;
|
||||
using KJD_Web.Model.ShopModel;
|
||||
using KJD_Web.Utils;
|
||||
@@ -21,10 +22,12 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData, true))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'");
|
||||
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -56,6 +59,7 @@ namespace KJD_Web.BLL.BXX
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row["authority"].ToString(),
|
||||
forbidden_page = row["forbidden_page"].ToString(),
|
||||
parent_user_name = row["parent_user_name"].ToString(),
|
||||
};
|
||||
|
||||
@@ -89,6 +93,9 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'");
|
||||
var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'");
|
||||
@@ -99,8 +106,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -113,9 +119,9 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,forbidden_page,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -132,11 +138,13 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
|
||||
var password = RegexUtils.GetStringQuery(ref inputData, "password");
|
||||
var group = RegexUtils.GetStringQuery(ref inputData, "group");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -164,6 +172,7 @@ namespace KJD_Web.BLL.BXX
|
||||
company_name = row["company_name"].ToString(),
|
||||
notes = row["notes"].ToString(),
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -182,6 +191,9 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'");
|
||||
var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'");
|
||||
@@ -192,8 +204,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -217,6 +228,8 @@ namespace KJD_Web.BLL.BXX
|
||||
sql += " notes='" + notes + "',";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
if (forbidden_page != null)
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
@@ -234,10 +247,13 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
|
||||
var id = RegexUtils.GetStringQuery(ref inputData, "id");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
return "{\"code\":500,\"msg\":\"id不能为空\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -260,13 +276,15 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
|
||||
var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'");
|
||||
var search = RegexUtils.GetStringQuery(ref inputData, "search")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -305,6 +323,7 @@ namespace KJD_Web.BLL.BXX
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -323,6 +342,9 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'");
|
||||
var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'");
|
||||
var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'");
|
||||
@@ -333,8 +355,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -347,9 +368,9 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time) " +
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time,forbidden_page) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + forbidden_page + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -366,6 +387,9 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'");
|
||||
var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'");
|
||||
var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'");
|
||||
@@ -377,8 +401,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -406,6 +429,8 @@ namespace KJD_Web.BLL.BXX
|
||||
sql += " sa_level=" + sa_level + ",";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
if (forbidden_page != null)
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ namespace KJD_Web.BLL
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(user.company_name))
|
||||
@@ -77,8 +79,7 @@ namespace KJD_Web.BLL
|
||||
var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -91,9 +92,9 @@ namespace KJD_Web.BLL
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
|
||||
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,forbidden_page,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -142,6 +143,7 @@ namespace KJD_Web.BLL
|
||||
company_name = row["company_name"].ToString(),
|
||||
notes = row["notes"].ToString(),
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -170,6 +172,7 @@ namespace KJD_Web.BLL
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -195,6 +198,8 @@ namespace KJD_Web.BLL
|
||||
sql += " notes='" + notes + "',";
|
||||
if (!string.IsNullOrEmpty(authority))
|
||||
sql += " authority='" + authority + "',";
|
||||
if (!string.IsNullOrEmpty(forbidden_page))
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
@@ -288,6 +293,7 @@ namespace KJD_Web.BLL
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -317,6 +323,7 @@ namespace KJD_Web.BLL
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -332,9 +339,9 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
|
||||
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level," +
|
||||
"authorized_amount,authority,add_time,mdy_time) " +
|
||||
"authorized_amount,authority,forbidden_page,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" + authority + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" + authority + "','" + forbidden_page + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -363,6 +370,7 @@ namespace KJD_Web.BLL
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -394,6 +402,8 @@ namespace KJD_Web.BLL
|
||||
sql += " authorized_amount=" + authorized_amount + ",";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
if (forbidden_page != null)
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
|
||||
@@ -22,9 +22,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
if (string.IsNullOrEmpty(signData)) { return false; }
|
||||
|
||||
var time = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref signData, "time"), out time);
|
||||
string time1 = RegexUtils.GetStringQuery(ref signData, "code");
|
||||
var time = RegexUtils.GetStringQuery(ref signData, "time").ParseToInt();
|
||||
var time1 = RegexUtils.GetStringQuery(ref signData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return false;
|
||||
|
||||
@@ -98,6 +97,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
parent_user_name = row["parent_user_name"].ToString(),
|
||||
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
|
||||
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
|
||||
@@ -160,6 +160,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -174,9 +175,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "INSERT into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
|
||||
sql = "INSERT into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name," +
|
||||
"authority,forbidden_page,add_time,mdy_time) " +
|
||||
"VALUES ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -228,6 +230,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
company_name = row["company_name"].ToString(),
|
||||
notes = row["notes"].ToString(),
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -259,6 +262,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -284,6 +288,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += " notes='" + notes + "',";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
if (forbidden_page != null)
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
@@ -416,6 +422,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
|
||||
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
|
||||
};
|
||||
@@ -464,6 +471,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
|
||||
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
|
||||
if (shop_points_per_month.ParseToInt() <= 30) // 充值用户月积分消耗点数,最小30
|
||||
@@ -481,9 +489,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
|
||||
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority," +
|
||||
"shop_points_per_month,add_time,mdy_time) " +
|
||||
"forbidden_page,shop_points_per_month,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "'," + shop_points_per_month + ",'" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + forbidden_page + "'," +
|
||||
shop_points_per_month + ",'" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -514,6 +523,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
@@ -542,6 +552,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += " sa_level=" + sa_level + ",";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
if (forbidden_page != null)
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
if (shop_points_per_month != null)
|
||||
sql += " shop_points_per_month=" + shop_points_per_month + ",";
|
||||
sql = sql.TrimEnd(',');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
|
||||
@@ -74,5 +74,9 @@ namespace KJD_Web.Model
|
||||
/// 单店铺续费1个月消耗的点数
|
||||
/// </summary>
|
||||
public int shop_points_per_month { get; set; }
|
||||
/// <summary>
|
||||
/// 子账号被禁止展示的功能页面
|
||||
/// </summary>
|
||||
public string forbidden_page { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace TemuKJD
|
||||
System.Threading.Thread.Sleep(100);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
panel2_Click(this.pnlUploadGoods, null);
|
||||
pnlUpload_Click(this.pnlUploadGoods, null);
|
||||
}));
|
||||
});
|
||||
}
|
||||
@@ -57,6 +57,11 @@ namespace TemuKJD
|
||||
{
|
||||
label1.Visible = false;
|
||||
pnlChat.Visible = pnlUploadGoods.Visible = true;
|
||||
if (BaseClass.ForbiddenPage.Contains("客服"))
|
||||
{
|
||||
pnlChat.Visible = false;
|
||||
//pnlUpload_Click(null, null);
|
||||
}
|
||||
}
|
||||
this.pnlChat.StyleMouseOver.BorderColor.Color = GlobalConfig.BorderColor;
|
||||
this.pnlUploadGoods.StyleMouseOver.BorderColor.Color = GlobalConfig.BorderColor;
|
||||
@@ -73,7 +78,7 @@ namespace TemuKJD
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
private void panel2_Click(object sender, EventArgs e)
|
||||
private void pnlUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
mf.WindowState = FormWindowState.Maximized;
|
||||
mf.Show();
|
||||
|
||||
Generated
+1
-1
@@ -89,7 +89,7 @@
|
||||
this.pnlUploadGoods.StyleMouseOver.Border = DevComponents.DotNetBar.eBorderType.RaisedInner;
|
||||
this.pnlUploadGoods.StyleMouseOver.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(157)))), ((int)(((byte)(235)))));
|
||||
this.pnlUploadGoods.TabIndex = 1;
|
||||
this.pnlUploadGoods.Click += new System.EventHandler(this.panel2_Click);
|
||||
this.pnlUploadGoods.Click += new System.EventHandler(this.pnlUpload_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
|
||||
+1
-2
@@ -178,12 +178,11 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private UserComponent.UcTreeView tv;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label lblName;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
public UserComponent.UcTreeView tv;
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -913,32 +913,32 @@ namespace TemuKJD
|
||||
}
|
||||
}
|
||||
|
||||
private object uploadForm;
|
||||
public object ProductForm;
|
||||
public void pnlUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "kuajingda")
|
||||
{
|
||||
if (uploadForm == null)
|
||||
if (ProductForm == null)
|
||||
{
|
||||
uploadForm = new ProductForm();
|
||||
ProductForm = new ProductForm();
|
||||
}
|
||||
ShowMainPanel(uploadForm as ProductForm, sender as Panel);
|
||||
ShowMainPanel(ProductForm as ProductForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
if (uploadForm == null)
|
||||
if (ProductForm == null)
|
||||
{
|
||||
uploadForm = new PDDProductForm();
|
||||
ProductForm = new PDDProductForm();
|
||||
}
|
||||
ShowMainPanel(uploadForm as PDDProductForm, sender as Panel);
|
||||
ShowMainPanel(ProductForm as PDDProductForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (uploadForm == null)
|
||||
if (ProductForm == null)
|
||||
{
|
||||
uploadForm = new WXProductForm();
|
||||
ProductForm = new WXProductForm();
|
||||
}
|
||||
ShowMainPanel(uploadForm as WXProductForm, sender as Panel);
|
||||
ShowMainPanel(ProductForm as WXProductForm, sender as Panel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2164,7 +2164,7 @@ namespace TemuKJD.WXForms.OrderForms
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("读取打印单号失败" + ex.Message);
|
||||
BaseMsgForm.ShowError("读取打印单号失败 " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -198,12 +198,11 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private UserComponent.UcTreeView tv;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label lblName;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
public UserComponent.UcTreeView tv;
|
||||
}
|
||||
}
|
||||
@@ -39,39 +39,45 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
try
|
||||
{
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
List<string> hideName = new List<string>() {"我的商品库", "1688商品采集", "多多商品采集", "商品列表", "爆单神器1", "商品同步1", "清理无流量1" };
|
||||
var hideNames = getHideTreeNodes();
|
||||
|
||||
if (BaseClass.UserAuthority.Contains("商品采集"))
|
||||
{
|
||||
hideName.Remove("1688商品采集");
|
||||
hideName.Remove("多多商品采集");
|
||||
hideName.Remove("我的商品库");
|
||||
}
|
||||
if (BaseClass.ParentAuthority.Contains("商品采集"))
|
||||
hideName.Remove("我的商品库");
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
//hideName.Remove("设置进货价");
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
}
|
||||
if (BaseClass.SaLevel == 2)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in hideName)
|
||||
foreach (var item in hideNames)
|
||||
{
|
||||
var n = tv.Nodes[0].Nodes.Find(item, true);
|
||||
if (n.Count() > 0)
|
||||
n[0].Remove();
|
||||
}
|
||||
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public List<string> getHideTreeNodes()
|
||||
{
|
||||
List<string> hideNames = new List<string>() { "我的商品库", "1688商品采集", "多多商品采集", "爆单神器1", "商品同步1", "清理无流量1" };
|
||||
|
||||
if (BaseClass.UserAuthority.Contains("商品采集"))
|
||||
{
|
||||
hideNames.Remove("1688商品采集");
|
||||
hideNames.Remove("多多商品采集");
|
||||
hideNames.Remove("我的商品库");
|
||||
}
|
||||
if (BaseClass.ParentAuthority.Contains("商品采集"))
|
||||
{
|
||||
hideNames.Remove("我的商品库");
|
||||
}
|
||||
|
||||
foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(','))
|
||||
{
|
||||
hideNames.Add(forbiddenPage);
|
||||
}
|
||||
|
||||
|
||||
return hideNames;
|
||||
}
|
||||
|
||||
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
instance = this;
|
||||
|
||||
+29
-30
@@ -28,19 +28,19 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("店铺列表");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("子账号管理");
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("店铺地址管理");
|
||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("店铺经营统计");
|
||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("评分考核");
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("充值二维码");
|
||||
System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode8,
|
||||
treeNode9,
|
||||
treeNode10,
|
||||
treeNode11,
|
||||
treeNode12,
|
||||
treeNode13});
|
||||
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("店铺列表");
|
||||
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("子账号管理");
|
||||
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("店铺地址管理");
|
||||
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("店铺经营统计");
|
||||
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("评分考核");
|
||||
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("充值二维码");
|
||||
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
treeNode4,
|
||||
treeNode5,
|
||||
treeNode6});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -132,22 +132,22 @@
|
||||
this.tv.Location = new System.Drawing.Point(0, 0);
|
||||
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.tv.Name = "tv";
|
||||
treeNode8.Name = "店铺列表";
|
||||
treeNode8.Text = "店铺列表";
|
||||
treeNode9.Name = "子账号管理";
|
||||
treeNode9.Text = "子账号管理";
|
||||
treeNode10.Name = "店铺地址管理";
|
||||
treeNode10.Text = "店铺地址管理";
|
||||
treeNode11.Name = "店铺经营统计";
|
||||
treeNode11.Text = "店铺经营统计";
|
||||
treeNode12.Name = "评分考核";
|
||||
treeNode12.Text = "评分考核";
|
||||
treeNode13.Name = "充值二维码";
|
||||
treeNode13.Text = "充值二维码";
|
||||
treeNode14.Name = "店铺管理";
|
||||
treeNode14.Text = "店铺管理";
|
||||
treeNode1.Name = "店铺列表";
|
||||
treeNode1.Text = "店铺列表";
|
||||
treeNode2.Name = "子账号管理";
|
||||
treeNode2.Text = "子账号管理";
|
||||
treeNode3.Name = "店铺地址管理";
|
||||
treeNode3.Text = "店铺地址管理";
|
||||
treeNode4.Name = "店铺经营统计";
|
||||
treeNode4.Text = "店铺经营统计";
|
||||
treeNode5.Name = "评分考核";
|
||||
treeNode5.Text = "评分考核";
|
||||
treeNode6.Name = "充值二维码";
|
||||
treeNode6.Text = "充值二维码";
|
||||
treeNode7.Name = "店铺管理";
|
||||
treeNode7.Text = "店铺管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode14});
|
||||
treeNode7});
|
||||
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
|
||||
this.tv.Size = new System.Drawing.Size(140, 461);
|
||||
this.tv.TabIndex = 1;
|
||||
@@ -175,12 +175,11 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private UserComponent.UcTreeView tv;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label lblName;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
public UserComponent.UcTreeView tv;
|
||||
}
|
||||
}
|
||||
@@ -37,40 +37,52 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
|
||||
try
|
||||
{
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
var hideNames = getHideTreeNodes();
|
||||
|
||||
List<string> hideName = new List<string>() { "充值二维码", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
|
||||
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
//hideName.Remove("店铺地址管理");
|
||||
}
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
hideName.Remove("店铺地址管理");
|
||||
hideName.Remove("子账号管理");
|
||||
hideName.Remove("评分考核");
|
||||
}
|
||||
if (BaseClass.UserAuthority.Contains("评分考核"))
|
||||
{
|
||||
hideName.Remove("评分考核");
|
||||
}
|
||||
if (BaseClass.UserAuthority.Contains("充值用户") && BaseClass.GroupId == 3)
|
||||
{
|
||||
hideName.Remove("充值二维码");
|
||||
}
|
||||
|
||||
foreach (var item in hideName)
|
||||
foreach (var item in hideNames)
|
||||
{
|
||||
var n = tv.Nodes[0].Nodes.Find(item, true);
|
||||
if (n.Count() > 0)
|
||||
n[0].Remove();
|
||||
}
|
||||
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public List<string> getHideTreeNodes()
|
||||
{
|
||||
List<string> hideNames = new List<string>() { "充值二维码", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
|
||||
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
//hideName.Remove("店铺地址管理");
|
||||
}
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
hideNames.Remove("店铺地址管理");
|
||||
hideNames.Remove("子账号管理");
|
||||
hideNames.Remove("评分考核");
|
||||
}
|
||||
if (BaseClass.UserAuthority.Contains("评分考核"))
|
||||
{
|
||||
hideNames.Remove("评分考核");
|
||||
}
|
||||
if (BaseClass.UserAuthority.Contains("充值用户") && BaseClass.GroupId == 3)
|
||||
{
|
||||
hideNames.Remove("充值二维码");
|
||||
}
|
||||
|
||||
foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(','))
|
||||
{
|
||||
hideNames.Add(forbiddenPage);
|
||||
}
|
||||
|
||||
return hideNames;
|
||||
}
|
||||
|
||||
public void ClickShopAddress()
|
||||
{
|
||||
var node = tv.Nodes[0].Nodes.Find("店铺地址管理", true).FirstOrDefault();
|
||||
|
||||
+92
-22
@@ -28,9 +28,14 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.lblForbiddenPage = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnRefresh = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCancel = new TemuKJD.UserControls.ButtonEx();
|
||||
@@ -57,6 +62,7 @@
|
||||
this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.groupIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.groupNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.forbiddenPageColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
@@ -64,6 +70,7 @@
|
||||
this.splitContainer5.Panel1.SuspendLayout();
|
||||
this.splitContainer5.Panel2.SuspendLayout();
|
||||
this.splitContainer5.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -77,6 +84,8 @@
|
||||
//
|
||||
// splitContainer5.Panel1
|
||||
//
|
||||
this.splitContainer5.Panel1.Controls.Add(this.flowLayoutPanel1);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.lblForbiddenPage);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.label1);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.btnRefresh);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.btnCancel);
|
||||
@@ -102,16 +111,58 @@
|
||||
//
|
||||
this.splitContainer5.Panel2.Controls.Add(this.dgvUser);
|
||||
this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5);
|
||||
this.splitContainer5.Size = new System.Drawing.Size(933, 445);
|
||||
this.splitContainer5.Size = new System.Drawing.Size(933, 613);
|
||||
this.splitContainer5.SplitterDistance = 357;
|
||||
this.splitContainer5.SplitterWidth = 1;
|
||||
this.splitContainer5.TabIndex = 2;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.flowLayoutPanel1.Controls.Add(this.ucCheckBox1);
|
||||
this.flowLayoutPanel1.Controls.Add(this.ucCheckBox2);
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(59, 263);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(220, 218);
|
||||
this.flowLayoutPanel1.TabIndex = 40;
|
||||
//
|
||||
// ucCheckBox1
|
||||
//
|
||||
this.ucCheckBox1.AutoSize = true;
|
||||
this.ucCheckBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.ucCheckBox1.Name = "ucCheckBox1";
|
||||
this.ucCheckBox1.Size = new System.Drawing.Size(51, 21);
|
||||
this.ucCheckBox1.TabIndex = 0;
|
||||
this.ucCheckBox1.Text = "客服";
|
||||
this.ucCheckBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ucCheckBox2
|
||||
//
|
||||
this.ucCheckBox2.AutoSize = true;
|
||||
this.ucCheckBox2.Location = new System.Drawing.Point(60, 3);
|
||||
this.ucCheckBox2.Name = "ucCheckBox2";
|
||||
this.ucCheckBox2.Size = new System.Drawing.Size(51, 21);
|
||||
this.ucCheckBox2.TabIndex = 1;
|
||||
this.ucCheckBox2.Text = "采购";
|
||||
this.ucCheckBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblForbiddenPage
|
||||
//
|
||||
this.lblForbiddenPage.AutoSize = true;
|
||||
this.lblForbiddenPage.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblForbiddenPage.Location = new System.Drawing.Point(27, 234);
|
||||
this.lblForbiddenPage.Name = "lblForbiddenPage";
|
||||
this.lblForbiddenPage.Size = new System.Drawing.Size(121, 20);
|
||||
this.lblForbiddenPage.TabIndex = 39;
|
||||
this.lblForbiddenPage.Text = "禁止访问的页面:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.label1.Location = new System.Drawing.Point(56, 378);
|
||||
this.label1.Location = new System.Drawing.Point(56, 546);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(212, 17);
|
||||
this.label1.TabIndex = 37;
|
||||
@@ -136,11 +187,12 @@
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnCancel.ForeColor = System.Drawing.Color.White;
|
||||
this.btnCancel.Location = new System.Drawing.Point(59, 328);
|
||||
this.btnCancel.Location = new System.Drawing.Point(59, 496);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnCancel.TabIndex = 35;
|
||||
@@ -152,11 +204,12 @@
|
||||
// btnOpUser
|
||||
//
|
||||
this.btnOpUser.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnOpUser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnOpUser.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOpUser.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnOpUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnOpUser.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOpUser.Location = new System.Drawing.Point(174, 328);
|
||||
this.btnOpUser.Location = new System.Drawing.Point(174, 496);
|
||||
this.btnOpUser.Name = "btnOpUser";
|
||||
this.btnOpUser.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnOpUser.TabIndex = 34;
|
||||
@@ -168,7 +221,7 @@
|
||||
//
|
||||
this.label30.AutoSize = true;
|
||||
this.label30.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.label30.Location = new System.Drawing.Point(282, 145);
|
||||
this.label30.Location = new System.Drawing.Point(282, 91);
|
||||
this.label30.Name = "label30";
|
||||
this.label30.Size = new System.Drawing.Size(56, 17);
|
||||
this.label30.TabIndex = 33;
|
||||
@@ -178,7 +231,7 @@
|
||||
//
|
||||
this.label31.AutoSize = true;
|
||||
this.label31.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.label31.Location = new System.Drawing.Point(266, 229);
|
||||
this.label31.Location = new System.Drawing.Point(266, 163);
|
||||
this.label31.Name = "label31";
|
||||
this.label31.Size = new System.Drawing.Size(13, 17);
|
||||
this.label31.TabIndex = 32;
|
||||
@@ -186,7 +239,7 @@
|
||||
//
|
||||
// txtRePass
|
||||
//
|
||||
this.txtRePass.Location = new System.Drawing.Point(112, 226);
|
||||
this.txtRePass.Location = new System.Drawing.Point(112, 160);
|
||||
this.txtRePass.Name = "txtRePass";
|
||||
this.txtRePass.PasswordChar = '*';
|
||||
this.txtRePass.Size = new System.Drawing.Size(148, 23);
|
||||
@@ -196,7 +249,7 @@
|
||||
//
|
||||
this.label32.AutoSize = true;
|
||||
this.label32.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label32.Location = new System.Drawing.Point(27, 227);
|
||||
this.label32.Location = new System.Drawing.Point(27, 161);
|
||||
this.label32.Name = "label32";
|
||||
this.label32.Size = new System.Drawing.Size(79, 20);
|
||||
this.label32.TabIndex = 31;
|
||||
@@ -206,7 +259,7 @@
|
||||
//
|
||||
this.label33.AutoSize = true;
|
||||
this.label33.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.label33.Location = new System.Drawing.Point(266, 271);
|
||||
this.label33.Location = new System.Drawing.Point(266, 200);
|
||||
this.label33.Name = "label33";
|
||||
this.label33.Size = new System.Drawing.Size(13, 17);
|
||||
this.label33.TabIndex = 30;
|
||||
@@ -216,7 +269,7 @@
|
||||
//
|
||||
this.label34.AutoSize = true;
|
||||
this.label34.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.label34.Location = new System.Drawing.Point(266, 187);
|
||||
this.label34.Location = new System.Drawing.Point(266, 127);
|
||||
this.label34.Name = "label34";
|
||||
this.label34.Size = new System.Drawing.Size(13, 17);
|
||||
this.label34.TabIndex = 29;
|
||||
@@ -226,7 +279,7 @@
|
||||
//
|
||||
this.label35.AutoSize = true;
|
||||
this.label35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.label35.Location = new System.Drawing.Point(266, 145);
|
||||
this.label35.Location = new System.Drawing.Point(266, 91);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(13, 17);
|
||||
this.label35.TabIndex = 28;
|
||||
@@ -236,7 +289,7 @@
|
||||
//
|
||||
this.label36.AutoSize = true;
|
||||
this.label36.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.label36.Location = new System.Drawing.Point(266, 103);
|
||||
this.label36.Location = new System.Drawing.Point(266, 55);
|
||||
this.label36.Name = "label36";
|
||||
this.label36.Size = new System.Drawing.Size(13, 17);
|
||||
this.label36.TabIndex = 27;
|
||||
@@ -252,7 +305,7 @@
|
||||
"上货",
|
||||
"数据",
|
||||
"登录"});
|
||||
this.cmbGroup.Location = new System.Drawing.Point(112, 267);
|
||||
this.cmbGroup.Location = new System.Drawing.Point(112, 196);
|
||||
this.cmbGroup.Name = "cmbGroup";
|
||||
this.cmbGroup.Size = new System.Drawing.Size(148, 25);
|
||||
this.cmbGroup.TabIndex = 26;
|
||||
@@ -262,7 +315,7 @@
|
||||
//
|
||||
this.label37.AutoSize = true;
|
||||
this.label37.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label37.Location = new System.Drawing.Point(55, 269);
|
||||
this.label37.Location = new System.Drawing.Point(55, 198);
|
||||
this.label37.Name = "label37";
|
||||
this.label37.Size = new System.Drawing.Size(51, 20);
|
||||
this.label37.TabIndex = 25;
|
||||
@@ -270,7 +323,7 @@
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
this.txtPassword.Location = new System.Drawing.Point(112, 184);
|
||||
this.txtPassword.Location = new System.Drawing.Point(112, 124);
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.PasswordChar = '*';
|
||||
this.txtPassword.Size = new System.Drawing.Size(148, 23);
|
||||
@@ -280,7 +333,7 @@
|
||||
//
|
||||
this.label38.AutoSize = true;
|
||||
this.label38.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label38.Location = new System.Drawing.Point(55, 185);
|
||||
this.label38.Location = new System.Drawing.Point(55, 125);
|
||||
this.label38.Name = "label38";
|
||||
this.label38.Size = new System.Drawing.Size(51, 20);
|
||||
this.label38.TabIndex = 22;
|
||||
@@ -288,7 +341,7 @@
|
||||
//
|
||||
// mobiletextBox
|
||||
//
|
||||
this.mobiletextBox.Location = new System.Drawing.Point(112, 142);
|
||||
this.mobiletextBox.Location = new System.Drawing.Point(112, 88);
|
||||
this.mobiletextBox.Name = "mobiletextBox";
|
||||
this.mobiletextBox.Size = new System.Drawing.Size(148, 23);
|
||||
this.mobiletextBox.TabIndex = 21;
|
||||
@@ -297,7 +350,7 @@
|
||||
//
|
||||
this.label39.AutoSize = true;
|
||||
this.label39.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label39.Location = new System.Drawing.Point(41, 143);
|
||||
this.label39.Location = new System.Drawing.Point(41, 89);
|
||||
this.label39.Name = "label39";
|
||||
this.label39.Size = new System.Drawing.Size(65, 20);
|
||||
this.label39.TabIndex = 20;
|
||||
@@ -305,7 +358,7 @@
|
||||
//
|
||||
// txtNickName
|
||||
//
|
||||
this.txtNickName.Location = new System.Drawing.Point(112, 100);
|
||||
this.txtNickName.Location = new System.Drawing.Point(112, 52);
|
||||
this.txtNickName.Name = "txtNickName";
|
||||
this.txtNickName.Size = new System.Drawing.Size(148, 23);
|
||||
this.txtNickName.TabIndex = 19;
|
||||
@@ -314,7 +367,7 @@
|
||||
//
|
||||
this.label40.AutoSize = true;
|
||||
this.label40.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label40.Location = new System.Drawing.Point(55, 101);
|
||||
this.label40.Location = new System.Drawing.Point(55, 53);
|
||||
this.label40.Name = "label40";
|
||||
this.label40.Size = new System.Drawing.Size(51, 20);
|
||||
this.label40.TabIndex = 18;
|
||||
@@ -345,6 +398,7 @@
|
||||
this.mobileColumn,
|
||||
this.groupIdColumn,
|
||||
this.groupNameColumn,
|
||||
this.forbiddenPageColumn,
|
||||
this.shopCountColumn,
|
||||
this.editColumn,
|
||||
this.deleteColumn});
|
||||
@@ -355,7 +409,7 @@
|
||||
this.dgvUser.Name = "dgvUser";
|
||||
this.dgvUser.ReadOnly = true;
|
||||
this.dgvUser.RowTemplate.Height = 23;
|
||||
this.dgvUser.Size = new System.Drawing.Size(570, 435);
|
||||
this.dgvUser.Size = new System.Drawing.Size(570, 603);
|
||||
this.dgvUser.TabIndex = 1;
|
||||
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
|
||||
//
|
||||
@@ -391,6 +445,13 @@
|
||||
this.groupNameColumn.Name = "groupNameColumn";
|
||||
this.groupNameColumn.ReadOnly = true;
|
||||
//
|
||||
// forbiddenPageColumn
|
||||
//
|
||||
this.forbiddenPageColumn.FillWeight = 200F;
|
||||
this.forbiddenPageColumn.HeaderText = "禁止访问页面";
|
||||
this.forbiddenPageColumn.Name = "forbiddenPageColumn";
|
||||
this.forbiddenPageColumn.ReadOnly = true;
|
||||
//
|
||||
// shopCountColumn
|
||||
//
|
||||
this.shopCountColumn.HeaderText = "店铺数";
|
||||
@@ -400,6 +461,7 @@
|
||||
//
|
||||
// editColumn
|
||||
//
|
||||
this.editColumn.FillWeight = 60F;
|
||||
this.editColumn.HeaderText = "编辑";
|
||||
this.editColumn.Name = "editColumn";
|
||||
this.editColumn.ReadOnly = true;
|
||||
@@ -408,6 +470,7 @@
|
||||
//
|
||||
// deleteColumn
|
||||
//
|
||||
this.deleteColumn.FillWeight = 60F;
|
||||
this.deleteColumn.HeaderText = "删除";
|
||||
this.deleteColumn.Name = "deleteColumn";
|
||||
this.deleteColumn.ReadOnly = true;
|
||||
@@ -416,7 +479,7 @@
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(933, 445);
|
||||
this.ClientSize = new System.Drawing.Size(933, 613);
|
||||
this.Controls.Add(this.splitContainer5);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.KeyPreview = true;
|
||||
@@ -429,6 +492,8 @@
|
||||
this.splitContainer5.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit();
|
||||
this.splitContainer5.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -458,11 +523,16 @@
|
||||
private UserComponent.DataGridViewEx dgvUser;
|
||||
private UserControls.ButtonEx btnRefresh;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private UserComponent.UcCheckBox ucCheckBox1;
|
||||
private System.Windows.Forms.Label lblForbiddenPage;
|
||||
private UserComponent.UcCheckBox ucCheckBox2;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn groupIdColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn groupNameColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn forbiddenPageColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
|
||||
|
||||
@@ -11,6 +11,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Work;
|
||||
using TemuKJD.WXForms.ProductForms;
|
||||
using TemuKJD.UserComponent;
|
||||
|
||||
namespace TemuKJD.WXForms.ShopForms
|
||||
{
|
||||
@@ -47,6 +49,17 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
data.Append("&sub_nick_name=" + GetHtml.UrlEncodeUtf8(txtNickName.Text));
|
||||
data.Append("&sub_name=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
data.Append("&sub_mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
var forbiddenPage = "";
|
||||
foreach (var control in this.flowLayoutPanel1.Controls)
|
||||
{
|
||||
var chk = control as UcCheckBox;
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
forbiddenPage += chk.Text + ",";
|
||||
}
|
||||
}
|
||||
//data.Append("&forbidden_page=" + GetHtml.UrlEncodeUtf8(forbiddenPage.Trim(',')));
|
||||
data.Append("&forbidden_page=" + forbiddenPage.Trim(','));
|
||||
data.Append("&card_id=");
|
||||
if (cmbGroup.Text == "客服")
|
||||
data.Append("&group_id=4");
|
||||
@@ -103,6 +116,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
txtPassword.Clear();
|
||||
txtRePass.Clear();
|
||||
mobiletextBox.Clear();
|
||||
GetForbiddenCheckBoxes();
|
||||
}
|
||||
|
||||
private void GetUser()
|
||||
@@ -127,9 +141,10 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
user.mobile = BaseRegex.GetStringJson(ref oStr, "mobile");
|
||||
user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id");
|
||||
user.shop_count = BaseRegex.GetIntJson(ref oStr, "shop_count");
|
||||
user.forbidden_page = BaseRegex.GetStringJson(ref oStr, "forbidden_page");
|
||||
|
||||
AllUsers.Add(user);
|
||||
dgvUser.Rows.Add(user.id, user.nick_name, user.user_name, user.group_id, user.group_name, user.shop_count, "编辑", "删除");
|
||||
dgvUser.Rows.Add(user.id, user.nick_name, user.user_name, user.group_id, user.group_name, user.forbidden_page, user.shop_count, "编辑", "删除");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,6 +166,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
string nickName = dgvUser.Rows[e.RowIndex].Cells["UserNickNameColumn"].Value.ToString();
|
||||
string mobile = dgvUser.Rows[e.RowIndex].Cells["mobileColumn"].Value.ToString();
|
||||
string groupName = dgvUser.Rows[e.RowIndex].Cells["groupNameColumn"].Value.ToString();
|
||||
string forbidden_page = dgvUser.Rows[e.RowIndex].Cells["forbiddenPageColumn"].Value.ToString();
|
||||
if (columname == "编辑")
|
||||
{
|
||||
Uid = uid;
|
||||
@@ -162,6 +178,14 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
btnOpUser.Text = "保存用户";
|
||||
btnCancel.Visible = true;
|
||||
btnCancel.Text = "取消編輯";
|
||||
foreach (var control in this.flowLayoutPanel1.Controls)
|
||||
{
|
||||
var chk = control as UcCheckBox;
|
||||
if (chk!= null)
|
||||
{
|
||||
chk.Checked = forbidden_page.Contains(chk.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (columname == "删除")
|
||||
{
|
||||
@@ -209,9 +233,45 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
// this.groupIdcomboBox.Enabled = true;
|
||||
//}
|
||||
this.dgvUser.BackgroundColor = Color.White;
|
||||
|
||||
GetForbiddenCheckBoxes();
|
||||
GetUser();
|
||||
}
|
||||
|
||||
void GetForbiddenCheckBoxes()
|
||||
{
|
||||
this.flowLayoutPanel1.Controls.Clear();
|
||||
this.flowLayoutPanel1.Controls.Add(new UcCheckBox() { Name = "客服", Text = "客服", AutoSize = true });
|
||||
this.flowLayoutPanel1.Controls.Add(new Label() { Text = "-------------------------------------", AutoSize = true });
|
||||
//this.flowLayoutPanel1.Controls.Add(new UcCheckBox() { Name = "采购", Text = "采购", AutoSize = true });
|
||||
List<string> subUserNoAuthorityPageNames = new List<string>() { "子账号管理", "店铺地址管理", "充值二维码", "1688商品采集", "多多商品采集" };
|
||||
var shopForm = MainForm.instance.shopForm as WXShopForm;
|
||||
if (shopForm != null)
|
||||
{
|
||||
var shopHideName = shopForm.getHideTreeNodes();
|
||||
foreach (TreeNode node in shopForm.tv.Nodes[0].Nodes)
|
||||
{
|
||||
if (!shopHideName.Contains(node.Text) && !subUserNoAuthorityPageNames.Contains(node.Text))
|
||||
{
|
||||
this.flowLayoutPanel1.Controls.Add(new UcCheckBox() { Name = node.Text, Text = node.Text, AutoSize = true });
|
||||
}
|
||||
}
|
||||
}
|
||||
this.flowLayoutPanel1.Controls.Add(new Label() { Text = "-------------------------------------", AutoSize = true });
|
||||
var prodForm = MainForm.instance.ProductForm as WXProductForm;
|
||||
if (prodForm != null)
|
||||
{
|
||||
var prodHideName = prodForm.getHideTreeNodes();
|
||||
foreach (TreeNode node in prodForm.tv.Nodes[0].Nodes)
|
||||
{
|
||||
if (!prodHideName.Contains(node.Text) && !subUserNoAuthorityPageNames.Contains(node.Text))
|
||||
{
|
||||
this.flowLayoutPanel1.Controls.Add(new UcCheckBox() { Name = node.Text, Text = node.Text, AutoSize = true });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetUser();
|
||||
|
||||
@@ -132,6 +132,9 @@
|
||||
<metadata name="groupNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="forbiddenPageColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="shopCountColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Work
|
||||
BaseClass.SaLevel = BaseRegex.GetIntJson(ref html, "sa_level").ParseToInt();
|
||||
BaseClass.UserAuthority = BaseRegex.GetStringJson(ref html, "authority").ParseToString();
|
||||
BaseClass.ParentAuthority = BaseRegex.GetStringJson(ref html, "parent_authority").ParseToString();
|
||||
BaseClass.ForbiddenPage = BaseRegex.GetStringJson(ref html, "forbidden_page").ParseToString();
|
||||
BaseClass.Mobile = BaseRegex.GetStringJson(ref html, "mobile");
|
||||
BaseClass.UserVersion = BaseRegex.GetStringJson(ref html, "version").ParseToInt();
|
||||
BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "version_s");
|
||||
|
||||
Reference in new issue
Block a user