From 2b21ecf62a546d7a82a4a07828c98b374ecda255 Mon Sep 17 00:00:00 2001 From: wule Date: Mon, 7 Jul 2025 09:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E8=BF=90=E8=A1=8C=E4=B8=AD?= =?UTF-8?q?=E5=8D=A1=E6=AD=BB=E7=9A=84=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/Model/Result/TemuStockInfo.cs | 12 +- .../ProductForms/PriceManageForm.Designer.cs | 1 + .../KJDForms/ProductForms/PriceManageForm.cs | 24 ++- .../ProductForms/SaleStockUpForm.Designer.cs | 169 +++++++++--------- .../KJDForms/ProductForms/SaleStockUpForm.cs | 47 +++-- TEMUKJD/KJDForms/ShopForms/ShopListForm.cs | 1 + 6 files changed, 143 insertions(+), 111 deletions(-) diff --git a/AllBase/Model/Result/TemuStockInfo.cs b/AllBase/Model/Result/TemuStockInfo.cs index b707f28..39b230d 100644 --- a/AllBase/Model/Result/TemuStockInfo.cs +++ b/AllBase/Model/Result/TemuStockInfo.cs @@ -216,9 +216,9 @@ namespace AllBase.Model.Result public string catName { get; set; } public string productSkcId { get; set; } public string productSkcPicture { get; set; } - public long supplierId { get; set; } + public long? supplierId { get; set; } public string supplierName { get; set; } - public bool punishVmiUrgencyOrder { get; set; } + public bool? punishVmiUrgencyOrder { get; set; } public string purchaseConfig { get; set; } public List purchaseConfigDetailList { get; set; } = new List(); } @@ -227,8 +227,8 @@ namespace AllBase.Model.Result /// public class purchaseConfigDetail { - public bool isReducePricePass { get; set; } - public bool isVerifyPrice { get; set; } + public bool? isReducePricePass { get; set; } + public bool? isVerifyPrice { get; set; } /// /// 价格单位 CNY /// @@ -236,12 +236,12 @@ namespace AllBase.Model.Result /// /// sku价格 2800 分 /// - public int supplierPrice { get; set; } + public int? supplierPrice { get; set; } /// /// sku名称 12color gel pens /// public string className { get; set; } - public long productSkuId { get; set; } + public long? productSkuId { get; set; } public int? exceptQuantity { get; set; } public int? applyQuantity { get; set; } public int? lastSevenDaysSaleVolume { get; set; } diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs index 1548780..a9b92f7 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs @@ -561,6 +561,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; this.colProductSkcPic.Name = "colProductSkcPic"; this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Visible = false; this.colProductSkcPic.Width = 60; // // colProductId diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs index db5f26d..1cdf1dd 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs @@ -272,12 +272,16 @@ namespace TemuKJD.KJDForms.ProductForms tryCount++; goto tryAgain; } + if (jsonStr.Contains("当前操作人数太多,请稍后重试")) + { + } if (!jsonStr.Contains("\"success\":true")) { isError = true; string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg"); if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr)) errMsg += sErr + " "; + page++; continue; } @@ -300,8 +304,8 @@ namespace TemuKJD.KJDForms.ProductForms { lstPriceAdjustInfo.Add(pInfo); - string url = pInfo.image.Replace("https", "http"); - var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); + //string url = pInfo.image.Replace("https", "http"); + //var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); Invoke(new Action(() => { @@ -310,7 +314,7 @@ namespace TemuKJD.KJDForms.ProductForms pInfo.supplierId, shop.ShopAccount, // pInfo.supplierName, // 列表里取不到,这里取shop里的 pInfo.priceOrderSn, - image, // skc图片 + null,//image, // skc图片 pInfo.productId, pInfo.skcId, pInfo.productName + "\r\n" + pInfo.skuSpecs, // 商品标题+sku名称 @@ -395,6 +399,18 @@ namespace TemuKJD.KJDForms.ProductForms { if (cancellationTokenSource != null) cancellationTokenSource.Cancel(); + + Task.Run(() => { + for (int i = 0; i < 100; i++) + { + Thread.Sleep(100); + } + Invoke(new Action(() => + { + ucGroupBoxEx2.Enabled = true; + ucGroupBoxEx4.Enabled = true; + })); + }); } private void btnStartStockUp_Click(object sender, EventArgs e) @@ -546,6 +562,8 @@ namespace TemuKJD.KJDForms.ProductForms private void dgvStock_CellContentClick(object sender, DataGridViewCellEventArgs e) { + if (e.RowIndex < 0 || e.ColumnIndex < 0) + return; string columnName = dgvAdjust.Columns[e.ColumnIndex].Name; var row = dgvAdjust.Rows[e.RowIndex]; switch (columnName) diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs index 8d35c22..08198f4 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs @@ -109,6 +109,10 @@ namespace TemuKJD.KJDForms.ProductForms this.btnStopAdd = new DevComponents.DotNetBar.PanelEx(); this.chkLimited = new System.Windows.Forms.CheckBox(); this.dgvStock = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.colUpId = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -128,10 +132,6 @@ namespace TemuKJD.KJDForms.ProductForms this.colWaitReceiveNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colNeedStockUp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -1234,6 +1234,86 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvStock.TabIndex = 187; this.dgvStock.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStock_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.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Size = new System.Drawing.Size(1148, 26); + this.splitContainer4.SplitterDistance = 870; + 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(870, 26); + this.statusBar.TabIndex = 2; + // + // 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(155, 0); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); + // + // 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(47, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // // colUpId // this.colUpId.HeaderText = "上家Id"; @@ -1290,6 +1370,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; this.colProductSkcPic.Name = "colProductSkcPic"; this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Visible = false; this.colProductSkcPic.Width = 60; // // colProductId @@ -1386,86 +1467,6 @@ namespace TemuKJD.KJDForms.ProductForms this.colMsg.ReadOnly = true; this.colMsg.Width = 400; // - // splitContainer4 - // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; - // - // splitContainer4.Panel1 - // - this.splitContainer4.Panel1.Controls.Add(this.statusBar); - // - // splitContainer4.Panel2 - // - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Size = new System.Drawing.Size(1148, 26); - this.splitContainer4.SplitterDistance = 870; - 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(870, 26); - this.statusBar.TabIndex = 2; - // - // 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(155, 0); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(115, 21); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.TabIndex = 668; - this.panelEx1.Text = "停止当前操作"; - this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); - // - // 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(47, 0); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; - // // SaleStockUpForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs index 1498ef0..8ca1557 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs @@ -174,8 +174,6 @@ namespace TemuKJD.KJDForms.ProductForms } string searchText = txtStockid.Text.Trim(); - btnSearch.Enabled = false; - chkHasCreate.Enabled = false; ucGroupBoxEx2.Enabled = false; ucGroupBoxEx3.Enabled = false; ucGroupBoxEx4.Enabled = false; @@ -280,8 +278,8 @@ namespace TemuKJD.KJDForms.ProductForms { lstStockInfo.Add(sInfo); - string url = sInfo.productSkcPicture.Replace("https", "http"); - var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); + //string url = sInfo.productSkcPicture.Replace("https", "http"); + //var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); Invoke(new Action(() => { @@ -292,7 +290,7 @@ namespace TemuKJD.KJDForms.ProductForms sInfo.supplierName, sInfo.subPurchaseOrderSn, sInfo.originalPurchaseOrderSn, - image, + null,//image, sInfo.productId, sInfo.productSkcId, sInfo.productName, @@ -339,8 +337,6 @@ namespace TemuKJD.KJDForms.ProductForms } Invoke(new Action(() => { - btnSearch.Enabled = true; - chkHasCreate.Enabled = true; ucGroupBoxEx2.Enabled = true; ucGroupBoxEx3.Enabled = true; ucGroupBoxEx4.Enabled = true; @@ -474,10 +470,19 @@ namespace TemuKJD.KJDForms.ProductForms { if (cancellationTokenSource != null) cancellationTokenSource.Cancel(); + + Invoke(new Action(() => + { + ucGroupBoxEx2.Enabled = true; + ucGroupBoxEx3.Enabled = true; + ucGroupBoxEx4.Enabled = true; + })); } private void dgvStock_CellContentClick(object sender, DataGridViewCellEventArgs e) { + if (e.RowIndex < 0 || e.ColumnIndex < 0) + return; string columnName = dgvStock.Columns[e.ColumnIndex].Name; var row = dgvStock.Rows[e.RowIndex]; switch (columnName) @@ -598,7 +603,6 @@ namespace TemuKJD.KJDForms.ProductForms } Invoke(new Action(() => { - btnCancelSubPurchaseOrder.Enabled = true; ucGroupBoxEx2.Enabled = true; ucGroupBoxEx3.Enabled = true; ucGroupBoxEx4.Enabled = true; @@ -651,7 +655,6 @@ namespace TemuKJD.KJDForms.ProductForms string searchText = txtStockid.Text.Trim(); btnListWarehouse.Enabled = false; btnSearch.Enabled = false; - chkHasCreate.Enabled = false; ucGroupBoxEx2.Enabled = false; ucGroupBoxEx3.Enabled = false; ucGroupBoxEx4.Enabled = false; @@ -775,19 +778,29 @@ namespace TemuKJD.KJDForms.ProductForms sInfo.needStockUp = false; lstSubOrderInfo.Add(sInfo); - string url = sInfo.productSkcPicture.Replace("https", "http"); - var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); + //string url = sInfo.productSkcPicture.Replace("https", "http"); + //// var stream = WebRequest.Create(url).GetResponse().GetResponseStream(); + //Image image = null; + //using (Stream stream = WebRequest.Create(url).GetResponse().GetResponseStream()) + //{ + // try { + // image = Image.FromStream(stream); + // } + // catch (Exception ex) + // { + // } + //} Invoke(new Action(() => { - int rowId = this.dgvStock.Rows.Add( + var rowId = this.dgvStock.Rows.Add( "", true, sInfo.supplierId, sInfo.supplierName, "",//sInfo.subPurchaseOrderSn, "",//sInfo.originalPurchaseOrderSn, - image, + null,//image, sInfo.productId, sInfo.productSkcId, sInfo.productName, @@ -801,8 +814,9 @@ namespace TemuKJD.KJDForms.ProductForms sInfo.needStockUp == false ? "无需备货" : "可备货", "" ); - - dgvStock.Rows[rowId].Height = 60; + if (rowId >= 0) + dgvStock.Rows[rowId].Height = 60; + //dgvStock.Rows.Cast[dgvStock.Rows].Height=60; })); } } @@ -836,9 +850,6 @@ namespace TemuKJD.KJDForms.ProductForms } Invoke(new Action(() => { - btnListWarehouse.Enabled = true; - btnSearch.Enabled = true; - chkHasCreate.Enabled = true; ucGroupBoxEx2.Enabled = true; ucGroupBoxEx3.Enabled = true; ucGroupBoxEx4.Enabled = true; diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index 9e1e298..d7f998a 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -762,6 +762,7 @@ namespace TemuKJD.KJDForms.ShopForms string cook = shop.Cookies; cook = BaseRegex.GetStringCookie(ref cook, "SUB_PASS_ID"); cook = "SUB_PASS_ID=" + cook; + cook = "document.cookie='" + cook + "';window.location.href='https://seller.kuajingmaihuo.com'"; Clipboard.SetDataObject(cook); BaseMsgForm.ShowInfo("复制成功"); break;