1.Jit客户端功能 2.pdd活动报名新增及优化

This commit is contained in:
wule committed 2025-12-01 10:01:54 +08:00
1 parent e77914bafc
commit 480d8c2cd4
41 files changed
+5136 -2863

No files matched your search

+60 -48
View File
@@ -32,7 +32,12 @@ namespace TemuKJD.KJDForms.AdminForms
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();
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.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.txtCardCode = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtCreateCount = new System.Windows.Forms.TextBox();
this.btnCreate = new DevComponents.DotNetBar.PanelEx();
this.cmbCardCodeStatus = new System.Windows.Forms.ComboBox();
@@ -50,6 +55,8 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvCardCode = new TemuKJD.UserComponent.DataGridViewEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCardCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -61,10 +68,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.txtCardCode = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -112,6 +115,22 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer1.Size = new System.Drawing.Size(1221, 530);
this.splitContainer1.TabIndex = 35;
//
// txtCardCode
//
this.txtCardCode.Location = new System.Drawing.Point(41, 14);
this.txtCardCode.Name = "txtCardCode";
this.txtCardCode.Size = new System.Drawing.Size(90, 23);
this.txtCardCode.TabIndex = 468;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 469;
this.label1.Text = "卡密:";
//
// txtCreateCount
//
this.txtCreateCount.Location = new System.Drawing.Point(949, 14);
@@ -372,6 +391,32 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvCardCode.TabIndex = 5;
this.dgvCardCode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCardCode_CellContentClick);
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(859, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1221, 25);
this.statusBar.TabIndex = 1;
this.statusBar.Visible = false;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -398,18 +443,27 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colAddTime
//
dataGridViewCellStyle4.Format = "F";
dataGridViewCellStyle4.NullValue = null;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle4;
this.colAddTime.HeaderText = "生成时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
//
// colActiveTime
//
dataGridViewCellStyle5.Format = "F";
dataGridViewCellStyle5.NullValue = null;
this.colActiveTime.DefaultCellStyle = dataGridViewCellStyle5;
this.colActiveTime.HeaderText = "激活时间";
this.colActiveTime.Name = "colActiveTime";
this.colActiveTime.ReadOnly = true;
//
// colExpires
//
dataGridViewCellStyle6.Format = "D";
dataGridViewCellStyle6.NullValue = null;
this.colExpires.DefaultCellStyle = dataGridViewCellStyle6;
this.colExpires.HeaderText = "到期时间";
this.colExpires.Name = "colExpires";
this.colExpires.ReadOnly = true;
@@ -448,48 +502,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(859, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1221, 25);
this.statusBar.TabIndex = 1;
this.statusBar.Visible = false;
//
// txtCardCode
//
this.txtCardCode.Location = new System.Drawing.Point(41, 14);
this.txtCardCode.Name = "txtCardCode";
this.txtCardCode.Size = new System.Drawing.Size(90, 23);
this.txtCardCode.TabIndex = 468;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 469;
this.label1.Text = "卡密:";
//
// AdminCardCodeForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -537,6 +549,8 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.TextBox txtCreateCount;
private DevComponents.DotNetBar.PanelEx btnCreate;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtCardCode;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colId;
private System.Windows.Forms.DataGridViewTextBoxColumn colCardCode;
@@ -548,7 +562,5 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.TextBox txtCardCode;
private System.Windows.Forms.Label label1;
}
}
+5 -2
View File
@@ -55,7 +55,8 @@ namespace TemuKJD.KJDForms.AdminForms
hideName.Remove("库存上传");
hideName.Remove("商品核价");
hideName.Remove("加入发货台");
//hideName.Remove("JIT卡密管理");
if (MainForm.instance.pnlJit.Visible == true)
hideName.Remove("JIT卡密管理");
hideName.Remove("开通JIT");
}
if (BaseClass.SaLevel==2)
@@ -105,12 +106,14 @@ namespace TemuKJD.KJDForms.AdminForms
SetForm(dbPriceMarkUpForm.Value);
break;
case "认领待上传":
dbProductSelectListManageForm.Value.IsClientJit = false;
SetForm(dbProductSelectListManageForm.Value);
break;
case "库存上传":
SetForm(productThirdSelectListManageForm.Value);
break;
case "商品核价":
adminProductPriceCheckForm.Value.IsClientJit = false;
SetForm(adminProductPriceCheckForm.Value);
break;
case "加入发货台":
@@ -118,7 +121,7 @@ namespace TemuKJD.KJDForms.AdminForms
SetForm(joinDeliveryFrom.Value);
break;
case "开通JIT":
jitForm.Value.IsAdmin = true;
jitForm.Value.IsClientJit = false;
SetForm(jitForm.Value);
break;
case "JIT卡密管理":
@@ -110,15 +110,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbShopLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlSpecDetail = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnClose = new DevComponents.DotNetBar.PanelEx();
@@ -151,6 +142,16 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -1255,14 +1256,14 @@ namespace TemuKJD.KJDForms.AdminForms
this.splitContainer2.Panel2.Controls.Add(this.dgvPriceCheck);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1484, 437);
this.splitContainer2.SplitterDistance = 280;
this.splitContainer2.SplitterDistance = 325;
this.splitContainer2.TabIndex = 0;
//
// pbShopLoading
//
this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbShopLoading.Location = new System.Drawing.Point(115, 193);
this.pbShopLoading.Location = new System.Drawing.Point(137, 193);
this.pbShopLoading.Name = "pbShopLoading";
this.pbShopLoading.Size = new System.Drawing.Size(50, 50);
this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1296,6 +1297,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colShopName,
this.colShopNotes,
this.colLoginStatus,
this.colJitStatus,
this.colCanUse,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1304,81 +1306,10 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(276, 437);
this.dgvShop.Size = new System.Drawing.Size(321, 437);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colUser
//
this.colUser.HeaderText = "店铺账户";
this.colUser.Name = "colUser";
this.colUser.ReadOnly = true;
this.colUser.Visible = false;
//
// colLoginName
//
this.colLoginName.HeaderText = "店铺登录名";
this.colLoginName.Name = "colLoginName";
this.colLoginName.ReadOnly = true;
this.colLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 38;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// pnlSpecDetail
//
this.pnlSpecDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -1389,7 +1320,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.pnlSpecDetail.Controls.Add(this.btnClose);
this.pnlSpecDetail.Location = new System.Drawing.Point(113, 58);
this.pnlSpecDetail.Name = "pnlSpecDetail";
this.pnlSpecDetail.Size = new System.Drawing.Size(971, 124);
this.pnlSpecDetail.Size = new System.Drawing.Size(926, 124);
this.pnlSpecDetail.TabIndex = 682;
this.pnlSpecDetail.Visible = false;
//
@@ -1412,7 +1343,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClose.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(882, 88);
this.btnClose.Location = new System.Drawing.Point(837, 88);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(58, 23);
this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1434,7 +1365,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(559, 193);
this.pbLoading.Location = new System.Drawing.Point(536, 193);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1448,7 +1379,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(935, 373);
this.panelEx1.Location = new System.Drawing.Point(890, 373);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1474,7 +1405,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(826, 373);
this.btnClear.Location = new System.Drawing.Point(781, 373);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1540,7 +1471,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvPriceCheck.ReadOnly = true;
this.dgvPriceCheck.RowHeadersWidth = 36;
this.dgvPriceCheck.RowTemplate.Height = 23;
this.dgvPriceCheck.Size = new System.Drawing.Size(1196, 437);
this.dgvPriceCheck.Size = new System.Drawing.Size(1151, 437);
this.dgvPriceCheck.TabIndex = 187;
this.dgvPriceCheck.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCheckPrice_CellContentClick);
this.dgvPriceCheck.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvPriceCheck_CellMouseDown);
@@ -1766,6 +1697,84 @@ namespace TemuKJD.KJDForms.AdminForms
this.statusBar.Size = new System.Drawing.Size(1198, 26);
this.statusBar.TabIndex = 2;
//
// colSelect
//
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colUser
//
this.colUser.HeaderText = "店铺账户";
this.colUser.Name = "colUser";
this.colUser.ReadOnly = true;
this.colUser.Visible = false;
//
// colLoginName
//
this.colLoginName.HeaderText = "店铺登录名";
this.colLoginName.Name = "colLoginName";
this.colLoginName.ReadOnly = true;
this.colLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 38;
//
// colJitStatus
//
this.colJitStatus.HeaderText = "JIT";
this.colJitStatus.Name = "colJitStatus";
this.colJitStatus.ReadOnly = true;
this.colJitStatus.Width = 38;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// AdminProductPriceCheckForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1856,15 +1865,6 @@ namespace TemuKJD.KJDForms.AdminForms
private DevComponents.DotNetBar.PanelEx btnRestoreProdName;
private DevComponents.DotNetBar.PanelEx btnMutliCancel;
private DevComponents.DotNetBar.PanelEx btnMutliOk;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private DevComponents.DotNetBar.PanelEx btnSearchPrice2;
private DevComponents.DotNetBar.PanelEx btnStop;
private System.Windows.Forms.DateTimePicker dtpEndTime;
@@ -1935,5 +1935,15 @@ namespace TemuKJD.KJDForms.AdminForms
private UserComponent.UcCheckBox chkFilterSize;
private System.Windows.Forms.NumericUpDown numSleep;
private System.Windows.Forms.Label lblSleep;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
File diff suppressed because it is too large. Load diff
@@ -144,6 +144,9 @@
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colJitStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+4
View File
@@ -54,15 +54,19 @@ namespace TemuKJD.KJDForms.JITForms
SetForm(jitShopActiveForm.Value);
break;
case "JIT商品选品":
dbProductListForm.Value.IsClientJit = true;
SetForm(dbProductListForm.Value);
break;
case "JIT商品上传":
dDbProductSelectListManageForm.Value.IsClientJit = true;
SetForm(dDbProductSelectListManageForm.Value);
break;
case "JIT商品核价":
productPriceCheckForm.Value.IsClientJit = true;
SetForm(productPriceCheckForm.Value);
break;
case "开通JIT":
temuJitForm.Value.IsClientJit = true;
SetForm(temuJitForm.Value);
break;
}
+635 -2
View File
@@ -30,11 +30,644 @@ namespace TemuKJD.KJDForms.JITForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnEmpty = new DevComponents.DotNetBar.PanelEx();
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.txtNotes = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.txtShopName = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.txtShopId = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colJitExpireTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveJitCardCode = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.btnActive = new DevComponents.DotNetBar.PanelEx();
this.txtActiveJitCardCode = new System.Windows.Forms.TextBox();
this.txtActiveShopName = new System.Windows.Forms.TextBox();
this.txtAcitveShopId = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
this.splitContainer3.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer3.Location = new System.Drawing.Point(4, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.ucGroupBoxEx1);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.dgvShop);
this.splitContainer3.Size = new System.Drawing.Size(490, 436);
this.splitContainer3.SplitterDistance = 120;
this.splitContainer3.TabIndex = 1;
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.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.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.btnEmpty);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Controls.Add(this.txtNotes);
this.ucGroupBoxEx1.Controls.Add(this.label14);
this.ucGroupBoxEx1.Controls.Add(this.txtShopName);
this.ucGroupBoxEx1.Controls.Add(this.label21);
this.ucGroupBoxEx1.Controls.Add(this.txtShopId);
this.ucGroupBoxEx1.Controls.Add(this.label22);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(-2, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(494, 120);
this.ucGroupBoxEx1.TabIndex = 400;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
// btnEmpty
//
this.btnEmpty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.btnEmpty.Location = new System.Drawing.Point(387, 90);
this.btnEmpty.Name = "btnEmpty";
this.btnEmpty.Size = new System.Drawing.Size(88, 23);
this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnEmpty.Style.GradientAngle = 90;
this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnEmpty.TabIndex = 705;
this.btnEmpty.Text = "重置查询条件";
this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click);
//
// btnRefreshShop
//
this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.Location = new System.Drawing.Point(289, 90);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(96, 23);
this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshShop.Style.GradientAngle = 90;
this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshShop.TabIndex = 431;
this.btnRefreshShop.Text = "查询/刷新店铺";
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// txtNotes
//
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtNotes.Location = new System.Drawing.Point(75, 65);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(400, 23);
this.txtNotes.TabIndex = 507;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(18, 68);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(68, 17);
this.label14.TabIndex = 508;
this.label14.Text = "店铺分组:";
//
// txtShopName
//
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopName.Location = new System.Drawing.Point(75, 40);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(400, 23);
this.txtShopName.TabIndex = 505;
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(18, 43);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(68, 17);
this.label21.TabIndex = 506;
this.label21.Text = "店铺名称:";
//
// txtShopId
//
this.txtShopId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopId.Location = new System.Drawing.Point(75, 15);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(400, 23);
this.txtShopId.TabIndex = 503;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(29, 18);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(57, 17);
this.label22.TabIndex = 504;
this.label22.Text = "店铺ID:";
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colShopLoginName,
this.colShopId,
this.colShopName,
this.colShopNotes,
this.colLoginStatus,
this.colJitStatus,
this.colJitExpireTime,
this.colActiveJitCardCode,
this.colCanUse,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(0, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(490, 312);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 28;
//
// colShopLoginName
//
this.colShopLoginName.HeaderText = "店铺登录名";
this.colShopLoginName.Name = "colShopLoginName";
this.colShopLoginName.ReadOnly = true;
this.colShopLoginName.Visible = false;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 70;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "分组";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 70;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Visible = false;
this.colLoginStatus.Width = 38;
//
// colJitStatus
//
this.colJitStatus.HeaderText = "Jit状态";
this.colJitStatus.Name = "colJitStatus";
this.colJitStatus.ReadOnly = true;
this.colJitStatus.Width = 50;
//
// colJitExpireTime
//
this.colJitExpireTime.HeaderText = "过期时间";
this.colJitExpireTime.Name = "colJitExpireTime";
this.colJitExpireTime.ReadOnly = true;
//
// colActiveJitCardCode
//
this.colActiveJitCardCode.HeaderText = "激活卡密";
this.colActiveJitCardCode.Name = "colActiveJitCardCode";
this.colActiveJitCardCode.ReadOnly = true;
this.colActiveJitCardCode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colActiveJitCardCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colActiveJitCardCode.Width = 70;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Size = new System.Drawing.Size(1098, 26);
this.splitContainer4.SplitterDistance = 873;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(873, 26);
this.statusBar.TabIndex = 2;
//
// panelEx1
//
this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(101, 0);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// btnClear
//
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(6, 0);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(273, 193);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 188;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.White;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer1.Size = new System.Drawing.Size(1098, 466);
this.splitContainer1.SplitterDistance = 436;
this.splitContainer1.TabIndex = 11;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.splitContainer3);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1098, 436);
this.splitContainer2.SplitterDistance = 494;
this.splitContainer2.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.btnActive);
this.panel1.Controls.Add(this.txtActiveJitCardCode);
this.panel1.Controls.Add(this.txtActiveShopName);
this.panel1.Controls.Add(this.txtAcitveShopId);
this.panel1.Controls.Add(this.pbLoading);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label3);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(596, 436);
this.panel1.TabIndex = 189;
//
// btnActive
//
this.btnActive.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnActive.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnActive.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnActive.DisabledBackColor = System.Drawing.Color.Empty;
this.btnActive.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnActive.Location = new System.Drawing.Point(429, 128);
this.btnActive.Name = "btnActive";
this.btnActive.Size = new System.Drawing.Size(76, 23);
this.btnActive.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnActive.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnActive.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnActive.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnActive.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnActive.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnActive.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnActive.Style.GradientAngle = 90;
this.btnActive.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnActive.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnActive.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnActive.TabIndex = 517;
this.btnActive.Text = "激活";
this.btnActive.Click += new System.EventHandler(this.btnActive_Click);
//
// txtActiveJitCardCode
//
this.txtActiveJitCardCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtActiveJitCardCode.Location = new System.Drawing.Point(105, 99);
this.txtActiveJitCardCode.Name = "txtActiveJitCardCode";
this.txtActiveJitCardCode.Size = new System.Drawing.Size(400, 23);
this.txtActiveJitCardCode.TabIndex = 510;
//
// txtActiveShopName
//
this.txtActiveShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtActiveShopName.Location = new System.Drawing.Point(105, 70);
this.txtActiveShopName.Name = "txtActiveShopName";
this.txtActiveShopName.ReadOnly = true;
this.txtActiveShopName.Size = new System.Drawing.Size(400, 23);
this.txtActiveShopName.TabIndex = 509;
//
// txtAcitveShopId
//
this.txtAcitveShopId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAcitveShopId.Location = new System.Drawing.Point(105, 39);
this.txtAcitveShopId.Name = "txtAcitveShopId";
this.txtAcitveShopId.ReadOnly = true;
this.txtAcitveShopId.Size = new System.Drawing.Size(400, 23);
this.txtAcitveShopId.TabIndex = 508;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(48, 73);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.TabIndex = 512;
this.label1.Text = "店铺名称:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(59, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 17);
this.label2.TabIndex = 511;
this.label2.Text = "店铺ID:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(56, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(60, 17);
this.label3.TabIndex = 513;
this.label3.Text = "JIT卡密:";
//
// JitShopActiveForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1098, 466);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "JitShopActiveForm";
this.Text = "JitShopActiveForm";
this.Load += new System.EventHandler(this.JitShopActiveForm_Load);
this.VisibleChanged += new System.EventHandler(this.JitShopActiveForm_VisibleChanged);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer3;
private UserComponent.DataGridViewEx dgvShop;
private System.Windows.Forms.SplitContainer splitContainer4;
private UserControls.StatusBarUserControl statusBar;
private DevComponents.DotNetBar.PanelEx panelEx1;
private System.Windows.Forms.PictureBox pbLoading;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.PanelEx btnEmpty;
private DevComponents.DotNetBar.PanelEx btnRefreshShop;
private System.Windows.Forms.TextBox txtNotes;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.Label label22;
private DevComponents.DotNetBar.PanelEx btnClear;
private System.Windows.Forms.Panel panel1;
private DevComponents.DotNetBar.PanelEx btnActive;
private System.Windows.Forms.TextBox txtActiveJitCardCode;
private System.Windows.Forms.TextBox txtActiveShopName;
private System.Windows.Forms.TextBox txtAcitveShopId;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitExpireTime;
private System.Windows.Forms.DataGridViewLinkColumn colActiveJitCardCode;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
+223 -1
View File
@@ -1,4 +1,8 @@
using System;
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -7,14 +11,232 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.Extension;
using Work;
namespace TemuKJD.KJDForms.JITForms
{
public partial class JitShopActiveForm : Form
{
private CheckBox chkSelectAll = new CheckBox();
public JitShopActiveForm()
{
InitializeComponent();
}
private void JitShopActiveForm_Load(object sender, EventArgs e)
{
//chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
//dgvShop.Columns["colSelect"].HeaderText = "";
//chkSelectAll.Width = chkSelectAll.Height = 13;
//chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
var list = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus == "登录成功").Select(ss => ss.ShopId);
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void JitShopActiveForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
RefreshShop();
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void RefreshShop()
{
// 店铺Id
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
var shopLst = GlobalConfig.ShopLoginList.ToList();
if (!string.IsNullOrWhiteSpace(txtShopId.Text.Trim()))
{
shopLst = shopLst.Where(s => ("," + txtShopId.Text.Trim() + ",").Contains("," + s.ShopId + ",") || s.ShopId.Contains(txtShopId.Text.Trim())).ToList();
}
if (!string.IsNullOrWhiteSpace(txtShopName.Text.Trim()))
{
shopLst = shopLst.Where(s => ("," + txtShopName.Text.Trim() + ",").Contains("," + s.ShopAccount + ",") || s.ShopAccount.ToLower().Contains(txtShopName.Text.Trim().ToLower())).ToList();
}
if (!string.IsNullOrWhiteSpace(txtNotes.Text.Trim()))
{
shopLst = shopLst.Where(s => ("," + txtNotes.Text.Trim() + ",").Contains("," + s.Notes + ",") || s.Notes.ToLower().Contains(txtNotes.Text.Trim().ToLower())).ToList();
}
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !shopLst.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (ShopLoginInfo shopEntity in shopLst)
{
if (!string.IsNullOrEmpty(shopEntity.ShopId))
BindShop(shopEntity, selectIds);
}
}
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
{
if (shopEntity == null)
return;
if (selectShopId == null)
selectShopId = new List<string>();
bool canUse = shopEntity.LoginStatus == "登录成功" && shopEntity.LoginStatus2 == "国际版在线";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
{
int id = this.dgvShop.Rows.Add(
selectShopId.Contains(shopEntity.ShopId) && canUse,
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
shopEntity.Notes,
canUse ? "在线" : "掉线",
GetJitStatus(shopEntity),
shopEntity.jit_expire_time?.ToString("yyyy/MM/dd"),
"激活",
canUse,
string.Empty
);
row = dgvShop.Rows[id];
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
row.Cells["colJitStatus"].Style.ForeColor = GetJitStatusStyleColor(shopEntity);
}
else
{
row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes;
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
row.Cells["colCanUse"].Value = canUse;
row.Cells["colJitStatus"].Value = GetJitStatus(shopEntity);
row.Cells["colJitExpireTime"].Value = shopEntity.jit_expire_time?.ToString("yyyy/MM/dd");
row.Cells["colJitStatus"].Style.ForeColor = GetJitStatusStyleColor(shopEntity);
}
}
public static string GetJitStatus(ShopLoginInfo shop)
{
if (shop.jit_expire_time == null)
return "未开通";
else if (shop.jit_expire_time?.Date >= DateTime.Now.Date)
return "已开通";
else
return "已过期";
}
public static Color GetJitStatusStyleColor(ShopLoginInfo shop)
{
if (shop.jit_expire_time == null)
return Color.Orange;
else if (shop.jit_expire_time?.Date >= DateTime.Now.Date)
return Color.Green;
else
return Color.Red;
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
case "colActiveJitCardCode":
if (shop != null)
{
this.txtAcitveShopId.Text = shop.ShopId;
this.txtActiveShopName.Text = shop.ShopAccount;
this.txtActiveJitCardCode.Text = "";
}
else
{
BaseMsgForm.ShowInfo("店铺不存在!");
}
break;
}
}
private void btnEmpty_Click(object sender, EventArgs e)
{
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
}
private void btnActive_Click(object sender, EventArgs e)
{
var url = BaseClass.BuildObjString("shop/active_jit_card_code");
var data = UserLogin.GetSignaturex()
//+ "&login_name=" + shop.LoginName
//直通车相同账户的不同店铺之间是隔离的,所以只能填店铺id更新一个店铺
+ "&shop_id=" + txtAcitveShopId.Text.Trim()
+ "&shop_account=" + txtActiveShopName.Text.Trim()
+ "&card_code_id=" + txtActiveJitCardCode.Text.Trim();
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg");
if (string.IsNullOrEmpty(msg))
msg = "JIT激活失败!";
BaseMsgForm.ShowError(msg);
}
else
{
var expire_time = BaseRegex.GetStringJson(ref result, "expire_time");
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == txtAcitveShopId.Text.Trim());
if (shop != null)
{
try
{
shop.jit_expire_time = Convert.ToDateTime(expire_time);
RefreshShop();
}
catch
{
}
}
BaseMsgForm.ShowInfo("激活成功!");
}
}
}
}
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopLoginName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colJitStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colJitExpireTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colActiveJitCardCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -330,7 +330,7 @@ namespace TemuKJD.KJDForms.ProductForms
}
if (!dgvOrder.Rows.Cast<DataGridViewRow>().Any(r => r.Cells["colSelect"].Value.ParseToBool() == true))
{
BaseMsgForm.ShowError("请至少勾选一项!");
BaseMsgForm.ShowError("请至少勾选一项!"); // todo
return;
}
foreach (DataGridViewRow r in dgvOrder.Rows)
+1
View File
@@ -1473,6 +1473,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Click += new System.EventHandler(this.panelEx1_Click);
//
// btnClear
//
+27 -11
View File
@@ -903,6 +903,7 @@ namespace TemuKJD.KJDForms.ProductForms
tryAgain:
Thread.Sleep(100 + Randomx.GetId(200));
string jsonStr = getAdsGoodsList(shop, page, pageSize);
Thread.Sleep(Randomx.GetId(300, 800));
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
{
tryCount++;
@@ -962,21 +963,24 @@ namespace TemuKJD.KJDForms.ProductForms
ads_goods_info adsGoodsInfo = JsonHelper.DeserializeJsonToObject<ads_goods_info>(sItem); // 反序列化得到类
if (adsGoodsInfo != null && !lstAdsMallGoodsInfo.Any(a => a.goods_id == adsGoodsInfo.goods_id))
{
if (adsGoodsInfo.gray_reason != null)
continue;
//if (adsGoodsInfo.gray_reason != null)
// continue;
adsGoodsInfo.shopId = shop.ShopId;
lstAdsMallGoodsInfo.Add(adsGoodsInfo);
spuIdLst.Add(adsGoodsInfo.spu_id);
var create_ad_req_param = new create_ad_req_param()
if (adsGoodsInfo.gray_reason == null)
{
budget = chkLimitValue.Checked ? (txtBudget.Text.ParseToDecimal() * 100).ParseToInt() : -1,
goods_id = adsGoodsInfo.goods_id.ParseToString(),
site_id = adsGoodsInfo.site_list.FirstOrDefault().ParseToInt(),
roas = (txtSameRoas.Text.ParseToDecimal() * 10000).ParseToInt(),
};
createAds.create_ad_reqs.Add(create_ad_req_param);
var create_ad_req_param = new create_ad_req_param()
{
budget = chkLimitValue.Checked ? (txtBudget.Text.ParseToDecimal() * 100).ParseToInt() : -1,
goods_id = adsGoodsInfo.goods_id.ParseToString(),
site_id = adsGoodsInfo.site_list.FirstOrDefault().ParseToInt(),
roas = (txtSameRoas.Text.ParseToDecimal() * 10000).ParseToInt(),
};
createAds.create_ad_reqs.Add(create_ad_req_param);
}
Invoke(new Action(() =>
{
@@ -1012,7 +1016,7 @@ namespace TemuKJD.KJDForms.ProductForms
"点击率(CTR)",
"转化率(CVR)",
"加入购物车数",
"" // 操作结果,状态
adsGoodsInfo.gray_reason == null ? "" : string.Join(",", adsGoodsInfo.gray_reason.Select(g => g.reason)) // 操作结果,状态
);
dgvAds.Rows[rowId].Height = 50;
@@ -1130,7 +1134,13 @@ namespace TemuKJD.KJDForms.ProductForms
}
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
totalPage = Math.Ceiling(1.0 * total / pageSize).ParseToInt();
if (totalPage == 1)
totalPage = Math.Ceiling(1.0 * total / pageSize).ParseToInt();
bool hasMore = BaseRegex.GetBoolJson(ref jsonStr, "has_more");
if (hasMore && totalPage == page)
{
totalPage++;
}
}
page++;
}
@@ -2344,6 +2354,12 @@ namespace TemuKJD.KJDForms.ProductForms
{
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
}
private void panelEx1_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
}
}
public class CreateAdsParam
+110 -101
View File
@@ -106,6 +106,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlSpecDetail = new System.Windows.Forms.Panel();
@@ -113,6 +114,10 @@ namespace TemuKJD.KJDForms.ProductForms
this.btnClose = new DevComponents.DotNetBar.PanelEx();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvOpenJit = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProdIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOrderId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -135,10 +140,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.colStock = new System.Windows.Forms.DataGridViewLinkColumn();
this.colRecevieArea = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -940,14 +941,14 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer2.Panel2.Controls.Add(this.dgvOpenJit);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1584, 437);
this.splitContainer2.SplitterDistance = 280;
this.splitContainer2.SplitterDistance = 325;
this.splitContainer2.TabIndex = 0;
//
// pbShopLoading
//
this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbShopLoading.Location = new System.Drawing.Point(115, 193);
this.pbShopLoading.Location = new System.Drawing.Point(137, 193);
this.pbShopLoading.Name = "pbShopLoading";
this.pbShopLoading.Size = new System.Drawing.Size(50, 50);
this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -992,6 +993,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colShopName,
this.colShopNotes,
this.colLoginStatus,
this.colJitStatus,
this.colCanUse,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1000,7 +1002,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(276, 437);
this.dgvShop.Size = new System.Drawing.Size(321, 437);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
@@ -1059,6 +1061,13 @@ namespace TemuKJD.KJDForms.ProductForms
this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLoginStatus.Width = 38;
//
// colJitStatus
//
this.colJitStatus.HeaderText = "JIT";
this.colJitStatus.Name = "colJitStatus";
this.colJitStatus.ReadOnly = true;
this.colJitStatus.Width = 38;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
@@ -1085,7 +1094,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.pnlSpecDetail.Controls.Add(this.btnClose);
this.pnlSpecDetail.Location = new System.Drawing.Point(115, 58);
this.pnlSpecDetail.Name = "pnlSpecDetail";
this.pnlSpecDetail.Size = new System.Drawing.Size(1071, 124);
this.pnlSpecDetail.Size = new System.Drawing.Size(1026, 124);
this.pnlSpecDetail.TabIndex = 683;
this.pnlSpecDetail.Visible = false;
//
@@ -1098,7 +1107,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox1.Size = new System.Drawing.Size(1012, 65);
this.textBox1.Size = new System.Drawing.Size(967, 65);
this.textBox1.TabIndex = 690;
//
// btnClose
@@ -1108,7 +1117,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClose.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(982, 88);
this.btnClose.Location = new System.Drawing.Point(937, 88);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(58, 23);
this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1130,7 +1139,7 @@ namespace TemuKJD.KJDForms.ProductForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(609, 193);
this.pbLoading.Location = new System.Drawing.Point(586, 193);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1185,10 +1194,80 @@ namespace TemuKJD.KJDForms.ProductForms
this.dgvOpenJit.ReadOnly = true;
this.dgvOpenJit.RowHeadersWidth = 36;
this.dgvOpenJit.RowTemplate.Height = 23;
this.dgvOpenJit.Size = new System.Drawing.Size(1296, 437);
this.dgvOpenJit.Size = new System.Drawing.Size(1251, 437);
this.dgvOpenJit.TabIndex = 187;
this.dgvOpenJit.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvOpenJit_CellContentClick);
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.statusBar);
this.splitContainer4.Size = new System.Drawing.Size(1584, 26);
this.splitContainer4.SplitterDistance = 282;
this.splitContainer4.TabIndex = 3;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(0, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(282, 26);
this.ucSplitPage1.TabIndex = 5;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// btnClear
//
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(1204, 0);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1298, 26);
this.statusBar.TabIndex = 2;
//
// colCheck
//
this.colCheck.HeaderText = "选择";
@@ -1267,7 +1346,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.colProdName.HeaderText = "标题";
this.colProdName.Name = "colProdName";
this.colProdName.ReadOnly = true;
this.colProdName.Width = 120;
//
// colSkuName
//
@@ -1293,7 +1371,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colExtCodePrice.HeaderText = "货号进价";
this.colExtCodePrice.Name = "colExtCodePrice";
this.colExtCodePrice.ReadOnly = true;
this.colExtCodePrice.Width = 65;
this.colExtCodePrice.Width = 62;
//
// colPrcie
//
@@ -1309,7 +1387,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colCreatTime.HeaderText = "创建时间";
this.colCreatTime.Name = "colCreatTime";
this.colCreatTime.ReadOnly = true;
this.colCreatTime.Width = 65;
this.colCreatTime.Width = 62;
//
// colChangePrice
//
@@ -1351,7 +1429,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
this.colStock.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colStock.Width = 65;
this.colStock.Width = 62;
//
// colRecevieArea
//
@@ -1361,7 +1439,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.colRecevieArea.Name = "colRecevieArea";
this.colRecevieArea.ReadOnly = true;
this.colRecevieArea.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colRecevieArea.Width = 65;
this.colRecevieArea.Width = 62;
//
// colMsg
//
@@ -1370,76 +1448,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.colMsg.ReadOnly = true;
this.colMsg.Width = 180;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.statusBar);
this.splitContainer4.Size = new System.Drawing.Size(1584, 26);
this.splitContainer4.SplitterDistance = 282;
this.splitContainer4.TabIndex = 3;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(0, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(282, 26);
this.ucSplitPage1.TabIndex = 5;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// btnClear
//
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(1204, 0);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1298, 26);
this.statusBar.TabIndex = 2;
//
// TemuJitForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1498,15 +1506,6 @@ namespace TemuKJD.KJDForms.ProductForms
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.PictureBox pbShopLoading;
private UserComponent.DataGridViewEx dgvShop;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private UserComponent.UcCheckBox chkSearchAllShop;
private System.Windows.Forms.PictureBox pbLoading;
private DevComponents.DotNetBar.PanelEx btnClear;
@@ -1552,6 +1551,21 @@ namespace TemuKJD.KJDForms.ProductForms
private DevComponents.DotNetBar.Controls.Line line3;
private DevComponents.DotNetBar.Controls.Line line2;
private DevComponents.DotNetBar.Controls.Line line1;
private DevComponents.DotNetBar.PanelEx btnSaveExtCodeJitConfig;
private DevComponents.DotNetBar.PanelEx btnRestoreJitParams;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelectExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colFilterExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitConfig;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colProdIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderId;
@@ -1574,10 +1588,5 @@ namespace TemuKJD.KJDForms.ProductForms
private System.Windows.Forms.DataGridViewLinkColumn colStock;
private System.Windows.Forms.DataGridViewLinkColumn colRecevieArea;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private DevComponents.DotNetBar.PanelEx btnSaveExtCodeJitConfig;
private DevComponents.DotNetBar.PanelEx btnRestoreJitParams;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelectExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colFilterExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitConfig;
}
}
+86 -24
View File
@@ -18,6 +18,7 @@ using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.KJDForms.AdminForms;
using TemuKJD.KJDForms.JITForms;
using TemuKJD.KJDForms.ProductForms.TemuJitSubForms;
using TemuKJD.KJDForms.ShopForms;
using TemuKJD.ToolForms;
@@ -27,7 +28,7 @@ namespace TemuKJD.KJDForms.ProductForms
{
public partial class TemuJitForm : BaseForm
{
public bool IsAdmin = false;
public bool IsClientJit { get; set; } = false;
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
public List<ShopLoginInfo> lstAdminShopInfo { get; set; } = new List<ShopLoginInfo>();
/// <summary>
@@ -50,7 +51,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// 期望到货区域列表
/// </summary>
public List<SkcReceiveAreaPickOutInfo> lstReceiveArea = new List<SkcReceiveAreaPickOutInfo>();
/// <summary>
/// 界面参数配置
/// </summary>
@@ -61,6 +62,8 @@ namespace TemuKJD.KJDForms.ProductForms
/// </summary>
List<OpenJitFullParams> lstOpenJitParams = null;
CheckBox chkSelectAll;
public TemuJitForm()
{
InitializeComponent();
@@ -68,21 +71,30 @@ namespace TemuKJD.KJDForms.ProductForms
private void TemuJitForm_Load(object sender, EventArgs e)
{
if (IsAdmin)
if (!IsClientJit)
{
ucSplitPage1.Visible = true;
this.colJitStatus.Visible = false;
}
else
{
ucSplitPage1.Visible = false;
this.colJitStatus.Visible = true;
}
this.dgvShop.AddSelectorColumn("colSelect");
//this.dgvShop.AddSelectorColumn("colSelect");
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
this.dgvOpenJit.AddSelectorColumn("colCheck");
var chkSelectExtCode = this.dgvExtCode.AddSelectorColumn("colSelectExtCode");
chkSelectExtCode.CheckedChanged += ChkSelectExtCode_CheckedChanged;
this.dgvOpenJit.AddSelectorColumn("colCheck");
this.dgvOpenJit.AddImgColumn("colProductSkcPic", "colImgUrl");
this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddMilliseconds(-1);
this.dtpStartTime.Value = DateTime.Now.Date.AddDays(-7);
if (IsAdmin)
if (!IsClientJit)
setJitConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<SetJitConfig>("admin_set_jit_config");
else
setJitConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<SetJitConfig>("set_jit_config");
@@ -113,6 +125,28 @@ namespace TemuKJD.KJDForms.ProductForms
lstOpenJitParams = new List<OpenJitFullParams>();
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
var list = lstAdminShopInfo.Where(s => s.LoginStatus2 == "国际版在线").ToList();
if (IsClientJit)
list = list.Where(s => s.LoginStatus2 == "国际版在线" && s.jit_expire_time >= DateTime.Now.Date).ToList();
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l.ShopId == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void Txt_TextChanged(object sender, EventArgs e)
{
setJitConfig.SearchNotes = this.txtNotes.Text.Trim();
@@ -124,7 +158,7 @@ namespace TemuKJD.KJDForms.ProductForms
setJitConfig.SearchExtCode = this.txtExtCode.Text.Trim();
setJitConfig.SearchDuration = this.chkSearchTime.Checked;
if (IsAdmin)
if (!IsClientJit)
NaiBa.Util.Helper.ConfigHelper.SaveConfig("admin_set_jit_config", setJitConfig);
else
NaiBa.Util.Helper.ConfigHelper.SaveConfig("set_jit_config", setJitConfig);
@@ -134,7 +168,7 @@ namespace TemuKJD.KJDForms.ProductForms
{
if (this.Visible)
{
if (IsAdmin)
if (!IsClientJit)
{
this.pbShopLoading.Visible = true;
SearchShop(this.ucSplitPage1.CurrentPage);
@@ -148,7 +182,7 @@ namespace TemuKJD.KJDForms.ProductForms
private void btnRefreshShop_Click(object sender, EventArgs e)
{
if (IsAdmin)
if (!IsClientJit)
{
if (this.ucSplitPage1.CurrentPage != 1)
this.ucSplitPage1.CurrentPage = 1;
@@ -216,6 +250,7 @@ namespace TemuKJD.KJDForms.ProductForms
shopEntity.ShopAccount,
shopEntity.Notes,
canUse ? "在线" : "掉线",
shopEntity.jit_expire_time >= DateTime.Now.Date ? "可用" : "失效",
canUse,
string.Empty
);
@@ -279,6 +314,7 @@ namespace TemuKJD.KJDForms.ProductForms
shop.ShopAccount,
shop.Notes,
canUse ? "在线" : "掉线",
shop.jit_expire_time >= DateTime.Now.Date ? "可用" : "失效",
canUse,
string.Empty
);
@@ -340,6 +376,11 @@ namespace TemuKJD.KJDForms.ProductForms
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
}
if (IsClientJit)
{
var jitRow = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId);
jitRow.Cells["colJitStatus"].Style.ForeColor = JitShopActiveForm.GetJitStatusStyleColor(shop);
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -350,7 +391,7 @@ namespace TemuKJD.KJDForms.ProductForms
string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
ShopLoginInfo shop = null;
if (IsAdmin)
if (!IsClientJit)
shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
else
shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
@@ -361,7 +402,7 @@ namespace TemuKJD.KJDForms.ProductForms
case "登录":
case "状态":
{
if (IsAdmin)
if (!IsClientJit)
{
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
@@ -401,9 +442,29 @@ namespace TemuKJD.KJDForms.ProductForms
}
}
break;
default:
case "":
if (IsClientJit)
{
if (shop != null && shop.jit_expire_time > DateTime.Now.Date)
{
if (shop.LoginStatus2 != "国际版在线")
{
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = false;
BaseMsgForm.ShowError("店铺未登录", "JIT-操作失败");
return;
}
}
else
{
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = false;
BaseMsgForm.ShowError("JIT卡密过期或未开通", "JIT-操作失败");
return;
}
}
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value;
break;
default:
break;
}
}
private void shopLoginForm_SaveComplete(object obj)
@@ -471,7 +532,7 @@ namespace TemuKJD.KJDForms.ProductForms
{
shopIndex++;
ShopLoginInfo shop = null;
if (IsAdmin)
if (!IsClientJit)
shop = lstAdminShopInfo.FirstOrDefault(s => shopId == s.ShopId);
else
shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => shopId == s.ShopId);
@@ -479,10 +540,10 @@ namespace TemuKJD.KJDForms.ProductForms
continue;
// 检测是否掉线
if (IsAdmin)
if (!IsClientJit)
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
else
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 != "国际版在线")
{
@@ -511,10 +572,10 @@ namespace TemuKJD.KJDForms.ProductForms
var searchRst = this.SearchForChainSupplier(shop, page, pageSize, null, searchSpuIds, searchExtCodes, type, startTime, endTime);
if (searchRst.Contains("登录过期") || searchRst.Contains("Invalid Login State"))
{
if (IsAdmin)
if (!IsClientJit)
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
else
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
Invoke(new Action(() =>
{
displayShopStatus(shop);
@@ -964,7 +1025,7 @@ Content-Disposition: form-data; name=""upload_sign""
string skcId = dgvOpenJit.Rows[e.RowIndex].Cells["colProdSkc"].Value.ParseToString();
string accountId = dgvOpenJit.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString();
ShopLoginInfo shop = null;
if (IsAdmin)
if (!IsClientJit)
shop = lstAdminShopInfo.FirstOrDefault(v => v.ShopId == accountId);
else
shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopId == accountId);
@@ -1090,6 +1151,7 @@ Content-Disposition: form-data; name=""upload_sign""
}
}
break;
case "库存":
case "修改库存":
{
var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId);
@@ -1490,7 +1552,7 @@ Content-Disposition: form-data; name=""upload_sign""
string skcId = dgvRow.Cells["colProdSkc"].Value.ParseToString();
string accountId = dgvRow.Cells["colSupplierId"].Value.ParseToString();
ShopLoginInfo shop = null;
if (IsAdmin)
if (!IsClientJit)
shop = lstAdminShopInfo.FirstOrDefault(v => v.ShopId == accountId);
else
shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopId == accountId);
@@ -2093,7 +2155,7 @@ Content-Disposition: form-data; name=""upload_sign""
{
shopIndex++;
ShopLoginInfo shop = null;
if (IsAdmin)
if (!IsClientJit)
shop = lstAdminShopInfo.FirstOrDefault(s => shopId == s.ShopId);
else
shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => shopId == s.ShopId);
@@ -2101,10 +2163,10 @@ Content-Disposition: form-data; name=""upload_sign""
continue;
// 检测是否掉线
if (IsAdmin)
if (!IsClientJit)
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
else
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 != "国际版在线")
{
@@ -2133,10 +2195,10 @@ Content-Disposition: form-data; name=""upload_sign""
var productReceiveAreaLstRst = this.GetProductReceiveAreaList(shop, page, pageSize);
if (productReceiveAreaLstRst.Contains("登录过期") || productReceiveAreaLstRst.Contains("Invalid Login State"))
{
if (IsAdmin)
if (!IsClientJit)
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
else
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
Invoke(new Action(() =>
{
displayShopStatus(shop);
@@ -144,6 +144,9 @@
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colJitStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -69,12 +69,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.lblProdName = new System.Windows.Forms.Label();
this.numCount = new System.Windows.Forms.NumericUpDown();
this.dgvSelectShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnCancel = new DevComponents.DotNetBar.PanelEx();
this.btnAddToSelectDb = new DevComponents.DotNetBar.PanelEx();
this.btnGetShop = new DevComponents.DotNetBar.PanelEx();
@@ -108,6 +102,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -468,19 +469,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.txtShopId);
this.panel2.Controls.Add(this.label8);
this.panel2.Location = new System.Drawing.Point(406, 53);
this.panel2.Location = new System.Drawing.Point(336, 53);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(508, 447);
this.panel2.Size = new System.Drawing.Size(606, 447);
this.panel2.TabIndex = 8;
this.panel2.Visible = false;
//
// lbxProdName
//
this.lbxProdName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lbxProdName.FormattingEnabled = true;
this.lbxProdName.ItemHeight = 17;
this.lbxProdName.Location = new System.Drawing.Point(19, 258);
this.lbxProdName.Name = "lbxProdName";
this.lbxProdName.Size = new System.Drawing.Size(468, 140);
this.lbxProdName.Size = new System.Drawing.Size(566, 140);
this.lbxProdName.TabIndex = 525;
//
// lblProdName
@@ -494,7 +497,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// numCount
//
this.numCount.Location = new System.Drawing.Point(297, 408);
this.numCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numCount.Location = new System.Drawing.Point(395, 408);
this.numCount.Maximum = new decimal(new int[] {
1000,
0,
@@ -515,6 +519,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.dgvSelectShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvSelectShop.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dgvSelectShop.AutoRowNumber = true;
this.dgvSelectShop.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -533,66 +539,24 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colSubUserName,
this.colShopId,
this.colShopName,
this.colShopNotes});
this.colShopNotes,
this.colJitStatus});
this.dgvSelectShop.Location = new System.Drawing.Point(17, 46);
this.dgvSelectShop.Name = "dgvSelectShop";
this.dgvSelectShop.ReadOnly = true;
this.dgvSelectShop.RowHeadersWidth = 28;
this.dgvSelectShop.RowTemplate.Height = 23;
this.dgvSelectShop.Size = new System.Drawing.Size(470, 184);
this.dgvSelectShop.Size = new System.Drawing.Size(568, 184);
this.dgvSelectShop.TabIndex = 504;
this.dgvSelectShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectShop_CellContentClick);
//
// colCheck
//
this.colCheck.HeaderText = "选择";
this.colCheck.MinimumWidth = 6;
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colUserName
//
this.colUserName.HeaderText = "用户名称";
this.colUserName.MinimumWidth = 6;
this.colUserName.Name = "colUserName";
this.colUserName.ReadOnly = true;
this.colUserName.Width = 90;
//
// colSubUserName
//
this.colSubUserName.HeaderText = "子账户名称";
this.colSubUserName.Name = "colSubUserName";
this.colSubUserName.ReadOnly = true;
this.colSubUserName.Visible = false;
this.colSubUserName.Width = 150;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "店铺备注";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancel.Location = new System.Drawing.Point(445, 408);
this.btnCancel.Location = new System.Drawing.Point(543, 408);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(42, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -613,11 +577,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// btnAddToSelectDb
//
this.btnAddToSelectDb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddToSelectDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddToSelectDb.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddToSelectDb.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddToSelectDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddToSelectDb.Location = new System.Drawing.Point(397, 408);
this.btnAddToSelectDb.Location = new System.Drawing.Point(495, 408);
this.btnAddToSelectDb.Name = "btnAddToSelectDb";
this.btnAddToSelectDb.Size = new System.Drawing.Size(42, 23);
this.btnAddToSelectDb.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -637,11 +602,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// btnGetShop
//
this.btnGetShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnGetShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnGetShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnGetShop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnGetShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGetShop.Location = new System.Drawing.Point(445, 13);
this.btnGetShop.Location = new System.Drawing.Point(543, 13);
this.btnGetShop.Name = "btnGetShop";
this.btnGetShop.Size = new System.Drawing.Size(42, 23);
this.btnGetShop.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -661,9 +627,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// txtShopName
//
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopName.Location = new System.Drawing.Point(279, 13);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(160, 23);
this.txtShopName.Size = new System.Drawing.Size(258, 23);
this.txtShopName.TabIndex = 433;
//
// label7
@@ -951,6 +919,57 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.statusBar.Size = new System.Drawing.Size(1278, 25);
this.statusBar.TabIndex = 5;
//
// colCheck
//
this.colCheck.HeaderText = "选择";
this.colCheck.MinimumWidth = 6;
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colUserName
//
this.colUserName.HeaderText = "用户名称";
this.colUserName.MinimumWidth = 6;
this.colUserName.Name = "colUserName";
this.colUserName.ReadOnly = true;
this.colUserName.Width = 90;
//
// colSubUserName
//
this.colSubUserName.HeaderText = "子账户名称";
this.colSubUserName.Name = "colSubUserName";
this.colSubUserName.ReadOnly = true;
this.colSubUserName.Visible = false;
this.colSubUserName.Width = 150;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "店铺备注";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
//
// colJitStatus
//
this.colJitStatus.HeaderText = "JIT状态";
this.colJitStatus.Name = "colJitStatus";
this.colJitStatus.ReadOnly = true;
this.colJitStatus.Visible = false;
//
// DbProductListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1024,12 +1043,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private DevComponents.DotNetBar.PanelEx btnBatchSelect;
private DevComponents.DotNetBar.PanelEx btnSearch;
private DevComponents.DotNetBar.PanelEx btnSelect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
private System.Windows.Forms.DataGridViewTextBoxColumn col_spu_id;
@@ -1053,5 +1066,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus;
}
}
@@ -19,6 +19,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.Extension;
using TemuKJD.KJDForms.JITForms;
using TemuKJD.KJDForms.ToolForms;
using TemuKJD.ToolForms;
using Work;
@@ -27,11 +28,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class DbProductListForm : LRBaseForm
{
public bool IsClientJit { get; set; } = false;
ShopLoginInfo shop = null; // 单店认领
List<ShopLoginInfo> lstAdminShopInfo = new List<ShopLoginInfo>(); // 服务端直传店铺列表
List<KJDDBProduct> lstTemuDbProduct = new List<KJDDBProduct>();
public bool IsAdmin { get; set; } = false;
public bool IsClientJit { get; set; } = false;
public DbProductListForm()
{
@@ -59,8 +60,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.cmbGroup.Visible = false;
this.btnImportHtml.Visible = false;
this.btnBatchSelect.Visible = false;
this.dgvSelectShop.Columns["colJitStatus"].Visible = false;
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
if (BaseClass.SaLevel == 1 && shop == null && !IsClientJit) // 一级管理员且不是选品状态
{
this.dgvDbProduct.Columns["col_delete"].Visible = true; // 删除
this.dgvDbProduct.Columns["col_edit"].Visible = true; // 编辑
@@ -76,7 +78,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.btnImportHtml.Visible = true; // 导入前端直采商品
this.btnBatchSelect.Visible = true; // 批量直传
}
else if (BaseClass.SaLevel > 1 && shop == null)
else if (BaseClass.SaLevel > 1 && shop == null && !IsClientJit)
{
this.dgvDbProduct.Columns["colHeadWords"].Visible = true; // 头词
this.dgvDbProduct.Columns["colEndWords"].Visible = true; // 尾词
@@ -87,6 +89,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.lblGroup.Visible = true; // 分组
this.cmbGroup.Visible = true; // 分组
}
if (IsClientJit)
{
this.dgvDbProduct.Columns["colSelectProd"].Visible = true; // 商品直传(不经过客户选品)
this.btnBatchSelect.Visible = true; // 批量直传
this.cmbGroup.Text = "jit分组";
this.dgvSelectShop.Columns["colJitStatus"].Visible = true;
}
btnSelect.Visible = false;
this.dgvDbProduct.Columns["col_select_product"].Visible = false;
@@ -418,7 +427,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
if (!isDbToDb)
BaseMsgForm.ShowError("认领商品不能为空!");
return "店铺不能为空!";
return "认领商品不能为空!";
}
Invoke(new Action(() =>
@@ -443,7 +452,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
continue;
}
if (selectShop.AddProductRemaining <= 0 && !isDbToDb) // 管理员发起的数据直传不消耗次数
if (selectShop.AddProductRemaining <= 0 && !isDbToDb) // 数据直传不消耗次数
{
Invoke(new Action(() =>
{
@@ -481,10 +490,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//{
// data += "&main_user_name=" + BaseClass.UserName;
//}
if (!isDbToDb) // 管理员发起的数据直传不消耗次数,不计算认领次数
if (!isDbToDb) // 数据直传不消耗次数,不计算认领次数
data += "&add_product_remaining=" + selectShop.AddProductRemaining;
data += "&add_fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName) +
"&status=待上传";
if (IsClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -1133,8 +1144,22 @@ namespace TemuKJD.KJDForms.ProductSelectForms
return;
string headerText = dgvSelectShop.Columns[e.ColumnIndex].HeaderText;
string shopId = dgvSelectShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
if (headerText == "选择")
{
if (IsClientJit)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop != null && shop.jit_expire_time > DateTime.Now.Date)
{
}
else
{
dgvSelectShop.Rows[e.RowIndex].Cells["colCheck"].Value = false;
BaseMsgForm.ShowError("JIT卡密过期或未开通", "JIT商品选品-操作失败");
return;
}
}
foreach (DataGridViewRow row in dgvSelectShop.Rows)
{
row.Cells["colCheck"].Value = false;
@@ -1162,10 +1187,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
void GetShop()
{
this.pbLoading.Visible = true;
this.dgvSelectShop.Rows.Clear();
var list = GlobalConfig.ShopLoginList.Where(s => s.ShopId.Contains(txtShopId.Text.Trim()) && s.ShopAccount.Contains(txtShopName.Text.Trim())).Take(10).ToList();
foreach (var shop in lstAdminShopInfo)
string searchShopId = txtShopId.Text.Trim();
string searchShopAccount = txtShopName.Text.Trim();
var list = GlobalConfig.ShopLoginList
.Where(s => (searchShopId.IsNullOrEmpty() || s.ShopId.Contains(searchShopId)) &&
(searchShopAccount.IsNullOrEmpty() || s.ShopAccount.Contains(searchShopAccount)))
.Where(s => !s.ShopId.IsNullOrEmpty())
.ToList();
foreach (var shop in list)
{
Invoke(new Action(() =>
{
@@ -1175,11 +1205,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
shop.SubUserName,
shop.ShopId,
shop.ShopAccount,
shop.Notes);
if (rowIndex == 0)
shop.Notes
);
if (!IsClientJit && rowIndex == 0)
{
this.dgvSelectShop.Rows[rowIndex].Cells["colCheck"].Value = true;
}
if (IsClientJit)
{
this.dgvSelectShop.Rows[rowIndex].Cells["colJitStatus"].Value = JitShopActiveForm.GetJitStatus(shop);
this.dgvSelectShop.Rows[rowIndex].Cells["colJitStatus"].Style.ForeColor = JitShopActiveForm.GetJitStatusStyleColor(shop);
}
}));
}
}
@@ -1193,7 +1229,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
int pageCount;
var list = AdminForms.AdminShopListForm.Instance.AdminGetServerShopLst(out pageCount, "", "", "",
txtShopId.Text.Trim(), txtShopName.Text.Trim(), 1, 10);
txtShopId.Text.Trim(), txtShopName.Text.Trim(), 1, 20);
lstAdminShopInfo.AddRange(list);
foreach (var shop in lstAdminShopInfo)
@@ -1231,6 +1267,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var selectUserNames = this.dgvSelectShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).Select(r => r.Cells["colUserName"].Value.ParseToString()).ToList();
var selectShopLst = lstAdminShopInfo.Where(s => selectShopIds.Contains(s.ShopId) && selectUserNames.Contains(s.UserName)).ToList();
if (IsClientJit)
selectShopLst = GlobalConfig.ShopLoginList.Where(s => selectShopIds.Contains(s.ShopId) && selectUserNames.Contains(s.UserName)).ToList();
if (selectShopLst.Count <= 0)
{
BaseMsgForm.ShowError("未选择店铺!");
@@ -135,6 +135,9 @@
<metadata name="colShopNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colJitStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -18,6 +18,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class DbProductSelectEditNotesForm : LRBaseForm
{
public bool IsClientJit { get; set; } = false;
TemuDBProductSelect dbProdSelect = null;
SetProductSelectNotesType selectNotesType;
@@ -68,6 +70,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&notes=" + this.txtNotes.Text.Trim();
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
if (IsClientJit)
data += "&is_client_jit=true";
if (selectNotesType == SetProductSelectNotesType.DbProduct)
{
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(txtProdName.Text.Trim());
File diff suppressed because it is too large. Load diff
@@ -33,6 +33,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class DbProductSelectListManageForm : LRBaseForm
{
public bool IsClientJit { get; set; } = false;
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
List<string> skuRandomLetterArr = new List<string> { "~", "#", "¥", "%", "&", "*", "(", ")", "(", ")", "+", "-", "_", "=", "【", "】", "·", "|", "《", "》" };
@@ -120,41 +121,107 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private void DbProductSelectListForm_Load(object sender, EventArgs e)
{
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
this.dgvSelectProduct.AddSelectorColumn("colSelect");
//var chkSel = this.dgvSelectProduct.AddSelectorColumn("colSelect");
var chkSel = this.dgvSelectProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSel.CheckedChanged += ChkSel_CheckedChanged;
this.dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
dgvSelectProduct.Columns["colSubSaNick"].Visible = false;
dgvSelectProduct.Columns["colDelete"].Visible = false;
chkShowDel.Visible = false;
btnReFission.Visible = false;
btnSetSubSa.Visible = false;
chkNoSubSa.Visible = false;
btnReFission.Visible = false;
tableLayoutPanel1.Width += 86;
chkUploadProd.Visible = false; // 直接上传
flowLayoutPanel1.Visible = false; // 一些测试操作项目显示在此处
chkUploadProd.Visible = true;
flowLayoutPanel1.Visible = true;
if (BaseClass.SaLevel == 1)
if (BaseClass.SaLevel == 1 && !IsClientJit)
{
dgvSelectProduct.Columns["colSubSaNick"].Visible = true;
chkShowDel.Visible = true;
btnReFission.Visible = true;
btnSetSubSa.Visible = true;
chkNoSubSa.Visible = true;
btnReFission.Visible = true;
tableLayoutPanel1.Width -= 86;
//chkReFissionAllProdName.Checked = true;
//chkRandomSkuOrder.Checked = true;
//chkSkuRandomPrice.Checked = true;
}
if (IsClientJit)
{
chkShowDel.Visible = true;
btnReFission.Visible = true;
cmbUserNotes.Visible = false;
lblUserNotes.Visible = false;
colUserNotes.Visible = false;
var columnStyles = tableLayoutPanel1.ColumnStyles.Cast<ColumnStyle>().ToList();
columnStyles[columnStyles.Count - 1].SizeType = SizeType.Absolute;
columnStyles[columnStyles.Count - 1].Width = 0;
columnStyles[columnStyles.Count - 2].SizeType = SizeType.Absolute;
columnStyles[columnStyles.Count - 2].Width = 0;
int colsWidth = 0;
foreach(DataGridViewColumn col in dgvSelectProduct.Columns)
{
if (col.Visible)
{
colsWidth += col.Width;
}
}
if (dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth > 0)
{
colOpResult.Width += dgvSelectProduct.Width - colsWidth - dgvSelectProduct.RowHeadersWidth;
}
}
this.lblSkuRandomLetterNotes.Text = "备注:SKU特殊字符包括 " + string.Join(" ", skuRandomLetterArr) + " ";
}
private void ChkSel_CheckedChanged(object sender, EventArgs e)
{
var chkSelectAll = sender as CheckBox;
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvSelectProduct.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
if (IsClientJit)
{
foreach (DataGridViewRow row in dgvSelectProduct.Rows)
{
var shopId = row.Cells["colSupplierId"].Value.ParseToString();
var clientShop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (clientShop != null && clientShop.jit_expire_time >= DateTime.Now.Date)
{
row.Cells["colSelect"].Value = true;
}
}
}
else
{
foreach (DataGridViewRow row in dgvSelectProduct.Rows)
{
row.Cells["colSelect"].Value = true;
}
}
}
}
bool isFirst = true;
private void DbProductSelectListManageForm_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible == true)
if (this.Visible == true && isFirst)
{
isFirst = false;
this.pbLoading.Visible = true;
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
}
@@ -246,6 +313,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms
dgvSelectProduct.Rows[rowIndex].Height = 60;
displayLoginStatusColor(dgvSelectProduct.Rows[rowIndex].Cells["colLogin"], dgvSelectProduct.Rows[rowIndex].Cells["colLogin"].Value.ParseToString());
if (IsClientJit)
{
var clientShop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prodSelect.shop_id);
if (clientShop == null || clientShop.jit_expire_time.IsNullOrEmpty() || clientShop.jit_expire_time < DateTime.Now.Date)
{
dgvSelectProduct.Rows[rowIndex].DefaultCellStyle.ForeColor = Color.LightGray;
}
}
}));
}
@@ -286,6 +361,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
data += "&operate_sub_sa_name=" + BaseClass.UserName;
if (chkNoSubSa.Checked)
data += "&no_sub_sa=true";
if (IsClientJit)
data += "&is_client_jit=true";
}));
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -333,6 +410,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.cmbStatus.Text = "待上传";
this.cmbNotes.Text = "全部";
this.cmbUserNotes.Text = "全部";
this.chkNoSubSa.Checked = false;
}
private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -343,7 +421,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var dbId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSelectId"].Value.ParseToString();
var dbSelectProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == dbId);
var shopId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString();
var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString();
var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString();
if (IsClientJit)
{
var clientShop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (clientShop == null || clientShop.jit_expire_time.IsNullOrEmpty() || clientShop.jit_expire_time < DateTime.Now.Date)
{
BaseMsgForm.ShowError("JIT卡密过期或未开通", "JIT商品上传-操作失败");
return;
}
}
switch (headerText)
{
@@ -358,6 +446,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
break;
case "编辑备注":
DbProductSelectEditNotesForm editForm = new DbProductSelectEditNotesForm(dbSelectProduct);
editForm.IsClientJit = this.IsClientJit;
editForm.ShowDialog();
dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes;
dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = dbSelectProduct.user_notes;
@@ -373,57 +462,68 @@ namespace TemuKJD.KJDForms.ProductSelectForms
case "草稿箱Id":
if (!string.IsNullOrEmpty(draftId))
{
var shop = GetShop(shopId);
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
draftId + "&from=productDraftList";
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.ShowDialog();
return;
var url = BaseClass.BuildObjString("product/get_select_product_map_draft_id_list");
var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
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) || !html.Contains("\"code\":200"))
{
}
else
if (!IsClientJit)
{
var shop = GetShop(shopId);
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" +
draftId + "&from=productDraftList";
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.ShowDialog();
}
// 查看map映射列表
//return;
//var url = BaseClass.BuildObjString("product/get_select_product_map_draft_id_list");
//var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId;
//if (IsClientJit)
// data += "&is_client_jit=true";
//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) || !html.Contains("\"code\":200"))
//{
//}
//else
//{
//}
}
break;
case "进店":
{
var shop = GetShop(shopId);
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft";
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.ShowDialog();
if (!IsClientJit)
{
var shop = GetShop(shopId);
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft";
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.ShowDialog();
}
}
break;
case "登录":
{
var shop = GetShop(shopId);
// 登录店铺
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
if (!IsClientJit)
{
if (row.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId)
var shop = GetShop(shopId);
// 登录店铺
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
{
row.Cells["colLogin"].Value = shop.LoginStatus2 == "国际版在线" ? "在线" : "登录";
displayLoginStatusColor(row.Cells["colLogin"], row.Cells["colLogin"].Value.ParseToString());
if (row.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId)
{
row.Cells["colLogin"].Value = shop.LoginStatus2 == "国际版在线" ? "在线" : "登录";
displayLoginStatusColor(row.Cells["colLogin"], row.Cells["colLogin"].Value.ParseToString());
}
}
}
}
@@ -503,6 +603,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
if (IsClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -599,6 +701,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
});
}
int timeOutSeconds = 120;
void AddProductDraft(TemuDBProductSelect[] prodSelect)
{
if (prodSelect == null || prodSelect.Count() == 0)
@@ -697,6 +800,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&status=已清除";
if (IsClientJit)
empty_data += "&is_client_jit=true";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -710,20 +815,28 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
var result = "";
try
var t = Task.Run(() =>
{
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
try
{
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
result = UploadProduct(shop, temuDBProd, prod, row.Cells["colOpResult"]); //将商品上传至草稿箱
if (result.Contains("登录过期") || result.Contains("Invalid Login State"))
{
AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false);
}
}
}
catch (Exception ex)
catch (Exception ex)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}";
}
});
t.Wait(timeOutSeconds * 1000);
if (!t.IsCompleted)
{
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}";
result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"上传超时\"}";
}
Thread.Sleep(200);
Thread.Sleep(Randomx.GetId(200, 500));
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (!result.Contains("\"success\":true"))
@@ -746,6 +859,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
"&status=" + prod.status;
if (IsClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -3055,6 +3170,8 @@ Content-Disposition: form-data; name=""sign""
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&status=已清除";
if (IsClientJit)
empty_data += "&is_client_jit=true";
GetHtml.PostUtf8(empty_url, empty_data);
}
@@ -3075,6 +3192,8 @@ Content-Disposition: form-data; name=""sign""
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id;
data += "&fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName.Trim());
if (IsClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -3293,5 +3412,10 @@ Content-Disposition: form-data; name=""sign""
this.btnAdd.Enabled = true;
}
}
private void numMaxWaitSecond_ValueChanged(object sender, EventArgs e)
{
this.timeOutSeconds = numMaxWaitSecond.Value.ParseToInt();
}
}
}
File diff suppressed because it is too large. Load diff
@@ -80,10 +80,12 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
}
bool isFirst = true;
private void ProductThirdSelectListManageForm_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible == true)
if (this.Visible == true && isFirst)
{
isFirst = false;
this.pbLoading.Visible = true;
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
}
@@ -598,6 +598,11 @@ namespace TemuKJD.KJDForms.ShopForms
}
}
public void CheckShopLogin(ShopLoginInfo[] shops, bool isShowProgress = true)
{
CheckShopLogin(shops.Select(s => s.LoginName).Distinct().ToArray(), isShowProgress);
}
public void CheckShopLogin(string[] shopNames, bool isShowProgress = true)
{
for (int i = 0; i < shopNames.Length; i++)