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

+22 -22
View File
@@ -3,12 +3,12 @@ using AllBase.Helper;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.WinForms;
using LittleRabbit.ChatForms.ChatHelper;
using LittleRabbit.ChatForms.ChatModel;
using LittleRabbit.Helper;
using LittleRabbit.LittleRabbitForms.BaseForms;
using LittleRabbit.LittleRabbitForms.ShopForms;
using LittleRabbit.LittleRabbitForms.ToolForms;
using TemuKJD.ChatForms.ChatHelper;
using TemuKJD.ChatForms.ChatModel;
using TemuKJD.Helper;
using TemuKJD.KJDForms.BaseForms;
using TemuKJD.KJDForms.ShopForms;
using TemuKJD.KJDForms.ToolForms;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using NaiBa.Util.Extension;
@@ -27,7 +27,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Work;
namespace LittleRabbit.ChatForms
namespace TemuKJD.ChatForms
{
public partial class ChatForm : Form
{
@@ -172,7 +172,7 @@ namespace LittleRabbit.ChatForms
while (!StartUp.IsShopInit)
Thread.Sleep(100);
SetMainBrowserUrl(GlobalConfig.DouShopLoginList.FirstOrDefault());
SetMainBrowserUrl(GlobalConfig.ShopLoginList.FirstOrDefault());
LoadShop();
InitAutoExecute();
});
@@ -200,16 +200,16 @@ namespace LittleRabbit.ChatForms
private void Chat_SearchResultReceived(DouShopLoginInfo shop)
{
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopAccountId);
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopId);
if (r != null)
{
for (int i = 0; i < dgvShop.Rows.Count; i++)
{
var row = dgvShop.Rows[i];
if (row.Cells[0].Value.ToString() == shop.ShopAccountId && shop != currentShop)
if (row.Cells[0].Value.ToString() == shop.ShopId && shop != currentShop)
{
if (ShopChatCount.ContainsKey(shop.ShopAccountId) && ShopChatCount[shop.ShopAccountId] > 0)
if (ShopChatCount.ContainsKey(shop.ShopId) && ShopChatCount[shop.ShopId] > 0)
{
Task.Run(() =>
{
@@ -301,7 +301,7 @@ namespace LittleRabbit.ChatForms
public void DgvShopClick(DouShopLoginInfo shop)
{
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopAccountId);
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopId);
if (r != null)
{
@@ -319,7 +319,7 @@ namespace LittleRabbit.ChatForms
string shopId = dgvShop.Rows[e.RowIndex].Cells["ColumnShopID"].Value?.ToString();
if (string.IsNullOrEmpty(shopId))
return;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
return;
@@ -360,7 +360,7 @@ namespace LittleRabbit.ChatForms
return;
dgvShop.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White;
var shop = GlobalConfig.DouShopLoginList.Where(s => s.ShopAccountId == shopId).FirstOrDefault();
var shop = GlobalConfig.ShopLoginList.Where(s => s.ShopId == shopId).FirstOrDefault();
if (shop == null)
return;
@@ -510,17 +510,17 @@ namespace LittleRabbit.ChatForms
shopList = new List<DouShopLoginInfo>();
if (shopList.Count == 0)
shopList.AddRange(GlobalConfig.DouShopLoginList);
shopList.AddRange(GlobalConfig.ShopLoginList);
for (int i = 0; i < shopList.Count; i++)
{
var shop = shopList[i];
DouShopLoginInfo result = new DouShopLoginInfo();
result.ShopAccountId = shop.ShopAccountId;
result.ShopId = shop.ShopId;
result.ShopAccount = shop.ShopAccount;
result.LoginStatus = shop.LoginStatus;
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopAccountId);
var r = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["columnShopId"].Value.ToString() == shop.ShopId);
this.Invoke(new Action(() =>
{
int iGrid = 0;
@@ -529,7 +529,7 @@ namespace LittleRabbit.ChatForms
else
iGrid = r.Index;
dgvShop.Rows[iGrid].Cells["ColumnShopID"].Value = shop.ShopAccountId; // 店铺ID
dgvShop.Rows[iGrid].Cells["ColumnShopID"].Value = shop.ShopId; // 店铺ID
dgvShop.Rows[iGrid].Cells["ColumnShopName"].Value = shop.ShopAccount; // 店铺名称
dgvShop.Rows[iGrid].Cells["ColumnShopStatus"].Value = shop.LoginStatus == "未登录" ? "未登录 点击登录" : shop.LoginStatus; // 登录状态
dicRowColor[dgvShop.Rows[iGrid]] = dgvShop.Rows[iGrid].DefaultCellStyle.BackColor;
@@ -719,7 +719,7 @@ namespace LittleRabbit.ChatForms
{
while (true)
{
foreach (var shop in GlobalConfig.DouShopLoginList)
foreach (var shop in GlobalConfig.ShopLoginList)
{
try
{
@@ -1100,7 +1100,7 @@ namespace LittleRabbit.ChatForms
if (isNewMessage)
{
ShopChatCount[shop.ShopAccountId] = 1;
ShopChatCount[shop.ShopId] = 1;
SearchNewMessageNofity(shop);
if (!ChatConfig.ChatSettingConfig.IsNotShowMessageWindow)
ShowMessageForm(shop);
@@ -1109,7 +1109,7 @@ namespace LittleRabbit.ChatForms
}
else
{
ShopChatCount[shop.ShopAccountId] = 0;
ShopChatCount[shop.ShopId] = 0;
SearchNewMessageNofity(shop);
CloseMessageForm(shop);
}
@@ -1185,7 +1185,7 @@ namespace LittleRabbit.ChatForms
private void button1_Click(object sender, EventArgs e)
{
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == "9050819");
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == "9050819");
Task.Run(() => { AutoReplyWithJs(shop); });
}
+10 -10
View File
@@ -1,4 +1,4 @@
namespace LittleRabbit.ChatForms
namespace TemuKJD.ChatForms
{
partial class ChatForm
{
@@ -42,12 +42,12 @@
this.txtAutoReplyText = new System.Windows.Forms.TextBox();
this.chkIsAutoReply = new System.Windows.Forms.CheckBox();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new LittleRabbit.UserComponent.DataGridViewEx();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.ColumnShopID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnShopStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.pnlRefresh = new DevComponents.DotNetBar.PanelEx();
this.tabControl1 = new LittleRabbit.UserComponent.UcTabControl();
this.tabControl1 = new TemuKJD.UserComponent.UcTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.tabPage2 = new System.Windows.Forms.TabPage();
@@ -459,7 +459,7 @@
//
// pbLogo
//
this.pbLogo.Image = global::LittleRabbit.Properties.Resources.main_form_logo;
this.pbLogo.Image = global::TemuKJD.Properties.Resources.main_form_logo;
this.pbLogo.Location = new System.Drawing.Point(7, 9);
this.pbLogo.Name = "pbLogo";
this.pbLogo.Size = new System.Drawing.Size(180, 60);
@@ -547,13 +547,13 @@
this.max.Style.BackColor1.Color = System.Drawing.Color.Transparent;
this.max.Style.BackColor2.Alpha = ((byte)(0));
this.max.Style.BackColor2.Color = System.Drawing.Color.Transparent;
this.max.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.max;
this.max.Style.BackgroundImage = global::TemuKJD.Properties.Resources.max;
this.max.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.max.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.max.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.max.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.max.Style.GradientAngle = 90;
this.max.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.max_hover;
this.max.StyleMouseOver.BackgroundImage = global::TemuKJD.Properties.Resources.max_hover;
this.max.TabIndex = 33;
this.max.Click += new System.EventHandler(this.max_Click);
//
@@ -572,13 +572,13 @@
this.min.Style.BackColor1.Color = System.Drawing.Color.Transparent;
this.min.Style.BackColor2.Alpha = ((byte)(0));
this.min.Style.BackColor2.Color = System.Drawing.Color.Transparent;
this.min.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.min;
this.min.Style.BackgroundImage = global::TemuKJD.Properties.Resources.min;
this.min.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.min.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.min.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.min.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.min.Style.GradientAngle = 90;
this.min.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.min_hover;
this.min.StyleMouseOver.BackgroundImage = global::TemuKJD.Properties.Resources.min_hover;
this.min.TabIndex = 32;
this.min.Click += new System.EventHandler(this.min_Click);
//
@@ -597,13 +597,13 @@
this.close.Style.BackColor1.Color = System.Drawing.Color.Transparent;
this.close.Style.BackColor2.Alpha = ((byte)(0));
this.close.Style.BackColor2.Color = System.Drawing.Color.Transparent;
this.close.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.close;
this.close.Style.BackgroundImage = global::TemuKJD.Properties.Resources.close;
this.close.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.close.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.close.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.close.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.close.Style.GradientAngle = 90;
this.close.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.close_hover;
this.close.StyleMouseOver.BackgroundImage = global::TemuKJD.Properties.Resources.close_hover;
this.close.TabIndex = 31;
this.close.Click += new System.EventHandler(this.close_Click);
//
+2 -2
View File
@@ -1,4 +1,4 @@
using LittleRabbit.ChatForms.ChatModel;
using TemuKJD.ChatForms.ChatModel;
using NaiBa.Util;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LittleRabbit.ChatForms.ChatHelper
namespace TemuKJD.ChatForms.ChatHelper
{
public class ChatConfig
{
+1 -1
View File
@@ -1,4 +1,4 @@
namespace LittleRabbit.ChatForms
namespace TemuKJD.ChatForms
{
partial class ChatMessageForm
{
+2 -2
View File
@@ -1,5 +1,5 @@
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using TemuKJD.KJDForms.BaseForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -11,7 +11,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.ChatForms
namespace TemuKJD.ChatForms
{
public partial class ChatMessageForm : LRBaseForm
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LittleRabbit.ChatForms.ChatModel
namespace TemuKJD.ChatForms.ChatModel
{
public class ChatSettingsParam
{