订单金额统计利润计算功能

This commit is contained in:
wule committed 2025-09-02 19:03:37 +08:00
1 parent eca6a8a9e7
commit cc539ce604
27 files changed
+2090 -214

No files matched your search

+108 -107
View File
@@ -35,13 +35,15 @@ namespace TemuKJD.KJDForms.ProductForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnSearchPrice = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -52,9 +54,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -68,12 +67,11 @@ namespace TemuKJD.KJDForms.ProductForms
this.colPrcie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
@@ -82,12 +80,14 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -110,6 +110,89 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 11;
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1121, 449);
this.splitContainer3.SplitterDistance = 420;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1121, 420);
this.splitContainer2.SplitterDistance = 280;
this.splitContainer2.TabIndex = 0;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Size = new System.Drawing.Size(1121, 25);
this.splitContainer4.SplitterDistance = 587;
this.splitContainer4.TabIndex = 3;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(303, -1);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -212,45 +295,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.btnRefreshShop.Text = "刷新店铺";
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1121, 449);
this.splitContainer3.SplitterDistance = 420;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1121, 420);
this.splitContainer2.SplitterDistance = 280;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
@@ -390,61 +434,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.dgvProduct.TabIndex = 187;
this.dgvProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvProduct_Scroll);
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Size = new System.Drawing.Size(1121, 25);
this.splitContainer4.SplitterDistance = 587;
this.splitContainer4.TabIndex = 3;
//
// 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(587, 25);
this.statusBar.TabIndex = 2;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(303, -1);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
this.btnClear.Visible = false;
//
// colCheck
//
this.colCheck.HeaderText = "选择";
@@ -543,12 +532,24 @@ namespace TemuKJD.KJDForms.ProductForms
this.colMsg.ReadOnly = true;
this.colMsg.Width = 400;
//
// 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(587, 25);
this.statusBar.TabIndex = 2;
//
// PurchasePriceForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1121, 573);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "PurchasePriceForm";
this.Text = "PurchasePriceForm";
this.Load += new System.EventHandler(this.PurchasePriceForm_Load);
@@ -557,8 +558,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
@@ -567,12 +566,14 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
@@ -16,6 +16,7 @@ using System.Windows.Forms;
using TemuKJD.Extension;
using TemuKJD.KJDForms.BaseForms;
using TemuKJD.KJDForms.ShopForms;
using Work;
namespace TemuKJD.KJDForms.ProductForms
{
@@ -24,6 +25,7 @@ namespace TemuKJD.KJDForms.ProductForms
private CheckBox chkSelectAll = null;
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
List<TemuListProductInfo> lstProductInfo = new List<TemuListProductInfo>();
List<TemuDBProductPurchasePriceInfo> lstProductPurchasePrice = new List<TemuDBProductPurchasePriceInfo>();
public PurchasePriceForm()
{
@@ -38,6 +40,7 @@ namespace TemuKJD.KJDForms.ProductForms
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
this.dgvProduct.AddSelectorColumn("colCheck");
//this.dgvProduct.MergeColumnHeader(new List<string>() { "colSupplierId", "colSupplierName" }, "店铺信息", true);
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
@@ -315,42 +318,50 @@ namespace TemuKJD.KJDForms.ProductForms
if (jArr == null)
jArr = new JArray();
List<TemuListProductInfo> productInfoLst = new List<TemuListProductInfo>();
List<string> productInfoSpuIdLst = new List<string>();
foreach (var item in jArr)
{
string sItem = JsonHelper.SerializeObject(item);
TemuListProductInfo pInfo = JsonHelper.DeserializeJsonToObject<TemuListProductInfo>(sItem); // 反序列化得到类
List<string> productInfoSpuIdLst= new List<string>();
if (pInfo != null && !lstProductInfo.Any(a => a.productId == pInfo.productId))
{
lstProductInfo.Add(pInfo);
productInfoLst.Add(pInfo);
productInfoSpuIdLst.Add(pInfo.productId.ParseToString());
Invoke(new Action(() =>
{
int rowId = this.dgvProduct.Rows.Add(
true,
shop.ShopId,
shop.ShopAccount, // pInfo.supplierName, // 列表里取不到,这里取shop里的
pInfo.mainImageUrl.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/60x",
defaultBitmap,//image, // skc图片
pInfo.productId,
pInfo.productSkcId,
pInfo.productName, // 商品标题
pInfo.extCode,
"",
"",
"设置",
"" // 操作结果,状态
);
dgvProduct.Rows[rowId].Height = 60;
}));
}
}
List<TemuDBProductPurchasePriceInfo> productPurchasePriceList = GetPurchasePrice(productInfoSpuIdLst);
this.lstProductPurchasePrice.AddRange(productPurchasePriceList);
foreach (var pInfo in productInfoLst)
{
Invoke(new Action(() =>
{
int rowId = this.dgvProduct.Rows.Add(
true,
shop.ShopId,
shop.ShopAccount, // pInfo.supplierName, // 列表里取不到,这里取shop里的
pInfo.mainImageUrl.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/60x",
defaultBitmap,//image, // skc图片
pInfo.productId,
pInfo.productSkcId,
pInfo.productName, // 商品标题
pInfo.extCode,
"",
"",
"设置",
"" // 操作结果,状态
);
dgvProduct.Rows[rowId].Height = 60;
}));
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError(ex.Message);
catch (Exception ex)
{
BaseMsgForm.ShowError(ex.Message);
}
Invoke(new Action(() =>
{
@@ -449,9 +460,37 @@ namespace TemuKJD.KJDForms.ProductForms
ShowDgvImg(this.dgvProduct);
}
void GetPurchasePrice()
List<TemuDBProductPurchasePriceInfo> GetPurchasePrice(List<string> productIdList)
{
List<TemuDBProductPurchasePriceInfo> list = new List<TemuDBProductPurchasePriceInfo>();
for (int i = 0; i < productIdList.Count; i++)
{
productIdList[i] = productIdList[i].Replace(",", "").Replace("'", "").Replace("\"", "");
}
var url = BaseClass.BuildObjString("price/get_purchase_price_list");
var data = UserLogin.GetSignaturex();
data += "&page=1";
data += "&page_size=" + productIdList.Count;
data += "&in_spu_id=" + string.Join(",", productIdList);
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
return list;
}
if (!html.Contains("data"))
return list;
var jArr = JObject.Parse(html)["data"];
if (jArr.Count() == 0)
return list;
return JsonHelper.DeserializeJsonToList<TemuDBProductPurchasePriceInfo>(jArr.ToString());
}
}
}
@@ -40,7 +40,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <summary>
/// 待备货商品列表
/// </summary>
List<SubOrderInfo> lstSubOrderInfo = new List<SubOrderInfo>();
List<WarehouseProductSubOrderInfo> lstSubOrderInfo = new List<WarehouseProductSubOrderInfo>();
public SaleStockUpForm()
{
@@ -463,7 +463,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subOrderInfo"></param>
/// <returns></returns>
private string QueryStockBaseInfo(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string QueryStockBaseInfo(ShopLoginInfo shop, WarehouseProductSubOrderInfo subOrderInfo)
{
if (isNewService)
return QueryStockBaseInfo2(shop, subOrderInfo);
@@ -475,7 +475,7 @@ namespace TemuKJD.KJDForms.ProductForms
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private string QueryStockBaseInfo2(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string QueryStockBaseInfo2(ShopLoginInfo shop, WarehouseProductSubOrderInfo subOrderInfo)
{
string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/queryStockBaseInfo";
string body = "{\"productSkcId\":" + subOrderInfo.productSkcId
@@ -490,7 +490,7 @@ namespace TemuKJD.KJDForms.ProductForms
/// <param name="shop"></param>
/// <param name="subOrderInfo"></param>
/// <returns></returns>
private string CreateStockOrder(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string CreateStockOrder(ShopLoginInfo shop, WarehouseProductSubOrderInfo subOrderInfo)
{
if (isNewService)
return CreateStockOrder2(shop, subOrderInfo);
@@ -509,7 +509,7 @@ namespace TemuKJD.KJDForms.ProductForms
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private string CreateStockOrder2(ShopLoginInfo shop, SubOrderInfo subOrderInfo)
private string CreateStockOrder2(ShopLoginInfo shop, WarehouseProductSubOrderInfo subOrderInfo)
{
string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/createStockOrder";
string body = "{\"productSkcId\":" + subOrderInfo.productSkcId + "," +
@@ -853,11 +853,11 @@ namespace TemuKJD.KJDForms.ProductForms
BaseMsgForm.ShowError(ex.Message);
}
List<SubOrderInfo> subOrderInfoLstTmp = new List<SubOrderInfo>();
List<WarehouseProductSubOrderInfo> subOrderInfoLstTmp = new List<WarehouseProductSubOrderInfo>();
foreach (var item in jArr)
{
string sItem = item.ToString();
SubOrderInfo sInfo = JsonHelper.DeserializeJsonToObject<SubOrderInfo>(sItem); // 反序列化得到类
WarehouseProductSubOrderInfo sInfo = JsonHelper.DeserializeJsonToObject<WarehouseProductSubOrderInfo>(sItem); // 反序列化得到类
if (sInfo != null)
{
foreach(var sku in sInfo.skuQuantityDetailList)