客户端支持商品核价功能
This commit is contained in:
1 parent
62465769fe
commit
6d22729cff
5 files changed
+65
-38
No files matched your search
@@ -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 "加入发货台":
|
||||
|
||||
@@ -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<PriceCheckFilterConfig> lstPriceCheckFilterConfig = new ConcurrentList<PriceCheckFilterConfig>();
|
||||
@@ -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<PriceCheckConfig>("client_jit_price_check_config");
|
||||
else if (ClientMode == EnumClientMode.Client)
|
||||
priceCheckConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<PriceCheckConfig>("client_price_check_config");
|
||||
else
|
||||
priceCheckConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<PriceCheckConfig>("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<ShopLoginInfo>();
|
||||
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<DataGridViewRow>().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<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true)
|
||||
.Select(r => r.Cells["colShopId"].Value.ParseToString()).Distinct().ToList();
|
||||
List<ShopLoginInfo> shops = new List<ShopLoginInfo>();
|
||||
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<DataGridViewRow>().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<DataGridViewRow>().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);
|
||||
|
||||
@@ -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":
|
||||
|
||||
+9
-5
@@ -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;
|
||||
|
||||
@@ -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<DbProductSelectListManageForm> productSelectListManageForm = new Lazy<DbProductSelectListManageForm>();
|
||||
public Lazy<ProductThirdSelectListManageForm> productThirdSelectListManageForm = new Lazy<ProductThirdSelectListManageForm>();
|
||||
public Lazy<AdminProductPriceCheckForm> productPriceCheckForm = new Lazy<AdminProductPriceCheckForm>();
|
||||
|
||||
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();
|
||||
|
||||
Reference in new issue
Block a user