修改用户oem
This commit is contained in:
1 parent
053fddaf1d
commit
9a4e595d76
3 files changed
+124
-48
No files matched your search
+64
-45
@@ -150,8 +150,6 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.btnTopUpCancel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnTopUpOK = new DevComponents.DotNetBar.PanelEx();
|
||||
this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
|
||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -183,6 +181,9 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnUdpateOEM = new TemuKJD.UserControls.ButtonEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
|
||||
this.splitContainer5.Panel1.SuspendLayout();
|
||||
this.splitContainer5.Panel2.SuspendLayout();
|
||||
@@ -248,6 +249,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.pnlSuperManage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlSuperManage.Controls.Add(this.btnUdpateOEM);
|
||||
this.pnlSuperManage.Controls.Add(this.chkTraditionalAddress);
|
||||
this.pnlSuperManage.Controls.Add(this.label30);
|
||||
this.pnlSuperManage.Controls.Add(this.chkActivityStock);
|
||||
@@ -548,7 +550,7 @@ namespace TemuKJD.WXForms.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(157, 580);
|
||||
this.btnOpUser.Location = new System.Drawing.Point(100, 580);
|
||||
this.btnOpUser.Name = "btnOpUser";
|
||||
this.btnOpUser.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnOpUser.TabIndex = 34;
|
||||
@@ -573,7 +575,7 @@ namespace TemuKJD.WXForms.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(42, 580);
|
||||
this.btnCancel.Location = new System.Drawing.Point(8, 580);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnCancel.TabIndex = 35;
|
||||
@@ -1838,47 +1840,6 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.dgvUser.TabIndex = 1;
|
||||
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.IsShowTotalCount = false;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(783, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.MaxPageSizeValue = 5000;
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(389, 27);
|
||||
this.ucSplitPage1.TabIndex = 443;
|
||||
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// btnExportShopErp
|
||||
//
|
||||
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
|
||||
this.btnExportShopErp.Name = "btnExportShopErp";
|
||||
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
|
||||
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnExportShopErp.Style.GradientAngle = 90;
|
||||
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.TabIndex = 439;
|
||||
this.btnExportShopErp.Text = "导出用户到后台系统";
|
||||
this.btnExportShopErp.Visible = false;
|
||||
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
|
||||
//
|
||||
// colCheck
|
||||
//
|
||||
this.colCheck.FillWeight = 30F;
|
||||
@@ -2101,6 +2062,63 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.deleteColumn.Name = "deleteColumn";
|
||||
this.deleteColumn.ReadOnly = true;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.IsShowTotalCount = false;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(783, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.MaxPageSizeValue = 5000;
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(389, 27);
|
||||
this.ucSplitPage1.TabIndex = 443;
|
||||
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// btnExportShopErp
|
||||
//
|
||||
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
|
||||
this.btnExportShopErp.Name = "btnExportShopErp";
|
||||
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
|
||||
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnExportShopErp.Style.GradientAngle = 90;
|
||||
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportShopErp.TabIndex = 439;
|
||||
this.btnExportShopErp.Text = "导出用户到后台系统";
|
||||
this.btnExportShopErp.Visible = false;
|
||||
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
|
||||
//
|
||||
// btnUdpateOEM
|
||||
//
|
||||
this.btnUdpateOEM.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnUdpateOEM.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnUdpateOEM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUdpateOEM.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnUdpateOEM.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnUdpateOEM.ForeColor = System.Drawing.Color.White;
|
||||
this.btnUdpateOEM.Location = new System.Drawing.Point(199, 580);
|
||||
this.btnUdpateOEM.Name = "btnUdpateOEM";
|
||||
this.btnUdpateOEM.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnUdpateOEM.TabIndex = 860;
|
||||
this.btnUdpateOEM.Text = "修改代理";
|
||||
this.btnUdpateOEM.UseVisualStyleBackColor = false;
|
||||
this.btnUdpateOEM.Click += new System.EventHandler(this.btnUdpateOEM_Click);
|
||||
//
|
||||
// WXAdminAccountForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -2316,5 +2334,6 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colAddShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
|
||||
private UserControls.ButtonEx btnUdpateOEM;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using AllBase;
|
||||
using AllBase.Model.Result;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -10,11 +11,15 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.BLL;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.KJDForms.ShopForms;
|
||||
using TemuKJD.UserComponent;
|
||||
using TemuKJD.UserControls;
|
||||
using TemuKJD.WXForms.ShopForms;
|
||||
using Work;
|
||||
|
||||
namespace TemuKJD.WXForms.AdminForms
|
||||
@@ -25,7 +30,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
public static List<UserSubAccountInfo> AllUsers { get; set; } = new List<UserSubAccountInfo>();
|
||||
public MainForm Mf { get; set; } = null;
|
||||
public string Uid { get; set; } = "";
|
||||
|
||||
private DataGridViewRow SelectedRow { get; set; }
|
||||
public WXAdminAccountForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -255,6 +260,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
txtMobile.Clear();
|
||||
txtCompany.Clear();
|
||||
txtOemId.Clear();
|
||||
txtOemId.Enabled = true;
|
||||
cmbGroup.Text = "主账户";
|
||||
cmbSaLevel.Text = "普通用户";
|
||||
chkWXComplateProd.Checked = false;
|
||||
@@ -310,7 +316,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
btnCancel.Visible = true;
|
||||
cmbSaLevel.Text = saLevelName;
|
||||
txtOemId.Text = oemId;
|
||||
|
||||
txtOemId.Enabled = false;
|
||||
chkWXComplateProd.Checked = authority.Contains(chkWXComplateProd.Text);
|
||||
chkShopPoints.Checked = authority.Contains(chkShopPoints.Text);
|
||||
chkProdFission.Checked = authority.Contains(chkProdFission.Text);
|
||||
@@ -424,6 +430,17 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.lblSyncLogisticsPerOrderUserId.Text = uid;
|
||||
}
|
||||
}
|
||||
|
||||
if (columName == "colCheck")
|
||||
{
|
||||
foreach (DataGridViewRow item in dgvUser.Rows)
|
||||
{
|
||||
item.Cells["colCheck"].Value = false;
|
||||
}
|
||||
SelectedRow = dgvUser.Rows[e.RowIndex];
|
||||
SelectedRow.Cells["colCheck"].Value = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void Delete(string uid)
|
||||
@@ -803,5 +820,45 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
pnlSyncLogisticsPerOrder.Visible = false;
|
||||
}
|
||||
|
||||
private async void btnUdpateOEM_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
btnUdpateOEM.Enabled = false;
|
||||
if (SelectedRow == null)
|
||||
{
|
||||
BaseMsgForm.ShowError("必须选择一条");
|
||||
return;
|
||||
}
|
||||
string userName = SelectedRow.Cells["mobileColumn"].Value.ToString();
|
||||
if (string.IsNullOrEmpty(userName))
|
||||
{
|
||||
BaseMsgForm.ShowError("错误无账户");
|
||||
return;
|
||||
}
|
||||
string newOemId = InputDialog.Show("新代理编码", "修改", "");
|
||||
if (newOemId == null) return;
|
||||
|
||||
string url = BaseClass.BuildWXObjString("user/update_user_oem");
|
||||
var data = UserLogin.GetSignPostData(new
|
||||
{
|
||||
TargetUserName = userName,
|
||||
OemId = newOemId
|
||||
});
|
||||
var html = await GetHtml.PostJsonAsync(url, data);
|
||||
var result = JsonConvert.DeserializeObject<Result>(html);
|
||||
if (result.Code != 200) throw new Exception(result.Msg);
|
||||
BaseMsgForm.ShowInfo("修改成功");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
btnUdpateOEM.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
try
|
||||
{
|
||||
btn_SetMarkup.Enabled = true;
|
||||
btn_SetMarkup.Enabled = false;
|
||||
if (SelectedRow == null)
|
||||
{
|
||||
BaseMsgForm.ShowError("必须选择一条");
|
||||
|
||||
Reference in new issue
Block a user