1部分废弃功能注释 2数据库商品车队费、贴单费等设置 3账户授权金额设置 4jit核价商品还原逻辑调整
This commit is contained in:
1 parent
480d8c2cd4
commit
165df61234
52 files changed
+2019
-1023
No files matched your search
+106
-17
@@ -33,6 +33,10 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
|
||||
this.btnAdd1000 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnAdd100 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtAuthorizedAmount = new System.Windows.Forms.TextBox();
|
||||
this.cmbSaLevel = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.lblWatermark = new System.Windows.Forms.Label();
|
||||
@@ -74,6 +78,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaLevelName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colAuthorizedAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
|
||||
@@ -96,6 +101,10 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
// splitContainer5.Panel1
|
||||
//
|
||||
this.splitContainer5.Panel1.Controls.Add(this.btnAdd1000);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.btnAdd100);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.label7);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.txtAuthorizedAmount);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.label6);
|
||||
this.splitContainer5.Panel1.Controls.Add(this.lblWatermark);
|
||||
@@ -136,6 +145,73 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.splitContainer5.SplitterWidth = 1;
|
||||
this.splitContainer5.TabIndex = 3;
|
||||
//
|
||||
// btnAdd1000
|
||||
//
|
||||
this.btnAdd1000.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnAdd1000.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnAdd1000.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnAdd1000.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnAdd1000.Location = new System.Drawing.Point(309, 354);
|
||||
this.btnAdd1000.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnAdd1000.Name = "btnAdd1000";
|
||||
this.btnAdd1000.Size = new System.Drawing.Size(45, 23);
|
||||
this.btnAdd1000.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnAdd1000.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd1000.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd1000.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnAdd1000.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnAdd1000.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnAdd1000.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnAdd1000.Style.GradientAngle = 90;
|
||||
this.btnAdd1000.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnAdd1000.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd1000.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd1000.TabIndex = 475;
|
||||
this.btnAdd1000.Text = "+1000";
|
||||
this.btnAdd1000.Click += new System.EventHandler(this.btnAdd1000_Click);
|
||||
//
|
||||
// btnAdd100
|
||||
//
|
||||
this.btnAdd100.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnAdd100.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnAdd100.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnAdd100.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnAdd100.Location = new System.Drawing.Point(262, 354);
|
||||
this.btnAdd100.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnAdd100.Name = "btnAdd100";
|
||||
this.btnAdd100.Size = new System.Drawing.Size(45, 23);
|
||||
this.btnAdd100.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnAdd100.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd100.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd100.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnAdd100.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnAdd100.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnAdd100.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnAdd100.Style.GradientAngle = 90;
|
||||
this.btnAdd100.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnAdd100.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd100.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd100.TabIndex = 471;
|
||||
this.btnAdd100.Text = "+100";
|
||||
this.btnAdd100.Click += new System.EventHandler(this.btnAdd100_Click);
|
||||
//
|
||||
// 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, 354);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(79, 20);
|
||||
this.label7.TabIndex = 50;
|
||||
this.label7.Text = "授权金额:";
|
||||
//
|
||||
// txtAuthorizedAmount
|
||||
//
|
||||
this.txtAuthorizedAmount.Location = new System.Drawing.Point(112, 353);
|
||||
this.txtAuthorizedAmount.Name = "txtAuthorizedAmount";
|
||||
this.txtAuthorizedAmount.Size = new System.Drawing.Size(148, 23);
|
||||
this.txtAuthorizedAmount.TabIndex = 49;
|
||||
//
|
||||
// cmbSaLevel
|
||||
//
|
||||
this.cmbSaLevel.FormattingEnabled = true;
|
||||
@@ -143,7 +219,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
"普通用户",
|
||||
"一级超管",
|
||||
"二级超管"});
|
||||
this.cmbSaLevel.Location = new System.Drawing.Point(112, 388);
|
||||
this.cmbSaLevel.Location = new System.Drawing.Point(112, 389);
|
||||
this.cmbSaLevel.Name = "cmbSaLevel";
|
||||
this.cmbSaLevel.Size = new System.Drawing.Size(148, 25);
|
||||
this.cmbSaLevel.TabIndex = 48;
|
||||
@@ -153,7 +229,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label6.Location = new System.Drawing.Point(27, 390);
|
||||
this.label6.Location = new System.Drawing.Point(27, 391);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(79, 20);
|
||||
this.label6.TabIndex = 47;
|
||||
@@ -217,7 +293,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label3.Location = new System.Drawing.Point(55, 348);
|
||||
this.label3.Location = new System.Drawing.Point(55, 318);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(51, 20);
|
||||
this.label3.TabIndex = 40;
|
||||
@@ -225,7 +301,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
// txtCompany
|
||||
//
|
||||
this.txtCompany.Location = new System.Drawing.Point(112, 347);
|
||||
this.txtCompany.Location = new System.Drawing.Point(112, 317);
|
||||
this.txtCompany.Name = "txtCompany";
|
||||
this.txtCompany.Size = new System.Drawing.Size(148, 23);
|
||||
this.txtCompany.TabIndex = 39;
|
||||
@@ -302,7 +378,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
this.label30.AutoSize = true;
|
||||
this.label30.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||
this.label30.Location = new System.Drawing.Point(282, 180);
|
||||
this.label30.Location = new System.Drawing.Point(282, 174);
|
||||
this.label30.Name = "label30";
|
||||
this.label30.Size = new System.Drawing.Size(56, 17);
|
||||
this.label30.TabIndex = 33;
|
||||
@@ -312,7 +388,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 264);
|
||||
this.label31.Location = new System.Drawing.Point(266, 246);
|
||||
this.label31.Name = "label31";
|
||||
this.label31.Size = new System.Drawing.Size(13, 17);
|
||||
this.label31.TabIndex = 32;
|
||||
@@ -320,7 +396,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
// txtRePass
|
||||
//
|
||||
this.txtRePass.Location = new System.Drawing.Point(112, 261);
|
||||
this.txtRePass.Location = new System.Drawing.Point(112, 243);
|
||||
this.txtRePass.Name = "txtRePass";
|
||||
this.txtRePass.PasswordChar = '*';
|
||||
this.txtRePass.Size = new System.Drawing.Size(148, 23);
|
||||
@@ -330,7 +406,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 262);
|
||||
this.label32.Location = new System.Drawing.Point(27, 244);
|
||||
this.label32.Name = "label32";
|
||||
this.label32.Size = new System.Drawing.Size(79, 20);
|
||||
this.label32.TabIndex = 31;
|
||||
@@ -340,7 +416,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 306);
|
||||
this.label33.Location = new System.Drawing.Point(266, 283);
|
||||
this.label33.Name = "label33";
|
||||
this.label33.Size = new System.Drawing.Size(13, 17);
|
||||
this.label33.TabIndex = 30;
|
||||
@@ -350,7 +426,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 222);
|
||||
this.label34.Location = new System.Drawing.Point(266, 210);
|
||||
this.label34.Name = "label34";
|
||||
this.label34.Size = new System.Drawing.Size(13, 17);
|
||||
this.label34.TabIndex = 29;
|
||||
@@ -360,7 +436,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 180);
|
||||
this.label35.Location = new System.Drawing.Point(266, 174);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(13, 17);
|
||||
this.label35.TabIndex = 28;
|
||||
@@ -385,7 +461,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
"上货",
|
||||
"数据",
|
||||
"登录"});
|
||||
this.cmbGroup.Location = new System.Drawing.Point(112, 303);
|
||||
this.cmbGroup.Location = new System.Drawing.Point(112, 279);
|
||||
this.cmbGroup.Name = "cmbGroup";
|
||||
this.cmbGroup.Size = new System.Drawing.Size(148, 25);
|
||||
this.cmbGroup.TabIndex = 26;
|
||||
@@ -395,7 +471,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 304);
|
||||
this.label37.Location = new System.Drawing.Point(55, 281);
|
||||
this.label37.Name = "label37";
|
||||
this.label37.Size = new System.Drawing.Size(51, 20);
|
||||
this.label37.TabIndex = 25;
|
||||
@@ -403,7 +479,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
this.txtPassword.Location = new System.Drawing.Point(112, 219);
|
||||
this.txtPassword.Location = new System.Drawing.Point(112, 207);
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.PasswordChar = '*';
|
||||
this.txtPassword.Size = new System.Drawing.Size(148, 23);
|
||||
@@ -413,7 +489,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 220);
|
||||
this.label38.Location = new System.Drawing.Point(55, 208);
|
||||
this.label38.Name = "label38";
|
||||
this.label38.Size = new System.Drawing.Size(51, 20);
|
||||
this.label38.TabIndex = 22;
|
||||
@@ -421,7 +497,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
// txtMobile
|
||||
//
|
||||
this.txtMobile.Location = new System.Drawing.Point(112, 177);
|
||||
this.txtMobile.Location = new System.Drawing.Point(112, 171);
|
||||
this.txtMobile.Name = "txtMobile";
|
||||
this.txtMobile.Size = new System.Drawing.Size(148, 23);
|
||||
this.txtMobile.TabIndex = 21;
|
||||
@@ -430,7 +506,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//
|
||||
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, 178);
|
||||
this.label39.Location = new System.Drawing.Point(41, 172);
|
||||
this.label39.Name = "label39";
|
||||
this.label39.Size = new System.Drawing.Size(65, 20);
|
||||
this.label39.TabIndex = 20;
|
||||
@@ -474,6 +550,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.dgvUser.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
|
||||
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
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)))));
|
||||
@@ -496,6 +573,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.shopCountColumn,
|
||||
this.colSaLevel,
|
||||
this.colSaLevelName,
|
||||
this.colAuthorizedAmount,
|
||||
this.editColumn,
|
||||
this.deleteColumn});
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
@@ -574,6 +652,12 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.colSaLevelName.Name = "colSaLevelName";
|
||||
this.colSaLevelName.ReadOnly = true;
|
||||
//
|
||||
// colAuthorizedAmount
|
||||
//
|
||||
this.colAuthorizedAmount.HeaderText = "授权金额";
|
||||
this.colAuthorizedAmount.Name = "colAuthorizedAmount";
|
||||
this.colAuthorizedAmount.ReadOnly = true;
|
||||
//
|
||||
// editColumn
|
||||
//
|
||||
this.editColumn.HeaderText = "编辑";
|
||||
@@ -655,7 +739,12 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAuthorizedAmount;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtAuthorizedAmount;
|
||||
private DevComponents.DotNetBar.PanelEx btnAdd1000;
|
||||
private DevComponents.DotNetBar.PanelEx btnAdd100;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using AllBase;
|
||||
using AllBase.Model.Result;
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -71,7 +72,8 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
else if (cmbSaLevel.Text == "二级超管")
|
||||
data.Append("&sa_level=2");
|
||||
else
|
||||
data.Append("&sa_level=0");
|
||||
data.Append("&sa_level=0");
|
||||
data.Append("&authorized_amount=" + GetHtml.UrlEncodeUtf8(txtAuthorizedAmount.Text.Trim().ParseToDecimal().ParseToString()));
|
||||
string url = BaseClass.BuildObjString("user/add_user");
|
||||
if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid))
|
||||
{
|
||||
@@ -134,6 +136,7 @@ namespace TemuKJD.KJDForms.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.authorized_amount = BaseRegex.GetNullableDecimalJson(ref oStr, "authorized_amount");
|
||||
|
||||
AllUsers.Add(user);
|
||||
dgvUser.Rows.Add(
|
||||
@@ -146,6 +149,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
user.shop_count,
|
||||
user.sa_level,
|
||||
user.sa_level_name,
|
||||
user.authorized_amount,
|
||||
"编辑",
|
||||
"删除");
|
||||
}
|
||||
@@ -167,6 +171,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
txtRePass.Clear();
|
||||
txtMobile.Clear();
|
||||
txtCompany.Clear();
|
||||
txtAuthorizedAmount.Clear();
|
||||
cmbGroup.Text = "主账户";
|
||||
cmbSaLevel.Text = "普通用户";
|
||||
}
|
||||
@@ -187,6 +192,7 @@ namespace TemuKJD.KJDForms.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 authorizedAmount = dgvUser.Rows[e.RowIndex].Cells["colAuthorizedAmount"].Value.ToString();
|
||||
if (columname == "编辑")
|
||||
{
|
||||
Uid = uid;
|
||||
@@ -196,6 +202,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
txtPassword.Text = "";
|
||||
txtRePass.Text = "";
|
||||
txtCompany.Text = company;
|
||||
txtAuthorizedAmount.Text = authorizedAmount;
|
||||
btnOpUser.Text = "保存用户";
|
||||
btnCancel.Visible = true;
|
||||
cmbSaLevel.Text = saLevelName;
|
||||
@@ -272,5 +279,15 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.txtSearch.Focus();
|
||||
this.lblWatermark.Visible = false;
|
||||
}
|
||||
|
||||
private void btnAdd100_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.txtAuthorizedAmount.Text = (txtAuthorizedAmount.Text.Trim().ParseToDecimal() + 100m).ParseToString();
|
||||
}
|
||||
|
||||
private void btnAdd1000_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.txtAuthorizedAmount.Text = (txtAuthorizedAmount.Text.Trim().ParseToDecimal() + 1000m).ParseToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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="colAuthorizedAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="editColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
+6
-6
@@ -35,9 +35,9 @@
|
||||
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("商品核价");
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("加入发货台");
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("开通JIT");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("JIT卡密管理");
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("开通JIT");
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("加入发货台");
|
||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
@@ -153,12 +153,12 @@
|
||||
treeNode6.Text = "库存上传";
|
||||
treeNode7.Name = "商品核价";
|
||||
treeNode7.Text = "商品核价";
|
||||
treeNode8.Name = "加入发货台";
|
||||
treeNode8.Text = "加入发货台";
|
||||
treeNode8.Name = "开通JIT";
|
||||
treeNode8.Text = "开通JIT";
|
||||
treeNode9.Name = "JIT卡密管理";
|
||||
treeNode9.Text = "JIT卡密管理";
|
||||
treeNode10.Name = "开通JIT";
|
||||
treeNode10.Text = "开通JIT";
|
||||
treeNode10.Name = "加入发货台";
|
||||
treeNode10.Text = "加入发货台";
|
||||
treeNode11.Name = "超级权限管理";
|
||||
treeNode11.Text = "超级权限管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
|
||||
+434
-381
File diff suppressed because it is too large.
Load diff
@@ -33,6 +33,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
public List<ShopLoginInfo> lstAdminShopInfo { get; set; } = new List<ShopLoginInfo>();
|
||||
public List<TemuForChainProductInfo> lstCheckPriceInfo = new List<TemuForChainProductInfo>();
|
||||
public List<CateSizeWeightConfig> lstCateSizeWeightConfig = new List<CateSizeWeightConfig>();
|
||||
|
||||
public AdminProductPriceCheckForm()
|
||||
{
|
||||
@@ -56,11 +57,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
this.dgvPriceCheck.AddImgColumn("colProductSkcPic", "colImgUrl");
|
||||
this.colJitStatus.Visible = false;
|
||||
|
||||
if (!IsClientJit)
|
||||
ucSplitPage1.Visible = true;
|
||||
else
|
||||
ucSplitPage1.Visible = false;
|
||||
|
||||
this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddMilliseconds(-1);
|
||||
this.dtpStartTime.Value = DateTime.Now.Date.AddDays(-7);
|
||||
|
||||
@@ -72,9 +68,28 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
}
|
||||
if (IsClientJit)
|
||||
{
|
||||
ucSplitPage1.Visible = false;
|
||||
|
||||
chkSearchAllShop.Visible = false;
|
||||
ucSplitPage1.Visible = false;
|
||||
this.colJitStatus.Visible = true;
|
||||
lblJudgeLen.Text = "列表中仅显示需要还原商品";
|
||||
numJudgeLen.Visible = false;
|
||||
lblJudgeWeight.Visible = false;
|
||||
numJudgeWeight.Visible = false;
|
||||
pnlRestoreSizeAndNumber.Visible = false;
|
||||
btnRestoreSizeAndNumber.Text = "还原核价设置";
|
||||
|
||||
this.numJudgeLen.Value = 15;
|
||||
this.numJudgeWeight.Value = 150;
|
||||
this.numLen1.Value = 8;
|
||||
this.numLen2.Value = 8;
|
||||
this.numWidth1.Value = 7;
|
||||
this.numWidth2.Value = 7;
|
||||
this.numHeight1.Value = 6;
|
||||
this.numHeight2.Value = 6;
|
||||
this.numWeight1.Value = 6;
|
||||
this.numWeight2.Value = 6;
|
||||
}
|
||||
|
||||
if (IsClientJit)
|
||||
@@ -387,7 +402,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//shopLoginForm.ShowDialog();
|
||||
if (!IsClientJit)
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
if (shop.LoginStatus2 == "国际版在线")
|
||||
{
|
||||
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
|
||||
@@ -406,7 +421,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
if (shop.LoginStatus2 == "国际版在线")
|
||||
{
|
||||
ShopLoginForm loginForm = new ShopLoginForm(shop);
|
||||
@@ -475,6 +490,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
switch (headerText)
|
||||
{
|
||||
case "规格名称":
|
||||
if (!IsClientJit)
|
||||
{
|
||||
var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId);
|
||||
if (priceInfo != null)
|
||||
@@ -567,7 +583,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
var rst = applyPrice(shop, orderId, data);
|
||||
if (rst.Contains("登录过期") || rst.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -616,7 +632,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
var rst = rePrice(shop, orderId, data);
|
||||
if (rst.Contains("登录过期") || rst.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -682,7 +698,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
var rst = priceAdjust(shop, data);
|
||||
if (rst.Contains("登录过期") || rst.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -708,7 +724,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
var rst = this.cancelPrice(shop, orderId);
|
||||
if (rst.Contains("登录过期") || rst.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -791,7 +807,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
if (shop == null)
|
||||
continue;
|
||||
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
if (shop.LoginStatus2 != "国际版在线")
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -817,7 +833,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
commonSleep();
|
||||
if (searchRst.Contains("登录过期") || searchRst.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -836,6 +852,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
jArr = new JArray();
|
||||
|
||||
List<string> extCodeTmpLst = new List<string>();
|
||||
List<string> spuIdLst = new List<string>();
|
||||
List<TemuForChainProductInfo> checkPriceInfoTmpLst = new List<TemuForChainProductInfo>();
|
||||
foreach (var item in jArr)
|
||||
{
|
||||
@@ -844,16 +861,12 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
lstCheckPriceInfo.Add(priceInfo);
|
||||
checkPriceInfoTmpLst.Add(priceInfo);
|
||||
extCodeTmpLst.Add(priceInfo.skcList.FirstOrDefault()?.extCode);
|
||||
spuIdLst.Add(priceInfo.productId.ParseToString());
|
||||
}
|
||||
List<TemuDBExtCodePriceInfo> extCodePriceList = new List<TemuDBExtCodePriceInfo>();
|
||||
try
|
||||
{
|
||||
extCodePriceList = GetServerExtCodePriceLst(extCodeTmpLst.Distinct().ToList());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message);
|
||||
}
|
||||
// 获取货号价格
|
||||
List<TemuDBExtCodePriceInfo> extCodePriceList = GetServerExtCodePriceLst(extCodeTmpLst.Distinct().ToList());
|
||||
// 获取产品数据库中的成本价格
|
||||
List<DBProdDraftIdMapUpSpuIdInfo> upProdList = GetUpSpuIdLst(spuIdLst);
|
||||
foreach (var priceInfo in checkPriceInfoTmpLst)
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
@@ -906,7 +919,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//Thread.Sleep(Randomx.GetId(20, 50));
|
||||
//if (orderPriceRst.Contains("登录过期") || orderPriceRst.Contains("Invalid Login State"))
|
||||
//{
|
||||
// CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
// this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
//}
|
||||
//reviewInfo.suggestSupplyPrice = BaseRegex.GetIntJson(ref orderPriceRst, "suggestSupplyPrice");
|
||||
//reviewInfo.supplyPrice = BaseRegex.GetIntJson(ref orderPriceRst, "supplyPrice");
|
||||
@@ -918,8 +931,13 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
|
||||
suggestSupplyPrice = "¥" + (reviewInfo.suggestSupplyPrice.ParseToDecimal() / 100).ToString("0.00");
|
||||
}
|
||||
// 计算商品进价
|
||||
var reviewExtCode = priceInfo.skcList.FirstOrDefault()?.extCode;
|
||||
var extCodePrice = extCodePriceList.FirstOrDefault(p => reviewExtCode == p.ext_code);
|
||||
var upSpuIdPrice = upProdList.FirstOrDefault(p => priceInfo.productId == p.draft_id);
|
||||
var original_price = extCodePrice?.original_price / 100m;
|
||||
if (upSpuIdPrice?.cost_price > 0)
|
||||
original_price = upSpuIdPrice?.cost_price;
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -936,7 +954,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
priceInfo.productName,
|
||||
skuName,
|
||||
reviewExtCode,
|
||||
extCodePrice?.original_price / 100m, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100m).ParseToString(),
|
||||
original_price, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100m).ParseToString(),
|
||||
reviewInfo.productSkuList.FirstOrDefault()?.supplierPriceValue / 100m, //reviewInfo.supplyPrice / 100m,(这个数值temu接口返回的是错的,改价不会改变) //priceInfo.supplierPrice // sku不同价的会被分成多个review,priceInfo此时为价格范围
|
||||
reviewInfo.suggestSupplyPrice / 100m, //suggestSupplyPrice.ParseToDecimal(),//核价 //reviewInfo.suggestSupplyPrice == null ? "-" : reviewInfo.suggestSupplyPrice.ParseToString(),
|
||||
"", //新报价
|
||||
@@ -1151,6 +1169,13 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
return HttpResponseBLL.PostResponse2(shop, url, body, refere);
|
||||
}
|
||||
|
||||
private string queryProductSizeAndWeightConfig(ShopLoginInfo shop, string taskUid, string productId)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig";
|
||||
string body = "{}";
|
||||
string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid;
|
||||
return HttpResponseBLL.PostResponse2(shop, url, body, referer);
|
||||
}
|
||||
private string editPriceProductSizeAndNumber(ShopLoginInfo shop, string taskUid, string productId, string data)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply";
|
||||
@@ -1224,7 +1249,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -1272,7 +1297,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -1422,7 +1447,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
List<TemuDBExtCodePriceInfo> list = new List<TemuDBExtCodePriceInfo>();
|
||||
|
||||
for(int i = 0; i< extCodeList.Count; i++)
|
||||
for (int i = 0; i < extCodeList.Count; i++)
|
||||
{
|
||||
extCodeList[i] = extCodeList[i].Replace(",", "").Replace("'", "").Replace("\"", "");
|
||||
}
|
||||
@@ -1444,13 +1469,62 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
if (!html.Contains("data"))
|
||||
return list;
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
try
|
||||
{
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return list;
|
||||
|
||||
return JsonHelper.DeserializeJsonToList<TemuDBExtCodePriceInfo>(jArr.ToString());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<DBProdDraftIdMapUpSpuIdInfo> GetUpSpuIdLst(List<string> draftIdList)
|
||||
{
|
||||
List<DBProdDraftIdMapUpSpuIdInfo> list = new List<DBProdDraftIdMapUpSpuIdInfo>();
|
||||
if (draftIdList.Count == 0)
|
||||
return list;
|
||||
|
||||
return JsonHelper.DeserializeJsonToList<TemuDBExtCodePriceInfo>(jArr.ToString());
|
||||
for (int i = 0; i < draftIdList.Count; i++)
|
||||
{
|
||||
draftIdList[i] = draftIdList[i].Replace(",", "").Replace("'", "").Replace("\"", "");
|
||||
}
|
||||
var url = BaseClass.BuildObjString("product/get_select_prod_map_up_spu_id_list");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&page=1";
|
||||
data += "&page_size=200";
|
||||
data += "&in_draft_ids=" + string.Join(",", draftIdList);
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
Thread.Sleep(100);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
if (!html.Contains("data"))
|
||||
return list;
|
||||
|
||||
try
|
||||
{
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return list;
|
||||
|
||||
return JsonHelper.DeserializeJsonToList<DBProdDraftIdMapUpSpuIdInfo>(jArr.ToString());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("获取商品成本价失败 " + ex.Message);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void pnlMutliCancelWithTitleWrong_Click(object sender, EventArgs e)
|
||||
{
|
||||
var rows = this.dgvPriceCheck.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList();
|
||||
@@ -1638,6 +1712,8 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
var t = Task.Run(() =>
|
||||
{
|
||||
//----------------------------------------------------------------------------------------
|
||||
// 查询是否有修改记录,如果没有申请新的修改,获取taskId
|
||||
var rows = this.dgvPriceCheck.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList();
|
||||
var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString());
|
||||
if (IsClientJit)
|
||||
@@ -1689,7 +1765,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -1725,7 +1801,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
return; // continue;
|
||||
}
|
||||
|
||||
|
||||
html = editPriceProductQuery(shop, price.productId.ParseToString(), taskUid).ParseToString();
|
||||
if (html.Contains("This product has pending or in-progress modification tasks"))
|
||||
{
|
||||
@@ -1740,7 +1815,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -1766,15 +1841,116 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
//int height = Randomx.GetId(5, 10); //100
|
||||
//int weight = Randomx.GetId(100, 200); //500000
|
||||
//int numberOfPieces = Randomx.GetId(450, 601);// 单品数量
|
||||
int len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1);
|
||||
int width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1));
|
||||
int height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1));
|
||||
int weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1);
|
||||
int numberOfPieces = 1;
|
||||
int len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1) * 10;
|
||||
int width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1)) * 10;
|
||||
int height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1)) * 10;
|
||||
int weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1) * 1000;
|
||||
int numberOfPieces = Math.Max(1, numPieces.Value.ParseToInt());
|
||||
|
||||
JObject obj = JObject.Parse(html);
|
||||
var result = JsonHelper.SerializeObject(obj["result"]);
|
||||
TemuDetailProductInfo prodInfo = JsonHelper.DeserializeJsonToObject<TemuDetailProductInfo>(result);
|
||||
var catId = Math.Max(0, prodInfo.categories.cat1.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat2.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat3.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat4.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat5.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat6.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat7.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat8.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat9.catId.ParseToInt());
|
||||
catId = Math.Max(catId, prodInfo.categories.cat10.catId.ParseToInt());
|
||||
|
||||
var cateSizeWeightConfig = lstCateSizeWeightConfig.FirstOrDefault(c => c.catId == catId.ToString());
|
||||
|
||||
if (cateSizeWeightConfig == null)
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product/get_cate_size_weight_config");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&cat_id=" + catId;
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
cateSizeWeightConfig = JsonHelper.DeserializeJsonToObject<CateSizeWeightConfig>(jArr.ToString());
|
||||
if (lstCateSizeWeightConfig != null)
|
||||
lstCateSizeWeightConfig.Add(cateSizeWeightConfig);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
if (cateSizeWeightConfig == null)
|
||||
{
|
||||
//查询接口尺寸重量限制
|
||||
html = queryProductSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString());
|
||||
//{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"common":{"operatorId":null,"operatorName":null,"operatorType":null,"checkSideRelation":false,"noticeSideEquation":false,"length":{"min":10,"max":2999},"width":{"min":5,"max":2999},"height":{"min":2,"max":2999},"weight":{"min":2000,"max":99999000}}}}
|
||||
Thread.Sleep(Randomx.GetId(25, 75));
|
||||
commonSleep();
|
||||
if (html.Contains("\"success\":true"))
|
||||
{
|
||||
JObject jObj = JObject.Parse(html);
|
||||
cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() };
|
||||
cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt();
|
||||
cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt();
|
||||
cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt();
|
||||
cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt();
|
||||
cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt();
|
||||
cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt();
|
||||
cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt();
|
||||
cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt();
|
||||
lstCateSizeWeightConfig.Add(cateSizeWeightConfig);
|
||||
|
||||
var url = BaseClass.BuildObjString("product/add_cate_size_weight_config");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&cat_id=" + catId;
|
||||
data += "&minLen=" + cateSizeWeightConfig.minLen;
|
||||
data += "&maxLen=" + cateSizeWeightConfig.maxLen;
|
||||
data += "&minWidth=" + cateSizeWeightConfig.minWidth;
|
||||
data += "&maxWidth=" + cateSizeWeightConfig.maxWidth;
|
||||
data += "&minHeight=" + cateSizeWeightConfig.minHeight;
|
||||
data += "&maxHeight=" + cateSizeWeightConfig.maxHeight;
|
||||
data += "&minWeight=" + cateSizeWeightConfig.minWeight;
|
||||
data += "&maxWeight=" + cateSizeWeightConfig.maxWeight;
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
}));
|
||||
}
|
||||
string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString();
|
||||
if (string.IsNullOrEmpty(sErrMsg))
|
||||
sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString();
|
||||
if (string.IsNullOrEmpty(sErrMsg))
|
||||
sErrMsg = html;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
foreach (var row in rows)
|
||||
row.Cells["colMsg"].Value = "修改请求失败 " + sErrMsg;
|
||||
}));
|
||||
return; //continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 设置长宽高
|
||||
if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen;
|
||||
if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen;
|
||||
if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth;
|
||||
if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth;
|
||||
if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight;
|
||||
if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight;
|
||||
if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight;
|
||||
if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight;
|
||||
|
||||
|
||||
//JObject jPost = new JObject();
|
||||
@@ -1837,18 +2013,18 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
|
||||
//productSkuWhExtAttrReq
|
||||
jStr += "\"productSkuWhExtAttrReq\":{";
|
||||
jStr += " \"productSkuWeightReq\":{\"value\":" + (weight * 1000) + "},";
|
||||
jStr += " \"productSkuWeightReq\":{\"value\":" + weight + "},";
|
||||
jStr += " \"productSkuVolumeReq\":{";
|
||||
jStr += " \"len\":" + (len * 10) + ",";
|
||||
jStr += " \"width\":" + (width * 10) + ",";
|
||||
jStr += " \"height\":" + (height * 10);
|
||||
jStr += " \"len\":" + len + ",";
|
||||
jStr += " \"width\":" + width + ",";
|
||||
jStr += " \"height\":" + height;
|
||||
jStr += " }";
|
||||
jStr += "},";
|
||||
|
||||
//productSkuMultiPackReq
|
||||
jStr += "\"productSkuMultiPackReq\":{";
|
||||
jStr += " \"skuClassification\":1,";
|
||||
jStr += " \"numberOfPieces\":1,";
|
||||
jStr += " \"numberOfPieces\":" + numberOfPieces + ",";
|
||||
jStr += " \"pieceUnitCode\":" + Math.Max(1, sku.productSkuMultiPack.pieceUnitCode.ParseToInt()) + ",";
|
||||
jStr += " \"productSkuNetContentReq\":{";
|
||||
jStr += " },";
|
||||
@@ -1887,7 +2063,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
if (html.Contains("登录过期") || html.Contains("Invalid Login State"))
|
||||
{
|
||||
CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
this.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
displayShopStatus(shop);
|
||||
@@ -1980,82 +2156,106 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
var filterExtCodeLst = dgvExtCode.Rows.Cast<DataGridViewRow>()
|
||||
.Where(r => r.Cells["colSelectExtCode"].Value.ParseToBool() == true)
|
||||
.Select(r => r.Cells["colFilterExtCode"].Value.ParseToString()).Distinct().ToList();
|
||||
foreach (DataGridViewRow row in dgvPriceCheck.Rows)
|
||||
pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
row.Visible = true;
|
||||
row.Cells["colCheck"].Value = false;
|
||||
//continue;
|
||||
foreach (DataGridViewRow row in dgvPriceCheck.Rows)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
|
||||
var prodId = row.Cells["colProductId"].Value.ParseToString();
|
||||
var rowExtCode = row.Cells["colExtCode"].Value.ParseToString();
|
||||
var rowAdjustPrice = row.Cells["colAdjustPrice"].Value.ParseToDecimal();
|
||||
// 过滤价格
|
||||
// 只有有选中数据时才过滤,全不选时不过滤
|
||||
if (filterExtCodeLst != null && filterExtCodeLst.Count > 0)
|
||||
{
|
||||
var filterExtCode = filterExtCodeLst.FirstOrDefault(e => e == rowExtCode);
|
||||
var filterExtCodeConfig = lstPriceCheckFilterConfig.FirstOrDefault(c => c.ExtCode == rowExtCode);
|
||||
if (string.IsNullOrWhiteSpace(filterExtCode))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
else if (filterExtCodeConfig != null)
|
||||
{
|
||||
if (filterExtCodeConfig.Symbol == "≥" && rowAdjustPrice < filterExtCodeConfig.Price1)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol == "≤" && rowAdjustPrice > filterExtCodeConfig.Price1)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol.StartsWith("≤") && filterExtCodeConfig.Symbol.EndsWith("≥") &&
|
||||
rowAdjustPrice > filterExtCodeConfig.Price1 && rowAdjustPrice < filterExtCodeConfig.Price2)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol.StartsWith("≥") && filterExtCodeConfig.Symbol.EndsWith("≤") &&
|
||||
(rowAdjustPrice < filterExtCodeConfig.Price1 || rowAdjustPrice > filterExtCodeConfig.Price2))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
//row.Visible = true;
|
||||
//row.Cells["colCheck"].Value = false;
|
||||
|
||||
// 过滤保留未还原的标题
|
||||
if (chkFilterTitle.Checked)
|
||||
{
|
||||
var pName = row.Cells["colProdName"].Value.ParseToString();
|
||||
if (!CheckRestoreTitleWords(pName))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
if (chkFilterSize.Checked)
|
||||
{
|
||||
var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId);
|
||||
if (priceInfo != null)
|
||||
{
|
||||
if (!checkRestoreSizeAndNumber(priceInfo))
|
||||
bool isVisible = true;
|
||||
|
||||
var prodId = row.Cells["colProductId"].Value.ParseToString();
|
||||
var rowExtCode = row.Cells["colExtCode"].Value.ParseToString();
|
||||
var rowAdjustPrice = row.Cells["colAdjustPrice"].Value.ParseToDecimal();
|
||||
// 过滤价格
|
||||
// 只有有选中数据时才过滤,全不选时不过滤
|
||||
if (filterExtCodeLst != null && filterExtCodeLst.Count > 0)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
var filterExtCode = filterExtCodeLst.FirstOrDefault(e => e == rowExtCode);
|
||||
var filterExtCodeConfig = lstPriceCheckFilterConfig.FirstOrDefault(c => c.ExtCode == rowExtCode);
|
||||
if (string.IsNullOrWhiteSpace(filterExtCode))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
else if (filterExtCodeConfig != null)
|
||||
{
|
||||
if (filterExtCodeConfig.Symbol == "≥" && rowAdjustPrice < filterExtCodeConfig.Price1)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol == "≤" && rowAdjustPrice > filterExtCodeConfig.Price1)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol.StartsWith("≤") && filterExtCodeConfig.Symbol.EndsWith("≥") &&
|
||||
rowAdjustPrice > filterExtCodeConfig.Price1 && rowAdjustPrice < filterExtCodeConfig.Price2)
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
if (filterExtCodeConfig.Symbol.StartsWith("≥") && filterExtCodeConfig.Symbol.EndsWith("≤") &&
|
||||
(rowAdjustPrice < filterExtCodeConfig.Price1 || rowAdjustPrice > filterExtCodeConfig.Price2))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// 过滤保留未还原的标题
|
||||
if (chkFilterTitle.Checked)
|
||||
{
|
||||
var pName = row.Cells["colProdName"].Value.ParseToString();
|
||||
if (!CheckRestoreTitleWords(pName))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (chkFilterSize.Checked)
|
||||
{
|
||||
var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId);
|
||||
if (priceInfo != null)
|
||||
{
|
||||
if (!checkRestoreSizeAndNumber(priceInfo))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (row.Visible != isVisible)
|
||||
{
|
||||
row.Visible = isVisible;
|
||||
//row.Cells["colCheck"].Value = isVisible;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
Invoke(new Action(() => { pbLoading.Visible = false; }));
|
||||
});
|
||||
}
|
||||
|
||||
private void btnSaveFilterParams_Click(object sender, EventArgs e)
|
||||
@@ -2191,6 +2391,11 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
else
|
||||
ShopListForm.Instance.CheckShopLogin(shops, isShowProgress);
|
||||
}
|
||||
|
||||
private void lblJudgeLen_Click(object sender, EventArgs e)
|
||||
{
|
||||
chkFilterSize.Checked = !chkFilterSize.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
public class PriceCheckConfig
|
||||
@@ -2212,4 +2417,17 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
public decimal Price1 { get; set; }
|
||||
public decimal Price2 { get; set; }
|
||||
}
|
||||
|
||||
public class CateSizeWeightConfig
|
||||
{
|
||||
public string catId { get; set; }
|
||||
public int minLen { get; set; }
|
||||
public int maxLen { get; set; }
|
||||
public int minWidth { get; set; }
|
||||
public int maxWidth { get; set; }
|
||||
public int minHeight { get; set; }
|
||||
public int maxHeight { get; set; }
|
||||
public int minWeight { get; set; }
|
||||
public int maxWeight { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,7 @@ namespace TemuKJD.KJDForms.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.authorized_amount = BaseRegex.GetNullableDecimalJson(ref oStr, "authorized_amount");
|
||||
|
||||
lstSubSa.Add(user);
|
||||
dgvSaUser.Rows.Add(
|
||||
|
||||
@@ -416,8 +416,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
if (BaseClass.SaLevel > 1)
|
||||
data += "&operate_sub_sa_name=" + BaseClass.UserName;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html)
|
||||
|
||||
Reference in new issue
Block a user