用户产品数据库

用户1688采集
This commit is contained in:
wule committed 2026-05-30 01:06:32 +08:00
1 parent 025b33b478
commit c3ecb84a1e
25 files changed
+2050 -975

No files matched your search

+52 -50
View File
@@ -32,14 +32,14 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
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();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.txtShippingPriceTimes = new System.Windows.Forms.TextBox();
@@ -96,6 +96,7 @@ namespace TemuKJD.WXForms.ProductForms
this.label22 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.佣金上货 = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.txtCommissionChangeValue = new System.Windows.Forms.TextBox();
this.label30 = new System.Windows.Forms.Label();
this.cmbCommissionAddOrReduce = new System.Windows.Forms.ComboBox();
@@ -209,7 +210,6 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.label31 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -1054,6 +1054,18 @@ namespace TemuKJD.WXForms.ProductForms
this.佣金上货.Text = "佣金上货";
this.佣金上货.UseVisualStyleBackColor = true;
//
// label31
//
this.label31.AutoSize = true;
this.label31.Cursor = System.Windows.Forms.Cursors.Hand;
this.label31.ForeColor = System.Drawing.SystemColors.HotTrack;
this.label31.Location = new System.Drawing.Point(180, 19);
this.label31.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(212, 17);
this.label31.TabIndex = 862;
this.label31.Text = "注:佣金上货前请先登录微信上货助手";
//
// txtCommissionChangeValue
//
this.txtCommissionChangeValue.Font = new System.Drawing.Font("微软雅黑", 9F);
@@ -1236,6 +1248,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbHot.TabIndex = 837;
this.cmbHot.Text = "普通商品";
this.cmbHot.Visible = false;
this.cmbHot.SelectedIndexChanged += new System.EventHandler(this.cmbHot_TextChanged);
this.cmbHot.TextChanged += new System.EventHandler(this.cmbHot_TextChanged);
//
// btnProdDb
@@ -1349,7 +1362,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbSourceType.Text = "厂商直采";
this.cmbSourceType.Visible = false;
this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged);
this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_TextChanged);
this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged);
//
// cmbCateFilter3
//
@@ -1384,6 +1397,7 @@ namespace TemuKJD.WXForms.ProductForms
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);
//
// txtIdFilter
//
@@ -2063,19 +2077,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
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)))));
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
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;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -2307,19 +2321,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
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)))));
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
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;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -2381,8 +2395,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -2462,8 +2476,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductName
//
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
@@ -2471,8 +2485,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colProductCat
//
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7;
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
@@ -2527,8 +2541,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
@@ -2621,18 +2635,6 @@ namespace TemuKJD.WXForms.ProductForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// label31
//
this.label31.AutoSize = true;
this.label31.Cursor = System.Windows.Forms.Cursors.Hand;
this.label31.ForeColor = System.Drawing.SystemColors.HotTrack;
this.label31.Location = new System.Drawing.Point(180, 19);
this.label31.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(212, 17);
this.label31.TabIndex = 862;
this.label31.Text = "注:佣金上货前请先登录微信上货助手";
//
// WXDBProdUploadForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -329,6 +329,12 @@ namespace TemuKJD.WXForms.ProductForms
cmbGroupFilter.Visible = true;
}
}
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
cmbSourceType.Items.Insert(1, "------");
cmbSourceType.Items.Insert(1, "1688商品");
cmbSourceType.Items.Insert(1, "多多商品");
}
//#endif
if (BaseClass.SaLevel == 1)
{
@@ -490,14 +496,24 @@ namespace TemuKJD.WXForms.ProductForms
private void RefreshDbProdGroupAndCate()
{
string sourceType = cmbSourceType.Text.Trim();
Task.Run(() =>
{
// 同时刷新下商品分组
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
//string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
//if (BaseClass.GroupId != 3)
// addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
//PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", "admin");
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
Invoke(new Action(() =>
{
cmbGroupFilter.Items.Remove("------");
cmbGroupFilter.Items.Remove("我的商品");
cmbGroupFilter.Items.Insert(1, "------");
cmbGroupFilter.Items.Insert(1, "我的商品");
}));
}
GetPddProductCate();
Invoke(new Action(() =>
{
@@ -2513,7 +2529,8 @@ namespace TemuKJD.WXForms.ProductForms
}
}
else if (dbProd.product_get_type_text == "1688厂家")
// 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址
else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin")
{
var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
var dataAfterSale = Work.UserLogin.GetSignaturex();
@@ -4652,17 +4669,27 @@ namespace TemuKJD.WXForms.ProductForms
data += "&in_ext_codes=" + txtExtCodeFilter.Text;
data += "&in_spu_ids=" + txtIdFilter.Text;
data += "&in_groups=" + cmbGroupFilter.Text;
string serach_group = cmbGroupFilter.Text.Trim();
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
if (BaseClass.GroupId == 3)
serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.UserName);
else
serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.ParentUserName);
}
data += "&in_groups=" + serach_group;
data += "&product_name=" + txtSearchGoodsName.Text.Trim();
// 同时刷新下商品分组
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
data += "&add_user_name=" + addUserName;
// 采集来源判断
data += "&product_get_type=" + cmbSourceType.Text.Trim();
data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("多多商品","机会商品").Replace("1688商品", "1688厂家,1688外部数据");
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text);
else
@@ -5118,6 +5145,14 @@ namespace TemuKJD.WXForms.ProductForms
}
private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品")
{
cmbSourceType.Text = "";
}
}
private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
@@ -5125,7 +5160,6 @@ namespace TemuKJD.WXForms.ProductForms
else
fillWxCate();
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家")
{
cmbJstInitSet.Text = "";
@@ -5139,12 +5173,27 @@ namespace TemuKJD.WXForms.ProductForms
Task.Run(() =>
{
// 同时刷新下商品分组
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
var mainUserName = BaseClass.GroupId == 3 ? BaseClass.UserName : BaseClass.ParentUserName;
if (cmbGroupFilter.Items.Cast<object>().Any(it => it.ParseToString() == "用户" + mainUserName))
{
Invoke(new Action(() =>
{
cmbGroupFilter.Items.Remove("用户" + mainUserName);
cmbGroupFilter.Items.Remove("------");
cmbGroupFilter.Items.Remove("我的商品");
cmbGroupFilter.Items.Insert(1, "------");
cmbGroupFilter.Items.Insert(1, "我的商品");
}));
}
}
});
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) || cmbSourceType.Text == "我的商品")
{
lblGroupFilter.Visible = true;
cmbGroupFilter.Visible = true;
@@ -5160,11 +5209,6 @@ namespace TemuKJD.WXForms.ProductForms
}
}
private void cmbSourceType_TextChanged(object sender, EventArgs e)
{
}
private void cmbCateFilter1_SelectedIndexChanged(object sender, EventArgs e)
{
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采")
@@ -5463,6 +5507,8 @@ namespace TemuKJD.WXForms.ProductForms
private void btnProdDb_Click(object sender, EventArgs e)
{
WXUserProdListForm.Instance.lstTemuDBProductSelect = this.lstTemuDBProductSelect;
WXUserProdListForm.Instance.cmbSourceType.Items.Clear();
WXUserProdListForm.Instance.cmbSourceType.Items.AddRange(this.cmbSourceType.Items.Cast<Object>().ToArray());
WXUserProdListForm.Instance.SaveComplete -= dbProdList_SaveComplete;
WXUserProdListForm.Instance.SaveComplete += dbProdList_SaveComplete;
WXUserProdListForm.Instance.Show();
@@ -5482,8 +5528,8 @@ namespace TemuKJD.WXForms.ProductForms
{
if (cmbHot.Text == "爆款数据")
{
cmbSourceType.Text = "";
cmbJstInitSet.Text = "未设置";
cmbSourceType.Text = "微信店采";
cmbJstInitSet.Text = "";
}
else
{
+40 -32
View File
@@ -29,16 +29,18 @@
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("选品上传");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("商品预售/下架");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("清理无流量");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("爆单神器");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("活动报名");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("达人广场");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("商品同步");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("订单管理");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("订单代发管理");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("机会商品采集");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("我的商品库");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("商品预售/下架");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("清理无流量");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("爆单神器");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("活动报名");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("达人广场");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("商品同步");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("订单管理");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("订单代发管理");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("多多商品采集");
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("1688商品采集");
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
@@ -48,7 +50,9 @@
treeNode7,
treeNode8,
treeNode9,
treeNode10});
treeNode10,
treeNode11,
treeNode12});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -141,28 +145,32 @@
this.tv.Name = "tv";
treeNode1.Name = "选品上传";
treeNode1.Text = "选品上传";
treeNode2.Name = "商品预售/下架";
treeNode2.Text = "商品预售/下架";
treeNode3.Name = "清理无流量";
treeNode3.Text = "清理无流量";
treeNode4.Name = "爆单神器";
treeNode4.Text = "爆单神器";
treeNode5.Name = "活动报名";
treeNode5.Text = "活动报名";
treeNode6.Name = "达人广场";
treeNode6.Text = "达人广场";
treeNode7.Name = "商品同步";
treeNode7.Text = "商品同步";
treeNode8.Name = "订单管理";
treeNode8.Text = "订单管理";
treeNode9.Name = "订单代发管理";
treeNode9.Text = "订单代发管理";
treeNode10.Name = "机会商品采集";
treeNode10.Text = "机会商品采集";
treeNode11.Name = "商品管理";
treeNode11.Text = "商品管理";
treeNode2.Name = "我的商品库";
treeNode2.Text = "我的商品库";
treeNode3.Name = "商品预售/下架";
treeNode3.Text = "商品预售/下架";
treeNode4.Name = "清理无流量";
treeNode4.Text = "清理无流量";
treeNode5.Name = "爆单神器";
treeNode5.Text = "爆单神器";
treeNode6.Name = "活动报名";
treeNode6.Text = "活动报名";
treeNode7.Name = "达人广场";
treeNode7.Text = "达人广场";
treeNode8.Name = "商品同步";
treeNode8.Text = "商品同步";
treeNode9.Name = "订单管理";
treeNode9.Text = "订单管理";
treeNode10.Name = "订单代发管理";
treeNode10.Text = "订单代发管理";
treeNode11.Name = "多多商品采集";
treeNode11.Text = "多多商品采集";
treeNode12.Name = "1688商品采集";
treeNode12.Text = "1688商品采集";
treeNode13.Name = "商品管理";
treeNode13.Text = "商品管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode11});
treeNode13});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 521);
this.tv.TabIndex = 1;
+20 -6
View File
@@ -12,6 +12,7 @@ using TemuKJD.BaseForms;
using AllBase;
using TemuKJD.PDDForms.ProductSelectForms;
using TemuKJD.WXForms.OrderForms;
using TemuKJD.ToolForms;
namespace TemuKJD.WXForms.ProductForms
{
@@ -19,15 +20,17 @@ namespace TemuKJD.WXForms.ProductForms
{
public static WXProductForm instance;
public Lazy<WXDBProdUploadForm> userSelectDbProductForm = new Lazy<WXDBProdUploadForm>();
public Lazy<WXUserCollectAuthProdListForm> userCollectAuthProdListForm = new Lazy<WXUserCollectAuthProdListForm>();
public Lazy<WXProdPreSaleForm> wxProdPreSaleForm = new Lazy<WXProdPreSaleForm>();
public Lazy<WXProdClearNoVisitForm> wxProdClearNoVisitForm = new Lazy<WXProdClearNoVisitForm>();
public Lazy<WXProdCouponOrderBoomForm> wxProdCouponForm = new Lazy<WXProdCouponOrderBoomForm>();
public Lazy<WXProdSyncForm> wxProdSyncForm = new Lazy<WXProdSyncForm>();
public Lazy<WXFinderSquareForm> wxFinderSquareForm = new Lazy<WXFinderSquareForm>();
public Lazy<WXActivity618Form> wxActivityForm = new Lazy<WXActivity618Form>();
public Lazy<PDDGetChanceProdForm> getChanceProdForm = new Lazy<PDDGetChanceProdForm>();
public Lazy<WXOrderConsignmentForm> orderConsignmentForm = new Lazy<WXOrderConsignmentForm>();
public Lazy<WXOrderListForm> orderListForm = new Lazy<WXOrderListForm>();
public Lazy<WXOrderConsignmentForm> orderConsignmentForm = new Lazy<WXOrderConsignmentForm>();
public Lazy<PDDGetChanceProdForm> getChanceProdForm = new Lazy<PDDGetChanceProdForm>();
public Lazy<Get1688ProductForm> get1688ProdForm = new Lazy<Get1688ProductForm>();
public WXProductForm()
{
@@ -37,10 +40,14 @@ namespace TemuKJD.WXForms.ProductForms
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
List<string> hideName = new List<string>() { "清理无流量1", "机会商品采集", "商品列表", "爆单神器1", "商品同步1" };
List<string> hideName = new List<string>() {"我的商品库", "1688商品采集", "多多商品采集", "商品列表", "爆单神器1", "商品同步1", "清理无流量1" };
if (BaseClass.UserAuthority.Contains("机会商品采集"))
hideName.Remove("机会商品采集");
if (BaseClass.UserAuthority.Contains("商品采集"))
{
hideName.Remove("1688商品采集");
hideName.Remove("多多商品采集");
hideName.Remove("我的商品库");
}
if (BaseClass.GroupId == 3)
{
//hideName.Remove("设置进货价");
@@ -81,6 +88,9 @@ namespace TemuKJD.WXForms.ProductForms
case "选品上传":
SetForm(userSelectDbProductForm.Value);
break;
case "我的商品库":
SetForm(userCollectAuthProdListForm.Value);
break;
case "商品预售/下架":
SetForm(wxProdPreSaleForm.Value);
break;
@@ -105,10 +115,14 @@ namespace TemuKJD.WXForms.ProductForms
case "订单代发管理":
SetForm(orderConsignmentForm.Value);
break;
case "机会商品采集":
case "多多商品采集":
getChanceProdForm.Value.IsAuthorityUser = true;
SetForm(getChanceProdForm.Value);
break;
case "1688商品采集":
get1688ProdForm.Value.IsAuthorityUser = true;
SetForm(get1688ProdForm.Value);
break;
}
}));
}).Start();
File diff suppressed because it is too large. Load diff
@@ -51,29 +51,30 @@ namespace TemuKJD.WXForms.ProductForms
private void ProductListForm_Load(object sender, EventArgs e)
{
chkCatBoundLessThan.Visible = false;
chkCatBoundMoreThan.Visible = false;
tableLayoutPanel1.SetColumn(lblSourceType, 2);
tableLayoutPanel1.SetColumn(cmbSourceType, 3);
//chkCatBoundLessThan.Visible = false;
//chkCatBoundMoreThan.Visible = false;
//tableLayoutPanel1.SetColumn(lblSourceType, 2);
//tableLayoutPanel1.SetColumn(cmbSourceType, 3);
dgvDbProduct.Columns["colMainImg"].Width = 80;
if (BaseClass.MainPath == "29pdd")
{
chkCatBoundLessThan.Visible = false;
chkCatBoundMoreThan.Visible = false;
lblWxSafe.Visible = false;
cmbWxSafe.Visible = false;
tableLayoutPanel1.SetColumn(lblSourceType, 0);
tableLayoutPanel1.SetColumn(cmbSourceType, 1);
//tableLayoutPanel1.SetColumn(lblSourceType, 0);
//tableLayoutPanel1.SetColumn(cmbSourceType, 1);
dgvDbProduct.Columns["colCatBound"].Visible = false;
dgvDbProduct.Columns["colWxSafe"].Visible = false;
dgvDbProduct.Columns["colMainImg"].FillWeight = 25;
//dgvDbProduct.Columns["colMainImg"].FillWeight = 25;
}
Task.Run(() =>
{
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", BaseClass.UserName);
GetPddProductCate();
});
//Task.Run(() =>
//{
// PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", BaseClass.UserName);
// GetPddProductCate();
//});
fillCate();
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
{
this.dgvDbProduct.Columns["colPriceText"].Visible = true;
@@ -118,8 +119,8 @@ namespace TemuKJD.WXForms.ProductForms
{
lblSourceType.Visible = true;
cmbSourceType.Visible = true;
lblGroup.Visible = true;
cmbGroupFilter.Visible = true;
//lblGroup.Visible = true;
//cmbGroupFilter.Visible = true;
tableLayoutPanel1.ColumnStyles[9].SizeType = SizeType.Percent;
tableLayoutPanel1.ColumnStyles[9].Width = 20;
}
@@ -174,7 +175,7 @@ namespace TemuKJD.WXForms.ProductForms
}
foreach (var prod in lstTemuDbProduct)
{
string catName = prod.cat_name ?? prod.cat_id;
string catName = (prod.cat_name ?? prod.cat_id) + "(未识别)";
if (prod.wx_cat_leaf != null)
{
var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_leaf.ParseToString())?.name;
@@ -230,7 +231,7 @@ namespace TemuKJD.WXForms.ProductForms
(prod.spu_id).Trim(),
prod.skc_id,
prod.main_cat_name ?? prod.main_cat_id,
catName.Split('>').LastOrDefault()?.Trim(),
catName, //catName.Split('>').LastOrDefault()?.Trim(),
GlobalConfig.WxCatBoundList.FirstOrDefault(cb => cb.leaf_id == prod.wx_cat_leaf)?.cat_bound,
prod.ext_code,
(prod.secret_spu_id + " " + prod.real_spu_id + " " + prod.real_coid).Trim(),
@@ -245,7 +246,8 @@ namespace TemuKJD.WXForms.ProductForms
prod.head_words,
prod.end_words,
prod.fission_words,
prod.product_get_type_text == "厂商直采" ? (prod.product_get_type_text + " " + prod.skc_id).Trim() : prod.product_get_type_text,
prod.product_get_type_text == "厂商直采" ? (prod.product_get_type_text + " " + prod.skc_id).Trim() :
prod.product_get_type_text.Replace("1688厂家", "1688商品").Replace("1688外部数据", "1688商品").Replace("机会商品", "多多商品"),
prod.special_prod_type,
prod.wx_safe_status,
prod.add_time.ToString("yy-MM-dd HH:mm"),
@@ -338,7 +340,7 @@ namespace TemuKJD.WXForms.ProductForms
"&search_skc=" + txtSKC.Text.Trim() +
"&search_notes=" + txtNotes.Text.Trim() +
"&search_ext_code=" + txtExtCode.Text.Trim() +
"&search_group=" + cmbGroupFilter.Text.Trim() +
//"&search_group=" + cmbGroupFilter.Text.Trim() +
"&search_prod_name=" + txtProdName.Text.Trim() +
"&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验").Replace("违规商品", "");
data += "&add_user_name=" + BaseClass.UserName;
@@ -357,12 +359,12 @@ namespace TemuKJD.WXForms.ProductForms
// data += "&end_time=" + dtpEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
//}
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
{
data += "&search_cat1=" + (cmbCat1.Text.Trim() == "全部" ? "" : cmbCat1.Text.Trim());
data += "&search_cat=" + (cmbCat2.Text.Trim() == "全部" ? "" : cmbCat2.Text.Trim());
}
else
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
//{
// data += "&search_cat1=" + (cmbCat1.Text.Trim() == "全部" ? "" : cmbCat1.Text.Trim());
// data += "&search_cat=" + (cmbCat2.Text.Trim() == "全部" ? "" : cmbCat2.Text.Trim());
//}
//else
{
var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (/*cmbCat1.Text.Trim() == cmbCat1.DefaultText ||*/ (";" + cmbCat1.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList();
var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList();
@@ -418,10 +420,15 @@ namespace TemuKJD.WXForms.ProductForms
data += "&send_to_out_server=2";
}
if (cmbSourceType.Text.Trim() != "全部")
if (cmbSourceType.Text.Trim() == "多多商品")
{
data += "&product_get_type=" + cmbSourceType.Text.Trim();
data += "&product_get_type=机会商品";
}
else if (cmbSourceType.Text.Trim() == "1688商品")
{
data += "&product_get_type=1688厂家,1688外部数据";
}
if (shop != null && !string.IsNullOrEmpty(shop.ShopId))
{
data += "&get_select_count=true";
@@ -437,6 +444,7 @@ namespace TemuKJD.WXForms.ProductForms
}
if (chkWXComplateProd.Checked)
data += "&has_wx_format=1";
data += "&is_not_count=true";
}));
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -502,7 +510,7 @@ namespace TemuKJD.WXForms.ProductForms
this.txtNotes.Text = "";
this.cmbGroupFilter.Text = "";
this.cmbSort.Text = "入库时间";
this.cmbSourceType.Text = "厂商直采";
this.cmbSourceType.Text = "";
this.cmbWxSafe.Text = "安全+未校验";
this.cmbWxCat.Text = "";
this.cmbExportToOutServer.Text = "";
@@ -526,8 +534,8 @@ namespace TemuKJD.WXForms.ProductForms
private void cmbCat1_MultiSelectChanged(object sender, EventArgs e)
{
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
return;
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
// return;
cmbCat2.Text = "";
cmbCat2.Items.Clear();
@@ -544,8 +552,8 @@ namespace TemuKJD.WXForms.ProductForms
private void cmbCat2_MultiSelectChanged(object sender, EventArgs e)
{
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
return;
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
// return;
cmbCat3.Text = "";
cmbCat3.Items.Clear();
@@ -585,23 +593,17 @@ namespace TemuKJD.WXForms.ProductForms
DeleteProduct(dbId);
break;
case "详情":
case "编辑备注":
case "编辑/详情":
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
//if (BaseClass.MainPath != "29pdd")
//{
// editForm.pnlSkuOption.Visible = false;
// editForm.txtProductName.ReadOnly = true;
// editForm.txtExtCode.ReadOnly = true;
// editForm.lblSkcId.Text = "仓库编码";
//}
//editForm.ShowDialog();
//dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
//dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
//dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words;
//dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words;
//dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
//dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name;
//dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url;
PDDDBProdEditNotesForm editForm = new PDDDBProdEditNotesForm(dbProduct);
editForm.ShowDialog();
dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words;
dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words;
dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name;
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", ""));
@@ -700,10 +702,17 @@ namespace TemuKJD.WXForms.ProductForms
this.pbLoading.Visible = true;
this.statusBar.pgbTaskProgress.Maximum = lstProdId.Count;
this.statusBar.UpdateProgressBar(0);
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
var cancellationToken = cancellationTokenSource.Token;
foreach (var prod in prodList)
{
if (cancellationToken.IsCancellationRequested)
break;
DeleteProduct(prod.id.ToString(), false);
Invoke(new Action(() =>
@@ -716,9 +725,12 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
pbLoading.Visible = false;
BaseMsgForm.ShowInfo("删除完成!");
if (!cancellationToken.IsCancellationRequested)
BaseMsgForm.ShowInfo("删除完成!");
else
BaseMsgForm.ShowInfo("删除终止!");
}));
});
}, cancellationTokenSource.Token);
}
void SelectProduct(KJDDBProduct[] prodList)
@@ -798,17 +810,16 @@ namespace TemuKJD.WXForms.ProductForms
{
fillCate();
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采")
{
cmbExportToOutServer.Text = "";
cmbWxCat.Text = "";
}
else
{
cmbExportToOutServer.Text = "是";
cmbWxCat.Text = "是";
}
//if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采")
//{
// cmbExportToOutServer.Text = "";
// cmbWxCat.Text = "";
//}
//else
//{
// cmbExportToOutServer.Text = "是";
// cmbWxCat.Text = "是";
//}
}
/// <summary>
@@ -838,12 +849,12 @@ namespace TemuKJD.WXForms.ProductForms
public void fillCate()
{
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) &&
cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
{
fillPddCate();
}
else
//if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) &&
// cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
//{
// fillPddCate();
//}
//else
{
fillWxCate();
}
@@ -881,12 +892,12 @@ namespace TemuKJD.WXForms.ProductForms
private void chkCatBoundMoreThan_CheckedChanged(object sender, EventArgs e)
{
txtCatBoundMoreThan.Visible = chkCatBoundMoreThan.Checked;
//txtCatBoundMoreThan.Visible = chkCatBoundMoreThan.Checked;
}
private void chkCatBoundLessThan_CheckedChanged(object sender, EventArgs e)
{
txtCatBoundLessThan.Visible = chkCatBoundLessThan.Checked;
//txtCatBoundLessThan.Visible = chkCatBoundLessThan.Checked;
}
private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e)
@@ -895,9 +906,70 @@ namespace TemuKJD.WXForms.ProductForms
e.Cancel = true;
}
private void chkNotRelation_CheckedChanged(object sender, EventArgs e)
private void btnGetProdWxCate_Click(object sender, EventArgs e)
{
var lstProdId = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["col_spu_id"]?.Value.ToString().Split(' ').FirstOrDefault()).ToList();
var prodList = this.lstTemuDbProduct.Where(p => lstProdId.Contains(p.spu_id)).ToList();
if (prodList.Count == 0)
{
BaseMsgForm.ShowInfo("请选择商品");
return;
}
this.statusBar.pgbTaskProgress.Maximum = prodList.Count;
this.statusBar.UpdateProgressBar(0);
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
this.pbLoading.Visible = true;
Task.Run(() =>
{
var cancellationToken = cancellationTokenSource.Token;
try
{
GetProdWxCat(prodList, cancellationToken);
}
catch (Exception ex)
{
BaseMsgForm.ShowError(ex.Message);
}
// 刷新结果
SearchDbProd(this.ucSplitPage1.CurrentPage);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
if (!cancellationToken.IsCancellationRequested)
BaseMsgForm.ShowInfo("识别微信类目完成!");
else
BaseMsgForm.ShowInfo("识别微信类目终止!");
}));
}, cancellationTokenSource.Token);
}
void GetProdWxCat(List<KJDDBProduct> dbProdLst, CancellationToken cancellationToken)
{
foreach (var prod in dbProdLst)
{
if (cancellationToken.IsCancellationRequested)
break;
Invoke(new Action(() =>
{
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
this.statusBar.lblTaskStatus.Text = "正在识别微信类目 " + this.statusBar.pgbTaskProgress.Value + "/" + dbProdLst.Count;
}));
var row = dgvDbProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["col_spu_id"].Value.ParseToString() == prod.spu_id);
if (row == null || !row.Cells["col_cat_name"].Value.ParseToString().Contains("未识别"))
{
Thread.Sleep(500);
continue;
}
PDDDBProdListForm.GetProdWxCat(prod, row);
Thread.Sleep(1000);
}
}
}
}
+44 -43
View File
@@ -330,16 +330,16 @@ namespace TemuKJD.WXForms.ProductForms
// txtViewUvMin
//
this.txtViewUvMin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtViewUvMin.Location = new System.Drawing.Point(1107, 41);
this.txtViewUvMin.Location = new System.Drawing.Point(1123, 41);
this.txtViewUvMin.Name = "txtViewUvMin";
this.txtViewUvMin.Size = new System.Drawing.Size(83, 23);
this.txtViewUvMin.Size = new System.Drawing.Size(67, 23);
this.txtViewUvMin.TabIndex = 882;
this.txtViewUvMin.Visible = false;
//
// chkViewUvMin
//
this.chkViewUvMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkViewUvMin.Location = new System.Drawing.Point(1053, 42);
this.chkViewUvMin.Location = new System.Drawing.Point(1069, 42);
this.chkViewUvMin.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.chkViewUvMin.Name = "chkViewUvMin";
this.chkViewUvMin.Size = new System.Drawing.Size(48, 21);
@@ -356,10 +356,10 @@ namespace TemuKJD.WXForms.ProductForms
"",
"爆款数据",
"普通商品"});
this.cmbHot.Location = new System.Drawing.Point(901, 7);
this.cmbHot.Location = new System.Drawing.Point(914, 7);
this.cmbHot.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbHot.Name = "cmbHot";
this.cmbHot.Size = new System.Drawing.Size(143, 25);
this.cmbHot.Size = new System.Drawing.Size(146, 25);
this.cmbHot.TabIndex = 882;
this.cmbHot.Text = "普通商品";
this.cmbHot.Visible = false;
@@ -369,7 +369,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.lblHot.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblHot.AutoSize = true;
this.lblHot.Location = new System.Drawing.Point(857, 9);
this.lblHot.Location = new System.Drawing.Point(870, 9);
this.lblHot.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblHot.Name = "lblHot";
this.lblHot.Size = new System.Drawing.Size(44, 17);
@@ -384,7 +384,7 @@ namespace TemuKJD.WXForms.ProductForms
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(1050, 5);
this.btnSearch.Location = new System.Drawing.Point(1066, 5);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(51, 25);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -408,9 +408,9 @@ namespace TemuKJD.WXForms.ProductForms
this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control;
this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty;
this.btnEmpty.Location = new System.Drawing.Point(1107, 5);
this.btnEmpty.Location = new System.Drawing.Point(1123, 5);
this.btnEmpty.Name = "btnEmpty";
this.btnEmpty.Size = new System.Drawing.Size(83, 25);
this.btnEmpty.Size = new System.Drawing.Size(67, 25);
this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
@@ -435,10 +435,10 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat3.DropDownWidth = 1;
this.cmbCat3.FormattingEnabled = true;
this.cmbCat3.IntegralHeight = false;
this.cmbCat3.Location = new System.Drawing.Point(708, 7);
this.cmbCat3.Location = new System.Drawing.Point(718, 7);
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat3.Name = "cmbCat3";
this.cmbCat3.Size = new System.Drawing.Size(143, 25);
this.cmbCat3.Size = new System.Drawing.Size(146, 25);
this.cmbCat3.TabIndex = 811;
this.cmbCat3.Text = "全部";
this.cmbCat3.SelectedIndexChanged += new System.EventHandler(this.cmbCat3_SelectedIndexChanged);
@@ -448,7 +448,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(657, 9);
this.label17.Location = new System.Drawing.Point(667, 9);
this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(51, 17);
@@ -463,10 +463,10 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat2.DropDownWidth = 1;
this.cmbCat2.FormattingEnabled = true;
this.cmbCat2.IntegralHeight = false;
this.cmbCat2.Location = new System.Drawing.Point(509, 7);
this.cmbCat2.Location = new System.Drawing.Point(515, 7);
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat2.Name = "cmbCat2";
this.cmbCat2.Size = new System.Drawing.Size(142, 25);
this.cmbCat2.Size = new System.Drawing.Size(146, 25);
this.cmbCat2.TabIndex = 804;
this.cmbCat2.Text = "全部";
this.cmbCat2.SelectedIndexChanged += new System.EventHandler(this.cmbCat2_SelectedIndexChanged);
@@ -476,7 +476,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(458, 9);
this.label14.Location = new System.Drawing.Point(464, 9);
this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(51, 17);
@@ -491,10 +491,10 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbCat1.DropDownWidth = 1;
this.cmbCat1.FormattingEnabled = true;
this.cmbCat1.IntegralHeight = false;
this.cmbCat1.Location = new System.Drawing.Point(290, 5);
this.cmbCat1.Location = new System.Drawing.Point(293, 7);
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbCat1.Name = "cmbCat1";
this.cmbCat1.Size = new System.Drawing.Size(143, 25);
this.cmbCat1.Size = new System.Drawing.Size(146, 25);
this.cmbCat1.TabIndex = 805;
this.cmbCat1.Text = "全部";
this.cmbCat1.SelectedIndexChanged += new System.EventHandler(this.cmbCat1_SelectedIndexChanged);
@@ -504,7 +504,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(239, 9);
this.label2.Location = new System.Drawing.Point(242, 9);
this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 17);
@@ -517,7 +517,7 @@ namespace TemuKJD.WXForms.ProductForms
this.txtProdName.Location = new System.Drawing.Point(71, 6);
this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtProdName.Name = "txtProdName";
this.txtProdName.Size = new System.Drawing.Size(143, 23);
this.txtProdName.Size = new System.Drawing.Size(146, 23);
this.txtProdName.TabIndex = 427;
//
// label3
@@ -551,17 +551,17 @@ namespace TemuKJD.WXForms.ProductForms
"安全+未校验",
"安全商品",
"未校验"});
this.cmbWxSafe.Location = new System.Drawing.Point(71, 40);
this.cmbWxSafe.Location = new System.Drawing.Point(71, 42);
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(143, 25);
this.cmbWxSafe.Size = new System.Drawing.Size(146, 25);
this.cmbWxSafe.TabIndex = 676;
this.cmbWxSafe.Text = "安全+未校验";
//
// chkCatBoundMoreThan
//
this.chkCatBoundMoreThan.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkCatBoundMoreThan.Location = new System.Drawing.Point(223, 42);
this.chkCatBoundMoreThan.Location = new System.Drawing.Point(226, 42);
this.chkCatBoundMoreThan.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.chkCatBoundMoreThan.Name = "chkCatBoundMoreThan";
this.chkCatBoundMoreThan.Size = new System.Drawing.Size(64, 21);
@@ -573,10 +573,10 @@ namespace TemuKJD.WXForms.ProductForms
// txtCatBoundMoreThan
//
this.txtCatBoundMoreThan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtCatBoundMoreThan.Location = new System.Drawing.Point(290, 41);
this.txtCatBoundMoreThan.Location = new System.Drawing.Point(293, 41);
this.txtCatBoundMoreThan.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtCatBoundMoreThan.Name = "txtCatBoundMoreThan";
this.txtCatBoundMoreThan.Size = new System.Drawing.Size(143, 23);
this.txtCatBoundMoreThan.Size = new System.Drawing.Size(146, 23);
this.txtCatBoundMoreThan.TabIndex = 882;
this.txtCatBoundMoreThan.Text = "1000";
this.txtCatBoundMoreThan.Visible = false;
@@ -584,7 +584,7 @@ namespace TemuKJD.WXForms.ProductForms
// chkCatBoundLessThan
//
this.chkCatBoundLessThan.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkCatBoundLessThan.Location = new System.Drawing.Point(442, 42);
this.chkCatBoundLessThan.Location = new System.Drawing.Point(448, 42);
this.chkCatBoundLessThan.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.chkCatBoundLessThan.Name = "chkCatBoundLessThan";
this.chkCatBoundLessThan.Size = new System.Drawing.Size(64, 21);
@@ -596,10 +596,10 @@ namespace TemuKJD.WXForms.ProductForms
// txtCatBoundLessThan
//
this.txtCatBoundLessThan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtCatBoundLessThan.Location = new System.Drawing.Point(509, 41);
this.txtCatBoundLessThan.Location = new System.Drawing.Point(515, 41);
this.txtCatBoundLessThan.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtCatBoundLessThan.Name = "txtCatBoundLessThan";
this.txtCatBoundLessThan.Size = new System.Drawing.Size(142, 23);
this.txtCatBoundLessThan.Size = new System.Drawing.Size(146, 23);
this.txtCatBoundLessThan.TabIndex = 883;
this.txtCatBoundLessThan.Text = "100000";
this.txtCatBoundLessThan.Visible = false;
@@ -608,18 +608,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroupFilter.FormattingEnabled = true;
this.cmbGroupFilter.Location = new System.Drawing.Point(901, 42);
this.cmbGroupFilter.Location = new System.Drawing.Point(914, 42);
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbGroupFilter.Name = "cmbGroupFilter";
this.cmbGroupFilter.Size = new System.Drawing.Size(143, 25);
this.cmbGroupFilter.Size = new System.Drawing.Size(146, 25);
this.cmbGroupFilter.TabIndex = 653;
this.cmbGroupFilter.Visible = false;
this.cmbGroupFilter.SelectedIndexChanged += new System.EventHandler(this.cmbGroupFilter_SelectedIndexChanged);
//
// lblSourceType
//
this.lblSourceType.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblSourceType.AutoSize = true;
this.lblSourceType.Location = new System.Drawing.Point(664, 44);
this.lblSourceType.Location = new System.Drawing.Point(674, 44);
this.lblSourceType.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblSourceType.Name = "lblSourceType";
this.lblSourceType.Size = new System.Drawing.Size(44, 17);
@@ -631,7 +632,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblGroup.AutoSize = true;
this.lblGroup.Location = new System.Drawing.Point(857, 44);
this.lblGroup.Location = new System.Drawing.Point(870, 44);
this.lblGroup.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblGroup.Name = "lblGroup";
this.lblGroup.Size = new System.Drawing.Size(44, 17);
@@ -654,10 +655,10 @@ namespace TemuKJD.WXForms.ProductForms
"机会商品",
"以图搜品",
"外部数据"});
this.cmbSourceType.Location = new System.Drawing.Point(708, 42);
this.cmbSourceType.Location = new System.Drawing.Point(718, 42);
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSourceType.Name = "cmbSourceType";
this.cmbSourceType.Size = new System.Drawing.Size(143, 25);
this.cmbSourceType.Size = new System.Drawing.Size(146, 25);
this.cmbSourceType.TabIndex = 654;
this.cmbSourceType.Text = "厂商直采";
this.cmbSourceType.Visible = false;
@@ -726,7 +727,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStopStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopStop.Location = new System.Drawing.Point(88, 383);
this.btnStopStop.Location = new System.Drawing.Point(88, 300);
this.btnStopStop.Name = "btnStopStop";
this.btnStopStop.Size = new System.Drawing.Size(76, 25);
this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1013,7 +1014,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label16.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(19, 270);
this.label16.Location = new System.Drawing.Point(19, 207);
this.label16.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(69, 17);
@@ -1034,7 +1035,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtSKC
//
this.txtSKC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtSKC.Location = new System.Drawing.Point(88, 267);
this.txtSKC.Location = new System.Drawing.Point(88, 204);
this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtSKC.Name = "txtSKC";
this.txtSKC.Size = new System.Drawing.Size(133, 23);
@@ -1049,7 +1050,7 @@ namespace TemuKJD.WXForms.ProductForms
"",
"是",
"否"});
this.cmbWxCat.Location = new System.Drawing.Point(88, 236);
this.cmbWxCat.Location = new System.Drawing.Point(342, 81);
this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbWxCat.Name = "cmbWxCat";
this.cmbWxCat.Size = new System.Drawing.Size(133, 25);
@@ -1061,7 +1062,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label13.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(20, 209);
this.label13.Location = new System.Drawing.Point(274, 54);
this.label13.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(68, 17);
@@ -1073,7 +1074,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label12.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(20, 240);
this.label12.Location = new System.Drawing.Point(274, 85);
this.label12.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(68, 17);
@@ -1116,7 +1117,7 @@ namespace TemuKJD.WXForms.ProductForms
// chkWXComplateProd
//
this.chkWXComplateProd.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkWXComplateProd.Location = new System.Drawing.Point(88, 356);
this.chkWXComplateProd.Location = new System.Drawing.Point(88, 273);
this.chkWXComplateProd.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.chkWXComplateProd.Name = "chkWXComplateProd";
this.chkWXComplateProd.Size = new System.Drawing.Size(87, 21);
@@ -1129,7 +1130,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.lblNotes.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblNotes.AutoSize = true;
this.lblNotes.Location = new System.Drawing.Point(44, 299);
this.lblNotes.Location = new System.Drawing.Point(44, 236);
this.lblNotes.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Size = new System.Drawing.Size(44, 17);
@@ -1152,7 +1153,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtNotes
//
this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtNotes.Location = new System.Drawing.Point(88, 296);
this.txtNotes.Location = new System.Drawing.Point(88, 233);
this.txtNotes.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(133, 23);
@@ -1202,7 +1203,7 @@ namespace TemuKJD.WXForms.ProductForms
"是",
"否",
"导出未拉回"});
this.cmbExportToOutServer.Location = new System.Drawing.Point(88, 205);
this.cmbExportToOutServer.Location = new System.Drawing.Point(342, 50);
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
this.cmbExportToOutServer.Size = new System.Drawing.Size(133, 25);
@@ -68,10 +68,19 @@ namespace TemuKJD.WXForms.ProductForms
Task.Run(() =>
{
// 同时刷新下商品分组
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", addUserName);
//string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
//if (BaseClass.GroupId != 3)
// addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
//PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", addUserName);
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbGroupFilter, }, "", "", "admin");
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
Invoke(new Action(() =>
{
cmbGroupFilter.Items.Insert(1, "------");
cmbGroupFilter.Items.Insert(1, "我的商品");
}));
}
GetPddProductCate();
});
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
@@ -393,6 +402,15 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
string serach_group = cmbGroupFilter.Text.Trim();
if (BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集"))
{
if (BaseClass.GroupId == 3)
serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.UserName);
else
serach_group = cmbGroupFilter.Text.Trim().Replace("我的商品", "用户" + BaseClass.ParentUserName);
}
data = UserLogin.GetSignaturex() +
"&page=" + page +
"&page_size=" + pageSize +
@@ -400,7 +418,7 @@ namespace TemuKJD.WXForms.ProductForms
"&search_skc=" + txtSKC.Text.Trim() +
"&search_notes=" + txtNotes.Text.Trim() +
"&search_ext_code=" + txtExtCode.Text.Trim() +
"&search_group=" + cmbGroupFilter.Text.Trim() +
"&search_group=" + serach_group +
"&search_prod_name=" + txtProdName.Text.Trim() +
"&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验").Replace("违规商品", "");
@@ -410,9 +428,9 @@ namespace TemuKJD.WXForms.ProductForms
}
// 同时刷新下商品分组
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin";
if (BaseClass.GroupId != 3)
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
data += "&add_user_name=" + addUserName;
if (BaseClass.MainPath == "29wx")
@@ -480,7 +498,7 @@ namespace TemuKJD.WXForms.ProductForms
{
data += "&has_wx_cat=" + (cmbWxCat.Text.Trim() == "是").ParseToString().ToLower();
}
if (!string.IsNullOrEmpty(cmbExportToOutServer.Text))
if (!string.IsNullOrEmpty(cmbExportToOutServer.Text) && cmbGroupFilter.Text != "我的商品") // 用户自己的商品没有聚水潭商品,不用考虑是否导出
{
//data += "&has_send_to_out_server=" + (cmbExportToOutServer.Text.Trim() == "是").ParseToString().ToLower();
if (cmbExportToOutServer.Text.Trim() == "是")
@@ -493,7 +511,7 @@ namespace TemuKJD.WXForms.ProductForms
if (cmbSourceType.Text.Trim() != "全部")
{
data += "&product_get_type=" + cmbSourceType.Text.Trim();
data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("多多商品", "机会商品").Replace("1688商品", "1688厂家,1688外部数据");
}
if (shop != null && !string.IsNullOrEmpty(shop.ShopId))
{
@@ -510,6 +528,7 @@ namespace TemuKJD.WXForms.ProductForms
}
if (chkWXComplateProd.Checked)
data += "&has_wx_format=1";
data += "&is_not_count=true";
if (!string.IsNullOrWhiteSpace(cmbHot.Text.Trim()))
data += "&special_prod_type=" + cmbHot.Text.Replace("普通商品", "普通商品,书籍");
@@ -1125,5 +1144,13 @@ namespace TemuKJD.WXForms.ProductForms
cmbWxCat.Text = "是";
}
}
private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品")
{
cmbSourceType.Text = "";
}
}
}
}