1优化cookie登录检测逻辑 2调整标题重组逻辑不再强制前缀 3库存上传、选品上传显示提交时间 4备货管理使用双接口处理
This commit is contained in:
1 parent
c203c161a2
commit
7ea35b6866
22 files changed
+479
-490
No files matched your search
+34
-12
@@ -33,6 +33,10 @@
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbFissionSetting = new System.Windows.Forms.PictureBox();
|
||||
@@ -80,6 +84,7 @@
|
||||
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSubSaNick = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -539,6 +544,7 @@
|
||||
this.colExtCode,
|
||||
this.colStatus,
|
||||
this.colDraftId,
|
||||
this.colAddTime,
|
||||
this.colMdyTime,
|
||||
this.colSubSa,
|
||||
this.colSubSaNick,
|
||||
@@ -604,21 +610,21 @@
|
||||
//
|
||||
// colImportCookies
|
||||
//
|
||||
this.colImportCookies.HeaderText = "导入Cookies";
|
||||
this.colImportCookies.HeaderText = "导入Cookie";
|
||||
this.colImportCookies.Name = "colImportCookies";
|
||||
this.colImportCookies.ReadOnly = true;
|
||||
this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colImportCookies.Width = 85;
|
||||
this.colImportCookies.Width = 80;
|
||||
//
|
||||
// colCopyCookies
|
||||
//
|
||||
this.colCopyCookies.HeaderText = "复制Cookies";
|
||||
this.colCopyCookies.HeaderText = "复制Cookie";
|
||||
this.colCopyCookies.Name = "colCopyCookies";
|
||||
this.colCopyCookies.ReadOnly = true;
|
||||
this.colCopyCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCopyCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colCopyCookies.Width = 85;
|
||||
this.colCopyCookies.Width = 80;
|
||||
//
|
||||
// colSpuId
|
||||
//
|
||||
@@ -661,14 +667,16 @@
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
this.colProductName.Width = 180;
|
||||
this.colProductName.Width = 160;
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.colProductCat.HeaderText = "商品类目";
|
||||
this.colProductCat.Name = "colProductCat";
|
||||
this.colProductCat.ReadOnly = true;
|
||||
this.colProductCat.Width = 90;
|
||||
this.colProductCat.Width = 72;
|
||||
//
|
||||
// colExtCode
|
||||
//
|
||||
@@ -693,12 +701,23 @@
|
||||
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colDraftId.Width = 88;
|
||||
//
|
||||
// colAddTime
|
||||
//
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.colAddTime.HeaderText = "添加时间";
|
||||
this.colAddTime.Name = "colAddTime";
|
||||
this.colAddTime.ReadOnly = true;
|
||||
this.colAddTime.Width = 65;
|
||||
//
|
||||
// colMdyTime
|
||||
//
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMdyTime.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.colMdyTime.HeaderText = "上传时间";
|
||||
this.colMdyTime.Name = "colMdyTime";
|
||||
this.colMdyTime.ReadOnly = true;
|
||||
this.colMdyTime.Width = 95;
|
||||
this.colMdyTime.Width = 65;
|
||||
//
|
||||
// colSubSa
|
||||
//
|
||||
@@ -709,15 +728,17 @@
|
||||
//
|
||||
// colSubSaNick
|
||||
//
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSubSaNick.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.colSubSaNick.HeaderText = "二级超管";
|
||||
this.colSubSaNick.Name = "colSubSaNick";
|
||||
this.colSubSaNick.ReadOnly = true;
|
||||
this.colSubSaNick.Width = 80;
|
||||
this.colSubSaNick.Width = 65;
|
||||
//
|
||||
// colNotes
|
||||
//
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colNotes.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colNotes.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
this.colNotes.HeaderText = "备注";
|
||||
this.colNotes.Name = "colNotes";
|
||||
this.colNotes.ReadOnly = true;
|
||||
@@ -831,6 +852,8 @@
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtProdName;
|
||||
private UserComponent.UcCheckBox chkNoSubSa;
|
||||
private UserControls.ButtonEx btnReFission;
|
||||
private System.Windows.Forms.PictureBox pbFissionSetting;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
|
||||
@@ -848,6 +871,7 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaNick;
|
||||
@@ -855,7 +879,5 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEditNotes;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
|
||||
private UserControls.ButtonEx btnReFission;
|
||||
private System.Windows.Forms.PictureBox pbFissionSetting;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
this.ucSplitPage1.TotalPage = pageCount;
|
||||
|
||||
var shopIdLst = list.Select(p => p.shop_id).Distinct().ToList();
|
||||
shopLst = AdminGetServerShopLst(shopIdLst);
|
||||
shopLst = AdminShopListForm.AdminGetServerShopLstByIds(shopIdLst);
|
||||
|
||||
if (defaultBitmap == null)
|
||||
defaultBitmap = new Bitmap(80, 80);
|
||||
@@ -132,8 +132,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
prodSelect.shop_account,
|
||||
"进店",
|
||||
shopLst.FirstOrDefault(s => s.ShopId == prodSelect.shop_id)?.LoginStatus2 == "国际版在线" ? "在线" : "登录",
|
||||
"导入Cookies",
|
||||
"复制Cookies",
|
||||
"导入Cookie",
|
||||
"复制Cookie",
|
||||
prodSelect.spu_id,
|
||||
prodSelect.skc_id,
|
||||
prodSelect.main_img.Replace("https:", "http:"),
|
||||
@@ -143,7 +143,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
prodSelect.ext_code,
|
||||
prodSelect.status,
|
||||
prodSelect.draft_id,
|
||||
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd HH:mm"),
|
||||
prodSelect.add_time.ToString("yy/MM/dd\r\n HH:mm"),
|
||||
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yy/MM/dd\r\n HH:mm"),
|
||||
string.IsNullOrEmpty(prodSelect.operate_sub_sa_name) ? "-" : prodSelect.operate_sub_sa_name,
|
||||
string.IsNullOrEmpty(prodSelect.operate_sub_sa_nick) ? "-" : prodSelect.operate_sub_sa_nick,
|
||||
prodSelect.notes,
|
||||
@@ -346,15 +347,15 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
}
|
||||
break;
|
||||
|
||||
case "导入Cookies":
|
||||
case "导入Cookie":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
ShopUpdateCookieForm updateCookieForm = new ShopUpdateCookieForm(shop, SetCookieFromEnum.sa, "国际版");
|
||||
ShopUpdateCookieForm updateCookieForm = new ShopUpdateCookieForm(shop, SetCookieFromEnum.sa, "国内版");
|
||||
updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete;
|
||||
updateCookieForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case "复制Cookies":
|
||||
case "复制Cookie":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
string cookJs = "";
|
||||
@@ -440,7 +441,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
var shop = shopLst.FirstOrDefault(s => s.ShopId == shopId);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = AdminGetServerShop(shopId);
|
||||
shop = GetServerShopById(shopId);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = new ShopLoginInfo() { ShopId = shopId };
|
||||
@@ -526,7 +527,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
var shop = shopLst.FirstOrDefault(s => s.ShopId == prod.shop_id);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = AdminGetServerShop(prod.shop_id);
|
||||
shop = GetServerShopById(prod.shop_id);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = new ShopLoginInfo() { ShopId = prod.shop_id };
|
||||
@@ -667,64 +668,12 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
}));
|
||||
}
|
||||
|
||||
public ShopLoginInfo AdminGetServerShop(string shop_id)
|
||||
public ShopLoginInfo GetServerShopById(string shop_id)
|
||||
{
|
||||
List<ShopLoginInfo> list = AdminGetServerShopLst(new string[] { shop_id }.ToList());
|
||||
List<ShopLoginInfo> list = AdminShopListForm.AdminGetServerShopLstByIds(new string[] { shop_id }.ToList());
|
||||
return list.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<ShopLoginInfo> AdminGetServerShopLst(List<string> shop_ids)
|
||||
{
|
||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||
|
||||
var url = BaseClass.BuildObjString("shop/admin_get_shop_list");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&shop_ids='" + string.Join("','", shop_ids) + "'";
|
||||
data += "&page_size=200";
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html)
|
||||
|| !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass"))
|
||||
{
|
||||
return new List<ShopLoginInfo>();
|
||||
}
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return new List<ShopLoginInfo>();
|
||||
|
||||
foreach (JObject jObj in jArr)
|
||||
{
|
||||
string shopStr = jObj.ToString();
|
||||
ShopLoginInfo shop = new ShopLoginInfo();
|
||||
shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id");
|
||||
if (shop.DbId == null)
|
||||
continue;
|
||||
shop.LoginName = BaseRegex.GetStringJson(ref shopStr, "login_name");
|
||||
shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass");
|
||||
shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
|
||||
shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account");
|
||||
shop.UserName = BaseRegex.GetStringJson(ref shopStr, "user_name");
|
||||
shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name");
|
||||
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group");
|
||||
shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie");
|
||||
shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+");
|
||||
shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2");
|
||||
shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+");
|
||||
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
|
||||
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
|
||||
shop.LoginStatus = BaseRegex.GetStringJson(ref shopStr, "login_status");
|
||||
shop.LoginStatus2 = BaseRegex.GetStringJson(ref shopStr, "login_status2");
|
||||
shop.OperateSubSaName = BaseRegex.GetStringJson(ref shopStr, "operate_sub_sa_name");
|
||||
|
||||
list.Add(shop);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public TemuDBProduct GetProductDetail(string prodDbId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prodDbId))
|
||||
@@ -1354,16 +1303,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
if (numbers.Count > 0 && numbers[0] > 0)
|
||||
{
|
||||
minNum = numbers[0];
|
||||
if (numbers.Count > 1 && numbers[1] > 0)
|
||||
{
|
||||
maxNum = numbers[1];
|
||||
}
|
||||
if (maxNum < minNum)
|
||||
{
|
||||
maxNum = minNum;
|
||||
}
|
||||
headWords += Randomx.GetId(minNum, maxNum + 1) + "个";
|
||||
}
|
||||
if (numbers.Count > 1 && numbers[1] > 0)
|
||||
{
|
||||
maxNum = numbers[1];
|
||||
}
|
||||
if (maxNum < minNum)
|
||||
{
|
||||
maxNum = minNum;
|
||||
}
|
||||
headWords += Randomx.GetId(minNum, maxNum + 1) + "个";
|
||||
}
|
||||
|
||||
string endWords = string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.EndWords) ? "" : GlobalConfig.ProductWords.EndWords;
|
||||
|
||||
@@ -165,6 +165,9 @@
|
||||
<metadata name="colDraftId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colAddTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colMdyTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
Reference in new issue
Block a user