From b23eb0e4973af30066b165b0fe9e636a09a68e06 Mon Sep 17 00:00:00 2001 From: wule Date: Thu, 20 Nov 2025 09:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=85=A5jit?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=B8=AD=E7=9A=84=E5=8D=A1=E9=A1=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 2 +- .../ProductForms/ProductChangePriceForm.cs | 207 ++-- .../ProductForms/TemuJitForm.Designer.cs | 828 ++++++++----- TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs | 1063 +++++++++++++---- .../KJDForms/ProductForms/TemuJitForm.resx | 6 + .../TemuJitSubForms/ChangeStockForm.cs | 114 +- .../ComplianceForm.Designer.cs | 4 +- .../TemuJitSubForms/ComplianceForm.cs | 306 ++--- .../TemuJitSubForms/ReceiveAreaForm.cs | 14 +- TEMUKJD/UserComponent/DataGridViewEx.cs | 29 +- 10 files changed, 1789 insertions(+), 784 deletions(-) diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 6a82fd8..b07f053 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 678; + public static int VersionCount = 683; //public static int VersionCount = 613; /// diff --git a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs index aa9ec38..44ed009 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs @@ -24,6 +24,8 @@ namespace TemuKJD.KJDForms.ProductForms /// public partial class ProductChangePriceForm : LRBaseForm { + public bool IsAuto = false; + decimal wantPrice; string skcId = ""; string productId = ""; string productName = ""; @@ -31,7 +33,8 @@ namespace TemuKJD.KJDForms.ProductForms TemuListProductInfo productInfo = null; WarehouseProductSubOrderInfo wareHouseOrderInfo = null; Dictionary dicAdjustReason = new Dictionary(); - public bool IsAdjustPrice = false; + public string ErrMsg = ""; + public bool IsAdjustPrice = false; // 是否调价成功 public ProductChangePriceForm(ShopLoginInfo _shop, WarehouseProductSubOrderInfo _wareHouseOrderInfo) { @@ -44,7 +47,7 @@ namespace TemuKJD.KJDForms.ProductForms } //TemuListProductInfo - public ProductChangePriceForm(ShopLoginInfo _shop, TemuListProductInfo _prod) + public ProductChangePriceForm(ShopLoginInfo _shop, TemuListProductInfo _prod, decimal _wantPrice = 0) { InitializeComponent(); shop = _shop; @@ -52,6 +55,7 @@ namespace TemuKJD.KJDForms.ProductForms skcId = productInfo?.productSkcId.ParseToString(); productId = productInfo?.productId.ParseToString(); productName = productInfo?.productName.ParseToString(); + wantPrice = _wantPrice; } private void ProductChangePriceForm_Load(object sender, EventArgs e) @@ -88,6 +92,10 @@ namespace TemuKJD.KJDForms.ProductForms { pbLoading.Visible = false; })); + if (IsAuto) + { + SaveNewPrice(); + } }); } @@ -95,20 +103,29 @@ namespace TemuKJD.KJDForms.ProductForms { if (shop == null || productId.IsNullOrEmpty() || skcId.IsNullOrEmpty() || productName.IsNullOrEmpty()) { - BaseMsgForm.ShowError("店铺商品信息为空!"); + if (IsAuto) + ErrMsg = "店铺商品信息为空!"; + else + BaseMsgForm.ShowError("店铺商品信息为空!"); return; } #region 检测登录 if (shop.LoginStatus2 != "国际版在线") { - BaseMsgForm.ShowError("店铺未登录!"); + if (IsAuto) + ErrMsg = "店铺未登录!"; + else + BaseMsgForm.ShowError("店铺未登录!"); return; } ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); if (shop.LoginStatus2 != "国际版在线") { - BaseMsgForm.ShowError("店铺未登录!"); + if (IsAuto) + ErrMsg = "店铺未登录!"; + else + BaseMsgForm.ShowError("店铺未登录!"); return; } #endregion @@ -129,7 +146,10 @@ namespace TemuKJD.KJDForms.ProductForms if (string.IsNullOrEmpty(sErr)) sErr = adjustRst; - BaseMsgForm.ShowError("查询失败:" + sErr); + if (IsAuto) + ErrMsg = "查询失败:" + sErr; + else + BaseMsgForm.ShowError("查询失败:" + sErr); return; } @@ -142,6 +162,7 @@ namespace TemuKJD.KJDForms.ProductForms foreach (var item in adjustPriceInfo.spuAdjustResult[productId].skcItems[0].items) { int mainRowId = -1; + // 修改日常价格 Invoke(new Action(() => { mainRowId = this.dgvOrder.Rows.Add( @@ -153,7 +174,7 @@ namespace TemuKJD.KJDForms.ProductForms "", "日常价格", //申报价格类型 item.originSupplyPrice.ParseToDecimal() / 100m, //原申报价格 - "", //调整后的申报价格 + wantPrice == 0 ? "" : wantPrice.ToString("0.00"), //调整后的申报价格 "调价成功之后生成的交易订单", "" ); @@ -161,13 +182,14 @@ namespace TemuKJD.KJDForms.ProductForms })); if (item?.marketingActivityPriceDTOList == null) continue; + // 修改活动价格 foreach (var activityPriceDTO in item.marketingActivityPriceDTOList) { int rowId = -1; Invoke(new Action(() => { rowId = this.dgvOrder.Rows.Add( - true, + IsAuto ? false : true, productId, skcId, item.productSkuId, @@ -285,9 +307,22 @@ namespace TemuKJD.KJDForms.ProductForms } } - private async void btnSave_Click(object sender, EventArgs e) + public async void btnSave_Click(object sender, EventArgs e) { txtReason.Focus(); + await Task.Run(() => + { + Thread.Sleep(10); + }); + Task.Run(() => + { + SaveNewPrice(); + }); + } + + public void SaveNewPrice() + { + if (shop == null || productId.IsNullOrEmpty() || skcId.IsNullOrEmpty() || productName.IsNullOrEmpty()) { BaseMsgForm.ShowError("店铺商品信息为空!"); @@ -310,62 +345,70 @@ namespace TemuKJD.KJDForms.ProductForms } } - pbLoading.Visible = true; + Invoke(new Action(() => + { + pbLoading.Visible = true; + })); #region 检测登录 if (shop.LoginStatus2 != "国际版在线") { - BaseMsgForm.ShowError("店铺未登录!"); + if (IsAuto) + ErrMsg = "店铺未登录!"; + else + BaseMsgForm.ShowError("店铺未登录!"); pbLoading.Visible = false; return; } ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); if (shop.LoginStatus2 != "国际版在线") { - BaseMsgForm.ShowError("店铺未登录!"); + if (IsAuto) + ErrMsg = "店铺未登录!"; + else + BaseMsgForm.ShowError("店铺未登录!"); pbLoading.Visible = false; return; } #endregion - await Task.Run(() => - { - Thread.Sleep(200); - }); AdjustParam param = new AdjustParam(); - if (dicAdjustReason.Keys.Contains(cmbChangePriceReason.Text)) - param.adjustReason = dicAdjustReason[cmbChangePriceReason.Text]; - if (!string.IsNullOrWhiteSpace(txtReason.Text)) - param.reason = txtReason.Text.Trim(); - param.adjustItems = new List(); - adjustItem adjustItem = new adjustItem() + Invoke(new Action(() => { - productId = this.productId.ParseToLong(), - productName = this.productName, - productSkcId = this.skcId.ParseToLong(), - supplierId = this.shop.ShopId.ParseToLong(), - }; - param.adjustItems.Add(adjustItem); - adjustItem.skuAdjustList = new List(); - foreach (DataGridViewRow row in dgvOrder.Rows) - { - if (row.Cells["colSelect"].Value.ParseToBool() == true) + if (dicAdjustReason.Keys.Contains(cmbChangePriceReason.Text)) + param.adjustReason = dicAdjustReason[cmbChangePriceReason.Text]; + if (!string.IsNullOrWhiteSpace(txtReason.Text)) + param.reason = txtReason.Text.Trim(); + param.adjustItems = new List(); + adjustItem adjustItem = new adjustItem() { - var adjItem = new skuAdjust + productId = this.productId.ParseToLong(), + productName = this.productName, + productSkcId = this.skcId.ParseToLong(), + supplierId = this.shop.ShopId.ParseToLong(), + }; + param.adjustItems.Add(adjustItem); + adjustItem.skuAdjustList = new List(); + foreach (DataGridViewRow row in dgvOrder.Rows) + { + if (row.Cells["colSelect"].Value.ParseToBool() == true) { - activityInvitationId = row.Cells["colAdjustPriceTypeId"].Value.ParseToLong(), - oldPriceCurrency = "CNY", - targetPriceCurrency = "CNY", - oldSupplyPrice = (row.Cells["colSkuPrice"].Value.ParseToDecimal() * 100).ParseToInt(), - syncPurchasePrice = 1, - targetSupplyPrice = (row.Cells["colSkuNewPrice"].Value.ParseToDecimal() * 100).ParseToInt(), - skuId = row.Cells["colSkuId"].Value.ParseToLong(), - }; - adjustItem.skuAdjustList.Add(adjItem); - if (adjItem.activityInvitationId == 0) - adjItem.activityInvitationId = null; + var adjItem = new skuAdjust + { + activityInvitationId = row.Cells["colAdjustPriceTypeId"].Value.ParseToLong(), + oldPriceCurrency = "CNY", + targetPriceCurrency = "CNY", + oldSupplyPrice = (row.Cells["colSkuPrice"].Value.ParseToDecimal() * 100).ParseToInt(), + syncPurchasePrice = 1, + targetSupplyPrice = (row.Cells["colSkuNewPrice"].Value.ParseToDecimal() * 100).ParseToInt(), + skuId = row.Cells["colSkuId"].Value.ParseToLong(), + }; + adjustItem.skuAdjustList.Add(adjItem); + if (adjItem.activityInvitationId == 0) + adjItem.activityInvitationId = null; + } } - } + })); int tryCount = 0; tryAgain: @@ -385,49 +428,67 @@ namespace TemuKJD.KJDForms.ProductForms sErr = adjustBatchRst; sErr = sErr.Replace("\\n", "\n").Replace("\n", "\r\n").Replace("\r\r", "\r"); - BaseMsgForm.ShowError("调价失败:" + sErr); - pbLoading.Visible = false; + if (IsAuto) + ErrMsg = "调价失败:" + sErr; + else + BaseMsgForm.ShowError("调价失败:" + sErr); + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); return; } - IsAdjustPrice = true; // 更新统计列表的数据价格 foreach (DataGridViewRow row in dgvOrder.Rows) { - if (row.Cells["colSelect"].Value.ParseToBool() == true) + Invoke(new Action(() => { - var adjItem = new skuAdjust + if (row.Cells["colSelect"].Value.ParseToBool() == true) { - activityInvitationId = row.Cells["colAdjustPriceTypeId"].Value.ParseToLong(), - oldPriceCurrency = "CNY", - targetPriceCurrency = "CNY", - oldSupplyPrice = (row.Cells["colSkuPrice"].Value.ParseToDecimal() * 100).ParseToInt(), - syncPurchasePrice = 1, - targetSupplyPrice = (row.Cells["colSkuNewPrice"].Value.ParseToDecimal() * 100).ParseToInt(), - skuId = row.Cells["colSkuId"].Value.ParseToLong(), - }; - if (adjItem.activityInvitationId == 0) // 为0的是商品基础价格,否则是活动价格 - { - if (wareHouseOrderInfo != null) + var adjItem = new skuAdjust { - var sku = wareHouseOrderInfo.skuQuantityDetailList.FirstOrDefault(s => s.productSkuId.ParseToLong() == adjItem.skuId); - if (sku != null) - sku.supplierPrice = adjItem.targetSupplyPrice; - } - if (productInfo != null) + activityInvitationId = row.Cells["colAdjustPriceTypeId"].Value.ParseToLong(), + oldPriceCurrency = "CNY", + targetPriceCurrency = "CNY", + oldSupplyPrice = (row.Cells["colSkuPrice"].Value.ParseToDecimal() * 100).ParseToInt(), + syncPurchasePrice = 1, + targetSupplyPrice = (row.Cells["colSkuNewPrice"].Value.ParseToDecimal() * 100).ParseToInt(), + skuId = row.Cells["colSkuId"].Value.ParseToLong(), + }; + if (adjItem.activityInvitationId == 0) // 为0的是商品基础价格,否则是活动价格 { - var sku = productInfo.productSkuSummaries.FirstOrDefault(s => s.productSkuId.ParseToLong() == adjItem.skuId); - if (sku!= null) + if (wareHouseOrderInfo != null) { - sku.supplierPrice = adjItem.targetSupplyPrice; + var sku = wareHouseOrderInfo.skuQuantityDetailList.FirstOrDefault(s => s.productSkuId.ParseToLong() == adjItem.skuId); + if (sku != null) + sku.supplierPrice = adjItem.targetSupplyPrice; + } + if (productInfo != null) + { + var sku = productInfo.productSkuSummaries.FirstOrDefault(s => s.productSkuId.ParseToLong() == adjItem.skuId); + if (sku != null) + { + sku.supplierPrice = adjItem.targetSupplyPrice; + } } } } - } + })); + } + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); + IsAdjustPrice = true; + if (!IsAuto) + { + BaseMsgForm.ShowInfo("调价成功!"); + Invoke(new Action(() => + { + this.Close(); + })); } - BaseMsgForm.ShowInfo("调价成功!"); - pbLoading.Visible = false; - this.Close(); } } diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs index 692bdb5..b7ff8ae 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs @@ -41,21 +41,30 @@ namespace TemuKJD.KJDForms.ProductForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.line3 = new DevComponents.DotNetBar.Controls.Line(); + this.line2 = new DevComponents.DotNetBar.Controls.Line(); + this.line1 = new DevComponents.DotNetBar.Controls.Line(); + this.chkFilterNotJit = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.btnSetReceiveArea = new DevComponents.DotNetBar.PanelEx(); + this.dgvExtCode = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelectExtCode = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colFilterExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.label6 = new System.Windows.Forms.Label(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.btnAddRealPic = new DevComponents.DotNetBar.PanelEx(); this.btnBatchJit = new DevComponents.DotNetBar.PanelEx(); this.rbYiwu = new System.Windows.Forms.RadioButton(); this.rbGuangdong = new System.Windows.Forms.RadioButton(); - this.label11 = new System.Windows.Forms.Label(); this.txtBatchStock = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); this.pbRealPicture = new System.Windows.Forms.PictureBox(); this.txtBatchIdentifyCode = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); this.txtBatchPriceMax = new System.Windows.Forms.TextBox(); this.txtBatchPriceMin = new System.Windows.Forms.TextBox(); - this.txtBatchExtCode = new System.Windows.Forms.TextBox(); this.btnSearch1 = new DevComponents.DotNetBar.PanelEx(); this.btnResetExtCode = new DevComponents.DotNetBar.PanelEx(); this.txtExtCode = new System.Windows.Forms.TextBox(); @@ -63,7 +72,6 @@ namespace TemuKJD.KJDForms.ProductForms this.chkSearchTime = new TemuKJD.UserComponent.UcCheckBox(this.components); this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); - this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.btnSearch2 = new DevComponents.DotNetBar.PanelEx(); this.txtSpuId = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); @@ -76,14 +84,20 @@ namespace TemuKJD.KJDForms.ProductForms this.txtShopId = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); + this.chkBatchIdentifyCode = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkBatchPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkBatchRealPicture = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkBatchStock = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkBatchJit = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkFilterJit = new TemuKJD.UserComponent.UcCheckBox(this.components); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbShopLoading = new System.Windows.Forms.PictureBox(); this.chkSearchAllShop = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.txtBatchExtCode = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnCancelJit = new DevComponents.DotNetBar.PanelEx(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -99,6 +113,10 @@ namespace TemuKJD.KJDForms.ProductForms this.btnClose = new DevComponents.DotNetBar.PanelEx(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.dgvOpenJit = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colProdIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOrderId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -121,16 +139,12 @@ namespace TemuKJD.KJDForms.ProductForms this.colStock = new System.Windows.Forms.DataGridViewLinkColumn(); this.colRecevieArea = new System.Windows.Forms.DataGridViewLinkColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvExtCode)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbRealPicture)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); @@ -167,8 +181,8 @@ namespace TemuKJD.KJDForms.ProductForms // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); - this.splitContainer1.Size = new System.Drawing.Size(1496, 611); - this.splitContainer1.SplitterDistance = 130; + this.splitContainer1.Size = new System.Drawing.Size(1584, 611); + this.splitContainer1.SplitterDistance = 140; this.splitContainer1.TabIndex = 12; // // ucGroupBoxEx1 @@ -178,19 +192,24 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.line3); + this.ucGroupBoxEx1.Controls.Add(this.line2); + this.ucGroupBoxEx1.Controls.Add(this.line1); + this.ucGroupBoxEx1.Controls.Add(this.chkFilterNotJit); + this.ucGroupBoxEx1.Controls.Add(this.btnSetReceiveArea); + this.ucGroupBoxEx1.Controls.Add(this.dgvExtCode); + this.ucGroupBoxEx1.Controls.Add(this.label6); + this.ucGroupBoxEx1.Controls.Add(this.panelEx1); + this.ucGroupBoxEx1.Controls.Add(this.btnStop); this.ucGroupBoxEx1.Controls.Add(this.btnAddRealPic); this.ucGroupBoxEx1.Controls.Add(this.btnBatchJit); this.ucGroupBoxEx1.Controls.Add(this.rbYiwu); this.ucGroupBoxEx1.Controls.Add(this.rbGuangdong); - this.ucGroupBoxEx1.Controls.Add(this.label11); this.ucGroupBoxEx1.Controls.Add(this.txtBatchStock); - this.ucGroupBoxEx1.Controls.Add(this.label10); this.ucGroupBoxEx1.Controls.Add(this.pbRealPicture); this.ucGroupBoxEx1.Controls.Add(this.txtBatchIdentifyCode); - this.ucGroupBoxEx1.Controls.Add(this.label8); this.ucGroupBoxEx1.Controls.Add(this.txtBatchPriceMax); this.ucGroupBoxEx1.Controls.Add(this.txtBatchPriceMin); - this.ucGroupBoxEx1.Controls.Add(this.txtBatchExtCode); this.ucGroupBoxEx1.Controls.Add(this.btnSearch1); this.ucGroupBoxEx1.Controls.Add(this.btnResetExtCode); this.ucGroupBoxEx1.Controls.Add(this.txtExtCode); @@ -198,7 +217,6 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx1.Controls.Add(this.chkSearchTime); this.ucGroupBoxEx1.Controls.Add(this.dtpEndTime); this.ucGroupBoxEx1.Controls.Add(this.dtpStartTime); - this.ucGroupBoxEx1.Controls.Add(this.btnStop); this.ucGroupBoxEx1.Controls.Add(this.btnSearch2); this.ucGroupBoxEx1.Controls.Add(this.txtSpuId); this.ucGroupBoxEx1.Controls.Add(this.label7); @@ -211,23 +229,196 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx1.Controls.Add(this.txtShopId); this.ucGroupBoxEx1.Controls.Add(this.label2); this.ucGroupBoxEx1.Controls.Add(this.label3); - this.ucGroupBoxEx1.Controls.Add(this.label1); - this.ucGroupBoxEx1.Controls.Add(this.label6); - this.ucGroupBoxEx1.Controls.Add(this.label9); this.ucGroupBoxEx1.Controls.Add(this.label13); + this.ucGroupBoxEx1.Controls.Add(this.chkBatchIdentifyCode); + this.ucGroupBoxEx1.Controls.Add(this.chkBatchPrice); + this.ucGroupBoxEx1.Controls.Add(this.chkBatchRealPicture); + this.ucGroupBoxEx1.Controls.Add(this.chkBatchStock); + this.ucGroupBoxEx1.Controls.Add(this.chkBatchJit); + this.ucGroupBoxEx1.Controls.Add(this.chkFilterJit); this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(1491, 130); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(1579, 140); this.ucGroupBoxEx1.TabIndex = 399; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "参数设置"; // + // line3 + // + this.line3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line3.Location = new System.Drawing.Point(273, 21); + this.line3.Name = "line3"; + this.line3.Size = new System.Drawing.Size(11, 104); + this.line3.TabIndex = 1265; + this.line3.Text = "line3"; + this.line3.VerticalLine = true; + // + // line2 + // + this.line2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line2.Location = new System.Drawing.Point(1410, 21); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(11, 76); + this.line2.TabIndex = 1264; + this.line2.Text = "line2"; + this.line2.VerticalLine = true; + // + // line1 + // + this.line1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line1.Location = new System.Drawing.Point(600, 21); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(11, 104); + this.line1.TabIndex = 1263; + this.line1.Text = "line1"; + this.line1.VerticalLine = true; + // + // chkFilterNotJit + // + this.chkFilterNotJit.AutoSize = true; + this.chkFilterNotJit.ForeColor = System.Drawing.Color.Green; + this.chkFilterNotJit.Location = new System.Drawing.Point(1268, 70); + this.chkFilterNotJit.Name = "chkFilterNotJit"; + this.chkFilterNotJit.Size = new System.Drawing.Size(127, 21); + this.chkFilterNotJit.TabIndex = 1232; + this.chkFilterNotJit.Text = "隐藏未开通JIT商品"; + this.chkFilterNotJit.UseVisualStyleBackColor = true; + this.chkFilterNotJit.CheckedChanged += new System.EventHandler(this.chkFilterNotJit_CheckedChanged); + // + // btnSetReceiveArea + // + this.btnSetReceiveArea.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSetReceiveArea.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSetReceiveArea.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSetReceiveArea.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSetReceiveArea.Location = new System.Drawing.Point(1441, 19); + this.btnSetReceiveArea.Name = "btnSetReceiveArea"; + this.btnSetReceiveArea.Size = new System.Drawing.Size(116, 23); + this.btnSetReceiveArea.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSetReceiveArea.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSetReceiveArea.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSetReceiveArea.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSetReceiveArea.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSetReceiveArea.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSetReceiveArea.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSetReceiveArea.Style.GradientAngle = 90; + this.btnSetReceiveArea.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSetReceiveArea.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSetReceiveArea.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSetReceiveArea.TabIndex = 1203; + this.btnSetReceiveArea.Text = "全店设置到货区域"; + this.btnSetReceiveArea.Click += new System.EventHandler(this.btnSetReceiveArea_Click); + // + // dgvExtCode + // + this.dgvExtCode.AllowUserToAddRows = false; + this.dgvExtCode.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvExtCode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvExtCode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvExtCode.BackgroundColor = System.Drawing.Color.White; + this.dgvExtCode.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvExtCode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvExtCode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelectExtCode, + this.colFilterExtCode}); + this.dgvExtCode.Location = new System.Drawing.Point(651, 17); + this.dgvExtCode.Name = "dgvExtCode"; + this.dgvExtCode.ReadOnly = true; + this.dgvExtCode.RowHeadersWidth = 24; + this.dgvExtCode.RowTemplate.Height = 23; + this.dgvExtCode.Size = new System.Drawing.Size(203, 113); + this.dgvExtCode.TabIndex = 684; + this.dgvExtCode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvExtCode_CellContentClick); + // + // colSelectExtCode + // + this.colSelectExtCode.FillWeight = 33F; + this.colSelectExtCode.HeaderText = "选"; + this.colSelectExtCode.Name = "colSelectExtCode"; + this.colSelectExtCode.ReadOnly = true; + this.colSelectExtCode.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelectExtCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colFilterExtCode + // + this.colFilterExtCode.FillWeight = 170F; + this.colFilterExtCode.HeaderText = "货号"; + this.colFilterExtCode.Name = "colFilterExtCode"; + this.colFilterExtCode.ReadOnly = true; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(617, 20); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(44, 17); + this.label6.TabIndex = 1172; + this.label6.Text = "货号:"; + // + // panelEx1 + // + this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(1447, 105); + 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.btnCancel_Click); + // + // btnStop + // + this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStop.Location = new System.Drawing.Point(293, 107); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(66, 23); + this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 999; + this.btnStop.Text = "停止查询"; + this.btnStop.Visible = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // // btnAddRealPic // this.btnAddRealPic.CanvasColor = System.Drawing.SystemColors.Control; this.btnAddRealPic.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnAddRealPic.DisabledBackColor = System.Drawing.Color.Empty; - this.btnAddRealPic.Location = new System.Drawing.Point(875, 86); + this.btnAddRealPic.Location = new System.Drawing.Point(1011, 103); this.btnAddRealPic.Name = "btnAddRealPic"; this.btnAddRealPic.Size = new System.Drawing.Size(37, 23); this.btnAddRealPic.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -243,7 +434,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnAddRealPic.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnAddRealPic.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnAddRealPic.TabIndex = 1086; - this.btnAddRealPic.Text = "选择"; + this.btnAddRealPic.Text = "选图"; this.btnAddRealPic.Click += new System.EventHandler(this.btnAddRealPic_Click); // // btnBatchJit @@ -252,9 +443,9 @@ namespace TemuKJD.KJDForms.ProductForms this.btnBatchJit.Cursor = System.Windows.Forms.Cursors.Hand; this.btnBatchJit.DisabledBackColor = System.Drawing.Color.Empty; this.btnBatchJit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnBatchJit.Location = new System.Drawing.Point(1203, 27); + this.btnBatchJit.Location = new System.Drawing.Point(1268, 19); this.btnBatchJit.Name = "btnBatchJit"; - this.btnBatchJit.Size = new System.Drawing.Size(95, 23); + this.btnBatchJit.Size = new System.Drawing.Size(116, 23); this.btnBatchJit.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnBatchJit.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnBatchJit.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -267,13 +458,13 @@ namespace TemuKJD.KJDForms.ProductForms this.btnBatchJit.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnBatchJit.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnBatchJit.TabIndex = 1061; - this.btnBatchJit.Text = "批量加入JIT"; + this.btnBatchJit.Text = "批量开通/修改JIT"; this.btnBatchJit.Click += new System.EventHandler(this.btnBatchJit_Click); // // rbYiwu // this.rbYiwu.AutoSize = true; - this.rbYiwu.Location = new System.Drawing.Point(1129, 58); + this.rbYiwu.Location = new System.Drawing.Point(1497, 47); this.rbYiwu.Name = "rbYiwu"; this.rbYiwu.Size = new System.Drawing.Size(50, 21); this.rbYiwu.TabIndex = 1057; @@ -284,7 +475,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.rbGuangdong.AutoSize = true; this.rbGuangdong.Checked = true; - this.rbGuangdong.Location = new System.Drawing.Point(1077, 58); + this.rbGuangdong.Location = new System.Drawing.Point(1441, 47); this.rbGuangdong.Name = "rbGuangdong"; this.rbGuangdong.Size = new System.Drawing.Size(50, 21); this.rbGuangdong.TabIndex = 1056; @@ -292,84 +483,51 @@ namespace TemuKJD.KJDForms.ProductForms this.rbGuangdong.Text = "广东"; this.rbGuangdong.UseVisualStyleBackColor = true; // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(1015, 60); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(68, 17); - this.label11.TabIndex = 1055; - this.label11.Text = "期望到货:"; - // // txtBatchStock // - this.txtBatchStock.Location = new System.Drawing.Point(1073, 27); + this.txtBatchStock.Location = new System.Drawing.Point(1172, 103); this.txtBatchStock.Name = "txtBatchStock"; - this.txtBatchStock.Size = new System.Drawing.Size(106, 23); + this.txtBatchStock.Size = new System.Drawing.Size(80, 23); this.txtBatchStock.TabIndex = 1054; // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(1015, 30); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(68, 17); - this.label10.TabIndex = 1053; - this.label10.Text = "设置库存:"; - // // pbRealPicture // - this.pbRealPicture.Location = new System.Drawing.Point(918, 27); + this.pbRealPicture.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pbRealPicture.Location = new System.Drawing.Point(1052, 19); this.pbRealPicture.Name = "pbRealPicture"; - this.pbRealPicture.Size = new System.Drawing.Size(82, 82); + this.pbRealPicture.Size = new System.Drawing.Size(108, 108); this.pbRealPicture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbRealPicture.TabIndex = 1051; this.pbRealPicture.TabStop = false; // // txtBatchIdentifyCode // - this.txtBatchIdentifyCode.Location = new System.Drawing.Point(701, 86); + this.txtBatchIdentifyCode.Location = new System.Drawing.Point(871, 103); this.txtBatchIdentifyCode.Name = "txtBatchIdentifyCode"; - this.txtBatchIdentifyCode.Size = new System.Drawing.Size(156, 23); + this.txtBatchIdentifyCode.Size = new System.Drawing.Size(111, 23); this.txtBatchIdentifyCode.TabIndex = 1048; // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(631, 89); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(80, 17); - this.label8.TabIndex = 1050; - this.label8.Text = "商品识别码:"; - // // txtBatchPriceMax // - this.txtBatchPriceMax.Location = new System.Drawing.Point(785, 57); + this.txtBatchPriceMax.Location = new System.Drawing.Point(930, 42); this.txtBatchPriceMax.Name = "txtBatchPriceMax"; - this.txtBatchPriceMax.Size = new System.Drawing.Size(72, 23); + this.txtBatchPriceMax.Size = new System.Drawing.Size(52, 23); this.txtBatchPriceMax.TabIndex = 1046; // // txtBatchPriceMin // - this.txtBatchPriceMin.Location = new System.Drawing.Point(701, 57); + this.txtBatchPriceMin.Location = new System.Drawing.Point(871, 42); this.txtBatchPriceMin.Name = "txtBatchPriceMin"; - this.txtBatchPriceMin.Size = new System.Drawing.Size(72, 23); + this.txtBatchPriceMin.Size = new System.Drawing.Size(52, 23); this.txtBatchPriceMin.TabIndex = 1045; // - // txtBatchExtCode - // - this.txtBatchExtCode.Location = new System.Drawing.Point(701, 27); - this.txtBatchExtCode.Name = "txtBatchExtCode"; - this.txtBatchExtCode.Size = new System.Drawing.Size(156, 23); - this.txtBatchExtCode.TabIndex = 1043; - // // btnSearch1 // this.btnSearch1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnSearch1.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearch1.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearch1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearch1.Location = new System.Drawing.Point(301, 98); + this.btnSearch1.Location = new System.Drawing.Point(361, 107); this.btnSearch1.Name = "btnSearch1"; this.btnSearch1.Size = new System.Drawing.Size(110, 23); this.btnSearch1.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -392,7 +550,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnResetExtCode.CanvasColor = System.Drawing.SystemColors.Control; this.btnResetExtCode.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnResetExtCode.DisabledBackColor = System.Drawing.Color.Empty; - this.btnResetExtCode.Location = new System.Drawing.Point(525, 44); + this.btnResetExtCode.Location = new System.Drawing.Point(517, 47); this.btnResetExtCode.Name = "btnResetExtCode"; this.btnResetExtCode.Size = new System.Drawing.Size(66, 23); this.btnResetExtCode.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -413,7 +571,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtExtCode // - this.txtExtCode.Location = new System.Drawing.Point(340, 44); + this.txtExtCode.Location = new System.Drawing.Point(332, 47); this.txtExtCode.Name = "txtExtCode"; this.txtExtCode.Size = new System.Drawing.Size(182, 23); this.txtExtCode.TabIndex = 1003; @@ -421,7 +579,7 @@ namespace TemuKJD.KJDForms.ProductForms // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(306, 47); + this.label12.Location = new System.Drawing.Point(298, 50); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(44, 17); this.label12.TabIndex = 1004; @@ -432,7 +590,7 @@ namespace TemuKJD.KJDForms.ProductForms this.chkSearchTime.AutoSize = true; this.chkSearchTime.Checked = true; this.chkSearchTime.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSearchTime.Location = new System.Drawing.Point(301, 74); + this.chkSearchTime.Location = new System.Drawing.Point(293, 81); this.chkSearchTime.Name = "chkSearchTime"; this.chkSearchTime.Size = new System.Drawing.Size(15, 14); this.chkSearchTime.TabIndex = 1002; @@ -440,48 +598,25 @@ namespace TemuKJD.KJDForms.ProductForms // // dtpEndTime // - this.dtpEndTime.Location = new System.Drawing.Point(455, 71); + this.dtpEndTime.Location = new System.Drawing.Point(447, 77); this.dtpEndTime.Name = "dtpEndTime"; this.dtpEndTime.Size = new System.Drawing.Size(136, 23); this.dtpEndTime.TabIndex = 1001; // // dtpStartTime // - this.dtpStartTime.Location = new System.Drawing.Point(317, 71); + this.dtpStartTime.Location = new System.Drawing.Point(309, 77); this.dtpStartTime.Name = "dtpStartTime"; this.dtpStartTime.Size = new System.Drawing.Size(136, 23); this.dtpStartTime.TabIndex = 1000; // - // btnStop - // - this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; - this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop.Location = new System.Drawing.Point(525, 98); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(66, 23); - this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnStop.Style.GradientAngle = 90; - this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnStop.TabIndex = 999; - this.btnStop.Text = "停止查询"; - // // btnSearch2 // this.btnSearch2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnSearch2.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearch2.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearch2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearch2.Location = new System.Drawing.Point(413, 98); + this.btnSearch2.Location = new System.Drawing.Point(473, 107); this.btnSearch2.Name = "btnSearch2"; this.btnSearch2.Size = new System.Drawing.Size(110, 23); this.btnSearch2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -501,7 +636,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtSpuId // - this.txtSpuId.Location = new System.Drawing.Point(340, 17); + this.txtSpuId.Location = new System.Drawing.Point(332, 17); this.txtSpuId.Name = "txtSpuId"; this.txtSpuId.Size = new System.Drawing.Size(251, 23); this.txtSpuId.TabIndex = 997; @@ -509,7 +644,7 @@ namespace TemuKJD.KJDForms.ProductForms // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(298, 20); + this.label7.Location = new System.Drawing.Point(288, 20); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(54, 17); this.label7.TabIndex = 998; @@ -520,7 +655,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(213, 98); + this.btnEmpty.Location = new System.Drawing.Point(213, 107); this.btnEmpty.Name = "btnEmpty"; this.btnEmpty.Size = new System.Drawing.Size(40, 23); this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -543,7 +678,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.label5.AutoSize = true; this.label5.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label5.Location = new System.Drawing.Point(15, 101); + this.label5.Location = new System.Drawing.Point(15, 110); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(128, 17); this.label5.TabIndex = 685; @@ -551,7 +686,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtNotes // - this.txtNotes.Location = new System.Drawing.Point(70, 71); + this.txtNotes.Location = new System.Drawing.Point(70, 77); this.txtNotes.Name = "txtNotes"; this.txtNotes.Size = new System.Drawing.Size(183, 23); this.txtNotes.TabIndex = 382; @@ -559,7 +694,7 @@ namespace TemuKJD.KJDForms.ProductForms // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(13, 74); + this.label4.Location = new System.Drawing.Point(13, 80); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(68, 17); this.label4.TabIndex = 383; @@ -571,7 +706,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRefreshShop.Location = new System.Drawing.Point(145, 98); + this.btnRefreshShop.Location = new System.Drawing.Point(145, 107); this.btnRefreshShop.Name = "btnRefreshShop"; this.btnRefreshShop.Size = new System.Drawing.Size(65, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -591,7 +726,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtShopName // - this.txtShopName.Location = new System.Drawing.Point(70, 44); + this.txtShopName.Location = new System.Drawing.Point(70, 47); this.txtShopName.Name = "txtShopName"; this.txtShopName.Size = new System.Drawing.Size(183, 23); this.txtShopName.TabIndex = 380; @@ -615,48 +750,93 @@ namespace TemuKJD.KJDForms.ProductForms // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(25, 47); + this.label3.Location = new System.Drawing.Point(25, 50); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(56, 17); this.label3.TabIndex = 381; this.label3.Text = "店铺名:"; // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(643, 30); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(68, 17); - this.label1.TabIndex = 1044; - this.label1.Text = "处理货号:"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(643, 60); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(68, 17); - this.label6.TabIndex = 1047; - this.label6.Text = "价格范围:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(872, 30); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(56, 17); - this.label9.TabIndex = 1052; - this.label9.Text = "实拍图:"; - // // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(773, 60); + this.label13.Location = new System.Drawing.Point(921, 45); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(13, 17); this.label13.TabIndex = 1062; this.label13.Text = "-"; // + // chkBatchIdentifyCode + // + this.chkBatchIdentifyCode.AutoSize = true; + this.chkBatchIdentifyCode.Checked = true; + this.chkBatchIdentifyCode.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkBatchIdentifyCode.Location = new System.Drawing.Point(871, 81); + this.chkBatchIdentifyCode.Name = "chkBatchIdentifyCode"; + this.chkBatchIdentifyCode.Size = new System.Drawing.Size(99, 21); + this.chkBatchIdentifyCode.TabIndex = 1111; + this.chkBatchIdentifyCode.Text = "商品识别码:"; + this.chkBatchIdentifyCode.UseVisualStyleBackColor = true; + // + // chkBatchPrice + // + this.chkBatchPrice.AutoSize = true; + this.chkBatchPrice.Checked = true; + this.chkBatchPrice.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkBatchPrice.Location = new System.Drawing.Point(871, 20); + this.chkBatchPrice.Name = "chkBatchPrice"; + this.chkBatchPrice.Size = new System.Drawing.Size(87, 21); + this.chkBatchPrice.TabIndex = 1112; + this.chkBatchPrice.Text = "价格范围:"; + this.chkBatchPrice.UseVisualStyleBackColor = true; + // + // chkBatchRealPicture + // + this.chkBatchRealPicture.AutoSize = true; + this.chkBatchRealPicture.Checked = true; + this.chkBatchRealPicture.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkBatchRealPicture.Location = new System.Drawing.Point(993, 20); + this.chkBatchRealPicture.Name = "chkBatchRealPicture"; + this.chkBatchRealPicture.Size = new System.Drawing.Size(75, 21); + this.chkBatchRealPicture.TabIndex = 1113; + this.chkBatchRealPicture.Text = "实拍图:"; + this.chkBatchRealPicture.UseVisualStyleBackColor = true; + // + // chkBatchStock + // + this.chkBatchStock.AutoSize = true; + this.chkBatchStock.Checked = true; + this.chkBatchStock.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkBatchStock.Location = new System.Drawing.Point(1172, 81); + this.chkBatchStock.Name = "chkBatchStock"; + this.chkBatchStock.Size = new System.Drawing.Size(87, 21); + this.chkBatchStock.TabIndex = 1114; + this.chkBatchStock.Text = "设置库存:"; + this.chkBatchStock.UseVisualStyleBackColor = true; + // + // chkBatchJit + // + this.chkBatchJit.AutoSize = true; + this.chkBatchJit.Checked = true; + this.chkBatchJit.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkBatchJit.Location = new System.Drawing.Point(1172, 20); + this.chkBatchJit.Name = "chkBatchJit"; + this.chkBatchJit.Size = new System.Drawing.Size(91, 21); + this.chkBatchJit.TabIndex = 1116; + this.chkBatchJit.Text = "自动开通JIT"; + this.chkBatchJit.UseVisualStyleBackColor = true; + // + // chkFilterJit + // + this.chkFilterJit.AutoSize = true; + this.chkFilterJit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.chkFilterJit.Location = new System.Drawing.Point(1268, 47); + this.chkFilterJit.Name = "chkFilterJit"; + this.chkFilterJit.Size = new System.Drawing.Size(127, 21); + this.chkFilterJit.TabIndex = 1231; + this.chkFilterJit.Text = "隐藏已开通JIT商品"; + this.chkFilterJit.UseVisualStyleBackColor = true; + this.chkFilterJit.CheckedChanged += new System.EventHandler(this.chkFilterJit_CheckedChanged); + // // splitContainer3 // this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; @@ -672,8 +852,8 @@ namespace TemuKJD.KJDForms.ProductForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1496, 477); - this.splitContainer3.SplitterDistance = 447; + this.splitContainer3.Size = new System.Drawing.Size(1584, 467); + this.splitContainer3.SplitterDistance = 437; this.splitContainer3.TabIndex = 1; // // splitContainer2 @@ -687,6 +867,9 @@ namespace TemuKJD.KJDForms.ProductForms // this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); this.splitContainer2.Panel1.Controls.Add(this.chkSearchAllShop); + this.splitContainer2.Panel1.Controls.Add(this.txtBatchExtCode); + this.splitContainer2.Panel1.Controls.Add(this.label1); + this.splitContainer2.Panel1.Controls.Add(this.btnCancelJit); this.splitContainer2.Panel1.Controls.Add(this.dgvShop); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); // @@ -696,7 +879,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel2.Controls.Add(this.pbLoading); this.splitContainer2.Panel2.Controls.Add(this.dgvOpenJit); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); - this.splitContainer2.Size = new System.Drawing.Size(1496, 447); + this.splitContainer2.Size = new System.Drawing.Size(1584, 437); this.splitContainer2.SplitterDistance = 280; this.splitContainer2.TabIndex = 0; // @@ -704,7 +887,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbShopLoading.Location = new System.Drawing.Point(115, 198); + this.pbShopLoading.Location = new System.Drawing.Point(115, 193); this.pbShopLoading.Name = "pbShopLoading"; this.pbShopLoading.Size = new System.Drawing.Size(50, 50); this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -723,22 +906,66 @@ namespace TemuKJD.KJDForms.ProductForms this.chkSearchAllShop.UseVisualStyleBackColor = true; this.chkSearchAllShop.Visible = false; // + // txtBatchExtCode + // + this.txtBatchExtCode.Location = new System.Drawing.Point(22, 88); + this.txtBatchExtCode.Multiline = true; + this.txtBatchExtCode.Name = "txtBatchExtCode"; + this.txtBatchExtCode.Size = new System.Drawing.Size(156, 104); + this.txtBatchExtCode.TabIndex = 1043; + this.txtBatchExtCode.Visible = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(19, 68); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(68, 17); + this.label1.TabIndex = 1044; + this.label1.Text = "查询货号:"; + this.label1.Visible = false; + // + // btnCancelJit + // + this.btnCancelJit.CanvasColor = System.Drawing.SystemColors.Control; + this.btnCancelJit.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCancelJit.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCancelJit.Location = new System.Drawing.Point(22, 198); + this.btnCancelJit.Name = "btnCancelJit"; + this.btnCancelJit.Size = new System.Drawing.Size(106, 21); + this.btnCancelJit.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancelJit.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCancelJit.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCancelJit.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnCancelJit.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancelJit.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnCancelJit.Style.GradientAngle = 90; + this.btnCancelJit.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancelJit.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancelJit.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancelJit.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancelJit.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnCancelJit.TabIndex = 1144; + this.btnCancelJit.Text = "停止操作"; + this.btnCancelJit.Visible = false; + this.btnCancelJit.Click += new System.EventHandler(this.btnCancelJit_Click); + // // dgvShop // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -756,7 +983,7 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvShop.ReadOnly = true; this.dgvShop.RowHeadersWidth = 25; this.dgvShop.RowTemplate.Height = 23; - this.dgvShop.Size = new System.Drawing.Size(276, 447); + this.dgvShop.Size = new System.Drawing.Size(276, 437); this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // @@ -841,7 +1068,7 @@ namespace TemuKJD.KJDForms.ProductForms this.pnlSpecDetail.Controls.Add(this.btnClose); this.pnlSpecDetail.Location = new System.Drawing.Point(115, 58); this.pnlSpecDetail.Name = "pnlSpecDetail"; - this.pnlSpecDetail.Size = new System.Drawing.Size(983, 134); + this.pnlSpecDetail.Size = new System.Drawing.Size(1071, 124); this.pnlSpecDetail.TabIndex = 683; this.pnlSpecDetail.Visible = false; // @@ -854,7 +1081,7 @@ namespace TemuKJD.KJDForms.ProductForms this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.textBox1.Size = new System.Drawing.Size(924, 75); + this.textBox1.Size = new System.Drawing.Size(1012, 65); this.textBox1.TabIndex = 690; // // btnClose @@ -864,7 +1091,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand; this.btnClose.DisabledBackColor = System.Drawing.Color.Empty; this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClose.Location = new System.Drawing.Point(894, 98); + this.btnClose.Location = new System.Drawing.Point(982, 88); this.btnClose.Name = "btnClose"; this.btnClose.Size = new System.Drawing.Size(58, 23); this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -886,7 +1113,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(565, 198); + this.pbLoading.Location = new System.Drawing.Point(609, 193); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -898,18 +1125,18 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvOpenJit.AllowUserToAddRows = false; this.dgvOpenJit.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvOpenJit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvOpenJit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.dgvOpenJit.BackgroundColor = System.Drawing.Color.White; this.dgvOpenJit.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvOpenJit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvOpenJit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; this.dgvOpenJit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvOpenJit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -940,10 +1167,80 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvOpenJit.ReadOnly = true; this.dgvOpenJit.RowHeadersWidth = 36; this.dgvOpenJit.RowTemplate.Height = 23; - this.dgvOpenJit.Size = new System.Drawing.Size(1208, 447); + this.dgvOpenJit.Size = new System.Drawing.Size(1296, 437); this.dgvOpenJit.TabIndex = 187; this.dgvOpenJit.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvOpenJit_CellContentClick); // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.statusBar); + this.splitContainer4.Size = new System.Drawing.Size(1584, 26); + this.splitContainer4.SplitterDistance = 282; + this.splitContainer4.TabIndex = 3; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(282, 26); + this.ucSplitPage1.TabIndex = 5; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); + // + // btnClear + // + this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(1204, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1298, 26); + this.statusBar.TabIndex = 2; + // // colCheck // this.colCheck.HeaderText = "选择"; @@ -976,8 +1273,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colSupplierName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle7; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; this.colSupplierName.ReadOnly = true; @@ -1003,7 +1300,6 @@ namespace TemuKJD.KJDForms.ProductForms this.colProductId.HeaderText = "商品Id"; this.colProductId.Name = "colProductId"; this.colProductId.ReadOnly = true; - this.colProductId.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colProductId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colProductId.Width = 85; // @@ -1013,14 +1309,13 @@ namespace TemuKJD.KJDForms.ProductForms this.colProdSkc.HeaderText = "商品SKC"; this.colProdSkc.Name = "colProdSkc"; this.colProdSkc.ReadOnly = true; - this.colProdSkc.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colProdSkc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colProdSkc.Width = 90; // // colProdName // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProdName.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle8; this.colProdName.HeaderText = "标题"; this.colProdName.Name = "colProdName"; this.colProdName.ReadOnly = true; @@ -1028,8 +1323,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colSkuName // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSkuName.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSkuName.DefaultCellStyle = dataGridViewCellStyle9; this.colSkuName.HeaderText = "规格名称"; this.colSkuName.Name = "colSkuName"; this.colSkuName.ReadOnly = true; @@ -1037,12 +1332,11 @@ namespace TemuKJD.KJDForms.ProductForms // // colExtCode // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colExtCode.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colExtCode.DefaultCellStyle = dataGridViewCellStyle10; this.colExtCode.HeaderText = "货号"; this.colExtCode.Name = "colExtCode"; this.colExtCode.ReadOnly = true; - this.colExtCode.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colExtCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colExtCode.Width = 120; // @@ -1062,8 +1356,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colCreatTime // - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colCreatTime.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCreatTime.DefaultCellStyle = dataGridViewCellStyle11; this.colCreatTime.HeaderText = "创建时间"; this.colCreatTime.Name = "colCreatTime"; this.colCreatTime.ReadOnly = true; @@ -1074,18 +1368,16 @@ namespace TemuKJD.KJDForms.ProductForms this.colChangePrice.HeaderText = "调价"; this.colChangePrice.Name = "colChangePrice"; this.colChangePrice.ReadOnly = true; - this.colChangePrice.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colChangePrice.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colChangePrice.Width = 38; // // colCompliance // - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colCompliance.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCompliance.DefaultCellStyle = dataGridViewCellStyle12; this.colCompliance.HeaderText = "合规信息"; this.colCompliance.Name = "colCompliance"; this.colCompliance.ReadOnly = true; - this.colCompliance.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colCompliance.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colCompliance.Width = 65; // @@ -1094,6 +1386,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colRealPicture.HeaderText = "实拍图"; this.colRealPicture.Name = "colRealPicture"; this.colRealPicture.ReadOnly = true; + this.colRealPicture.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colRealPicture.Width = 60; // // colJit @@ -1101,6 +1394,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colJit.HeaderText = "Jit"; this.colJit.Name = "colJit"; this.colJit.ReadOnly = true; + this.colJit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colJit.Width = 60; // // colStock @@ -1108,15 +1402,17 @@ namespace TemuKJD.KJDForms.ProductForms this.colStock.HeaderText = "修改库存"; this.colStock.Name = "colStock"; this.colStock.ReadOnly = true; + this.colStock.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colStock.Width = 65; // // colRecevieArea // - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colRecevieArea.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colRecevieArea.DefaultCellStyle = dataGridViewCellStyle13; this.colRecevieArea.HeaderText = "期望到货"; this.colRecevieArea.Name = "colRecevieArea"; this.colRecevieArea.ReadOnly = true; + this.colRecevieArea.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colRecevieArea.Width = 65; // // colMsg @@ -1124,108 +1420,12 @@ namespace TemuKJD.KJDForms.ProductForms this.colMsg.HeaderText = "状态"; this.colMsg.Name = "colMsg"; this.colMsg.ReadOnly = true; - this.colMsg.Width = 160; - // - // splitContainer4 - // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; - // - // splitContainer4.Panel1 - // - this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1); - // - // splitContainer4.Panel2 - // - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Panel2.Controls.Add(this.statusBar); - this.splitContainer4.Size = new System.Drawing.Size(1496, 26); - this.splitContainer4.SplitterDistance = 282; - this.splitContainer4.TabIndex = 3; - // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; - this.ucSplitPage1.IsShowPageSize = false; - this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.PageSize = 50; - this.ucSplitPage1.Size = new System.Drawing.Size(282, 26); - this.ucSplitPage1.TabIndex = 5; - this.ucSplitPage1.TotalPage = 1; - this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); - // - // panelEx1 - // - this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Location = new System.Drawing.Point(1091, 0); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(115, 21); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.TabIndex = 668; - this.panelEx1.Text = "停止当前操作"; - this.panelEx1.Visible = false; - // - // btnClear - // - this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(997, 0); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1210, 26); - this.statusBar.TabIndex = 2; + this.colMsg.Width = 180; // // TemuJitForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(1496, 611); + this.ClientSize = new System.Drawing.Size(1584, 611); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "TemuJitForm"; @@ -1238,6 +1438,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer1.ResumeLayout(false); this.ucGroupBoxEx1.ResumeLayout(false); this.ucGroupBoxEx1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvExtCode)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbRealPicture)).EndInit(); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); @@ -1290,7 +1491,6 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private UserComponent.UcCheckBox chkSearchAllShop; private System.Windows.Forms.PictureBox pbLoading; - private DevComponents.DotNetBar.PanelEx panelEx1; private DevComponents.DotNetBar.PanelEx btnClear; private UserComponent.DataGridViewEx dgvOpenJit; private System.Windows.Forms.SplitContainer splitContainer4; @@ -1310,6 +1510,35 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.TextBox textBox1; private DevComponents.DotNetBar.PanelEx btnClose; private DevComponents.DotNetBar.PanelEx btnSearch1; + private System.Windows.Forms.TextBox txtBatchExtCode; + private System.Windows.Forms.TextBox txtBatchPriceMax; + private System.Windows.Forms.TextBox txtBatchPriceMin; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtBatchIdentifyCode; + private System.Windows.Forms.PictureBox pbRealPicture; + private DevComponents.DotNetBar.PanelEx btnBatchJit; + private System.Windows.Forms.RadioButton rbYiwu; + private System.Windows.Forms.RadioButton rbGuangdong; + private System.Windows.Forms.TextBox txtBatchStock; + private System.Windows.Forms.Label label13; + private DevComponents.DotNetBar.PanelEx btnAddRealPic; + private UserComponent.UcCheckBox chkBatchIdentifyCode; + private UserComponent.UcCheckBox chkBatchPrice; + private UserComponent.UcCheckBox chkBatchRealPicture; + private UserComponent.UcCheckBox chkBatchStock; + private UserComponent.UcCheckBox chkBatchJit; + private System.Windows.Forms.Label label6; + private UserComponent.DataGridViewEx dgvExtCode; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelectExtCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colFilterExtCode; + private DevComponents.DotNetBar.PanelEx btnSetReceiveArea; + private DevComponents.DotNetBar.PanelEx btnCancelJit; + private UserComponent.UcCheckBox chkFilterJit; + private DevComponents.DotNetBar.PanelEx panelEx1; + private UserComponent.UcCheckBox chkFilterNotJit; + private DevComponents.DotNetBar.Controls.Line line3; + private DevComponents.DotNetBar.Controls.Line line2; + private DevComponents.DotNetBar.Controls.Line line1; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colProdIndex; private System.Windows.Forms.DataGridViewTextBoxColumn colOrderId; @@ -1332,22 +1561,5 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.DataGridViewLinkColumn colStock; private System.Windows.Forms.DataGridViewLinkColumn colRecevieArea; private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; - private System.Windows.Forms.TextBox txtBatchExtCode; - private System.Windows.Forms.TextBox txtBatchPriceMax; - private System.Windows.Forms.TextBox txtBatchPriceMin; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox txtBatchIdentifyCode; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.PictureBox pbRealPicture; - private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.PanelEx btnBatchJit; - private System.Windows.Forms.RadioButton rbYiwu; - private System.Windows.Forms.RadioButton rbGuangdong; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox txtBatchStock; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label13; - private DevComponents.DotNetBar.PanelEx btnAddRealPic; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs index fcc47bb..52fbe4c 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs @@ -401,10 +401,14 @@ namespace TemuKJD.KJDForms.ProductForms private void btnSearch1_Click(object sender, EventArgs e) { + chkFilterJit.Checked = false; + chkFilterNotJit.Checked = false; SearchPrice("已发布到站点"); } private void btnSearch2_Click(object sender, EventArgs e) { + chkFilterJit.Checked = false; + chkFilterNotJit.Checked = false; SearchPrice("待创建首单"); } @@ -426,6 +430,16 @@ namespace TemuKJD.KJDForms.ProductForms } } + string[] colNames = new string[] { "colCheck", "colSkuName", "colExtCode", "colExtCodePrice", "colPrcie", "colCreatTime", "colChangePrice", + "colCompliance", "colRealPicture", "colJit", "colStock", "colRecevieArea" }; + foreach (DataGridViewColumn column in dgvOpenJit.Columns) + { + if (colNames.Contains(column.Name)) + column.Visible = true; + } + + sFilterExtCode = ""; + dgvExtCode.Rows.Clear(); this.dgvOpenJit.Rows.Clear(); this.lstChainProdInfo.Clear(); this.lstComplianceInfo.Clear(); @@ -604,7 +618,7 @@ namespace TemuKJD.KJDForms.ProductForms // 获取到货地 GetProductReceiveAreaList Thread.Sleep(Randomx.GetId(25, 75)); - string getProductReceiveAreaRst = GetProductReceiveAreaList(shop, 1, spuIds); + string getProductReceiveAreaRst = GetProductReceiveAreaList(shop, 1, 50, spuIds); if (getProductReceiveAreaRst.Contains("\"success\":true")) { jArr = JObject.Parse(getProductReceiveAreaRst)["result"]?["items"] as JArray; @@ -653,8 +667,8 @@ namespace TemuKJD.KJDForms.ProductForms var product = productInfoLst.FirstOrDefault(p => p.productId == chainProdInfo.productId); // sku组合 + 单价 + 库存 - var prodSkuList = reviewInfo.productSkuList; - if (prodSkuList != null) + var prodSkuList = reviewInfo?.productSkuList; + if (prodSkuList != null && product != null) { foreach (var sku in prodSkuList) { @@ -664,8 +678,8 @@ namespace TemuKJD.KJDForms.ProductForms } skuNames = skuNames.TrimEnd(',') + ";"; skuNames += "价格:" + reviewInfo.productSkuList.FirstOrDefault()?.supplierPrice + ";"; - var skuWithVirtualStock = product.productSkuSummaries.FirstOrDefault(s => s.productSkuId == sku.skuId); - skuNames += "库存:" + (skuWithVirtualStock.virtualStock == null ? "-" : skuWithVirtualStock.virtualStock.ParseToString()); + var skuWithVirtualStock = product?.productSkuSummaries?.FirstOrDefault(s => s.productSkuId == sku.skuId); + skuNames += "库存:" + (skuWithVirtualStock?.virtualStock == null ? "-" : skuWithVirtualStock?.virtualStock?.ParseToString()); skuNames += "\r\n"; } } @@ -758,6 +772,23 @@ namespace TemuKJD.KJDForms.ProductForms sRst = type + " 已取消查询!"; BaseMsgForm.ShowInfo(sRst); this.statusBar.lblTaskStatus.Text = sRst; + + var extCodeLst = this.dgvOpenJit.Rows.Cast() + .Select(r => r.Cells["colExtCode"].Value.ParseToString()) + .Where(s => !string.IsNullOrEmpty(s.Trim('-'))).Distinct().ToList(); + foreach (var ext in extCodeLst) + { + if (!this.txtBatchExtCode.Text.Split(new string[] { }, StringSplitOptions.RemoveEmptyEntries).Contains(ext)) + { + this.txtBatchExtCode.Text += ext + "\r\n"; + } + } + + this.dgvExtCode.Rows.Clear(); + foreach (var ext in extCodeLst) + { + this.dgvExtCode.Rows.Add(false, ext); + } })); }, cancellationTokenSource.Token); } @@ -898,27 +929,19 @@ Content-Disposition: form-data; name=""upload_sign"" return HttpResponseBLL.PostResponse2(shop, url, body, refere); } - private string GetProductReceiveAreaList(ShopLoginInfo shop, int page = 1, string spuIds = "") + private string GetProductReceiveAreaList(ShopLoginInfo shop, int page = 1, int pageSize = 50, string spuIds = "") { page = Math.Max(page, 1); string url = "https://agentseller.temu.com/mms/turbo/supplier/pick/out/config/pageQuerySkcPickOutConfig"; string body; - body = @"{""productIdList"":[" + spuIds + @"],""pageSize"":50,""pageNumber"":" + page + "}"; + body = @"{""productIdList"":[" + spuIds + @"],""pageSize"":" + pageSize + @",""pageNumber"":" + page + "}"; + if (spuIds.IsNullOrEmpty()) + body = @"{""pageSize"":" + pageSize + @",""pageNumber"":" + page + "}"; string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main"; return HttpResponseBLL.PostResponse2(shop, url, body, refere); } - private string GetWarehouseListBySpuIds(ShopLoginInfo shop, string spuIds, int page = 1, int pageSize = 40) - { - page = Math.Max(page, 1); - string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/listWarehouse"; - string body = @"{""pageNo"":" + page + @",""pageSize"":" + pageSize + @",""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7," + - @"""productIdList"":[" + spuIds + @"]}"; - string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main"; - - return HttpResponseBLL.PostResponse2(shop, url, body, refere); - } private void dgvOpenJit_CellContentClick(object sender, DataGridViewCellEventArgs e) { @@ -981,58 +1004,11 @@ Content-Disposition: form-data; name=""upload_sign"" if (shop != null) { var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + // 弹出调价窗口 ProductChangePriceForm changePriceForm = new ProductChangePriceForm(shop, product); changePriceForm.ShowDialog(); - if (changePriceForm.IsAdjustPrice) - { - var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); - var chainProdInfo = lstChainProdInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); - if (chainProdInfo != null) - { - var minPriceStr = (product.productSkuSummaries.Min(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); - var maxPriceStr = (product.productSkuSummaries.Max(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); - - chainProdInfo.supplierPrice = "¥" + minPriceStr; - if (minPriceStr != maxPriceStr) - { - chainProdInfo.supplierPrice += "~" + maxPriceStr; - } - foreach (var row in rows) - { - row.Cells["colPrcie"].Value = chainProdInfo.supplierPrice; - } - } - foreach (var sku in product.productSkuSummaries) - { - var chainSku = chainProdInfo?.skcList?.FirstOrDefault()?.skuList?.FirstOrDefault(s => s.skuId == sku.productSkuId); - if (chainSku != null) - { - chainSku.supplierPrice = "¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00"); - chainSku.supplierPriceValue = sku.supplierPrice; - } - foreach (var reviewInfo in chainProdInfo?.skcList?.FirstOrDefault()?.supplierPriceReviewInfoList) - { - var reviewSku = reviewInfo.productSkuList.FirstOrDefault(s => s.skuId == sku.productSkuId); - if (reviewSku != null) - { - reviewSku.supplierPrice = "¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00"); - reviewSku.supplierPriceValue = sku.supplierPrice; - } - } - } - - foreach (var sku in product.productSkuSummaries) - { - foreach (var row in rows) - { - var skuSpecNames = string.Join(",", sku.productSkuSpecList.Select(s => s.specName).ToList()) + ";"; - var skuNameStrLst = row.Cells["colSkuName"].Value.ParseToString().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); - string oldSkuName = skuNameStrLst.FirstOrDefault(s => s.StartsWith(skuSpecNames)); - string newSkuName = skuSpecNames + "价格:¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00") + ";库存:" + sku.virtualStock; - row.Cells["colSkuName"].Value = row.Cells["colSkuName"].Value.ParseToString().Replace(oldSkuName, newSkuName); - } - } - } + // 显示调价结果 + this.UpdatePriceChange(changePriceForm.IsAdjustPrice, changePriceForm.ErrMsg, product); } } break; @@ -1042,7 +1018,7 @@ Content-Disposition: form-data; name=""upload_sign"" //填写以下信息: //加州65号提案 //欧盟负责人 //制造商信息 //其他合规信息-商品识别码 ComplianceForm compForm = new ComplianceForm(shop, compInfo); compForm.ShowDialog(); - if (compForm.EditSuccess == true) + if (compForm.IsEditComplianceSuccess == true) { var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); foreach (var row in rows) @@ -1067,7 +1043,7 @@ Content-Disposition: form-data; name=""upload_sign"" // 读取文件内容 //text = File.ReadAllText(openFileDialog.FileName); var fileFullName = openFileDialog.FileName; - var uploadRst = UploadReakPicture(shop, fileFullName, realPicInfo); + var uploadRst = UploadRealPicture(shop, fileFullName, realPicInfo); if (uploadRst) { BaseMsgForm.ShowInfo("上传成功"); @@ -1107,8 +1083,9 @@ Content-Disposition: form-data; name=""upload_sign"" { var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); ChangeStockForm stockForm = new ChangeStockForm(shop, product); + //ChangeStockForm stockForm = new ChangeStockForm(shop, product, txtBatchStock.Text.ParseToInt()); stockForm.ShowDialog(); - if (stockForm.IsSuccess) + if (stockForm.IsEditSuccess) { var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); @@ -1117,10 +1094,10 @@ Content-Disposition: form-data; name=""upload_sign"" var skuChangeVirtualStock = stockForm.stockParam?.skcVirtualStockChangeDTOList?.FirstOrDefault()? .skuVirtualStockChangeList?.FirstOrDefault(s => s.productSkuId == sku.productSkuId); - if (sku.virtualStock != null && skuChangeVirtualStock != null && skuChangeVirtualStock.virtualStockDiff != 0) + if (skuChangeVirtualStock != null && skuChangeVirtualStock.virtualStockDiff != 0) { - var oldVirtualStock = sku.virtualStock; - sku.virtualStock += skuChangeVirtualStock.virtualStockDiff.ParseToInt(); + var oldVirtualStock = sku.virtualStock == null ? "-" : sku.virtualStock.ParseToString(); + sku.virtualStock = sku.virtualStock.ParseToInt() + skuChangeVirtualStock.virtualStockDiff.ParseToInt(); foreach (var row in rows) { var skuName = string.Join(",", sku.productSkuSpecList.Select(s => s.specName).ToList()) + ";"; @@ -1135,6 +1112,29 @@ Content-Disposition: form-data; name=""upload_sign"" break; case "期望到货": case "期望到货区域": + if (receiveArea == null) + { + var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + receiveArea = new SkcReceiveAreaPickOutInfo() + { + canEditExpectReceiveArea = true, + cat4Id = product.categories.cat4.catId, + cat4Name = product.categories.cat4.catName, + expectReceiveAreaConfigDesc = "按照历史发货地就近推荐", + expectReceiveAreaConfigType = 1, + historyDeliveryTwoLevelAddressCode = -1, + historyDeliveryTwoLevelAddressDesc = null, + isCustom = false, + isJit = true, + leafCatId = product.leafCat.catId, + leafCatName = product.leafCat.catName, + productId = product.productId, + productName = product.productName, + productSkcId = product.productSkcId, + productSkcPictureUrl = product.mainImageUrl, + }; + lstReceiveArea.Add(receiveArea); + } ReceiveAreaForm areaForm = new ReceiveAreaForm(shop, receiveArea); areaForm.ShowDialog(); if (areaForm.IsSuccess) @@ -1164,7 +1164,10 @@ Content-Disposition: form-data; name=""upload_sign"" msg = BaseRegex.GetStringJson(ref rst, "error_msg").ParseToString(); if (string.IsNullOrEmpty(msg)) msg = rst; - BaseMsgForm.ShowError("读取Jit条件失败:" + msg); + if (cell != null) + cell.Value = "请去店铺后台参加Jit开通考试。"; + else + BaseMsgForm.ShowError("读取Jit条件失败:" + msg); return false; } if (rst.Contains("\"passed\":false")) @@ -1196,7 +1199,7 @@ Content-Disposition: form-data; name=""upload_sign"" return true; } - private bool UploadReakPicture(ShopLoginInfo shop, string fileFullName, RealPictureInfo realPicInfo) + private bool UploadRealPicture(ShopLoginInfo shop, string fileFullName, RealPictureInfo realPicInfo, DataGridViewCell cell = null) { var signRst = this.GetPrictureSign(shop); var sign = BaseRegex.GetStringJson(ref signRst, "result"); @@ -1207,7 +1210,10 @@ Content-Disposition: form-data; name=""upload_sign"" msg = BaseRegex.GetStringJson(ref signRst, "error_msg").ParseToString(); if (string.IsNullOrEmpty(msg)) msg = signRst; - BaseMsgForm.ShowError("获取图片上传签名失败:" + msg); + if (cell != null) + cell.Value = "获取图片上传签名失败:" + msg; + else + BaseMsgForm.ShowError("获取图片上传签名失败:" + msg); return false; } @@ -1221,7 +1227,10 @@ Content-Disposition: form-data; name=""upload_sign"" msg = BaseRegex.GetStringJson(ref uploadRst, "error_msg").ParseToString(); if (string.IsNullOrEmpty(msg)) msg = uploadRst; - BaseMsgForm.ShowError("图片上传失败:" + msg); + if (cell != null) + cell.Value = "图片上传失败:" + msg; + else + BaseMsgForm.ShowError("图片上传失败:" + msg); return false; } RealPictureParam param = new RealPictureParam() @@ -1263,7 +1272,10 @@ Content-Disposition: form-data; name=""upload_sign"" msg = BaseRegex.GetStringJson(ref uploadPrictureUrlRst, "error_msg").ParseToString(); if (string.IsNullOrEmpty(msg)) msg = uploadPrictureUrlRst; - BaseMsgForm.ShowError("实拍图片保存失败:" + msg); + if (cell != null) + cell.Value = "实拍图片保存失败:" + msg; + else + BaseMsgForm.ShowError("实拍图片保存失败:" + msg); return false; } try @@ -1273,12 +1285,19 @@ Content-Disposition: form-data; name=""upload_sign"" var rstInfo = checkRstInfoLst.FirstOrDefault(c => c.check_type == 494); if (rstInfo == null) { + if (cell != null) + + cell.Value = "实拍图片保存失败:未获取到校验结果"; + else BaseMsgForm.ShowError("实拍图片保存失败:未获取到校验结果"); return false; } if (rstInfo.rule_status != 2) { - BaseMsgForm.ShowError("实拍图片保存失败:" + rstInfo.rule_name + rstInfo.rule_status_toast); + if (cell != null) + cell.Value = "实拍图片保存失败:" + rstInfo.rule_name + rstInfo.rule_status_toast; + else + BaseMsgForm.ShowError("实拍图片保存失败:" + rstInfo.rule_name + rstInfo.rule_status_toast); return false; } } @@ -1303,18 +1322,59 @@ Content-Disposition: form-data; name=""upload_sign"" private void btnBatchJit_Click(object sender, EventArgs e) { + var dgvRows = this.dgvOpenJit.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList(); + if (dgvRows.Count == 0) + { + BaseMsgForm.ShowError("请查询并选择商品!"); + return; + } + + var minPriceFen = (txtBatchPriceMin.Text.Trim(' ', '¥').ParseToDecimal() * 100).ParseToInt(); + var maxPriceFen = (txtBatchPriceMax.Text.Trim(' ', '¥').ParseToDecimal() * 100).ParseToInt(); + if (chkBatchPrice.Checked && (minPriceFen < 500 || maxPriceFen < 500 || maxPriceFen < minPriceFen)) + { + BaseMsgForm.ShowError("请合理设置价格!至少为 5 且最大值不能小于最小值!"); + return; + } + + var identifyCode = txtBatchIdentifyCode.Text.Trim(); + if (chkBatchIdentifyCode.Checked && identifyCode.IsNullOrEmpty()) + { + BaseMsgForm.ShowError("请填写识别码!"); + return; + } + + if (chkBatchRealPicture.Checked && pbRealPicture.Tag.ParseToString().IsNullOrEmpty()) + { + BaseMsgForm.ShowError("请选择实拍图!"); + return; + } + + if (chkBatchStock.Checked && txtBatchStock.Text.Trim().ParseToInt() < 1) + { + BaseMsgForm.ShowError("请设置合理库存!大于 0 !"); + return; + } + + cancellationTokenSource = new CancellationTokenSource(); pbLoading.Visible = true; Task.Run(() => { AutoJit(); + Invoke(new Action(() => { - pbLoading.Visible = false; + this.pbLoading.Visible = false; + string sRst = "开通JIT结束!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消开通JIT操作!"; + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; })); - }); + }, cancellationTokenSource.Token); } - void AutoJit() + void AutoJit(int type = 1) { //var batchExtCodeLst = txtBatchExtCode.Text.Trim().Split(new string[] { ",", " " }, StringSplitOptions.RemoveEmptyEntries); //if (batchExtCodeLst == null) @@ -1323,39 +1383,22 @@ Content-Disposition: form-data; name=""upload_sign"" // return; //} - var minPrice = (txtBatchPriceMin.Text.Trim().ParseToDecimal() * 100).ParseToInt(); - var maxPrice = (txtBatchPriceMax.Text.Trim().ParseToDecimal() * 100).ParseToInt(); - if(minPrice < 5 || maxPrice < 5) - { - BaseMsgForm.ShowError("请合理设置价格!"); - return; - } - - var identifyCode = txtBatchIdentifyCode.Text.Trim(); - if (identifyCode.IsNullOrEmpty()) - { - BaseMsgForm.ShowError("请填写识别码!"); - return; - } - - if (pbRealPicture.Tag.ParseToString().IsNullOrEmpty()) - { - BaseMsgForm.ShowError("请选择实拍图!"); - return; - } - //foreach (var extCode in batchExtCodeLst) //{ //var dgvRows = this.dgvOpenJit.Rows.Cast().Where(r => r.Cells[""].Value.ParseToString() == extCode).ToList(); + //if (dgvRows.Count == 0) + //{ + // BaseMsgForm.ShowError("请选择商品!"); + // return; + //} + var minPriceFen = (txtBatchPriceMin.Text.Trim(' ', '¥').ParseToDecimal() * 100).ParseToInt(); + var maxPriceFen = (txtBatchPriceMax.Text.Trim(' ', '¥').ParseToDecimal() * 100).ParseToInt(); var dgvRows = this.dgvOpenJit.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList(); - if (dgvRows.Count == 0) - { - BaseMsgForm.ShowError("请选择商品!"); - return; - } foreach (var dgvRow in dgvRows) { + if (cancellationTokenSource.IsCancellationRequested) + break; string orderId = dgvRow.Cells["colOrderId"].Value.ParseToString(); string prodId = dgvRow.Cells["colProductId"].Value.ParseToString(); string skcId = dgvRow.Cells["colProdSkc"].Value.ParseToString(); @@ -1367,32 +1410,331 @@ Content-Disposition: form-data; name=""upload_sign"" shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopId == accountId); var compInfo = this.lstComplianceInfo.FirstOrDefault(c => c.spu_id.ParseToString() == prodId); var realPicInfo = this.lstRealPictureInfo.FirstOrDefault(p => p.spu_id.ParseToString() == prodId); - var receiveArea = this.lstReceiveArea.FirstOrDefault(r => r.productId.ParseToString() == prodId); - // 修改价格 - if (1 == 2) + Thread.Sleep(Randomx.GetId(50, 100)); + + // 调整价格 + // ---------------------------------------------------------------------------------- + if (chkBatchPrice.Checked && type == 1 && 1 == 1) { var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); - ProductChangePriceForm changePriceForm = new ProductChangePriceForm(shop, product); - changePriceForm.ShowDialog(); - if (changePriceForm.IsAdjustPrice) + var minSkuPrice = product.productSkuSummaries.Min(s => s.supplierPrice); + if (minPriceFen >= minSkuPrice) + { + Invoke(new Action(() => + { + dgvRow.Cells["colMsg"].Value = "价格不在期望范围内,跳过该商品。"; + })); + continue; + } + // 根据价格区间随机生成期望价格 + var nWantPrice = Randomx.GetId(minPriceFen, Math.Min(maxPriceFen + 1, minSkuPrice.ParseToInt())); + ProductChangePriceForm changePriceForm = null; + Invoke(new Action(() => + { + changePriceForm = new ProductChangePriceForm(shop, product, nWantPrice / 100m); + changePriceForm.IsAuto = true; + changePriceForm.TopLevel = false; + changePriceForm.Left = 10; + changePriceForm.Top = 10; + MainForm.instance.Controls.Add(changePriceForm); + changePriceForm.SendToBack(); + changePriceForm.Show(); + })); + Thread.Sleep(200); + // 成功、失败或超时后继续 + for (int i = 0; i < 600 && !changePriceForm.IsAdjustPrice && string.IsNullOrEmpty(changePriceForm.ErrMsg); i++) + { + Thread.Sleep(100); + } + // 显示调价结果 + this.UpdatePriceChange(changePriceForm.IsAdjustPrice, changePriceForm.ErrMsg, product); + Thread.Sleep(500); + Invoke(new Action(() => + { + changePriceForm.Close(); + })); + Thread.Sleep(Randomx.GetId(50, 100)); + } + + // 修改合规信息 + // ---------------------------------------------------------------------------------- + if (chkBatchIdentifyCode.Checked && type == 1 && 1 == 1) + { + //填写以下信息: //加州65号提案 //欧盟负责人 //制造商信息 //其他合规信息-商品识别码 + ComplianceForm complianceForm = null; + Invoke(new Action(() => + { + complianceForm = new ComplianceForm(shop, compInfo); + complianceForm.IsAuto = true; + complianceForm.TopLevel = false; + complianceForm.Left = 10; + complianceForm.Top = 10; + MainForm.instance.Controls.Add(complianceForm); + complianceForm.SendToBack(); + complianceForm.Show(); + complianceForm.txtCode.Text = this.txtBatchIdentifyCode.Text; + })); + Thread.Sleep(200); + // 成功、失败或超时后继续 + for (int i = 0; i < 300 && !complianceForm.IsEditComplianceSuccess && string.IsNullOrEmpty(complianceForm.ErrMsg); i++) + { + Thread.Sleep(100); + } + var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); + if (complianceForm?.IsEditComplianceSuccess == true) + { + foreach (var row in rows) + { + Invoke(new Action(() => { row.Cells["colCompliance"].Value = "已填写 √"; })); + } + } + else + { + foreach (var row in rows) + { + Invoke(new Action(() => { row.Cells["colMsg"].Value = complianceForm.ErrMsg; })); + } + continue; + } + Thread.Sleep(500); + Invoke(new Action(() => + { + complianceForm.Close(); + })); + Thread.Sleep(Randomx.GetId(50, 100)); + } + + // 实拍图 + // ---------------------------------------------------------------------------------- + if (chkBatchRealPicture.Checked && type == 1 && 1 == 1) + { + var uploadRst = UploadRealPicture(shop, pbRealPicture.Tag.ParseToString(), realPicInfo, dgvRow.Cells["colMsg"]); + if (uploadRst) { var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); - var chainProdInfo = lstChainProdInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); - if (chainProdInfo != null) + foreach (var row in rows) { - var minPriceStr = (product.productSkuSummaries.Min(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); - var maxPriceStr = (product.productSkuSummaries.Max(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); - - chainProdInfo.supplierPrice = "¥" + minPriceStr; - if (minPriceStr != maxPriceStr) + Invoke(new Action(() => { - chainProdInfo.supplierPrice += "~" + maxPriceStr; - } + row.Cells["colRealPicture"].Value = "已上传 √"; + })); + } + } + else + { + continue; + } + Thread.Sleep(Randomx.GetId(50, 100)); + } + + // 开通Jit + // ---------------------------------------------------------------------------------- + if (chkBatchJit.Checked && type == 1 && 1 == 1) + { + var jitRst = CreateJit(shop, skcId, prodId, dgvRow.Cells["colMsg"]); + for (int i = 0; i < 5 && dgvRow.Cells["colMsg"].Value.ParseToString().Contains("繁忙"); i++) + { + dgvRow.Cells["colMsg"].Value = dgvRow.Cells["colMsg"].Value.ParseToString() + "重试第" + i + "次"; + Thread.Sleep(Randomx.GetId(5000, 10000)); + dgvRow.Cells["colMsg"].Value = ""; + jitRst = CreateJit(shop, skcId, prodId, dgvRow.Cells["colMsg"]); + } + if (jitRst) + { + Invoke(new Action(() => + { + var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); foreach (var row in rows) { - row.Cells["colPrcie"].Value = chainProdInfo.supplierPrice; + row.Cells["colJit"].Value = "已开通 √"; + if (row.Cells["colJit"].Value.ParseToString().IsNullOrEmpty()) + row.Cells["colJit"].Value = "去设置"; } + })); + } + else + { + continue; + } + Thread.Sleep(Randomx.GetId(100, 200)); + Thread.Sleep(Randomx.GetId(10000, 12000)); + } + + // 修改库存 + // ---------------------------------------------------------------------------------- + if (chkBatchStock.Checked && type == 1 && 1 == 1) + { + var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + + ChangeStockForm stockForm = null; + + Invoke(new Action(() => + { + stockForm = new ChangeStockForm(shop, product, txtBatchStock.Text.ParseToInt()); + stockForm.IsAuto = true; + stockForm.TopLevel = false; + stockForm.Left = 10; + stockForm.Top = 10; + MainForm.instance.Controls.Add(stockForm); + stockForm.SendToBack(); + stockForm.Show(); + })); + Thread.Sleep(200); + // 成功、失败或超时后继续 + for (int i = 0; i < 600 && !stockForm.IsEditSuccess && string.IsNullOrEmpty(stockForm.ErrMsg); i++) + { + Thread.Sleep(100); + } + var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); + if (stockForm.IsEditSuccess) + { + Invoke(new Action(() => + { + dgvRow.Cells["colStock"].Value = "已修改 √"; + })); + foreach (var sku in product.productSkuSummaries) + { + var skuChangeVirtualStock = stockForm.stockParam?.skcVirtualStockChangeDTOList?.FirstOrDefault()? + .skuVirtualStockChangeList?.FirstOrDefault(s => s.productSkuId == sku.productSkuId); + + if (skuChangeVirtualStock != null && skuChangeVirtualStock.virtualStockDiff != 0) + { + var oldVirtualStock = sku.virtualStock == null ? "-" : sku.virtualStock.ParseToString(); + sku.virtualStock = sku.virtualStock.ParseToInt() + skuChangeVirtualStock.virtualStockDiff.ParseToInt(); + foreach (var row in rows) + { + Invoke(new Action(() => + { + var skuName = string.Join(",", sku.productSkuSpecList.Select(s => s.specName).ToList()) + ";"; + string oldSkuName = skuName + "价格:¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00") + ";库存:" + oldVirtualStock; + string newSkuName = skuName + "价格:¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00") + ";库存:" + sku.virtualStock; + row.Cells["colSkuName"].Value = row.Cells["colSkuName"].Value.ParseToString().Replace(oldSkuName, newSkuName); + })); + } + } + } + } + else + { + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = stockForm.ErrMsg; + } + })); + continue; + } + Invoke(new Action(() => + { + stockForm.Close(); + })); + Thread.Sleep(Randomx.GetId(50, 100)); + } + + // 修改期望到货 + // ---------------------------------------------------------------------------------- + //if (chkBatchReceiveArea.Checked && type == 2 && 1 == 1) + //{ + // Thread.Sleep(Randomx.GetId(300, 700)); + // var product = lstProductInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + // var receiveArea = this.lstReceiveArea.FirstOrDefault(r => r?.productId?.ParseToString() == prodId); + // if (receiveArea == null) + // { + // receiveArea = new SkcReceiveAreaPickOutInfo() + // { + // canEditExpectReceiveArea = true, + // cat4Id = product.categories.cat4.catId, + // cat4Name = product.categories.cat4.catName, + // expectReceiveAreaConfigDesc = "按照历史发货地就近推荐", + // expectReceiveAreaConfigType = 1, + // historyDeliveryTwoLevelAddressCode = -1, + // historyDeliveryTwoLevelAddressDesc = null, + // isCustom = false, + // isJit = true, + // leafCatId = product.leafCat.catId, + // leafCatName = product.leafCat.catName, + // productId = product.productId, + // productName = product.productName, + // productSkcId = product.productSkcId, + // productSkcPictureUrl = product.mainImageUrl, + // }; + // lstReceiveArea.Add(receiveArea); + // } + + // int areaId = 1; + // if (this.rbGuangdong.Checked) + // areaId = 1; + // if (this.rbYiwu.Checked) + // areaId = 2; + + // var areaEditRst = ReceiveAreaForm.EditReceiveArea(shop, areaId, receiveArea.productSkcId.ParseToString()); + // var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); + // if (!areaEditRst.Contains("\"success\":true")) + // { + // var msg = BaseRegex.GetStringJson(ref areaEditRst, "errorMsg").ParseToString(); + // if (string.IsNullOrEmpty(msg)) + // msg = BaseRegex.GetStringJson(ref areaEditRst, "error_msg").ParseToString(); + // if (string.IsNullOrEmpty(msg)) + // msg = areaEditRst; + + // Invoke(new Action(() => + // { + // foreach (var row in rows) + // { + // row.Cells["colMsg"].Value = "修改期望到货区域失败:" + msg; + // } + // })); + // continue; + // } + // else + // { + // receiveArea.expectReceiveAreaConfigType = areaId; + // if (areaId == 1) + // receiveArea.expectReceiveAreaConfigDesc = "广东"; + // if (areaId == 2) + // receiveArea.expectReceiveAreaConfigDesc = "义乌"; + // if (areaId == 3) + // receiveArea.expectReceiveAreaConfigDesc = "按照历史发货地就近推荐"; + + // Invoke(new Action(() => + // { + // foreach (var row in rows) + // { + // row.Cells["colRecevieArea"].Value = receiveArea.expectReceiveAreaConfigDesc; + // } + // })); + // } + //} + + Invoke(new Action(() => + { + dgvRow.Cells["colMsg"].Value = "操作成功 √"; + })); + } + //} + } + + public void UpdatePriceChange(bool IsAdjustPrice, string errMsg, TemuListProductInfo product) + { + var prodId = product.productId.ParseToString(); + var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); + if (IsAdjustPrice) + { + Invoke(new Action(() => + { + var chainProdInfo = lstChainProdInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + if (chainProdInfo != null) + { + var minPriceStr = (product.productSkuSummaries.Min(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); + var maxPriceStr = (product.productSkuSummaries.Max(s => s.supplierPrice).ParseToDecimal() / 100).ToString("0.00"); + + // 根据改价商品更新生命周期商品申报价数值 + chainProdInfo.supplierPrice = "¥" + minPriceStr; + if (minPriceStr != maxPriceStr) + { + chainProdInfo.supplierPrice += "~" + maxPriceStr; } foreach (var sku in product.productSkuSummaries) { @@ -1412,107 +1754,36 @@ Content-Disposition: form-data; name=""upload_sign"" } } } - - foreach (var sku in product.productSkuSummaries) - { - foreach (var row in rows) - { - var skuSpecNames = string.Join(",", sku.productSkuSpecList.Select(s => s.specName).ToList()) + ";"; - var skuNameStrLst = row.Cells["colSkuName"].Value.ParseToString().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); - string oldSkuName = skuNameStrLst.FirstOrDefault(s => s.StartsWith(skuSpecNames)); - string newSkuName = skuSpecNames + "价格:¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00") + ";库存:" + sku.virtualStock; - row.Cells["colSkuName"].Value = row.Cells["colSkuName"].Value.ParseToString().Replace(oldSkuName, newSkuName); - } - } - } - } - - // 修改合规信息 - if (1 == 2) - { - //填写以下信息: //加州65号提案 //欧盟负责人 //制造商信息 //其他合规信息-商品识别码 - ComplianceForm compForm = null; - Invoke(new Action(() => - { - compForm = new ComplianceForm(shop, compInfo); - compForm.IsAuto = true; - compForm.Show(); - compForm.txtCode.Text = this.txtBatchIdentifyCode.Text; - })); - Thread.Sleep(200); - // 点击确定 - Invoke(new Action(() => - { - compForm.btnSave_Click(null, null); - })); - int count = 0; - while (IsFormOpen(compForm.Name)) - { - count++; - if (count > 50) - compForm.Close(); - Thread.Sleep(200); - } - var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); - foreach (var row in rows) - { - if (compForm?.EditSuccess == true) - { - Invoke(new Action(() => - { - row.Cells["colCompliance"].Value = "已填写 √"; - })); - } - else - { - Invoke(new Action(() => - { - row.Cells["colMsg"].Value = compForm.ErrMsg; - })); - continue; - } - } - - } - - // 实拍图 - if (1 == 2) - { - var uploadRst = UploadReakPicture(shop, pbRealPicture.Tag.ParseToString(), realPicInfo); - if (uploadRst) - { - //BaseMsgForm.ShowInfo("上传成功"); - var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); + // 显示生命周期商品申报价价格文本 foreach (var row in rows) { - Invoke(new Action(() => - { - row.Cells["colRealPicture"].Value = "已上传 √"; - })); + row.Cells["colPrcie"].Value = chainProdInfo.supplierPrice; } } - } - - // 加入Jit - if (1 == 1) - { - var jitRst = CreateJit(shop, skcId, prodId, dgvRow.Cells["colMsg"]); - if (jitRst) + // 显示sku价格改变 + foreach (var sku in product.productSkuSummaries) { - Invoke(new Action(() => + foreach (var row in rows) { - var rows = dgvOpenJit.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == prodId).ToList(); - foreach (var row in rows) - { - row.Cells["colJit"].Value = "已开通 √"; - if (row.Cells["colRecevieArea"].Value.ParseToString().IsNullOrEmpty()) - row.Cells["colRecevieArea"].Value = "去设置 √"; - } - })); + var skuSpecNames = string.Join(",", sku.productSkuSpecList.Select(s => s.specName).ToList()) + ";"; + var skuNameStrLst = row.Cells["colSkuName"].Value.ParseToString().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); + string oldSkuName = skuNameStrLst.FirstOrDefault(s => s.StartsWith(skuSpecNames)); + string newSkuName = skuSpecNames + "价格:¥" + (sku.supplierPrice.ParseToDecimal() / 100).ToString("0.00") + ";库存:" + (sku.virtualStock == null ? "-" : sku.virtualStock.ParseToString()); + row.Cells["colSkuName"].Value = row.Cells["colSkuName"].Value.ParseToString().Replace(oldSkuName, newSkuName); + } } - } + })); + } + else + { + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = errMsg; + } + })); } - //} } public static bool IsFormOpen(string formName) @@ -1557,6 +1828,346 @@ Content-Disposition: form-data; name=""upload_sign"" } } } + + private void btnStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + private void btnCancelJit_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + string sFilterExtCode = ""; + private void dgvExtCode_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + + foreach (DataGridViewRow row in dgvExtCode.Rows) + { + if (row.Index != e.RowIndex) + row.Cells["colSelectExtCode"].Value = false; + } + dgvExtCode.Rows[e.RowIndex].Cells["colSelectExtCode"].Value = !dgvExtCode.Rows[e.RowIndex].Cells["colSelectExtCode"].Value.ParseToBool(); + if (dgvExtCode.Rows[e.RowIndex].Cells["colSelectExtCode"].Value.ParseToBool() == true) + { + sFilterExtCode = dgvExtCode.Rows[e.RowIndex].Cells["colFilterExtCode"].Value.ParseToString(); + } + else + { + sFilterExtCode = ""; + } + + FilterRows(); + } + + void FilterRows() + { + foreach (DataGridViewRow row in dgvOpenJit.Rows) + { + row.Visible = true; + if (!sFilterExtCode.IsNullOrEmpty()) + { + if (row.Cells["colExtCode"].Value.ParseToString() == sFilterExtCode) + { + row.Cells["colCheck"].Value = true; + row.Visible = true; + } + else + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + } + } + if (chkFilterJit.Checked) + { + if (row.Cells["colJit"].Value.ParseToString().Contains("已开通")) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + } + } + if (chkFilterNotJit.Checked) + { + if (!row.Cells["colJit"].Value.ParseToString().Contains("已开通")) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + } + } + } + } + + private void btnSetReceiveArea_Click(object sender, EventArgs e) + { + //cancellationTokenSource = new CancellationTokenSource(); + //pbLoading.Visible = true; + //Task.Run(() => + //{ + // AutoJit(2); + + // Invoke(new Action(() => + // { + // this.pbLoading.Visible = false; + // string sRst = "设置期望到货区域结束!"; + // if (cancellationTokenSource.IsCancellationRequested) + // sRst = "已取消设置期望到货区域!"; + // BaseMsgForm.ShowInfo(sRst); + // this.statusBar.lblTaskStatus.Text = sRst; + // })); + //}, cancellationTokenSource.Token); + + var selectShopIdLst = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) + .Select(r => r.Cells["colShopId"].Value.ParseToString()).Distinct().ToList(); + if (selectShopIdLst.Count == 0) + { + BaseMsgForm.ShowError("没有选择店铺!"); + return; + } + + string[] colNames = new string[] { "colCheck", "colSkuName", "colExtCode", "colExtCodePrice", "colPrcie", "colCreatTime", "colChangePrice", + "colCompliance", "colRealPicture", "colJit", "colStock", "colRecevieArea" }; + foreach (DataGridViewColumn column in dgvOpenJit.Columns) + { + if (colNames.Contains(column.Name)) + column.Visible = false; + } + + sFilterExtCode = ""; + dgvExtCode.Rows.Clear(); + this.dgvOpenJit.Rows.Clear(); + this.pbLoading.Visible = true; + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + int shopIndex = 0; + int totalProdIndex = 0; + foreach (var shopId in selectShopIdLst) + { + shopIndex++; + ShopLoginInfo shop = null; + if (IsAdmin) + shop = lstAdminShopInfo.FirstOrDefault(s => shopId == s.ShopId); + else + shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => shopId == s.ShopId); + if (shop == null) + continue; + + // 检测是否掉线 + if (IsAdmin) + AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + else + ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false); + + if (shop.LoginStatus2 != "国际版在线") + { + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + int page = 0; + int totalPage = 1; + int prodIndex = 0; + int pageSize = 100; + while (page < totalPage) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + page++; + long startTime = 0, endTime = 0; + if (chkSearchTime.Checked) + { + startTime = BaseClass.DateTimeToTimestampMilliseconds(dtpStartTime.Value.Date); + endTime = BaseClass.DateTimeToTimestampMilliseconds(dtpEndTime.Value.Date.AddDays(1).AddMilliseconds(-1)); + } + string searchSpuIds = txtSpuId.Text.Trim().Trim(','); + string searchExtCodes = txtExtCode.Text.Trim().Trim(','); + var productReceiveAreaLstRst = this.GetProductReceiveAreaList(shop, page, pageSize); + if (productReceiveAreaLstRst.Contains("登录过期") || productReceiveAreaLstRst.Contains("Invalid Login State")) + { + if (IsAdmin) + AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + else + ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + else if (!productReceiveAreaLstRst.Contains("\"success\":true")) + { + var err = BaseRegex.GetStringJson(ref productReceiveAreaLstRst, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(err)) + err = BaseRegex.GetStringJson(ref productReceiveAreaLstRst, "error_msg").ParseToString(); + if (string.IsNullOrEmpty(err)) + err = productReceiveAreaLstRst; + BaseMsgForm.ShowError(err); + } + if (productReceiveAreaLstRst.Contains("\"success\":true")) + { + try + { + int total = BaseRegex.GetStringJson(ref productReceiveAreaLstRst, "total").ParseToInt(); + totalPage = Math.Ceiling(total * 1.0 / pageSize).ParseToInt(); + + // 获取到货区域 GetProductReceiveAreaList + var jArr = JObject.Parse(productReceiveAreaLstRst)["result"]?["items"] as JArray; + if (jArr == null) + jArr = new JArray(); + + var receiveAreaLst = JsonHelper.DeserializeJsonToList(jArr.ToString()); + + int num = 0; + foreach (var erceiveArea in receiveAreaLst) + { + num++; + if (cancellationTokenSource.IsCancellationRequested) + break; + + prodIndex++; + totalProdIndex++; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在查询,店铺:" + shop.ShopAccount + " " + prodIndex + "/" + total + " 件商品"; + this.statusBar.pgbTaskProgress.Maximum = selectShopIdLst.Count; + this.statusBar.UpdateProgressBar(shopIndex); + })); + + Invoke(new Action(() => + { + int rowId = this.dgvOpenJit.Rows.Add( + false, + totalProdIndex, + "", // reviewInfo.priceOrderId, // 同价格单号 + shop.ShopId, + shop.ShopAccount, + erceiveArea.productSkcPictureUrl.Replace("https://", "http://").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/60x", // 图片地址 + DataGridViewExtension.defaultBitmap, // 展示图片 + erceiveArea.productId, + erceiveArea.productSkcId, + erceiveArea.productName, + "", //skuNames, + "", //reviewExtCode, + "", //extCodePrice == null ? "-" : (extCodePrice.original_price / 100.0).ParseToString(), //货号价格 + "", //erceiveArea.supplierPrice, // 申报价格范围 //reviewInfo.productSkuList.FirstOrDefault()?.supplierPrice, // 同价格单号申报价格 + "", //BaseClass.StampToDateTime((erceiveArea.skcList.FirstOrDefault()?.statusTime.createdTime.ParseToLong() / 1000).ParseToInt()).ToString("yy/MM/dd HH:mm:ss"), // 创建时间 + "", //"调价", + "", //complianceStr.IsNullOrEmpty() ? "已填写" : complianceStr, // 合规信息 + "", //realPictureStr.IsNullOrEmpty() ? "已上传" : realPictureStr, // 实拍图 + "", //erceiveArea.skcList.FirstOrDefault()?.applyJitStatus == 1 ? "开通JIT" : "已开通", + "", //"修改库存", // 库存 具体数值在skuNames里显示 + erceiveArea.expectReceiveAreaConfigDesc, // 期望到货区域 + "" + ); + dgvOpenJit.Rows[rowId].Height = 60; + if (num % 2 == 1) + dgvOpenJit.Rows[rowId].DefaultCellStyle.BackColor = Color.White; + else + dgvOpenJit.Rows[rowId].DefaultCellStyle.BackColor = Color.WhiteSmoke; + })); + } + + int areaId = 1; + if (this.rbGuangdong.Checked) + areaId = 1; + if (this.rbYiwu.Checked) + areaId = 2; + var skcIds = receiveAreaLst.Select(s => s.productSkcId.ParseToString()).ToList(); + var rows = dgvOpenJit.Rows.Cast().Where(r => skcIds.Contains(r.Cells["colProdSkc"].Value.ParseToString())).ToList(); + var areaEditRst = ReceiveAreaForm.EditReceiveArea(shop, areaId, string.Join(",", skcIds)); + if (!areaEditRst.Contains("\"success\":true")) + { + var msg = BaseRegex.GetStringJson(ref areaEditRst, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(msg)) + msg = BaseRegex.GetStringJson(ref areaEditRst, "error_msg").ParseToString(); + if (string.IsNullOrEmpty(msg)) + msg = areaEditRst; + + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "修改期望到货区域失败:" + msg; + } + })); + continue; + } + else + { + var expectReceiveAreaConfigDesc = ""; + if (areaId == 1) + expectReceiveAreaConfigDesc = "广东"; + if (areaId == 2) + expectReceiveAreaConfigDesc = "义乌"; + if (areaId == 3) + expectReceiveAreaConfigDesc = "按照历史发货地就近推荐"; + + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "期望到货区域已改为:" + expectReceiveAreaConfigDesc; + } + })); + } + } + catch (Exception ex) + { + BaseMsgForm.ShowError("设置期望到货区域失败 " + ex.Message); + break; + } + } + } + } + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + string sRst = "设置期望到货区域结束!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消设置期望到货区域!"; + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; + + var extCodeLst = this.dgvOpenJit.Rows.Cast() + .Select(r => r.Cells["colExtCode"].Value.ParseToString()) + .Where(s => !string.IsNullOrEmpty(s.Trim('-'))).Distinct().ToList(); + foreach (var ext in extCodeLst) + { + if (!this.txtBatchExtCode.Text.Split(new string[] { }, StringSplitOptions.RemoveEmptyEntries).Contains(ext)) + { + this.txtBatchExtCode.Text += ext + "\r\n"; + } + } + + this.dgvExtCode.Rows.Clear(); + foreach (var ext in extCodeLst) + { + this.dgvExtCode.Rows.Add(false, ext); + } + })); + }, cancellationTokenSource.Token); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + private void chkFilterJit_CheckedChanged(object sender, EventArgs e) + { + FilterRows(); + } + + private void chkFilterNotJit_CheckedChanged(object sender, EventArgs e) + { + FilterRows(); + } } public class SetJitConfig @@ -1735,20 +2346,20 @@ Content-Disposition: form-data; name=""upload_sign"" /// public class SkcReceiveAreaPickOutInfo { - public long? productId { get; set; } // 4889882179, + public long? productId { get; set; } // 4889882179, public string productName { get; set; } // "1对女士触屏冬季手套 - 加绒保暖防风,户外活动,冷天配件,适用于骑行、智能手机、徒步旅行 - 米色/粉色/白色/黑色/灰色多色可选 - 适合通勤、滑雪、摩托车驾驶 - 仅限手洗,加绒内衬手套,冬季装备", - public long? leafCatId { get; set; } // 29296, + public long? leafCatId { get; set; } // 29296, public string leafCatName { get; set; } // "女士防寒分指手套", - public long? cat4Id { get; set; } // 29294, + public long? cat4Id { get; set; } // 29294, public string cat4Name { get; set; } // "女士手套", - public bool? isJit { get; set; } // true, - public bool? isCustom { get; set; } // false, - public long? productSkcId { get; set; } // 27082284620, + public bool? isJit { get; set; } // true, + public bool? isCustom { get; set; } // false, + public long? productSkcId { get; set; } // 27082284620, public string productSkcPictureUrl { get; set; } // "https://img.kwcdn.com/product/20add70192/d5f9f012-3f46-4781-90a2-2d76bc8cbd4b_800x800.jpeg", - public long? historyDeliveryTwoLevelAddressCode { get; set; } // -1, + public long? historyDeliveryTwoLevelAddressCode { get; set; } // -1, public object historyDeliveryTwoLevelAddressDesc { get; set; } // null, - public int? expectReceiveAreaConfigType { get; set; } // 1, + public int? expectReceiveAreaConfigType { get; set; } // 1, public string expectReceiveAreaConfigDesc { get; set; } // "广东", - public bool? canEditExpectReceiveArea { get; set; } // true + public bool? canEditExpectReceiveArea { get; set; } // true } } diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.resx b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.resx index bf30c02..6dcf460 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.resx +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.resx @@ -117,6 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + True diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ChangeStockForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ChangeStockForm.cs index 7ed1290..54a4043 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ChangeStockForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ChangeStockForm.cs @@ -17,15 +17,19 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms { public partial class ChangeStockForm : LRBaseForm { - public bool IsSuccess = false; + public bool IsEditSuccess = false; + public bool IsAuto = false; + public string ErrMsg = ""; public changeStockParam stockParam; ShopLoginInfo shop; TemuListProductInfo product; - public ChangeStockForm(ShopLoginInfo _shop, TemuListProductInfo _product) + int wantStock; + public ChangeStockForm(ShopLoginInfo _shop, TemuListProductInfo _product, int _wantStock = 0) { InitializeComponent(); shop = _shop; - product = _product; + product = _product; + wantStock = _wantStock; } private void btnBatchFill_Click(object sender, EventArgs e) @@ -57,12 +61,42 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms edit.txtStockNow.Text = sku.virtualStock == null ? "-" : sku.virtualStock.ParseToString(); edit.lblStockAfterChange.Text = ""; edit.Tag = sku; + + if (wantStock > 0) + { + if (sku.virtualStock.ParseToInt() > wantStock) + { + edit.cmbIsAddOrReduce.Text = "减少"; + edit.txtAddOrReduceNum.Text = "" + (sku.virtualStock.ParseToInt() - wantStock); + } + else if (sku.virtualStock.ParseToInt() < wantStock) + { + edit.cmbIsAddOrReduce.Text = "增加"; + edit.txtAddOrReduceNum.Text = "" + (wantStock - sku.virtualStock.ParseToInt()); + } + } this.flowLayoutPanel1.Controls.Add(edit); } } + + if (IsAuto) + { + Task.Run(() => + { + SaveStock(); + }); + } } - private void btnSave_Click(object sender, EventArgs e) + public void btnSave_Click(object sender, EventArgs e) + { + Task.Run(() => + { + SaveStock(); + }); + } + + void SaveStock() { stockParam = new changeStockParam(); stockParam.productId = this.product.productId; @@ -73,35 +107,48 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms stockChangeDtoParam.productSkcId = this.product.productSkcId; stockChangeDtoParam.stockUpdateSource = 1; stockChangeDtoParam.skuVirtualStockChangeList = new List(); - foreach (var control in flowLayoutPanel1.Controls) + Invoke(new Action(() => { - var edit = control as UcStockEdit; - if (edit == null) + foreach (var control in flowLayoutPanel1.Controls) { - continue; + var edit = control as UcStockEdit; + if (edit == null) + { + continue; + } + var sku = edit.Tag as TemuProductSkusummaryItem; + if (sku == null) + { + continue; + } + skuVirtualStockChange change = new skuVirtualStockChange() + { + productSkuId = sku.productSkuId, + currentStockAvailable = sku.virtualStock.ParseToInt(), + virtualStockDiff = edit.txtAddOrReduceNum.Text.ParseToInt(), + }; + if (edit.cmbIsAddOrReduce.Text == "减少") + change.virtualStockDiff = 0 - change.virtualStockDiff; + if (change.virtualStockDiff != 0) + stockChangeDtoParam.skuVirtualStockChangeList.Add(change); } - var sku = edit.Tag as TemuProductSkusummaryItem; - if (sku == null) - { - continue; - } - skuVirtualStockChange change = new skuVirtualStockChange() - { - productSkuId = sku.productSkuId, - currentStockAvailable = sku.virtualStock.ParseToInt(), - virtualStockDiff = edit.txtAddOrReduceNum.Text.ParseToInt(), - }; - if (edit.cmbIsAddOrReduce.Text == "减少") - change.virtualStockDiff = 0 - change.virtualStockDiff; - if (change.virtualStockDiff != 0) - stockChangeDtoParam.skuVirtualStockChangeList.Add(change); - } + })); if (stockChangeDtoParam.skuVirtualStockChangeList.Count == 0) { - BaseMsgForm.ShowError("请至少改动一项价格!"); + if (IsAuto) + IsEditSuccess = true; + else + BaseMsgForm.ShowError("请至少改动一项价格!"); return; } var rst = EditStock(shop, stockParam); + for (int i = 0; i < 5 && rst.Contains("修改库存失败:请勿频繁提交"); i++) + { + rst = EditStock(shop, stockParam); + System.Threading.Thread.Sleep(Randomx.GetId(3000, 5000)); + } + //{"result":null,"success":true,"errorCode":1000000,"errorMsg":null} // 修改失败 + //{"result":null,"success":true,"errorCode":1000000,"errorMsg":null} // 修改成功 if (!rst.Contains("\"success\":true")) { var msg = BaseRegex.GetStringJson(ref rst, "errorMsg").ParseToString(); @@ -109,19 +156,22 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms msg = BaseRegex.GetStringJson(ref rst, "error_msg").ParseToString(); if (string.IsNullOrEmpty(msg)) msg = rst; - BaseMsgForm.ShowError("修改库存失败:" + msg); - return; + if (IsAuto) + this.ErrMsg = "修改库存失败:" + msg; + else + BaseMsgForm.ShowError("修改库存失败:" + msg); } else { - IsSuccess = true; - BaseMsgForm.ShowInfo("修改库存成功!"); - this.Close(); + IsEditSuccess = true; + if (!IsAuto) + { + BaseMsgForm.ShowInfo("修改库存成功!"); + this.Close(); + } } } - - private string EditStock(ShopLoginInfo shop, changeStockParam stockParam) { string url = "https://agentseller.temu.com/darwin-mms/api/kiana/foredawn/sales/stock/updateMmsProductSalesStock"; diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.Designer.cs index 2f89859..c41adcd 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.Designer.cs @@ -161,8 +161,8 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "ComplianceForm"; - this.Text = "ComplianceForm"; - this.TitleText = "ComplianceForm"; + this.Text = "合规信息"; + this.TitleText = "合规信息"; this.Load += new System.EventHandler(this.ComplianceForm_Load); this.Controls.SetChildIndex(this.panel2, 0); this.panel2.ResumeLayout(false); diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.cs index ae7648a..e9a114d 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ComplianceForm.cs @@ -16,11 +16,17 @@ using TemuKJD.BLL; namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms { + /// + /// 修改合规信息 + /// public partial class ComplianceForm : LRBaseForm { + /// + /// 批量自动操作,不弹框 + /// public bool IsAuto = false; public string ErrMsg = ""; - public bool EditSuccess = false; + public bool IsEditComplianceSuccess = false; public ShopLoginInfo shop; public complianceInfo complianceInfo; public complianceDetailInfo complianceDetailInfo; @@ -37,7 +43,22 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms private void ComplianceForm_Load(object sender, EventArgs e) { if (shop != null && complianceInfo != null) - this.GetComplianceInfo(); + { + this.Enabled = false; + Task.Run(() => + { + this.GetComplianceInfo(); + + Invoke(new Action(() => + { + this.Enabled = true; + if (IsAuto) + { + this.btnSave_Click(null, null); + } + })); + }); + } } void GetComplianceInfo() @@ -70,24 +91,26 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms JObject jObj = JObject.Parse(compDetailTemplateRst); lstComplianceDetailTemplateInfo = JsonHelper.DeserializeJsonToList(jObj["result"]["template_list"].ToString()); - this.cmbLaw65.Text = "无需警示"; - var complianceDetailTemp = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == 4); - if (complianceDetailTemp != null && complianceDetailTemp.template_property_dtolist != null && complianceDetailTemp.template_property_dtolist.Count > 0) + Invoke(new Action(() => { - foreach (var item in complianceDetailTemp.template_property_dtolist.FirstOrDefault().property_value_list) + this.cmbLaw65.Text = "无需警示"; + var complianceDetailTemp = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == 4); + if (complianceDetailTemp != null && complianceDetailTemp.template_property_dtolist != null && complianceDetailTemp.template_property_dtolist.Count > 0) { - this.cmbLaw65.Items.Add(item.lang_prompt_map["zh-Hans"]); + foreach (var item in complianceDetailTemp.template_property_dtolist.FirstOrDefault().property_value_list) + { + this.cmbLaw65.Items.Add(item.lang_prompt_map["zh-Hans"]); + } } - } + })); } catch (Exception ex) { if (IsAuto) - { ErrMsg = ex.Message; - Close(); - } - BaseMsgForm.ShowError(ex.Message); + else + BaseMsgForm.ShowError(ex.Message); + return; } } @@ -100,177 +123,184 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms JObject jObj = JObject.Parse(compDetailRst); complianceDetailInfo = JsonHelper.DeserializeJsonToObject(jObj["result"].ToString()); - // 欧盟负责人 - cmbEUPerson.Text = complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list.FirstOrDefault()?.rep_name; - if (complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list != null) + Invoke(new Action(() => { - foreach (var item in complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list) + // 欧盟负责人 + cmbEUPerson.Text = complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list.FirstOrDefault()?.rep_name; + if (complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list != null) { - cmbEUPerson.Items.Add(item.rep_name); + foreach (var item in complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 25)?.rep_detail_list) + { + cmbEUPerson.Items.Add(item.rep_name); + } } - } - // 制造商信息 - cmbMakerInfo.Text = complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list.FirstOrDefault()?.rep_name; - if (complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list != null) - { - foreach (var item in complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list) + // 制造商信息 + cmbMakerInfo.Text = complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list.FirstOrDefault()?.rep_name; + if (complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list != null) { - cmbMakerInfo.Items.Add(item.rep_name); + foreach (var item in complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 60)?.rep_detail_list) + { + cmbMakerInfo.Items.Add(item.rep_name); + } } - } - // 商品识别码 - var complianceDetail = complianceDetailInfo.template_list.FirstOrDefault(t => t.task_type == 61); - if (complianceDetail != null && complianceDetail.task_status == 3) - { - this.txtCode.Text = complianceDetail?.input_text?.Values?.FirstOrDefault()?.multi_line_inputs?.FirstOrDefault()?.name; - } + // 商品识别码 + var complianceDetail = complianceDetailInfo?.template_list?.FirstOrDefault(t => t.task_type == 61); + if (complianceDetail != null && complianceDetail.task_status == 3) + { + this.txtCode.Text = complianceDetail?.input_text?.Values?.FirstOrDefault()?.multi_line_inputs?.FirstOrDefault()?.name; + } + })); } catch (Exception ex) { if (IsAuto) - { ErrMsg = ex.Message; - Close(); - } - BaseMsgForm.ShowError(ex.Message); + else + BaseMsgForm.ShowError(ex.Message); } } } public void btnSave_Click(object sender, EventArgs e) { - try + Task.Run(() => { - EditCompliance(); - } - catch (Exception ex) - { - if (IsAuto) + try { - ErrMsg = ex.Message; - Close(); + EditCompliance(); } - BaseMsgForm.ShowError(ex.Message); - } + catch (Exception ex) + { + if (IsAuto) + ErrMsg = ex.Message; + else + BaseMsgForm.ShowError(ex.Message); + } + }); } private void EditCompliance() { JObject compObj = new JObject(); - compObj.Add("cat_id", complianceInfo.cat_id); - compObj.Add("spu_id", complianceInfo.spu_id); - compObj.Add("goods_id", complianceInfo.goods_id); - compObj.Add("template_edit_request_list", new JArray()); - var j_template_edit_list = compObj["template_edit_request_list"] as JArray; - foreach (var temp in complianceDetailInfo.template_list) + Invoke(new Action(() => { - var wait_task = complianceInfo.wait_task_dtolist.FirstOrDefault(t => t.task_type == temp.task_type); - - JObject j_template_edit = new JObject(); - j_template_edit_list.Add(j_template_edit); - j_template_edit.Add("task_id", wait_task.task_id); - j_template_edit.Add("task_status", temp.task_status); - j_template_edit.Add("task_type", temp.task_type); - if (temp.template_id != null) - j_template_edit.Add("template_id", temp.template_id); - - //加利福尼亚州65号法案 - if (temp.task_type == 4) + compObj.Add("cat_id", complianceInfo.cat_id); + compObj.Add("spu_id", complianceInfo.spu_id); + compObj.Add("goods_id", complianceInfo.goods_id); + compObj.Add("template_edit_request_list", new JArray()); + var j_template_edit_list = compObj["template_edit_request_list"] as JArray; + foreach (var temp in complianceDetailInfo.template_list) { - var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); - if (detailTemplateInfo != null) - { - j_template_edit.Add("properties", new JObject()); - j_template_edit.Add("images", new JObject()); - j_template_edit.Add("input_text", new JObject()); + var wait_task = complianceInfo.wait_task_dtolist.FirstOrDefault(t => t.task_type == temp.task_type); - var property_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_id; - var value_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_value_list?.FirstOrDefault(p => p.value_name == this.cmbLaw65.Text.Trim())?.vid; - if (property_id != null && value_id != null) + JObject j_template_edit = new JObject(); + j_template_edit_list.Add(j_template_edit); + j_template_edit.Add("task_id", wait_task.task_id); + j_template_edit.Add("task_status", temp.task_status); + j_template_edit.Add("task_type", temp.task_type); + if (temp.template_id != null) + j_template_edit.Add("template_id", temp.template_id); + + //加利福尼亚州65号法案 + if (temp.task_type == 4) + { + var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); + if (detailTemplateInfo != null) { - var jArr = new JArray(); - jArr.Add(value_id); - (j_template_edit["properties"] as JObject).Add(property_id.ParseToString(), jArr); + j_template_edit.Add("properties", new JObject()); + j_template_edit.Add("images", new JObject()); + j_template_edit.Add("input_text", new JObject()); + + var property_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_id; + var value_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_value_list?.FirstOrDefault(p => p.value_name == this.cmbLaw65.Text.Trim())?.vid; + if (property_id != null && value_id != null) + { + var jArr = new JArray(); + jArr.Add(value_id); + (j_template_edit["properties"] as JObject).Add(property_id.ParseToString(), jArr); + } } } - } - //材质分类 // task_id = 101044552836267 // task_type = 166 // template_id == 1004 - else if (temp.task_type == 166) - { - j_template_edit.Add("sku_multi_detail", new JObject()); - } - //商品识别码 // task_id = 101044552818783 // task_type = 61 // template_id == 51 - else if (temp.task_type == 61) - { - j_template_edit.Add("properties", new JObject()); - j_template_edit.Add("images", new JObject()); - j_template_edit.Add("input_text", new JObject()); - var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); - var property_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_id; // 1100100115 - if (property_id != null) + //材质分类 // task_id = 101044552836267 // task_type = 166 // template_id == 1004 + else if (temp.task_type == 166) { - (j_template_edit["input_text"] as JObject).Add(property_id.ParseToString(), new JObject()); - (j_template_edit["input_text"][property_id.ParseToString()] as JObject).Add("multi_line_inputs", new JArray()); - var multi_line_input = new JObject(); - multi_line_input.Add("name", txtCode.Text.Trim()); - (j_template_edit["input_text"][property_id.ParseToString()]["multi_line_inputs"] as JArray).Add(multi_line_input); + j_template_edit.Add("sku_multi_detail", new JObject()); } - } - // 欧盟负责人 - else if (temp.task_type == 25) - { - j_template_edit.Add("is_not_required", wait_task.is_not_required); - j_template_edit.Add("task_name", "欧盟负责人"); - j_template_edit.Add("status", wait_task.status); - j_template_edit.Add("punish_time", wait_task.punish_time); - j_template_edit.Add("sale_effect_info", JObject.Parse(JsonHelper.SerializeObject(wait_task.sale_effect_info))); - j_template_edit.Add("rep_detail_list", new JArray()); - var rep_detail = temp.rep_detail_list.FirstOrDefault(r => r.rep_name == cmbEUPerson.Text.Trim()); - rep_detail_param rep_param = new rep_detail_param { rep_id = rep_detail?.rep_id, rep_name = rep_detail?.rep_name }; - (j_template_edit["rep_detail_list"] as JArray).Add(JObject.Parse(JsonHelper.SerializeObject(rep_param))); - } - // 制造商信息 - else if (temp.task_type == 60) - { - j_template_edit.Add("is_not_required", wait_task.is_not_required); - j_template_edit.Add("task_name", "制造商信息"); - j_template_edit.Add("status", wait_task.status); - j_template_edit.Add("punish_time", wait_task.punish_time); - j_template_edit.Add("sale_effect_info", JObject.Parse(JsonHelper.SerializeObject(wait_task.sale_effect_info))); - j_template_edit.Add("rep_detail_list", new JArray()); - var rep_detail = temp.rep_detail_list.FirstOrDefault(r => r.rep_name == cmbMakerInfo.Text.Trim()); - rep_detail_param rep_param = new rep_detail_param { rep_id = rep_detail?.rep_id, rep_name = rep_detail?.rep_name }; - (j_template_edit["rep_detail_list"] as JArray).Add(JObject.Parse(JsonHelper.SerializeObject(rep_param))); - } - else - { - var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); - if (detailTemplateInfo != null && detailTemplateInfo.template_property_dtolist?.FirstOrDefault()?.control_type == 3) + //商品识别码 // task_id = 101044552818783 // task_type = 61 // template_id == 51 + else if (temp.task_type == 61) { j_template_edit.Add("properties", new JObject()); j_template_edit.Add("images", new JObject()); j_template_edit.Add("input_text", new JObject()); - + var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); var property_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_id; // 1100100115 - var value_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_value_list?.FirstOrDefault(p => p.value_name == "该信息不适用该产品")?.vid; - if (property_id != null && value_id != null) + if (property_id != null) { - var jArr = new JArray(); - jArr.Add(value_id); - (j_template_edit["properties"] as JObject).Add(property_id.ParseToString(), jArr); + (j_template_edit["input_text"] as JObject).Add(property_id.ParseToString(), new JObject()); + (j_template_edit["input_text"][property_id.ParseToString()] as JObject).Add("multi_line_inputs", new JArray()); + var multi_line_input = new JObject(); + multi_line_input.Add("name", txtCode.Text.Trim()); + (j_template_edit["input_text"][property_id.ParseToString()]["multi_line_inputs"] as JArray).Add(multi_line_input); + } + } + // 欧盟负责人 + else if (temp.task_type == 25) + { + j_template_edit.Add("is_not_required", wait_task.is_not_required); + j_template_edit.Add("task_name", "欧盟负责人"); + j_template_edit.Add("status", wait_task.status); + j_template_edit.Add("punish_time", wait_task.punish_time); + j_template_edit.Add("sale_effect_info", JObject.Parse(JsonHelper.SerializeObject(wait_task.sale_effect_info))); + j_template_edit.Add("rep_detail_list", new JArray()); + var rep_detail = temp.rep_detail_list.FirstOrDefault(r => r.rep_name == cmbEUPerson.Text.Trim()); + rep_detail_param rep_param = new rep_detail_param { rep_id = rep_detail?.rep_id, rep_name = rep_detail?.rep_name }; + (j_template_edit["rep_detail_list"] as JArray).Add(JObject.Parse(JsonHelper.SerializeObject(rep_param))); + } + // 制造商信息 + else if (temp.task_type == 60) + { + j_template_edit.Add("is_not_required", wait_task.is_not_required); + j_template_edit.Add("task_name", "制造商信息"); + j_template_edit.Add("status", wait_task.status); + j_template_edit.Add("punish_time", wait_task.punish_time); + j_template_edit.Add("sale_effect_info", JObject.Parse(JsonHelper.SerializeObject(wait_task.sale_effect_info))); + j_template_edit.Add("rep_detail_list", new JArray()); + var rep_detail = temp.rep_detail_list.FirstOrDefault(r => r.rep_name == cmbMakerInfo.Text.Trim()); + rep_detail_param rep_param = new rep_detail_param { rep_id = rep_detail?.rep_id, rep_name = rep_detail?.rep_name }; + (j_template_edit["rep_detail_list"] as JArray).Add(JObject.Parse(JsonHelper.SerializeObject(rep_param))); + } + else + { + var detailTemplateInfo = lstComplianceDetailTemplateInfo.FirstOrDefault(t => t.task_type == temp.task_type); + if (detailTemplateInfo != null && detailTemplateInfo.template_property_dtolist?.FirstOrDefault()?.control_type == 3) + { + j_template_edit.Add("properties", new JObject()); + j_template_edit.Add("images", new JObject()); + j_template_edit.Add("input_text", new JObject()); + + var property_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_id; // 1100100115 + var value_id = detailTemplateInfo?.template_property_dtolist?.FirstOrDefault()?.property_value_list?.FirstOrDefault(p => p.value_name == "该信息不适用该产品")?.vid; + if (property_id != null && value_id != null) + { + var jArr = new JArray(); + jArr.Add(value_id); + (j_template_edit["properties"] as JObject).Add(property_id.ParseToString(), jArr); + } } } } - } + })); var data = JsonHelper.SerializeObject(compObj); var editComplianceRst = EditCompliance(shop, compObj); // {"success":true,"error_code":1000000,"result":{"result":true}} editComplianceRst = GetHtml.Unicode2String(editComplianceRst); if (editComplianceRst.Contains("\"success\":true")) { - EditSuccess = true; + IsEditComplianceSuccess = true; if (!IsAuto) + { BaseMsgForm.ShowInfo("修改成功!"); - this.Close(); + this.Close(); + } } else { @@ -281,11 +311,9 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms sErrMsg = editComplianceRst; if (IsAuto) - { ErrMsg = sErrMsg; - Close(); - } - BaseMsgForm.ShowError(sErrMsg); + else + BaseMsgForm.ShowError(sErrMsg); } } diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ReceiveAreaForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ReceiveAreaForm.cs index 63ac592..eb18896 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ReceiveAreaForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitSubForms/ReceiveAreaForm.cs @@ -30,6 +30,12 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms private void ReceiveAreaForm_Load(object sender, EventArgs e) { + if (receiveArea == null) + { + BaseMsgForm.ShowError("修改期望到货区域失败:期望到货区域参数为空!"); + return; + } + if (receiveArea.expectReceiveAreaConfigType == 1) { this.radioButton1.Checked = true; @@ -49,6 +55,12 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms private void btnSave_Click(object sender, EventArgs e) { + if (receiveArea == null) + { + BaseMsgForm.ShowError("修改期望到货区域失败:期望到货区域参数为空!"); + return; + } + int areaId = 1; if (this.radioButton2.Checked) areaId = 2; @@ -81,7 +93,7 @@ namespace TemuKJD.KJDForms.ProductForms.TemuJitSubForms } } - private string EditReceiveArea(ShopLoginInfo shop, int AreaId, string skcIds) + public static string EditReceiveArea(ShopLoginInfo shop, int AreaId, string skcIds) { string url = "https://agentseller.temu.com/mms/turbo/supplier/pick/out/config/editExpectReceiveArea"; string body; diff --git a/TEMUKJD/UserComponent/DataGridViewEx.cs b/TEMUKJD/UserComponent/DataGridViewEx.cs index 9075f11..2701e84 100644 --- a/TEMUKJD/UserComponent/DataGridViewEx.cs +++ b/TEMUKJD/UserComponent/DataGridViewEx.cs @@ -47,6 +47,28 @@ namespace TemuKJD.UserComponent } } + private bool autoRowNumber = true; + /// + /// 边框颜色 + /// + [Description("自动行号"), Category("UserProperty")] + public bool AutoRowNumber + { + get + { + return autoRowNumber; + } + set + { + if (autoRowNumber != value) + { + autoRowNumber = value; + this.Invalidate(); + } + } + } + + /// /// 自动生成行号 /// @@ -54,8 +76,11 @@ namespace TemuKJD.UserComponent /// private void DataGridViewEx_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { - Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, RowHeadersWidth - 4, e.RowBounds.Height); - TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), RowHeadersDefaultCellStyle.Font, rectangle, Color.DarkGray, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + if (AutoRowNumber) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), RowHeadersDefaultCellStyle.Font, rectangle, Color.DarkGray, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } } ///