From 6d22729cff3a7ceedf690c9057a9ac605221a4fb Mon Sep 17 00:00:00 2001 From: wule_5900x Date: Sat, 13 Dec 2025 11:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=A0=B8=E4=BB=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TEMUKJD/KJDForms/AdminForms/AdminForm.cs | 2 +- .../AdminForms/AdminProductPriceCheckForm.cs | 79 +++++++++++-------- TEMUKJD/KJDForms/JITForms/JITForm.cs | 2 +- .../ProductForms/ProductForm.Designer.cs | 14 ++-- TEMUKJD/KJDForms/ProductForms/ProductForm.cs | 6 ++ 5 files changed, 65 insertions(+), 38 deletions(-) diff --git a/TEMUKJD/KJDForms/AdminForms/AdminForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminForm.cs index 2d1de10..53af649 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminForm.cs @@ -116,7 +116,7 @@ namespace TemuKJD.KJDForms.AdminForms SetForm(productThirdSelectListManageForm.Value); break; case "商品核价": - adminProductPriceCheckForm.Value.IsClientJit = false; + adminProductPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.Admin; SetForm(adminProductPriceCheckForm.Value); break; case "加入发货台": diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index 25a790e..ee20ebe 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -27,7 +27,14 @@ namespace TemuKJD.KJDForms.AdminForms { public partial class AdminProductPriceCheckForm : BaseForm { - public bool IsClientJit { get; set; } = false; + public enum EnumClientMode + { + Admin, + Client, + ClientJit, + } + + public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin; CheckBox chkSelectAll; PriceCheckConfig priceCheckConfig = null; ConcurrentList lstPriceCheckFilterConfig = new ConcurrentList(); @@ -67,12 +74,18 @@ namespace TemuKJD.KJDForms.AdminForms //dgvShop.Columns["colSubSa"].Visible = false; //btnSetSubSa.Visible = false; } - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) { ucSplitPage1.Visible = false; - - chkSearchAllShop.Visible = false; ucSplitPage1.Visible = false; + chkSearchAllShop.Visible = false; + + btnSearchPrice3.Visible = false; + btnStop.Location = btnSearchPrice3.Location; + btnStop.Size = btnSearchPrice3.Size; + } + if (ClientMode == EnumClientMode.ClientJit) + { this.colJitStatus.Visible = true; lblJudgeLen.Text = "列表中仅显示需要还原商品"; numJudgeLen.Visible = false; @@ -91,13 +104,11 @@ namespace TemuKJD.KJDForms.AdminForms this.numHeight2.Value = 8; this.numWeight1.Value = 200; this.numWeight2.Value = 200; - - btnSearchPrice3.Visible = false; - btnStop.Location = btnSearchPrice3.Location; - btnStop.Size = btnSearchPrice3.Size; } - if (IsClientJit) + if (ClientMode == EnumClientMode.ClientJit) + priceCheckConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("client_jit_price_check_config"); + else if (ClientMode == EnumClientMode.Client) priceCheckConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("client_price_check_config"); else priceCheckConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("price_check_config"); @@ -127,8 +138,12 @@ namespace TemuKJD.KJDForms.AdminForms } else { - var list = lstAdminShopInfo.Where(s => s.LoginStatus2 == "国际版在线").ToList(); - if (IsClientJit) + var list = new List(); + if (ClientMode == EnumClientMode.Admin) + lstAdminShopInfo.Where(s => s.LoginStatus2 == "国际版在线").ToList(); + else if (ClientMode == EnumClientMode.Client) + list = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus2 == "国际版在线").ToList(); + else if (ClientMode == EnumClientMode.ClientJit) list = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus2 == "国际版在线" && s.jit_expire_time >= DateTime.Now.Date).ToList(); foreach (DataGridViewRow row in dgvShop.Rows) { @@ -151,7 +166,9 @@ namespace TemuKJD.KJDForms.AdminForms priceCheckConfig.PriceDown = this.txtPriceDown.Text.Trim(); priceCheckConfig.SearchAllShop = this.chkSearchAllShop.Checked; - if (IsClientJit) + if (ClientMode == EnumClientMode.ClientJit) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("client_jit_price_check_config", priceCheckConfig); + else if (ClientMode == EnumClientMode.Client) NaiBa.Util.Helper.ConfigHelper.SaveConfig("client_price_check_config", priceCheckConfig); else NaiBa.Util.Helper.ConfigHelper.SaveConfig("price_check_config", priceCheckConfig); @@ -163,7 +180,7 @@ namespace TemuKJD.KJDForms.AdminForms if (this.Visible /*&& this.firstLoad*/) { //firstLoad = false; - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) { RefreshShop(); } @@ -177,7 +194,7 @@ namespace TemuKJD.KJDForms.AdminForms private void btnRefreshShop_Click(object sender, EventArgs e) { - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) { RefreshShop(); } @@ -376,7 +393,7 @@ namespace TemuKJD.KJDForms.AdminForms (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; } - if (IsClientJit) + if (ClientMode == EnumClientMode.ClientJit) { var jitRow = this.dgvShop.Rows.Cast().FirstOrDefault(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId); jitRow.Cells["colJitStatus"].Style.ForeColor = JitShopActiveForm.GetJitStatusStyleColor(shop); @@ -391,10 +408,10 @@ namespace TemuKJD.KJDForms.AdminForms string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString(); string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); ShopLoginInfo shop; - if (!IsClientJit) - shop = lstAdminShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId); - else + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == accountId); + else + shop = lstAdminShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId); switch (headerText) { @@ -405,7 +422,7 @@ namespace TemuKJD.KJDForms.AdminForms //shopLoginForm.openType = EnumOpenType.login; //shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; //shopLoginForm.ShowDialog(); - if (!IsClientJit) + if (ClientMode == EnumClientMode.Admin) { this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); if (shop.LoginStatus2 == "国际版在线") @@ -446,7 +463,7 @@ namespace TemuKJD.KJDForms.AdminForms } break; case "": - if (IsClientJit) + if (ClientMode == EnumClientMode.ClientJit) { if (shop != null && shop.jit_expire_time > DateTime.Now.Date) { @@ -489,13 +506,13 @@ namespace TemuKJD.KJDForms.AdminForms string prodId = dgvPriceCheck.Rows[e.RowIndex].Cells["colProductId"].Value.ParseToString(); string accountId = dgvPriceCheck.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == accountId); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == accountId); switch (headerText) { case "规格名称": - if (!IsClientJit) + if (ClientMode != EnumClientMode.Admin) { var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); if (priceInfo != null) @@ -788,7 +805,7 @@ namespace TemuKJD.KJDForms.AdminForms var selectShopIdLst = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) .Select(r => r.Cells["colShopId"].Value.ParseToString()).Distinct().ToList(); List shops = new List(); - if (!IsClientJit) + if (ClientMode == EnumClientMode.Admin) shops = this.lstAdminShopInfo.Where(s => selectShopIdLst.Contains(s.ShopId)).ToList(); else shops = GlobalConfig.ShopLoginList.Where(s => selectShopIdLst.Contains(s.ShopId)).ToList(); @@ -821,7 +838,7 @@ namespace TemuKJD.KJDForms.AdminForms { shopIndex++; var shop = this.lstAdminShopInfo.FirstOrDefault(s => shopId == s.ShopId); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => shopId == s.ShopId); if (shop == null) continue; @@ -1238,7 +1255,7 @@ namespace TemuKJD.KJDForms.AdminForms { var rows = this.dgvPriceCheck.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); if (shop == null) continue; @@ -1384,7 +1401,7 @@ namespace TemuKJD.KJDForms.AdminForms { var orderId = row.Cells["colOrderId"].Value.ParseToString(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); if (shop == null) continue; @@ -1418,7 +1435,7 @@ namespace TemuKJD.KJDForms.AdminForms { var orderId = row.Cells["colOrderId"].Value.ParseToString(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); if (shop == null) continue; @@ -1452,7 +1469,7 @@ namespace TemuKJD.KJDForms.AdminForms { var orderId = row.Cells["colOrderId"].Value.ParseToString(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); if (shop == null) continue; @@ -1577,7 +1594,7 @@ namespace TemuKJD.KJDForms.AdminForms if (row == null) continue; var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); if (shop == null) continue; @@ -1748,7 +1765,7 @@ namespace TemuKJD.KJDForms.AdminForms // 查询是否有修改记录,如果没有申请新的修改,获取taskId var rows = this.dgvPriceCheck.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); - if (IsClientJit) + if (ClientMode != EnumClientMode.Admin) shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); if (shop == null) return; // continue; @@ -2446,7 +2463,7 @@ namespace TemuKJD.KJDForms.AdminForms void CheckShopLogin(ShopLoginInfo[] shops, bool isShowProgress) { - if (!IsClientJit) + if (ClientMode == EnumClientMode.Admin) AdminShopListForm.Instance.CheckShopLogin(shops, isShowProgress); else ShopListForm.Instance.CheckShopLogin(shops, isShowProgress); diff --git a/TEMUKJD/KJDForms/JITForms/JITForm.cs b/TEMUKJD/KJDForms/JITForms/JITForm.cs index 0be1bf0..ff5baeb 100644 --- a/TEMUKJD/KJDForms/JITForms/JITForm.cs +++ b/TEMUKJD/KJDForms/JITForms/JITForm.cs @@ -66,7 +66,7 @@ namespace TemuKJD.KJDForms.JITForms SetForm(dDbProductSelectListManageForm.Value); break; case "JIT商品核价": - productPriceCheckForm.Value.IsClientJit = true; + productPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.ClientJit; SetForm(productPriceCheckForm.Value); break; case "开通JIT": diff --git a/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs index 9f7d031..3b5dbb5 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs @@ -38,7 +38,8 @@ System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("库存记录"); System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("商品上传"); System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("库存上传"); - System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { + System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品核价"); + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, @@ -48,7 +49,8 @@ treeNode7, treeNode8, treeNode9, - treeNode10}); + treeNode10, + treeNode11}); this.panel1 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -159,10 +161,12 @@ treeNode9.Text = "商品上传"; treeNode10.Name = "库存上传"; treeNode10.Text = "库存上传"; - treeNode11.Name = "商品管理"; - treeNode11.Text = "商品管理"; + treeNode11.Name = "商品核价"; + treeNode11.Text = "商品核价"; + treeNode12.Name = "商品管理"; + treeNode12.Text = "商品管理"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode11}); + treeNode12}); this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); this.tv.Size = new System.Drawing.Size(140, 521); this.tv.TabIndex = 1; diff --git a/TEMUKJD/KJDForms/ProductForms/ProductForm.cs b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs index 35e741a..a2a660d 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs @@ -14,6 +14,7 @@ using TemuKJD.KJDForms.ProductSelectForms; using TemuKJD.BaseForms; using TemuKJD.KJDForms.ProductThirdSelectForms; using AllBase; +using TemuKJD.KJDForms.AdminForms; namespace TemuKJD.KJDForms.ProductForms { @@ -31,6 +32,7 @@ namespace TemuKJD.KJDForms.ProductForms public Lazy productSelectListManageForm = new Lazy(); public Lazy productThirdSelectListManageForm = new Lazy(); + public Lazy productPriceCheckForm = new Lazy(); public ProductForm() { @@ -118,6 +120,10 @@ namespace TemuKJD.KJDForms.ProductForms productThirdSelectListManageForm.Value.ClientMode = ProductThirdSelectListManageForm.EnumClientMode.Client; SetForm(productThirdSelectListManageForm.Value); break; + case "商品核价": + productPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.Client; + SetForm(productPriceCheckForm.Value); + break; } //})); //}).Start();