尺码表信息传递到草稿箱 选品相关功能优化

This commit is contained in:
wule committed 2025-07-18 18:18:08 +08:00
1 parent 40bf0623ca
commit 39cfc15188
34 files changed
+5562 -1581

No files matched your search

+4 -2
View File
@@ -26,7 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>..\bin\AllBase.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
@@ -76,11 +76,12 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
@@ -189,6 +190,7 @@
<Compile Include="Model\Param\DyProductManage\ViolateRuleParam.cs" />
<Compile Include="Model\Param\SalesManage\PromotionAddParam.cs" />
<Compile Include="Model\Param\ShopManage\DouShopSettingParam.cs" />
<Compile Include="Model\Param\TemuProductManage\TemuSizeSpecParam.cs" />
<Compile Include="Model\Result\TemuDBProductSelect.cs" />
<Compile Include="Model\Result\TemuPriceAdjustInfo.cs" />
<Compile Include="Model\Result\TemuProductInfo.cs" />
+2 -2
View File
@@ -27,8 +27,8 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 361;
//public static int VersionCount = 361;
public static int VersionCount = 363;
//public static int VersionCount = 363;
/// <summary>
/// 版本号
@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Param.TemuProductManage
{
/// <summary>
/// 尺码表
/// </summary>
public class TemuSizeSpecParam
{
public ContentItem content { get; set; } //
public long? catId { get; set; }
public long? classId { get; set; }
/// <summary>
/// 尺码表名称
/// </summary>
public string name { get; set; }
public bool? reusable { get; set; }
public ExtItem ext { get; set; }
public object productCreateTime { get; set; }
}
public class ContentItem
{
public MetaItem meta { get; set; }
public List<RecordsItem> records { get; set; }
public int? localSizeSource { get; set; }
public int? generalSizeType { get; set; }
}
public class MetaItem
{
public List<ElementsItem> elements { get; set; }
public List<GroupsItem> groups { get; set; }
}
public class ElementsItem
{
public long? id { get; set; }
public string name { get; set; }
}
public class GroupsItem
{
public long? id { get; set; }
public string name { get; set; }
}
public class RecordsItem
{
public Dictionary<string, string> values { get; set; }
}
public class ExtItem
{
public List<object> manualGroupIdList { get; set; }
public bool? isDoubleSize { get; set; }
public List<long> unEnbleAutoSelectedList { get; set; }
}
}
@@ -20,6 +20,7 @@ namespace AllBase.Model.Result
public string notes { get; set; }
public string status { get; set; }
public string draft_id { get; set; }
public int add_times { get; set; }
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
+53 -10
View File
@@ -21,7 +21,7 @@ namespace KJD_Web.BLL
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id");
@@ -30,8 +30,8 @@ namespace KJD_Web.BLL
string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"))?.Replace("'", "\\'");
string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'");
string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name"))?.Replace("'", "\\'");
string product_json = RegexUtils.GetStringQuery(ref inputData, "product_json");
string size_json = RegexUtils.GetStringQuery(ref inputData, "size_json");
string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'");
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'");
string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
@@ -70,7 +70,7 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
@@ -190,7 +190,7 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
@@ -219,7 +219,7 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
@@ -260,7 +260,7 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var out_product_Id = RegexUtils.GetStringQuery(ref inputData, "out_product_id");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id");
@@ -308,11 +308,12 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id");
var status = RegexUtils.GetStringQuery(ref inputData, "status");
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -321,6 +322,8 @@ namespace KJD_Web.BLL
sql += " draft_id='" + draft_id + "',";
if (status != null)
sql += " status='" + status + "',";
if (status == "已上传")
sql += " add_times=add_times+1,";
sql += " mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + ";";
@@ -345,9 +348,14 @@ namespace KJD_Web.BLL
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", "\\'");
var search_shop_id = RegexUtils.GetStringQuery(ref inputData, "search_shop_id")?.Replace("'", "\\'");
var search_shop_account = RegexUtils.GetStringQuery(ref inputData, "search_shop_account")?.Replace("'", "\\'");
@@ -405,7 +413,7 @@ namespace KJD_Web.BLL
//sql = "select * from kjd.product_select where 1=1";
//else
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_time,s.mdy_time," +
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img " +
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id where 1=1";
if (!isAdmin)
@@ -463,6 +471,7 @@ namespace KJD_Web.BLL
mdy_time = Convert.ToDateTime(row["mdy_time"]),
notes = row["notes"].ParseToString(),
draft_id = row["draft_id"].ParseToString(),
add_times = row["add_times"].ParseToInt(),
skc_id = row["skc_id"].ToString(),
spu_id = row["spu_id"].ToString(),
//product_json = row["product_json"].ToString(),
@@ -485,5 +494,39 @@ namespace KJD_Web.BLL
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string DelSelectProd(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
var id = RegexUtils.GetStringQuery(ref inputData, "db_id");
if (string.IsNullOrEmpty(user_name))
{
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "delete from kjd.product_select where id='"
+ id + "'";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (rst)
{
return "{\"code\":200,\"msg\":\"success\"}";
}
else
return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}
@@ -19,7 +19,7 @@ namespace KJD_Web.BLL
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":20000,\"msg\":\"校验失败\"}";
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var version = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "version"), out version);
@@ -20,6 +20,7 @@ namespace KJD_Web.Model
public string notes { get; set; }
public string status { get; set; }
public string draft_id { get; set; }
public int add_times { get; set; }
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
@@ -169,5 +169,17 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void del_select_product()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new ProductManage().DelSelectProd(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
}
}
+6 -6
View File
@@ -25,8 +25,8 @@ Global
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Debug|x64.Build.0 = Debug|Any CPU
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Debug|x86.ActiveCfg = Debug|x86
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Debug|x86.Build.0 = Debug|x86
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|Any CPU.ActiveCfg = Release|x86
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|Any CPU.Build.0 = Release|x86
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|Any CPU.Build.0 = Release|Any CPU
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|x64.ActiveCfg = Release|x64
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|x64.Build.0 = Release|x64
{7A28B19F-BD0C-45DF-AC1A-78064631745A}.Release|x86.ActiveCfg = Release|x86
@@ -37,8 +37,8 @@ Global
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x64.Build.0 = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.ActiveCfg = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Debug|x86.Build.0 = Debug|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.ActiveCfg = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.Build.0 = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|Any CPU.Build.0 = Release|Any CPU
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x64.ActiveCfg = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x86.ActiveCfg = Release|x86
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}.Release|x86.Build.0 = Release|x86
@@ -48,8 +48,8 @@ Global
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Debug|x64.Build.0 = Debug|Any CPU
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Debug|x86.ActiveCfg = Debug|x86
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Debug|x86.Build.0 = Debug|x86
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|Any CPU.ActiveCfg = Release|x86
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|Any CPU.Build.0 = Release|x86
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|Any CPU.Build.0 = Release|Any CPU
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|x64.ActiveCfg = Release|Any CPU
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|x64.Build.0 = Release|Any CPU
{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}.Release|x86.ActiveCfg = Release|x86
+2 -2
View File
@@ -89,10 +89,10 @@
//
// InitForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(236, 185);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "InitForm";
this.ShowIcon = false;
+1 -1
View File
@@ -50,7 +50,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
+20 -8
View File
@@ -76,6 +76,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colMultiLogin = new System.Windows.Forms.DataGridViewLinkColumn();
this.colApiAuth = new System.Windows.Forms.DataGridViewLinkColumn();
this.colBuyApiAuth = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImportCookie = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colUpload = new System.Windows.Forms.DataGridViewLinkColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
@@ -400,6 +401,7 @@ namespace TemuKJD.KJDForms.AdminForms
this.colMultiLogin,
this.colApiAuth,
this.colBuyApiAuth,
this.colImportCookie,
this.colCopyCookies,
this.colUpload,
this.colEdit,
@@ -461,14 +463,14 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colLoginName
//
this.colLoginName.FillWeight = 69.426F;
this.colLoginName.FillWeight = 69.42599F;
this.colLoginName.HeaderText = "店铺登录号码";
this.colLoginName.Name = "colLoginName";
this.colLoginName.ReadOnly = true;
//
// colShopId
//
this.colShopId.FillWeight = 69.426F;
this.colShopId.FillWeight = 69.42599F;
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
@@ -508,7 +510,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colGroupName
//
this.colGroupName.FillWeight = 69.426F;
this.colGroupName.FillWeight = 69.42599F;
this.colGroupName.HeaderText = "店铺分组";
this.colGroupName.Name = "colGroupName";
this.colGroupName.ReadOnly = true;
@@ -516,7 +518,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colUploadAccount
//
this.colUploadAccount.FillWeight = 69.426F;
this.colUploadAccount.FillWeight = 69.42599F;
this.colUploadAccount.HeaderText = "上货账户";
this.colUploadAccount.Name = "colUploadAccount";
this.colUploadAccount.ReadOnly = true;
@@ -524,7 +526,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colBuyAccount
//
this.colBuyAccount.FillWeight = 69.426F;
this.colBuyAccount.FillWeight = 69.42599F;
this.colBuyAccount.HeaderText = "采购账户";
this.colBuyAccount.Name = "colBuyAccount";
this.colBuyAccount.ReadOnly = true;
@@ -532,7 +534,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colChatAccount
//
this.colChatAccount.FillWeight = 69.426F;
this.colChatAccount.FillWeight = 69.42599F;
this.colChatAccount.HeaderText = "客服账户";
this.colChatAccount.Name = "colChatAccount";
this.colChatAccount.ReadOnly = true;
@@ -585,7 +587,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colApiAuth
//
this.colApiAuth.FillWeight = 69.426F;
this.colApiAuth.FillWeight = 69.42599F;
this.colApiAuth.HeaderText = "上货授权";
this.colApiAuth.Name = "colApiAuth";
this.colApiAuth.ReadOnly = true;
@@ -595,7 +597,7 @@ namespace TemuKJD.KJDForms.AdminForms
//
// colBuyApiAuth
//
this.colBuyApiAuth.FillWeight = 69.426F;
this.colBuyApiAuth.FillWeight = 69.42599F;
this.colBuyApiAuth.HeaderText = "拍单授权";
this.colBuyApiAuth.Name = "colBuyApiAuth";
this.colBuyApiAuth.ReadOnly = true;
@@ -603,6 +605,15 @@ namespace TemuKJD.KJDForms.AdminForms
this.colBuyApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colBuyApiAuth.Visible = false;
//
// colImportCookie
//
this.colImportCookie.FillWeight = 70F;
this.colImportCookie.HeaderText = "导入Cookie";
this.colImportCookie.Name = "colImportCookie";
this.colImportCookie.ReadOnly = true;
this.colImportCookie.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImportCookie.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colCopyCookies
//
this.colCopyCookies.FillWeight = 70F;
@@ -715,6 +726,7 @@ namespace TemuKJD.KJDForms.AdminForms
private System.Windows.Forms.DataGridViewLinkColumn colMultiLogin;
private System.Windows.Forms.DataGridViewLinkColumn colApiAuth;
private System.Windows.Forms.DataGridViewLinkColumn colBuyApiAuth;
private System.Windows.Forms.DataGridViewLinkColumn colImportCookie;
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colUpload;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
+17 -2
View File
@@ -99,6 +99,7 @@ namespace TemuKJD.KJDForms.AdminForms
"多重登录",
shop.ApiAuthStatus,
shop.BuyApiAuth.ApiAuthStatus,
"导入Cookies",
"复制Cookies",
"上传",
"编辑",
@@ -206,6 +207,11 @@ namespace TemuKJD.KJDForms.AdminForms
Clipboard.SetDataObject(cookJs);
BaseMsgForm.ShowInfo("复制成功");
break;
case "导入Cookie":
ShopUpdateCookieForm updateCookieForm = new ShopUpdateCookieForm(shop);
updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete;
updateCookieForm.ShowDialog();
break;
case "删除":
if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
return;
@@ -239,6 +245,16 @@ namespace TemuKJD.KJDForms.AdminForms
}
}
private void UpdateCookieForm_SaveComplete(object obj)
{
Task.Run(() =>
{
//CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName });
//RefreshDataGridView(false);
SearchShop(this.ucSplitPage1.CurrentPage);
});
}
private void EditForm_SaveCompleteWithDescribe(object obj, object isAdd)
{
var shopInfo = obj as ShopLoginInfo;
@@ -437,9 +453,8 @@ namespace TemuKJD.KJDForms.AdminForms
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在检测...";
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Maximum = shopNames.Length;
this.statusBar.pgbTaskProgress.Text = "0" + "/" + shopNames.Length;
this.statusBar.UpdateProgressBar(0);
}));
}
@@ -174,6 +174,9 @@
<metadata name="colBuyApiAuth.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImportCookie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCopyCookies.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -34,6 +34,7 @@ namespace TemuKJD.KJDForms.AdminForms
public EnumOpenType openType = EnumOpenType.manage;
public bool isMultiLogin = false;
public string MultiLoginCookieName = "";
public string InitUrl = "";
private string shopCookieHead = "kuajingmaihuo.com";
private string shopLoginUrl = "http://seller.kuajingmaihuo.com/login";
private string shopMainUrl = "https://seller.kuajingmaihuo.com";
@@ -251,7 +252,10 @@ namespace TemuKJD.KJDForms.AdminForms
if (cefWebBrowser == null)
{
//cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false);
if (!string.IsNullOrEmpty(InitUrl))
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
else
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false);
CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
@@ -103,7 +103,9 @@ namespace TemuKJD.KJDForms.AdminForms
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
OnInfoReceived("选品商品保存失败!请检查网络连接");
string msg = "选品商品保存失败!请检查网络连接:" +
BaseRegex.GetStringJson(ref html, "msg").Replace("'", "\\'").Replace("\"","\\\"");
OnInfoReceived(msg);
}
else
{
@@ -202,9 +202,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstShopIdTemp.Count;
this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
@@ -442,9 +441,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在创建备货单...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstPriceAdjust.Count;
this.statusBar.pgbTaskProgress.Maximum = lstPriceAdjust.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
+4 -4
View File
@@ -171,10 +171,10 @@ namespace TemuKJD.KJDForms.ProductForms
List<string> hideName = new List<string>() { "佣金设置", "商品发布",
"净化数据","产品数据库","商品上下架","清理无流量","库存管理","特殊延迟发货","云违规排查","上传错误列表","跳转上家" };
if (AllBase.BaseClass.UserName != "15266666666" && AllBase.BaseClass.UserName != "15266666660")
{
hideName.Add("商品认领");
}
//if (AllBase.BaseClass.UserName != "15266666666" && AllBase.BaseClass.UserName != "15266666660")
//{
// hideName.Add("商品认领");
//}
foreach (var item in hideName)
{
@@ -190,9 +190,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstShopIdTemp.Count;
this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
@@ -518,9 +517,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在取消待创建...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstStock.Count;
this.statusBar.pgbTaskProgress.Maximum = lstStock.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
@@ -668,9 +666,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstShopIdTemp.Count;
this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
@@ -889,9 +886,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在创建备货单...";
this.statusBar.pgbTaskProgress.Value = (i + 1);
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstStockUp.Count;
this.statusBar.pgbTaskProgress.Maximum = lstStockUp.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
@@ -42,17 +42,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
this.dgvDbProduct.Columns["col_delete"].Visible = true;
this.dgvDbProduct.Columns["col_edit"].Visible = true;
this.dgvDbProduct.Columns["col_notes"].Visible = true;
this.lblNotes.Visible = true;
this.txtNotes.Visible = true;
//this.dgvDbProduct.Columns["col_notes"].Visible = true;
//this.lblNotes.Visible = true;
//this.txtNotes.Visible = true;
}
else
{
this.dgvDbProduct.Columns["col_delete"].Visible = false;
this.dgvDbProduct.Columns["col_edit"].Visible = false;
this.dgvDbProduct.Columns["col_notes"].Visible = false;
this.lblNotes.Visible = false;
this.txtNotes.Visible = false;
//this.dgvDbProduct.Columns["col_notes"].Visible = false;
//this.lblNotes.Visible = false;
//this.txtNotes.Visible = false;
}
btnSelect.Visible = false;
@@ -262,9 +262,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在认领...";
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Maximum = prods.Length;
this.statusBar.pgbTaskProgress.Text = "0" + "/" + prods.Length;
this.statusBar.UpdateProgressBar(0);
}));
string errorMsg = "";
@@ -273,7 +272,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value++;
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
}));
if (prod == null)
@@ -291,7 +290,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
"&shop_account=" + shop.ShopAccount +
"&main_user_name=" + shop.UserName +
"&sub_user_name=" + shop.SubUserName +
"&status=待审核";
"&status=待上传";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -324,7 +323,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
this.pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "认领完成";
this.statusBar.pgbTaskProgress.Value = prods.Length;
this.statusBar.UpdateProgressBar(prods.Length);
}));
}
@@ -33,6 +33,8 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.cmbStatus = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.txtShopName = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtShopId = new System.Windows.Forms.TextBox();
@@ -53,22 +55,25 @@
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colInShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDraftId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -86,12 +91,14 @@
this.splitContainer1.BackColor = System.Drawing.Color.White;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(1, 33);
this.splitContainer1.Location = new System.Drawing.Point(1, 41);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.cmbStatus);
this.splitContainer1.Panel1.Controls.Add(this.label8);
this.splitContainer1.Panel1.Controls.Add(this.txtShopName);
this.splitContainer1.Panel1.Controls.Add(this.label7);
this.splitContainer1.Panel1.Controls.Add(this.txtShopId);
@@ -113,23 +120,45 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1278, 686);
this.splitContainer1.Size = new System.Drawing.Size(1278, 678);
this.splitContainer1.SplitterDistance = 53;
this.splitContainer1.TabIndex = 2;
//
// cmbStatus
//
this.cmbStatus.FormattingEnabled = true;
this.cmbStatus.Items.AddRange(new object[] {
"待上传",
"已上传",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(946, 15);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(85, 28);
this.cmbStatus.TabIndex = 459;
this.cmbStatus.Text = "待上传";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(889, 19);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(84, 20);
this.label8.TabIndex = 458;
this.label8.Text = "认领状态:";
//
// txtShopName
//
this.txtShopName.Location = new System.Drawing.Point(197, 16);
this.txtShopName.Location = new System.Drawing.Point(192, 16);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(90, 23);
this.txtShopName.Size = new System.Drawing.Size(85, 27);
this.txtShopName.TabIndex = 451;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(140, 19);
this.label7.Location = new System.Drawing.Point(135, 19);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(68, 17);
this.label7.Size = new System.Drawing.Size(84, 20);
this.label7.TabIndex = 452;
this.label7.Text = "店铺名称:";
//
@@ -137,7 +166,7 @@
//
this.txtShopId.Location = new System.Drawing.Point(46, 16);
this.txtShopId.Name = "txtShopId";
this.txtShopId.Size = new System.Drawing.Size(90, 23);
this.txtShopId.Size = new System.Drawing.Size(85, 27);
this.txtShopId.TabIndex = 448;
//
// label6
@@ -145,11 +174,11 @@
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(1, 19);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.Size = new System.Drawing.Size(68, 20);
this.label6.TabIndex = 449;
this.label6.Text = "店铺Id:";
//
// btnSelect
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -159,7 +188,7 @@
this.btnAdd.ForeColor = System.Drawing.Color.White;
this.btnAdd.Location = new System.Drawing.Point(1181, 14);
this.btnAdd.Margin = new System.Windows.Forms.Padding(2);
this.btnAdd.Name = "btnSelect";
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(91, 26);
this.btnAdd.TabIndex = 444;
this.btnAdd.Text = "一键上传草稿";
@@ -168,33 +197,33 @@
//
// txtSPU
//
this.txtSPU.Location = new System.Drawing.Point(324, 16);
this.txtSPU.Location = new System.Drawing.Point(313, 16);
this.txtSPU.Name = "txtSPU";
this.txtSPU.Size = new System.Drawing.Size(90, 23);
this.txtSPU.Size = new System.Drawing.Size(85, 27);
this.txtSPU.TabIndex = 434;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(291, 19);
this.label5.Location = new System.Drawing.Point(281, 19);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(43, 17);
this.label5.Size = new System.Drawing.Size(53, 20);
this.label5.TabIndex = 435;
this.label5.Text = "SPU:";
//
// txtSKC
//
this.txtSKC.Location = new System.Drawing.Point(451, 16);
this.txtSKC.Location = new System.Drawing.Point(434, 16);
this.txtSKC.Name = "txtSKC";
this.txtSKC.Size = new System.Drawing.Size(90, 23);
this.txtSKC.Size = new System.Drawing.Size(85, 27);
this.txtSKC.TabIndex = 432;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(418, 19);
this.label1.Location = new System.Drawing.Point(402, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.Size = new System.Drawing.Size(53, 20);
this.label1.TabIndex = 433;
this.label1.Text = "SKC:";
//
@@ -203,7 +232,7 @@
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlEmpty.Location = new System.Drawing.Point(996, 14);
this.pnlEmpty.Location = new System.Drawing.Point(1100, 14);
this.pnlEmpty.Name = "pnlEmpty";
this.pnlEmpty.Size = new System.Drawing.Size(56, 26);
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -229,7 +258,7 @@
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.Location = new System.Drawing.Point(935, 14);
this.btnSearch.Location = new System.Drawing.Point(1039, 14);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 26);
@@ -240,49 +269,49 @@
//
// txtExtCode
//
this.txtExtCode.Location = new System.Drawing.Point(835, 16);
this.txtExtCode.Location = new System.Drawing.Point(800, 16);
this.txtExtCode.Name = "txtExtCode";
this.txtExtCode.Size = new System.Drawing.Size(90, 23);
this.txtExtCode.Size = new System.Drawing.Size(85, 27);
this.txtExtCode.TabIndex = 429;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(801, 19);
this.label4.Location = new System.Drawing.Point(767, 19);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.Size = new System.Drawing.Size(54, 20);
this.label4.TabIndex = 430;
this.label4.Text = "货号:";
//
// txtProdName
//
this.txtProdName.Location = new System.Drawing.Point(707, 16);
this.txtProdName.Location = new System.Drawing.Point(678, 16);
this.txtProdName.Name = "txtProdName";
this.txtProdName.Size = new System.Drawing.Size(90, 23);
this.txtProdName.Size = new System.Drawing.Size(85, 27);
this.txtProdName.TabIndex = 427;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(673, 19);
this.label3.Location = new System.Drawing.Point(645, 19);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.Size = new System.Drawing.Size(54, 20);
this.label3.TabIndex = 428;
this.label3.Text = "标题:";
//
// txtCat
//
this.txtCat.Location = new System.Drawing.Point(579, 16);
this.txtCat.Location = new System.Drawing.Point(556, 16);
this.txtCat.Name = "txtCat";
this.txtCat.Size = new System.Drawing.Size(90, 23);
this.txtCat.Size = new System.Drawing.Size(85, 27);
this.txtCat.TabIndex = 425;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(545, 19);
this.label2.Location = new System.Drawing.Point(523, 19);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.Size = new System.Drawing.Size(54, 20);
this.label2.TabIndex = 426;
this.label2.Text = "类目:";
//
@@ -304,15 +333,15 @@
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1278, 629);
this.splitContainer2.SplitterDistance = 600;
this.splitContainer2.Size = new System.Drawing.Size(1278, 621);
this.splitContainer2.SplitterDistance = 592;
this.splitContainer2.TabIndex = 0;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(614, 259);
this.pbLoading.Location = new System.Drawing.Point(614, 255);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -341,27 +370,179 @@
this.colSelectId,
this.colSupplierId,
this.colSupplierName,
this.colInShop,
this.colLogin,
this.colSpuId,
this.colSkcId,
this.colProductSkcPic,
this.colProductName,
this.colProductCat,
this.colExtCode,
this.colMsg,
this.colStatus,
this.colDraftId,
this.colMdyTime,
this.ColDelete,
this.colOpResult});
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvSelectProduct.Location = new System.Drawing.Point(4, 0);
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowHeadersWidth = 51;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1270, 600);
this.dgvSelectProduct.Size = new System.Drawing.Size(1270, 592);
this.dgvSelectProduct.TabIndex = 188;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "选择";
this.colSelect.MinimumWidth = 6;
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.MinimumWidth = 6;
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
this.colSelectId.Width = 125;
//
// colSupplierId
//
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.MinimumWidth = 6;
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
this.colSupplierId.Width = 125;
//
// colSupplierName
//
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.MinimumWidth = 6;
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
this.colSupplierName.Width = 110;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.MinimumWidth = 6;
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Width = 45;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.MinimumWidth = 6;
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Width = 45;
//
// colSpuId
//
this.colSpuId.HeaderText = "商品SPU";
this.colSpuId.MinimumWidth = 6;
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSpuId.Width = 125;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.MinimumWidth = 6;
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Width = 80;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "Skc图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.MinimumWidth = 6;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colProductName
//
this.colProductName.HeaderText = "商品标题";
this.colProductName.MinimumWidth = 6;
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 260;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.MinimumWidth = 6;
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.MinimumWidth = 6;
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
this.colExtCode.Width = 125;
//
// colStatus
//
this.colStatus.HeaderText = "状态";
this.colStatus.MinimumWidth = 6;
this.colStatus.Name = "colStatus";
this.colStatus.ReadOnly = true;
this.colStatus.Width = 125;
//
// colDraftId
//
this.colDraftId.HeaderText = "草稿箱Id";
this.colDraftId.MinimumWidth = 6;
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 125;
//
// colMdyTime
//
this.colMdyTime.HeaderText = "上传时间";
this.colMdyTime.MinimumWidth = 6;
this.colMdyTime.Name = "colMdyTime";
this.colMdyTime.ReadOnly = true;
this.colMdyTime.Width = 120;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.MinimumWidth = 6;
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
this.ColDelete.Width = 125;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.MinimumWidth = 6;
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 150;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
@@ -385,107 +566,6 @@
this.statusBar.Size = new System.Drawing.Size(1278, 25);
this.statusBar.TabIndex = 5;
//
// colSelect
//
this.colSelect.HeaderText = "选择";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
//
// colSupplierName
//
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
this.colSupplierName.Width = 110;
//
// colSpuId
//
this.colSpuId.HeaderText = "商品SPU";
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Width = 80;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "Skc图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colProductName
//
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 260;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// colDraftId
//
this.colDraftId.HeaderText = "草稿箱Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 150;
//
// DbProductSelectListManageForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -494,8 +574,8 @@
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "DbProductSelectListManageForm";
this.Text = "用户选品列表";
this.TitleText = "用户选品列表";
this.Text = "商品待上传";
this.TitleText = "商品待上传";
this.Load += new System.EventHandler(this.DbProductSelectListForm_Load);
this.VisibleChanged += new System.EventHandler(this.DbProductSelectListManageForm_VisibleChanged);
this.Controls.SetChildIndex(this.splitContainer1, 0);
@@ -539,18 +619,23 @@
private System.Windows.Forms.TextBox txtShopId;
private System.Windows.Forms.Label label6;
private UserComponent.DataGridViewEx dgvSelectProduct;
private System.Windows.Forms.ComboBox cmbStatus;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
private System.Windows.Forms.DataGridViewLinkColumn colInShop;
private System.Windows.Forms.DataGridViewLinkColumn colLogin;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId;
private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime;
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
}
@@ -19,12 +19,15 @@ using Newtonsoft.Json.Linq;
using TemuKJD.Extension;
using AllBase.Model.Param.TemuProductManage;
using System.Threading;
using TemuKJD.KJDForms.AdminForms;
using TemuKJD.KJDForms.ShopForms;
namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class DbProductSelectListManageForm : LRBaseForm
{
List<TemuDBProductSelect> lstAdminTemuDBProductSelect = new List<TemuDBProductSelect>();
List<ShopLoginInfo> shopLst = new List<ShopLoginInfo>();
public DbProductSelectListManageForm()
{
@@ -89,9 +92,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Image image = null;
try
{
using (Stream stream = WebRequest.Create(prodSelect.main_img.Replace("https", "http")).GetResponse().GetResponseStream())
if (!string.IsNullOrEmpty(prodSelect?.main_img))
{
image = Image.FromStream(stream);
using (Stream stream = WebRequest.Create(prodSelect.main_img.Replace("https", "http")).GetResponse().GetResponseStream())
{
image = Image.FromStream(stream);
}
}
}
catch (Exception ex)
@@ -104,6 +110,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.id,
prodSelect.shop_id,
prodSelect.shop_account,
"进店",
"登录",
prodSelect.spu_id,
prodSelect.skc_id,
image,//prod.main_img,
@@ -112,7 +120,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.ext_code,
prodSelect.status,
prodSelect.draft_id,
"删除");
prodSelect.mdy_time.ToString("yyyy/MM/dd HH:mm:ss"),
"删除",
"");
dgvSelectProduct.Rows[rowIndex].Height = 60;
}));
@@ -132,18 +142,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms
pageCount = 1;
var url = BaseClass.BuildObjString("product/admin_get_user_select_product_list");
var data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
"&search_spu=" + txtSPU.Text +
"&search_skc=" + txtSKC.Text +
"&search_cat=" + txtCat.Text +
"&search_ext_code=" + txtExtCode.Text +
"&search_prod_name=" + txtProdName.Text +
"&search_shop_id=" + txtShopId.Text +
"&search_shop_account=" + txtShopName.Text +
//"&status=待审核";
"&status=";
var data = "";
Invoke(new Action(() =>
{
data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
"&search_spu=" + txtSPU.Text +
"&search_skc=" + txtSKC.Text +
"&search_cat=" + txtCat.Text +
"&search_ext_code=" + txtExtCode.Text +
"&search_prod_name=" + txtProdName.Text +
"&search_shop_id=" + txtShopId.Text +
"&search_shop_account=" + txtShopName.Text +
"&status=" + (cmbStatus.Text == "全部" ? "" : cmbStatus.Text);
}));
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -187,6 +200,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.txtShopName.Text = "";
this.txtSKC.Text = "";
this.txtSPU.Text = "";
this.cmbStatus.Text = "待上传";
}
private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -196,6 +210,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
string headerText = dgvSelectProduct.Columns[e.ColumnIndex].HeaderText;
var dbId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSelectId"].Value.ParseToString();
var dbProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == dbId);
var shopId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString();
var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString();
switch (headerText)
{
@@ -212,6 +228,38 @@ namespace TemuKJD.KJDForms.ProductSelectForms
case "认领":
//Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
break;
case "草稿箱Id":
if (!string.IsNullOrEmpty(draftId))
{
//var shop = GetShop(shopId);
//AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
//adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
// draftId + "&from=productDraftList";
//adminLoginForm.openType = EnumOpenType.manage;
//adminLoginForm.WindowState = FormWindowState.Maximized;
//adminLoginForm.ShowDialog();
}
break;
case "进店":
{
var shop = GetShop(shopId);
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.ShowDialog();
}
break;
case "登录":
{
var shop = GetShop(shopId);
// 登录店铺
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
}
break;
case "":
dgvSelectProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
break;
@@ -220,6 +268,27 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
}
ShopLoginInfo GetShop(string shopId)
{
var shop = shopLst.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
{
shop = AdminGetServerShop(shopId);
if (shop == null)
{
shop = new ShopLoginInfo() { ShopId = shopId };
shop.LoginStatus = "不存在";
}
shopLst.Add(shop);
}
return shop;
}
private void ShopLoginForm_SaveComplete(object obj)
{
//throw new NotImplementedException();
}
private void btnAdd_Click(object sender, EventArgs e)
{
var lstProdId = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row
@@ -246,8 +315,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
void AddProductDraft(TemuDBProductSelect[] prodSelect)
{
List<ShopLoginInfo> shopLst = new List<ShopLoginInfo>();
if (prodSelect == null || prodSelect.Count() == 0)
{
BaseMsgForm.ShowError("上传内容不能为空!");
@@ -258,18 +325,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在上传...";
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Maximum = prodSelect.Length;
this.statusBar.pgbTaskProgress.Text = "0" + "/" + prodSelect.Length;
this.statusBar.UpdateProgressBar(0);
}));
string errorMsg = "";
foreach (var prod in prodSelect)
{
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value++;
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
}));
if (prod == null)
@@ -281,7 +345,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
continue;
}
var row = dgvSelectProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r =>
var row = dgvSelectProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r =>
r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString());
if (row == null)
{
@@ -292,7 +356,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
continue;
}
var shop = shopLst.FirstOrDefault(s=>s.ShopId == prod.shop_id);
var shop = shopLst.FirstOrDefault(s => s.ShopId == prod.shop_id);
if (shop == null)
{
shop = AdminGetServerShop(prod.shop_id);
@@ -304,7 +368,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
shopLst.Add(shop);
}
if(shop.LoginStatus != "登录成功")
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
@@ -313,105 +377,107 @@ namespace TemuKJD.KJDForms.ProductSelectForms
continue;
}
//if (prod.status != "待上传")
//{
// Invoke(new Action(() =>
// {
// row.Cells["colOpResult"].Value = "选品商品" + prod.status;
// }));
// continue;
//}
var temuDBProd = GetProductDetail(prod.out_product_Id.ToString());
if (temuDBProd == null)
if (temuDBProd == null || temuDBProd.id == 0)
{
if (temuDBProd?.id == 0)
{
prod.status = "已清除";
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
}
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "选品数据库商品已被清除";
if (temuDBProd?.id == 0)
row.Cells["colStatus"].Value = "已清除";
}));
continue;
}
var prodDetailStr = GetHtml.UrlDecode(temuDBProd.product_json);
var productDetail = JsonHelper.DeserializeJsonToObject<TemuProductInfo>(prodDetailStr);
var result = UploadProduct(shop, productDetail);
Thread.Sleep(200);
if (result.StartsWith("上传草稿箱成功"))
var result = "";
try
{
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&draft_id=" + result.Replace("上传草稿箱成功", "") +
"&status=已上传";
var prodDetailStr = GetHtml.UrlDecode(temuDBProd.product_json);
var productDetail = JsonHelper.DeserializeJsonToObject<TemuProductInfo>(prodDetailStr);
result = UploadProduct(shop, productDetail, temuDBProd.size_json); //将商品上传至草稿箱
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("\"code\":200"))
{
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "已成功上传草稿箱但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; ";
}));
}
else
{
Invoke(new Action(() =>
{
row.Cells["colDraftId"].Value = result.Replace("上传草稿箱成功", ""); // 草稿箱id
row.Cells["colOpResult"].Value = "已成功上传草稿箱";
}));
if (result.Contains("登录过期"))
{
shop.LoginStatus = "未登录";
ShopForms.ShopListForm.UpdateServerShopCookies(shop, shop.Cookies); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
}
}
else
catch (Exception ex)
{
result = "上传草稿箱失败:" + ex.Message;
}
Thread.Sleep(200);
if (!result.Contains("上传草稿箱成功"))
{
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = result;
}));
continue;
}
//try
//{
// var url = BaseClass.BuildObjString("product/add_user_select_product");
// var data = UserLogin.GetSignaturex() +
// "&out_product_id=" + prod.id +
// "&shop_id=" + shop.ShopId +
// "&shop_account=" + shop.ShopAccount +
// "&main_user_name=" + shop.UserName +
// "&sub_user_name=" + shop.SubUserName +
// "&status=待审核";
// 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("\"code\":200"))
// {
// errorMsg += prod.spu_id + " " + BaseRegex.GetStringJson(ref html, "msg") + "; ";
// }
//}
//catch (Exception ex)
//{
// errorMsg += ex.Message + "; ";
//}
}
prod.status = "已上传";
var productDraftId = BaseRegex.GetStringJson(ref result, "productDraftId");
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&draft_id=" + productDraftId +
"&status=已上传";
if (!string.IsNullOrEmpty(errorMsg))
{
Invoke(new Action(() =>
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("\"code\":200"))
{
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg);
}));
}
else
{
Invoke(new Action(() =>
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "已成功上传草稿箱但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; ";
row.Cells["colStatus"].Value = "已上传";
}));
}
else
{
BaseMsgForm.ShowInfo("认领商品成功!");
}));
Invoke(new Action(() =>
{
row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id
row.Cells["colOpResult"].Value = "已成功上传草稿箱";
row.Cells["colStatus"].Value = "已上传";
}));
}
}
Invoke(new Action(() =>
{
BaseMsgForm.ShowInfo("上传草稿完成!");
}));
Invoke(new Action(() =>
{
this.pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "上传草稿完成";
this.statusBar.pgbTaskProgress.Value = prodSelect.Length;
this.statusBar.UpdateProgressBar(prodSelect.Length);
}));
}
@@ -465,7 +531,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
public TemuDBProduct GetProductDetail(string prodDbId)
{
if (string.IsNullOrEmpty(prodDbId))
return null;
return new TemuDBProduct();
List<TemuDBProduct> list = new List<TemuDBProduct>();
@@ -492,7 +558,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
try
{
list = JsonHelper.DeserializeJsonToList<TemuDBProduct>(sProd);
return list.FirstOrDefault();
var item = list.FirstOrDefault();
if (item == null)
item = new TemuDBProduct();
return item;
}
catch (Exception ex)
{
@@ -500,7 +569,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
}
string UploadProduct(ShopLoginInfo shop, TemuProductInfo prodInfo)
string UploadProduct(ShopLoginInfo shop, TemuProductInfo prodInfo, string sTemuSizeSpec = null)
{
if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功")
{
@@ -755,21 +824,56 @@ namespace TemuKJD.KJDForms.ProductSelectForms
else
{
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
return "上传失败" + error;
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref html, "error_msg");
return "上传失败 " + error;
}
if (prodParam.productDraftId <= 0)
{
return "上传失败" + html;
return "上传失败 " + html;
}
string sizeError = "";
//上传尺码表(如果有)
if (!string.IsNullOrEmpty(sTemuSizeSpec))
{
sTemuSizeSpec = GetHtml.UrlDecode(sTemuSizeSpec);
if (sTemuSizeSpec.Contains("sizeSpecDataVO"))
{
var jObj = JObject.Parse(sTemuSizeSpec)["sizeSpecDataVO"];
var sizeSpec = JsonHelper.SerializeObject(jObj);
sizeSpec = sizeSpec.Replace("\"contentVO\"", "\"content\"");
var sizeParam = JsonHelper.DeserializeJsonToObject<TemuSizeSpecParam>(sizeSpec);
html = CreateSizeSpec(shop, prodParam.productDraftId.ToString(), sizeParam);
if (html.Contains("{\"success\":true"))
{
var sizeSpecId = BaseRegex.GetLongJson(ref html, "businessId");
prodParam.sizeTemplateIds = new List<long?>();
prodParam.sizeTemplateIds.Add(sizeSpecId);
prodParam.showSizeTemplateIds = new List<long?>();
prodParam.showSizeTemplateIds.Add(sizeSpecId);
sizeError = "";
}
else
{
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref html, "error_msg");
sizeError += "尺码表保存失败 " + error;
}
}
}
html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam);
if (html.Contains("{\"success\":true"))
return "上传草稿箱成功" + prodParam.productDraftId.ToString();
return "上传草稿箱成功\"productDraftId\":\"" + prodParam.productDraftId.ToString() + "\" " + sizeError;
else
{
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
return "上传草稿箱失败" + error;
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref html, "error_msg");
return "上传草稿箱失败" + error + " " + sizeError;
}
#region 草稿箱后立即上传商品 暂时注释
@@ -796,6 +900,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private string CreateSizeSpec(ShopLoginInfo shop, string draftId, TemuSizeSpecParam sizeParam)
{
string url = "https://seller.kuajingmaihuo.com/bg-anniston-mms/sizespec/createSizeSpec";
string body = JsonHelper.SerializeObject(sizeParam);
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId="+
draftId + "&from=productDraftList";
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private string SaveDraft(ShopLoginInfo shop, string draftId, TemuProductParam prodParam)
{
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/draft/save";
@@ -129,6 +129,12 @@
<metadata name="colSupplierName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colInShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLogin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -144,12 +150,15 @@
<metadata name="colExtCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMsg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDraftId.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>
<metadata name="ColDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -38,6 +38,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
this.cmbStatus = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
@@ -54,10 +57,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colInShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
@@ -65,13 +75,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDraftId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -111,7 +116,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1152, 546);
this.splitContainer1.Size = new System.Drawing.Size(1291, 546);
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 11;
//
@@ -122,21 +127,71 @@ namespace TemuKJD.KJDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx4.Controls.Add(this.btnDelSelect);
this.ucGroupBoxEx4.Controls.Add(this.cmbStatus);
this.ucGroupBoxEx4.Controls.Add(this.label8);
this.ucGroupBoxEx4.Controls.Add(this.btnSearch);
this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
this.ucGroupBoxEx4.Size = new System.Drawing.Size(1003, 120);
this.ucGroupBoxEx4.Size = new System.Drawing.Size(1142, 120);
this.ucGroupBoxEx4.TabIndex = 666;
this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "认领商品查询";
//
// btnDelSelect
//
this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelSelect.Location = new System.Drawing.Point(989, 35);
this.btnDelSelect.Name = "btnDelSelect";
this.btnDelSelect.Size = new System.Drawing.Size(126, 23);
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnDelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnDelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnDelSelect.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnDelSelect.Style.GradientAngle = 90;
this.btnDelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelSelect.TabIndex = 468;
this.btnDelSelect.Text = "删除选中记录";
this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_Click);
//
// cmbStatus
//
this.cmbStatus.FormattingEnabled = true;
this.cmbStatus.Items.AddRange(new object[] {
"待上传",
"已上传",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(78, 31);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(85, 25);
this.cmbStatus.TabIndex = 461;
this.cmbStatus.Text = "待上传";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(21, 35);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(68, 17);
this.label8.TabIndex = 460;
this.label8.Text = "认领状态:";
//
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(18, 32);
this.btnSearch.Location = new System.Drawing.Point(179, 32);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(126, 23);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -208,7 +263,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1152, 422);
this.splitContainer3.Size = new System.Drawing.Size(1291, 422);
this.splitContainer3.SplitterDistance = 392;
this.splitContainer3.TabIndex = 1;
//
@@ -229,7 +284,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1152, 392);
this.splitContainer2.Size = new System.Drawing.Size(1291, 392);
this.splitContainer2.SplitterDistance = 270;
this.splitContainer2.TabIndex = 0;
//
@@ -340,7 +395,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(414, 171);
this.pbLoading.Location = new System.Drawing.Point(483, 171);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -370,6 +425,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colSelectId,
this.colSupplierId,
this.colSupplierName,
this.colInShop,
this.colLogin,
this.colSpuId,
this.colSkcId,
this.colProductSkcPic,
@@ -386,10 +443,103 @@ namespace TemuKJD.KJDForms.ProductSelectForms
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(874, 392);
this.dgvSelectProduct.Size = new System.Drawing.Size(1013, 392);
this.dgvSelectProduct.TabIndex = 187;
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer4.Size = new System.Drawing.Size(1291, 26);
this.splitContainer4.SplitterDistance = 600;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(600, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(4, 2);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(97, 2);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.Location = new System.Drawing.Point(114, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.Size = new System.Drawing.Size(573, 26);
this.ucSplitPage1.TabIndex = 675;
this.ucSplitPage1.TotalPage = 1;
//
// colCheck
//
this.colCheck.HeaderText = "选择";
@@ -418,6 +568,25 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colSupplierName.ReadOnly = true;
this.colSupplierName.Width = 110;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colInShop.Width = 45;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLogin.Visible = false;
this.colLogin.Width = 45;
//
// colSpuId
//
this.colSpuId.HeaderText = "商品SPU";
@@ -477,7 +646,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colDraftId.HeaderText = "草稿箱Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Visible = false;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 80;
//
// ColDelete
//
@@ -485,104 +656,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Size = new System.Drawing.Size(1152, 26);
this.splitContainer4.SplitterDistance = 539;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(539, 26);
this.statusBar.TabIndex = 2;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.Location = new System.Drawing.Point(36, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.Size = new System.Drawing.Size(573, 26);
this.ucSplitPage1.TabIndex = 675;
this.ucSplitPage1.TotalPage = 1;
//
// panelEx1
//
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Location = new System.Drawing.Point(99, 2);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(115, 21);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx1.TabIndex = 668;
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(3, 2);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// UserSelectDbProductForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1152, 546);
this.ClientSize = new System.Drawing.Size(1291, 546);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "UserSelectDbProductForm";
@@ -594,6 +672,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx4.ResumeLayout(false);
this.ucGroupBoxEx4.PerformLayout();
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
@@ -639,10 +718,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.PictureBox pbLoading;
private UserControls.UcSplitPage ucSplitPage1;
private System.Windows.Forms.ComboBox cmbStatus;
private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.PanelEx btnDelSelect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
private System.Windows.Forms.DataGridViewLinkColumn colInShop;
private System.Windows.Forms.DataGridViewLinkColumn colLogin;
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
@@ -650,7 +734,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId;
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
}
}
@@ -12,16 +12,19 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.Extension;
using TemuKJD.KJDForms.BaseForms;
using TemuKJD.KJDForms.ShopForms;
using Work;
namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class UserSelectDbProductForm : Form
{
bool isInit = false;
CheckBox chkSelectAll = null;
List<TemuDBProductSelect> lstTemuDBProductSelect = new List<TemuDBProductSelect>();
public UserSelectDbProductForm()
@@ -35,6 +38,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
dgvShop.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
chkSelectAll.Checked = true;
this.dgvSelectProduct.AddSelectorColumn("colCheck");
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
@@ -73,7 +77,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private void UserSelectDbProductForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
{
RefreshShop();
if (dgvSelectProduct.Rows.Count == 0)
SearchDbProdSelect(1);
}
}
private void RefreshShop()
@@ -105,11 +114,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
selectShopId = new List<string>();
bool canUse = shopEntity.LoginStatus == "登录成功";
canUse = true; // 内部库不需要校验登录状态
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null)
{
this.dgvShop.Rows.Add(
selectShopId.Contains(shopEntity.ShopId) && canUse,
!isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
@@ -121,12 +131,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
else
{
row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse;
row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
row.Cells["colCanUse"].Value = canUse;
}
isInit = false;
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -202,7 +213,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Task.Run(() =>
{
int pageCount;
var list = GetSelectProductList(out pageCount, page);
var list = GetSelectProductList(out pageCount, page, 200);
lstTemuDBProductSelect.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount;
@@ -226,6 +237,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.id,
prodSelect.shop_id,
prodSelect.shop_account,
"进店",
"登录",
"",//prodSelect.spu_id,
"",//prodSelect.skc_id,
image,//prod.main_img,
@@ -236,7 +249,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.draft_id,
"删除");
dgvSelectProduct.Rows[rowIndex].Height = 80;
dgvSelectProduct.Rows[rowIndex].Height = 60;
}));
}
@@ -257,16 +270,20 @@ namespace TemuKJD.KJDForms.ProductSelectForms
pageCount = 1;
var url = BaseClass.BuildObjString("product/get_user_select_product_list");
var data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
//"&out_product_id=" + dbId +
//"&shop_id=" + shop.ShopId +
//"&shop_account=" + shop.ShopAccount +
//"&main_user_name=" + shop.UserName +
//"&sub_user_name=" + shop.SubUserName +
//"&status=待审核" +
"&shop_ids=\"" + string.Join("\",\"", lstShopId) + "\"";
var data = "";
Invoke(new Action(() =>
{
data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
//"&out_product_id=" + dbId +
//"&shop_id=" + shop.ShopId +
//"&shop_account=" + shop.ShopAccount +
//"&main_user_name=" + shop.UserName +
//"&sub_user_name=" + shop.SubUserName +
"&status=" + (cmbStatus.Text == "全部" ? "" : cmbStatus.Text) +
"&shop_ids=\"" + string.Join("\",\"", lstShopId) + "\"";
}));
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -303,6 +320,122 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvSelectProduct.Columns[e.ColumnIndex].HeaderText;
var dbId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSelectId"].Value.ParseToString();
var dbProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == dbId);
var shopId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString();
var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
switch (headerText)
{
case "删除":
if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
return;
var rst = DeleteProduct(dbId);
if (rst)
{
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
}
break;
case "进店":
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft";
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.ShowDialog();
}
break;
case "编辑备注":
//DbProductEditNotesForm editForm = new DbProductEditNotesForm(dbProduct);
//editForm.ShowDialog();
//dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
break;
case "草稿箱Id":
//if (!string.IsNullOrEmpty(draftId) && shop != null)
//{
// ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
// shopLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
// draftId + "&from=productDraftList";
// shopLoginForm.openType = EnumOpenType.manage;
// shopLoginForm.WindowState = FormWindowState.Maximized;
// shopLoginForm.ShowDialog();
//}
break;
case "":
dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value;
break;
default:
break;
}
}
private bool DeleteProduct(string dbId)
{
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
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("\"code\":200"))
{
BaseMsgForm.ShowError("删除商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
return false;
}
return true;
}
private void btnDelSelect_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定删除选中商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
return;
var DbIdLst = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colCheck"]?.Value.ParseToBool() == true).Select(r => r.Cells["colSelectId"]?.Value.ToString()).ToList();
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在删除...";
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Maximum = DbIdLst.Count;
this.statusBar.pgbTaskProgress.Text = "0" + "/" + DbIdLst.Count;
Task.Run(() =>
{
foreach (var dbId in DbIdLst)
{
try
{
DeleteProduct(dbId);
Thread.Sleep(20);
}
catch (Exception ex)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowInfo(ex.Message);
}));
}
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value++;
this.statusBar.pgbTaskProgress.Text = this.statusBar.pgbTaskProgress.Value.ToString() + "/" + DbIdLst.Count;
}));
}
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value = DbIdLst.Count;
this.statusBar.lblTaskStatus.Text = "删除完成";
this.pbLoading.Visible = false;
BaseMsgForm.ShowInfo("删除完成!");
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
}));
});
}
}
@@ -150,6 +150,12 @@
<metadata name="colSupplierName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colInShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLogin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -406,6 +406,7 @@ namespace TemuKJD.KJDForms.ShopForms
Task.Run(() =>
{
//CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName });
StartUp.SaveLocalShopLoginInfo();
RefreshDataGridView(false);
});
}
+5 -1
View File
@@ -38,6 +38,7 @@ namespace TemuKJD.KJDForms.ShopForms
public EnumOpenType openType = EnumOpenType.manage;
public bool isMultiLogin = false;
public string MultiLoginCookieName = "";
public string InitUrl = "";
private string shopCookieHead = "kuajingmaihuo.com";
private string shopLoginUrl = "http://seller.kuajingmaihuo.com/login";
private string shopMainUrl = "https://seller.kuajingmaihuo.com";
@@ -263,7 +264,10 @@ namespace TemuKJD.KJDForms.ShopForms
if (cefWebBrowser == null)
{
//cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false);
if (!string.IsNullOrEmpty(InitUrl))
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
else
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false);
CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
@@ -117,7 +117,6 @@ window.location.href = 'https://seller.kuajingmaihuo.com/goods/product/list';
sc.LoginStatus = "登录成功";
}
ShopListForm.UpdateServerShopCookies(shopLoginInfo, shopLoginInfo.Cookies); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie
StartUp.SaveLocalShopLoginInfo();
this.OnSaveComplete(shopLoginInfo);
this.Close();
}
+9 -7
View File
@@ -149,12 +149,14 @@ namespace TemuKJD
CefSettings settings = new CefSettings();
//settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36";
//settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36";
settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36";
settings.CefCommandLineArgs.Add("disable-gpu", "1");
//settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36";
settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
settings.CefCommandLineArgs.Add("disable-gpu", "1"); // 禁止显卡加速
settings.IgnoreCertificateErrors = true;
settings.Locale = "zh-CN";
settings.LogSeverity = LogSeverity.Disable;
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
//settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
settings.CachePath = null; //禁止缓存
Cef.Initialize(settings);
}
@@ -222,10 +224,10 @@ namespace TemuKJD
;
// 是否显示联系客服按钮
if (FileBase.Exists("locales/ig.pak") || FileBase.Exists("locales/wl.pak"))
lblContactSupport.Visible = false;
else
lblContactSupport.Visible = true;
//if (FileBase.Exists("locales/ig.pak") || FileBase.Exists("locales/wl.pak"))
// lblContactSupport.Visible = false;
//else
// lblContactSupport.Visible = true;
Task.Run(() =>
{
+45 -30
View File
@@ -84,7 +84,7 @@ namespace TemuKJD
this.navPanel.Location = new System.Drawing.Point(0, 0);
this.navPanel.Margin = new System.Windows.Forms.Padding(0);
this.navPanel.Name = "navPanel";
this.navPanel.Size = new System.Drawing.Size(1278, 90);
this.navPanel.Size = new System.Drawing.Size(1278, 91);
this.navPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.navPanel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(143)))), ((int)(((byte)(255)))));
this.navPanel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -112,8 +112,9 @@ namespace TemuKJD
this.flowLayoutPanel1.Controls.Add(this.pnlOrder);
this.flowLayoutPanel1.Controls.Add(this.pnlSA);
this.flowLayoutPanel1.Location = new System.Drawing.Point(196, 0);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(701, 90);
this.flowLayoutPanel1.Size = new System.Drawing.Size(701, 91);
this.flowLayoutPanel1.TabIndex = 131;
//
// pnlShop
@@ -125,7 +126,7 @@ namespace TemuKJD
this.pnlShop.Location = new System.Drawing.Point(0, 0);
this.pnlShop.Margin = new System.Windows.Forms.Padding(0);
this.pnlShop.Name = "pnlShop";
this.pnlShop.Size = new System.Drawing.Size(80, 90);
this.pnlShop.Size = new System.Drawing.Size(80, 91);
this.pnlShop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlShop.Style.BackColor1.Alpha = ((byte)(0));
this.pnlShop.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -158,7 +159,7 @@ namespace TemuKJD
this.pnlUpload.Location = new System.Drawing.Point(80, 0);
this.pnlUpload.Margin = new System.Windows.Forms.Padding(0);
this.pnlUpload.Name = "pnlUpload";
this.pnlUpload.Size = new System.Drawing.Size(80, 90);
this.pnlUpload.Size = new System.Drawing.Size(80, 91);
this.pnlUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlUpload.Style.BackColor1.Alpha = ((byte)(0));
this.pnlUpload.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -191,7 +192,7 @@ namespace TemuKJD
this.pnlMarket.Location = new System.Drawing.Point(160, 0);
this.pnlMarket.Margin = new System.Windows.Forms.Padding(0);
this.pnlMarket.Name = "pnlMarket";
this.pnlMarket.Size = new System.Drawing.Size(80, 90);
this.pnlMarket.Size = new System.Drawing.Size(80, 91);
this.pnlMarket.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlMarket.Style.BackColor1.Alpha = ((byte)(0));
this.pnlMarket.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -225,7 +226,7 @@ namespace TemuKJD
this.pnlCollect.Location = new System.Drawing.Point(240, 0);
this.pnlCollect.Margin = new System.Windows.Forms.Padding(0);
this.pnlCollect.Name = "pnlCollect";
this.pnlCollect.Size = new System.Drawing.Size(80, 90);
this.pnlCollect.Size = new System.Drawing.Size(80, 91);
this.pnlCollect.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlCollect.Style.BackColor1.Alpha = ((byte)(0));
this.pnlCollect.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -259,7 +260,7 @@ namespace TemuKJD
this.pnlTools.Location = new System.Drawing.Point(320, 0);
this.pnlTools.Margin = new System.Windows.Forms.Padding(0);
this.pnlTools.Name = "pnlTools";
this.pnlTools.Size = new System.Drawing.Size(80, 90);
this.pnlTools.Size = new System.Drawing.Size(80, 91);
this.pnlTools.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlTools.Style.BackColor1.Alpha = ((byte)(0));
this.pnlTools.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -292,7 +293,7 @@ namespace TemuKJD
this.pnlOrder.Location = new System.Drawing.Point(400, 0);
this.pnlOrder.Margin = new System.Windows.Forms.Padding(0);
this.pnlOrder.Name = "pnlOrder";
this.pnlOrder.Size = new System.Drawing.Size(80, 90);
this.pnlOrder.Size = new System.Drawing.Size(80, 91);
this.pnlOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlOrder.Style.BackColor1.Alpha = ((byte)(0));
this.pnlOrder.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -326,7 +327,7 @@ namespace TemuKJD
this.pnlSA.Location = new System.Drawing.Point(480, 0);
this.pnlSA.Margin = new System.Windows.Forms.Padding(0);
this.pnlSA.Name = "pnlSA";
this.pnlSA.Size = new System.Drawing.Size(80, 90);
this.pnlSA.Size = new System.Drawing.Size(80, 91);
this.pnlSA.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlSA.Style.BackColor1.Alpha = ((byte)(0));
this.pnlSA.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -353,7 +354,8 @@ namespace TemuKJD
// pbLogo
//
this.pbLogo.Image = global::TemuKJD.Properties.Resources.main_form_logo;
this.pbLogo.Location = new System.Drawing.Point(10, 15);
this.pbLogo.Location = new System.Drawing.Point(10, 16);
this.pbLogo.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.pbLogo.Name = "pbLogo";
this.pbLogo.Size = new System.Drawing.Size(180, 60);
this.pbLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -376,7 +378,7 @@ namespace TemuKJD
this.plTopRight.Location = new System.Drawing.Point(1028, 0);
this.plTopRight.Margin = new System.Windows.Forms.Padding(0);
this.plTopRight.Name = "plTopRight";
this.plTopRight.Size = new System.Drawing.Size(250, 90);
this.plTopRight.Size = new System.Drawing.Size(250, 91);
this.plTopRight.TabIndex = 0;
this.plTopRight.DoubleClick += new System.EventHandler(this.plTopRight_DoubleClick);
this.plTopRight.MouseDown += new System.Windows.Forms.MouseEventHandler(this.plTopRight_MouseDown);
@@ -393,11 +395,12 @@ namespace TemuKJD
//
this.lblContactSupport.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblContactSupport.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblContactSupport.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.lblContactSupport.Font = new System.Drawing.Font("宋体", 10.5F);
this.lblContactSupport.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.lblContactSupport.Location = new System.Drawing.Point(101, 2);
this.lblContactSupport.Location = new System.Drawing.Point(107, 5);
this.lblContactSupport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.lblContactSupport.Name = "lblContactSupport";
this.lblContactSupport.Size = new System.Drawing.Size(65, 23);
this.lblContactSupport.Size = new System.Drawing.Size(65, 20);
this.lblContactSupport.TabIndex = 67;
this.lblContactSupport.Text = "联系客服";
this.lblContactSupport.Visible = false;
@@ -408,6 +411,7 @@ namespace TemuKJD
this.picPinDuoDuoToken.Cursor = System.Windows.Forms.Cursors.Hand;
this.picPinDuoDuoToken.Image = ((System.Drawing.Image)(resources.GetObject("picPinDuoDuoToken.Image")));
this.picPinDuoDuoToken.Location = new System.Drawing.Point(144, 3);
this.picPinDuoDuoToken.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.picPinDuoDuoToken.Name = "picPinDuoDuoToken";
this.picPinDuoDuoToken.Size = new System.Drawing.Size(23, 23);
this.picPinDuoDuoToken.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -422,6 +426,7 @@ namespace TemuKJD
this.pbAnnouncement.BackColor = System.Drawing.Color.Transparent;
this.pbAnnouncement.Image = ((System.Drawing.Image)(resources.GetObject("pbAnnouncement.Image")));
this.pbAnnouncement.Location = new System.Drawing.Point(115, 3);
this.pbAnnouncement.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.pbAnnouncement.Name = "pbAnnouncement";
this.pbAnnouncement.Size = new System.Drawing.Size(23, 23);
this.pbAnnouncement.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -440,14 +445,15 @@ namespace TemuKJD
//
//
this.lblVersionName.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblVersionName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVersionName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.lblVersionName.Location = new System.Drawing.Point(164, 35);
this.lblVersionName.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.lblVersionName.Name = "lblVersionName";
this.lblVersionName.Size = new System.Drawing.Size(74, 17);
this.lblVersionName.TabIndex = 20;
this.lblVersionName.Text = "版本类型";
this.lblVersionName.TextAlignment = System.Drawing.StringAlignment.Far;
this.lblVersionName.Visible = false;
this.lblVersionName.Click += new System.EventHandler(this.lblVersionName_Click);
//
// lblVersionInfo
@@ -457,11 +463,11 @@ namespace TemuKJD
//
//
this.lblVersionInfo.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblVersionInfo.Font = new System.Drawing.Font("微软雅黑", 9F);
this.lblVersionInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(165)))), ((int)(((byte)(204)))));
this.lblVersionInfo.Location = new System.Drawing.Point(3, 58);
this.lblVersionInfo.Location = new System.Drawing.Point(4, 58);
this.lblVersionInfo.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.lblVersionInfo.Name = "lblVersionInfo";
this.lblVersionInfo.Size = new System.Drawing.Size(235, 16);
this.lblVersionInfo.Size = new System.Drawing.Size(234, 16);
this.lblVersionInfo.TabIndex = 2;
this.lblVersionInfo.Text = "版本信息";
this.lblVersionInfo.TextAlignment = System.Drawing.StringAlignment.Far;
@@ -473,7 +479,8 @@ namespace TemuKJD
this.max.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.max.Cursor = System.Windows.Forms.Cursors.Hand;
this.max.DisabledBackColor = System.Drawing.Color.Empty;
this.max.Location = new System.Drawing.Point(199, 6);
this.max.Location = new System.Drawing.Point(200, 6);
this.max.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.max.Name = "max";
this.max.Size = new System.Drawing.Size(16, 16);
this.max.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -499,6 +506,7 @@ namespace TemuKJD
this.min.Cursor = System.Windows.Forms.Cursors.Hand;
this.min.DisabledBackColor = System.Drawing.Color.Empty;
this.min.Location = new System.Drawing.Point(173, 6);
this.min.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.min.Name = "min";
this.min.Size = new System.Drawing.Size(16, 16);
this.min.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -524,6 +532,7 @@ namespace TemuKJD
this.close.Cursor = System.Windows.Forms.Cursors.Hand;
this.close.DisabledBackColor = System.Drawing.Color.Empty;
this.close.Location = new System.Drawing.Point(225, 6);
this.close.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.close.Name = "close";
this.close.Size = new System.Drawing.Size(16, 16);
this.close.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -545,7 +554,8 @@ namespace TemuKJD
//
this.btnDyCollect.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDyCollect.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnDyCollect.Location = new System.Drawing.Point(985, 43);
this.btnDyCollect.Location = new System.Drawing.Point(985, 42);
this.btnDyCollect.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.btnDyCollect.Name = "btnDyCollect";
this.btnDyCollect.Size = new System.Drawing.Size(135, 23);
this.btnDyCollect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -558,7 +568,8 @@ namespace TemuKJD
//
this.btnTest.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnTest.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnTest.Location = new System.Drawing.Point(985, 12);
this.btnTest.Location = new System.Drawing.Point(985, 11);
this.btnTest.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(135, 23);
this.btnTest.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -574,10 +585,10 @@ namespace TemuKJD
this.bodyPanelBg.Controls.Add(this.bodyPanel);
this.bodyPanelBg.DisabledBackColor = System.Drawing.Color.Empty;
this.bodyPanelBg.Dock = System.Windows.Forms.DockStyle.Fill;
this.bodyPanelBg.Location = new System.Drawing.Point(0, 90);
this.bodyPanelBg.Location = new System.Drawing.Point(0, 91);
this.bodyPanelBg.Margin = new System.Windows.Forms.Padding(0);
this.bodyPanelBg.Name = "bodyPanelBg";
this.bodyPanelBg.Size = new System.Drawing.Size(1278, 628);
this.bodyPanelBg.Size = new System.Drawing.Size(1278, 627);
this.bodyPanelBg.Style.Alignment = System.Drawing.StringAlignment.Center;
this.bodyPanelBg.Style.BackColor1.Color = System.Drawing.Color.White;
this.bodyPanelBg.Style.BackColor2.Color = System.Drawing.Color.White;
@@ -596,8 +607,9 @@ namespace TemuKJD
this.bodyPanel.DisabledBackColor = System.Drawing.Color.Empty;
this.bodyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.bodyPanel.Location = new System.Drawing.Point(0, 0);
this.bodyPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.bodyPanel.Name = "bodyPanel";
this.bodyPanel.Size = new System.Drawing.Size(1278, 628);
this.bodyPanel.Size = new System.Drawing.Size(1278, 627);
this.bodyPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.bodyPanel.Style.BackColor1.Alpha = ((byte)(0));
this.bodyPanel.Style.BackColor1.Color = System.Drawing.Color.Transparent;
@@ -620,7 +632,8 @@ namespace TemuKJD
this.pnlWebBrowserJS.CanvasColor = System.Drawing.SystemColors.Control;
this.pnlWebBrowserJS.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlWebBrowserJS.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlWebBrowserJS.Location = new System.Drawing.Point(1132, 12);
this.pnlWebBrowserJS.Location = new System.Drawing.Point(1132, 11);
this.pnlWebBrowserJS.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.pnlWebBrowserJS.Name = "pnlWebBrowserJS";
this.pnlWebBrowserJS.Size = new System.Drawing.Size(135, 71);
this.pnlWebBrowserJS.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -646,7 +659,7 @@ namespace TemuKJD
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 91F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1278, 718);
this.tableLayoutPanel1.TabIndex = 5;
@@ -658,11 +671,12 @@ namespace TemuKJD
// lklbGetHwCode
//
this.lklbGetHwCode.AutoSize = true;
this.lklbGetHwCode.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lklbGetHwCode.Font = new System.Drawing.Font("Yu Gothic UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lklbGetHwCode.LinkColor = System.Drawing.Color.WhiteSmoke;
this.lklbGetHwCode.Location = new System.Drawing.Point(125, 2);
this.lklbGetHwCode.Location = new System.Drawing.Point(125, 3);
this.lklbGetHwCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lklbGetHwCode.Name = "lklbGetHwCode";
this.lklbGetHwCode.Size = new System.Drawing.Size(54, 15);
this.lklbGetHwCode.Size = new System.Drawing.Size(52, 15);
this.lklbGetHwCode.TabIndex = 89;
this.lklbGetHwCode.TabStop = true;
this.lklbGetHwCode.Text = "HwCode";
@@ -679,11 +693,12 @@ namespace TemuKJD
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MinimumSize = new System.Drawing.Size(1280, 680);
this.Name = "MainForm";
this.Padding = new System.Windows.Forms.Padding(1);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "小奶牛";
this.Text = "跨境达";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Resize += new System.EventHandler(this.MainForm_Resize);
+4484 -1105
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -387,6 +387,7 @@
this.Controls.Add(this.chkRemember);
this.Controls.Add(this.lblResetPassword);
this.Controls.Add(this.loginPanel);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LoginForm";
+1 -1
View File
@@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>