diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index ae9e32b..c652433 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,8 +27,8 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 501; - //public static int VersionCount = 500; + public static int VersionCount = 503; + //public static int VersionCount = 503; /// /// 版本号 diff --git a/KJDService/KJD_WebService/BLL/ProductManage.cs b/KJDService/KJD_WebService/BLL/ProductManage.cs index f57dca5..6dbe2d7 100644 --- a/KJDService/KJD_WebService/BLL/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductManage.cs @@ -395,7 +395,8 @@ namespace KJD_Web.BLL var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'"); long l_draft_id = draft_id.ParseToLong(); - long l_table_id = l_draft_id % 128; + long l_spu_map_table_id = l_draft_id % 128; + long l_select_map_table_id = id.ParseToLong() % 64; string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); @@ -404,8 +405,12 @@ namespace KJD_Web.BLL //sql += "set @@autocommit=0;\r\n"; sql += "START TRANSACTION;\r\n"; if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id)) - sql += "insert into kjd_map.spu_map_" + l_table_id + + { + sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id + " (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n"; + sql += "insert into kjd_map.product_select_map_" + l_select_map_table_id + + " (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n"; + } sql += "update kjd.product_select set"; if (draft_id != null) sql += " draft_id='" + draft_id + "',"; diff --git a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs index e74a99b..ae526a9 100644 --- a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs @@ -358,7 +358,8 @@ namespace KJD_Web.BLL var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'"); long l_draft_id = draft_id.ParseToLong(); - long l_table_id = l_draft_id % 128; + long l_spu_map_table_id = l_draft_id % 128; + long l_select_map_table_id = id.ParseToLong() % 64; string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); @@ -367,8 +368,12 @@ namespace KJD_Web.BLL //sql += "set @@autocommit=0;\r\n"; sql += "START TRANSACTION;\r\n"; if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id)) - sql += "insert into kjd_map.spu_map_" + l_table_id + + { + sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id + " (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n"; + sql += "insert into kjd_map.product_third_select_map_" + l_select_map_table_id + + " (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n"; + } sql += "update kjd.third_product_select set"; if (draft_id != null) sql += " draft_id='" + draft_id + "',"; diff --git a/KJDService/KJD_WebService/BLL/ToolManage.cs b/KJDService/KJD_WebService/BLL/ToolManage.cs index f8fd76d..20dbc9e 100644 --- a/KJDService/KJD_WebService/BLL/ToolManage.cs +++ b/KJDService/KJD_WebService/BLL/ToolManage.cs @@ -36,20 +36,20 @@ namespace KJD_Web.BLL // MysqlUtils mySql = new MysqlUtils(conn); // string sql = ""; // string sql1 = ""; -// for (int i = 0; i < 69; i++) +// for (int i = 0; i < 64; i++) // { // //sql = @"drop table if exists kjd_map.spu_map_" + i + ";\r\n"; -// sql = @"CREATE TABLE IF NOT EXISTS kjd_map.spu_map_" + i + @" ( +// sql = @"CREATE TABLE IF NOT EXISTS kjd_map.product_third_select_map_" + i + @" ( // `id` int NOT NULL AUTO_INCREMENT, -// `draft_id` bigint NOT NULL COMMENT '草稿箱/商品Id', -// `from_spu_id` bigint NOT NULL COMMENT '母店来源商品Id', +// `product_id` bigint NOT NULL COMMENT '草稿箱/商品Id', +// `product_select_db_id` bigint NOT NULL COMMENT '选品上传数据库Id', // `shop_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上传的店铺', // PRIMARY KEY (`id`) //) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '上传商品与母店商品spu映射关系';"; // sql += @" //ALTER TABLE -// kjd_map.spu_map_" + i + @" +// kjd_map.product_third_select_map_" + i + @" //ADD // COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"; // var rst = mySql.ExecuteNonQuery(sql); diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 407fdc2..92d4304 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -277,11 +277,11 @@ DbProductEditNotesForm.cs - + Form - - ProductSelectEditNotesForm.cs + + DbProductSelectEditNotesForm.cs Form @@ -295,23 +295,23 @@ DbProductSelectListManageForm.cs - + Form - - ProductSelectSetSubSaForm.cs + + DbProductSelectSetSubSaForm.cs - + Form - - UserSelectDbProductForm.cs + + DbProductUserSelectForm.cs - + Form - - ProductSelectAddShopForm.cs + + ProductThirdSelectAddShopForm.cs Form @@ -325,11 +325,11 @@ ProductThirdTitleForm.cs - + Form - - UserSelectThirdProductForm.cs + + ProductThirdUserSelectForm.cs Form @@ -921,8 +921,8 @@ DbProductEditNotesForm.cs - - ProductSelectEditNotesForm.cs + + DbProductSelectEditNotesForm.cs DbProductListForm.cs @@ -930,14 +930,14 @@ DbProductSelectListManageForm.cs - - ProductSelectSetSubSaForm.cs + + DbProductSelectSetSubSaForm.cs - - UserSelectDbProductForm.cs + + DbProductUserSelectForm.cs - - ProductSelectAddShopForm.cs + + ProductThirdSelectAddShopForm.cs ProductThirdSelectListManageForm.cs @@ -945,8 +945,8 @@ ProductThirdTitleForm.cs - - UserSelectThirdProductForm.cs + + ProductThirdUserSelectForm.cs MarketingActivityForm.cs diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs index a8a850d..5e874d5 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs @@ -40,10 +40,12 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.btnReFission = new TemuKJD.UserControls.ButtonEx(); - this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label6 = new System.Windows.Forms.Label(); + this.chkShowDel = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtShopId = new System.Windows.Forms.TextBox(); + this.chkUploadProd = new TemuKJD.UserComponent.UcCheckBox(this.components); this.cmbStatus = new System.Windows.Forms.ComboBox(); this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); this.label7 = new System.Windows.Forms.Label(); @@ -60,7 +62,16 @@ this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.txtProdName = new System.Windows.Forms.TextBox(); - this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.label9 = new System.Windows.Forms.Label(); + this.txtSkuHeadText = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtSkuEndText = new System.Windows.Forms.TextBox(); + this.chkReFissionAllProdName = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkRandomSkuOrder = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkSkuRandomPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.numSkuRandomPrice = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); this.btnSetSubSa = new TemuKJD.UserControls.ButtonEx(); this.btnAdd = new TemuKJD.UserControls.ButtonEx(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); @@ -98,6 +109,8 @@ this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); @@ -118,9 +131,7 @@ // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.btnReFission); - this.splitContainer1.Panel1.Controls.Add(this.chkShowDel); this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1); - this.splitContainer1.Panel1.Controls.Add(this.chkNoSubSa); this.splitContainer1.Panel1.Controls.Add(this.btnSetSubSa); this.splitContainer1.Panel1.Controls.Add(this.btnAdd); // @@ -128,7 +139,7 @@ // this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); this.splitContainer1.Size = new System.Drawing.Size(1438, 638); - this.splitContainer1.SplitterDistance = 53; + this.splitContainer1.SplitterDistance = 66; this.splitContainer1.TabIndex = 2; // // btnReFission @@ -139,7 +150,7 @@ this.btnReFission.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReFission.ForeColor = System.Drawing.Color.White; - this.btnReFission.Location = new System.Drawing.Point(1153, 14); + this.btnReFission.Location = new System.Drawing.Point(1153, 19); this.btnReFission.Margin = new System.Windows.Forms.Padding(2); this.btnReFission.Name = "btnReFission"; this.btnReFission.Size = new System.Drawing.Size(90, 26); @@ -148,23 +159,11 @@ this.btnReFission.UseVisualStyleBackColor = false; this.btnReFission.Click += new System.EventHandler(this.btnReFission_Click); // - // chkShowDel - // - this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkShowDel.AutoSize = true; - this.chkShowDel.Location = new System.Drawing.Point(1044, 17); - this.chkShowDel.Name = "chkShowDel"; - this.chkShowDel.Size = new System.Drawing.Size(99, 21); - this.chkShowDel.TabIndex = 468; - this.chkShowDel.Text = "显示删除功能"; - this.chkShowDel.UseVisualStyleBackColor = true; - this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged); - // // tableLayoutPanel1 // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.ColumnCount = 18; + this.tableLayoutPanel1.ColumnCount = 21; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); @@ -183,8 +182,14 @@ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.Controls.Add(this.label6, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.chkShowDel, 19, 0); + this.tableLayoutPanel1.Controls.Add(this.chkNoSubSa, 18, 0); this.tableLayoutPanel1.Controls.Add(this.txtShopId, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.chkUploadProd, 20, 0); this.tableLayoutPanel1.Controls.Add(this.cmbStatus, 15, 0); this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 17, 0); this.tableLayoutPanel1.Controls.Add(this.label7, 2, 0); @@ -201,16 +206,18 @@ this.tableLayoutPanel1.Controls.Add(this.label3, 10, 0); this.tableLayoutPanel1.Controls.Add(this.label4, 12, 0); this.tableLayoutPanel1.Controls.Add(this.txtProdName, 11, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 13); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1); + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 5); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(945, 28); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1145, 56); this.tableLayoutPanel1.TabIndex = 190; // // label6 // - this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(3, 5); this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); @@ -219,36 +226,75 @@ this.label6.TabIndex = 449; this.label6.Text = "店铺Id"; // + // chkShowDel + // + this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkShowDel.AutoSize = true; + this.chkShowDel.Location = new System.Drawing.Point(966, 3); + this.chkShowDel.Margin = new System.Windows.Forms.Padding(0); + this.chkShowDel.Name = "chkShowDel"; + this.chkShowDel.Size = new System.Drawing.Size(75, 21); + this.chkShowDel.TabIndex = 468; + this.chkShowDel.Text = "显示删除"; + this.chkShowDel.UseVisualStyleBackColor = true; + this.chkShowDel.CheckedChanged += new System.EventHandler(this.chkShowDel_CheckedChanged); + // + // chkNoSubSa + // + this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkNoSubSa.AutoSize = true; + this.chkNoSubSa.Location = new System.Drawing.Point(879, 3); + this.chkNoSubSa.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); + this.chkNoSubSa.Name = "chkNoSubSa"; + this.chkNoSubSa.Size = new System.Drawing.Size(87, 21); + this.chkNoSubSa.TabIndex = 467; + this.chkNoSubSa.Text = "未分配超管"; + this.chkNoSubSa.UseVisualStyleBackColor = true; + // // txtShopId // - this.txtShopId.Dock = System.Windows.Forms.DockStyle.Top; + this.txtShopId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.txtShopId.Location = new System.Drawing.Point(47, 2); this.txtShopId.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtShopId.Name = "txtShopId"; - this.txtShopId.Size = new System.Drawing.Size(57, 23); + this.txtShopId.Size = new System.Drawing.Size(49, 23); this.txtShopId.TabIndex = 448; // + // chkUploadProd + // + this.chkUploadProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkUploadProd.AutoSize = true; + this.chkUploadProd.Location = new System.Drawing.Point(1041, 3); + this.chkUploadProd.Margin = new System.Windows.Forms.Padding(0); + this.chkUploadProd.Name = "chkUploadProd"; + this.chkUploadProd.Size = new System.Drawing.Size(104, 21); + this.chkUploadProd.TabIndex = 470; + this.chkUploadProd.Text = "上传到未发布"; + this.chkUploadProd.UseVisualStyleBackColor = true; + // // cmbStatus // - this.cmbStatus.Dock = System.Windows.Forms.DockStyle.Fill; + this.cmbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbStatus.FormattingEnabled = true; this.cmbStatus.Items.AddRange(new object[] { "待上传", "已上传", "全部"}); - this.cmbStatus.Location = new System.Drawing.Point(758, 1); - this.cmbStatus.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1); + this.cmbStatus.Location = new System.Drawing.Point(702, 2); + this.cmbStatus.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.cmbStatus.Name = "cmbStatus"; - this.cmbStatus.Size = new System.Drawing.Size(57, 25); + this.cmbStatus.Size = new System.Drawing.Size(49, 25); this.cmbStatus.TabIndex = 459; this.cmbStatus.Text = "待上传"; // // pnlEmpty // + this.pnlEmpty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 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(882, 3); + this.pnlEmpty.Location = new System.Drawing.Point(817, 3); + this.pnlEmpty.Margin = new System.Windows.Forms.Padding(2); this.pnlEmpty.Name = "pnlEmpty"; this.pnlEmpty.Size = new System.Drawing.Size(56, 22); this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -269,9 +315,9 @@ // // label7 // - this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(110, 5); + this.label7.Location = new System.Drawing.Point(102, 5); this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(56, 17); @@ -280,9 +326,9 @@ // // label8 // - this.label8.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(702, 5); + this.label8.Location = new System.Drawing.Point(646, 5); this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(56, 17); @@ -291,18 +337,18 @@ // // txtShopName // - this.txtShopName.Dock = System.Windows.Forms.DockStyle.Top; - this.txtShopName.Location = new System.Drawing.Point(166, 2); + this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtShopName.Location = new System.Drawing.Point(158, 2); this.txtShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtShopName.Name = "txtShopName"; - this.txtShopName.Size = new System.Drawing.Size(57, 23); + this.txtShopName.Size = new System.Drawing.Size(49, 23); this.txtShopName.TabIndex = 451; // // label5 // - this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(229, 5); + this.label5.Location = new System.Drawing.Point(213, 5); this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(31, 17); @@ -311,12 +357,13 @@ // // btnSearch // + this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 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(821, 2); + this.btnSearch.Location = new System.Drawing.Point(757, 2); this.btnSearch.Margin = new System.Windows.Forms.Padding(6, 2, 2, 2); this.btnSearch.Name = "btnSearch"; this.btnSearch.Size = new System.Drawing.Size(56, 24); @@ -327,27 +374,27 @@ // // txtSKC // - this.txtSKC.Dock = System.Windows.Forms.DockStyle.Top; - this.txtSKC.Location = new System.Drawing.Point(354, 2); + this.txtSKC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtSKC.Location = new System.Drawing.Point(330, 2); this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtSKC.Name = "txtSKC"; - this.txtSKC.Size = new System.Drawing.Size(57, 23); + this.txtSKC.Size = new System.Drawing.Size(49, 23); this.txtSKC.TabIndex = 432; // // txtSPU // - this.txtSPU.Dock = System.Windows.Forms.DockStyle.Top; - this.txtSPU.Location = new System.Drawing.Point(260, 2); + this.txtSPU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtSPU.Location = new System.Drawing.Point(244, 2); this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtSPU.Name = "txtSPU"; - this.txtSPU.Size = new System.Drawing.Size(57, 23); + this.txtSPU.Size = new System.Drawing.Size(49, 23); this.txtSPU.TabIndex = 434; // // label1 // - this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(323, 5); + this.label1.Location = new System.Drawing.Point(299, 5); this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(31, 17); @@ -356,9 +403,9 @@ // // label2 // - this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(417, 5); + this.label2.Location = new System.Drawing.Point(385, 5); this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(32, 17); @@ -367,27 +414,27 @@ // // txtCat // - this.txtCat.Dock = System.Windows.Forms.DockStyle.Top; - this.txtCat.Location = new System.Drawing.Point(449, 2); + this.txtCat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtCat.Location = new System.Drawing.Point(417, 2); this.txtCat.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtCat.Name = "txtCat"; - this.txtCat.Size = new System.Drawing.Size(57, 23); + this.txtCat.Size = new System.Drawing.Size(49, 23); this.txtCat.TabIndex = 425; // // txtExtCode // - this.txtExtCode.Dock = System.Windows.Forms.DockStyle.Top; - this.txtExtCode.Location = new System.Drawing.Point(639, 2); + this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtExtCode.Location = new System.Drawing.Point(591, 2); this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtExtCode.Name = "txtExtCode"; - this.txtExtCode.Size = new System.Drawing.Size(57, 23); + this.txtExtCode.Size = new System.Drawing.Size(49, 23); this.txtExtCode.TabIndex = 429; // // label3 // - this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(512, 5); + this.label3.Location = new System.Drawing.Point(472, 5); this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(32, 17); @@ -396,9 +443,9 @@ // // label4 // - this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(607, 5); + this.label4.Location = new System.Drawing.Point(559, 5); this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(32, 17); @@ -407,23 +454,143 @@ // // txtProdName // - this.txtProdName.Dock = System.Windows.Forms.DockStyle.Top; - this.txtProdName.Location = new System.Drawing.Point(544, 2); + this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtProdName.Location = new System.Drawing.Point(504, 2); this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtProdName.Name = "txtProdName"; - this.txtProdName.Size = new System.Drawing.Size(57, 23); + this.txtProdName.Size = new System.Drawing.Size(49, 23); this.txtProdName.TabIndex = 427; // - // chkNoSubSa + // flowLayoutPanel1 // - this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkNoSubSa.AutoSize = true; - this.chkNoSubSa.Location = new System.Drawing.Point(949, 17); - this.chkNoSubSa.Name = "chkNoSubSa"; - this.chkNoSubSa.Size = new System.Drawing.Size(99, 21); - this.chkNoSubSa.TabIndex = 467; - this.chkNoSubSa.Text = "仅未分配超管"; - this.chkNoSubSa.UseVisualStyleBackColor = true; + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 100); + this.flowLayoutPanel1.Controls.Add(this.label9); + this.flowLayoutPanel1.Controls.Add(this.txtSkuHeadText); + this.flowLayoutPanel1.Controls.Add(this.label10); + this.flowLayoutPanel1.Controls.Add(this.txtSkuEndText); + this.flowLayoutPanel1.Controls.Add(this.chkReFissionAllProdName); + this.flowLayoutPanel1.Controls.Add(this.chkRandomSkuOrder); + this.flowLayoutPanel1.Controls.Add(this.chkSkuRandomPrice); + this.flowLayoutPanel1.Controls.Add(this.numSkuRandomPrice); + this.flowLayoutPanel1.Controls.Add(this.label11); + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 28); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(1145, 28); + this.flowLayoutPanel1.TabIndex = 471; + // + // label9 + // + this.label9.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(3, 6); + this.label9.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(52, 17); + this.label9.TabIndex = 450; + this.label9.Text = "sku前缀"; + // + // txtSkuHeadText + // + this.txtSkuHeadText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtSkuHeadText.Location = new System.Drawing.Point(55, 3); + this.txtSkuHeadText.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSkuHeadText.Name = "txtSkuHeadText"; + this.txtSkuHeadText.Size = new System.Drawing.Size(156, 23); + this.txtSkuHeadText.TabIndex = 452; + this.txtSkuHeadText.TextChanged += new System.EventHandler(this.txtSkuHeadText_TextChanged); + // + // label10 + // + this.label10.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(214, 6); + this.label10.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(52, 17); + this.label10.TabIndex = 453; + this.label10.Text = "sku后缀"; + // + // txtSkuEndText + // + this.txtSkuEndText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtSkuEndText.Location = new System.Drawing.Point(266, 3); + this.txtSkuEndText.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSkuEndText.Name = "txtSkuEndText"; + this.txtSkuEndText.Size = new System.Drawing.Size(159, 23); + this.txtSkuEndText.TabIndex = 454; + this.txtSkuEndText.TextChanged += new System.EventHandler(this.txtSkuEndText_TextChanged); + // + // chkReFissionAllProdName + // + this.chkReFissionAllProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkReFissionAllProdName.AutoSize = true; + this.chkReFissionAllProdName.Location = new System.Drawing.Point(431, 4); + this.chkReFissionAllProdName.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.chkReFissionAllProdName.Name = "chkReFissionAllProdName"; + this.chkReFissionAllProdName.Size = new System.Drawing.Size(147, 21); + this.chkReFissionAllProdName.TabIndex = 472; + this.chkReFissionAllProdName.Text = "商品标题二次完全打乱"; + this.chkReFissionAllProdName.UseVisualStyleBackColor = true; + this.chkReFissionAllProdName.CheckedChanged += new System.EventHandler(this.chkReFissionAllProdName_CheckedChanged); + // + // chkRandomSkuOrder + // + this.chkRandomSkuOrder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkRandomSkuOrder.AutoSize = true; + this.chkRandomSkuOrder.Location = new System.Drawing.Point(582, 4); + this.chkRandomSkuOrder.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); + this.chkRandomSkuOrder.Name = "chkRandomSkuOrder"; + this.chkRandomSkuOrder.Size = new System.Drawing.Size(95, 21); + this.chkRandomSkuOrder.TabIndex = 469; + this.chkRandomSkuOrder.Text = "sku打乱顺序"; + this.chkRandomSkuOrder.UseVisualStyleBackColor = true; + this.chkRandomSkuOrder.CheckedChanged += new System.EventHandler(this.chkRandomSkuOrder_CheckedChanged); + // + // chkSkuRandomPrice + // + this.chkSkuRandomPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.chkSkuRandomPrice.AutoSize = true; + this.chkSkuRandomPrice.Location = new System.Drawing.Point(683, 4); + this.chkSkuRandomPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.chkSkuRandomPrice.Name = "chkSkuRandomPrice"; + this.chkSkuRandomPrice.Size = new System.Drawing.Size(119, 21); + this.chkSkuRandomPrice.TabIndex = 468; + this.chkSkuRandomPrice.Text = "sku随机价格变化"; + this.chkSkuRandomPrice.UseVisualStyleBackColor = true; + this.chkSkuRandomPrice.CheckedChanged += new System.EventHandler(this.chkSkuRandomPrice_CheckedChanged); + // + // numSkuRandomPrice + // + this.numSkuRandomPrice.DecimalPlaces = 2; + this.numSkuRandomPrice.Increment = new decimal(new int[] { + 1, + 0, + 0, + 131072}); + this.numSkuRandomPrice.Location = new System.Drawing.Point(802, 3); + this.numSkuRandomPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numSkuRandomPrice.Name = "numSkuRandomPrice"; + this.numSkuRandomPrice.Size = new System.Drawing.Size(55, 23); + this.numSkuRandomPrice.TabIndex = 470; + this.numSkuRandomPrice.Value = new decimal(new int[] { + 20, + 0, + 0, + 65536}); + this.numSkuRandomPrice.ValueChanged += new System.EventHandler(this.numSkuRandomPrice_ValueChanged); + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(863, 6); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(20, 17); + this.label11.TabIndex = 471; + this.label11.Text = "元"; // // btnSetSubSa // @@ -433,7 +600,7 @@ this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSetSubSa.ForeColor = System.Drawing.Color.White; - this.btnSetSubSa.Location = new System.Drawing.Point(1247, 14); + this.btnSetSubSa.Location = new System.Drawing.Point(1247, 19); this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2); this.btnSetSubSa.Name = "btnSetSubSa"; this.btnSetSubSa.Size = new System.Drawing.Size(90, 26); @@ -450,7 +617,7 @@ this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAdd.ForeColor = System.Drawing.Color.White; - this.btnAdd.Location = new System.Drawing.Point(1341, 14); + this.btnAdd.Location = new System.Drawing.Point(1341, 19); this.btnAdd.Margin = new System.Windows.Forms.Padding(2); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new System.Drawing.Size(90, 26); @@ -477,15 +644,15 @@ // this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); this.splitContainer2.Panel2.Controls.Add(this.statusBar); - this.splitContainer2.Size = new System.Drawing.Size(1438, 581); - this.splitContainer2.SplitterDistance = 552; + this.splitContainer2.Size = new System.Drawing.Size(1438, 568); + this.splitContainer2.SplitterDistance = 539; this.splitContainer2.TabIndex = 0; // // 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(694, 235); + this.pbLoading.Location = new System.Drawing.Point(694, 228); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -541,7 +708,7 @@ this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowHeadersWidth = 51; this.dgvSelectProduct.RowTemplate.Height = 23; - this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552); + this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 539); this.dgvSelectProduct.TabIndex = 189; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll); @@ -786,12 +953,14 @@ this.VisibleChanged += new System.EventHandler(this.DbProductSelectListManageForm_VisibleChanged); this.Controls.SetChildIndex(this.splitContainer1, 0); this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numSkuRandomPrice)).EndInit(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); @@ -859,5 +1028,16 @@ private System.Windows.Forms.DataGridViewLinkColumn colEditNotes; private System.Windows.Forms.DataGridViewLinkColumn colDelete; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private UserComponent.UcCheckBox chkUploadProd; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtSkuHeadText; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtSkuEndText; + private UserComponent.UcCheckBox chkSkuRandomPrice; + private UserComponent.UcCheckBox chkRandomSkuOrder; + private System.Windows.Forms.NumericUpDown numSkuRandomPrice; + private System.Windows.Forms.Label label11; + private UserComponent.UcCheckBox chkReFissionAllProdName; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 622adbe..8dd0821 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -46,6 +46,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms btnSetSubSa.Visible = false; chkNoSubSa.Visible = false; btnReFission.Visible = false; + chkUploadProd.Visible = false; // 直接上传 + flowLayoutPanel1.Visible = false; // 一些测试操作项目显示在此处 if (BaseClass.SaLevel == 1) { @@ -54,6 +56,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms btnSetSubSa.Visible = true; chkNoSubSa.Visible = true; btnReFission.Visible = true; + chkUploadProd.Visible = true; + flowLayoutPanel1.Visible = true; + + //chkReFissionAllProdName.Checked = true; + //chkRandomSkuOrder.Checked = true; + //chkSkuRandomPrice.Checked = true; } } @@ -594,20 +602,23 @@ namespace TemuKJD.KJDForms.ProductSelectForms } catch (Exception ex) { - result = "上传草稿箱失败:" + ex.Message; + result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}"; } Thread.Sleep(200); - if (!result.Contains("上传草稿箱成功")) + if (result.Contains("\"status\":\"未上传\"")) { + var error = BaseRegex.GetStringJson(ref result, "errMsg"); + if (string.IsNullOrWhiteSpace(error)) + error = result; Invoke(new Action(() => { - row.Cells["colOpResult"].Value = result; + row.Cells["colOpResult"].Value = error; })); continue; } - prod.status = "已上传"; + prod.status = BaseRegex.GetStringJson(ref result, "status"); var productDraftId = BaseRegex.GetStringJson(ref result, "productDraftId"); var url = BaseClass.BuildObjString("product/mdy_user_select_product_status"); var data = UserLogin.GetSignaturex() + @@ -615,7 +626,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms "&draft_id=" + productDraftId + // draft_id即商品spuid "&up_spu_id=" + prod.spu_id + "&shop_id=" + prod.shop_id + - "&status=已上传"; + "&status=" + prod.status; var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -626,16 +637,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms { Invoke(new Action(() => { - row.Cells["colOpResult"].Value = "已成功上传草稿箱但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; "; - row.Cells["colStatus"].Value = "已上传"; + string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; + row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; "; + row.Cells["colStatus"].Value = prod.status; })); } else { Invoke(new Action(() => { + string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id - row.Cells["colOpResult"].Value = "已成功上传草稿箱"; + row.Cells["colOpResult"].Value = opRst + BaseRegex.GetStringJson(ref result, "msg") + "; "; row.Cells["colStatus"].Value = "已上传"; })); } @@ -777,6 +790,45 @@ namespace TemuKJD.KJDForms.ProductSelectForms prodParam.productGuideFileNewReqList = prodInfo.productGuideFileNewVOList; //prodParam.productName = prodInfo.productName; prodParam.productName = selectProd.fission_product_name; + if(this.chkReFissionAllProdName.Checked) + { + int[] heads = dbProd.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries) + .Select(s=>s.ParseToInt()).ToArray(); + string headWords = ""; + if (heads.Length > 1 && heads[1] > heads[0]) + headWords = Randomx.GetId(heads[0], heads[1]) + "个"; + string endWords = string.IsNullOrEmpty(dbProd.end_words) ? "" : dbProd.end_words; + + List fissionLst = new List(); + fissionLst.AddRange(dbProd.fission_words.ParseToString().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries)); + string centerWords = ","; + while (fissionLst.Count > 0) + { + int id = Randomx.GetId(fissionLst.Count); + var fissionTxt = fissionLst[id]; + fissionLst.RemoveAt(id); + //var allTxt = headWords + dbProd.product_name + centerWords + fissionTxt + "," + endWords; + var allTxt = dbProd.product_name + centerWords + fissionTxt + ","; + byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(allTxt); + if (bytes.Length > 250) + { + break; + } + centerWords += fissionTxt + ","; + } + List centerNameLst = (dbProd.product_name + centerWords.ParseToString()) + .Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList(); + string centerName = ""; + while (centerNameLst.Count > 0) + { + int id = Randomx.GetId(centerNameLst.Count); + centerName += centerNameLst[id] + ","; + centerNameLst.RemoveAt(id); + } + + prodParam.productName = (headWords + centerName + endWords).Trim(','); + prodParam.productName = centerName.Trim(','); + } prodParam.productNonAuditExtAttrReq = new ProductNonAuditExtAttrReq() { california65WarningInfoReq = new California65WarningInfoReq() @@ -872,8 +924,43 @@ namespace TemuKJD.KJDForms.ProductSelectForms skcItem.productSkcCarouselImageI18nReqs = skcInfo.productSkcCarouselImageI18nVOList; skcItem.productSkcId = 0; skcItem.productSkuReqs = new List(); + + #region 建立一组前后缀映射以便获取不同的sku + Dictionary skuNameDic = new Dictionary(); + var skuHead = this.txtSkuHeadText.Text.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (skuHead.Count == 0) + skuHead.Add(""); + var skuEnd = this.txtSkuEndText.Text.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (skuEnd.Count == 0) + skuEnd.Add(""); foreach (var skuInfo in skcInfo.productSkuList) { + var speck = skuInfo.productSkuSpecList.FirstOrDefault(s => s.parentSpecName == "颜色"); + if (speck != null) + skuNameDic[speck.specName] = skuHead[Randomx.GetId(skuHead.Count)] + + speck.specName + skuEnd[Randomx.GetId(skuEnd.Count)]; + else + skuNameDic[speck.specName] = speck.specName; + } + #endregion + + int skuCount = 0; + //foreach (var skuInfo in skcInfo.productSkuList) + List skuListTmp = new List(); + skuListTmp.AddRange(skcInfo.productSkuList); + while (skuListTmp.Count > 0) + { + skuCount++; + + #region 随机打乱sku顺序 + int id = 0; + if (chkRandomSkuOrder.Checked) + id = Randomx.GetId(0, skuListTmp.Count); + var skuInfo = skuListTmp[id]; + if (skuInfo != null) + skuListTmp.RemoveAt(id); + #endregion + ProductSkuReqsItem skuItem = new ProductSkuReqsItem(); skuItem.currencyType = skuInfo.currencyType; skuItem.extCode = skuInfo.extCode; @@ -908,6 +995,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms specName = skuSpecInfo.specName, vid = prodParam.productSpecPropertyReqs.FirstOrDefault(p => p.specId == skuSpecInfo.specId)?.vid, }; + //前后缀映射 + if (skuSpecInfo.parentSpecName == "颜色") + skuSpecItem.specName = skuNameDic[skuSpecItem.specName]; skuItem.productSkuSpecReqs.Add(skuSpecItem); } skuItem.productSkuSuggestedPriceReq = JsonHelper.DeserializeJsonToObject( @@ -940,10 +1030,34 @@ namespace TemuKJD.KJDForms.ProductSelectForms JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuWeight)), }; skuItem.supplierPrice = skuInfo.supplierPrice; + + #region 使用随机sku价格上传(第一个sku价格不变,此处有bug,平台最后的sku排列不是按照提交上去的顺序排的) + if (skuCount != 1 && chkSkuRandomPrice.Checked) + { + + for (int x = 0; x < 5 && skcItem.productSkuReqs.Any(s => s.supplierPrice == skuItem.supplierPrice); x++) + { + int randomPrice = (this.numSkuRandomPrice.Value * 100).ParseToInt(); + if (randomPrice < 2) + randomPrice = 2; + if (Randomx.GetId(2) == 1) + skuItem.supplierPrice = skuItem.supplierPrice.ParseToInt() + Randomx.GetId(1, randomPrice); + else + skuItem.supplierPrice = skuItem.supplierPrice.ParseToInt() - Randomx.GetId(1, randomPrice); + + } + } + else + { + + } + #endregion + skuItem.thumbUrl = skuInfo.thumbUrl; skcItem.productSkuReqs.Add(skuItem); } + prodParam.productSkcReqs.Add(skcItem); } @@ -1007,28 +1121,42 @@ namespace TemuKJD.KJDForms.ProductSelectForms html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam); if (html.Contains("{\"success\":true")) - return "上传草稿箱成功\"productDraftId\":\"" + prodParam.productDraftId.ToString() + "\" " + sizeError; + { + if (!chkUploadProd.Checked) + { + return "{\"success\":true,\"status\":\"已上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"" + sizeError + "\"}"; + } + } else { var error = BaseRegex.GetStringJson(ref html, "errorMsg"); if (string.IsNullOrEmpty(error)) error = BaseRegex.GetStringJson(ref html, "error_msg"); - return "上传草稿箱失败" + error + " " + sizeError; + return "{\"success\":false,\"status\":\"未上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"草稿箱上传失败 " + error + " " + sizeError + "\"}"; } - #region 草稿箱后立即上传商品 暂时注释 - //Thread.Sleep(Randomx.GetId(2000, 3000)); - //html = AddProduct(shop, prodParam.productDraftId.ToString(), prodParam); - //if (html.Contains("{\"success\":true")) - // BaseMsgForm.ShowInfo("上传商品成功"); - //else - //{ - // var error = BaseRegex.GetStringJson(ref html, "errorMsg"); - // if (string.IsNullOrWhiteSpace(error)) - // error = BaseRegex.GetStringJson(ref html, "error_msg"); - // BaseMsgForm.ShowError(("上传商品失败\r\n" + error + "\r\n请在草稿箱查找商品!").Replace("\r\n\r\n", "\r\n")); - // return; - //} + #region 草稿箱编辑后立即上传商品 + Thread.Sleep(Randomx.GetId(1000, 2000)); + html = AddProduct(shop, prodParam.productDraftId.ToString(), prodParam); + if (html.Contains("\"success\":true")) + { + return "{\"success\":true,\"status\":\"已上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"" + sizeError + "\"}"; + } + else + { + var error = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrWhiteSpace(error)) + error = BaseRegex.GetStringJson(ref html, "error_msg"); + return "{\"success\":false,\"status\":\"草稿箱\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"上传失败 " + error + " " + sizeError + "\"}"; + } #endregion } @@ -1067,11 +1195,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms private string AddProduct(ShopLoginInfo shop, string draftId, TemuProductParam prodParam) { - string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/add"; + //string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/add"; + string url = "https://agentseller.temu.com/visage-agent-seller/product/add"; string body = JsonHelper.SerializeObject(prodParam); - string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + - draftId + "&from=productDraftList"; - return KJDHttpResponse.PostResponse(shop, url, body, refere); + //string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + + // draftId + "&from=productDraftList"; + string refere = "https://agentseller.temu.com/goods/edit?productDraftId=" + draftId + "&from=productDraftList"; + return KJDHttpResponse.PostResponse2(shop, url, body, refere); } private void btnSetSubSa_Click(object sender, EventArgs e) @@ -1278,5 +1408,42 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.statusBar.UpdateProgressBar(prodSelect.Length); })); } + + + private void chkSkuRandomPrice_CheckedChanged(object sender, EventArgs e) + { + dbProdSelectConfig.chkSkuRandomPriceChecked = chkSkuRandomPrice.Checked; + } + private void chkRandomSkuOrder_CheckedChanged(object sender, EventArgs e) + { + dbProdSelectConfig.chkRandomSkuOrderChecked = chkRandomSkuOrder.Checked; + } + private void chkReFissionAllProdName_CheckedChanged(object sender, EventArgs e) + { + dbProdSelectConfig.chkReFissionAllProdNameChecked = chkReFissionAllProdName.Checked; + } + private void txtSkuEndText_TextChanged(object sender, EventArgs e) + { + dbProdSelectConfig.txtSkuEndText = txtSkuEndText.Text; + } + private void txtSkuHeadText_TextChanged(object sender, EventArgs e) + { + dbProdSelectConfig.txtSkuHeadText = txtSkuHeadText.Text; + } + private void numSkuRandomPrice_ValueChanged(object sender, EventArgs e) + { + dbProdSelectConfig.numSkuRandomPrice = numSkuRandomPrice.Value; + } + + public class DbProdSelectConfig + { + public string txtSkuHeadText { get; set; } = ""; + public string txtSkuEndText { get; set; } = ""; + public bool chkReFissionAllProdNameChecked { get; set; } = false; + public bool chkRandomSkuOrderChecked { get; set; } = false; + public bool chkSkuRandomPriceChecked { get; set; } = false; + public decimal numSkuRandomPrice { get; set; } = 0; + } + DbProdSelectConfig dbProdSelectConfig = new DbProdSelectConfig(); } } diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs index 042d1d0..3e63650 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs @@ -15,7 +15,7 @@ using TemuKJD.KJDForms.ShopForms; using Work; /// -/// 第三方搬货选择 +/// 第三方库存上传选择上传店铺 /// namespace TemuKJD.KJDForms.ProductThirdSelectForms { diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs index 62952b2..609b03e 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs @@ -131,14 +131,14 @@ // this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); this.splitContainer1.Size = new System.Drawing.Size(1438, 638); - this.splitContainer1.SplitterDistance = 53; + this.splitContainer1.SplitterDistance = 66; this.splitContainer1.TabIndex = 2; // // pbFissionSetting // this.pbFissionSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbFissionSetting.Image = global::TemuKJD.Properties.Resources.齿轮; - this.pbFissionSetting.Location = new System.Drawing.Point(1129, 15); + this.pbFissionSetting.Location = new System.Drawing.Point(1129, 21); this.pbFissionSetting.Name = "pbFissionSetting"; this.pbFissionSetting.Size = new System.Drawing.Size(24, 24); this.pbFissionSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -151,7 +151,7 @@ // this.chkShowDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkShowDel.AutoSize = true; - this.chkShowDel.Location = new System.Drawing.Point(1024, 17); + this.chkShowDel.Location = new System.Drawing.Point(1024, 23); this.chkShowDel.Name = "chkShowDel"; this.chkShowDel.Size = new System.Drawing.Size(99, 21); this.chkShowDel.TabIndex = 471; @@ -163,7 +163,7 @@ // this.chkNoSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkNoSubSa.AutoSize = true; - this.chkNoSubSa.Location = new System.Drawing.Point(930, 17); + this.chkNoSubSa.Location = new System.Drawing.Point(930, 23); this.chkNoSubSa.Name = "chkNoSubSa"; this.chkNoSubSa.Size = new System.Drawing.Size(99, 21); this.chkNoSubSa.TabIndex = 470; @@ -178,7 +178,7 @@ this.btnReFission.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReFission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReFission.ForeColor = System.Drawing.Color.White; - this.btnReFission.Location = new System.Drawing.Point(1153, 14); + this.btnReFission.Location = new System.Drawing.Point(1153, 20); this.btnReFission.Margin = new System.Windows.Forms.Padding(2); this.btnReFission.Name = "btnReFission"; this.btnReFission.Size = new System.Drawing.Size(90, 26); @@ -229,7 +229,7 @@ this.tableLayoutPanel1.Controls.Add(this.label3, 10, 0); this.tableLayoutPanel1.Controls.Add(this.label4, 12, 0); this.tableLayoutPanel1.Controls.Add(this.txtProdName, 11, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 13); + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 19); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -450,7 +450,7 @@ this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSetSubSa.ForeColor = System.Drawing.Color.White; - this.btnSetSubSa.Location = new System.Drawing.Point(1247, 14); + this.btnSetSubSa.Location = new System.Drawing.Point(1247, 20); this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2); this.btnSetSubSa.Name = "btnSetSubSa"; this.btnSetSubSa.Size = new System.Drawing.Size(90, 26); @@ -467,12 +467,12 @@ this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAdd.ForeColor = System.Drawing.Color.White; - this.btnAdd.Location = new System.Drawing.Point(1341, 14); + this.btnAdd.Location = new System.Drawing.Point(1341, 20); this.btnAdd.Margin = new System.Windows.Forms.Padding(2); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new System.Drawing.Size(90, 26); this.btnAdd.TabIndex = 444; - this.btnAdd.Text = "一键上传草稿"; + this.btnAdd.Text = "一键上传"; this.btnAdd.UseVisualStyleBackColor = false; this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); // @@ -494,15 +494,15 @@ // this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); this.splitContainer2.Panel2.Controls.Add(this.statusBar); - this.splitContainer2.Size = new System.Drawing.Size(1438, 581); - this.splitContainer2.SplitterDistance = 552; + this.splitContainer2.Size = new System.Drawing.Size(1438, 568); + this.splitContainer2.SplitterDistance = 539; this.splitContainer2.TabIndex = 0; // // 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(694, 235); + this.pbLoading.Location = new System.Drawing.Point(694, 228); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -558,7 +558,7 @@ this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowHeadersWidth = 51; this.dgvSelectProduct.RowTemplate.Height = 23; - this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 552); + this.dgvSelectProduct.Size = new System.Drawing.Size(1430, 539); this.dgvSelectProduct.TabIndex = 190; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll); diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs index 4de26f9..7b65226 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs @@ -27,6 +27,9 @@ using System.Globalization; namespace TemuKJD.KJDForms.ProductThirdSelectForms { + /// + /// 库存上传商品列表 + /// public partial class ProductThirdSelectListManageForm : LRBaseForm { List lstAdminTemuDBProductSelect = new List(); @@ -610,20 +613,23 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } catch (Exception ex) { - result = "上传草稿箱失败:" + ex.Message; + result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}"; } Thread.Sleep(200); - if (!result.Contains("上传草稿箱成功")) + if (result.Contains("\"status\":\"未上传\"")) { + var error = BaseRegex.GetStringJson(ref result, "errMsg"); + if (string.IsNullOrWhiteSpace(error)) + error = result; Invoke(new Action(() => { - row.Cells["colOpResult"].Value = result; + row.Cells["colOpResult"].Value = error; })); continue; } - prod.status = "已上传"; + prod.status = BaseRegex.GetStringJson(ref result, "status"); var productDraftId = BaseRegex.GetStringJson(ref result, "productDraftId"); var url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status"); var data = UserLogin.GetSignaturex() + @@ -631,7 +637,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms "&draft_id=" + productDraftId + // draft_id即商品spuid "&up_spu_id=" + prod.spu_id + "&shop_id=" + prod.shop_id + - "&status=已上传"; + "&status=" + prod.status; var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -642,8 +648,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms { Invoke(new Action(() => { - row.Cells["colOpResult"].Value = "已成功上传草稿箱但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; "; - row.Cells["colStatus"].Value = "已上传"; + string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; + row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; "; + row.Cells["colStatus"].Value = prod.status; })); } else @@ -651,21 +658,21 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms Invoke(new Action(() => { row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id - row.Cells["colOpResult"].Value = "已成功上传草稿箱"; - row.Cells["colStatus"].Value = "已上传"; + row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; + row.Cells["colStatus"].Value = prod.status; })); } } Invoke(new Action(() => { - BaseMsgForm.ShowInfo("上传草稿完成!"); + BaseMsgForm.ShowInfo("上传完成!"); })); Invoke(new Action(() => { this.pbLoading.Visible = false; - this.statusBar.lblTaskStatus.Text = "上传草稿完成"; + this.statusBar.lblTaskStatus.Text = "上传完成"; this.statusBar.UpdateProgressBar(prodSelect.Length); })); } @@ -1018,28 +1025,39 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam); if (html.Contains("{\"success\":true")) - return "上传草稿箱成功\"productDraftId\":\"" + prodParam.productDraftId.ToString() + "\" " + sizeError; + { + return "{\"success\":true,\"status\":\"已上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"" + sizeError + "\"}"; + } else { var error = BaseRegex.GetStringJson(ref html, "errorMsg"); if (string.IsNullOrEmpty(error)) error = BaseRegex.GetStringJson(ref html, "error_msg"); - return "上传草稿箱失败" + error + " " + sizeError; + return "{\"success\":false,\"status\":\"未上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"草稿箱上传失败 " + error + " " + sizeError + "\"}"; } - #region 草稿箱后立即上传商品 暂时注释 - //Thread.Sleep(Randomx.GetId(2000, 3000)); - //html = AddProduct(shop, prodParam.productDraftId.ToString(), prodParam); - //if (html.Contains("{\"success\":true")) - // BaseMsgForm.ShowInfo("上传商品成功"); - //else - //{ - // var error = BaseRegex.GetStringJson(ref html, "errorMsg"); - // if (string.IsNullOrWhiteSpace(error)) - // error = BaseRegex.GetStringJson(ref html, "error_msg"); - // BaseMsgForm.ShowError(("上传商品失败\r\n" + error + "\r\n请在草稿箱查找商品!").Replace("\r\n\r\n", "\r\n")); - // return; - //} + #region 草稿箱编辑后立即上传商品 + Thread.Sleep(Randomx.GetId(1500, 2500)); + html = AddProduct(shop, prodParam.productDraftId.ToString(), prodParam); + if (html.Contains("\"success\":true")) + { + return "{\"success\":true,\"status\":\"已上传\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"" + sizeError + "\"}"; + } + else + { + var error = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrWhiteSpace(error)) + error = BaseRegex.GetStringJson(ref html, "error_msg"); + return "{\"success\":false,\"status\":\"草稿箱\"," + + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + + "\"errMsg\":\"上传失败 " + error + " " + sizeError + "\"}"; + } #endregion } @@ -1077,11 +1095,13 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms private string AddProduct(ShopLoginInfo shop, string draftId, TemuProductParam prodParam) { - string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/add"; + //string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/add"; + string url = "https://agentseller.temu.com/visage-agent-seller/product/add"; string body = JsonHelper.SerializeObject(prodParam); - string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + - draftId + "&from=productDraftList"; - return KJDHttpResponse.PostResponse(shop, url, body, refere); + //string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + + // draftId + "&from=productDraftList"; + string refere = "https://agentseller.temu.com/goods/edit?productDraftId=" + draftId + "&from=productDraftList"; + return KJDHttpResponse.PostResponse2(shop, url, body, refere); } private void btnSetSubSa_Click(object sender, EventArgs e) diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdTitleForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdTitleForm.cs index 94ba07d..20d5a19 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdTitleForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdTitleForm.cs @@ -12,6 +12,9 @@ using TemuKJD.KJDForms.BaseForms; namespace TemuKJD.KJDForms.ProductThirdSelectForms { + /// + /// 库存上传标题前后缀 + /// public partial class ProductThirdTitleForm : LRBaseForm { public ProductThirdTitleForm() diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.Designer.cs index a2e7725..239300e 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.Designer.cs @@ -56,6 +56,11 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -70,12 +75,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colDraftId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -440,6 +441,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.colExtCode, this.colMsg, this.colDraftId, + this.colNotes, this.ColDelete}); this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0); @@ -450,6 +452,99 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.dgvSelectProduct.TabIndex = 187; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); // + // 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.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer4.Size = new System.Drawing.Size(1291, 26); + this.splitContainer4.SplitterDistance = 600; + 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(600, 26); + this.statusBar.TabIndex = 2; + // + // btnClear + // + this.btnClear.Anchor = 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(4, 2); + 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; + // + // panelEx1 + // + 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(97, 2); + 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; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.Location = new System.Drawing.Point(114, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.Size = new System.Drawing.Size(573, 26); + this.ucSplitPage1.TabIndex = 675; + this.ucSplitPage1.TotalPage = 1; + // // colCheck // this.colCheck.HeaderText = "选择"; @@ -561,113 +656,26 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.colDraftId.Width = 80; // + // colNotes + // + this.colNotes.HeaderText = "上传备注"; + this.colNotes.Name = "colNotes"; + this.colNotes.ReadOnly = true; + // // ColDelete // this.ColDelete.HeaderText = "删除"; this.ColDelete.Name = "ColDelete"; this.ColDelete.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.btnClear); - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1); - this.splitContainer4.Size = new System.Drawing.Size(1291, 26); - this.splitContainer4.SplitterDistance = 600; - 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(600, 26); - this.statusBar.TabIndex = 2; - // - // btnClear - // - this.btnClear.Anchor = 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(4, 2); - 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; - // - // panelEx1 - // - 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(97, 2); - 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; - // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.Location = new System.Drawing.Point(114, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); - this.ucSplitPage1.Size = new System.Drawing.Size(573, 26); - this.ucSplitPage1.TabIndex = 675; - this.ucSplitPage1.TotalPage = 1; - // - // UserSelectThirdProductForm + // ProductThirdUserSelectForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1291, 546); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Name = "UserSelectThirdProductForm"; + this.Name = "ProductThirdUserSelectForm"; this.Text = "第三方库存上传"; this.Load += new System.EventHandler(this.UserSelectThirdProductForm_Load); this.VisibleChanged += new System.EventHandler(this.UserSelectDbProductForm_VisibleChanged); @@ -717,6 +725,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms private System.Windows.Forms.ComboBox cmbStatus; private System.Windows.Forms.Label label8; private DevComponents.DotNetBar.PanelEx btnDelSelect; + 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 colLoginStatus; + private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; @@ -731,15 +748,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; private System.Windows.Forms.DataGridViewLinkColumn ColDelete; - 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 colLoginStatus; - private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; - private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; - private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs index 7a6652c..ef64015 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs @@ -22,6 +22,9 @@ using Work; namespace TemuKJD.KJDForms.ProductThirdSelectForms { + /// + /// 库存上传提交商品列表 + /// public partial class ProductThirdUserSelectForm : BaseForm { bool isInit = false; @@ -247,6 +250,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms prodSelect.ext_code, prodSelect.status, prodSelect.draft_id, + prodSelect.notes, "删除"); dgvSelectProduct.Rows[rowIndex].Height = 60; diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.resx b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.resx index 8a54b6d..67a396d 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.resx +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.resx @@ -180,6 +180,9 @@ True + + True + True diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs index f0afe64..679cf61 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs @@ -545,7 +545,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms //page++; string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg"); if (string.IsNullOrEmpty(sErr)) - sErr = BaseRegex.GetStringJson(ref jsonRst, "err_msg"); + sErr = BaseRegex.GetStringJson(ref jsonRst, "error_msg"); if (string.IsNullOrEmpty(sErr)) sErr = jsonRst; Invoke(new Action(() => @@ -720,7 +720,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg"); if (string.IsNullOrEmpty(sErr)) - sErr = BaseRegex.GetStringJson(ref jsonRst, "err_msg"); + sErr = BaseRegex.GetStringJson(ref jsonRst, "error_msg"); if (string.IsNullOrEmpty(sErr)) sErr = jsonRst; Invoke(new Action(() => @@ -835,7 +835,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg"); if (string.IsNullOrEmpty(sErr)) - sErr = BaseRegex.GetStringJson(ref jsonRst, "err_msg"); + sErr = BaseRegex.GetStringJson(ref jsonRst, "error_msg"); if (string.IsNullOrEmpty(sErr)) sErr = jsonRst; Invoke(new Action(() => @@ -935,7 +935,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { string sSubmitErr = BaseRegex.GetStringJson(ref submitRst, "errorMsg"); if (string.IsNullOrEmpty(sSubmitErr)) - sSubmitErr = BaseRegex.GetStringJson(ref submitRst, "err_msg"); + sSubmitErr = BaseRegex.GetStringJson(ref submitRst, "error_msg"); if (string.IsNullOrEmpty(sSubmitErr)) sSubmitErr = jsonRst; Invoke(new Action(() => @@ -955,6 +955,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms submitRow.Cells["colMsg"].Value = "提交活动成功"; } })); + Thread.Sleep(Randomx.GetId(1000, 2000)); // 如果提交成功且还有更多商品可报名,继续重复报名(已报名商品不会出现在搜索结果列表) if (submitRst.Contains("\"success\":true") && jsonRst.Contains("\"hasMore\":true"))