子帐户界面访问权管理,主账户可以禁止子账户操作某些界面。
This commit is contained in:
1 parent
b1afcd2cd8
commit
e7ece386e9
20 files changed
+364
-154
No files matched your search
+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;
|
||||
|
||||
Reference in new issue
Block a user