商品可以选择类目再进行上传
This commit is contained in:
1 parent
e73359e283
commit
7d5daf27ad
8 files changed
+531
-165
No files matched your search
+28
-28
@@ -86,8 +86,6 @@
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -114,6 +112,8 @@
|
||||
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -264,7 +264,7 @@
|
||||
"全部",
|
||||
"重上",
|
||||
"已买"});
|
||||
this.cmbUserNotes.Location = new System.Drawing.Point(1044, 5);
|
||||
this.cmbUserNotes.Location = new System.Drawing.Point(1044, 8);
|
||||
this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.cmbUserNotes.Name = "cmbUserNotes";
|
||||
this.cmbUserNotes.Size = new System.Drawing.Size(65, 25);
|
||||
@@ -281,7 +281,7 @@
|
||||
"核价成功",
|
||||
"核价成功(重复)",
|
||||
"重复"});
|
||||
this.cmbNotes.Location = new System.Drawing.Point(917, 5);
|
||||
this.cmbNotes.Location = new System.Drawing.Point(917, 8);
|
||||
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(65, 25);
|
||||
@@ -308,7 +308,7 @@
|
||||
"已上传",
|
||||
"草稿箱",
|
||||
"全部"});
|
||||
this.cmbStatus.Location = new System.Drawing.Point(814, 5);
|
||||
this.cmbStatus.Location = new System.Drawing.Point(814, 8);
|
||||
this.cmbStatus.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.cmbStatus.Name = "cmbStatus";
|
||||
this.cmbStatus.Size = new System.Drawing.Size(65, 25);
|
||||
@@ -864,29 +864,6 @@
|
||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1196, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(362, 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(1558, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.HeaderText = "选择";
|
||||
@@ -1100,6 +1077,29 @@
|
||||
this.colOpResult.ReadOnly = true;
|
||||
this.colOpResult.Width = 150;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1196, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(362, 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(1558, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// ProductThirdSelectListManageForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
prodSelect.main_img.Replace("https:", "http:"),
|
||||
defaultBitmap,//prod.main_img,
|
||||
prodSelect.fission_product_name,
|
||||
string.IsNullOrWhiteSpace(prodSelect.change_cat_name) ? prodSelect.cat_name : prodSelect.change_cat_name,
|
||||
string.IsNullOrWhiteSpace(prodSelect.change_cat_name) ? prodSelect.cat_name : prodSelect.change_cat_name.Split('>').LastOrDefault(),
|
||||
prodSelect.ext_code,
|
||||
prodSelect.status,
|
||||
prodSelect.draft_id,
|
||||
@@ -336,6 +336,12 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
//Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
|
||||
break;
|
||||
case "商品类目":
|
||||
{
|
||||
var shop = GetShop(shopId);
|
||||
DbProductCategorySearch searchForm = new DbProductCategorySearch(shop, dbSelectProduct, SetProductSelectNotesType.ThirdProduct);
|
||||
searchForm.SaveComplete += SearchForm_SaveComplete;
|
||||
searchForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case "草稿箱Id":
|
||||
if (!string.IsNullOrEmpty(draftId))
|
||||
@@ -446,6 +452,21 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchForm_SaveComplete(object obj)
|
||||
{
|
||||
TemuDBProductSelect dbSelectProduct = obj as TemuDBProductSelect;
|
||||
if (dbSelectProduct == null)
|
||||
return;
|
||||
|
||||
var rows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>()
|
||||
.Where(r => r.Cells["colSpuId"].Value.ParseToString() == dbSelectProduct.spu_id);
|
||||
foreach(var row in rows)
|
||||
{
|
||||
row.Cells["colProductCat"].Value = string.IsNullOrWhiteSpace(dbSelectProduct.change_cat_name) ?
|
||||
dbSelectProduct.cat_name : dbSelectProduct.change_cat_name.Split('>').LastOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
private bool DeleteProduct(string dbId, bool showErrMsg=true)
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product_third/del_select_product");
|
||||
@@ -823,25 +844,28 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
//if (index > 0 && index < 5)
|
||||
// catSearchStr = catSearchStr.Substring(index + 4).Trim();
|
||||
|
||||
var catSearchStr = selectProd.change_cat_name;
|
||||
if (!string.IsNullOrWhiteSpace(catSearchStr))
|
||||
var changeCatName = selectProd.change_cat_name;
|
||||
var changeCatId = selectProd.change_cat_id;
|
||||
if (!string.IsNullOrWhiteSpace(changeCatName) && !string.IsNullOrWhiteSpace(changeCatId))
|
||||
{
|
||||
html = SearchCategory(shop, catSearchStr);
|
||||
var changeCatNameList = selectProd.change_cat_name.Split('>').ToList();
|
||||
var changeCatIdList = selectProd.change_cat_id.Split('>').ToList();
|
||||
while (changeCatNameList.Count < 10)
|
||||
changeCatNameList.Add("");
|
||||
while (changeCatIdList.Count < 10)
|
||||
changeCatIdList.Add("0");
|
||||
try
|
||||
{
|
||||
var catObj = JObject.Parse(html)["result"]["categoryPaths"][0];
|
||||
var catStr = JsonHelper.SerializeObject(catObj);
|
||||
|
||||
prodParam.cat1Id = catIdDic[1] = (catObj["cat1NodeVO"].IsNullOrEmpty() ? null : catObj["cat1NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat2Id = catIdDic[2] = (catObj["cat2NodeVO"].IsNullOrEmpty() ? null : catObj["cat2NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat3Id = catIdDic[3] = (catObj["cat3NodeVO"].IsNullOrEmpty() ? null : catObj["cat3NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat4Id = catIdDic[4] = (catObj["cat4NodeVO"].IsNullOrEmpty() ? null : catObj["cat4NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat5Id = catIdDic[5] = (catObj["cat5NodeVO"].IsNullOrEmpty() ? null : catObj["cat5NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat6Id = catIdDic[6] = (catObj["cat6NodeVO"].IsNullOrEmpty() ? null : catObj["cat6NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat7Id = catIdDic[7] = (catObj["cat7NodeVO"].IsNullOrEmpty() ? null : catObj["cat7NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat8Id = catIdDic[8] = (catObj["cat8NodeVO"].IsNullOrEmpty() ? null : catObj["cat8NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat9Id = catIdDic[9] = (catObj["cat9NodeVO"].IsNullOrEmpty() ? null : catObj["cat9NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat10Id = catIdDic[10] = (catObj["cat10NodeVO"].IsNullOrEmpty() ? null : catObj["cat10NodeVO"]["catId"]).ParseToLong();
|
||||
prodParam.cat1Id = catIdDic[1] = changeCatIdList[0].ParseToLong();
|
||||
prodParam.cat2Id = catIdDic[2] = changeCatIdList[1].ParseToLong();
|
||||
prodParam.cat3Id = catIdDic[3] = changeCatIdList[2].ParseToLong();
|
||||
prodParam.cat4Id = catIdDic[4] = changeCatIdList[3].ParseToLong();
|
||||
prodParam.cat5Id = catIdDic[5] = changeCatIdList[4].ParseToLong();
|
||||
prodParam.cat6Id = catIdDic[6] = changeCatIdList[5].ParseToLong();
|
||||
prodParam.cat7Id = catIdDic[7] = changeCatIdList[6].ParseToLong();
|
||||
prodParam.cat8Id = catIdDic[8] = changeCatIdList[7].ParseToLong();
|
||||
prodParam.cat9Id = catIdDic[9] = changeCatIdList[8].ParseToLong();
|
||||
prodParam.cat10Id = catIdDic[10] = changeCatIdList[9].ParseToLong();
|
||||
for (int i = 10; i >= 1; i--)
|
||||
{
|
||||
catLevel = i;
|
||||
@@ -855,7 +879,6 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
catId = catIdDic[catLevel - 1];
|
||||
}
|
||||
}
|
||||
|
||||
html = AddDraft(shop, catId.ToString());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user