升级方式优化
This commit is contained in:
1 parent
b762ff4c7f
commit
58c26725fb
39 files changed
+1525
-1614
No files matched your search
+18
-1
@@ -29,6 +29,7 @@ namespace TemuKJD.ToolForms
|
||||
/// </summary>
|
||||
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();
|
||||
@@ -81,6 +82,7 @@ namespace TemuKJD.ToolForms
|
||||
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.chkWithTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -271,6 +273,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.chkWithTitle);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.btnBatchCreateFissionTitle);
|
||||
this.splitContainer3.Panel1MinSize = 0;
|
||||
//
|
||||
@@ -290,7 +293,7 @@ namespace TemuKJD.ToolForms
|
||||
this.btnBatchCreateFissionTitle.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnBatchCreateFissionTitle.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnBatchCreateFissionTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnBatchCreateFissionTitle.Location = new System.Drawing.Point(21, 17);
|
||||
this.btnBatchCreateFissionTitle.Location = new System.Drawing.Point(21, 20);
|
||||
this.btnBatchCreateFissionTitle.Name = "btnBatchCreateFissionTitle";
|
||||
this.btnBatchCreateFissionTitle.Size = new System.Drawing.Size(135, 23);
|
||||
this.btnBatchCreateFissionTitle.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -586,6 +589,18 @@ namespace TemuKJD.ToolForms
|
||||
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.col_select_product.Visible = false;
|
||||
//
|
||||
// chkWithTitle
|
||||
//
|
||||
this.chkWithTitle.AutoSize = true;
|
||||
this.chkWithTitle.Checked = true;
|
||||
this.chkWithTitle.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkWithTitle.Location = new System.Drawing.Point(21, 53);
|
||||
this.chkWithTitle.Name = "chkWithTitle";
|
||||
this.chkWithTitle.Size = new System.Drawing.Size(215, 21);
|
||||
this.chkWithTitle.TabIndex = 1132;
|
||||
this.chkWithTitle.Text = "提问时附带商品标题(防止数据不符)";
|
||||
this.chkWithTitle.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DouBaoTitleFissionCefForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -619,6 +634,7 @@ namespace TemuKJD.ToolForms
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.PerformLayout();
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
@@ -668,5 +684,6 @@ namespace TemuKJD.ToolForms
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
|
||||
private UserComponent.UcCheckBox chkWithTitle;
|
||||
}
|
||||
}
|
||||
@@ -252,6 +252,8 @@ namespace TemuKJD.ToolForms
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
askText = textBox1.Text.Trim();
|
||||
if (chkWithTitle.Checked)
|
||||
askText = row.Cells["col_product_name"].Value.ParseToString() + "。" + textBox1.Text.Trim();
|
||||
Clipboard.SetText(askText);
|
||||
}));
|
||||
host.SendKeyEvent(new CefSharp.KeyEvent() { WindowsKeyCode = 86, Type = KeyEventType.RawKeyDown, Modifiers = CefEventFlags.ControlDown });
|
||||
@@ -259,14 +261,18 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
host.SendKeyEvent(new CefSharp.KeyEvent() { WindowsKeyCode = 13, Type = KeyEventType.RawKeyDown });
|
||||
|
||||
for (int i = 0; i < 80; i++)
|
||||
// 等待2分钟以防出现验证码等问题
|
||||
for (int i = 0; i < 120; i++)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
if (currentProd == null)
|
||||
break;
|
||||
}
|
||||
if (currentProd != null)
|
||||
{
|
||||
Invoke(new Action(() => { cell.Value = "生成失败,超时"; }));
|
||||
currentProd = null;
|
||||
}
|
||||
|
||||
Invoke(new Action(() => { cefWebBrowser.Load(Url); }));
|
||||
|
||||
@@ -304,6 +310,14 @@ namespace TemuKJD.ToolForms
|
||||
var dbId = currentProd.id;
|
||||
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["col_spu_id"].Value.ParseToString() == prodId).ToList();
|
||||
|
||||
if (chkWithTitle.Checked && !data.Contains(currentProd.product_name))
|
||||
{
|
||||
foreach (var row in rows)
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; }));
|
||||
currentProd = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var titleStr = "";
|
||||
var stringList = data.Split(new string[] { "data:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach(var str in stringList)
|
||||
@@ -327,6 +341,8 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
if (titleList.Count() > 50)
|
||||
{
|
||||
if (dbId.IsNullOrZero())
|
||||
dbId = 0;
|
||||
var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
|
||||
var body = UserLogin.GetSignaturex() +
|
||||
"&db_id=" + dbId;
|
||||
@@ -392,7 +408,7 @@ namespace TemuKJD.ToolForms
|
||||
//dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url;
|
||||
break;
|
||||
case "主图":
|
||||
ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||||
ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colMainImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||||
imgFrom.ShowDialog();
|
||||
break;
|
||||
case "":
|
||||
|
||||
+9
-9
@@ -567,7 +567,7 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.line1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
|
||||
this.splitContainer1.SplitterDistance = 464;
|
||||
this.splitContainer1.SplitterDistance = 465;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -584,7 +584,7 @@ namespace TemuKJD.ToolForms
|
||||
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
|
||||
this.ucTabControlMetro1.SelectedIndex = 0;
|
||||
this.ucTabControlMetro1.ShowCloseButton = false;
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 464);
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 465);
|
||||
this.ucTabControlMetro1.TabIndex = 462;
|
||||
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
|
||||
@@ -598,7 +598,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage1.Margin = new System.Windows.Forms.Padding(5);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 432);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 433);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "商品页面";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
@@ -617,7 +617,7 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 426);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 427);
|
||||
this.splitContainer2.SplitterDistance = 26;
|
||||
this.splitContainer2.TabIndex = 6;
|
||||
//
|
||||
@@ -659,7 +659,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 28);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 431);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 432);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "采集商品列表";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
@@ -668,7 +668,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 188);
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 189);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -719,7 +719,7 @@ namespace TemuKJD.ToolForms
|
||||
this.dgvProduct.Name = "dgvProduct";
|
||||
this.dgvProduct.ReadOnly = true;
|
||||
this.dgvProduct.RowTemplate.Height = 23;
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 425);
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 426);
|
||||
this.dgvProduct.TabIndex = 7;
|
||||
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
|
||||
//
|
||||
@@ -861,7 +861,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 28);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage3.Size = new System.Drawing.Size(1396, 431);
|
||||
this.tabPage3.Size = new System.Drawing.Size(1396, 433);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "1688地址管理";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
@@ -871,7 +871,7 @@ namespace TemuKJD.ToolForms
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(1390, 425);
|
||||
this.panel1.Size = new System.Drawing.Size(1390, 427);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// chkSkip
|
||||
|
||||
@@ -69,7 +69,6 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
if(IsAuthorityUser)
|
||||
{
|
||||
this.ucTabControlMetro1.TabPages.RemoveAt(3);
|
||||
this.ucTabControlMetro1.TabPages.RemoveAt(2);
|
||||
}
|
||||
|
||||
@@ -1138,7 +1137,7 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
}
|
||||
|
||||
public static void Out1688ProductImport(bool isAuthorityUser, StatusBarUserControl statusBar, PictureBox pbLoading)
|
||||
public static void Out1688ProductImport(bool isCollectAuthorityUser, StatusBarUserControl statusBar, PictureBox pbLoading)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Multiselect = true;
|
||||
@@ -1169,9 +1168,9 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
content = sr.ReadToEnd();
|
||||
}
|
||||
rst = Out1688ProdImportOne(isAuthorityUser, path, content);
|
||||
rst = Out1688ProdImportOne(isCollectAuthorityUser, path, content);
|
||||
Thread.Sleep(100);
|
||||
if (isAuthorityUser)
|
||||
if (isCollectAuthorityUser)
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in new issue
Block a user