1备货管理提交备货单 2修复店铺登录第一次记录的cookie错误问题
This commit is contained in:
1 parent
862ad088f5
commit
9fe9fa2610
8 files changed
+2056
-769
No files matched your search
@@ -120,17 +120,19 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
foreach (var cookie in cookieList)
|
||||
{
|
||||
//if (cookies.Contains(cookie.Name + "=" + cookie.Value))
|
||||
// continue;
|
||||
//SUB_PASS_ID要用domain是seller.kuajingmaihuo.com才是能登录店铺后台的
|
||||
if (cookie.Name == "SUB_PASS_ID" && cookie.Domain != "seller.kuajingmaihuo.com")
|
||||
continue;
|
||||
|
||||
cookies += cookie.Name + "=" + cookie.Value + "; ";
|
||||
}
|
||||
cookies = cookies.Trim().TrimEnd(';');
|
||||
}
|
||||
shop.Cookies = cookies;
|
||||
|
||||
if (!string.IsNullOrEmpty(cookies)
|
||||
&& lstShopCompany.Any(c => c.LoginName == shop.LoginName))
|
||||
{
|
||||
shop.Cookies = cookies;
|
||||
var lstShopCompanyCopy = lstShopCompany.ToList();
|
||||
lstShopCompanyCopy = lstShopCompanyCopy.Where(l => l.LoginName == shop.LoginName).ToList();
|
||||
|
||||
@@ -280,7 +282,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(20);
|
||||
Thread.Sleep(25);
|
||||
cefWebBrowser.Load(shopMainUrl);
|
||||
|
||||
if (openType != EnumOpenType.login)
|
||||
@@ -288,8 +290,10 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
if (cefWebBrowser.IsLoading)
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(1000,1500));
|
||||
|
||||
//设置 local storage
|
||||
//if (GlobalConfig.dicLocalStorage != null)
|
||||
@@ -371,6 +375,8 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
var jArr = jObj["result"]?["companyList"]?[0]?["malInfoList"] as JArray;
|
||||
if (jArr == null)
|
||||
jArr = new JArray();
|
||||
|
||||
Thread.Sleep(500);
|
||||
foreach (var productObj in jArr)
|
||||
{
|
||||
var prod = JsonHelper.SerializeObject(productObj);
|
||||
|
||||
+53
-51
@@ -33,6 +33,9 @@
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnRefresh = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCancel = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnOpUser = new TemuKJD.UserControls.ButtonEx();
|
||||
this.label30 = new System.Windows.Forms.Label();
|
||||
this.label31 = new System.Windows.Forms.Label();
|
||||
this.repasstextBox = new System.Windows.Forms.TextBox();
|
||||
@@ -49,9 +52,6 @@
|
||||
this.label39 = new System.Windows.Forms.Label();
|
||||
this.nametextBox = new System.Windows.Forms.TextBox();
|
||||
this.label40 = new System.Windows.Forms.Label();
|
||||
this.btnRefresh = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCancel = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnOpUser = new TemuKJD.UserControls.ButtonEx();
|
||||
this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.UserNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -118,6 +118,53 @@
|
||||
this.label1.TabIndex = 37;
|
||||
this.label1.Text = "编辑时,密码为空表示不更改原密码。";
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefresh.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefresh.Location = new System.Drawing.Point(267, 5);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnRefresh.TabIndex = 36;
|
||||
this.btnRefresh.Text = "刷新列表";
|
||||
this.btnRefresh.UseVisualStyleBackColor = false;
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
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.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnCancel.TabIndex = 35;
|
||||
this.btnCancel.Text = "取消编辑";
|
||||
this.btnCancel.UseVisualStyleBackColor = false;
|
||||
this.btnCancel.Visible = false;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnOpUser
|
||||
//
|
||||
this.btnOpUser.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
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.Name = "btnOpUser";
|
||||
this.btnOpUser.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnOpUser.TabIndex = 34;
|
||||
this.btnOpUser.Text = "添加用户";
|
||||
this.btnOpUser.UseVisualStyleBackColor = false;
|
||||
this.btnOpUser.Click += new System.EventHandler(this.btnOpUser_Click);
|
||||
//
|
||||
// label30
|
||||
//
|
||||
this.label30.AutoSize = true;
|
||||
@@ -198,6 +245,7 @@
|
||||
//
|
||||
// groupIdcomboBox
|
||||
//
|
||||
this.groupIdcomboBox.Enabled = false;
|
||||
this.groupIdcomboBox.FormattingEnabled = true;
|
||||
this.groupIdcomboBox.Items.AddRange(new object[] {
|
||||
"客服",
|
||||
@@ -209,7 +257,7 @@
|
||||
this.groupIdcomboBox.Name = "groupIdcomboBox";
|
||||
this.groupIdcomboBox.Size = new System.Drawing.Size(148, 25);
|
||||
this.groupIdcomboBox.TabIndex = 26;
|
||||
this.groupIdcomboBox.Text = "采购";
|
||||
this.groupIdcomboBox.Text = "客服";
|
||||
//
|
||||
// label37
|
||||
//
|
||||
@@ -273,53 +321,6 @@
|
||||
this.label40.TabIndex = 18;
|
||||
this.label40.Text = "账户名:";
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefresh.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefresh.Location = new System.Drawing.Point(267, 5);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnRefresh.TabIndex = 36;
|
||||
this.btnRefresh.Text = "刷新列表";
|
||||
this.btnRefresh.UseVisualStyleBackColor = false;
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
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.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnCancel.TabIndex = 35;
|
||||
this.btnCancel.Text = "取消编辑";
|
||||
this.btnCancel.UseVisualStyleBackColor = false;
|
||||
this.btnCancel.Visible = false;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnOpUser
|
||||
//
|
||||
this.btnOpUser.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
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.Name = "btnOpUser";
|
||||
this.btnOpUser.Size = new System.Drawing.Size(86, 25);
|
||||
this.btnOpUser.TabIndex = 34;
|
||||
this.btnOpUser.Text = "添加用户";
|
||||
this.btnOpUser.UseVisualStyleBackColor = false;
|
||||
this.btnOpUser.Click += new System.EventHandler(this.btnOpUser_Click);
|
||||
//
|
||||
// dgvUser
|
||||
//
|
||||
this.dgvUser.AllowUserToAddRows = false;
|
||||
@@ -328,6 +329,7 @@
|
||||
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
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)));
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
StringBuilder data = new StringBuilder();
|
||||
data.Append(UserLogin.GetSignaturex());
|
||||
data.Append("&name=" + GetHtml.UrlEncodeUtf8(nametextBox.Text));
|
||||
data.Append("&username=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
data.Append("&mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
data.Append("&sub_user_name=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
data.Append("&sub_user_mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text));
|
||||
if (groupIdcomboBox.Text == "客服")
|
||||
data.Append("&group_id=4");
|
||||
else if (groupIdcomboBox.Text == "采购")
|
||||
@@ -64,7 +64,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
// data.Append("&group_id=8");
|
||||
if (!string.IsNullOrEmpty(passwordtextBox.Text))
|
||||
data.Append("&password=" + Md5Base.GetMd5(passwordtextBox.Text).ToLower());
|
||||
string url = BaseClass.BuildObjString("user&act=add");
|
||||
string url = BaseClass.BuildObjString("user/add_user");
|
||||
if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid))
|
||||
{
|
||||
data.Append("&id=" + Uid);
|
||||
|
||||
Reference in new issue
Block a user