上货优化,数据筛查优化
This commit is contained in:
1 parent
e05e49a71a
commit
0e75af40aa
6 files changed
+325
-175
No files matched your search
+86
-35
@@ -73,6 +73,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.btnExportTxt = new DevComponents.DotNetBar.PanelEx();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.chkGetSaleCountLess0 = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.btnUpdateSaleCountNum = new DevComponents.DotNetBar.PanelEx();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.cmbHasReturn = new System.Windows.Forms.ComboBox();
|
||||
@@ -144,6 +146,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.lblExtCodePrice = new System.Windows.Forms.Label();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colFromShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -167,6 +171,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSelectTotalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colViewUv = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSaleCountNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colHeadWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colEndWords = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -179,8 +184,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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.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();
|
||||
@@ -653,6 +656,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.BackColor = System.Drawing.Color.White;
|
||||
this.tabPage2.Controls.Add(this.chkGetSaleCountLess0);
|
||||
this.tabPage2.Controls.Add(this.btnUpdateSaleCountNum);
|
||||
this.tabPage2.Controls.Add(this.flowLayoutPanel1);
|
||||
this.tabPage2.Controls.Add(this.btnUpdateReturnServerData);
|
||||
this.tabPage2.Controls.Add(this.btnReturnSecretData);
|
||||
@@ -663,6 +668,41 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "数据修复 3.15前";
|
||||
//
|
||||
// chkGetSaleCountLess0
|
||||
//
|
||||
this.chkGetSaleCountLess0.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.chkGetSaleCountLess0.Location = new System.Drawing.Point(15, 10);
|
||||
this.chkGetSaleCountLess0.Name = "chkGetSaleCountLess0";
|
||||
this.chkGetSaleCountLess0.Size = new System.Drawing.Size(87, 21);
|
||||
this.chkGetSaleCountLess0.TabIndex = 981;
|
||||
this.chkGetSaleCountLess0.Text = "查询销量<0";
|
||||
this.chkGetSaleCountLess0.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnUpdateSaleCountNum
|
||||
//
|
||||
this.btnUpdateSaleCountNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnUpdateSaleCountNum.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnUpdateSaleCountNum.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnUpdateSaleCountNum.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnUpdateSaleCountNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnUpdateSaleCountNum.Location = new System.Drawing.Point(15, 41);
|
||||
this.btnUpdateSaleCountNum.Name = "btnUpdateSaleCountNum";
|
||||
this.btnUpdateSaleCountNum.Size = new System.Drawing.Size(87, 25);
|
||||
this.btnUpdateSaleCountNum.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUpdateSaleCountNum.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUpdateSaleCountNum.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUpdateSaleCountNum.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnUpdateSaleCountNum.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnUpdateSaleCountNum.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnUpdateSaleCountNum.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnUpdateSaleCountNum.Style.GradientAngle = 90;
|
||||
this.btnUpdateSaleCountNum.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUpdateSaleCountNum.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUpdateSaleCountNum.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUpdateSaleCountNum.TabIndex = 999;
|
||||
this.btnUpdateSaleCountNum.Text = "更新销量";
|
||||
this.btnUpdateSaleCountNum.Click += new System.EventHandler(this.btnUpdateSaleCountNum_Click);
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -1752,6 +1792,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSelectTotalCount,
|
||||
this.colViewUv,
|
||||
this.colSaleCount,
|
||||
this.colSaleCountNum,
|
||||
this.col_notes,
|
||||
this.colHeadWords,
|
||||
this.colEndWords,
|
||||
@@ -1776,6 +1817,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
|
||||
this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll);
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(985, 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.PageSize = 100;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// 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(1438, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -1962,6 +2028,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.colSaleCount.Name = "colSaleCount";
|
||||
this.colSaleCount.ReadOnly = true;
|
||||
//
|
||||
// colSaleCountNum
|
||||
//
|
||||
this.colSaleCountNum.FillWeight = 60F;
|
||||
this.colSaleCountNum.HeaderText = "销量数";
|
||||
this.colSaleCountNum.Name = "colSaleCountNum";
|
||||
this.colSaleCountNum.ReadOnly = true;
|
||||
//
|
||||
// col_notes
|
||||
//
|
||||
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
@@ -2063,31 +2136,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(985, 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.PageSize = 100;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// 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(1438, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// PDDDBProdListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -2227,6 +2275,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private DevComponents.DotNetBar.PanelEx btnTitleFission;
|
||||
private System.Windows.Forms.ComboBox cmbHasFission;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private DevComponents.DotNetBar.PanelEx btnOutProdSaveDb;
|
||||
private System.Windows.Forms.TabPage tabPage4;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private UserComponent.UcCheckBox chkNoUserProduct;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.PanelEx btnAddUserProd;
|
||||
private DevComponents.DotNetBar.PanelEx btnEditGroup;
|
||||
private System.Windows.Forms.ComboBox cmbTime;
|
||||
private DevComponents.DotNetBar.PanelEx btnUpdateSaleCountNum;
|
||||
private UserComponent.UcCheckBox chkGetSaleCountLess0;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId;
|
||||
@@ -2250,6 +2308,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectTotalCount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colViewUv;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCountNum;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn col_notes;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colHeadWords;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colEndWords;
|
||||
@@ -2262,13 +2321,5 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_edit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
|
||||
private DevComponents.DotNetBar.PanelEx btnOutProdSaveDb;
|
||||
private System.Windows.Forms.TabPage tabPage4;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private UserComponent.UcCheckBox chkNoUserProduct;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.PanelEx btnAddUserProd;
|
||||
private DevComponents.DotNetBar.PanelEx btnEditGroup;
|
||||
private System.Windows.Forms.ComboBox cmbTime;
|
||||
}
|
||||
}
|
||||
@@ -252,6 +252,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
prod.select_total_count,
|
||||
prod.view_uv,
|
||||
prod.sale_count_text, // 销售数量
|
||||
prod.sale_count_num,
|
||||
prod.notes,
|
||||
prod.head_words,
|
||||
prod.end_words,
|
||||
@@ -480,6 +481,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
data += "&is_relation=0";
|
||||
else if (cmbPddRelation.Text == "是")
|
||||
data += "&is_relation=1";
|
||||
|
||||
if (chkGetSaleCountLess0.Checked)
|
||||
data += "&sale_count_num_less=0";
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -1284,7 +1288,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("商品分组编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
BaseMsgForm.ShowError("商品安全信息编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2777,5 +2781,53 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
GetPDDProductGroup(new List<ComboBox> { cmbGroup }, "", "无分组");
|
||||
GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter }, "", "无分组");
|
||||
}
|
||||
|
||||
private async void btnUpdateSaleCountNum_Click(object sender, EventArgs e)
|
||||
{
|
||||
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true);
|
||||
var lstProdDbId = rows.Select(r => r.Cells["col_db_id"]?.Value.ToString()).ToList();
|
||||
var prodList = this.lstTemuDbProduct.Where(p => lstProdDbId.Contains(p.id.ParseToString())).ToList();
|
||||
if (prodList.Count <= 0)
|
||||
{
|
||||
BaseMsgForm.ShowError("请选择商品!");
|
||||
return;
|
||||
}
|
||||
|
||||
int cnt = 0;
|
||||
int successCnt = 0;
|
||||
int failedCnt = 0;
|
||||
foreach (var prod in prodList)
|
||||
{
|
||||
cnt++;
|
||||
var url = BaseClass.BuildPDDObjString("product/mdy_product");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&spu_id=" + prod.spu_id + "&sale_count=" + prod.sale_count + "&mdy_time=" + prod.mdy_time.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
await Task.Run(() =>
|
||||
{
|
||||
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"))
|
||||
{
|
||||
//BaseMsgForm.ShowError("商品销量编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
failedCnt++;
|
||||
}
|
||||
else
|
||||
{
|
||||
successCnt++;
|
||||
}
|
||||
});
|
||||
this.statusBar.UpdateProgressBar(cnt);
|
||||
this.statusBar.lblTaskStatus.Text = "正在编辑商品销量,共:" + prodList.Count + " 成功:" + successCnt + "/失败:" + failedCnt;
|
||||
}
|
||||
|
||||
//foreach (var row in rows)
|
||||
//{
|
||||
// row.Cells["colWxSafe"].Value = cmbSetWxSafe.Text.Trim();
|
||||
//}
|
||||
|
||||
SearchDbProd(this.ucSplitPage1.CurrentPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,6 +186,9 @@
|
||||
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSaleCountNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="col_notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
Reference in new issue
Block a user