订单优化相关功能

This commit is contained in:
wule_5900x committed 2026-05-24 01:07:07 +08:00
1 parent 2afe960b6c
commit abdc09afa1
13 files changed
+1097 -808

No files matched your search

+1
View File
@@ -300,6 +300,7 @@
<Compile Include="Model\Result\WXResult\WxOptimizeOrderAfterSaleInfo.cs" />
<Compile Include="Model\Result\WXResult\WxOptimizeProductEvaluationInfo.cs" />
<Compile Include="Model\Result\WXResult\WxOptimizeLinerCgiInfo.cs" />
<Compile Include="Model\Result\WXResult\WxOrderExpressInfo.cs" />
<Compile Include="Model\Result\WXResult\WxOrderInfoLite.cs" />
<Compile Include="Model\Result\WXResult\WxOptimizeOrderWayBillInfo.cs" />
<Compile Include="Model\Result\WXResult\WXShopDefaultAddressInfo.cs" />
+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 1099;
public static int VersionCount = 1101;
//public static int VersionCount = 613;
/// <summary>
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Result.WXResult
{
public class WxOrderExpressInfo
{
public int? deliverType { get; set; } // 5,
public string phone { get; set; } // "3859",
public List<WxDeliveryProductInfo> deliveryProductInfo { get; set; } //
public int? orderProductCnt { get; set; } // 1,
public int? deliveryCnt { get; set; } // 1,
public bool? isIntracityOrder { get; set; } // false,
public object intracityTracking { get; set; } // null,
public List<object> formatUnshippedProductList { get; set; } // [ ],
public Dictionary<string, string> product2Img { get; set; } // "15197350020": "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a080c080007548c0abba40bffc31715000000a100004f50"
}
public class WxDeliveryProductInfo
{
public string waybillId { get; set; } // "772064086780390",
public string deliveryId { get; set; } // "STO",
public List<WxDeliveryProductInfoInfo> productInfos { get; set; }
public string deliveryName { get; set; } // "申通快递",
public string deliveryTime { get; set; } // "1779537701",
public int? deliverType { get; set; } // 5,
public int? waybillStatus { get; set; } // 0
}
public class WxDeliveryProductInfoInfo
{
public string productId { get; set; } // "10000859462312",
public string skuId { get; set; } // "15197350020",
public int? productCnt { get; set; } // 1,
public string supplyProductId { get; set; } // "0",
public string supplySkuId { get; set; } // "0"
}
}
+8 -8
View File
@@ -294,16 +294,16 @@
<Compile Include="WXForms\ProductForms\ActivityForms\WXActivity618Form.Designer.cs">
<DependentUpon>WXActivity618Form.cs</DependentUpon>
</Compile>
<Compile Include="WXForms\ProductForms\WXOrderListAddSkuPriceForm.cs">
<Compile Include="WXForms\OrderForms\WXOrderListOptimizeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WXForms\ProductForms\WXOrderListAddSkuPriceForm.Designer.cs">
<DependentUpon>WXOrderListAddSkuPriceForm.cs</DependentUpon>
<Compile Include="WXForms\OrderForms\WXOrderListOptimizeForm.Designer.cs">
<DependentUpon>WXOrderListOptimizeForm.cs</DependentUpon>
</Compile>
<Compile Include="WXForms\ProductForms\WXOrderListForm.cs">
<Compile Include="WXForms\OrderForms\WXOrderListForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WXForms\ProductForms\WXOrderListForm.Designer.cs">
<Compile Include="WXForms\OrderForms\WXOrderListForm.Designer.cs">
<DependentUpon>WXOrderListForm.cs</DependentUpon>
</Compile>
<Compile Include="WXForms\ProductForms\WXOrderConsignmentForm.cs">
@@ -1384,10 +1384,10 @@
<EmbeddedResource Include="WXForms\ProductForms\ActivityForms\WXActivity618Form.resx">
<DependentUpon>WXActivity618Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WXForms\ProductForms\WXOrderListAddSkuPriceForm.resx">
<DependentUpon>WXOrderListAddSkuPriceForm.cs</DependentUpon>
<EmbeddedResource Include="WXForms\OrderForms\WXOrderListOptimizeForm.resx">
<DependentUpon>WXOrderListOptimizeForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WXForms\ProductForms\WXOrderListForm.resx">
<EmbeddedResource Include="WXForms\OrderForms\WXOrderListForm.resx">
<DependentUpon>WXOrderListForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WXForms\ProductForms\WXOrderConsignmentForm.resx">
@@ -1,7 +1,7 @@
using TemuKJD.PDDForms.ProductSelectForms;
namespace TemuKJD.WXForms.ProductForms
namespace TemuKJD.WXForms.OrderForms
{
partial class WXOrderListForm
{
@@ -54,6 +54,10 @@ namespace TemuKJD.WXForms.ProductForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnStopBatchOnlieWaybill = new DevComponents.DotNetBar.PanelEx();
@@ -77,12 +81,9 @@ namespace TemuKJD.WXForms.ProductForms
this.txtFilterOrderProdInfo = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtFilterOrderId = new System.Windows.Forms.TextBox();
this.btnBatchDel = new DevComponents.DotNetBar.PanelEx();
this.label4 = new System.Windows.Forms.Label();
this.btnFiltSelect = new DevComponents.DotNetBar.PanelEx();
this.btnStopOp = new DevComponents.DotNetBar.PanelEx();
this.btnClearList = new DevComponents.DotNetBar.PanelEx();
this.btnCancel = new DevComponents.DotNetBar.PanelEx();
this.chkFilterBeginTime = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkFilterEndTime = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
@@ -125,6 +126,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.pnlBuyUrl = new System.Windows.Forms.Panel();
this.lblBuyUrlSpuCode = new System.Windows.Forms.Label();
this.lblBuyUrlShopId = new System.Windows.Forms.Label();
@@ -162,7 +164,6 @@ namespace TemuKJD.WXForms.ProductForms
this.lblOrderId = new System.Windows.Forms.Label();
this.lblShopName = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvOrder = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
@@ -194,7 +195,9 @@ namespace TemuKJD.WXForms.ProductForms
this.colTotalPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDiscount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCurrentPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAddPrice = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCurrentStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSendGift = new System.Windows.Forms.DataGridViewLinkColumn();
this.colOptimizeOrderProduct = new System.Windows.Forms.DataGridViewLinkColumn();
this.colEndDiscount = new System.Windows.Forms.DataGridViewLinkColumn();
this.colOrderStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBuyUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -226,10 +229,10 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.pnlBuyUrl.SuspendLayout();
this.pnlEditReceiveInfo.SuspendLayout();
this.pnlUpdateNotes.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvOrder)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
@@ -254,7 +257,7 @@ namespace TemuKJD.WXForms.ProductForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1698, 641);
this.splitContainer1.Size = new System.Drawing.Size(2136, 641);
this.splitContainer1.SplitterDistance = 165;
this.splitContainer1.TabIndex = 11;
//
@@ -287,17 +290,14 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx3.Controls.Add(this.txtFilterOrderProdInfo);
this.ucGroupBoxEx3.Controls.Add(this.label9);
this.ucGroupBoxEx3.Controls.Add(this.txtFilterOrderId);
this.ucGroupBoxEx3.Controls.Add(this.btnBatchDel);
this.ucGroupBoxEx3.Controls.Add(this.label4);
this.ucGroupBoxEx3.Controls.Add(this.btnFiltSelect);
this.ucGroupBoxEx3.Controls.Add(this.btnStopOp);
this.ucGroupBoxEx3.Controls.Add(this.btnClearList);
this.ucGroupBoxEx3.Controls.Add(this.btnCancel);
this.ucGroupBoxEx3.Controls.Add(this.chkFilterBeginTime);
this.ucGroupBoxEx3.Controls.Add(this.chkFilterEndTime);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(595, 2);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(495, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(1101, 165);
this.ucGroupBoxEx3.Size = new System.Drawing.Size(1639, 165);
this.ucGroupBoxEx3.TabIndex = 668;
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "订单操作";
@@ -582,35 +582,11 @@ namespace TemuKJD.WXForms.ProductForms
this.txtFilterOrderId.Size = new System.Drawing.Size(178, 25);
this.txtFilterOrderId.TabIndex = 833;
//
// btnBatchDel
//
this.btnBatchDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBatchDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBatchDel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBatchDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBatchDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchDel.Location = new System.Drawing.Point(995, 61);
this.btnBatchDel.Name = "btnBatchDel";
this.btnBatchDel.Size = new System.Drawing.Size(84, 23);
this.btnBatchDel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnBatchDel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnBatchDel.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnBatchDel.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnBatchDel.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnBatchDel.Style.GradientAngle = 90;
this.btnBatchDel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnBatchDel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchDel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnBatchDel.TabIndex = 817;
this.btnBatchDel.Text = "批量代发";
this.btnBatchDel.Visible = false;
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(977, 34);
this.label4.Location = new System.Drawing.Point(1412, 130);
this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(116, 17);
@@ -620,11 +596,12 @@ namespace TemuKJD.WXForms.ProductForms
//
// btnFiltSelect
//
this.btnFiltSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnFiltSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnFiltSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnFiltSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnFiltSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFiltSelect.Location = new System.Drawing.Point(891, 31);
this.btnFiltSelect.Location = new System.Drawing.Point(1326, 127);
this.btnFiltSelect.Name = "btnFiltSelect";
this.btnFiltSelect.Size = new System.Drawing.Size(84, 23);
this.btnFiltSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -643,39 +620,13 @@ namespace TemuKJD.WXForms.ProductForms
this.btnFiltSelect.Visible = false;
this.btnFiltSelect.Click += new System.EventHandler(this.btnFiltSelect_Click);
//
// btnStopOp
//
this.btnStopOp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopOp.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopOp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopOp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopOp.Location = new System.Drawing.Point(995, 121);
this.btnStopOp.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStopOp.Name = "btnStopOp";
this.btnStopOp.Size = new System.Drawing.Size(84, 23);
this.btnStopOp.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStopOp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStopOp.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnStopOp.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOp.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnStopOp.Style.GradientAngle = 90;
this.btnStopOp.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOp.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnStopOp.TabIndex = 546;
this.btnStopOp.Text = "停止操作";
this.btnStopOp.Visible = false;
this.btnStopOp.Click += new System.EventHandler(this.btnStop_Click);
//
// btnClearList
//
this.btnClearList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearList.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearList.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearList.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearList.Location = new System.Drawing.Point(891, 68);
this.btnClearList.Location = new System.Drawing.Point(1532, 127);
this.btnClearList.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearList.Name = "btnClearList";
this.btnClearList.Size = new System.Drawing.Size(84, 23);
@@ -696,32 +647,6 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClearList.Visible = false;
this.btnClearList.Click += new System.EventHandler(this.btnClearDgv_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(995, 31);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(84, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnCancel.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnCancel.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnCancel.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnCancel.Style.GradientAngle = 90;
this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnCancel.TabIndex = 517;
this.btnCancel.Text = "批量取消";
this.btnCancel.Visible = false;
this.btnCancel.Click += new System.EventHandler(this.btnCancelConsignment_Click);
//
// chkFilterBeginTime
//
this.chkFilterBeginTime.AutoSize = true;
@@ -756,7 +681,7 @@ namespace TemuKJD.WXForms.ProductForms
this.ucGroupBoxEx4.Controls.Add(this.btnSearchOrder);
this.ucGroupBoxEx4.Location = new System.Drawing.Point(186, 2);
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
this.ucGroupBoxEx4.Size = new System.Drawing.Size(410, 165);
this.ucGroupBoxEx4.Size = new System.Drawing.Size(310, 165);
this.ucGroupBoxEx4.TabIndex = 666;
this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "商品流量查询";
@@ -801,7 +726,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnStopSearch.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopSearch.Location = new System.Drawing.Point(338, 127);
this.btnStopSearch.Location = new System.Drawing.Point(238, 127);
this.btnStopSearch.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnStopSearch.Name = "btnStopSearch";
this.btnStopSearch.Size = new System.Drawing.Size(58, 25);
@@ -827,7 +752,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnClearFilter.CanvasColor = System.Drawing.SystemColors.Control;
this.btnClearFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearFilter.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearFilter.Location = new System.Drawing.Point(338, 25);
this.btnClearFilter.Location = new System.Drawing.Point(238, 25);
this.btnClearFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnClearFilter.Name = "btnClearFilter";
this.btnClearFilter.Size = new System.Drawing.Size(58, 25);
@@ -854,7 +779,7 @@ namespace TemuKJD.WXForms.ProductForms
this.btnSearchOrder.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearchOrder.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearchOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearchOrder.Location = new System.Drawing.Point(239, 127);
this.btnSearchOrder.Location = new System.Drawing.Point(139, 127);
this.btnSearchOrder.Name = "btnSearchOrder";
this.btnSearchOrder.Size = new System.Drawing.Size(96, 25);
this.btnSearchOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1172,7 +1097,7 @@ namespace TemuKJD.WXForms.ProductForms
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1698, 472);
this.splitContainer3.Size = new System.Drawing.Size(2136, 472);
this.splitContainer3.SplitterDistance = 442;
this.splitContainer3.TabIndex = 1;
//
@@ -1191,13 +1116,13 @@ namespace TemuKJD.WXForms.ProductForms
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.pnlBuyUrl);
this.splitContainer2.Panel2.Controls.Add(this.pnlEditReceiveInfo);
this.splitContainer2.Panel2.Controls.Add(this.pnlUpdateNotes);
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
this.splitContainer2.Panel2.Controls.Add(this.dgvOrder);
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1698, 442);
this.splitContainer2.Size = new System.Drawing.Size(2136, 442);
this.splitContainer2.SplitterDistance = 350;
this.splitContainer2.TabIndex = 0;
//
@@ -1375,6 +1300,18 @@ namespace TemuKJD.WXForms.ProductForms
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(866, 196);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 780;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// pnlBuyUrl
//
this.pnlBuyUrl.Anchor = System.Windows.Forms.AnchorStyles.Top;
@@ -1389,7 +1326,7 @@ namespace TemuKJD.WXForms.ProductForms
this.pnlBuyUrl.Controls.Add(this.lblBuyUrlShopName);
this.pnlBuyUrl.Controls.Add(this.label12);
this.pnlBuyUrl.Controls.Add(this.label6);
this.pnlBuyUrl.Location = new System.Drawing.Point(694, 252);
this.pnlBuyUrl.Location = new System.Drawing.Point(913, 252);
this.pnlBuyUrl.Name = "pnlBuyUrl";
this.pnlBuyUrl.Size = new System.Drawing.Size(474, 146);
this.pnlBuyUrl.TabIndex = 784;
@@ -1534,7 +1471,7 @@ namespace TemuKJD.WXForms.ProductForms
this.pnlEditReceiveInfo.Controls.Add(this.lblEditReceiveInfoOrderId);
this.pnlEditReceiveInfo.Controls.Add(this.lblEditReceiveInfoShopName);
this.pnlEditReceiveInfo.Controls.Add(this.label11);
this.pnlEditReceiveInfo.Location = new System.Drawing.Point(179, 248);
this.pnlEditReceiveInfo.Location = new System.Drawing.Point(398, 248);
this.pnlEditReceiveInfo.Name = "pnlEditReceiveInfo";
this.pnlEditReceiveInfo.Size = new System.Drawing.Size(474, 191);
this.pnlEditReceiveInfo.TabIndex = 783;
@@ -1688,7 +1625,7 @@ namespace TemuKJD.WXForms.ProductForms
this.pnlUpdateNotes.Controls.Add(this.lblOrderId);
this.pnlUpdateNotes.Controls.Add(this.lblShopName);
this.pnlUpdateNotes.Controls.Add(this.label5);
this.pnlUpdateNotes.Location = new System.Drawing.Point(435, 64);
this.pnlUpdateNotes.Location = new System.Drawing.Point(654, 64);
this.pnlUpdateNotes.Name = "pnlUpdateNotes";
this.pnlUpdateNotes.Size = new System.Drawing.Size(474, 146);
this.pnlUpdateNotes.TabIndex = 782;
@@ -1858,18 +1795,6 @@ namespace TemuKJD.WXForms.ProductForms
this.label5.TabIndex = 482;
this.label5.Text = "单号:";
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(647, 196);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 780;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// dgvOrder
//
this.dgvOrder.AllowUserToAddRows = false;
@@ -1915,7 +1840,9 @@ namespace TemuKJD.WXForms.ProductForms
this.colTotalPrice,
this.colDiscount,
this.colCurrentPrice,
this.colAddPrice,
this.colCurrentStock,
this.colSendGift,
this.colOptimizeOrderProduct,
this.colEndDiscount,
this.colOrderStatus,
this.colBuyUrl,
@@ -1936,7 +1863,7 @@ namespace TemuKJD.WXForms.ProductForms
this.dgvOrder.Name = "dgvOrder";
this.dgvOrder.ReadOnly = true;
this.dgvOrder.RowTemplate.Height = 23;
this.dgvOrder.Size = new System.Drawing.Size(1340, 442);
this.dgvOrder.Size = new System.Drawing.Size(1778, 442);
this.dgvOrder.TabIndex = 187;
this.dgvOrder.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
//
@@ -1955,8 +1882,8 @@ namespace TemuKJD.WXForms.ProductForms
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
this.splitContainer4.Size = new System.Drawing.Size(1698, 26);
this.splitContainer4.SplitterDistance = 1007;
this.splitContainer4.Size = new System.Drawing.Size(2136, 26);
this.splitContainer4.SplitterDistance = 1445;
this.splitContainer4.TabIndex = 3;
//
// statusBar
@@ -1967,7 +1894,7 @@ namespace TemuKJD.WXForms.ProductForms
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(1007, 26);
this.statusBar.Size = new System.Drawing.Size(1445, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
@@ -2251,12 +2178,31 @@ namespace TemuKJD.WXForms.ProductForms
this.colCurrentPrice.ReadOnly = true;
this.colCurrentPrice.Width = 50;
//
// colAddPrice
// colCurrentStock
//
this.colAddPrice.HeaderText = "改价";
this.colAddPrice.Name = "colAddPrice";
this.colAddPrice.ReadOnly = true;
this.colAddPrice.Width = 38;
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colCurrentStock.DefaultCellStyle = dataGridViewCellStyle16;
this.colCurrentStock.HeaderText = "现库存";
this.colCurrentStock.Name = "colCurrentStock";
this.colCurrentStock.ReadOnly = true;
this.colCurrentStock.Width = 50;
//
// colSendGift
//
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colSendGift.DefaultCellStyle = dataGridViewCellStyle17;
this.colSendGift.HeaderText = "礼";
this.colSendGift.Name = "colSendGift";
this.colSendGift.ReadOnly = true;
this.colSendGift.Visible = false;
this.colSendGift.Width = 30;
//
// colOptimizeOrderProduct
//
this.colOptimizeOrderProduct.HeaderText = "优化";
this.colOptimizeOrderProduct.Name = "colOptimizeOrderProduct";
this.colOptimizeOrderProduct.ReadOnly = true;
this.colOptimizeOrderProduct.Width = 38;
//
// colEndDiscount
//
@@ -2267,8 +2213,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colOrderStatus
//
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOrderStatus.DefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOrderStatus.DefaultCellStyle = dataGridViewCellStyle18;
this.colOrderStatus.HeaderText = "状态";
this.colOrderStatus.Name = "colOrderStatus";
this.colOrderStatus.ReadOnly = true;
@@ -2276,8 +2222,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colBuyUrl
//
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colBuyUrl.DefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colBuyUrl.DefaultCellStyle = dataGridViewCellStyle19;
this.colBuyUrl.HeaderText = "采购地址";
this.colBuyUrl.Name = "colBuyUrl";
this.colBuyUrl.ReadOnly = true;
@@ -2293,8 +2239,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colReceiveInfo
//
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colReceiveInfo.DefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colReceiveInfo.DefaultCellStyle = dataGridViewCellStyle20;
this.colReceiveInfo.HeaderText = "收货信息";
this.colReceiveInfo.Name = "colReceiveInfo";
this.colReceiveInfo.ReadOnly = true;
@@ -2302,19 +2248,23 @@ namespace TemuKJD.WXForms.ProductForms
//
// colDecrypt
//
this.colDecrypt.HeaderText = "解密";
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colDecrypt.DefaultCellStyle = dataGridViewCellStyle21;
this.colDecrypt.HeaderText = "👁";
this.colDecrypt.Name = "colDecrypt";
this.colDecrypt.ReadOnly = true;
this.colDecrypt.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDecrypt.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colDecrypt.Width = 38;
this.colDecrypt.Width = 30;
//
// colAddReceiveInfo
//
this.colAddReceiveInfo.HeaderText = "填写";
dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.colAddReceiveInfo.DefaultCellStyle = dataGridViewCellStyle22;
this.colAddReceiveInfo.HeaderText = "填";
this.colAddReceiveInfo.Name = "colAddReceiveInfo";
this.colAddReceiveInfo.ReadOnly = true;
this.colAddReceiveInfo.Width = 38;
this.colAddReceiveInfo.Width = 30;
//
// colPrintId
//
@@ -2324,27 +2274,26 @@ namespace TemuKJD.WXForms.ProductForms
//
// colOnlineWaybillOrderId
//
this.colOnlineWaybillOrderId.HeaderText = "寄件任务编号";
this.colOnlineWaybillOrderId.HeaderText = "任务编号";
this.colOnlineWaybillOrderId.Name = "colOnlineWaybillOrderId";
this.colOnlineWaybillOrderId.ReadOnly = true;
this.colOnlineWaybillOrderId.Width = 145;
//
// colOnlineWaybill
//
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOnlineWaybill.DefaultCellStyle = dataGridViewCellStyle19;
this.colOnlineWaybill.HeaderText = "寄件";
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOnlineWaybill.DefaultCellStyle = dataGridViewCellStyle23;
this.colOnlineWaybill.HeaderText = "打印";
this.colOnlineWaybill.Name = "colOnlineWaybill";
this.colOnlineWaybill.ReadOnly = true;
this.colOnlineWaybill.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colOnlineWaybill.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colOnlineWaybill.Visible = false;
this.colOnlineWaybill.Width = 38;
//
// colNotes
//
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNotes.DefaultCellStyle = dataGridViewCellStyle20;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNotes.DefaultCellStyle = dataGridViewCellStyle24;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
@@ -2359,8 +2308,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colEditNotes
//
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.DefaultCellStyle = dataGridViewCellStyle21;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colEditNotes.DefaultCellStyle = dataGridViewCellStyle25;
this.colEditNotes.HeaderText = "修改";
this.colEditNotes.Name = "colEditNotes";
this.colEditNotes.ReadOnly = true;
@@ -2368,8 +2317,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colOpResult
//
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOpResult.DefaultCellStyle = dataGridViewCellStyle22;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOpResult.DefaultCellStyle = dataGridViewCellStyle26;
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
@@ -2379,7 +2328,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1698, 641);
this.ClientSize = new System.Drawing.Size(2136, 641);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.KeyPreview = true;
@@ -2407,13 +2356,13 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoadingShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.pnlBuyUrl.ResumeLayout(false);
this.pnlBuyUrl.PerformLayout();
this.pnlEditReceiveInfo.ResumeLayout(false);
this.pnlEditReceiveInfo.PerformLayout();
this.pnlUpdateNotes.ResumeLayout(false);
this.pnlUpdateNotes.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvOrder)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
@@ -2453,12 +2402,9 @@ namespace TemuKJD.WXForms.ProductForms
private DevComponents.DotNetBar.PanelEx btnSelectOnline;
private DevComponents.DotNetBar.PanelEx btnStopSearch;
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
private DevComponents.DotNetBar.PanelEx btnStopOp;
private DevComponents.DotNetBar.PanelEx btnClearList;
private DevComponents.DotNetBar.PanelEx btnCancel;
private System.Windows.Forms.Label label4;
private DevComponents.DotNetBar.PanelEx btnFiltSelect;
private DevComponents.DotNetBar.PanelEx btnBatchDel;
private UserComponent.UcComboBoxMutiSelect cmbFilterShopGroup;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
@@ -2565,7 +2511,9 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewTextBoxColumn colTotalPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colDiscount;
private System.Windows.Forms.DataGridViewTextBoxColumn colCurrentPrice;
private System.Windows.Forms.DataGridViewLinkColumn colAddPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colCurrentStock;
private System.Windows.Forms.DataGridViewLinkColumn colSendGift;
private System.Windows.Forms.DataGridViewLinkColumn colOptimizeOrderProduct;
private System.Windows.Forms.DataGridViewLinkColumn colEndDiscount;
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colBuyUrl;
@@ -35,8 +35,9 @@ using NaiBa.CefHelper;
using TemuKJD.Helper;
using NaiBa.CefHelper.Handler;
using CefSharp;
using TemuKJD.WXForms.ProductForms;
namespace TemuKJD.WXForms.ProductForms
namespace TemuKJD.WXForms.OrderForms
{
public partial class WXOrderListForm : BaseForm
{
@@ -392,19 +393,21 @@ namespace TemuKJD.WXForms.ProductForms
imgFrom.ShowDialog();
break;
}
case "改价":
case "礼":
case "优化":
{
WXOrderListAddSkuPriceForm form = new WXOrderListAddSkuPriceForm(shop);
form.txtGoodsName.Text = row.Cells["colProductName"].Value.ParseToString();
form.txtSkuName.Text = row.Cells["colSkuSpec"].Value.ParseToString();
form.txtCurrentPrice.Text = row.Cells["colCurrentPrice"].Value.ParseToString();
form.txtOrderPrice.Text = row.Cells["colSalePrice"].Value.ParseToString();
WXOrderListOptimizeForm form = new WXOrderListOptimizeForm(shop);
form.lblOrderId.Text = orderId;
form.lblSpuId.Text = row.Cells["colSpuId"].Value.ParseToString(); // goodsId
form.lblSkuId.Text = row.Cells["colSkuId"].Value.ParseToString(); // skuId
form.txtGoodsName.Text = row.Cells["colProductName"].Value.ParseToString(); // 商品名称
form.txtSkuName.Text = row.Cells["colSkuSpec"].Value.ParseToString(); // sku规格名称
form.txtCurrentPrice.Text = row.Cells["colCurrentPrice"].Value.ParseToString(); // 当前商品价格
form.txtOrderPrice.Text = row.Cells["colSalePrice"].Value.ParseToString(); // 订单价格
form.txtCurrentStock.Text = row.Cells["colCurrentStock"].Value.ParseToString(); // 当前库存;
form.numAddPrice.Value = 0;
form.lblSpuId.Text = row.Cells["colSpuId"].Value.ParseToString();
form.lblSkuId.Text = row.Cells["colSkuId"].Value.ParseToString();
form.TitleText = "店铺 " + shop.ShopAccount + " 修改sku价格";
form.ShowDialog();
if (form.EditSuccess == true)
if (form.EditPriceSuccess == true)
{
if (form.prodObj != null)
{
@@ -415,45 +418,50 @@ namespace TemuKJD.WXForms.ProductForms
foreach (var sku in form.prodObj["skuList"])
{
//JObject obj = new JObject();
//obj["spuId"] = spuId;
//obj["skuId"] = sku["skuId"];
//obj["salePrice"] = sku["price"].ParseToInt() + (numAddPrice.Value * 100).ParseToInt();
//skuArr.Add(obj);
if (rw.Cells["colSkuId"].Value.ParseToString() == sku["skuId"].ParseToString())
{
rw.Cells["colCurrentPrice"].Value = sku["price"].ParseToInt() * 0.01m + form.numAddPrice.Value;
break;
}
}
}
}
}
if (form.SendGiftSuccess == true)
{
foreach (var rw in this.dgvOrder.Rows.Cast<DataGridViewRow>())
{
if (rw.Cells["colOrderId"].Value.ParseToString() != orderId)
continue;
rw.Cells["colOpResult"].Value = "礼物单已发送";
}
}
if (form.ClearStock == true)
{
foreach (var rw in this.dgvOrder.Rows.Cast<DataGridViewRow>())
{
if (rw.Cells["colSpuId"].Value.ParseToString() != spuId)
continue;
if (rw.Cells["colSkuId"].Value.ParseToString() != row.Cells["colSkuId"].Value.ParseToString())
continue;
rw.Cells["colOpResult"].Value = "清除库存成功";
rw.Cells["colCurrentStock"].Value = 0;
}
}
if (form.IsDownProd == true)
{
foreach (var rw in this.dgvOrder.Rows.Cast<DataGridViewRow>())
{
if (rw.Cells["colSpuId"].Value.ParseToString() != spuId)
continue;
rw.Cells["colOpResult"].Value = "商品下架成功";
//rw.Cells["colCurrentStock"].Value = 0;
}
}
}
break;
case "取消优惠":
{
//WXOrderListAddSkuPriceForm form = new WXOrderListAddSkuPriceForm(shop);
//form.txtGoodsName.Text = row.Cells["colProductName"].Value.ParseToString();
//form.txtSkuName.Text = row.Cells["colSkuSpec"].Value.ParseToString();
//form.txtCurrentPrice.Text = row.Cells["colCurrentPrice"].Value.ParseToString();
//form.txtOrderPrice.Text = row.Cells["colSalePrice"].Value.ParseToString();
//form.numNewPrice.Value = form.txtCurrentPrice.Text.ParseToDecimal().IsNullOrZero() ? form.txtOrderPrice.Text.ParseToDecimal() : form.txtCurrentPrice.Text.ParseToDecimal();
//form.lblSpuId.Text = row.Cells["colSpuId"].Value.ParseToString();
//form.lblSkuId.Text = row.Cells["colSkuId"].Value.ParseToString();
//form.TitleText = "店铺 " + shop.ShopAccount + " 修改sku价格";
//form.ShowDialog();
//if (form.EditSuccess == true)
//{
// foreach (var rw in this.dgvOrder.Rows.Cast<DataGridViewRow>())
// {
// if (rw.Cells["colSkuId"].Value.ParseToString() == row.Cells["colSkuId"].Value.ParseToString() &&
// rw.Cells["colSpuId"].Value.ParseToString() == row.Cells["colSpuId"].Value.ParseToString())
// {
// rw.Cells["colCurrentPrice"].Value = form.numNewPrice.Value;
// }
// }
//}
int onSaleStatusCode = -1;
int pageSize = 50;
var getProdOnSaleRst = WXClearNoVisit.searchProduct(shop, 1, pageSize, spuId, onSaleStatusCode);
@@ -525,26 +533,16 @@ namespace TemuKJD.WXForms.ProductForms
{
foreach (var rw in this.dgvOrder.Rows.Cast<DataGridViewRow>())
{
//if (rw.Cells["colSkuId"].Value.ParseToString() == row.Cells["colSkuId"].Value.ParseToString() &&
// rw.Cells["colSpuId"].Value.ParseToString() == row.Cells["colSpuId"].Value.ParseToString())
//{
// rw.Cells["colOpResult"].Value = "取消优惠成功";
//}
if (rw.Cells["colSpuId"].Value.ParseToString() != spuId)
continue;
rw.Cells["colOpResult"].Value = "取消优惠成功";
foreach (var sku in prodObjs["skuList"])
{
//JObject obj = new JObject();
//obj["spuId"] = spuId;
//obj["skuId"] = sku["skuId"];
//obj["salePrice"] = sku["price"].ParseToInt() + (numAddPrice.Value * 100).ParseToInt();
//skuArr.Add(obj);
if (rw.Cells["colSkuId"].Value.ParseToString() == sku["skuId"].ParseToString())
{
rw.Cells["colCurrentPrice"].Value = sku["price"].ParseToInt() * 0.01m + deltaPrice * 0.01m;
break;
}
}
}
@@ -579,7 +577,7 @@ namespace TemuKJD.WXForms.ProductForms
ucCheckBox5.Checked = lblColorTag.Text == "4";
}
break;
case "解密":
case "👁":
{
var deRst = "测试地址写入{\"code\"0}";
deRst = WXOrderList.decryptOrder(shop, orderId);
@@ -596,14 +594,14 @@ namespace TemuKJD.WXForms.ProductForms
if (!html.Contains("\"code\":200"))
{
var errMsg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
BaseMsgForm.ShowError("解密成功但保存到服务端失败:" + errMsg);
BaseMsgForm.ShowError("查看地址成功但保存到服务端失败:" + errMsg);
row.Cells["colOpResult"].Value = errMsg;
row.Cells["colReceiveInfo"].Value = GetDecryptOrder(deRst);
row.Cells["colReceiveInfo"].Style.ForeColor = DefaultForeColor;
}
else
{
row.Cells["colOpResult"].Value = "解密成功";
row.Cells["colOpResult"].Value = "查看地址成功";
row.Cells["colReceiveInfo"].Value = GetDecryptOrder(deRst);
row.Cells["colReceiveInfo"].Style.ForeColor = DefaultForeColor;
}
@@ -611,12 +609,12 @@ namespace TemuKJD.WXForms.ProductForms
else
{
var error = BaseRegex.GetStringJsonByRegs(ref deRst, deRst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
row.Cells["colOpResult"].Value = "解密失败:" + error;
BaseMsgForm.ShowError("解密失败:" + error);
row.Cells["colOpResult"].Value = "查看地址失败:" + error;
BaseMsgForm.ShowError("查看地址失败:" + error);
}
}
break;
case "填写":
case "填":
{
pnlUpdateNotes.Visible = false;
pnlEditReceiveInfo.Visible = true;
@@ -642,7 +640,7 @@ namespace TemuKJD.WXForms.ProductForms
txtBuyUrl.Text = row.Cells["colBuyUrl"].Value.ParseToString();
}
break;
case "寄件":
case "打印":
{
Task.Run(() => { GetOnlineWayBill(shop, row); });
}
@@ -678,11 +676,11 @@ namespace TemuKJD.WXForms.ProductForms
var rst = WXOrderList.searchOnlineWaybill(shop, orderId);
if (!rst.Contains("\"code\":0"))
{
//BaseMsgForm.ShowError("在线寄件失败:" + rst, "错误", FormLevel.LARGE);
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "errMsg", "errorMsg", "err_msg", "error_msg");
//BaseMsgForm.ShowError("打印失败:" + error, "错误", FormLevel.LARGE);
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "在线寄件失败:" + error;
row.Cells["colOpResult"].Value = "打印失败:" + error;
pbLoading.Visible = false;
}));
isOnlineWayBill = false;
@@ -734,7 +732,7 @@ namespace TemuKJD.WXForms.ProductForms
//BaseMsgForm.ShowError("账号未开通在线寄件服务");
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "账号未开通在线寄件服务";
row.Cells["colOpResult"].Value = "账号未开通在线寄件服务,无法打印";
pbLoading.Visible = false;
}));
isOnlineWayBill = false;
@@ -764,11 +762,11 @@ namespace TemuKJD.WXForms.ProductForms
}
if (!result.Contains("\"ret\":0,"))
{
//BaseMsgForm.ShowError("在线寄件失败:" + result, "错误", FormLevel.LARGE);
//BaseMsgForm.ShowError("打印失败:" + result, "错误", FormLevel.LARGE);
var error = BaseRegex.GetStringJsonByRegs(ref result, result, "errMsg", "errorMsg", "err_msg", "error_msg");
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "在线寄件失败:" + error;
row.Cells["colOpResult"].Value = "打印失败:" + error;
pbLoading.Visible = false;
}));
isOnlineWayBill = false;
@@ -800,10 +798,10 @@ namespace TemuKJD.WXForms.ProductForms
if (!result.Contains("\"ret\":0,"))
{
var error = BaseRegex.GetStringJsonByRegs(ref result, result, "errMsg", "errorMsg", "err_msg", "error_msg");
//BaseMsgForm.ShowError("在线寄件失败:" + error, "错误", FormLevel.LARGE);
//BaseMsgForm.ShowError("打印失败:" + error, "错误", FormLevel.LARGE);
Invoke(new Action(() =>
{
row.Cells["colOpResult"].Value = "在线寄件失败:" + error;
row.Cells["colOpResult"].Value = "打印失败:" + error;
pbLoading.Visible = false;
}));
isOnlineWayBill = false;
@@ -814,7 +812,7 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
row.Cells["colOnlineWaybillOrderId"].Value = BaseRegex.GetStringJson(ref result, "ewaybillOrderId");
row.Cells["colOnlineWaybill"].Value = "在线\r\n寄件\r\n打印";
row.Cells["colOnlineWaybill"].Value = "再次\r\n打印";
ShowDgvRow(row);
}));
}
@@ -1058,7 +1056,7 @@ namespace TemuKJD.WXForms.ProductForms
dgvOrder.Rows.Clear();
Task.Run(() =>
{
GetConsignmentOrder(shopIdLst);
GetOrderList(shopIdLst);
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
@@ -1077,7 +1075,7 @@ namespace TemuKJD.WXForms.ProductForms
}, cancellationTokenSource.Token);
}
void GetConsignmentOrder(List<string> shopIdLst)
void GetOrderList(List<string> shopIdLst)
{
List<ShopLoginInfo> shopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId)).ToList();
@@ -1185,7 +1183,7 @@ namespace TemuKJD.WXForms.ProductForms
}
// 查找对应商品
string getProdOnSaleRst = "";
string getProdRst = "";
JObject prodObjs = new JObject();
try
{
@@ -1194,15 +1192,16 @@ namespace TemuKJD.WXForms.ProductForms
int onSaleStatusCode = -1;
pageSize = 50;
string spuIds = GetHtml.UrlEncodeUtf8(string.Join(",", orderLst.SelectMany(o => o.orderProductInfo.Select(p => p.productId)).Distinct()));
getProdOnSaleRst = WXClearNoVisit.searchProduct(shop, 1, pageSize, spuIds, onSaleStatusCode);
//getProdRst = WXClearNoVisit.searchProduct(shop, 1, pageSize, spuIds, onSaleStatusCode);
getProdRst = WXOrderList.getSkuBySpu(shop, GetHtml.UrlDecode(spuIds));
Thread.Sleep(Randomx.GetId(50, 100));
if (!getProdOnSaleRst.Contains("\"success\":true"))
if (!getProdRst.Contains("\"success\":true") && !getProdRst.Contains("\"code\":0"))
{
ShowShopError(shop, getProdOnSaleRst);
ShowShopError(shop, getProdRst);
break;
}
}
prodObjs = JsonHelper.JObjectParse(getProdOnSaleRst);
prodObjs = JsonHelper.JObjectParse(getProdRst);
}
catch { }
@@ -1217,15 +1216,31 @@ namespace TemuKJD.WXForms.ProductForms
foreach (var orderProd in order.orderProductInfo)
{
decimal? currentPrice = null;
int? currentStock = null;
try
{
var prod = prodObjs["productList"].FirstOrDefault(p => p["productId"].ParseToString() == orderProd.productId);
//var prod = prodObjs["productList"].FirstOrDefault(p => p["productId"].ParseToString() == orderProd.productId);
//if (prod != null)
//{
// var prodStr = prod.ParseToString();
// var sku = prod["skuList"].FirstOrDefault(p => p["skuId"].ParseToString() == orderProd.skuId);
// if (sku != null)
// {
// currentPrice = sku["price"].ParseToDecimal() * 0.01m;
// }
//}
var prod = prodObjs["products"].FirstOrDefault(p => p["productKey"]["productId"].ParseToString() == orderProd.productId);
if (prod != null)
{
var prodStr = prod.ParseToString();
var sku = prod["skuList"].FirstOrDefault(p => p["skuId"].ParseToString() == orderProd.skuId);
var sku = prod["productSkus"].FirstOrDefault(p => p["skuKey"]["skuId"].ParseToString() == orderProd.skuId);
if (sku != null)
currentPrice = sku["price"].ParseToDecimal() * 0.01m;
{
var skuStr = JsonHelper.SerializeObject(sku);
currentPrice = BaseRegex.GetIntJson(ref skuStr, "salePrice") * 0.01m;
currentStock = BaseRegex.GetIntJson(ref skuStr, "stockNum");
}
}
}
catch { }
@@ -1270,7 +1285,9 @@ namespace TemuKJD.WXForms.ProductForms
discount > 0 ? discount * 0.01m : null, // 商品优惠
currentPrice,
"改价",
currentStock,
"礼",
"优化",
"取消优惠",
order.commonInfo.statusStr, // 订单状态
@@ -1278,21 +1295,21 @@ namespace TemuKJD.WXForms.ProductForms
buyUrlNotes?.buy_url_notes, // 采购地址
"编辑",
DecryptAddress.IsNullOrEmpty() ? (order.acceptInfo.addressInfo.userName + " " + order.acceptInfo.addressInfo.telNumber + " " +
string.IsNullOrWhiteSpace(DecryptAddress) ? (order.acceptInfo.addressInfo.userName + " " + order.acceptInfo.addressInfo.telNumber + " " +
order.acceptInfo.addressInfo.provinceName + " " + order.acceptInfo.addressInfo.cityName + " " +
order.acceptInfo.addressInfo.countyName + " " + order.acceptInfo.addressInfo.detailInfo + " " +
" 未解密") : DecryptAddress, // 收件地址解密
" 未查看地址") : DecryptAddress, // 收件地址解密
"解密",
"填写",
"👁",
"填",
"", // 在线寄件打印单号
order.expressData?.type == 3 && order.expressData?.status != 1 ? order.expressData?.jumpPath?.Substring((order.expressData?.jumpPath).ParseToString().IndexOf("ewaybillOrderId=")).Replace("ewaybillOrderId=", "") : "",
order.expressData?.type == 3 && order.expressData?.status != 1 ? "在线\r\n寄件\r\n打印" : "在线\r\n寄件",
order.expressData?.type == 3 && order.expressData?.status != 1 ? "再次\r\n打印" : "打印",
order.flagInfo.flagNotes, // 卖家备注
order.flagInfo.flagColor, // 卖家备注颜色
"修改",
"修改\r\n备注",
""
);
@@ -1334,10 +1351,10 @@ namespace TemuKJD.WXForms.ProductForms
row.Cells["colNotes"].Style.ForeColor = Color.Blue;
}
if (row.Cells["colReceiveInfo"].Value.ParseToString().Contains("未解密"))
if (row.Cells["colReceiveInfo"].Value.ParseToString().Contains("未查看地址"))
row.Cells["colReceiveInfo"].Style.ForeColor = Color.DarkGray;
if (row.Cells["colOnlineWaybill"].Value.ParseToString() == "在线\r\n寄件\r\n打印")
if (row.Cells["colOnlineWaybill"].Value.ParseToString() == "再次\r\n打印")
{
(row.Cells["colOnlineWaybill"] as DataGridViewLinkCell).LinkColor = Color.Red; // Color.Blue
(row.Cells["colOnlineWaybill"] as DataGridViewLinkCell).VisitedLinkColor = Color.DarkRed; // Color.FromArgb(255, 128, 0, 128)
@@ -1514,166 +1531,6 @@ namespace TemuKJD.WXForms.ProductForms
}
}
private void btnCancelConsignment_Click(object sender, EventArgs e)
{
var rowLst = dgvOrder.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList();
if (rowLst.Count <= 0)
{
BaseMsgForm.ShowError("请勾选需要操作的订单!");
return;
}
if (BaseMsgForm.ShowConfirm("确认要取消分配吗?取消分配后,订单将回到待分配状态").DialogResult != DialogResult.OK)
return;
this.pbLoading.Visible = true;
if (cancellationTokenSource != null && !cancellationTokenSource.IsCancellationRequested)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
CancelConsignment(rowLst);
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "取消分配中断";
BaseMsgForm.ShowInfo("取消分配中断");
}
else
{
this.statusBar.lblTaskStatus.Text = "取消分配完毕";
BaseMsgForm.ShowInfo("取消分配完毕");
}
this.pbLoading.Visible = false;
}));
}, cancellationTokenSource.Token);
}
void CancelConsignment(List<DataGridViewRow> rowLst)
{
Invoke(new Action(() =>
{
this.pbLoading.Visible = true;
this.statusBar.lblTaskStatus.Text = "正在取消分配" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.pgbTaskProgress.Maximum = rowLst.Count;
this.statusBar.UpdateProgressBar(0);
}));
while (rowLst.Count > 0)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var r0 = rowLst.FirstOrDefault();
var shopId = r0.Cells["colSupplierId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
var rowLstTmp = rowLst.Where(r => r.Cells["colSupplierId"].Value.ParseToString() == shopId).Take(1).ToList();
foreach (var r in rowLstTmp)
{
rowLst.RemoveAll(rw => rw.Cells["colConsignmentOrderId"].Value == r.Cells["colConsignmentOrderId"].Value);
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在取消分配" + "...".Substring(0, DateTime.Now.Second % 4);
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
r.Cells["colOpResult"].Value = "";
}));
}
if (shop == null)
{
Invoke(new Action(() =>
{
foreach (var r in rowLstTmp)
{
r.Cells["colOpResult"].Value = "店铺不存在";
}
}));
continue;
}
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
foreach (var r in rowLstTmp)
{
r.Cells["colOpResult"].Value = "店铺掉线";
}
}));
continue;
}
//{"cosignmentOrderId":"4436464658179189760","cosignmentProductList":[{"spuId":"10000826730228","skuId":"14511204738","cancelScene":2}],"orderId":"3736464645960385280"}
JObject cancelAssignOrderData = new JObject();
foreach (var row in rowLstTmp)
{
cancelAssignOrderData["cosignmentOrderId"] = row.Cells["colConsignmentOrderId"].Value.ParseToString();
var jArr = new JArray();
var dgvrs = dgvOrder.Rows.Cast<DataGridViewRow>().Where(dgvr => dgvr.Cells["colConsignmentOrderId"] == row.Cells["colConsignmentOrderId"]).ToList();
foreach (var dgvr in dgvrs)
{
JObject jProd = new JObject();
jProd["spuId"] = dgvr.Cells["colSpuId"].Value.ParseToString();
jProd["skuId"] = dgvr.Cells["colSkuId"].Value.ParseToString();
jProd["cancelScene"] = 2;
jArr.Add(jProd);
}
cancelAssignOrderData["cosignmentProductList"] = jArr;
cancelAssignOrderData["orderId"] = row.Cells["colOrderId"].Value.ParseToString();
}
var cancelRst = WXOrderConsignment.cancelConsignmentOrder(shop, cancelAssignOrderData);
Thread.Sleep(Randomx.GetId(500, 1000));
if (!cancelRst.Contains("\"code\":0"))
{
if (cancelRst.Contains("biz magic invalid"))
{
WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
row.Cells["colOpResult"].Value = "店铺掉线";
}
}));
continue;
}
}
var errmsg = BaseRegex.GetStringJson(ref cancelRst, "msg");
if (string.IsNullOrWhiteSpace(errmsg))
errmsg = cancelRst;
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
var dgvrs = dgvOrder.Rows.Cast<DataGridViewRow>().Where(dgvr => dgvr.Cells["colConsignmentOrderId"] == row.Cells["colConsignmentOrderId"]).ToList();
foreach (var dgvr in dgvrs)
dgvr.Cells["colOpResult"].Value = errmsg;
}
}));
}
if (cancelRst.Contains("\"code\":0"))
{
Invoke(new Action(() =>
{
foreach (var row in rowLstTmp)
{
var dgvrs = dgvOrder.Rows.Cast<DataGridViewRow>().Where(dgvr => dgvr.Cells["colConsignmentOrderId"] == row.Cells["colConsignmentOrderId"]).ToList();
foreach (var dgvr in dgvrs)
dgvr.Cells["colOpResult"].Value = "取消分配成功";
}
}));
}
}
}
private void btnFiltSelect_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgvOrder.Rows)
@@ -1827,12 +1684,12 @@ namespace TemuKJD.WXForms.ProductForms
var rst = WXOrderList.searchOnlineWaybill(shop, orderId);
if (!rst.Contains("\"code\":0"))
{
//BaseMsgForm.ShowError("在线寄件失败:" + rst, "错误", FormLevel.LARGE);
//BaseMsgForm.ShowError("打印失败:" + rst, "错误", FormLevel.LARGE);
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "errMsg", "errorMsg", "err_msg", "error_msg");
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colOpResult"].Value = "填写收货地址成功, 但查询在线寄件失败:" + error;
row.Cells["colOpResult"].Value = "填写收货地址成功, 但查询打印失败:" + error;
pbLoading.Visible = false;
}));
return;
@@ -1845,12 +1702,12 @@ namespace TemuKJD.WXForms.ProductForms
rst = WXOrderList.cancelOnlineWaybill(shop, ewaybillOrderId, waybillId);
if (!rst.Contains("\"code\":0"))
{
//BaseMsgForm.ShowError("在线寄件失败:" + rst, "错误", FormLevel.LARGE);
//BaseMsgForm.ShowError("打印失败:" + rst, "错误", FormLevel.LARGE);
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "errMsg", "errorMsg", "err_msg", "error_msg");
Invoke(new Action(() =>
{
foreach (var row in rows)
row.Cells["colOpResult"].Value = "填写收货地址成功, 但取消在线寄件失败:" + error;
row.Cells["colOpResult"].Value = "填写收货地址成功, 但取消打印失败:" + error;
pbLoading.Visible = false;
}));
return;
@@ -1861,8 +1718,8 @@ namespace TemuKJD.WXForms.ProductForms
{
foreach (var row in rows)
{
row.Cells["colOpResult"].Value = "填写收货地址成功, 取消在线寄件成功";
row.Cells["colOnlineWaybill"].Value = "在线\r\n寄件";
row.Cells["colOpResult"].Value = "填写收货地址成功, 取消打印成功";
row.Cells["colOnlineWaybill"].Value = "打印";
ShowDgvRow(row);
}
pbLoading.Visible = false;
@@ -2097,9 +1954,9 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
BaseMsgForm.ShowInfo("批量在线寄件终止");
BaseMsgForm.ShowInfo("批量打印终止");
else
BaseMsgForm.ShowInfo("批量在线寄件完成");
BaseMsgForm.ShowInfo("批量打印完成");
}));
}, cancellationTokenSource.Token);
}
@@ -2250,6 +2107,56 @@ namespace TemuKJD.WXForms.ProductForms
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
public static string orderSendOut(ShopLoginInfo shop, string orderId, string waybillId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/ship/cgi/orderSendOut?token=&lang=zh_CN";
string body = @"{""orderId"":""" + orderId + @""",""deliveryProduct"":{""deliveryId"":""OTHER"",""waybillId"":""" + waybillId + @""",""isAllProduct"":true,""deliverType"":1}}";
string refere = "https://store.weixin.qq.com/shop/order/list?type=3";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
public static string updateDeliveryInfo(ShopLoginInfo shop, UpdateDeliverInfoParam param)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/ship/cgi/updateDeliveryInfo?token=&lang=zh_CN";
string body = JsonHelper.SerializeObject(param);
string refere = "https://store.weixin.qq.com/shop/order/list?type=3";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
public static string initDeliveryInfo(ShopLoginInfo shop, string orderId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/ship/cgi/initShipData?token=&lang=zh_CN";
string body = @"{""id"":""" + orderId + @"""}";
string refere = "https://store.weixin.qq.com/shop/order/list";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
public static string getSkuBySpu(ShopLoginInfo shop, string spuIds)
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/getStockBySpu?token=&lang=zh_CN";
string body = @"{""productIdList"":[" + spuIds + @"]}";
string refere = "https://store.weixin.qq.com/shop/goods/list";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
public static string batchUpdateStock(ShopLoginInfo shop, string spuId, string skuId, string num)
{
string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/batchUpdateStock?token=&lang=zh_CN";
string body = @"{""skuList"":[{""spuId"":""" + spuId + @""",""skuId"":""" + skuId + @""",""diffType"":2,""num"":" + num + "}]}";
string refere = "https://store.weixin.qq.com/shop/goods/list";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
}
}
@@ -234,7 +234,13 @@
<metadata name="colCurrentPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAddPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colCurrentStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSendGift.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colOptimizeOrderProduct.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEndDiscount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -0,0 +1,509 @@
namespace TemuKJD.WXForms.OrderForms
{
partial class WXOrderListOptimizeForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXOrderListOptimizeForm));
this.panel1 = new System.Windows.Forms.Panel();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.lblOrderId = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.btnSendGift = new DevComponents.DotNetBar.PanelEx();
this.txtGiftOrderWaybillId = new System.Windows.Forms.TextBox();
this.btnCancel = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnDownProduct = new DevComponents.DotNetBar.PanelEx();
this.btnClearStock = new DevComponents.DotNetBar.PanelEx();
this.txtOrderPrice = new System.Windows.Forms.TextBox();
this.lblSpuId = new System.Windows.Forms.Label();
this.txtCurrentPrice = new System.Windows.Forms.TextBox();
this.lblSkuId = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.商品名 = new System.Windows.Forms.Label();
this.txtGoodsName = new System.Windows.Forms.TextBox();
this.规格名 = new System.Windows.Forms.Label();
this.txtSkuName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.numAddPrice = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.btnAddPrice = new DevComponents.DotNetBar.PanelEx();
this.txtCurrentStock = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.pbLoading);
this.panel1.Controls.Add(this.ucGroupBoxEx1);
this.panel1.Controls.Add(this.btnCancel);
this.panel1.Controls.Add(this.ucGroupBoxEx4);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(1, 33);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(463, 394);
this.panel1.TabIndex = 1;
//
// pbLoading
//
this.pbLoading.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(8, 356);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(24, 24);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 829;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.lblOrderId);
this.ucGroupBoxEx1.Controls.Add(this.label3);
this.ucGroupBoxEx1.Controls.Add(this.btnSendGift);
this.ucGroupBoxEx1.Controls.Add(this.txtGiftOrderWaybillId);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(7, 256);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(448, 95);
this.ucGroupBoxEx1.TabIndex = 829;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "发送礼物单";
//
// lblOrderId
//
this.lblOrderId.AutoSize = true;
this.lblOrderId.Location = new System.Drawing.Point(20, 66);
this.lblOrderId.Name = "lblOrderId";
this.lblOrderId.Size = new System.Drawing.Size(53, 17);
this.lblOrderId.TabIndex = 825;
this.lblOrderId.Text = "orderId";
this.lblOrderId.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(20, 38);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 439;
this.label3.Text = "物流单号";
//
// btnSendGift
//
this.btnSendGift.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSendGift.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSendGift.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSendGift.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSendGift.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSendGift.Location = new System.Drawing.Point(359, 35);
this.btnSendGift.Name = "btnSendGift";
this.btnSendGift.Size = new System.Drawing.Size(65, 23);
this.btnSendGift.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSendGift.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSendGift.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSendGift.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSendGift.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSendGift.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSendGift.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSendGift.Style.GradientAngle = 90;
this.btnSendGift.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSendGift.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSendGift.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSendGift.TabIndex = 15;
this.btnSendGift.TabStop = true;
this.btnSendGift.Text = "发送";
this.btnSendGift.Click += new System.EventHandler(this.btnSendGift_Click);
//
// txtGiftOrderWaybillId
//
this.txtGiftOrderWaybillId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtGiftOrderWaybillId.Location = new System.Drawing.Point(77, 35);
this.txtGiftOrderWaybillId.Name = "txtGiftOrderWaybillId";
this.txtGiftOrderWaybillId.Size = new System.Drawing.Size(277, 23);
this.txtGiftOrderWaybillId.TabIndex = 11;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancel.Location = new System.Drawing.Point(386, 358);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnCancel.Style.GradientAngle = 90;
this.btnCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnCancel.TabIndex = 5;
this.btnCancel.TabStop = true;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// ucGroupBoxEx4
//
this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx4.Controls.Add(this.label5);
this.ucGroupBoxEx4.Controls.Add(this.txtCurrentStock);
this.ucGroupBoxEx4.Controls.Add(this.btnDownProduct);
this.ucGroupBoxEx4.Controls.Add(this.btnClearStock);
this.ucGroupBoxEx4.Controls.Add(this.txtOrderPrice);
this.ucGroupBoxEx4.Controls.Add(this.lblSpuId);
this.ucGroupBoxEx4.Controls.Add(this.txtCurrentPrice);
this.ucGroupBoxEx4.Controls.Add(this.lblSkuId);
this.ucGroupBoxEx4.Controls.Add(this.label4);
this.ucGroupBoxEx4.Controls.Add(this.商品名);
this.ucGroupBoxEx4.Controls.Add(this.txtGoodsName);
this.ucGroupBoxEx4.Controls.Add(this.规格名);
this.ucGroupBoxEx4.Controls.Add(this.txtSkuName);
this.ucGroupBoxEx4.Controls.Add(this.label2);
this.ucGroupBoxEx4.Controls.Add(this.numAddPrice);
this.ucGroupBoxEx4.Controls.Add(this.label1);
this.ucGroupBoxEx4.Controls.Add(this.btnAddPrice);
this.ucGroupBoxEx4.Location = new System.Drawing.Point(7, 8);
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
this.ucGroupBoxEx4.Size = new System.Drawing.Size(448, 242);
this.ucGroupBoxEx4.TabIndex = 828;
this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "优化订单商品";
//
// btnDownProduct
//
this.btnDownProduct.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnDownProduct.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDownProduct.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDownProduct.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDownProduct.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDownProduct.Location = new System.Drawing.Point(359, 202);
this.btnDownProduct.Name = "btnDownProduct";
this.btnDownProduct.Size = new System.Drawing.Size(65, 23);
this.btnDownProduct.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnDownProduct.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDownProduct.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDownProduct.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnDownProduct.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnDownProduct.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnDownProduct.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnDownProduct.Style.GradientAngle = 90;
this.btnDownProduct.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnDownProduct.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDownProduct.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDownProduct.TabIndex = 836;
this.btnDownProduct.TabStop = true;
this.btnDownProduct.Text = "下架商品";
this.btnDownProduct.Click += new System.EventHandler(this.btnDownProduct_Click);
//
// btnClearStock
//
this.btnClearStock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearStock.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClearStock.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClearStock.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClearStock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearStock.Location = new System.Drawing.Point(289, 202);
this.btnClearStock.Name = "btnClearStock";
this.btnClearStock.Size = new System.Drawing.Size(65, 23);
this.btnClearStock.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClearStock.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClearStock.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClearStock.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClearStock.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClearStock.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClearStock.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClearStock.Style.GradientAngle = 90;
this.btnClearStock.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClearStock.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClearStock.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClearStock.TabIndex = 832;
this.btnClearStock.TabStop = true;
this.btnClearStock.Text = "清除库存";
this.btnClearStock.Click += new System.EventHandler(this.btnClearStock_Click);
//
// txtOrderPrice
//
this.txtOrderPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtOrderPrice.BackColor = System.Drawing.SystemColors.Window;
this.txtOrderPrice.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtOrderPrice.Location = new System.Drawing.Point(77, 171);
this.txtOrderPrice.Name = "txtOrderPrice";
this.txtOrderPrice.ReadOnly = true;
this.txtOrderPrice.Size = new System.Drawing.Size(113, 16);
this.txtOrderPrice.TabIndex = 821;
this.txtOrderPrice.Text = "orderPrice";
//
// lblSpuId
//
this.lblSpuId.AutoSize = true;
this.lblSpuId.Location = new System.Drawing.Point(35, 53);
this.lblSpuId.Name = "lblSpuId";
this.lblSpuId.Size = new System.Drawing.Size(41, 17);
this.lblSpuId.TabIndex = 810;
this.lblSpuId.Text = "spuId";
this.lblSpuId.Visible = false;
//
// txtCurrentPrice
//
this.txtCurrentPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCurrentPrice.BackColor = System.Drawing.SystemColors.Window;
this.txtCurrentPrice.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtCurrentPrice.Location = new System.Drawing.Point(77, 137);
this.txtCurrentPrice.Name = "txtCurrentPrice";
this.txtCurrentPrice.ReadOnly = true;
this.txtCurrentPrice.Size = new System.Drawing.Size(113, 16);
this.txtCurrentPrice.TabIndex = 820;
this.txtCurrentPrice.Text = "currentPrice";
//
// lblSkuId
//
this.lblSkuId.AutoSize = true;
this.lblSkuId.Location = new System.Drawing.Point(36, 106);
this.lblSkuId.Name = "lblSkuId";
this.lblSkuId.Size = new System.Drawing.Size(40, 17);
this.lblSkuId.TabIndex = 811;
this.lblSkuId.Text = "skuId";
this.lblSkuId.Visible = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(32, 171);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 813;
this.label4.Text = "订单价";
//
// 商品名
//
this.商品名.AutoSize = true;
this.商品名.Location = new System.Drawing.Point(32, 28);
this.商品名.Name = "商品名";
this.商品名.Size = new System.Drawing.Size(44, 17);
this.商品名.TabIndex = 440;
this.商品名.Text = "商品名";
//
// txtGoodsName
//
this.txtGoodsName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtGoodsName.BackColor = System.Drawing.SystemColors.Window;
this.txtGoodsName.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtGoodsName.Location = new System.Drawing.Point(77, 28);
this.txtGoodsName.Multiline = true;
this.txtGoodsName.Name = "txtGoodsName";
this.txtGoodsName.ReadOnly = true;
this.txtGoodsName.Size = new System.Drawing.Size(345, 42);
this.txtGoodsName.TabIndex = 1;
this.txtGoodsName.Text = "goodsName";
//
// 规格名
//
this.规格名.AutoSize = true;
this.规格名.Location = new System.Drawing.Point(32, 81);
this.规格名.Name = "规格名";
this.规格名.Size = new System.Drawing.Size(44, 17);
this.规格名.TabIndex = 439;
this.规格名.Text = "规格名";
//
// txtSkuName
//
this.txtSkuName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSkuName.BackColor = System.Drawing.SystemColors.Window;
this.txtSkuName.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtSkuName.Location = new System.Drawing.Point(77, 81);
this.txtSkuName.Multiline = true;
this.txtSkuName.Name = "txtSkuName";
this.txtSkuName.ReadOnly = true;
this.txtSkuName.Size = new System.Drawing.Size(345, 42);
this.txtSkuName.TabIndex = 2;
this.txtSkuName.Text = "skuName";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(32, 137);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 438;
this.label2.Text = "当前价";
//
// numAddPrice
//
this.numAddPrice.DecimalPlaces = 2;
this.numAddPrice.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numAddPrice.Location = new System.Drawing.Point(77, 202);
this.numAddPrice.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numAddPrice.Name = "numAddPrice";
this.numAddPrice.Size = new System.Drawing.Size(113, 23);
this.numAddPrice.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(44, 205);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 17);
this.label1.TabIndex = 436;
this.label1.Text = "加价";
//
// btnAddPrice
//
this.btnAddPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddPrice.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddPrice.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddPrice.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddPrice.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddPrice.Location = new System.Drawing.Point(196, 202);
this.btnAddPrice.Name = "btnAddPrice";
this.btnAddPrice.Size = new System.Drawing.Size(65, 23);
this.btnAddPrice.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddPrice.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddPrice.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddPrice.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddPrice.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddPrice.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddPrice.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddPrice.Style.GradientAngle = 90;
this.btnAddPrice.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddPrice.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddPrice.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddPrice.TabIndex = 4;
this.btnAddPrice.TabStop = true;
this.btnAddPrice.Text = "改价";
this.btnAddPrice.Click += new System.EventHandler(this.btnAddPrice_Click);
//
// txtCurrentStock
//
this.txtCurrentStock.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCurrentStock.BackColor = System.Drawing.SystemColors.Window;
this.txtCurrentStock.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtCurrentStock.Location = new System.Drawing.Point(342, 171);
this.txtCurrentStock.Name = "txtCurrentStock";
this.txtCurrentStock.ReadOnly = true;
this.txtCurrentStock.Size = new System.Drawing.Size(82, 16);
this.txtCurrentStock.TabIndex = 846;
this.txtCurrentStock.Text = "currentStock";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(286, 171);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 17);
this.label5.TabIndex = 847;
this.label5.Text = "Sku库存";
//
// WXOrderListOptimizeForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(465, 428);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "WXOrderListOptimizeForm";
this.Text = "优化订单";
this.TitleText = "优化订单";
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx1.PerformLayout();
this.ucGroupBoxEx4.ResumeLayout(false);
this.ucGroupBoxEx4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
public System.Windows.Forms.TextBox txtSkuName;
public System.Windows.Forms.TextBox txtGoodsName;
private System.Windows.Forms.Label 商品名;
private System.Windows.Forms.Label 规格名;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx btnAddPrice;
public System.Windows.Forms.NumericUpDown numAddPrice;
private DevComponents.DotNetBar.PanelEx btnCancel;
public System.Windows.Forms.Label lblSkuId;
public System.Windows.Forms.Label lblSpuId;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.TextBox txtCurrentPrice;
public System.Windows.Forms.TextBox txtOrderPrice;
private UserComponent.UcGroupBoxEx ucGroupBoxEx4;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.PanelEx btnSendGift;
private System.Windows.Forms.TextBox txtGiftOrderWaybillId;
public System.Windows.Forms.Label lblOrderId;
private System.Windows.Forms.PictureBox pbLoading;
private DevComponents.DotNetBar.PanelEx btnClearStock;
private DevComponents.DotNetBar.PanelEx btnDownProduct;
public System.Windows.Forms.TextBox txtCurrentStock;
private System.Windows.Forms.Label label5;
}
}
@@ -0,0 +1,268 @@
using AllBase;
using AllBase.Model.Result;
using AllBase.Model.Result.WXResult;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.WXForms.ProductForms;
namespace TemuKJD.WXForms.OrderForms
{
public partial class WXOrderListOptimizeForm : BaseForms.BaseGeneralForm
{
public ShopLoginInfo shop;
public WXOrderListOptimizeForm(ShopLoginInfo _shop)
{
InitializeComponent();
shop = _shop;
this.TitleText = "店铺 " + shop.ShopAccount + " 优化订单";
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
public JObject prodObj = new JObject();
public bool EditPriceSuccess { get; set; } = false;
public bool SendGiftSuccess { get; set; } = false;
public bool ClearStock { get; set; } = false;
public bool IsDownProd { get; set; } = false;
private void btnAddPrice_Click(object sender, EventArgs e)
{
EditPriceSuccess = false;
try
{
var spuId = lblSpuId.Text;
int onSaleStatusCode = -1;
int pageSize = 50;
var getProdOnSaleRst = WXClearNoVisit.searchProduct(shop, 1, pageSize, spuId, onSaleStatusCode);
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJsonByRegs(ref getProdOnSaleRst, getProdOnSaleRst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("改价失败" + error);
}
prodObj = JsonHelper.JObjectParse(getProdOnSaleRst)["productList"].FirstOrDefault() as JObject;
if (prodObj != null)
{
var str = JsonHelper.SerializeObject(prodObj);
}
//var rst = WXOrderList.EditPrice(shop, lblSpuId.Text, lblSkuId.Text, (numAddPrice.Value * 100).ParseToInt());
JObject changePriceObj = new JObject();
JArray skuArr = new JArray();
foreach (var sku in prodObj["skuList"])
{
JObject obj = new JObject();
obj["spuId"] = spuId;
obj["skuId"] = sku["skuId"];
obj["salePrice"] = sku["price"].ParseToInt() + (numAddPrice.Value * 100).ParseToInt();
skuArr.Add(obj);
}
changePriceObj["skuList"] = skuArr;
changePriceObj["uploadSource"] = 6;
// string body = @"{""skuList"":[{""spuId"":" + spuId + @",""skuId"":""" + skuId + @""",""salePrice"":" + newPrice + @"}],""uploadSource"":6}";
var rst = WXOrderList.EditPrice(shop, changePriceObj);
if (rst.Contains("\"code\":0"))
{
EditPriceSuccess = true;
BaseMsgForm.ShowInfo("改价成功");
this.Close();
}
else
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowError("改价失败:" + error);
}
}
catch
{
}
}
private void btnSendGift_Click(object sender, EventArgs e)
{
SendGiftSuccess = false;
string orderId = lblOrderId.Text.Trim();
string waybillId = txtGiftOrderWaybillId.Text.Trim();
pbLoading.Visible = true;
Task.Run(() =>
{
var rst = WXOrderList.initDeliveryInfo(shop, orderId);
// {"code":0,"orderDetail":{"commonInfo":{"orderId":"3736582386601580032","orderType":0,"statusStr":"待发货","status":20,"originalStatus":11,"openid":"ow5ty7Kyik_dSqtrivr5hY2t4cwY","createTime":1779540820,"createTimeStr":"2026-05-23 20:53","isPayScoreOrder":false,"isPayDone":true,"isVirtualOrder":false,"isAuthorizedAccount":false,"giftOrderType":"","isInspectOrder":false,"isCommissionOrderDone":false,"isRechargeOrder":false,"isExpediteOrder":false,"isOverTimeOrder":2,"isMultiPackage":false,"inspectType":0,"isGiftOrder":false,"isBuyTogetherOrder":false,"isLotteryOrder":false,"isEducationOrder":false,"hideGiftOrderAddressInfo":false,"cosignmentFlag":1,"isNationalSubsidy":0,"isSameCityOrder":false,"isNationalSubsidyMerchant":false,"isSupplyOrder":false},"orderProducts":{"orderProductInfo":[{"productId":"10000863142394","thumbImg":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50","title":"脂砚斋评石头记(全三册) 烫金珍藏版 彩绘绣像 双色印刷","skuId":"15274875174","saleParam":["默认"],"productType":1,"productCnt":1,"salePrice":"3400","spuCode":"9787555418979","skuCode":"BSEC12302592708637555055A","isPreSale":false,"isIflashbuy":false,"isFreeGift":false,"canAfterSale":true,"realPrice":3350,"perRealPrice":3350,"tags":[{"class":"black","desc":"7天无理由","iconUrl":"","mainUrl":"","tagType":4},{"class":"black","desc":"运费险","iconUrl":"","mainUrl":"","tagType":5}],"icons":[],"perExchangeScore":"","productSource":{"show":false},"afterSaleInfo":{"afterId":"","canAfterSale":true,"canNotAfterSaleReason":"","jumpUrl":"","title":"","content":"","afterSaleDoneStr":"","afterSaleDoneAmountStr":"","afterSaleDoneAmount":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"isGuaranteeIng":false,"hasFakeOnePayFourDoneGuarantee":false},"changeProduct":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"supplyProductId":"","supplyNickName":"","supplyOrderId":"","supplyAppid":""}],"priceInfo":{"productPrice":"3400","orderPrice":"3350","freight":0,"originalOrderPrice":"3400","estimateProductPrice":"3350","handingFee":"0","maxUnsplitAmount":"3350","totalDiscountedPrice":"50","merchantReceievePrice":"3350","platformActivityMerchantDiscountedPrice":"50"},"activityInfo":{},"presentFee":{}},"acceptInfo":{"decodeSensitiveTime":0,"editAddrInfo":{"applyEditAddrStatus":0,"applyEditAddrAuditStaff":"","applyEditAddrAuditTimeText":"","negotiationEditTextForB":"","negotiationEditTextForA":"","negotiationEditStatus":0,"negotiationEditHistory":[],"canNegotiation":true,"hasUnResolvedRequest":0,"hasHistoryMerchantEditAddr":0,"editHistory":[]},"customerNotes":"","merchantNotes":"","presentNotes":"","addressInfo":{"cityName":"宝鸡市","countyName":"眉县","provinceName":"陕西省","userName":"刘**","telNumber":"187****9569","detailInfo":"****","virtualOrderTelNumber":""},"virtualNumberInfo":{},"quota":{"code":0,"limit":10,"used":10,"hideSensitiveInfo":true},"rechargeData":{"label":"","content":"","deliverMethod":0},"addressErrType":0},"expressInfo":{"phone":"9569","deliveryProductInfo":[],"orderProductCnt":1,"deliveryCnt":0,"isIntracityOrder":false,"intracityTracking":null,"formatUnshippedProductList":[{"productId":"10000863142394","thumbImg":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50","title":"脂砚斋评石头记(全三册) 烫金珍藏版 彩绘绣像 双色印刷","skuId":"15274875174","saleParam":["默认"],"productType":1,"productCnt":1,"salePrice":"3400","spuCode":"9787555418979","skuCode":"BSEC12302592708637555055A","isPreSale":false,"isIflashbuy":false,"isFreeGift":false,"canAfterSale":true,"realPrice":3350,"perRealPrice":3350,"tags":[{"class":"black","desc":"7天无理由","iconUrl":"","mainUrl":"","tagType":4},{"class":"black","desc":"运费险","iconUrl":"","mainUrl":"","tagType":5}],"icons":[],"perExchangeScore":"","productSource":1,"afterSaleInfo":{"afterId":"","canAfterSale":true,"canNotAfterSaleReason":"","jumpUrl":"","title":"","content":"","afterSaleDoneStr":"","afterSaleDoneAmountStr":"","afterSaleDoneAmount":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"isGuaranteeIng":false,"hasFakeOnePayFourDoneGuarantee":false},"changeProduct":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"supplyProductId":"","supplyNickName":"","supplyOrderId":"","supplyAppid":""}],"product2Img":{"15274875174":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50"}},"ewaybillInfo":{"isAllPrintOne":false,"isOpen":false,"deliveryId":"","deliveryName":"","waybillId":""}},"sendAddressInfo":{"userName":"陈图书","postalCode":"","provinceName":"安徽省","cityName":"合肥市","countyName":"肥西县","detailInfo":"上派镇中盟电子产业园8栋一单元(东电梯3楼快递指定存放点)","telNumber":"13023098035","lat":0,"lng":0},"deliveryCompanyOptions":[{"labeLine truncated
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("发送礼物单失败 " + error);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
var statusStr = BaseRegex.GetStringJson(ref rst, "statusStr");
if (statusStr == "待发货")
{
//{"orderId":"3736580679658008320","deliveryProduct":{"deliveryId":"YUNDA","waybillId":"313023381086999","isAllProduct":true,"deliverType":1}}
//{"code":0,"errcode":0,"errmsg":"ok"}
rst = WXOrderList.orderSendOut(shop, orderId, waybillId);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("发送礼物单失败 " + error);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
Invoke(new Action(() =>
{
SendGiftSuccess = true;
BaseMsgForm.ShowInfo("发送礼物单成功");
pbLoading.Visible = false;
this.Close();
}));
}
else
{
//{"orderId":"3736580679658008320","changeInfo":[{"old":{"deliveryId":"YUNDA","waybillId":"313023381086999","productInfos":[{"productId":"10000875072190","skuId":"15516018429","productCnt":1}]},"new":{"deliveryId":"OTHER","waybillId":"772064082455686","productInfos":[{"productId":"10000875072190","skuId":"15516018429","productCnt":1}]}}]}
//{"code":0,"errcode":0,"errmsg":""}
var orderExpressInfoObj = JsonHelper.JObjectParse(rst)["orderDetail"]["expressInfo"];
var orderExpressInfo = JsonHelper.DeserializeJsonToObject<WxOrderExpressInfo>(JsonHelper.SerializeObject(orderExpressInfoObj));
UpdateDeliverInfoParam param = new UpdateDeliverInfoParam();
param.orderId = orderId;
param.changeInfo = new List<Dictionary<string, UpdateDeliverChangeInfo>>();
foreach (var deliveryProductInfo in orderExpressInfo.deliveryProductInfo)
{
Dictionary<string, UpdateDeliverChangeInfo> dicChange = new Dictionary<string, UpdateDeliverChangeInfo>();
dicChange["old"] = new UpdateDeliverChangeInfo();
dicChange["old"].deliveryId = deliveryProductInfo.deliveryId;
dicChange["old"].waybillId = deliveryProductInfo.waybillId;
dicChange["old"].productInfos = new List<UpdateDeliverProductInfo>();
dicChange["new"] = new UpdateDeliverChangeInfo();
dicChange["new"].deliveryId = "OTHER";
dicChange["new"].waybillId = waybillId;
dicChange["new"].productInfos = new List<UpdateDeliverProductInfo>();
foreach (var prod in deliveryProductInfo.productInfos)
{
dicChange["old"].productInfos.Add(new UpdateDeliverProductInfo() { productCnt = prod.productCnt, productId = prod.productId, skuId = prod.skuId });
dicChange["new"].productInfos.Add(new UpdateDeliverProductInfo() { productCnt = prod.productCnt, productId = prod.productId, skuId = prod.skuId });
}
param.changeInfo.Add(dicChange);
}
rst = WXOrderList.updateDeliveryInfo(shop, param);
var str = JsonHelper.SerializeObject(param);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("变更发送礼物单失败 " + error);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
Invoke(new Action(() =>
{
SendGiftSuccess = true;
BaseMsgForm.ShowInfo("变更发送礼物单成功");
pbLoading.Visible = false;
this.Close();
}));
}
});
}
private void btnClearStock_Click(object sender, EventArgs e)
{
ClearStock = false;
string spuId = lblSpuId.Text.Trim();
string skuId = lblSkuId.Text.Trim();
string num = txtCurrentStock.Text.Trim();
var rst = WXOrderList.batchUpdateStock(shop, spuId, skuId, num);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("清除库存失败 " + error);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
Invoke(new Action(() =>
{
ClearStock = true;
BaseMsgForm.ShowInfo("清除库存成功");
pbLoading.Visible = false;
this.Close();
}));
}
private void btnDownProduct_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定下架吗?重新上架需要消耗提审次数").DialogResult != DialogResult.OK)
return;
IsDownProd = false;
string spuId = lblSpuId.Text.Trim();
string skuId = lblSkuId.Text.Trim();
string num = txtCurrentStock.Text.Trim();
var rst = WXPreSale.DownProd(shop, spuId);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("商品下架失败 " + error);
Invoke(new Action(() =>
{
pbLoading.Visible = false;
}));
return;
}
Invoke(new Action(() =>
{
IsDownProd = true;
BaseMsgForm.ShowInfo("商品下架成功");
pbLoading.Visible = false;
this.Close();
}));
}
}
public class UpdateDeliverInfoParam
{
public string orderId { get; set; } // "3736580679658008320",
public List<Dictionary<string, UpdateDeliverChangeInfo>> changeInfo { get; set; }
}
public class UpdateDeliverChangeInfo
{
public string deliveryId { get; set; } // "OTHER",
public string waybillId { get; set; } // "772064082455686",
public List<UpdateDeliverProductInfo> productInfos { get; set; } = new List<UpdateDeliverProductInfo>(); // [ { "productId": "10000875072190", "skuId": "15516018429", "productCnt": 1 } ]
}
public class UpdateDeliverProductInfo
{
public string productId { get; set; } // "10000875072190",
public string skuId { get; set; } // "15516018429",
public int? productCnt { get; set; } // 1
}
}
@@ -1,301 +0,0 @@
namespace TemuKJD.WXForms.ProductForms
{
partial class WXOrderListAddSkuPriceForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXOrderListAddSkuPriceForm));
this.panel1 = new System.Windows.Forms.Panel();
this.txtOrderPrice = new System.Windows.Forms.TextBox();
this.txtCurrentPrice = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.lblSkuId = new System.Windows.Forms.Label();
this.lblSpuId = new System.Windows.Forms.Label();
this.btnCancel = new DevComponents.DotNetBar.PanelEx();
this.商品名 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnAddPrice = new DevComponents.DotNetBar.PanelEx();
this.numAddPrice = new System.Windows.Forms.NumericUpDown();
this.txtSkuName = new System.Windows.Forms.TextBox();
this.txtGoodsName = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.txtOrderPrice);
this.panel1.Controls.Add(this.txtCurrentPrice);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.lblSkuId);
this.panel1.Controls.Add(this.lblSpuId);
this.panel1.Controls.Add(this.btnCancel);
this.panel1.Controls.Add(this.商品名);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.btnAddPrice);
this.panel1.Controls.Add(this.numAddPrice);
this.panel1.Controls.Add(this.txtSkuName);
this.panel1.Controls.Add(this.txtGoodsName);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(1, 33);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(562, 260);
this.panel1.TabIndex = 1;
//
// txtOrderPrice
//
this.txtOrderPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtOrderPrice.BackColor = System.Drawing.SystemColors.Window;
this.txtOrderPrice.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtOrderPrice.Location = new System.Drawing.Point(96, 172);
this.txtOrderPrice.Name = "txtOrderPrice";
this.txtOrderPrice.ReadOnly = true;
this.txtOrderPrice.Size = new System.Drawing.Size(409, 16);
this.txtOrderPrice.TabIndex = 821;
this.txtOrderPrice.Text = "orderPrice";
//
// txtCurrentPrice
//
this.txtCurrentPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCurrentPrice.BackColor = System.Drawing.SystemColors.Window;
this.txtCurrentPrice.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtCurrentPrice.Location = new System.Drawing.Point(96, 138);
this.txtCurrentPrice.Name = "txtCurrentPrice";
this.txtCurrentPrice.ReadOnly = true;
this.txtCurrentPrice.Size = new System.Drawing.Size(409, 16);
this.txtCurrentPrice.TabIndex = 820;
this.txtCurrentPrice.Text = "currentPrice";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(46, 172);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 813;
this.label4.Text = "订单价";
//
// lblSkuId
//
this.lblSkuId.AutoSize = true;
this.lblSkuId.Location = new System.Drawing.Point(46, 107);
this.lblSkuId.Name = "lblSkuId";
this.lblSkuId.Size = new System.Drawing.Size(40, 17);
this.lblSkuId.TabIndex = 811;
this.lblSkuId.Text = "skuId";
this.lblSkuId.Visible = false;
//
// lblSpuId
//
this.lblSpuId.AutoSize = true;
this.lblSpuId.Location = new System.Drawing.Point(46, 54);
this.lblSpuId.Name = "lblSpuId";
this.lblSpuId.Size = new System.Drawing.Size(41, 17);
this.lblSpuId.TabIndex = 810;
this.lblSpuId.Text = "spuId";
this.lblSpuId.Visible = false;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancel.Location = new System.Drawing.Point(440, 203);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnCancel.Style.GradientAngle = 90;
this.btnCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnCancel.TabIndex = 5;
this.btnCancel.TabStop = true;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// 商品名
//
this.商品名.AutoSize = true;
this.商品名.Location = new System.Drawing.Point(46, 29);
this.商品名.Name = "商品名";
this.商品名.Size = new System.Drawing.Size(44, 17);
this.商品名.TabIndex = 440;
this.商品名.Text = "规格名";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(46, 82);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 439;
this.label3.Text = "规格名";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(46, 138);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 438;
this.label2.Text = "当前价";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(58, 206);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 17);
this.label1.TabIndex = 436;
this.label1.Text = "加价";
//
// btnAddPrice
//
this.btnAddPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddPrice.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnAddPrice.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAddPrice.DisabledBackColor = System.Drawing.Color.Empty;
this.btnAddPrice.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddPrice.Location = new System.Drawing.Point(368, 203);
this.btnAddPrice.Name = "btnAddPrice";
this.btnAddPrice.Size = new System.Drawing.Size(65, 23);
this.btnAddPrice.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddPrice.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddPrice.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnAddPrice.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnAddPrice.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnAddPrice.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnAddPrice.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnAddPrice.Style.GradientAngle = 90;
this.btnAddPrice.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnAddPrice.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddPrice.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnAddPrice.TabIndex = 4;
this.btnAddPrice.TabStop = true;
this.btnAddPrice.Text = "改价";
this.btnAddPrice.Click += new System.EventHandler(this.btnAddPrice_Click);
//
// numAddPrice
//
this.numAddPrice.DecimalPlaces = 2;
this.numAddPrice.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numAddPrice.Location = new System.Drawing.Point(96, 203);
this.numAddPrice.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numAddPrice.Name = "numAddPrice";
this.numAddPrice.Size = new System.Drawing.Size(128, 23);
this.numAddPrice.TabIndex = 0;
//
// txtSkuName
//
this.txtSkuName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtSkuName.BackColor = System.Drawing.SystemColors.Window;
this.txtSkuName.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtSkuName.Location = new System.Drawing.Point(96, 82);
this.txtSkuName.Multiline = true;
this.txtSkuName.Name = "txtSkuName";
this.txtSkuName.ReadOnly = true;
this.txtSkuName.Size = new System.Drawing.Size(409, 42);
this.txtSkuName.TabIndex = 2;
this.txtSkuName.Text = "skuName";
//
// txtGoodsName
//
this.txtGoodsName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtGoodsName.BackColor = System.Drawing.SystemColors.Window;
this.txtGoodsName.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtGoodsName.Location = new System.Drawing.Point(96, 29);
this.txtGoodsName.Multiline = true;
this.txtGoodsName.Name = "txtGoodsName";
this.txtGoodsName.ReadOnly = true;
this.txtGoodsName.Size = new System.Drawing.Size(409, 42);
this.txtGoodsName.TabIndex = 1;
this.txtGoodsName.Text = "goodsName";
//
// WXOrderListAddSkuPriceForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(564, 294);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "WXOrderListAddSkuPriceForm";
this.Text = "修改sku价格";
this.TitleText = "修改sku价格";
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddPrice)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
public System.Windows.Forms.TextBox txtSkuName;
public System.Windows.Forms.TextBox txtGoodsName;
private System.Windows.Forms.Label 商品名;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx btnAddPrice;
public System.Windows.Forms.NumericUpDown numAddPrice;
private DevComponents.DotNetBar.PanelEx btnCancel;
public System.Windows.Forms.Label lblSkuId;
public System.Windows.Forms.Label lblSpuId;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.TextBox txtCurrentPrice;
public System.Windows.Forms.TextBox txtOrderPrice;
}
}
@@ -1,93 +0,0 @@
using AllBase;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
namespace TemuKJD.WXForms.ProductForms
{
public partial class WXOrderListAddSkuPriceForm : BaseForms.BaseGeneralForm
{
public ShopLoginInfo shop;
public WXOrderListAddSkuPriceForm(ShopLoginInfo _shop)
{
InitializeComponent();
shop = _shop;
this.TitleText = "店铺 " + shop.ShopAccount + " 修改sku价格";
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
public JObject prodObj = new JObject();
public bool EditSuccess { get; set; } = false;
private void btnAddPrice_Click(object sender, EventArgs e)
{
EditSuccess = false;
try
{
var spuId = lblSpuId.Text;
int onSaleStatusCode = -1;
int pageSize = 50;
var getProdOnSaleRst = WXClearNoVisit.searchProduct(shop, 1, pageSize, spuId, onSaleStatusCode);
if (!getProdOnSaleRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJsonByRegs(ref getProdOnSaleRst, getProdOnSaleRst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowInfo("改价失败" + error);
}
prodObj = JsonHelper.JObjectParse(getProdOnSaleRst)["productList"].FirstOrDefault() as JObject;
if (prodObj != null)
{
var str = JsonHelper.SerializeObject(prodObj);
}
//var rst = WXOrderList.EditPrice(shop, lblSpuId.Text, lblSkuId.Text, (numAddPrice.Value * 100).ParseToInt());
JObject changePriceObj = new JObject();
JArray skuArr = new JArray();
foreach (var sku in prodObj["skuList"])
{
JObject obj = new JObject();
obj["spuId"] = spuId;
obj["skuId"] = sku["skuId"];
obj["salePrice"] = sku["price"].ParseToInt() + (numAddPrice.Value * 100).ParseToInt();
skuArr.Add(obj);
}
changePriceObj["skuList"] = skuArr;
changePriceObj["uploadSource"] = 6;
// string body = @"{""skuList"":[{""spuId"":" + spuId + @",""skuId"":""" + skuId + @""",""salePrice"":" + newPrice + @"}],""uploadSource"":6}";
var rst = WXOrderList.EditPrice(shop, changePriceObj);
if (rst.Contains("\"code\":0"))
{
EditSuccess = true;
BaseMsgForm.ShowInfo("改价成功");
this.Close();
}
else
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
BaseMsgForm.ShowError("改价失败:" + error);
}
}
catch
{
}
}
}
}
@@ -11,6 +11,7 @@ using System.Windows.Forms;
using TemuKJD.BaseForms;
using AllBase;
using TemuKJD.PDDForms.ProductSelectForms;
using TemuKJD.WXForms.OrderForms;
namespace TemuKJD.WXForms.ProductForms
{