优化客服统计功能

This commit is contained in:
wule committed 2026-02-05 19:32:45 +08:00
1 parent a2a6719a99
commit 4fd8d9cc17
17 files changed
+1218 -471

No files matched your search

+174 -173
View File
@@ -32,12 +32,12 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkImgRandomBlock = new TemuKJD.UserComponent.UcCheckBox(this.components);
@@ -107,6 +107,7 @@ namespace TemuKJD.WXForms.ProductForms
this.txtAddCount = new System.Windows.Forms.TextBox();
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshAuthor = new DevComponents.DotNetBar.PanelEx();
this.btnSelectOffline = new DevComponents.DotNetBar.PanelEx();
this.btnSelectOnline = new DevComponents.DotNetBar.PanelEx();
this.btnAddUnSelect = new DevComponents.DotNetBar.PanelEx();
@@ -124,19 +125,6 @@ namespace TemuKJD.WXForms.ProductForms
this.btnRefreshNum = new DevComponents.DotNetBar.PanelEx();
this.pbLoadingShop = new System.Windows.Forms.PictureBox();
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.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colApi = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.并发上传 = new DevComponents.DotNetBar.PanelEx();
this.label11 = new System.Windows.Forms.Label();
@@ -170,7 +158,19 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.panel1 = new System.Windows.Forms.Panel();
this.btnRefreshAuthor = new DevComponents.DotNetBar.PanelEx();
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.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colApi = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -1206,6 +1206,30 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
// btnRefreshAuthor
//
this.btnRefreshAuthor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshAuthor.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshAuthor.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshAuthor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshAuthor.Location = new System.Drawing.Point(81, 17);
this.btnRefreshAuthor.Name = "btnRefreshAuthor";
this.btnRefreshAuthor.Size = new System.Drawing.Size(70, 20);
this.btnRefreshAuthor.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshAuthor.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshAuthor.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshAuthor.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshAuthor.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshAuthor.Style.GradientAngle = 90;
this.btnRefreshAuthor.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshAuthor.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.TabIndex = 800;
this.btnRefreshAuthor.Text = "刷新授权";
this.btnRefreshAuthor.Click += new System.EventHandler(this.btnRefreshAuthor_Click);
//
// btnSelectOffline
//
this.btnSelectOffline.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -1529,19 +1553,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
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)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1567,110 +1591,6 @@ namespace TemuKJD.WXForms.ProductForms
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;
//
// 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.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 66;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "备注";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 66;
//
// colSelectProduct
//
this.colSelectProduct.HeaderText = "选择商品";
this.colSelectProduct.Name = "colSelectProduct";
this.colSelectProduct.ReadOnly = true;
this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelectProduct.Visible = false;
this.colSelectProduct.Width = 62;
//
// 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;
//
// colApi
//
this.colApi.HeaderText = "Api";
this.colApi.Name = "colApi";
this.colApi.ReadOnly = true;
this.colApi.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;
//
// colUploadCount
//
this.colUploadCount.HeaderText = "已传";
this.colUploadCount.Name = "colUploadCount";
this.colUploadCount.ReadOnly = true;
this.colUploadCount.Width = 38;
//
// colOnSaleNum
//
this.colOnSaleNum.HeaderText = "在售";
this.colOnSaleNum.Name = "colOnSaleNum";
this.colOnSaleNum.ReadOnly = true;
this.colOnSaleNum.Visible = false;
this.colOnSaleNum.Width = 38;
//
// colRemaining
//
this.colRemaining.HeaderText = "月限额";
this.colRemaining.Name = "colRemaining";
this.colRemaining.ReadOnly = true;
this.colRemaining.Visible = false;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
@@ -1713,7 +1633,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(8, 26);
this.label11.Location = new System.Drawing.Point(8, 34);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(68, 17);
@@ -1724,7 +1644,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtSinglePriceAdd
//
this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtSinglePriceAdd.Location = new System.Drawing.Point(76, 23);
this.txtSinglePriceAdd.Location = new System.Drawing.Point(76, 31);
this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.txtSinglePriceAdd.Name = "txtSinglePriceAdd";
this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23);
@@ -1748,19 +1668,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.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.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1820,8 +1740,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -1899,8 +1819,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle12;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -2062,29 +1982,110 @@ namespace TemuKJD.WXForms.ProductForms
this.panel1.Size = new System.Drawing.Size(881, 86);
this.panel1.TabIndex = 189;
//
// btnRefreshAuthor
// colSelect
//
this.btnRefreshAuthor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshAuthor.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshAuthor.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshAuthor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshAuthor.Location = new System.Drawing.Point(81, 17);
this.btnRefreshAuthor.Name = "btnRefreshAuthor";
this.btnRefreshAuthor.Size = new System.Drawing.Size(70, 20);
this.btnRefreshAuthor.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshAuthor.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshAuthor.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshAuthor.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshAuthor.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshAuthor.Style.GradientAngle = 90;
this.btnRefreshAuthor.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshAuthor.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshAuthor.TabIndex = 800;
this.btnRefreshAuthor.Text = "刷新授权";
this.btnRefreshAuthor.Click += new System.EventHandler(this.btnRefreshAuthor_Click);
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;
//
// 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.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 66;
//
// colShopNotes
//
this.colShopNotes.HeaderText = "备注";
this.colShopNotes.Name = "colShopNotes";
this.colShopNotes.ReadOnly = true;
this.colShopNotes.Width = 66;
//
// colSelectProduct
//
this.colSelectProduct.HeaderText = "选择商品";
this.colSelectProduct.Name = "colSelectProduct";
this.colSelectProduct.ReadOnly = true;
this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelectProduct.Visible = false;
this.colSelectProduct.Width = 62;
//
// 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;
//
// colApi
//
this.colApi.HeaderText = "Api";
this.colApi.Name = "colApi";
this.colApi.ReadOnly = true;
this.colApi.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colApi.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;
//
// colUploadCount
//
this.colUploadCount.HeaderText = "已传";
this.colUploadCount.Name = "colUploadCount";
this.colUploadCount.ReadOnly = true;
this.colUploadCount.Width = 38;
//
// colOnSaleNum
//
this.colOnSaleNum.HeaderText = "在售";
this.colOnSaleNum.Name = "colOnSaleNum";
this.colOnSaleNum.ReadOnly = true;
this.colOnSaleNum.Visible = false;
this.colOnSaleNum.Width = 38;
//
// colRemaining
//
this.colRemaining.HeaderText = "月限额";
this.colRemaining.Name = "colRemaining";
this.colRemaining.ReadOnly = true;
this.colRemaining.Visible = false;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// WXDBProdUploadForm
//
@@ -2255,6 +2256,7 @@ namespace TemuKJD.WXForms.ProductForms
private DevComponents.DotNetBar.PanelEx btnAddSelect;
private DevComponents.DotNetBar.PanelEx btnSelectOffline;
private DevComponents.DotNetBar.PanelEx btnSelectOnline;
private DevComponents.DotNetBar.PanelEx btnRefreshAuthor;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
@@ -2268,6 +2270,5 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colOnSaleNum;
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private DevComponents.DotNetBar.PanelEx btnRefreshAuthor;
}
}
@@ -80,9 +80,9 @@ namespace TemuKJD.WXForms.ProductForms
if (lstAddPriceRule == null)
{
lstAddPriceRule = new NaiBa.Util.ConcurrentList<AddPriceRule>();
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 0, LessThanPrice = 10, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 });
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 10, LessThanPrice = 20, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 });
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 20, LessThanPrice = 999, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 });
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 0, LessThanPrice = 10, AddPriceTimes = 2, AddMorePrice = 10, SinglePriceAdd = 1 });
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 10, LessThanPrice = 20, AddPriceTimes = 2, AddMorePrice = 10, SinglePriceAdd = 1 });
lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 20, LessThanPrice = 999, AddPriceTimes = 2, AddMorePrice = 10, SinglePriceAdd = 1 });
}
this.fPnlPriceRule.Controls.Clear();
foreach (var priceItem in lstAddPriceRule)
@@ -265,19 +265,27 @@ namespace TemuKJD.WXForms.ProductForms
{
updateAuthor(true);
}
private void updateAuthor(bool refreshAll = false)
/// <summary>
/// 升级授权
/// </summary>
/// <param name="idRefreshTodayHasGet">今日取过的也取</param>
private void updateAuthor(bool idRefreshTodayHasGet = false)
{
this.pbLoadingShop.Visible = true;
Task.Run(() =>
{
// 店铺Id
var updateIds = dgvShop.Rows.Cast<DataGridViewRow>().Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (idRefreshTodayHasGet == true)
updateIds = selectIds;
List<Task> tList = new List<Task>();
if (refreshAll)
lstShopAuthInfo.Clear();
foreach (var shop in GlobalConfig.ShopLoginList.Where(s => selectIds.Contains(s.ShopId)))
if (idRefreshTodayHasGet)
lstShopAuthInfo.RemoveAll(s => updateIds.Contains(s.ShopId));
foreach (var shop in GlobalConfig.ShopLoginList.Where(s => updateIds.Contains(s.ShopId)))
{
Invoke(new Action(() => { BindShop(shop, selectIds, ""); }));
var t = Task.Run(() =>
@@ -291,7 +299,7 @@ namespace TemuKJD.WXForms.ProductForms
}
var authInfo = lstShopAuthInfo.FirstOrDefault(sa => sa.ShopId == shop.ShopId);
if (refreshAll || authInfo == null || authInfo.AddTime.Date != DateTime.Now.Date)
if (idRefreshTodayHasGet || authInfo == null || authInfo?.AddTime.Date != DateTime.Now.Date)
{
lstShopAuthInfo.RemoveAll(sa => sa.ShopId == shop.ShopId);
var rst = WXUpload.GetApiServiceList(shop);
@@ -311,6 +319,7 @@ namespace TemuKJD.WXForms.ProductForms
foreach (var itemObj in JsonHelper.JObjectParse(rst)["itemList"])
{
// 找到了指定服务
if (itemObj["serviceName"].ParseToString() == "店统领供应链-商品管理")
{
var expiresTick = itemObj["expireTime"].ParseToLong();
@@ -319,14 +328,13 @@ namespace TemuKJD.WXForms.ProductForms
return;
}
}
// 没找到指定服务
lstShopAuthInfo.Add(new AuthInfo() { ShopId = shop.ShopId, AddTime = DateTime.Now, ExpiresTime = DateTime.Now });
}
if (refreshAll)
Invoke(new Action(() => { BindShop(shop, selectIds, "已查询"); }));
}
}
catch (Exception ex)
{
}
});
tList.Add(t);
@@ -2463,6 +2471,10 @@ namespace TemuKJD.WXForms.ProductForms
//书籍属性处理
if (upProdParam.product.info.category.FirstOrDefault()?.name == "图书" || prodInfo.detail.cats.FirstOrDefault() == "书籍/杂志/报纸")
{
//if (attr.name == "ISBN版号/CN刊号")
// attrValue = "9787922575016";
//if (attr.name == "书名")
// attrValue = upProdParam.product.info.title;
if (attr.name == "是否为单一书号丛书")
attrValue = "是";
if (attr.name == "图书册数")
@@ -3083,7 +3095,13 @@ namespace TemuKJD.WXForms.ProductForms
dicShopUpload[shop.ShopId] = new WxShopUploadInfo();
if (!dicShopUpload[shop.ShopId].DicDayUploadCount.ContainsKey(day))
dicShopUpload[shop.ShopId].DicDayUploadCount[day] = 0;
dicShopUpload[shop.ShopId].DicDayUploadCount[day]++;
dicShopUpload[shop.ShopId].DicDayUploadCount[day] += 1;
// 删除45天前的记录
var removeKeys = dicShopUpload[shop.ShopId].DicDayUploadCount.Keys.Where(s => s < DateTime.Now.AddDays(-45).ToString("yyyyMMdd").ParseToInt());
foreach (var key in removeKeys)
{
dicShopUpload[shop.ShopId].DicDayUploadCount.Remove(key);
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_shop_upload_info", dicShopUpload);
Invoke(new Action(() =>
@@ -3561,12 +3579,17 @@ namespace TemuKJD.WXForms.ProductForms
if (dgvShopRow != null)
{
var day = DateTime.Now.ToString("yyyyMMdd").ParseToInt();
var removeDay = DateTime.Now.Date.AddMonths(-1).ToString("yyyyMMdd").ParseToInt();
if (!dicShopUpload.ContainsKey(shop.ShopId))
dicShopUpload[shop.ShopId] = new WxShopUploadInfo();
if (!dicShopUpload[shop.ShopId].DicDayUploadCount.ContainsKey(day))
dicShopUpload[shop.ShopId].DicDayUploadCount[day] = 0;
dicShopUpload[shop.ShopId].DicDayUploadCount[day]++;
dicShopUpload[shop.ShopId].DicDayUploadCount[day] += 1;
// 删除45天前的记录
var removeKeys = dicShopUpload[shop.ShopId].DicDayUploadCount.Keys.Where(s => s < DateTime.Now.AddDays(-45).ToString("yyyyMMdd").ParseToInt());
foreach (var key in removeKeys)
{
dicShopUpload[shop.ShopId].DicDayUploadCount.Remove(key);
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_shop_upload_info", dicShopUpload);
Invoke(new Action(() =>
@@ -4163,15 +4186,15 @@ Content-Type: application/octet-stream
/// <summary>
/// 加价倍数
/// </summary>
public decimal AddPriceTimes { get; set; }
public decimal AddPriceTimes { get; set; } = 2m;
/// <summary>
/// 额外加价金额
/// </summary>
public decimal AddMorePrice { get; set; }
public decimal AddMorePrice { get; set; } = 10m;
/// <summary>
/// 单买加价
/// </summary>
public decimal SinglePriceAdd { get; set; }
public decimal SinglePriceAdd { get; set; } = 1m;
/// <summary>
/// 先加后乘
/// </summary>
@@ -4179,7 +4202,7 @@ Content-Type: application/octet-stream
/// <summary>
/// 上货库存量设置
/// </summary>
public int StockNum { get; set; } = 0;
public int StockNum { get; set; } = 999;
public bool IsStepAddPrice { get; set; } = false;
/// <summary>
/// 运费倍率
@@ -4191,7 +4214,7 @@ Content-Type: application/octet-stream
{
public int PreSaleDays { get; set; } = 5;
public string FilterWords { get; set; } = "亏本,冲量,白菜价,跳楼价,xx,xxx,最大,最小,低价,降价,成本,赔钱,甩卖,真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草";
public string FilterWords { get; set; } = "二手,亏本,冲量,白菜价,跳楼价,xx,xxx,最大,最小,低价,降价,成本,赔钱,甩卖,真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草";
public int SkuMinPrice { get; set; } = 10;