超级店铺管理功能

This commit is contained in:
wule committed 2025-07-09 10:09:32 +08:00
1 parent d3e404ac2a
commit fe2d2883db
91 files changed
+4295 -587

No files matched your search

@@ -138,7 +138,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// 使用cef修改申样规则
/// </summary>
/// <param name="shops"></param>
public void EditSampleRuleWithCef(List<DouShopLoginInfo> shops)
public void EditSampleRuleWithCef(List<ShopLoginInfo> shops)
{
Task.Run(() =>
{
@@ -205,7 +205,7 @@ namespace TemuKJD.KJDForms.ProductForms
});
}
void EditSampleRule(DouShopLoginInfo shop)
void EditSampleRule(ShopLoginInfo shop)
{
// 错误提示信息
string failMsg = "";
@@ -435,7 +435,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// </summary>
/// <param name="shops"></param>
/// <param name="type"></param>
public void AddCommissionWithCef(List<DouShopLoginInfo> shops)
public void AddCommissionWithCef(List<ShopLoginInfo> shops)
{
Task.Run(() =>
{
@@ -506,7 +506,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// 登录店铺佣金页面
/// </summary>
/// <param name="shop"></param>
private string LoadShopCommissionPage(DouShopLoginInfo shop)
private string LoadShopCommissionPage(ShopLoginInfo shop)
{
Thread.Sleep(1000);
@@ -616,7 +616,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// 设置新佣金
/// </summary>
/// <param name="shop"></param>
private void SetNewCommission(DouShopLoginInfo shop)
private void SetNewCommission(ShopLoginInfo shop)
{
// 错误提示信息
string failMsg = "";
+3 -3
View File
@@ -248,9 +248,9 @@ namespace TemuKJD.KJDForms.ProductForms
fissionBrowserObject.InformationReceived += fissionBrowserObject_InfomationReceived;
// 注册C#类为JS对象(FissionBrowserObject.cs)类
//browser.RegisterJsObject("cefBrowser", fissionBrowserObject, new CefSharp.BindingOptions { CamelCaseJavascriptNames = false });
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
//CefSharpSettings.LegacyJavascriptBindingEnabled = true;//cef 79 84以后:“CefSharpSettings”未包含“LegacyJavascriptBindingEnabled”的定义
CefSharpSettings.WcfEnabled = true;
browser.JavascriptObjectRepository.Register("cefBrowser", fissionBrowserObject, isAsync: false, options: new BindingOptions { CamelCaseJavascriptNames = false });
browser.JavascriptObjectRepository.Register("cefBrowser", fissionBrowserObject, isAsync: false, options: new BindingOptions { /*CamelCaseJavascriptNames = false*/ /*cef79*/ });
browser.FrameLoadEnd += Browser_FrameLoadEnd;
browser.SizeChanged += Browser_SizeChanged;
this.panel1.Controls.Add(browser);
@@ -660,7 +660,7 @@ namespace TemuKJD.KJDForms.ProductForms
int level = 0;
string name = "其他";
DouShopLoginInfo dyShop = null;
ShopLoginInfo dyShop = null;
var item = this.cmbGetCatShop.SelectedItem as ComboBoxItem;
if (item != null && item.Name != "随机选择")
{
@@ -294,7 +294,7 @@ namespace TemuKJD.KJDForms.ProductForms
{
}
public List<GoodsCategoryModel> GetCategoryList(int catId, DouShopLoginInfo shop)
public List<GoodsCategoryModel> GetCategoryList(int catId, ShopLoginInfo shop)
{
List<GoodsCategoryModel> cateList = new List<GoodsCategoryModel>();
if (catId < 0)
@@ -37,8 +37,8 @@ namespace TemuKJD.KJDForms.ProductForms
public DateTime notOperateChangeDays = DateTime.Now.Date.AddDays(-7);
public long notOperateChangeDaysTick = 0;
public List<string> lstProductIdHasSales = new List<string>();
public List<DouShopLoginInfo> lstGetSalesSuccesShop = new List<DouShopLoginInfo>();
public DouShopLoginInfo currentShop = null;
public List<ShopLoginInfo> lstGetSalesSuccesShop = new List<ShopLoginInfo>();
public ShopLoginInfo currentShop = null;
public bool isReadShopSales = false;
ShopProductBLL shopProductBLL = new ShopProductBLL();
CancellationTokenSource cancellationTokenSource = null;
@@ -106,7 +106,7 @@ namespace TemuKJD.KJDForms.ProductForms
}));
}
void GetShopProduct(DouShopLoginInfo shop, bool isShowResult = true)
void GetShopProduct(ShopLoginInfo shop, bool isShowResult = true)
{
DataGridViewRow row = null;
Invoke(new Action(() =>
@@ -209,13 +209,13 @@ namespace TemuKJD.KJDForms.ProductForms
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
BindShop(shopEntity);
}
}
private void BindShop(DouShopLoginInfo shopEntity)
private void BindShop(ShopLoginInfo shopEntity)
{
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
@@ -658,7 +658,7 @@ namespace TemuKJD.KJDForms.ProductForms
else
notOperateChangeDaysTick = 0;
// todo:先读取所有店铺的符合条件商品,然后统一删除
Dictionary<DouShopLoginInfo, DouProductListInfo> dicShopOperateProductList = new Dictionary<DouShopLoginInfo, DouProductListInfo>();
Dictionary<ShopLoginInfo, DouProductListInfo> dicShopOperateProductList = new Dictionary<ShopLoginInfo, DouProductListInfo>();
Task.Run(() =>
{
@@ -1407,7 +1407,7 @@ namespace TemuKJD.KJDForms.ProductForms
}
// /product/getProductUpdateRule
string GetProductUpdateRule(DouShopLoginInfo shop, string catId)
string GetProductUpdateRule(ShopLoginInfo shop, string catId)
{
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary.Add("category_id", catId);
@@ -1430,7 +1430,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <summary>
/// 获取有订单商品Id列表
/// </summary>
private void GetHasSales(DouShopLoginInfo shop)
private void GetHasSales(ShopLoginInfo shop)
{
currentShop = shop;
@@ -1589,7 +1589,7 @@ namespace TemuKJD.KJDForms.ProductForms
}
}
private void updateTrailOperationCount(DouShopLoginInfo shop)
private void updateTrailOperationCount(ShopLoginInfo shop)
{
if (shop.PayStatus != 1)
{
@@ -69,7 +69,7 @@ namespace TemuKJD.KJDForms.ProductForms
}
}
public string GetShopProductListData(DouShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50)
public string GetShopProductListData(ShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50)
{
// 读取在售商品数量
Dictionary<string, string> dictionary = new Dictionary<string, string>();
@@ -83,7 +83,7 @@ namespace TemuKJD.KJDForms.ProductForms
var resultOnline = douApi.GetProductList();
return resultOnline;
}
void GetShopProduct(DouShopLoginInfo shop, bool isShowResult = true)
void GetShopProduct(ShopLoginInfo shop, bool isShowResult = true)
{
DataGridViewRow row = null;
Invoke(new Action(() =>
@@ -185,7 +185,7 @@ namespace TemuKJD.KJDForms.ProductForms
});
}
void SetDelaySendCef(List<DouShopLoginInfo> shops)
void SetDelaySendCef(List<ShopLoginInfo> shops)
{
Task.Run(() =>
{
@@ -59,13 +59,13 @@ namespace TemuKJD.KJDForms.ProductForms
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
BindShop(shopEntity);
}
}
private void BindShop(DouShopLoginInfo shopEntity)
private void BindShop(ShopLoginInfo shopEntity)
{
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
@@ -175,7 +175,7 @@ namespace TemuKJD.KJDForms.ProductForms
}));
}
void GetShopProduct(DouShopLoginInfo shop, bool isShowResult = true)
void GetShopProduct(ShopLoginInfo shop, bool isShowResult = true)
{
DataGridViewRow row = null;
Invoke(new Action(() =>
@@ -252,7 +252,7 @@ namespace TemuKJD.KJDForms.ProductForms
}));
}
public string GetShopProductListData(DouShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50)
public string GetShopProductListData(ShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50)
{
// 读取在售商品数量
Dictionary<string, string> dictionary = new Dictionary<string, string>();
@@ -552,7 +552,7 @@ namespace TemuKJD.KJDForms.ProductForms
}, cancellationTokenSource.Token);
}
public string SetProductStock(DouShopLoginInfo shop, string productId, string skuId, string stock)
public string SetProductStock(ShopLoginInfo shop, string productId, string skuId, string stock)
{
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary.Add("product_id", productId);
@@ -563,7 +563,7 @@ namespace TemuKJD.KJDForms.ProductForms
var resultOnline = douApi.SetProductStock();
return resultOnline;
}
public string GetProductDetail(DouShopLoginInfo shop, string productId)
public string GetProductDetail(ShopLoginInfo shop, string productId)
{
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary.Add("product_id", productId);
@@ -343,7 +343,7 @@ namespace TemuKJD.KJDForms.ProductForms
public void Get(object shop)
{
var Shop = shop as DouShopLoginInfo;
var Shop = shop as ShopLoginInfo;
var bll = new UploadProductBLL(formName, Shop);
bll.productHandler = RefreshGridView;
bll.noticeHandler = RefreshLog;
@@ -356,7 +356,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
public void GetMulti(object shop)
{
var Shop = shop as DouShopLoginInfo;
var Shop = shop as ShopLoginInfo;
var bll = new UploadProductBLL(formName, Shop);
bll.productHandler = RefreshGridView;
bll.noticeHandler = RefreshLog;
@@ -529,7 +529,7 @@ namespace TemuKJD.KJDForms.ProductForms
}, cancellationTokenSource.Token);
}
private void TroubleShootingShopProduct(List<DouShopLoginInfo> shopList, bool isOperateOnline = true)
private void TroubleShootingShopProduct(List<ShopLoginInfo> shopList, bool isOperateOnline = true)
{
@@ -1215,7 +1215,7 @@ namespace TemuKJD.KJDForms.ProductForms
AddViolateToServer(violateRuleName);
}
void GetShopProduct(DouShopLoginInfo shop, bool isShowResult = true)
void GetShopProduct(ShopLoginInfo shop, bool isShowResult = true)
{
DataGridViewRow row = null;
Invoke(new Action(() =>
@@ -1282,7 +1282,7 @@ namespace TemuKJD.KJDForms.ProductForms
}));
}
public string GetShopProductListData(DouShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50, long update_end_time = 0)
public string GetShopProductListData(ShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50, long update_end_time = 0)
{
// 读取在售商品数量
Dictionary<string, string> dictionary = new Dictionary<string, string>();
@@ -84,14 +84,14 @@ namespace TemuKJD.KJDForms.ProductForms
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
if (!string.IsNullOrEmpty(shopEntity.ShopId))
BindShop(shopEntity, selectIds);
}
}
private void BindShop(DouShopLoginInfo shopEntity, List<string> selectShopId = null)
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
{
if (shopEntity == null)
return;
@@ -380,7 +380,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="page"></param>
/// <returns></returns>
private string GetPriceAdjustList(DouShopLoginInfo shop, int page = 1, string type = "待调价")
private string GetPriceAdjustList(ShopLoginInfo shop, int page = 1, string type = "待调价")
{
page = Math.Max(page, 1);
string url = "https://seller.kuajingmaihuo.com/marvel-mms/cn/api/kiana/magneto/price-adjust/page-query";
@@ -545,7 +545,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subOrderInfo"></param>
/// <returns></returns>
private string refuseAdjust(DouShopLoginInfo shop, List<string> adjustIdList, string refuseReason)
private string refuseAdjust(ShopLoginInfo shop, List<string> adjustIdList, string refuseReason)
{
string url = "https://seller.kuajingmaihuo.com/marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price-adjust/batch/adjust";
string body = "{\"adjustList\":[";
@@ -12,7 +12,7 @@ namespace TemuKJD.KJDForms.ProductForms
{
public class ProductResponse
{
public static string GetPostResponse(DouShopLoginInfo shop, string _url, string _data, string referer)
public static string GetPostResponse(ShopLoginInfo shop, string _url, string _data, string referer)
{
HttpWebResponse response = null;
string result;
@@ -102,14 +102,14 @@ namespace TemuKJD.KJDForms.ProductForms
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{
if (!string.IsNullOrEmpty(shopEntity.ShopId))
BindShop(shopEntity, selectIds);
}
}
private void BindShop(DouShopLoginInfo shopEntity, List<string> selectShopId = null)
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
{
if (shopEntity == null)
return;
@@ -356,7 +356,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="page"></param>
/// <returns></returns>
private string GetShopStockList(DouShopLoginInfo shop, int page = 1, string type = "待创建")
private string GetShopStockList(ShopLoginInfo shop, int page = 1, string type = "待创建")
{
page = Math.Max(page, 1);
string url = "https://seller.kuajingmaihuo.com/oms/bg/venom/api/supplier/purchase/manager/querySubOrderList";
@@ -377,7 +377,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subPurchaseOrderSn"></param>
/// <returns></returns>
private string CancelSubPurchaseOrder(DouShopLoginInfo shop, string subPurchaseOrderSn)
private string CancelSubPurchaseOrder(ShopLoginInfo shop, string subPurchaseOrderSn)
{
string url = "https://seller.kuajingmaihuo.com/oms/bg/venom/api/supplier/purchase/manager/batchCancelSubPurchaseOrder";
string body = "{\"subPurchaseOrderSnList\":[\"" + subPurchaseOrderSn + "\"]}";
@@ -386,7 +386,7 @@ namespace TemuKJD.KJDForms.ProductForms
return ProductResponse.GetPostResponse(shop, url, body, refere);
}
private string GetWarehouseList(DouShopLoginInfo shop, int page = 1)
private string GetWarehouseList(ShopLoginInfo shop, int page = 1)
{
page = Math.Max(page, 1);
string url = "https://seller.kuajingmaihuo.com/marvel-mms/cn/api/kiana/venom/sales/management/listWarehouse";
@@ -402,7 +402,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subOrderInfo"></param>
/// <returns></returns>
private string QueryStockBaseInfo(DouShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string QueryStockBaseInfo(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
{
string url = "https://seller.kuajingmaihuo.com/oms/bg/venom/api/supplier/sales/management/queryStockBaseInfo";
string body = "{\"productSkcId\":" + subOrderInfo.productSkcId
@@ -417,7 +417,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subOrderInfo"></param>
/// <returns></returns>
private string CreateStockOrder(DouShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string CreateStockOrder(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
{
string url = "https://seller.kuajingmaihuo.com/oms/bg/venom/api/supplier/sales/management/createStockOrder";
string body = "{\"productSkcId\":" + subOrderInfo.productSkcId + "," +
@@ -505,7 +505,6 @@ namespace TemuKJD.KJDForms.ProductForms
}
string searchText = txtStockid.Text.Trim();
btnCancelSubPurchaseOrder.Enabled = false;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
ucGroupBoxEx4.Enabled = false;
@@ -653,8 +652,6 @@ namespace TemuKJD.KJDForms.ProductForms
}
string searchText = txtStockid.Text.Trim();
btnListWarehouse.Enabled = false;
btnSearch.Enabled = false;
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
ucGroupBoxEx4.Enabled = false;