1店铺登录逻辑优化 2备货单查询显示

This commit is contained in:
wule committed 2025-07-01 18:58:51 +08:00
1 parent 89eb9ce9d4
commit 862ad088f5
216 files changed
+3481 -1543

No files matched your search

@@ -1,4 +1,4 @@
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
partial class ClearNoVisitorForm
{
@@ -33,11 +33,11 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
this.label11 = new System.Windows.Forms.Label();
this.cmbSource = new DevComponents.DotNetBar.Controls.ComboBoxEx();
@@ -59,7 +59,7 @@
this.btnStopGetProduct = new DevComponents.DotNetBar.PanelEx();
this.btnGetProduct = new DevComponents.DotNetBar.PanelEx();
this.label1 = new System.Windows.Forms.Label();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtOperateCount = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtUploadDays = new System.Windows.Forms.TextBox();
@@ -79,11 +79,11 @@
this.btnDelete = new DevComponents.DotNetBar.PanelEx();
this.chkUploadDays = new System.Windows.Forms.CheckBox();
this.label8 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new TemuKJD.UserControls.ButtonEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new LittleRabbit.UserComponent.DataGridViewEx();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -92,7 +92,7 @@
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.ucTabControl1 = new LittleRabbit.UserComponent.UcTabControl();
this.ucTabControl1 = new TemuKJD.UserComponent.UcTabControl();
this.tabPageCheckResult = new System.Windows.Forms.TabPage();
this.tabPageViolateFileList = new System.Windows.Forms.TabPage();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
@@ -223,7 +223,7 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx3.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.Controls.Add(this.panelEx2);
this.ucGroupBoxEx3.Controls.Add(this.label11);
this.ucGroupBoxEx3.Controls.Add(this.cmbSource);
@@ -488,7 +488,7 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.txtOperateCount);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtUploadDays);
@@ -738,7 +738,7 @@
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
@@ -4,10 +4,10 @@ using AllBase.Helper;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.WinForms;
using LittleRabbit.DashBoardForms;
using LittleRabbit.Extension;
using LittleRabbit.Helper;
using LittleRabbit.LittleRabbitForms.BaseForms;
using TemuKJD.DashBoardForms;
using TemuKJD.Extension;
using TemuKJD.Helper;
using TemuKJD.KJDForms.BaseForms;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using NaiBa.Util.Extension;
@@ -24,7 +24,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Work.DouyinApiClass;
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
public partial class ClearNoVisitorForm : Form
{
@@ -63,7 +63,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
else
{
lstShopId.Clear();
var list = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && s.LoginStatus == "登录成功").Select(ss => ss.ShopAccountId);
var list = GlobalConfig.ShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && s.LoginStatus == "登录成功").Select(ss => ss.ShopId);
lstShopId.AddRange(list);
foreach (DataGridViewRow row in dgvShop.Rows)
{
@@ -87,17 +87,17 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
private void RefreshShop()
{
// 更新选中的上货店铺Id
lstShopId = lstShopId.Where(id => GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == id && s.LoginStatus == "已授权")).ToList();
lstShopId = lstShopId.Where(id => GlobalConfig.ShopLoginList.Any(s => s.ShopId == id && s.LoginStatus == "已授权")).ToList();
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
=> !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.DouShopLoginList)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
BindShop(shopEntity);
}
@@ -109,12 +109,12 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
return;
bool canUse = shopEntity.ApiAuthStatus == "授权成功" && shopEntity.LoginStatus == "登录成功";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopAccountId);
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
{
this.dgvShop.Rows.Add(
lstShopId.Contains(shopEntity.ShopAccountId) && canUse,
shopEntity.ShopAccountId,
lstShopId.Contains(shopEntity.ShopId) && canUse,
shopEntity.ShopId,
shopEntity.ShopAccount,
shopEntity.ApiAuthStatus,
shopEntity.LoginStatus,
@@ -124,7 +124,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
}
else
{
row.Cells["colSelect"].Value = lstShopId.Contains(shopEntity.ShopAccountId) && canUse;
row.Cells["colSelect"].Value = lstShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colAuthStatus"].Value = shopEntity.ApiAuthStatus;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
@@ -140,7 +140,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
string shopName = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ToString();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId.ToString());
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
@@ -188,18 +188,18 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
continue;
ClearNoVisitorShopForm clearForm = null;
Invoke(new Action(() =>
{
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopId);
if (tab == null)
{
tab = new TabPage();
tab.Name = "tab" + shop.ShopAccountId;
tab.Name = "tab" + shop.ShopId;
tab.Text = shop.ShopAccount;
this.ucTabControl1.TabPages.Add(tab);
@@ -341,7 +341,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
if (webBrowser.Tag != null)
{
var shop = webBrowser.Tag as DouShopLoginInfo;
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopId);
var clearForm = tab.Controls[0] as ClearNoVisitorShopForm;
Task.Run(() =>
@@ -441,7 +441,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
if (webBrowser.Tag != null)
{
var shop = webBrowser.Tag as DouShopLoginInfo;
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopId);
var clearForm = tab.Controls[0] as ClearNoVisitorShopForm;
Task.Run(() =>
@@ -725,7 +725,7 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
{
foreach (var shopId in lstShopId)
{
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
continue;
@@ -1,4 +1,4 @@
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
partial class ClearNoVisitorShopForm
{
@@ -32,9 +32,9 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvProduct = new LittleRabbit.UserComponent.DataGridViewEx();
this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -2,7 +2,7 @@
using AllBase.Extension;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using TemuKJD.KJDForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
@@ -17,7 +17,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Product;
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
public partial class ClearNoVisitorShopForm : Form
{
@@ -158,9 +158,9 @@ namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
});
tList.Add(t1);
if (LittleRabbitForms.ShopForms.ShopListForm.Instance == null)
LittleRabbitForms.ShopForms.ShopListForm.Instance = new LittleRabbitForms.ShopForms.ShopListForm();
LittleRabbitForms.ShopForms.ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
if (KJDForms.ShopForms.ShopListForm.Instance == null)
KJDForms.ShopForms.ShopListForm.Instance = new KJDForms.ShopForms.ShopListForm();
KJDForms.ShopForms.ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
var t2 = Task.Run(() =>
{
+2 -2
View File
@@ -1,4 +1,4 @@
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
partial class OptimizeForm
{
@@ -32,7 +32,7 @@
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("店铺优化", new System.Windows.Forms.TreeNode[] {
treeNode1});
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tv = new LittleRabbit.UserComponent.UcTreeView();
this.tv = new TemuKJD.UserComponent.UcTreeView();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -9,7 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.ShopOptimizeForms
namespace TemuKJD.KJDForms.ShopOptimizeForms
{
public partial class OptimizeForm : Form
{