批量直传功能 jit配置保存到货号功能(30%)

This commit is contained in:
wule committed 2025-11-20 16:39:31 +08:00
1 parent b23eb0e497
commit 6865064eca
8 files changed
+691 -516

No files matched your search

+214 -157
View File
@@ -40,38 +40,34 @@ namespace TemuKJD.KJDForms.ProductSelectForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnBatchSelect = new DevComponents.DotNetBar.PanelEx();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.btnSelect = new DevComponents.DotNetBar.PanelEx();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.lblGroup = new System.Windows.Forms.Label();
this.btnImportHtml = new DevComponents.DotNetBar.PanelEx();
this.cmbSort = new System.Windows.Forms.ComboBox();
this.btnSelect = new TemuKJD.UserControls.ButtonEx();
this.txtNotes = new System.Windows.Forms.TextBox();
this.lblNotes = new System.Windows.Forms.Label();
this.txtSPU = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
this.btnSearch = new TemuKJD.UserControls.ButtonEx();
this.txtExtCode = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtProdName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtCat = new System.Windows.Forms.TextBox();
this.txtSKC = 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();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel2 = new System.Windows.Forms.Panel();
this.lbxProdName = new System.Windows.Forms.ListBox();
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();
@@ -104,6 +100,12 @@ 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();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -130,17 +132,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnBatchSelect);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
this.splitContainer1.Panel1.Controls.Add(this.cmbGroup);
this.splitContainer1.Panel1.Controls.Add(this.lblGroup);
this.splitContainer1.Panel1.Controls.Add(this.btnImportHtml);
this.splitContainer1.Panel1.Controls.Add(this.cmbSort);
this.splitContainer1.Panel1.Controls.Add(this.btnSelect);
this.splitContainer1.Panel1.Controls.Add(this.txtNotes);
this.splitContainer1.Panel1.Controls.Add(this.lblNotes);
this.splitContainer1.Panel1.Controls.Add(this.txtSPU);
this.splitContainer1.Panel1.Controls.Add(this.label5);
this.splitContainer1.Panel1.Controls.Add(this.pnlEmpty);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.txtExtCode);
this.splitContainer1.Panel1.Controls.Add(this.label4);
this.splitContainer1.Panel1.Controls.Add(this.txtProdName);
@@ -158,11 +161,85 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.splitContainer1.SplitterDistance = 70;
this.splitContainer1.TabIndex = 1;
//
// txtGroup
// btnBatchSelect
//
this.btnBatchSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBatchSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBatchSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBatchSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchSelect.Location = new System.Drawing.Point(801, 38);
this.btnBatchSelect.Name = "btnBatchSelect";
this.btnBatchSelect.Size = new System.Drawing.Size(91, 23);
this.btnBatchSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnBatchSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnBatchSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnBatchSelect.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnBatchSelect.Style.GradientAngle = 90;
this.btnBatchSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchSelect.TabIndex = 510;
this.btnBatchSelect.Text = "批量商品直传";
this.btnBatchSelect.Click += new System.EventHandler(this.btnBatchSelect_Click);
//
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(647, 9);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 23);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearch.Style.GradientAngle = 90;
this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.TabIndex = 499;
this.btnSearch.Text = "搜索";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// btnSelect
//
this.btnSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelect.Location = new System.Drawing.Point(1178, 9);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(91, 23);
this.btnSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSelect.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSelect.Style.GradientAngle = 90;
this.btnSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSelect.TabIndex = 495;
this.btnSelect.Text = "认领选中商品";
this.btnSelect.Visible = false;
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
//
// cmbGroup
//
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Location = new System.Drawing.Point(361, 37);
this.cmbGroup.Name = "txtGroup";
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(121, 25);
this.cmbGroup.TabIndex = 500;
//
@@ -181,9 +258,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.btnImportHtml.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImportHtml.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImportHtml.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImportHtml.Location = new System.Drawing.Point(950, 7);
this.btnImportHtml.Location = new System.Drawing.Point(801, 9);
this.btnImportHtml.Name = "btnImportHtml";
this.btnImportHtml.Size = new System.Drawing.Size(91, 26);
this.btnImportHtml.Size = new System.Drawing.Size(91, 23);
this.btnImportHtml.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnImportHtml.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImportHtml.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -205,30 +282,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"认领总数"});
this.cmbSort.Location = new System.Drawing.Point(833, 8);
this.cmbSort.Location = new System.Drawing.Point(520, 37);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(79, 25);
this.cmbSort.Size = new System.Drawing.Size(121, 25);
this.cmbSort.TabIndex = 448;
this.cmbSort.Text = "入库时间";
//
// btnSelect
//
this.btnSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSelect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelect.ForeColor = System.Drawing.Color.White;
this.btnSelect.Location = new System.Drawing.Point(1171, 7);
this.btnSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(91, 26);
this.btnSelect.TabIndex = 444;
this.btnSelect.Text = "认领选中商品";
this.btnSelect.UseVisualStyleBackColor = false;
this.btnSelect.Visible = false;
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
//
// txtNotes
//
this.txtNotes.Location = new System.Drawing.Point(202, 38);
@@ -261,23 +320,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.label5.TabIndex = 435;
this.label5.Text = "SPU:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(169, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 433;
this.label1.Text = "SKC:";
//
// pnlEmpty
//
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlEmpty.Location = new System.Drawing.Point(709, 7);
this.pnlEmpty.Location = new System.Drawing.Point(709, 9);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 26);
this.pnlEmpty.Size = new System.Drawing.Size(56, 23);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -294,22 +344,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.pnlEmpty.Text = "清空条件";
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.Location = new System.Drawing.Point(648, 7);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 26);
this.btnSearch.TabIndex = 424;
this.btnSearch.Text = "搜索";
this.btnSearch.UseVisualStyleBackColor = false;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// txtExtCode
//
this.txtExtCode.Location = new System.Drawing.Point(44, 38);
@@ -333,32 +367,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.txtProdName.Size = new System.Drawing.Size(121, 23);
this.txtProdName.TabIndex = 427;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(486, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 428;
this.label3.Text = "标题:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(327, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 426;
this.label2.Text = "类目:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(776, 12);
this.label6.Location = new System.Drawing.Point(486, 41);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(68, 17);
this.label6.Size = new System.Drawing.Size(44, 17);
this.label6.TabIndex = 449;
this.label6.Text = "排序方式:";
this.label6.Text = "排序:";
//
// txtCat
//
@@ -374,6 +390,33 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.txtSKC.Size = new System.Drawing.Size(121, 23);
this.txtSKC.TabIndex = 432;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(169, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 433;
this.label1.Text = "SKC:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(327, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 426;
this.label2.Text = "类目:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(486, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 428;
this.label3.Text = "标题:";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -412,6 +455,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.lbxProdName);
this.panel2.Controls.Add(this.lblProdName);
this.panel2.Controls.Add(this.numCount);
this.panel2.Controls.Add(this.dgvSelectShop);
@@ -422,23 +466,33 @@ 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, 54);
this.panel2.Location = new System.Drawing.Point(406, 53);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(467, 246);
this.panel2.Size = new System.Drawing.Size(508, 447);
this.panel2.TabIndex = 8;
this.panel2.Visible = false;
//
// lbxProdName
//
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.TabIndex = 525;
//
// lblProdName
//
this.lblProdName.Location = new System.Drawing.Point(363, 46);
this.lblProdName.AutoSize = true;
this.lblProdName.Location = new System.Drawing.Point(16, 241);
this.lblProdName.Name = "lblProdName";
this.lblProdName.Size = new System.Drawing.Size(90, 123);
this.lblProdName.Size = new System.Drawing.Size(56, 17);
this.lblProdName.TabIndex = 515;
this.lblProdName.Text = "商品名称";
//
// numCount
//
this.numCount.Location = new System.Drawing.Point(363, 175);
this.numCount.Location = new System.Drawing.Point(297, 408);
this.numCount.Maximum = new decimal(new int[] {
1000,
0,
@@ -459,6 +513,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.dgvSelectShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
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)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
@@ -477,68 +532,23 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colShopId,
this.colShopName,
this.colShopNotes});
this.dgvSelectShop.Location = new System.Drawing.Point(19, 46);
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(338, 184);
this.dgvSelectShop.Size = new System.Drawing.Size(470, 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.Visible = false;
this.colUserName.Width = 125;
//
// 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.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(411, 204);
this.btnCancel.Location = new System.Drawing.Point(445, 408);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(42, 26);
this.btnCancel.Size = new System.Drawing.Size(42, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -561,9 +571,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
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(363, 204);
this.btnAddToSelectDb.Location = new System.Drawing.Point(397, 408);
this.btnAddToSelectDb.Name = "btnAddToSelectDb";
this.btnAddToSelectDb.Size = new System.Drawing.Size(42, 26);
this.btnAddToSelectDb.Size = new System.Drawing.Size(42, 23);
this.btnAddToSelectDb.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddToSelectDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddToSelectDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -585,9 +595,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
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(411, 11);
this.btnGetShop.Location = new System.Drawing.Point(445, 13);
this.btnGetShop.Name = "btnGetShop";
this.btnGetShop.Size = new System.Drawing.Size(42, 26);
this.btnGetShop.Size = new System.Drawing.Size(42, 23);
this.btnGetShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnGetShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnGetShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -605,15 +615,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(263, 13);
this.txtShopName.Location = new System.Drawing.Point(279, 13);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(142, 23);
this.txtShopName.Size = new System.Drawing.Size(160, 23);
this.txtShopName.TabIndex = 433;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(206, 16);
this.label7.Location = new System.Drawing.Point(222, 16);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(68, 17);
this.label7.TabIndex = 434;
@@ -621,15 +631,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
// txtShopId
//
this.txtShopId.Location = new System.Drawing.Point(61, 13);
this.txtShopId.Location = new System.Drawing.Point(59, 13);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(142, 23);
this.txtShopId.Size = new System.Drawing.Size(160, 23);
this.txtShopId.TabIndex = 431;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(16, 16);
this.label8.Location = new System.Drawing.Point(14, 16);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 432;
@@ -641,6 +651,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.dgvDbProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvDbProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvDbProduct.AutoRowNumber = true;
this.dgvDbProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvDbProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvDbProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -883,6 +894,50 @@ 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;
//
// DbProductListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -926,7 +981,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.TextBox txtSKC;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private UserControls.ButtonEx btnSearch;
private System.Windows.Forms.TextBox txtExtCode;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtProdName;
@@ -937,7 +991,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.PictureBox pbLoading;
private System.Windows.Forms.TextBox txtNotes;
private System.Windows.Forms.Label lblNotes;
private UserControls.ButtonEx btnSelect;
private System.Windows.Forms.ComboBox cmbSort;
private System.Windows.Forms.Label label6;
private DevComponents.DotNetBar.PanelEx btnImportHtml;
@@ -950,12 +1003,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private DevComponents.DotNetBar.PanelEx btnCancel;
private DevComponents.DotNetBar.PanelEx btnAddToSelectDb;
private UserComponent.DataGridViewEx dgvSelectShop;
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.NumericUpDown numCount;
private System.Windows.Forms.Label lblProdName;
private System.Windows.Forms.Label lblGroup;
@@ -982,5 +1029,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private System.Windows.Forms.ComboBox cmbGroup;
private System.Windows.Forms.ListBox lbxProdName;
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;
}
}
@@ -59,6 +59,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.lblGroup.Visible = true;
this.cmbGroup.Visible = true;
this.btnImportHtml.Visible = true;
this.btnBatchSelect.Visible = true;
}
else
{
@@ -76,6 +77,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.lblGroup.Visible = false;
this.cmbGroup.Visible = false;
this.btnImportHtml.Visible = false;
this.btnBatchSelect.Visible = false;
}
btnSelect.Visible = false;
@@ -377,8 +379,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
break;
case "商品直传":
panel2.Visible = true;
panel2.Tag = dbProduct;
lblProdName.Text = dbProduct.product_name;
panel2.Tag = new List<KJDDBProduct> { dbProduct };
lbxProdName.Items.Clear();
lbxProdName.Items.Add(dbProduct.product_name);
break;
case "":
dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
@@ -394,17 +397,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms
/// <param name="prods"></param>
/// <param name="prodSelectCount">商品上传(直传)次数</param>
/// <param name="isDbToDb">数据直传</param>
private void SelectProduct(ShopLoginInfo selectShop, KJDDBProduct[] prods, int prodSelectCount = 1, bool isDbToDb = false)
private string SelectProduct(ShopLoginInfo selectShop, KJDDBProduct[] prods, int prodSelectCount = 1, bool isDbToDb = false)
{
if (selectShop == null)
{
BaseMsgForm.ShowError("店铺不能为空!");
return;
if (!isDbToDb)
BaseMsgForm.ShowError("店铺不能为空!");
return "店铺不能为空!";
}
if (prods == null || prods.Count() == 0)
{
BaseMsgForm.ShowError("认领商品不能为空!");
return;
if (!isDbToDb)
BaseMsgForm.ShowError("认领商品不能为空!");
return "店铺不能为空!";
}
Invoke(new Action(() =>
@@ -455,9 +460,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var data = UserLogin.GetSignaturex() +
"&out_product_id=" + prod.id +
"&shop_id=" + selectShop.ShopId +
"&shop_account=" + selectShop.ShopAccount +
"&main_user_name=" + selectShop.UserName +
"&sub_user_name=" + selectShop.SubUserName;
"&shop_account=" + selectShop.ShopAccount;
data += "&main_user_name=" + selectShop.UserName;
data += "&sub_user_name=" + selectShop.SubUserName;
//if (!isDbToDb)
//{
// data += "&main_user_name=" + selectShop.UserName;
// data += "&sub_user_name=" + selectShop.SubUserName;
//}
//else
//{
// data += "&main_user_name=" + BaseClass.UserName;
//}
if (!isDbToDb) // 管理员发起的数据直传不消耗次数,不计算认领次数
data += "&add_product_remaining=" + selectShop.AddProductRemaining;
data += "&add_fission_product_name=" + GetHtml.UrlEncodeUtf8(fissionProductName) +
@@ -496,17 +510,23 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
if (!string.IsNullOrEmpty(errorMsg))
{
Invoke(new Action(() =>
if (!isDbToDb)
{
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg.Trim());
}));
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg.Trim());
}));
}
}
else
{
Invoke(new Action(() =>
if (!isDbToDb)
{
BaseMsgForm.ShowInfo("认领商品成功!");
}));
Invoke(new Action(() =>
{
BaseMsgForm.ShowInfo("认领商品成功!");
}));
}
}
Invoke(new Action(() =>
{
@@ -514,6 +534,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.statusBar.lblTaskStatus.Text = "认领完成";
this.statusBar.UpdateProgressBar(prods.Length);
}));
return errorMsg.Trim();
}
public static string GetFissionProductName(KJDDBProduct prod)
@@ -1157,27 +1179,57 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private void btnAddToSelectDb_Click(object sender, EventArgs e)
{
KJDDBProduct dbProduct = panel2.Tag as KJDDBProduct;
if (dbProduct == null)
List<KJDDBProduct> dbProductLst = panel2.Tag as List<KJDDBProduct>;
if (dbProductLst == null)
return;
var selectShopId = this.dgvSelectShop.Rows.Cast<DataGridViewRow>()
.FirstOrDefault(r => r.Cells["colCheck"].Value.ParseToBool() == true)?.Cells["colShopId"].Value.ParseToString();
var selectShop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == selectShopId);
if (!string.IsNullOrEmpty(selectShopId) && selectShop != null)
{
this.btnSelect.Enabled = false;
Task.Run(() => {
SelectProduct(selectShop, new KJDDBProduct[] { dbProduct }, numCount.Value.ParseToInt(), true);
Invoke(new Action(() =>
{
this.btnSelect.Enabled = true;
}));
});
}
else
var selectShopIds = this.dgvSelectShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList();
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 (selectShopLst.Count <= 0)
{
BaseMsgForm.ShowError("未选择店铺!");
return;
}
this.btnSelect.Enabled = false;
Task.Run(() =>
{
string result = "";
foreach (var shop in selectShopLst)
{
var rst = SelectProduct(shop, dbProductLst.ToArray(), numCount.Value.ParseToInt(), true);
if (!rst.IsNullOrEmpty())
{
result += rst + "\r\n";
}
}
Invoke(new Action(() =>
{
if (!string.IsNullOrEmpty(result))
BaseMsgForm.ShowError("添加商品直传发生以下错误:\r\n" + result);
else
BaseMsgForm.ShowInfo("添加商品直传成功!");
this.btnSelect.Enabled = true;
}));
});
}
private void btnBatchSelect_Click(object sender, EventArgs e)
{
var dbIds = this.dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(r => r.Cells["col_db_id"].Value.ParseToString()).ToList();
if (dbIds.Count <= 0)
{
BaseMsgForm.ShowError("请至少选择一条商品数据!");
return;
}
var dbProductLst = lstTemuDbProduct.Where(p => dbIds.Contains(p.id.ToString())).ToList();
panel2.Visible = true;
panel2.Tag = dbProductLst;
lbxProdName.Items.Clear();
foreach(var dbProd in dbProductLst)
lbxProdName.Items.Add(dbProd.product_name);
}
}
}
@@ -639,6 +639,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "店铺" + shop.LoginStatus;
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSupplierId"].Value.ParseToString() == prod.shop_id).ToList();
foreach (var r in rows)
{
r.Cells["colLogin"].Value = "登录";
}
}));
continue;
}
@@ -648,19 +653,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "店铺" + shop.LoginStatus2;
var rows = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSupplierId"].Value.ParseToString() == prod.shop_id).ToList();
foreach (var r in rows)
{
r.Cells["colLogin"].Value = "登录";
}
}));
continue;
}
//if (prod.status != "待上传")
//{
// Invoke(new Action(() =>
// {
// row.Cells["colOpResult"].Value = "选品商品" + prod.status;
// }));
// continue;
//}
var temuDBProd = GetProductDetail(prod.out_product_Id.ToString());
if (temuDBProd == null || temuDBProd.id == 0)
{
@@ -1733,7 +1734,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
string productId = prodInfo.productId.ParseToString();
string specId = skuInfo.productSkuSpecList[0].specId.ParseToString();
var aiSkuImgLst = DouBaoImgCefForm.GetSkuImgList(productId, specId, 5, true);
var aiSkuImgLst = DouBaoImgCefForm.GetSkuImgList(productId, specId, 3, true); // 随机获取3张sku的ai图片
if (aiSkuImgLst.Count > 0)
{
aiImgInfoList.AddRange(aiSkuImgLst);
@@ -1759,7 +1760,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
if (aiSkuImgInfo != null)
{
var imgUrlRst = aiSkuImgInfo.img_url;
if (string.IsNullOrEmpty(imgUrlRst))
if (string.IsNullOrWhiteSpace(imgUrlRst))
{
imgUrlRst = UploadAiSkuImg(shop, prodParam.productDraftId.ParseToString(), aiSkuImgInfo.img_base64, aiSkuImgInfo.img_md5);
if (imgUrlRst.Contains("\"success\":false"))
@@ -2471,9 +2472,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var videoBaseUrl = BaseRegex.GetStringJson(ref uploadImgRst, "url");
if (string.IsNullOrEmpty(videoBaseUrl))
{
var error = BaseRegex.GetStringJson(ref videoBaseUrl, "errorMsg");
var error = BaseRegex.GetStringJson(ref uploadImgRst, "errorMsg");
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref videoBaseUrl, "error_msg");
error = BaseRegex.GetStringJson(ref uploadImgRst, "error_msg");
return "{\"success\":false,\"status\":\"未上传\"," +
"\"productDraftId\":\"" + productDraftId + "\"," +
"\"errMsg\":\"草稿箱上传失败,视频文件上传失败 " + error + "\"}";