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); });
}