新代理商
This commit is contained in:
1 parent
e37f15737c
commit
0773eaa9fd
34 files changed
+742
-76
No files matched your search
@@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Work;
|
||||
|
||||
namespace TemuKJD.BLL
|
||||
{
|
||||
@@ -559,12 +560,27 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
result = GetProxyHtml.ReadResponse(response);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static string sAuthorization = "";
|
||||
|
||||
public static string e57PostResponse(string _url, string _data, string referer, string Authorization = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Authorization))
|
||||
Authorization = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
||||
//if (string.IsNullOrEmpty(Authorization)) Authorization = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
||||
|
||||
bool isRetry = false;
|
||||
if (string.IsNullOrEmpty(sAuthorization))
|
||||
{
|
||||
var url3 = BaseClass.BuildWXObjString("user/get_e57_authorization");
|
||||
var data3 = UserLogin.GetSignaturex();
|
||||
var html3 = GetHtml.PostUtf8(url3, data3);
|
||||
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
||||
html3 = GetHtml.PostUtf8(url3, data3);
|
||||
sAuthorization = BaseRegex.GetStringJson(ref html3, "authorization");
|
||||
}
|
||||
|
||||
Retry:
|
||||
|
||||
HttpWebResponse response = null;
|
||||
string result;
|
||||
try
|
||||
@@ -594,15 +610,17 @@ namespace TemuKJD.BLL
|
||||
request.Headers.Add("sec-ch-ua-mobile", @"?0");
|
||||
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
|
||||
request.Headers.Add("Upgrade-Insecure-Requests", @"1");
|
||||
request.Headers.Add("Authorization", Authorization);
|
||||
request.Headers.Add("Authorization", "Bearer " + sAuthorization);
|
||||
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36";
|
||||
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7";
|
||||
request.Headers.Add("Sec-Fetch-Site", @"none");
|
||||
request.Headers.Add("Sec-Fetch-Mode", @"navigate");
|
||||
request.Headers.Add("Sec-Fetch-User", @"?1");
|
||||
request.Headers.Add("Sec-Fetch-Dest", @"document");
|
||||
request.Headers.Set(HttpRequestHeader.Cookie, "Admin-Token=" + sAuthorization);
|
||||
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
|
||||
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
|
||||
request.Proxy = null;
|
||||
|
||||
request.Method = "POST";
|
||||
request.ServicePoint.Expect100Continue = false;
|
||||
@@ -632,11 +650,29 @@ namespace TemuKJD.BLL
|
||||
return e.Message;
|
||||
}
|
||||
result = GetProxyHtml.ReadResponse(response);
|
||||
if (result.Contains("没有Authorization") && !isRetry)
|
||||
{
|
||||
isRetry = true;
|
||||
sAuthorization = "";
|
||||
goto Retry;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string e57GetResponse(string _url, string referer)
|
||||
{
|
||||
bool isRetry = false;
|
||||
if (string.IsNullOrEmpty(sAuthorization))
|
||||
{
|
||||
var url3 = BaseClass.BuildWXObjString("user/get_e57_authorization");
|
||||
var data3 = UserLogin.GetSignaturex();
|
||||
var html3 = GetHtml.PostUtf8(url3, data3);
|
||||
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
||||
html3 = GetHtml.PostUtf8(url3, data3);
|
||||
sAuthorization = BaseRegex.GetStringJson(ref html3, "authorization");
|
||||
}
|
||||
Retry:
|
||||
|
||||
HttpWebResponse response = null;
|
||||
string result;
|
||||
try
|
||||
@@ -660,14 +696,17 @@ namespace TemuKJD.BLL
|
||||
request.Headers.Add("sec-ch-ua-mobile", @"?0");
|
||||
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
|
||||
request.Headers.Add("Upgrade-Insecure-Requests", @"1");
|
||||
request.Headers.Add("Authorization", "Bearer " + sAuthorization);
|
||||
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36";
|
||||
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7";
|
||||
request.Headers.Add("Sec-Fetch-Site", @"none");
|
||||
request.Headers.Add("Sec-Fetch-Mode", @"navigate");
|
||||
request.Headers.Add("Sec-Fetch-User", @"?1");
|
||||
request.Headers.Add("Sec-Fetch-Dest", @"document");
|
||||
request.Headers.Set(HttpRequestHeader.Cookie, "Admin-Token=" + sAuthorization);
|
||||
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
|
||||
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
|
||||
request.Proxy = null;
|
||||
|
||||
response = (HttpWebResponse)request.GetResponse();
|
||||
}
|
||||
@@ -687,6 +726,12 @@ namespace TemuKJD.BLL
|
||||
return e.Message;
|
||||
}
|
||||
result = GetProxyHtml.ReadResponse(response);
|
||||
if (result.Contains("没有Authorization") && !isRetry)
|
||||
{
|
||||
isRetry = true;
|
||||
sAuthorization = "";
|
||||
goto Retry;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+57
-57
@@ -32,14 +32,14 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.chkIsSubmitSuccess = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
@@ -1643,7 +1643,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// numFilterViewUv
|
||||
//
|
||||
this.numFilterViewUv.Location = new System.Drawing.Point(192, 101);
|
||||
this.numFilterViewUv.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.numFilterViewUv.Location = new System.Drawing.Point(191, 100);
|
||||
this.numFilterViewUv.Maximum = new decimal(new int[] {
|
||||
99999999,
|
||||
0,
|
||||
@@ -1655,7 +1656,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
0,
|
||||
0});
|
||||
this.numFilterViewUv.Name = "numFilterViewUv";
|
||||
this.numFilterViewUv.Size = new System.Drawing.Size(46, 23);
|
||||
this.numFilterViewUv.Size = new System.Drawing.Size(46, 25);
|
||||
this.numFilterViewUv.TabIndex = 931;
|
||||
this.numFilterViewUv.Value = new decimal(new int[] {
|
||||
200,
|
||||
@@ -1667,9 +1668,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// cmbNotes
|
||||
//
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
this.cmbNotes.Location = new System.Drawing.Point(323, 46);
|
||||
this.cmbNotes.Location = new System.Drawing.Point(326, 46);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbNotes.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbNotes.TabIndex = 823;
|
||||
this.cmbNotes.Visible = false;
|
||||
//
|
||||
@@ -1786,9 +1787,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"",
|
||||
"爆款数据",
|
||||
"普通商品"});
|
||||
this.cmbHot.Location = new System.Drawing.Point(323, 73);
|
||||
this.cmbHot.Location = new System.Drawing.Point(326, 73);
|
||||
this.cmbHot.Name = "cmbHot";
|
||||
this.cmbHot.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbHot.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbHot.TabIndex = 837;
|
||||
this.cmbHot.Text = "普通商品";
|
||||
this.cmbHot.Visible = false;
|
||||
@@ -1837,7 +1838,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtSearchGoodsName.Location = new System.Drawing.Point(191, 46);
|
||||
this.txtSearchGoodsName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtSearchGoodsName.Name = "txtSearchGoodsName";
|
||||
this.txtSearchGoodsName.Size = new System.Drawing.Size(94, 25);
|
||||
this.txtSearchGoodsName.Size = new System.Drawing.Size(92, 25);
|
||||
this.txtSearchGoodsName.TabIndex = 795;
|
||||
//
|
||||
// cmbSourceType
|
||||
@@ -1856,7 +1857,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"多多外部数据"});
|
||||
this.cmbSourceType.Location = new System.Drawing.Point(55, 73);
|
||||
this.cmbSourceType.Name = "cmbSourceType";
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbSourceType.TabIndex = 673;
|
||||
this.cmbSourceType.Text = "厂商直采";
|
||||
this.cmbSourceType.Visible = false;
|
||||
@@ -1870,9 +1871,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCateFilter3.DropDownWidth = 1;
|
||||
this.cmbCateFilter3.FormattingEnabled = true;
|
||||
this.cmbCateFilter3.IntegralHeight = false;
|
||||
this.cmbCateFilter3.Location = new System.Drawing.Point(323, 19);
|
||||
this.cmbCateFilter3.Location = new System.Drawing.Point(326, 19);
|
||||
this.cmbCateFilter3.Name = "cmbCateFilter3";
|
||||
this.cmbCateFilter3.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbCateFilter3.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter3.TabIndex = 710;
|
||||
this.cmbCateFilter3.Text = "全部";
|
||||
this.cmbCateFilter3.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter3_SelectedIndexChanged);
|
||||
@@ -1881,7 +1882,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// label21
|
||||
//
|
||||
this.label21.AutoSize = true;
|
||||
this.label21.Location = new System.Drawing.Point(288, 23);
|
||||
this.label21.Location = new System.Drawing.Point(291, 23);
|
||||
this.label21.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label21.Name = "label21";
|
||||
this.label21.Size = new System.Drawing.Size(39, 17);
|
||||
@@ -1893,7 +1894,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbGroupFilter.FormattingEnabled = true;
|
||||
this.cmbGroupFilter.Location = new System.Drawing.Point(191, 73);
|
||||
this.cmbGroupFilter.Name = "cmbGroupFilter";
|
||||
this.cmbGroupFilter.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbGroupFilter.TabIndex = 641;
|
||||
this.cmbGroupFilter.Visible = false;
|
||||
this.cmbGroupFilter.SelectedIndexChanged += new System.EventHandler(this.cmbGroupFilter_SelectedIndexChanged);
|
||||
@@ -1905,7 +1906,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.txtIdFilter.Location = new System.Drawing.Point(55, 100);
|
||||
this.txtIdFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtIdFilter.Name = "txtIdFilter";
|
||||
this.txtIdFilter.Size = new System.Drawing.Size(94, 25);
|
||||
this.txtIdFilter.Size = new System.Drawing.Size(92, 25);
|
||||
this.txtIdFilter.TabIndex = 652;
|
||||
this.txtIdFilter.Visible = false;
|
||||
//
|
||||
@@ -1918,7 +1919,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCateFilter2.IntegralHeight = false;
|
||||
this.cmbCateFilter2.Location = new System.Drawing.Point(191, 19);
|
||||
this.cmbCateFilter2.Name = "cmbCateFilter2";
|
||||
this.cmbCateFilter2.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbCateFilter2.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter2.TabIndex = 708;
|
||||
this.cmbCateFilter2.Text = "全部";
|
||||
this.cmbCateFilter2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged);
|
||||
@@ -1959,7 +1960,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"未校验"});
|
||||
this.cmbWxSafe.Location = new System.Drawing.Point(55, 46);
|
||||
this.cmbWxSafe.Name = "cmbWxSafe";
|
||||
this.cmbWxSafe.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbWxSafe.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbWxSafe.TabIndex = 675;
|
||||
this.cmbWxSafe.Text = "安全+未校验";
|
||||
//
|
||||
@@ -1998,7 +1999,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCateFilter1.IntegralHeight = false;
|
||||
this.cmbCateFilter1.Location = new System.Drawing.Point(55, 19);
|
||||
this.cmbCateFilter1.Name = "cmbCateFilter1";
|
||||
this.cmbCateFilter1.Size = new System.Drawing.Size(94, 25);
|
||||
this.cmbCateFilter1.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter1.TabIndex = 663;
|
||||
this.cmbCateFilter1.Text = "全部";
|
||||
this.cmbCateFilter1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged);
|
||||
@@ -2094,7 +2095,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// lblHot
|
||||
//
|
||||
this.lblHot.AutoSize = true;
|
||||
this.lblHot.Location = new System.Drawing.Point(295, 77);
|
||||
this.lblHot.Location = new System.Drawing.Point(298, 77);
|
||||
this.lblHot.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.lblHot.Name = "lblHot";
|
||||
this.lblHot.Size = new System.Drawing.Size(32, 17);
|
||||
@@ -2152,7 +2153,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// lblNotes
|
||||
//
|
||||
this.lblNotes.AutoSize = true;
|
||||
this.lblNotes.Location = new System.Drawing.Point(295, 50);
|
||||
this.lblNotes.Location = new System.Drawing.Point(298, 50);
|
||||
this.lblNotes.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.lblNotes.Name = "lblNotes";
|
||||
this.lblNotes.Size = new System.Drawing.Size(32, 17);
|
||||
@@ -2162,10 +2163,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// chkFilterViewUv
|
||||
//
|
||||
this.chkFilterViewUv.AutoSize = true;
|
||||
this.chkFilterViewUv.Location = new System.Drawing.Point(150, 102);
|
||||
this.chkFilterViewUv.Location = new System.Drawing.Point(149, 104);
|
||||
this.chkFilterViewUv.Name = "chkFilterViewUv";
|
||||
this.chkFilterViewUv.Size = new System.Drawing.Size(51, 21);
|
||||
this.chkFilterViewUv.Size = new System.Drawing.Size(44, 17);
|
||||
this.chkFilterViewUv.TabIndex = 911;
|
||||
this.chkFilterViewUv.Text = "曝光";
|
||||
this.chkFilterViewUv.UseVisualStyleBackColor = true;
|
||||
@@ -2593,19 +2593,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle33.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle33;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle34.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle34.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle34.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle34.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle34.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle34;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -2837,19 +2837,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle35.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35;
|
||||
this.dgvSelectProduct.AutoRowNumber = true;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle36.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -2911,8 +2911,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle37;
|
||||
this.colSupplierName.Frozen = true;
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
@@ -2992,8 +2992,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle38;
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
@@ -3001,8 +3001,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle39;
|
||||
this.colProductCat.HeaderText = "商品类目";
|
||||
this.colProductCat.Name = "colProductCat";
|
||||
this.colProductCat.ReadOnly = true;
|
||||
@@ -3057,8 +3057,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// colAddTime
|
||||
//
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle40;
|
||||
this.colAddTime.HeaderText = "上传时间";
|
||||
this.colAddTime.Name = "colAddTime";
|
||||
this.colAddTime.ReadOnly = true;
|
||||
|
||||
@@ -424,8 +424,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
for (int j= ctrlLst.Count - 2; j > i; j-=2)
|
||||
{
|
||||
ctrlLst[j].Parent = ucGroupBoxEx4;
|
||||
ctrlLst[j].Location = new Point(ctrlLst[j - 2].Location.X, ctrlLst[j - 2].Location.Y);
|
||||
ctrlLst[j].Location = new Point(ctrlLst[j - 2].Location.X + ctrlLst[j - 2].Width - ctrlLst[j].Width, ctrlLst[j - 2].Location.Y);
|
||||
if (ctrlLst[j] is CheckBox) // 额外减去一个像素
|
||||
ctrlLst[j].Location = new Point(ctrlLst[j].Location.X - 1, ctrlLst[j].Location.Y);
|
||||
ctrlLst[j + 1].Location = new Point(ctrlLst[j].Location.X + ctrlLst[j].Width - 3, ctrlLst[j - 1].Location.Y);
|
||||
ctrlLst[j + 1].Width = ctrlLst[j - 1].Width;
|
||||
ctrlLst[j + 1].BringToFront();
|
||||
}
|
||||
}
|
||||
@@ -436,8 +439,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
if (chkWXComplateProd.Visible == false)
|
||||
{
|
||||
chkRandomFissionProduct.Location = new Point(chkRandomFissionProduct.Location.X + 160, chkRandomFissionProduct.Location.Y);
|
||||
txtRandomFissionProductCount.Location = new Point(txtRandomFissionProductCount.Location.X + 160, txtRandomFissionProductCount.Location.Y);
|
||||
chkRandomFissionProduct.Location = new Point(chkRandomFissionProduct.Location.X + 54, chkRandomFissionProduct.Location.Y);
|
||||
txtRandomFissionProductCount.Location = new Point(txtRandomFissionProductCount.Location.X + 54, txtRandomFissionProductCount.Location.Y);
|
||||
}
|
||||
|
||||
IsFormLoad = true;
|
||||
@@ -899,7 +902,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
var shopId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString();
|
||||
var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString();
|
||||
var shop = GlobalConfig.ValidShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
|
||||
if (shop == null)
|
||||
if (shop == null && !string.IsNullOrEmpty(headerText))
|
||||
{
|
||||
BaseMsgForm.ShowError("店铺不存在或已过期");
|
||||
return;
|
||||
@@ -6270,19 +6273,25 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private void btnClearDgv_Click(object sender, EventArgs e)
|
||||
{
|
||||
//this.dgvSelectProduct.Rows.Clear();
|
||||
var rows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>().ToList(); //Cast后Rows做foreach循环时仍会夹花跳过,所以要ToList转一个新的数组。
|
||||
foreach (var row in rows)
|
||||
Task.Run(() =>
|
||||
{
|
||||
if (row.Cells["colCheck"].Value.ParseToBool() == true)
|
||||
var rows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>().ToList(); //Cast后Rows做foreach循环时仍会夹花跳过,所以要ToList转一个新的数组。
|
||||
foreach (var row in rows)
|
||||
{
|
||||
var draft_id = row.Cells["colDraftId"].Value.ParseToString();
|
||||
var add_time = row.Cells["colAddTime"].Value.ParseToString().ParseToDateTime();
|
||||
upload_draft_product_lst.RemoveAll(p => p.draft_id.ParseToString() == draft_id && p.add_time.ToString("yyyyMMddHHmmss") == add_time.ToString("yyyyMMddHHmmss"));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (row.Cells["colCheck"].Value.ParseToBool() == true)
|
||||
{
|
||||
var draft_id = row.Cells["colDraftId"].Value.ParseToString();
|
||||
var add_time = row.Cells["colAddTime"].Value.ParseToString().ParseToDateTime();
|
||||
upload_draft_product_lst.RemoveAll(p => p.draft_id.ParseToString() == draft_id && p.add_time.ToString("yyyyMMddHHmmss") == add_time.ToString("yyyyMMddHHmmss"));
|
||||
|
||||
this.dgvSelectProduct.Rows.Remove(row);
|
||||
this.dgvSelectProduct.Rows.Remove(row);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_select_upload_draft_products", upload_draft_product_lst);
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_select_upload_draft_products", upload_draft_product_lst);
|
||||
});
|
||||
}
|
||||
|
||||
private void chkAddMorePriceFirst_CheckedChanged(object sender, EventArgs e)
|
||||
|
||||
Reference in new issue
Block a user