支持从机会商品里添加商品到待上传
This commit is contained in:
1 parent
5e9bdd1700
commit
8501d39f7f
19 files changed
+1245
-254
No files matched your search
+110
-1
@@ -36,6 +36,8 @@
|
||||
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.pnlUploadOpBtns = new System.Windows.Forms.Panel();
|
||||
this.txtSendCount = new System.Windows.Forms.TextBox();
|
||||
this.btnSendToUpload = new DevComponents.DotNetBar.PanelEx();
|
||||
this.numMinPrice = new System.Windows.Forms.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.pictureBox8 = new System.Windows.Forms.PictureBox();
|
||||
@@ -49,6 +51,7 @@
|
||||
this.btnRestoreSkuImg = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSignActivity = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSaveSourceGoodsData = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
@@ -61,6 +64,10 @@
|
||||
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSendPrice = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.pictureBox9 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -80,6 +87,7 @@
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -112,7 +120,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
|
||||
this.splitContainer1.SplitterDistance = 672;
|
||||
this.splitContainer1.SplitterDistance = 668;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -211,6 +219,12 @@
|
||||
// pnlUploadOpBtns
|
||||
//
|
||||
this.pnlUploadOpBtns.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.pnlUploadOpBtns.Controls.Add(this.pictureBox9);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.label6);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.txtSendPrice);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.label5);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.txtSendCount);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.btnSendToUpload);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.numMinPrice);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.label3);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.pictureBox8);
|
||||
@@ -224,11 +238,46 @@
|
||||
this.pnlUploadOpBtns.Controls.Add(this.btnRestoreSkuImg);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.btnSignActivity);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.btnSaveSourceGoodsData);
|
||||
this.pnlUploadOpBtns.Controls.Add(this.label4);
|
||||
this.pnlUploadOpBtns.Location = new System.Drawing.Point(338, 3);
|
||||
this.pnlUploadOpBtns.Name = "pnlUploadOpBtns";
|
||||
this.pnlUploadOpBtns.Size = new System.Drawing.Size(812, 53);
|
||||
this.pnlUploadOpBtns.TabIndex = 463;
|
||||
//
|
||||
// txtSendCount
|
||||
//
|
||||
this.txtSendCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSendCount.Location = new System.Drawing.Point(778, 3);
|
||||
this.txtSendCount.Name = "txtSendCount";
|
||||
this.txtSendCount.Size = new System.Drawing.Size(31, 23);
|
||||
this.txtSendCount.TabIndex = 478;
|
||||
this.txtSendCount.Text = "10";
|
||||
//
|
||||
// btnSendToUpload
|
||||
//
|
||||
this.btnSendToUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSendToUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSendToUpload.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSendToUpload.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSendToUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSendToUpload.Location = new System.Drawing.Point(616, 28);
|
||||
this.btnSendToUpload.Name = "btnSendToUpload";
|
||||
this.btnSendToUpload.Size = new System.Drawing.Size(193, 23);
|
||||
this.btnSendToUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSendToUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSendToUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSendToUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSendToUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSendToUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSendToUpload.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSendToUpload.Style.GradientAngle = 90;
|
||||
this.btnSendToUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSendToUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSendToUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSendToUpload.TabIndex = 435;
|
||||
this.btnSendToUpload.Text = "提交机会商品到上传";
|
||||
this.btnSendToUpload.Click += new System.EventHandler(this.btnSendToUpload_Click);
|
||||
//
|
||||
// numMinPrice
|
||||
//
|
||||
this.numMinPrice.DecimalPlaces = 2;
|
||||
@@ -415,6 +464,17 @@
|
||||
this.btnSaveSourceGoodsData.Text = "暂存商品图片";
|
||||
this.btnSaveSourceGoodsData.Click += new System.EventHandler(this.btnSaveSourceGoodsData_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(723, 6);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(56, 17);
|
||||
this.label4.TabIndex = 479;
|
||||
this.label4.Text = "提交份数";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// btnLoginAgain
|
||||
//
|
||||
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -584,6 +644,47 @@
|
||||
this.txtAddress.TabIndex = 7;
|
||||
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(613, 6);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 17);
|
||||
this.label5.TabIndex = 491;
|
||||
this.label5.Text = "提交价格";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtSendPrice
|
||||
//
|
||||
this.txtSendPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSendPrice.Location = new System.Drawing.Point(668, 3);
|
||||
this.txtSendPrice.Name = "txtSendPrice";
|
||||
this.txtSendPrice.Size = new System.Drawing.Size(31, 23);
|
||||
this.txtSendPrice.TabIndex = 492;
|
||||
this.txtSendPrice.Text = "20";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(699, 6);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(20, 17);
|
||||
this.label6.TabIndex = 493;
|
||||
this.label6.Text = "元";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
this.pictureBox9.Location = new System.Drawing.Point(586, 27);
|
||||
this.pictureBox9.Name = "pictureBox9";
|
||||
this.pictureBox9.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox9.TabIndex = 494;
|
||||
this.pictureBox9.TabStop = false;
|
||||
this.pictureBox9.Tag = "11";
|
||||
//
|
||||
// PDDShopLoginForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -620,6 +721,7 @@
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -658,5 +760,12 @@
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.NumericUpDown numMinPrice;
|
||||
private System.Windows.Forms.TextBox txtSendCount;
|
||||
private DevComponents.DotNetBar.PanelEx btnSendToUpload;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtSendPrice;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.PictureBox pictureBox9;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ using System.Windows.Forms;
|
||||
using Work;
|
||||
using Work.BLL.Tools;
|
||||
using TemuKJD.BLL;
|
||||
using AllBase.Model.Result.PDDResult;
|
||||
|
||||
namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
@@ -38,11 +39,16 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
public static PDDShopLoginForm shopLoginInstance { get; set; } = null;
|
||||
public ProductSelectForms.PDDDBProdUserSelectForm prodUserSelectForm { get; set; } = null;
|
||||
public static string pddUploadGoodsData = "";
|
||||
|
||||
public string pddUploadGoodsData = "";
|
||||
//public static AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
|
||||
public static string pddSourceGoodsData = "";
|
||||
public static string pddSourceGoodsDataTemp = "";
|
||||
public string pddSourceGoodsDetail = "";
|
||||
//public static AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
|
||||
public string pddSourceGoodsDetailTemp = "";
|
||||
public string pddSourceGoodsDecorationTemp = "";
|
||||
public string pddSourceGoodsChanceId = "";
|
||||
public string pddGetChanceGoodsRefere = "";
|
||||
public string pddEditChanceGoodsRefereChanceTab = "";
|
||||
|
||||
public int CloseAfterSecond { get; set; }
|
||||
public EnumOpenType openType = EnumOpenType.manage;
|
||||
@@ -76,7 +82,11 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62;
|
||||
this.pnlUploadOpBtns.Visible = this.prodUserSelectForm != null;
|
||||
pddSourceGoodsDataTemp = "";
|
||||
pddSourceGoodsDetailTemp = "";
|
||||
pddSourceGoodsDecorationTemp = ""; // 详情装修
|
||||
pddSourceGoodsChanceId = "";
|
||||
pddGetChanceGoodsRefere = "";
|
||||
pddEditChanceGoodsRefereChanceTab = "";
|
||||
|
||||
if (isMultiLogin && shop != null)
|
||||
{
|
||||
@@ -581,6 +591,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||
{
|
||||
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
|
||||
var refere = request.ReferrerUrl;
|
||||
if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent) && request.Method == "POST")
|
||||
{
|
||||
Task.Run(() =>
|
||||
@@ -649,24 +660,50 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
catch (Exception ex)
|
||||
{
|
||||
pddUploadGoodsData = "";
|
||||
//prodParam = null;
|
||||
}
|
||||
}
|
||||
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_release"))
|
||||
{
|
||||
var data = postData;
|
||||
Task.Run(() =>
|
||||
{
|
||||
pddSourceGoodsChanceId = BaseRegex.GetStringJson(ref postData, "chance_id");
|
||||
pddGetChanceGoodsRefere = refere;
|
||||
});
|
||||
}
|
||||
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/v2/mms/query/commit/detail"))
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
pddSourceGoodsDataTemp = responseData;
|
||||
pddSourceGoodsDetailTemp = responseData;
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDataTemp);
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDetailTemp);
|
||||
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
|
||||
pddEditChanceGoodsRefereChanceTab = BaseRegex.GetStringQuery(ref refere, "chance_tab");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
pddSourceGoodsDataTemp = "";
|
||||
//prodInfo = null;
|
||||
pddSourceGoodsDetailTemp = "";
|
||||
pddEditChanceGoodsRefereChanceTab = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/query/V2"))
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
pddSourceGoodsDecorationTemp = responseData;
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDecorationTemp);
|
||||
var prodDecorationTStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
var prodDecoration = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDecorationInfo>(prodDecorationTStr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
pddSourceGoodsDecorationTemp = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1116,16 +1153,16 @@ function getElementWithText(sText)
|
||||
|
||||
private void btnSaveSourceGoodsData_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsDataTemp))
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsDetailTemp))
|
||||
{
|
||||
BaseMsgForm.ShowError("未捕获到商品详情!");
|
||||
return;
|
||||
}
|
||||
pddSourceGoodsData = pddSourceGoodsDataTemp;
|
||||
pddSourceGoodsDetail = pddSourceGoodsDetailTemp;
|
||||
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsData);
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDetail);
|
||||
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
|
||||
|
||||
@@ -1168,7 +1205,7 @@ function getElementWithText(sText)
|
||||
BaseMsgForm.ShowError("不是从上传界面进入!");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsData))
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsDetail))
|
||||
{
|
||||
BaseMsgForm.ShowError("未捕获到商品详情!");
|
||||
return;
|
||||
@@ -1180,7 +1217,7 @@ function getElementWithText(sText)
|
||||
}
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsData);
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDetail);
|
||||
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
|
||||
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
|
||||
@@ -1260,7 +1297,7 @@ function getElementWithText(sText)
|
||||
BaseMsgForm.ShowError("不是从上传界面进入!");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsData))
|
||||
if (string.IsNullOrEmpty(pddSourceGoodsDetail))
|
||||
{
|
||||
BaseMsgForm.ShowError("未捕获到商品详情!");
|
||||
return;
|
||||
@@ -1272,7 +1309,7 @@ function getElementWithText(sText)
|
||||
}
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsData);
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDetail);
|
||||
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
|
||||
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
|
||||
@@ -1333,5 +1370,109 @@ function getElementWithText(sText)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnSendToUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (prodUserSelectForm == null)
|
||||
{
|
||||
BaseMsgForm.ShowError("上传窗口不存在!");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
JObject jObj = JObject.Parse(pddSourceGoodsDetailTemp);
|
||||
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
PDDProductDetailInfo detailInfo = JsonHelper.DeserializeJsonToObject<PDDProductDetailInfo>(prodInfoStr);
|
||||
|
||||
var skuPrice = (this.txtSendPrice.Text.ParseToDecimal() * 100).ParseToInt();
|
||||
foreach (var sku in detailInfo.sku)
|
||||
{
|
||||
sku.multi_price = skuPrice;
|
||||
sku.price = sku.multi_price + 100;
|
||||
}
|
||||
if (detailInfo.market_price < (this.txtSendPrice.Text.ParseToDecimal() * 100).ParseToInt() + 1000)
|
||||
{
|
||||
detailInfo.market_price = skuPrice + 1000;
|
||||
}
|
||||
|
||||
jObj = JObject.Parse(pddSourceGoodsDecorationTemp);
|
||||
var prodDecorationTStr = JsonHelper.SerializeObject(jObj["result"]);
|
||||
PDDProductDecorationInfo decorationInfo = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(prodDecorationTStr);
|
||||
|
||||
string main_img = detailInfo.image_url;
|
||||
if (string.IsNullOrEmpty(main_img))
|
||||
main_img = detailInfo.hd_thumb_url;
|
||||
if (string.IsNullOrEmpty(main_img))
|
||||
main_img = detailInfo.thumb_url;
|
||||
if (string.IsNullOrEmpty(main_img))
|
||||
main_img = (detailInfo.galleries?.FirstOrDefault()?.url).ParseToString().Replace("https://", "http://");
|
||||
|
||||
PDDProductInfo pddProdInfo = new PDDProductInfo()
|
||||
{
|
||||
chance_id = pddSourceGoodsChanceId,
|
||||
chance_refere = pddGetChanceGoodsRefere,
|
||||
chance_tab = pddEditChanceGoodsRefereChanceTab,
|
||||
decoration = decorationInfo,
|
||||
detail = detailInfo,
|
||||
material1 = new PDDMaterialInfo(),
|
||||
material3 = new PDDMaterialInfo(),
|
||||
property = new PDDProductPropertyInfo(),
|
||||
size = new PDDSizeSpecInfo(),
|
||||
};
|
||||
pddProdInfo.property.goods_properties = new List<goods_propertie_item>();
|
||||
|
||||
KJDDBProduct dbProd = new KJDDBProduct()
|
||||
{
|
||||
add_time = DateTime.Now,
|
||||
cat_id = detailInfo.cat_id.ParseToString(),
|
||||
cat_name = detailInfo.cats?.LastOrDefault(c => !string.IsNullOrEmpty(c)).ParseToString(),
|
||||
ext_code = "",
|
||||
end_words = "",
|
||||
fission_words = "",
|
||||
from_shop_id = "机会商品",
|
||||
group = "",
|
||||
head_words = "",
|
||||
id = -1,
|
||||
isPddUpLoad = true,
|
||||
main_cat_id = (detailInfo.cat_ids?.FirstOrDefault(c => c != null)).ParseToString(),
|
||||
main_cat_name = (detailInfo.cats?.FirstOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(),
|
||||
main_img = main_img,
|
||||
mdy_time = DateTime.Now,
|
||||
notes = "机会商品",
|
||||
price_text = detailInfo.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + detailInfo.sku.Max(s => s.multi_price).ParseToInt() * 0.01m,
|
||||
product_json = JsonHelper.SerializeObject(pddProdInfo),
|
||||
product_name = detailInfo.goods_name,
|
||||
select_count = 0,
|
||||
select_total_count = 0,
|
||||
size_json = "",
|
||||
skc_id = detailInfo.goods_id.ParseToString(),
|
||||
sku_img_replace_url = "",
|
||||
sku_img_replace_id = 0,
|
||||
sku_img_replace_base64 = "",
|
||||
spu_id = detailInfo.goods_id.ParseToString(),
|
||||
};
|
||||
|
||||
for (int i = 0; i< txtSendCount.Text.ParseToInt(); i++)
|
||||
{
|
||||
var selectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(dbProd));
|
||||
selectProd.out_product_Id = dbProd.id.ToString();
|
||||
selectProd.id = 1;
|
||||
selectProd.kjdDbProduct = dbProd;
|
||||
if (prodUserSelectForm.lstTemuDBProductSelect.Count > 0)
|
||||
selectProd.id = prodUserSelectForm.lstTemuDBProductSelect.Max(p => p.id) + 1;
|
||||
prodUserSelectForm.lstTemuDBProductSelect.Add(selectProd);
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
prodUserSelectForm.lblWaitToUp.Text = "待上传商品 " + prodUserSelectForm.lstTemuDBProductSelect.Count + " 件";
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", prodUserSelectForm.lstTemuDBProductSelect);
|
||||
}));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user