拼多多版权限管理 指定类目上传 ai图片上传权限管理
This commit is contained in:
1 parent
58798805ed
commit
ce23b0a49a
28 files changed
+1265
-483
No files matched your search
+80
-30
@@ -29,9 +29,10 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
|
||||
this.cmbSaLevel = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
@@ -65,6 +66,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.label40 = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.chkAiImage = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkSetCats = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -74,6 +78,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaLevelName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colAuthority = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
@@ -89,7 +94,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//
|
||||
// splitContainer5
|
||||
//
|
||||
this.splitContainer5.BackColor = System.Drawing.Color.Transparent;
|
||||
this.splitContainer5.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer5.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer5.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -97,6 +102,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//
|
||||
// splitContainer5.Panel1
|
||||
//
|
||||
this.splitContainer5.Panel1.Controls.Add(this.chkSetCats);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.chkAiImage);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.label7);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.label6);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.lblWatermark);
|
||||
@@ -132,7 +140,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//
|
||||
this.splitContainer5.Panel2.Controls.Add(this.splitContainer1);
|
||||
this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5);
|
||||
this.splitContainer5.Size = new System.Drawing.Size(1270, 527);
|
||||
this.splitContainer5.Size = new System.Drawing.Size(1270, 575);
|
||||
this.splitContainer5.SplitterDistance = 357;
|
||||
this.splitContainer5.SplitterWidth = 1;
|
||||
this.splitContainer5.TabIndex = 3;
|
||||
@@ -246,7 +254,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.label1.Location = new System.Drawing.Point(56, 475);
|
||||
this.label1.Location = new System.Drawing.Point(56, 520);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(212, 17);
|
||||
this.label1.TabIndex = 37;
|
||||
@@ -275,7 +283,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
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, 431);
|
||||
this.btnCancel.Location = new System.Drawing.Point(59, 476);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnCancel.TabIndex = 35;
|
||||
@@ -291,7 +299,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
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, 431);
|
||||
this.btnOpUser.Location = new System.Drawing.Point(174, 476);
|
||||
this.btnOpUser.Name = "btnOpUser";
|
||||
this.btnOpUser.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnOpUser.TabIndex = 34;
|
||||
@@ -465,28 +473,28 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.dgvUser);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(907, 517);
|
||||
this.splitContainer1.SplitterDistance = 486;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(907, 565);
|
||||
this.splitContainer1.SplitterDistance = 534;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// dgvUser
|
||||
//
|
||||
this.dgvUser.AllowUserToAddRows = false;
|
||||
this.dgvUser.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
|
||||
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
|
||||
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvUser.AutoRowNumber = true;
|
||||
this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvUser.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.UserIdColumn,
|
||||
@@ -498,17 +506,18 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.shopCountColumn,
|
||||
this.colSaLevel,
|
||||
this.colSaLevelName,
|
||||
this.colAuthority,
|
||||
this.colAddShop,
|
||||
this.editColumn,
|
||||
this.deleteColumn});
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvUser.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvUser.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
|
||||
this.dgvUser.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -516,10 +525,40 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.dgvUser.Name = "dgvUser";
|
||||
this.dgvUser.ReadOnly = true;
|
||||
this.dgvUser.RowTemplate.Height = 23;
|
||||
this.dgvUser.Size = new System.Drawing.Size(907, 486);
|
||||
this.dgvUser.Size = new System.Drawing.Size(907, 534);
|
||||
this.dgvUser.TabIndex = 1;
|
||||
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label7.Location = new System.Drawing.Point(27, 432);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(79, 20);
|
||||
this.label7.TabIndex = 49;
|
||||
this.label7.Text = "功能权限:";
|
||||
//
|
||||
// chkAiImage
|
||||
//
|
||||
this.chkAiImage.AutoSize = true;
|
||||
this.chkAiImage.Location = new System.Drawing.Point(112, 432);
|
||||
this.chkAiImage.Name = "chkAiImage";
|
||||
this.chkAiImage.Size = new System.Drawing.Size(74, 21);
|
||||
this.chkAiImage.TabIndex = 50;
|
||||
this.chkAiImage.Text = "Ai传图";
|
||||
this.chkAiImage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkSetCats
|
||||
//
|
||||
this.chkSetCats.AutoSize = true;
|
||||
this.chkSetCats.Location = new System.Drawing.Point(194, 432);
|
||||
this.chkSetCats.Name = "chkSetCats";
|
||||
this.chkSetCats.Size = new System.Drawing.Size(75, 21);
|
||||
this.chkSetCats.TabIndex = 51;
|
||||
this.chkSetCats.Text = "类目指定";
|
||||
this.chkSetCats.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// UserIdColumn
|
||||
//
|
||||
this.UserIdColumn.HeaderText = "id";
|
||||
@@ -574,10 +613,17 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//
|
||||
// colSaLevelName
|
||||
//
|
||||
this.colSaLevelName.FillWeight = 60F;
|
||||
this.colSaLevelName.HeaderText = "账户类型";
|
||||
this.colSaLevelName.Name = "colSaLevelName";
|
||||
this.colSaLevelName.ReadOnly = true;
|
||||
//
|
||||
// colAuthority
|
||||
//
|
||||
this.colAuthority.HeaderText = "功能权限";
|
||||
this.colAuthority.Name = "colAuthority";
|
||||
this.colAuthority.ReadOnly = true;
|
||||
//
|
||||
// colAddShop
|
||||
//
|
||||
this.colAddShop.FillWeight = 60F;
|
||||
@@ -606,7 +652,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
// PDDAdminAccountForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(1270, 527);
|
||||
this.ClientSize = new System.Drawing.Size(1270, 575);
|
||||
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;
|
||||
@@ -662,6 +708,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
private System.Windows.Forms.Label lblWatermark;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.ComboBox cmbSaLevel;
|
||||
private UserComponent.UcCheckBox chkSetCats;
|
||||
private UserComponent.UcCheckBox chkAiImage;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn;
|
||||
@@ -671,6 +720,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAuthority;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colAddShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
|
||||
|
||||
@@ -73,6 +73,14 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
data.Append("&sa_level=2");
|
||||
else
|
||||
data.Append("&sa_level=0");
|
||||
|
||||
string authority = "";
|
||||
if (chkAiImage.Checked)
|
||||
authority += "Ai传图,";
|
||||
if (chkSetCats.Checked)
|
||||
authority += "类目指定,";
|
||||
data.Append("&authority=" + authority.Trim(','));
|
||||
|
||||
string url = BaseClass.BuildObjString("user/add_user");
|
||||
if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid))
|
||||
{
|
||||
@@ -135,6 +143,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
user.shop_count = BaseRegex.GetIntJson(ref oStr, "shop_count");
|
||||
user.company_name = BaseRegex.GetStringJson(ref oStr, "company_name");
|
||||
user.sa_level = BaseRegex.GetIntJson(ref oStr, "sa_level");
|
||||
user.authority = BaseRegex.GetStringJson(ref oStr, "authority");
|
||||
|
||||
AllUsers.Add(user);
|
||||
dgvUser.Rows.Add(
|
||||
@@ -147,6 +156,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
user.shop_count,
|
||||
user.sa_level,
|
||||
user.sa_level_name,
|
||||
user.authority,
|
||||
"添加店铺",
|
||||
"编辑",
|
||||
"删除");
|
||||
@@ -189,6 +199,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
string groupName = dgvUser.Rows[e.RowIndex].Cells["groupNameColumn"].Value.ToString();
|
||||
string company = dgvUser.Rows[e.RowIndex].Cells["colCompany"].Value.ToString();
|
||||
string saLevelName = dgvUser.Rows[e.RowIndex].Cells["colSaLevelName"].Value.ToString();
|
||||
string authority = dgvUser.Rows[e.RowIndex].Cells["colAuthority"].Value.ToString();
|
||||
if (columname == "编辑")
|
||||
{
|
||||
Uid = uid;
|
||||
@@ -201,6 +212,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
btnOpUser.Text = "保存用户";
|
||||
btnCancel.Visible = true;
|
||||
cmbSaLevel.Text = saLevelName;
|
||||
|
||||
chkAiImage.Checked = authority.Contains(chkAiImage.Text);
|
||||
chkSetCats.Checked = authority.Contains(chkSetCats.Text);
|
||||
}
|
||||
if (columname == "删除")
|
||||
{
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
<metadata name="colSaLevelName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colAuthority.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colAddShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
Reference in new issue
Block a user