订单功能服务端新增 商品编辑功能优化等

This commit is contained in:
wule committed 2026-06-19 16:53:34 +08:00
1 parent 33eafd6781
commit f2534535f7
22 files changed
+911 -98

No files matched your search

+33 -4
View File
@@ -332,8 +332,8 @@ namespace TemuKJD.BLL
collectAuthorityTag = "-" + BaseClass.UserName;
bool isExist = false;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_list");
string existData = UserLogin.GetSignaturex() + "&search_spu=" + prodInfo.detail.goods_id + collectAuthorityTag;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodInfo.detail.goods_id + collectAuthorityTag;
string html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
@@ -469,6 +469,32 @@ namespace TemuKJD.BLL
prodInfo.detail.extend_warranty_dto = new extend_warranty_dto_item() { extend_warranty = 0 };
//prodInfo.detail.fabric = null;
//prodInfo.detail.fabric_content = null;
if (!frontProdInfo.goods.gallery.Any(g => g.type == 1) && frontProdInfo.goods.gallery.Any(g => g.type == 13))
{
foreach (var g in frontProdInfo.goods.gallery)
{
if (g.type == 13)
g.type = 1;
}
}
if (!frontProdInfo.goods.gallery.Any(g => g.type == 1) && frontProdInfo.goods.gallery.Any(g => g.type == 2))
{
foreach (var g in frontProdInfo.goods.gallery.Where(g => g.type == 2)
.OrderBy(g => Math.Abs(100m - 100m * g.width.ParseToDecimal() / g.height.ParseToDecimal(1))).Take(3).ToList())
{
frontProdInfo.goods.gallery.Add(new PDDFrontProductInfo2_gallery()
{
enable_share = g.enable_share,
goods_id = g.goods_id,
height = g.height,
id = g.id,
priority = g.priority,
type = 1,
url = g.url,
width = g.width,
});
}
}
prodInfo.detail.galleries = new List<gallery_item>();
int galleryIndex = 0;
foreach (var frontGallery in frontProdInfo.goods.gallery)
@@ -655,6 +681,9 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
if ((int)frontSku.sku_price.ParseToDecimal() > 0)
skuInfo.multi_price = Math.Min(skuInfo.multi_price.ParseToInt(), (int)frontSku.group_price.ParseToDecimal());
//List<string> specIds = frontSku.spec.Split(',').ToList();
//List<string> specKeys = frontSku.spec_keys.Split(';').ToList();
//List<string> specValues = frontSku.spec_values.Split(';').ToList();
@@ -723,8 +752,8 @@ namespace TemuKJD.BLL
collectAuthorityTag = "-" + BaseClass.UserName;
bool isExist = false;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_list");
string existData = UserLogin.GetSignaturex() + "&search_spu=" + prodInfo.detail.goods_id + collectAuthorityTag;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodInfo.detail.goods_id + collectAuthorityTag;
string html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
@@ -38,6 +38,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.pbLoading = new System.Windows.Forms.PictureBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel();
this.label10 = new System.Windows.Forms.Label();
this.flpMainImage = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel();
this.label11 = new System.Windows.Forms.Label();
this.flpDetailImage = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel();
this.label12 = new System.Windows.Forms.Label();
this.flpProp = new System.Windows.Forms.FlowLayoutPanel();
this.pnlSpec1 = new System.Windows.Forms.Panel();
this.btnAddSpec1 = new DevComponents.DotNetBar.PanelEx();
this.label1 = new System.Windows.Forms.Label();
@@ -87,6 +96,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.flowLayoutPanel3.SuspendLayout();
this.flowLayoutPanel5.SuspendLayout();
this.flowLayoutPanel6.SuspendLayout();
this.flowLayoutPanel7.SuspendLayout();
this.pnlSpec1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.pnlSpec2.SuspendLayout();
@@ -155,6 +167,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// flowLayoutPanel3
//
this.flowLayoutPanel3.AutoScroll = true;
this.flowLayoutPanel3.Controls.Add(this.flowLayoutPanel5);
this.flowLayoutPanel3.Controls.Add(this.flpMainImage);
this.flowLayoutPanel3.Controls.Add(this.flowLayoutPanel6);
this.flowLayoutPanel3.Controls.Add(this.flpDetailImage);
this.flowLayoutPanel3.Controls.Add(this.flowLayoutPanel7);
this.flowLayoutPanel3.Controls.Add(this.flpProp);
this.flowLayoutPanel3.Controls.Add(this.pnlSpec1);
this.flowLayoutPanel3.Controls.Add(this.flowLayoutPanel1);
this.flowLayoutPanel3.Controls.Add(this.pnlSpec2);
@@ -171,11 +189,129 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.flowLayoutPanel3.TabIndex = 1;
this.flowLayoutPanel3.WrapContents = false;
//
// flowLayoutPanel5
//
this.flowLayoutPanel5.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flowLayoutPanel5.AutoSize = true;
this.flowLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel5.Controls.Add(this.label10);
this.flowLayoutPanel5.Location = new System.Drawing.Point(3, 0);
this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flowLayoutPanel5.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flowLayoutPanel5.MinimumSize = new System.Drawing.Size(1250, 10);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
this.flowLayoutPanel5.Size = new System.Drawing.Size(1250, 22);
this.flowLayoutPanel5.TabIndex = 20;
this.flowLayoutPanel5.Tag = "";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(3, 5);
this.label10.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(44, 17);
this.label10.TabIndex = 0;
this.label10.Text = "主图:";
//
// flpMainImage
//
this.flpMainImage.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flpMainImage.AutoSize = true;
this.flpMainImage.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flpMainImage.Location = new System.Drawing.Point(3, 25);
this.flpMainImage.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flpMainImage.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flpMainImage.MinimumSize = new System.Drawing.Size(1250, 10);
this.flpMainImage.Name = "flpMainImage";
this.flpMainImage.Size = new System.Drawing.Size(1250, 10);
this.flpMainImage.TabIndex = 16;
this.flpMainImage.Tag = "";
//
// flowLayoutPanel6
//
this.flowLayoutPanel6.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flowLayoutPanel6.AutoSize = true;
this.flowLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel6.Controls.Add(this.label11);
this.flowLayoutPanel6.Location = new System.Drawing.Point(3, 38);
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flowLayoutPanel6.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flowLayoutPanel6.MinimumSize = new System.Drawing.Size(1250, 10);
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
this.flowLayoutPanel6.Size = new System.Drawing.Size(1250, 17);
this.flowLayoutPanel6.TabIndex = 21;
this.flowLayoutPanel6.Tag = "";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(3, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(56, 17);
this.label11.TabIndex = 0;
this.label11.Text = "详情图:";
//
// flpDetailImage
//
this.flpDetailImage.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flpDetailImage.AutoSize = true;
this.flpDetailImage.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flpDetailImage.Location = new System.Drawing.Point(3, 58);
this.flpDetailImage.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flpDetailImage.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flpDetailImage.MinimumSize = new System.Drawing.Size(1250, 10);
this.flpDetailImage.Name = "flpDetailImage";
this.flpDetailImage.Size = new System.Drawing.Size(1250, 10);
this.flpDetailImage.TabIndex = 18;
this.flpDetailImage.Tag = "";
//
// flowLayoutPanel7
//
this.flowLayoutPanel7.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flowLayoutPanel7.AutoSize = true;
this.flowLayoutPanel7.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel7.Controls.Add(this.label12);
this.flowLayoutPanel7.Location = new System.Drawing.Point(3, 71);
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flowLayoutPanel7.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flowLayoutPanel7.MinimumSize = new System.Drawing.Size(1250, 10);
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
this.flowLayoutPanel7.Size = new System.Drawing.Size(1250, 17);
this.flowLayoutPanel7.TabIndex = 22;
this.flowLayoutPanel7.Tag = "";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(3, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(68, 17);
this.label12.TabIndex = 0;
this.label12.Text = "商品属性:";
//
// flpProp
//
this.flpProp.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.flpProp.AutoSize = true;
this.flpProp.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flpProp.Location = new System.Drawing.Point(3, 91);
this.flpProp.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flpProp.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flpProp.MinimumSize = new System.Drawing.Size(1250, 10);
this.flpProp.Name = "flpProp";
this.flpProp.Size = new System.Drawing.Size(1250, 10);
this.flpProp.TabIndex = 19;
this.flpProp.Tag = "";
//
// pnlSpec1
//
this.pnlSpec1.Controls.Add(this.btnAddSpec1);
this.pnlSpec1.Controls.Add(this.label1);
this.pnlSpec1.Location = new System.Drawing.Point(3, 3);
this.pnlSpec1.Location = new System.Drawing.Point(3, 107);
this.pnlSpec1.MinimumSize = new System.Drawing.Size(1250, 10);
this.pnlSpec1.Name = "pnlSpec1";
this.pnlSpec1.Size = new System.Drawing.Size(1250, 23);
@@ -209,12 +345,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(3, 3);
this.label1.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(51, 17);
this.label1.TabIndex = 0;
this.label1.Text = "属性1:";
this.label1.Text = "规格1:";
//
// flowLayoutPanel1
//
@@ -222,7 +359,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.flowLayoutPanel1.AutoSize = true;
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel1.Controls.Add(this.ucPddSpecEdit1);
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 29);
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 133);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flowLayoutPanel1.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flowLayoutPanel1.MinimumSize = new System.Drawing.Size(1250, 10);
@@ -245,7 +382,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.pnlSpec2.Controls.Add(this.btnAddSpec2);
this.pnlSpec2.Controls.Add(this.label2);
this.pnlSpec2.Location = new System.Drawing.Point(3, 90);
this.pnlSpec2.Location = new System.Drawing.Point(3, 194);
this.pnlSpec2.MinimumSize = new System.Drawing.Size(1250, 10);
this.pnlSpec2.Name = "pnlSpec2";
this.pnlSpec2.Size = new System.Drawing.Size(1250, 23);
@@ -279,12 +416,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(3, 3);
this.label2.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 17);
this.label2.TabIndex = 1;
this.label2.Text = "属性2:";
this.label2.Text = "规格2:";
//
// flowLayoutPanel2
//
@@ -292,7 +430,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.flowLayoutPanel2.AutoSize = true;
this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel2.Controls.Add(this.ucPddSpecEdit2);
this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 116);
this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 220);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.flowLayoutPanel2.MaximumSize = new System.Drawing.Size(1240, 9999);
this.flowLayoutPanel2.MinimumSize = new System.Drawing.Size(1250, 10);
@@ -313,7 +451,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// panel4
//
this.panel4.Controls.Add(this.label3);
this.panel4.Location = new System.Drawing.Point(3, 177);
this.panel4.Location = new System.Drawing.Point(3, 281);
this.panel4.MinimumSize = new System.Drawing.Size(1250, 10);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1250, 23);
@@ -322,6 +460,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(1, 3);
this.label3.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3);
this.label3.Name = "label3";
@@ -332,7 +471,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// panel6
//
this.panel6.Controls.Add(this.flowLayoutPanel4);
this.panel6.Location = new System.Drawing.Point(3, 203);
this.panel6.Location = new System.Drawing.Point(3, 307);
this.panel6.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
this.panel6.MinimumSize = new System.Drawing.Size(1250, 10);
this.panel6.Name = "panel6";
@@ -528,7 +667,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.colEditSkuImg,
this.colSkuSn});
this.dgvDbProduct.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
this.dgvDbProduct.Location = new System.Drawing.Point(5, 236);
this.dgvDbProduct.Location = new System.Drawing.Point(5, 340);
this.dgvDbProduct.Margin = new System.Windows.Forms.Padding(5, 0, 3, 3);
this.dgvDbProduct.MultiSelectCheckBox = true;
this.dgvDbProduct.Name = "dgvDbProduct";
@@ -555,13 +694,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// colSpec1
//
this.colSpec1.HeaderText = "属性1";
this.colSpec1.HeaderText = "规格1";
this.colSpec1.Name = "colSpec1";
this.colSpec1.ReadOnly = true;
//
// colSpec2
//
this.colSpec2.HeaderText = "属性2";
this.colSpec2.HeaderText = "规格2";
this.colSpec2.Name = "colSpec2";
this.colSpec2.ReadOnly = true;
//
@@ -619,7 +758,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// panel5
//
this.panel5.Location = new System.Drawing.Point(3, 842);
this.panel5.Location = new System.Drawing.Point(3, 946);
this.panel5.MinimumSize = new System.Drawing.Size(1250, 10);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(1250, 10);
@@ -720,6 +859,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1.ResumeLayout(false);
this.flowLayoutPanel3.ResumeLayout(false);
this.flowLayoutPanel3.PerformLayout();
this.flowLayoutPanel5.ResumeLayout(false);
this.flowLayoutPanel5.PerformLayout();
this.flowLayoutPanel6.ResumeLayout(false);
this.flowLayoutPanel6.PerformLayout();
this.flowLayoutPanel7.ResumeLayout(false);
this.flowLayoutPanel7.PerformLayout();
this.pnlSpec1.ResumeLayout(false);
this.pnlSpec1.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
@@ -780,6 +925,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public DevComponents.DotNetBar.PanelEx btnSaveSkuLst;
public DevComponents.DotNetBar.PanelEx btnRestoreAll;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel flpMainImage;
private System.Windows.Forms.FlowLayoutPanel flpDetailImage;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSpec1;
@@ -791,7 +940,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewImageColumn colSkuImg;
private System.Windows.Forms.DataGridViewLinkColumn colEditSkuImg;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuSn;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel flpProp;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7;
private System.Windows.Forms.Label label12;
}
}
@@ -28,6 +28,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
public KJDDBProduct DbProd { get; set; }
public KJDDBProduct DbProdDetail { get; set; }
Dictionary<string, string> imgDic { get; set; } = new Dictionary<string, string>();
List<sku_edit_item> lstSkuEditItem { get; set; } = new List<sku_edit_item>();
sku_edit_item defaultSkuEditItem { get; set; }
int addSpecIndex1 = 1;
@@ -66,6 +67,42 @@ namespace TemuKJD.PDDForms.ProductSelectForms
Invoke(new Action(() =>
{
label5.Text = "单价";
var prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(DbProdDetail.product_json);
// 加载主图和详情图
foreach (var image in prodInfo.detail.galleries)
{
var imgUrl = image.url.ParseToString().Replace("https", "http") + "?" + Randomx.GetId(10000000, 99999999);
imgDic[imgUrl] = imgUrl;
var pb = new PictureBox()
{
Size = new Size(128, 128),
SizeMode = PictureBoxSizeMode.Zoom,
Tag = imgUrl,
ImageLocation = imgUrl,
BorderStyle = BorderStyle.FixedSingle,
};
pb.Click += Pb_Click;
if (image.type == 1)
{
this.flpMainImage.Controls.Add(pb);
}
else
this.flpDetailImage.Controls.Add(pb);
}
//加载商品属性
foreach (var prop in prodInfo.property.goods_properties)
{
var panel = new FlowLayoutPanel() { AutoSize = true };
panel.Controls.Add(new Label() { AutoSize = true, Text = prop.name });
panel.Controls.Add(new Label() { AutoSize= true, BorderStyle = BorderStyle.FixedSingle, Text = string.Join(";", prop.values.Select(v => v.value)), BackColor = Color.White, /*ReadOnly = true*/ });
this.flpProp.Controls.Add(panel);
}
//加载规格
if (!string.IsNullOrWhiteSpace(DbProdDetail.sku_edit_json))
{
// 如果有编辑过的sku使用编辑过的sku
@@ -74,7 +111,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
else
{
// 否则使用原版sku
var prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(DbProdDetail.product_json);
lstSkuEditItem = JsonHelper.DeserializeJsonToList<sku_edit_item>(JsonHelper.SerializeObject(prodInfo.detail.sku));
}
DisplaySkuData(lstSkuEditItem);
@@ -83,6 +119,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
});
}
private void Pb_Click(object sender, EventArgs e)
{
var pb = sender as PictureBox;
if (pb == null)
return;
ShowImgForm imgFrom = new ShowImgForm(pb.ImageLocation, imgDic);
imgFrom.ShowDialog();
}
void DisplaySkuData(List<sku_edit_item> lstSkuEditItem)
{
defaultSkuEditItem = lstSkuEditItem.FirstOrDefault();
@@ -293,7 +339,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (spec == null)
return;
if (edit.pictureBox1.Visible == true) // 第一组属性
if (edit.pictureBox1.Visible == true) // 第一组规格
{
if (lstSkuEditItem.All(s => s.spec.Count > 0))
{
@@ -308,7 +354,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
else
{
if (lstSkuEditItem.All(s => s.spec.Count > 1)) // 第二组属性
if (lstSkuEditItem.All(s => s.spec.Count > 1)) // 第二组规格
{
var rows = this.dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSpec2"].Value.ParseToString() == spec.spec_name).ToList();
foreach (var row in rows)
@@ -470,7 +516,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
skuEditItem.spec.Count > 1 ? skuEditItem.spec[1].spec_name : "",
skuEditItem.multi_price * 0.01m,
skuEditItem.price * 0.01m,
skuEditItem.quantity,
skuEditItem.quantity.IsNullOrZero() ? skuEditItem.quantity_delta : skuEditItem.quantity,
skuEditItem.thumb_url,
DataGridViewExtension.defaultBitmap,
"编辑",
@@ -51,6 +51,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucTabControlMetro1 = new TemuKJD.UserControls.UcTabControlMetro();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnAddUserProd = new DevComponents.DotNetBar.PanelEx();
this.btnTitleFission = new DevComponents.DotNetBar.PanelEx();
this.btnSetGroup = new DevComponents.DotNetBar.PanelEx();
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
@@ -179,7 +180,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnAddUserProd = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -265,6 +265,32 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.tabPage1.Text = "数据操作";
this.tabPage1.UseVisualStyleBackColor = true;
//
// btnAddUserProd
//
this.btnAddUserProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddUserProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddUserProd.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddUserProd.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddUserProd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddUserProd.Location = new System.Drawing.Point(6, 41);
this.btnAddUserProd.Name = "btnAddUserProd";
this.btnAddUserProd.Size = new System.Drawing.Size(96, 25);
this.btnAddUserProd.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddUserProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddUserProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddUserProd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddUserProd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddUserProd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddUserProd.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddUserProd.Style.GradientAngle = 90;
this.btnAddUserProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddUserProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddUserProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddUserProd.TabIndex = 800;
this.btnAddUserProd.Text = "添加到用户商品";
this.btnAddUserProd.Visible = false;
this.btnAddUserProd.Click += new System.EventHandler(this.btnAddUserProd_Click);
//
// btnTitleFission
//
this.btnTitleFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -424,7 +450,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnOutProdSaveDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnOutProdSaveDb.TabIndex = 1154;
this.btnOutProdSaveDb.Text = "导入已采集数据";
this.btnOutProdSaveDb.Visible = false;
this.btnOutProdSaveDb.Click += new System.EventHandler(this.btnOutProdSaveDb_Click);
//
// btnImport
@@ -2032,32 +2057,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.Size = new System.Drawing.Size(1438, 25);
this.statusBar.TabIndex = 5;
//
// btnAddUserProd
//
this.btnAddUserProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddUserProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddUserProd.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddUserProd.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddUserProd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddUserProd.Location = new System.Drawing.Point(6, 41);
this.btnAddUserProd.Name = "btnAddUserProd";
this.btnAddUserProd.Size = new System.Drawing.Size(96, 25);
this.btnAddUserProd.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddUserProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddUserProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddUserProd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddUserProd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddUserProd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddUserProd.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddUserProd.Style.GradientAngle = 90;
this.btnAddUserProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddUserProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddUserProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddUserProd.TabIndex = 800;
this.btnAddUserProd.Text = "添加到用户商品";
this.btnAddUserProd.Visible = false;
this.btnAddUserProd.Click += new System.EventHandler(this.btnAddUserProd_Click);
//
// PDDDBProdListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1150,14 +1150,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
string rst = "";
try
{
using (StreamReader sr = new StreamReader(path))
using (StreamReader sr = new StreamReader(path, Work.Api.UploadPinduoduoMain.GetFileEncoding(path)))
{
content = sr.ReadToEnd();
content = sr.ReadToEnd();
}
if (content.Contains("\"spec_keys\"") && content.Contains("\"spec_values\"") && content.Contains("\"is_sku_pre_sale\""))
rst = new PDDProdFormConverter().PddFrontToPddBackConvert(content);
else if (content.Contains("\"destination_url\"") && content.Contains("\"destination_type\"") && content.Contains("\"pre_render_url\""))
//else if (content.Contains("\"destination_url\"") && content.Contains("\"destination_type\"") && content.Contains("\"pre_render_url\""))
//{
// rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content);
//}
//else if (content.Contains("\"goods_id\"") && content.Contains("\"goods_name\"") && content.Contains("\"gallery\"") &&
// content.Contains("\"priority\"") && content.Contains("\"enable_share\"") && content.Contains("\"decoration\"") &&
// content.Contains("\"goods_property\"") && content.Contains("\"ref_pid\"") && content.Contains("\"sku_id\"") &&
// content.Contains("\"quantity\"") && content.Contains("\"specs\"") && content.Contains("\"spec_key\"") &&
// content.Contains("\"spec_value\"") && content.Contains("\"group_price\"") && content.Contains("\"sku_price\"") &&
// content.Contains("img.pddpic.com") )
//{
// rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content);
//}
else if (content.Contains("\"goods_id\"") && content.Contains("\"goods_name\"") && content.Contains("\"gallery\"") &&
content.Contains("\"priority\"") && content.Contains("\"enable_share\"") && content.Contains("\"goods_property\"") &&
(content.Contains("\"ref_pid\"") || content.Contains("\"goods_property\":[]")) && content.Contains("\"sku_id\"") && content.Contains("\"quantity\"") &&
content.Contains("\"specs\"") && content.Contains("\"spec_key\"") && content.Contains("\"spec_value\"") &&
content.Contains("\"group_price\"") && content.Contains("img.pddpic.com"))
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content);
}
@@ -1173,13 +1190,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
Invoke(new Action(() =>
{
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
this.statusBar.lblTaskStatus.Text = "正在导入";
this.statusBar.lblTaskStatus.Text = "正在导入,尝试导入" + (successNum + failedNum) + ",成功" + successNum + ",失败" + failedNum;
}));
}
Invoke(new Action(() =>
{
pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "导入完成";
this.statusBar.lblTaskStatus.Text = "导入完成,尝试导入" + (successNum + failedNum) + ",成功" + successNum + ",失败" + failedNum;
BaseMsgForm.ShowInfo("导入完成!");
}));
});
+14 -14
View File
@@ -32,11 +32,11 @@ namespace TemuKJD.ToolForms
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShowImgForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.btnCopy = new DevComponents.DotNetBar.PanelEx();
this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx();
this.btnClose = new DevComponents.DotNetBar.PanelEx();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -80,9 +80,19 @@ namespace TemuKJD.ToolForms
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(265, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(188, 17);
this.label1.TabIndex = 518;
this.label1.Text = "点击图片或按空格键切换列表图片";
this.label1.Visible = false;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
@@ -107,7 +117,7 @@ namespace TemuKJD.ToolForms
//
// btnCopy
//
this.btnCopy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCopy.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty;
@@ -132,7 +142,7 @@ namespace TemuKJD.ToolForms
//
// btnCopyUrl
//
this.btnCopyUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCopyUrl.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty;
@@ -180,16 +190,6 @@ namespace TemuKJD.ToolForms
this.btnClose.Text = "关闭";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(265, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(188, 17);
this.label1.TabIndex = 518;
this.label1.Text = "点击图片或按空格键切换列表图片";
this.label1.Visible = false;
//
// ShowImgForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+15 -3
View File
@@ -17,12 +17,10 @@ namespace TemuKJD.ToolForms
string currentImgUrl = null;
Dictionary<string, string> imgDic = new Dictionary<string, string>();
public ShowImgForm(string picUrl, Dictionary<string, string> picDic = null)
public ShowImgForm(string picUrl)
{
InitializeComponent();
currentImgUrl = picUrl;
if (picDic != null)
imgDic = picDic;
if (!string.IsNullOrEmpty(currentImgUrl))
{
@@ -37,6 +35,20 @@ namespace TemuKJD.ToolForms
}
}
public ShowImgForm(string picUrl, Dictionary<string, string> picDic)
{
InitializeComponent();
currentImgUrl = picUrl;
if (picDic != null)
imgDic = picDic;
if (!string.IsNullOrEmpty(currentImgUrl))
{
if (picDic != null)
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
}
}
public ShowImgForm(Image img)
{
InitializeComponent();
@@ -466,9 +466,24 @@ namespace TemuKJD.WXForms.ProductForms
if (itemObj["serviceName"].ParseToString() == "店统领供应链-商品管理")
{
var expiresTick = itemObj["expireTime"].ParseToLong();
GlobalConfig.lstWxShopAuthInfo.Add(new AuthInfo() { ShopId = shop.ShopId, UpdateTime = DateTime.Now, ExpiresTime = BaseClass.StampToDateTime(expiresTick.ParseToInt()) });
Invoke(new Action(() => { BindShop(shop, selectIds, "已查询"); }));
return;
var WxShopAuthInfo = new AuthInfo() { ShopId = shop.ShopId, UpdateTime = DateTime.Now, ExpiresTime = BaseClass.StampToDateTime(expiresTick.ParseToInt()) };
if (WxShopAuthInfo.ExpiresTime > DateTime.Now)
{
GlobalConfig.lstWxShopAuthInfo.Add(WxShopAuthInfo);
Invoke(new Action(() => { BindShop(shop, selectIds, "已查询"); }));
return;
}
}
if (itemObj["serviceName"].ParseToString() == "东内部")
{
var expiresTick = itemObj["expireTime"].ParseToLong();
var WxShopAuthInfo = new AuthInfo() { ShopId = shop.ShopId, UpdateTime = DateTime.Now, ExpiresTime = BaseClass.StampToDateTime(expiresTick.ParseToInt()) };
if (WxShopAuthInfo.ExpiresTime > DateTime.Now)
{
GlobalConfig.lstWxShopAuthInfo.Add(WxShopAuthInfo);
Invoke(new Action(() => { BindShop(shop, selectIds, "已查询"); }));
return;
}
}
}
// 没找到指定服务
@@ -493,12 +493,12 @@ namespace TemuKJD.WXForms.ProductForms
{
var prodObjs = JsonHelper.JObjectParse(getProdOnSaleRst);
// 按商品id查询不需要
//if (page == 1 || 1 == 1)
//{
// var totalNum = prodObjs["totalNum"].ParseToInt();
// totalPage = Math.Ceiling(1m * totalNum / pageSize).ParseToInt();
//}
//nextKey = prodObjs["nextKey"].ParseToString();
if (page == 1 || 1 == 1)
{
var totalNum = prodObjs["totalNum"].ParseToInt();
totalPage = Math.Ceiling(1m * totalNum / pageSize).ParseToInt();
}
nextKey = prodObjs["nextKey"].ParseToString();
Invoke(new Action(() =>
{
this.pbLoading.Visible = true;
@@ -152,7 +152,7 @@ namespace TemuKJD.WXForms.ProductForms
SearchDbProd(1);
}
public void SearchDbProd(int page)
public void SearchDbProd(int page, string needKeepStatusText = "")
{
if (InvokeRequired)
{
@@ -256,6 +256,7 @@ namespace TemuKJD.WXForms.ProductForms
#if DEBUG
this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds;
#endif
this.statusBar.lblTaskStatus.Text += needKeepStatusText;
}));
});
}
@@ -1093,19 +1094,37 @@ namespace TemuKJD.WXForms.ProductForms
foreach (var path in filePathLst)
{
string content = "";
string rst = "";
string rst = "商品未识别";
try
{
using (StreamReader sr = new StreamReader(path))
using (StreamReader sr = new StreamReader(path, Work.Api.UploadPinduoduoMain.GetFileEncoding(path)))
{
content = sr.ReadToEnd();
}
content = JsonHelper.SerializeObject(JsonHelper.JObjectParse(content));
if (content.Contains("\"spec_keys\"") && content.Contains("\"spec_values\"") && content.Contains("\"is_sku_pre_sale\""))
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert(content, true, null, true);
}
else if (content.Contains("\"destination_url\"") && content.Contains("\"destination_type\"") && content.Contains("\"pre_render_url\""))
//else if (content.Contains("\"destination_url\"") && content.Contains("\"destination_type\"") && content.Contains("\"pre_render_url\""))
//{
// rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content, true, null, true);
//}
//else if (content.Contains("\"goods_id\"") && content.Contains("\"goods_name\"") && content.Contains("\"gallery\"") &&
// content.Contains("\"priority\"") && content.Contains("\"enable_share\"") && content.Contains("\"decoration\"") &&
// content.Contains("\"goods_property\"") && content.Contains("\"ref_pid\"") && content.Contains("\"sku_id\"") &&
// content.Contains("\"quantity\"") && content.Contains("\"specs\"") && content.Contains("\"spec_key\"") &&
// content.Contains("\"spec_value\"") && content.Contains("\"group_price\"") && content.Contains("\"sku_price\"") &&
// content.Contains("img.pddpic.com") )
//{
// rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content, true, null, true);
//}
else if (content.Contains("\"goods_id\"") && content.Contains("\"goods_name\"") && content.Contains("\"gallery\"") &&
content.Contains("\"priority\"") && content.Contains("\"enable_share\"") && content.Contains("\"goods_property\"") &&
(content.Contains("\"ref_pid\"") || content.Contains("\"goods_property\":[]")) && content.Contains("\"sku_id\"") && content.Contains("\"quantity\"") &&
content.Contains("\"specs\"") && content.Contains("\"spec_key\"") && content.Contains("\"spec_value\"") &&
content.Contains("\"group_price\"") && content.Contains("img.pddpic.com"))
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content, true, null, true);
}
@@ -1121,14 +1140,14 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
this.statusBar.lblTaskStatus.Text = "正在导入";
this.statusBar.lblTaskStatus.Text = "正在导入,尝试导入" + (successNum + failedNum) + ",成功" + successNum + ",失败" + failedNum;
}));
}
SearchDbProd(1);
SearchDbProd(1, " 导入完成,尝试导入" + (successNum + failedNum) + ",成功" + successNum + ",失败" + failedNum);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "导入完成";
this.statusBar.lblTaskStatus.Text = "导入完成,尝试导入" + (successNum + failedNum) + ",成功" + successNum + ",失败" + failedNum;
BaseMsgForm.ShowInfo("导入完成!");
}));
});
@@ -116,7 +116,8 @@ namespace TemuKJD.WXForms.ShopForms
if (!this.Created)
break;
if (this.shop != null && currentUrl.TrimEnd('/') == shopMainUrl)
//if (this.shop != null && currentUrl.TrimEnd('/') == shopMainUrl)
if (this.shop != null && currentUrl.StartsWith( shopMainUrl))
{
if (!cefWebBrowser.GetBrowser().MainFrame.IsValid)
continue;
@@ -678,6 +679,7 @@ namespace TemuKJD.WXForms.ShopForms
{
var username = BaseRegex.GetStringJson(ref data, "username");
var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
var mall_name = BaseRegex.GetStringJson(ref data, "mall_name");
if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(maskMobile))
{
@@ -685,7 +687,7 @@ namespace TemuKJD.WXForms.ShopForms
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
return;
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username || shop.LoginName == mall_name)
{
lstShopCompany.Clear();
//var jObj = JObject.Parse(data);
@@ -709,6 +711,8 @@ namespace TemuKJD.WXForms.ShopForms
}
}
if (openType == EnumOpenType.manage && string.IsNullOrWhiteSpace(shop.MallId))
{
shop.MallId = BaseRegex.GetStringJson(ref data, "mall_id");