diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 4786937..5afed4d 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -187,7 +187,11 @@ + + + + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 92607c2..5bb2ab9 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 637; + public static int VersionCount = 638; //public static int VersionCount = 613; /// diff --git a/AllBase/Model/Param/PDDCouponParam/PDDActivityMarketingParam.cs b/AllBase/Model/Param/PDDCouponParam/PDDActivityMarketingParam.cs new file mode 100644 index 0000000..d99c6a4 --- /dev/null +++ b/AllBase/Model/Param/PDDCouponParam/PDDActivityMarketingParam.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Param.PDDCouponParam +{ + public class PDDActivityMarketingParam + { + public int? call_source { get; set; } + public List batch_stage_activities { get; set; } + public bool? default_channel { get; set; } = true; + } + + public class batch_stage_activity_info + { + public List stage_activities { get; set; } + } + + public class stage_activity_info + { + public bool? goods_unified_activity { get; set; } // true, + public string activity_name { get; set; } // "限量促销1", + public int? activity_type { get; set; } // 3, + public bool? check_low_price { get; set; } // true, + public long? goods_id { get; set; } // 820143666861, + public string tool_full_channel { get; set; } // "10921_77271__normal", + public string channel_recognize_code { get; set; } // "b21rZ2V5aGwtNDkyMzc5NjkzLTE3NjA5Mzk3NDE0MTY=", + public bool? auto_create_after_finished { get; set; } = false; // false, + public marketing_tool_detail_option_info marketing_tool_detail_option { get; set; } = new marketing_tool_detail_option_info(); + public List price_list { get; set; } + public int? pattern { get; set; } + public long? start_time { get; set; } // 1760889600, + public long? end_time { get; set; } // 1761494399 + } + public class activity_sku_price + { + public int? user_activity_limit { get; set; } // 0 + public List sku_price_dtos { get; set; } + public int? quantity { get; set; } // 1782 + } + + public class sku_price_dto + { + public long? sku_id { get; set; } // 1788445374246 + public int? activity_price { get; set; } // 6612 + } + + public class marketing_tool_detail_option_info + { + public bool? price_insurance { get; set; } = false; + } +} diff --git a/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsListInfo.cs b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsListInfo.cs new file mode 100644 index 0000000..ca5c7a5 --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsListInfo.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult.PDDCouponResult +{ + public class PDDActivityToolGoodsListInfo + { + public int? total { get; set; } = 1; + public int? remaining_create_num { get; set; } = 1; + public List goods_list { get; set; } = new List(); + } + + public class PDDActivityGoodsInfo + { + public long? goods_id { get; set; } // 820141079905, + public string goods_name { get; set; } // "Simwood简木男装2021秋季新款纯棉衬衣休闲百搭牛津纺长袖衬衫男", + public int? quantity { get; set; } // 594, + public string image_url { get; set; } // "", + public int? cat_id { get; set; } // 423, + public int? cat_id1{ get; set; } // 239, + public int? cat_id2{ get; set; } // 245, + public int? cat_id3{ get; set; } // 423, + public int? cat_id4 { get; set; } // 0, + public List sku_group_price { get; set; } // [ 40660, 42260 ], + public string hd_thumb_url { get; set; } // "https://img.pddpic.com/gaudit-image/2025-09-17/fb8dc75ffcf88199a244aca6add28e1b.jpeg", + public string thumb_url { get; set; } // "https://img.pddpic.com/gaudit-image/2025-09-17/3d4669220263f41cb69c2903f9ade36e.jpeg", + public bool? new_goods { get; set; } // false, + public List new_flow_equity_option_volist {get;set;} + public bool? valid { get; set; } // true + public bool? optional { get; set; } // true + + // 自定义参数 + public string shopId { get; set; } + public string shopName { get; set; } + } + public class new_flow_equity_option_vo_info + { + public int? type { get; set; } // 5 + public bool? selected { get; set; } // true + } + + public class PDDCreateActivityToolResult + { + public List fail_list { get; set; } + public List success_goods_id_list { get; set; } + } + + public class PDDCreateActivityToolFailInfo + { + public long goods_id { get; set; } // 820156693761, + public string goods_name { get; set; } // "Simwood简木男装2021秋季新款纯棉衬衣休闲百搭牛津纺长袖衬衫男", + public string mage_url { get; set; } // "https://img.pddpic.com/gaudit-image/2025-09-17/61a216c8e22bf14a313b04a97172ff54.jpeg", + public string fail_reason { get; set; } // "规格Id:1787512685498,规格 折后价不符合规则; 规格Id:1787512685497,规格 折后价不符合规则; 规格Id:1787512685496,价格过高,未达门槛; 规格Id:1787512685495,价格过高,未达门槛; ", + public long? error_code { get; set; } // 1000000, + public List low_price_promotion_info_volist { get; set; } // [ ] + } +} diff --git a/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsSkuListInfo.cs b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsSkuListInfo.cs new file mode 100644 index 0000000..e1e9d78 --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolGoodsSkuListInfo.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult.PDDCouponResult +{ + public class PDDActivityToolGoodsSkuListInfo + { + public long? goods_id { get; set; } + public List valid_sku_volist { get; set; } + public List in_valid_sku_volist { get; set; } + } + + public class valid_sku_vo_info + { + public long? goods_id { get; set; } // 820277345858, + public long? sku_id { get; set; } // 1787597162211, + public string sku_name { get; set; } // "均码;丝绒裤子", + public int? quantity { get; set; } // 99, + public string thumb_url { get; set; } // "https://t00img.yangkeduo.com/openapi/images/2021-01-06/66404c25d56ad46d9bfb3d060c154f7f.jpeg", + public int? sku_group_price { get; set; } // 18963, + public int? valid_status { get; set; } // 0, + public string invalid_reason { get; set; } // "规格 有效" + } +} diff --git a/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolSkuDiscountListInfo.cs b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolSkuDiscountListInfo.cs new file mode 100644 index 0000000..302fb5c --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PDDCouponResult/PDDActivityToolSkuDiscountListInfo.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult.PDDCouponResult +{ + public class PDDActivityToolSkuDiscountListInfo + { + public List marketing_tool_discounts { get; set; } + public int? batch_max_discount { get; set; } // 874, + public int? batch_max_discount_tenth { get; set; } // 87, + public int? batch_min_discount { get; set; } // 100, + public int? batch_min_discount_tenth { get; set; } // 10, + public int? batch_max_reduced_amount { get; set; } // 6840, + public int? batch_min_reduced_amount { get; set; } // 17067, + public int? batch_max_activity_price { get; set; } // 6660, + public int? batch_min_activity_price { get; set; } // 2036 + + } + + public class marketing_tool_discount + { + public long? goods_id { get; set; } // 820277345858, + public int? discount { get; set; } // 960, + public int? discount_tenth { get; set; } // 96, + public int? min_discount { get; set; } // 100, + public int? min_discount_tenth { get; set; } // 10, + public int? suggest_discount { get; set; } // 949, + public int? suggest_discount_tenth { get; set; } // 94, + public int? max_activity_price { get; set; } // 18215, + public int? min_activity_price { get; set; } // 2036, + public int? suggest_activity_price { get; set; } // 18014, + public int? max_reduced_amount { get; set; } // 17067, + public int? min_reduced_amount { get; set; } // 748, + public int? suggest_reduced_amount { get; set; } // 1019, + public int? min_quantity { get; set; } // 1, + public int? max_quantity { get; set; } // 2147483647, + public List backward_stage_activity_suggested_info { get; set; } + public List sku_discounts { get; set; } + public List goods_new_flow_equity_option_volist { get; set; } + public List goods_wide_new_flow_equity_option_volist { get; set; } + } + + public class goods_new_flow_equity_option_vo_info + { + public int? type { get; set; } // 5 + public bool? selected { get; set; } // true + } + + public class goods_wide_new_flow_equity_option_vo_info + { + public int? type { get; set; } // 5 + public bool? selected { get; set; } // true + } + + public class sku_discount_info + { + public long? sku_id { get; set; } // 1787597162211, + public int? discount { get; set; } // 960, + /// + /// 折扣后最高值 96代表9.6折 + /// + public int? discount_tenth { get; set; } // 96, + public int? min_discount { get; set; } // 100, + /// + /// 折扣后最低值 10代表1折 + /// + public int? min_discount_tenth { get; set; } // 10, + public int? min_discounted_price { get; set; } // 1896, + public int? max_discounted_price { get; set; } // 18215, + public int? suggested_activity_price { get; set; } // 18014, + public int? suggested_activity_discount { get; set; } // 949, + public int? suggested_activity_discount_tenth { get; set; } // 94, + /// + /// 最少降价金额 + /// + public int? min_reduced_amount { get; set; } // 748, + /// + /// 最多降价金额 + /// + public int? max_reduced_amount { get; set; } // 17067, + public int? suggested_reduced_amount { get; set; } // 949, + + public List backward_stage_activity_suggested_info { get; set; } + } + + public class backward_stage_activity_suggested_info_ + { + public int? activity_price { get; set; } // 18014, + public int? activity_discount { get; set; } // 949, + public int? activity_discount_tenth { get; set; } // 94, + public int? reduced_amount { get; set; } // 1019 + + } +} diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 524a804..eff5c5e 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -465,6 +465,12 @@ PDDProdCouponShangPinLiJianForm.cs + + Form + + + PDDProdActivityToolXianShiXianLiangForm.cs + Form @@ -960,6 +966,9 @@ PDDProdCouponShangPinLiJianForm.cs + + PDDProdActivityToolXianShiXianLiangForm.cs + PDDProductForm.cs diff --git a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.Designer.cs b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.Designer.cs new file mode 100644 index 0000000..573d07f --- /dev/null +++ b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.Designer.cs @@ -0,0 +1,1015 @@ + +namespace TemuKJD.PDDForms.ProductForms.CouponForms +{ + partial class PDDProdActivityToolXianShiXianLiangForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.pnlTime = new System.Windows.Forms.Panel(); + this.dtpCoupon1StartTime = new System.Windows.Forms.DateTimePicker(); + this.lblStartTime = new System.Windows.Forms.Label(); + this.lblKeepdays = new System.Windows.Forms.Label(); + this.numCoupon1KeepDays = new System.Windows.Forms.NumericUpDown(); + this.lblKeepDays2 = new System.Windows.Forms.Label(); + this.numQuantity = new System.Windows.Forms.NumericUpDown(); + this.lblQuantity = new System.Windows.Forms.Label(); + this.line2 = new DevComponents.DotNetBar.Controls.Line(); + this.chkTime = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.numReducedAmount = new System.Windows.Forms.NumericUpDown(); + this.chkReducedAmount = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label5 = new System.Windows.Forms.Label(); + this.numDiscountTenth = new System.Windows.Forms.NumericUpDown(); + this.chkDiscountTenth = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label14 = new System.Windows.Forms.Label(); + this.chkQuantity = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.line1 = new DevComponents.DotNetBar.Controls.Line(); + this.txtCoupon1Name = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnCreate = new DevComponents.DotNetBar.PanelEx(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colFavorites = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSales = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSalesThirtyDays = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colIsCanSet = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.btnCancel = new DevComponents.DotNetBar.PanelEx(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx2.SuspendLayout(); + this.pnlTime.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numCoupon1KeepDays)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numQuantity)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numReducedAmount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numDiscountTenth)).BeginInit(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); + this.splitContainer4.Panel1.SuspendLayout(); + this.splitContainer4.Panel2.SuspendLayout(); + this.splitContainer4.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(1208, 541); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.TabIndex = 15; + // + // ucGroupBoxEx2 + // + this.ucGroupBoxEx2.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.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.pnlTime); + this.ucGroupBoxEx2.Controls.Add(this.numQuantity); + this.ucGroupBoxEx2.Controls.Add(this.lblQuantity); + this.ucGroupBoxEx2.Controls.Add(this.line2); + this.ucGroupBoxEx2.Controls.Add(this.chkTime); + this.ucGroupBoxEx2.Controls.Add(this.numReducedAmount); + this.ucGroupBoxEx2.Controls.Add(this.chkReducedAmount); + this.ucGroupBoxEx2.Controls.Add(this.label5); + this.ucGroupBoxEx2.Controls.Add(this.numDiscountTenth); + this.ucGroupBoxEx2.Controls.Add(this.chkDiscountTenth); + this.ucGroupBoxEx2.Controls.Add(this.label14); + this.ucGroupBoxEx2.Controls.Add(this.chkQuantity); + this.ucGroupBoxEx2.Controls.Add(this.line1); + this.ucGroupBoxEx2.Controls.Add(this.txtCoupon1Name); + this.ucGroupBoxEx2.Controls.Add(this.label2); + this.ucGroupBoxEx2.Controls.Add(this.btnCreate); + this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2); + this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; + this.ucGroupBoxEx2.Size = new System.Drawing.Size(1058, 140); + this.ucGroupBoxEx2.TabIndex = 667; + this.ucGroupBoxEx2.TabStop = false; + this.ucGroupBoxEx2.Text = "商品查询创建"; + // + // pnlTime + // + this.pnlTime.Controls.Add(this.dtpCoupon1StartTime); + this.pnlTime.Controls.Add(this.lblStartTime); + this.pnlTime.Controls.Add(this.lblKeepdays); + this.pnlTime.Controls.Add(this.numCoupon1KeepDays); + this.pnlTime.Controls.Add(this.lblKeepDays2); + this.pnlTime.Location = new System.Drawing.Point(154, 50); + this.pnlTime.Name = "pnlTime"; + this.pnlTime.Size = new System.Drawing.Size(220, 69); + this.pnlTime.TabIndex = 739; + this.pnlTime.Visible = false; + // + // dtpCoupon1StartTime + // + this.dtpCoupon1StartTime.Location = new System.Drawing.Point(82, 7); + this.dtpCoupon1StartTime.Name = "dtpCoupon1StartTime"; + this.dtpCoupon1StartTime.Size = new System.Drawing.Size(130, 23); + this.dtpCoupon1StartTime.TabIndex = 726; + // + // lblStartTime + // + this.lblStartTime.AutoSize = true; + this.lblStartTime.Location = new System.Drawing.Point(2, 10); + this.lblStartTime.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblStartTime.Name = "lblStartTime"; + this.lblStartTime.Size = new System.Drawing.Size(80, 17); + this.lblStartTime.TabIndex = 727; + this.lblStartTime.Text = "活动开始时间"; + // + // lblKeepdays + // + this.lblKeepdays.AutoSize = true; + this.lblKeepdays.Location = new System.Drawing.Point(1, 39); + this.lblKeepdays.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblKeepdays.Name = "lblKeepdays"; + this.lblKeepdays.Size = new System.Drawing.Size(80, 17); + this.lblKeepdays.TabIndex = 728; + this.lblKeepdays.Text = "活动时间持续"; + // + // numCoupon1KeepDays + // + this.numCoupon1KeepDays.Location = new System.Drawing.Point(82, 36); + this.numCoupon1KeepDays.Maximum = new decimal(new int[] { + 7, + 0, + 0, + 0}); + this.numCoupon1KeepDays.Name = "numCoupon1KeepDays"; + this.numCoupon1KeepDays.Size = new System.Drawing.Size(41, 23); + this.numCoupon1KeepDays.TabIndex = 729; + this.numCoupon1KeepDays.Value = new decimal(new int[] { + 7, + 0, + 0, + 0}); + // + // lblKeepDays2 + // + this.lblKeepDays2.AutoSize = true; + this.lblKeepDays2.Location = new System.Drawing.Point(124, 39); + this.lblKeepDays2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblKeepDays2.Name = "lblKeepDays2"; + this.lblKeepDays2.Size = new System.Drawing.Size(20, 17); + this.lblKeepDays2.TabIndex = 730; + this.lblKeepDays2.Text = "天"; + // + // numQuantity + // + this.numQuantity.Location = new System.Drawing.Point(68, 57); + this.numQuantity.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.numQuantity.Name = "numQuantity"; + this.numQuantity.Size = new System.Drawing.Size(66, 23); + this.numQuantity.TabIndex = 735; + this.numQuantity.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // lblQuantity + // + this.lblQuantity.AutoSize = true; + this.lblQuantity.Location = new System.Drawing.Point(9, 60); + this.lblQuantity.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblQuantity.Name = "lblQuantity"; + this.lblQuantity.Size = new System.Drawing.Size(56, 17); + this.lblQuantity.TabIndex = 734; + this.lblQuantity.Text = "活动库存"; + // + // line2 + // + this.line2.ForeColor = System.Drawing.SystemColors.ScrollBar; + this.line2.Location = new System.Drawing.Point(374, 19); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(14, 109); + this.line2.TabIndex = 732; + this.line2.Text = "line2"; + this.line2.VerticalLine = true; + // + // chkTime + // + this.chkTime.AutoSize = true; + this.chkTime.Location = new System.Drawing.Point(160, 19); + this.chkTime.Name = "chkTime"; + this.chkTime.Size = new System.Drawing.Size(99, 21); + this.chkTime.TabIndex = 731; + this.chkTime.Text = "创建限时优惠"; + this.chkTime.UseVisualStyleBackColor = true; + this.chkTime.CheckedChanged += new System.EventHandler(this.chkTime_CheckedChanged); + // + // numReducedAmount + // + this.numReducedAmount.Location = new System.Drawing.Point(466, 86); + this.numReducedAmount.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numReducedAmount.Name = "numReducedAmount"; + this.numReducedAmount.Size = new System.Drawing.Size(41, 23); + this.numReducedAmount.TabIndex = 720; + this.numReducedAmount.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + // + // chkReducedAmount + // + this.chkReducedAmount.AutoSize = true; + this.chkReducedAmount.Location = new System.Drawing.Point(399, 87); + this.chkReducedAmount.Name = "chkReducedAmount"; + this.chkReducedAmount.Size = new System.Drawing.Size(75, 21); + this.chkReducedAmount.TabIndex = 722; + this.chkReducedAmount.Text = "优惠金额"; + this.chkReducedAmount.UseVisualStyleBackColor = true; + this.chkReducedAmount.CheckedChanged += new System.EventHandler(this.chkReducedAmount_CheckedChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(507, 89); + this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(20, 17); + this.label5.TabIndex = 721; + this.label5.Text = "元"; + // + // numDiscountTenth + // + this.numDiscountTenth.DecimalPlaces = 1; + this.numDiscountTenth.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numDiscountTenth.Location = new System.Drawing.Point(466, 57); + this.numDiscountTenth.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numDiscountTenth.Name = "numDiscountTenth"; + this.numDiscountTenth.Size = new System.Drawing.Size(41, 23); + this.numDiscountTenth.TabIndex = 713; + this.numDiscountTenth.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // chkDiscountTenth + // + this.chkDiscountTenth.AutoSize = true; + this.chkDiscountTenth.Checked = true; + this.chkDiscountTenth.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkDiscountTenth.Location = new System.Drawing.Point(399, 58); + this.chkDiscountTenth.Name = "chkDiscountTenth"; + this.chkDiscountTenth.Size = new System.Drawing.Size(75, 21); + this.chkDiscountTenth.TabIndex = 719; + this.chkDiscountTenth.Text = "优惠折扣"; + this.chkDiscountTenth.UseVisualStyleBackColor = true; + this.chkDiscountTenth.CheckedChanged += new System.EventHandler(this.chkDiscountTenth_CheckedChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(507, 60); + this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(20, 17); + this.label14.TabIndex = 715; + this.label14.Text = "折"; + // + // chkQuantity + // + this.chkQuantity.AutoSize = true; + this.chkQuantity.Checked = true; + this.chkQuantity.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkQuantity.Location = new System.Drawing.Point(14, 19); + this.chkQuantity.Name = "chkQuantity"; + this.chkQuantity.Size = new System.Drawing.Size(99, 21); + this.chkQuantity.TabIndex = 659; + this.chkQuantity.Text = "创建限量优惠"; + this.chkQuantity.UseVisualStyleBackColor = true; + this.chkQuantity.CheckedChanged += new System.EventHandler(this.chkQuantity_CheckedChanged); + // + // line1 + // + this.line1.ForeColor = System.Drawing.SystemColors.ScrollBar; + this.line1.Location = new System.Drawing.Point(140, 19); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(14, 109); + this.line1.TabIndex = 658; + this.line1.Text = "line1"; + this.line1.VerticalLine = true; + // + // txtCoupon1Name + // + this.txtCoupon1Name.Location = new System.Drawing.Point(452, 18); + this.txtCoupon1Name.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtCoupon1Name.Name = "txtCoupon1Name"; + this.txtCoupon1Name.Size = new System.Drawing.Size(74, 23); + this.txtCoupon1Name.TabIndex = 489; + this.txtCoupon1Name.Text = "限量优惠"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(396, 21); + this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(56, 17); + this.label2.TabIndex = 490; + this.label2.Text = "活动名称"; + // + // btnCreate + // + this.btnCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCreate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCreate.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCreate.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCreate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCreate.Location = new System.Drawing.Point(922, 32); + this.btnCreate.Name = "btnCreate"; + this.btnCreate.Size = new System.Drawing.Size(104, 23); + this.btnCreate.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCreate.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCreate.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCreate.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnCreate.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnCreate.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnCreate.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnCreate.Style.GradientAngle = 90; + this.btnCreate.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCreate.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCreate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCreate.TabIndex = 468; + this.btnCreate.Text = "开始创建"; + this.btnCreate.Click += new System.EventHandler(this.btnCreate_Click); + // + // ucGroupBoxEx1 + // + this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + 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.btnRefreshShop); + this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); + this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; + this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 140); + this.ucGroupBoxEx1.TabIndex = 399; + this.ucGroupBoxEx1.TabStop = false; + this.ucGroupBoxEx1.Text = "基础"; + // + // btnRefreshShop + // + this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRefreshShop.Location = new System.Drawing.Point(17, 31); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(110, 24); + this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefreshShop.Style.GradientAngle = 90; + this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.TabIndex = 431; + this.btnRefreshShop.Text = "刷新店铺"; + this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); + this.splitContainer3.Size = new System.Drawing.Size(1208, 397); + this.splitContainer3.SplitterDistance = 367; + this.splitContainer3.TabIndex = 1; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.dgvShop); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.pbLoading); + this.splitContainer2.Panel2.Controls.Add(this.panel1); + this.splitContainer2.Panel2.Controls.Add(this.dgvProduct); + this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); + this.splitContainer2.Size = new System.Drawing.Size(1208, 367); + this.splitContainer2.SplitterDistance = 300; + this.splitContainer2.TabIndex = 0; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colShopLoginName, + this.colShopId, + this.colShopName, + this.colShopNotes, + this.colSelectProduct, + this.colLoginStatus, + this.colCanUse, + this.colRemaining, + this.colMessage}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowHeadersWidth = 25; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(296, 367); + this.dgvShop.TabIndex = 6; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colSelectProduct + // + this.colSelectProduct.HeaderText = "选择商品"; + this.colSelectProduct.Name = "colSelectProduct"; + this.colSelectProduct.ReadOnly = true; + this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelectProduct.Visible = false; + this.colSelectProduct.Width = 62; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 40; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colRemaining + // + this.colRemaining.HeaderText = "月限额"; + this.colRemaining.Name = "colRemaining"; + this.colRemaining.ReadOnly = true; + this.colRemaining.Visible = false; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + 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(427, 158); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 188; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // panel1 + // + this.panel1.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.panel1.Controls.Add(this.ucSplitPage1); + this.panel1.Location = new System.Drawing.Point(36, 53); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(830, 281); + this.panel1.TabIndex = 189; + // + // ucSplitPage1 + // + this.ucSplitPage1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(245, 244); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(573, 26); + this.ucSplitPage1.TabIndex = 675; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.Visible = false; + // + // dgvProduct + // + this.dgvProduct.AllowUserToAddRows = false; + this.dgvProduct.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dgvProduct.BackgroundColor = System.Drawing.Color.White; + this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colSupplierId, + this.colSupplierName, + this.colImgUrl, + this.colImg, + this.colSpuId, + this.colProductName, + this.colPrice, + this.colStock, + this.colFavorites, + this.colSales, + this.colSalesThirtyDays, + this.colIsCanSet, + this.colOpResult}); + this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvProduct.Location = new System.Drawing.Point(0, 0); + this.dgvProduct.Name = "dgvProduct"; + this.dgvProduct.ReadOnly = true; + this.dgvProduct.RowTemplate.Height = 23; + this.dgvProduct.Size = new System.Drawing.Size(900, 367); + this.dgvProduct.TabIndex = 187; + this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); + // + // colCheck + // + this.colCheck.Frozen = true; + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCheck.Width = 30; + // + // colSupplierId + // + this.colSupplierId.HeaderText = "店铺Id"; + this.colSupplierId.Name = "colSupplierId"; + this.colSupplierId.ReadOnly = true; + // + // colSupplierName + // + this.colSupplierName.HeaderText = "店铺名称"; + this.colSupplierName.Name = "colSupplierName"; + this.colSupplierName.ReadOnly = true; + this.colSupplierName.Width = 110; + // + // colImgUrl + // + this.colImgUrl.HeaderText = "图片地址"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colImg + // + this.colImg.HeaderText = "图片"; + this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colImg.Name = "colImg"; + this.colImg.ReadOnly = true; + this.colImg.Width = 60; + // + // colSpuId + // + this.colSpuId.HeaderText = "商品ID"; + this.colSpuId.Name = "colSpuId"; + this.colSpuId.ReadOnly = true; + this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSpuId.Width = 80; + // + // colProductName + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle5; + this.colProductName.HeaderText = "商品标题"; + this.colProductName.Name = "colProductName"; + this.colProductName.ReadOnly = true; + this.colProductName.Width = 260; + // + // colPrice + // + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + this.colPrice.Width = 90; + // + // colStock + // + this.colStock.HeaderText = "库存"; + this.colStock.Name = "colStock"; + this.colStock.ReadOnly = true; + this.colStock.Width = 70; + // + // colFavorites + // + this.colFavorites.HeaderText = "收藏"; + this.colFavorites.Name = "colFavorites"; + this.colFavorites.ReadOnly = true; + this.colFavorites.Visible = false; + this.colFavorites.Width = 50; + // + // colSales + // + this.colSales.HeaderText = "总销量"; + this.colSales.Name = "colSales"; + this.colSales.ReadOnly = true; + this.colSales.Visible = false; + this.colSales.Width = 60; + // + // colSalesThirtyDays + // + this.colSalesThirtyDays.HeaderText = "30日销量"; + this.colSalesThirtyDays.Name = "colSalesThirtyDays"; + this.colSalesThirtyDays.ReadOnly = true; + this.colSalesThirtyDays.Visible = false; + this.colSalesThirtyDays.Width = 70; + // + // colIsCanSet + // + this.colIsCanSet.HeaderText = "是否可设置"; + this.colIsCanSet.Name = "colIsCanSet"; + this.colIsCanSet.ReadOnly = true; + // + // colOpResult + // + this.colOpResult.HeaderText = "操作结果"; + this.colOpResult.Name = "colOpResult"; + this.colOpResult.ReadOnly = true; + this.colOpResult.Width = 200; + // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.btnCancel); + this.splitContainer4.Size = new System.Drawing.Size(1208, 26); + this.splitContainer4.SplitterDistance = 517; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(517, 26); + this.statusBar.TabIndex = 2; + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(4, 1); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // btnCancel + // + 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(568, 1); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(115, 21); + 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 = 668; + this.btnCancel.Text = "停止当前操作"; + // + // PDDProdActivityToolXianShiXianLiangForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1208, 541); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "PDDProdActivityToolXianShiXianLiangForm"; + this.Text = "PDDProdActivityToolXianShiXianLiangForm"; + this.Load += new System.EventHandler(this.PDDProdActivityToolXianShiXianLiangForm_Load); + this.VisibleChanged += new System.EventHandler(this.PDDProdActivityToolXianShiXianLiangForm_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx2.ResumeLayout(false); + this.ucGroupBoxEx2.PerformLayout(); + this.pnlTime.ResumeLayout(false); + this.pnlTime.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numCoupon1KeepDays)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numQuantity)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numReducedAmount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numDiscountTenth)).EndInit(); + this.ucGroupBoxEx1.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit(); + this.splitContainer4.Panel1.ResumeLayout(false); + this.splitContainer4.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); + this.splitContainer4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx2; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.NumericUpDown numDiscountTenth; + private UserComponent.UcCheckBox chkQuantity; + private DevComponents.DotNetBar.Controls.Line line1; + private System.Windows.Forms.TextBox txtCoupon1Name; + private System.Windows.Forms.Label label2; + private DevComponents.DotNetBar.PanelEx btnCreate; + private UserComponent.UcGroupBoxEx ucGroupBoxEx1; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.SplitContainer splitContainer2; + private UserComponent.DataGridViewEx dgvShop; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.PictureBox pbLoading; + private System.Windows.Forms.Panel panel1; + private UserControls.UcSplitPage ucSplitPage1; + private UserComponent.DataGridViewEx dgvProduct; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colImg; + private System.Windows.Forms.DataGridViewLinkColumn colSpuId; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colStock; + private System.Windows.Forms.DataGridViewTextBoxColumn colFavorites; + private System.Windows.Forms.DataGridViewTextBoxColumn colSales; + private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays; + private System.Windows.Forms.DataGridViewTextBoxColumn colIsCanSet; + private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private System.Windows.Forms.SplitContainer splitContainer4; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx btnClear; + private DevComponents.DotNetBar.PanelEx btnCancel; + private System.Windows.Forms.NumericUpDown numReducedAmount; + private UserComponent.UcCheckBox chkReducedAmount; + private System.Windows.Forms.Label label5; + private UserComponent.UcCheckBox chkDiscountTenth; + private System.Windows.Forms.Label lblKeepDays2; + private System.Windows.Forms.NumericUpDown numCoupon1KeepDays; + private System.Windows.Forms.Label lblKeepdays; + private System.Windows.Forms.DateTimePicker dtpCoupon1StartTime; + private System.Windows.Forms.Label lblStartTime; + private System.Windows.Forms.NumericUpDown numQuantity; + private System.Windows.Forms.Label lblQuantity; + private DevComponents.DotNetBar.Controls.Line line2; + private UserComponent.UcCheckBox chkTime; + private System.Windows.Forms.Panel pnlTime; + } +} \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.cs b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.cs new file mode 100644 index 0000000..3920ba5 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.cs @@ -0,0 +1,721 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Param.PDDCouponParam; +using AllBase.Model.Result; +using AllBase.Model.Result.PDDResult.PDDCouponResult; +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; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.PDDForms.ShopForms; +using TemuKJD.ToolForms; + +namespace TemuKJD.PDDForms.ProductForms.CouponForms +{ + public partial class PDDProdActivityToolXianShiXianLiangForm : BaseForm + { + public CancellationTokenSource cancellationTokenSource { get; set; } = null; + + bool isInit = false; + Dictionary dicShopGetCount = new Dictionary(); + PDDActivityToolGoodsListInfo pddActivityToolGoods = new PDDActivityToolGoodsListInfo(); + + public PDDProdActivityToolXianShiXianLiangForm() + { + InitializeComponent(); + } + + private void PDDProdActivityToolXianShiXianLiangForm_Load(object sender, EventArgs e) + { + //this.dtpCoupon1StartTime.MinDate = DateTime.Now.Date.AddDays(1).AddHours(19); + + this.dgvShop.AddSelectorColumn("colSelect"); + this.dgvProduct.AddSelectorColumn("colCheck"); + dgvProduct.AddImgColumn("colImg", "colImgUrl"); + } + + private void PDDProdActivityToolXianShiXianLiangForm_VisibleChanged(object sender, EventArgs e) + { + if (Visible == true) + { + RefreshShop(); + isInit = true; + } + } + + private void btnRefreshShop_Click(object sender, EventArgs e) + { + RefreshShop(); + } + private void RefreshShop() + { + // 店铺Id + var selectIds = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + // 获取被删除的店铺 + List dgvRowList = dgvShop.Rows.Cast().Where(row + => !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList(); + // 更新被删除的店铺列表 + foreach (var row in dgvRowList) + { + dgvShop.Rows.Remove(row); + } + // 绑定其他店铺(含新导入的店铺) + foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList) + { + if (!string.IsNullOrEmpty(shopEntity.ShopId)) + BindShop(shopEntity, selectIds); + } + } + + private void BindShop(ShopLoginInfo shopEntity, List selectShopId = null) + { + if (shopEntity == null) + return; + if (selectShopId == null) + selectShopId = new List(); + + bool canUse = shopEntity.LoginStatus == "登录成功"; + //canUse = true; // 内部库不需要校验登录状态 + var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row == null) + { + this.dgvShop.Rows.Add( + !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse), + shopEntity.LoginName, + shopEntity.ShopId, + shopEntity.ShopAccount, + shopEntity.Notes, + "选择商品", + canUse ? "在线" : "掉线", + canUse, + shopEntity.AddProductRemaining, + string.Empty + ); + } + else + { + row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse); + row.Cells["colShopLoginName"].Value = shopEntity.LoginName; + row.Cells["colShopName"].Value = shopEntity.ShopAccount; + row.Cells["colShopNotes"].Value = shopEntity.Notes; + row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; + row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + row.Cells["colCanUse"].Value = canUse; + row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining; + } + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string columnName = dgvShop.Columns[e.ColumnIndex].Name; + string shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString(); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString()); + var row = dgvShop.Rows[e.RowIndex]; + switch (columnName) + { + case "colSelect": + row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool(); + break; + case "colLoginStatus": + PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); + if (shop.LoginStatus != "登录成功") + { + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + } + else + { + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.Show(); + } + break; + } + } + + //3 限量促销 12 限时促销 + public string get_xianshixianliang_goods(ShopLoginInfo shop, long startTime, long endTime, int query_activity_type = 3, int page = 1, int pageSize = 20) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/libra-backend/mms/activity/marketing/goods/search"; + string body = "{\"page_no\":" + page + ",\"page_size\":" + pageSize + ",\"is_valid\":true,\"only_new_goods\":false,\"query_activity_type\":" + + query_activity_type + "}"; + + string refere = "https://mms.pinduoduo.com/tool/promotion/create?tool_full_channel=10921_77271"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(500, 1500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + public string get_xianshixianliang_goods_skus(ShopLoginInfo shop, List goodsIdLst, long startTime, long endTime, int page = 1, int pageSize = 20) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/libra-backend/mms/activity/marketing/batch/sku/search"; + string body = @"{""search_marketing_tool_sku_request_list"":["; + foreach (var goodsId in goodsIdLst) + { + body += "{\"goods_id\":" + goodsId + "},"; + } + body = body.TrimEnd(','); + body += "]}"; + + + string refere = "https://mms.pinduoduo.com/tool/promotion/create?tool_full_channel=10921_77271"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(500, 1500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + public string create_xianshixianliang_goods(ShopLoginInfo shop, PDDActivityMarketingParam activityParam) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/libra-backend/mms/activity/marketing/stage/batchCreate"; + string body = JsonHelper.SerializeObject(activityParam); + + string refere = "https://mms.pinduoduo.com/tool/promotion/create?tool_full_channel=10921_77271"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(500, 1500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private void btnCreate_Click(object sender, EventArgs e) + { + var lstShopId = dgvShop.Rows.Cast() + .Where(row => row.Cells["colSelect"]?.Value.ParseToBool() == true && row.Cells["colLoginStatus"]?.Value.ParseToString() == "在线") + .Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (lstShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择登录的店铺!"); + return; + } + pddActivityToolGoods.goods_list.Clear(); + pddActivityToolGoods.remaining_create_num = 1; + pddActivityToolGoods.total = 1; + + dgvProduct.Rows.Clear(); + + var dgvRows = this.dgvShop.Rows.Cast();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString())); + foreach (var row in dgvRows) + { + row.Cells["colMessage"].Value = ""; + } + + + if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true) + PDDShopLoginForm.shopLoginInstance.Dispose(); + ucGroupBoxEx2.Enabled = false; + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + var lstShopIdTemp = new List(); + lstShopIdTemp.AddRange(lstShopId); + int i = 0; + + foreach (var shopId in lstShopIdTemp) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在查询..."; + this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count; + this.statusBar.UpdateProgressBar(i + 1); + i++; + })); + + if (cancellationTokenSource.IsCancellationRequested) + break; + + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + if (shop == null) + continue; + + #region 检测登录 + if (shop.LoginStatus == "登录成功") + { + PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + } + if (shop.LoginStatus != "登录成功") + { + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "店铺掉线"; + row.Cells["colLoginStatus"].Value = "掉线"; + row.Cells["colCanUse"].Value = false; + } + })); + continue; + } + #endregion + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "正在查询"; + } + })); + + int page = 0; + int pageSize = 20; // 优惠券最大20 + int totalPage = 1; + bool isError = false; + string errMsg = ""; + while (page < totalPage) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + page++; + + int tryCount = 0; + tryAgain: + + GetToken(shop); + + if (page > 1) + Thread.Sleep(Randomx.GetId(3000, 7000)); + + long startStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value); + long endStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value.Date.AddDays(numCoupon1KeepDays.Value.ParseToInt())) - 1; + string jsonStr = get_xianshixianliang_goods(shop, startStamp, endStamp, chkQuantity.Checked ? 3 : 12, page, pageSize); + jsonStr = GetHtml.Unicode2String(jsonStr); + if (jsonStr.Contains("繁忙") && tryCount < 5) + { + tryCount++; + Thread.Sleep(Randomx.GetId(5000, 10000)); + goto tryAgain; + } + if (!jsonStr.Contains("\"success\":true")) + { + PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + if (shop.LoginStatus != "登录成功") + break; + + isError = true; + string sErr = BaseRegex.GetStringJson(ref jsonStr, "error_msg"); + if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr)) + errMsg += sErr + " "; + page++; + continue; + } + + if (jsonStr.Contains("\"success\":true")) + { + PDDActivityToolGoodsListInfo pddActivityToolGoodsTmp = new PDDActivityToolGoodsListInfo(); + try + { + var jObj = JObject.Parse(jsonStr); + var rstStr = JsonHelper.SerializeObject(jObj["result"]); + pddActivityToolGoodsTmp = JsonHelper.DeserializeJsonToObject(rstStr); + this.pddActivityToolGoods.remaining_create_num = pddActivityToolGoodsTmp.remaining_create_num; + this.pddActivityToolGoods.total = pddActivityToolGoodsTmp.total; + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } + foreach (var pInfo in pddActivityToolGoodsTmp.goods_list) + { + pInfo.shopId = shop.ShopId; + pInfo.shopName = shop.ShopAccount; + if (pInfo != null && !pddActivityToolGoods.goods_list.Any(a => a.goods_id == pInfo.goods_id)) + { + this.pddActivityToolGoods.goods_list.Add(pInfo); + string url = pInfo.thumb_url; + Invoke(new Action(() => + { + int rowId = this.dgvProduct.Rows.Add( + /*pInfo.is_filtered !=*/ true, + shop.ShopId, + shop.ShopAccount, + url.Replace("https", "http"), + DataGridViewExtension.defaultBitmap, // 列表图片,public static Bitmap defaultBitmap = new Bitmap(1,1); + pInfo.goods_id, + pInfo.goods_name, + string.Join("~", pInfo.sku_group_price.Select(s => s / 100m)), + pInfo.quantity, + "", //收藏 + "", //总销量 + "", //30日销量 + /*pInfo.is_filtered == true ? "不可设置:" + pInfo.filtered_reason :*/ "可设置", + "" // 操作结果,状态 + ); + + dgvProduct.Rows[rowId].Height = 60; + })); + } + } + int discountVal = 0; + Invoke(new Action(() => + { + discountVal = (numReducedAmount.Value * 100).ParseToInt(); + })); + + var jsonSkusStr = get_xianshixianliang_goods_skus(shop, pddActivityToolGoodsTmp.goods_list.Select(g => g.goods_id.ParseToLong()).ToList(), + startStamp, endStamp, page, pageSize); + jsonSkusStr = GetHtml.Unicode2String(jsonSkusStr); + if (!jsonSkusStr.Contains("\"success\":true")) + { + PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + if (shop.LoginStatus != "登录成功") + break; + + isError = true; + string sErr = BaseRegex.GetStringJson(ref jsonSkusStr, "error_msg"); + if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr)) + errMsg += sErr + " "; + page++; + continue; + } + List pddActivityToolGoodsSkuListTmp = new List(); + try + { + var jObj = JObject.Parse(jsonSkusStr); + var rstStr = JsonHelper.SerializeObject(jObj["result"]["search_marketing_tool_sku_result_list"]); + pddActivityToolGoodsSkuListTmp = JsonHelper.DeserializeJsonToList(rstStr); + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } + + + //foreach (var pInfo in pddActivityToolGoodsTmp.goods_list) + //{ + // if (pInfo.coupon_value_limit.FirstOrDefault() > discountVal || pInfo.coupon_value_limit.LastOrDefault() < discountVal) + // { + // var row = dgvProduct.Rows.Cast().FirstOrDefault(r => r.Cells["colSpuId"].Value.ParseToLong() == pInfo.id); + // if (row != null) + // { + // row.Cells["colOpResult"].Value = "优惠券金额不在可设置范围内!"; + // } + // } + //} + //var createLst = pddActivityToolGoodsTmp.goods_list.Where(g => g.coupon_value_limit.FirstOrDefault() <= discountVal && + // g.coupon_value_limit.LastOrDefault() >= discountVal).Where(g => g.is_filtered == false).ToList(); + + var createLst = pddActivityToolGoodsTmp.goods_list; + PDDActivityMarketingParam actParam = new PDDActivityMarketingParam(); + actParam.call_source = 1; + actParam.default_channel = true; + actParam.batch_stage_activities = new List(); + foreach (var goodsSkus in pddActivityToolGoodsSkuListTmp) + { + Invoke(new Action(() => + { + batch_stage_activity_info batchStageActParam = new batch_stage_activity_info(); + actParam.batch_stage_activities.Add(batchStageActParam); + batchStageActParam.stage_activities = new List(); + stage_activity_info stageActParam = new stage_activity_info() + { + goods_unified_activity = true, + activity_name = txtCoupon1Name.Text, + activity_type = chkQuantity.Checked ? 3 : 12, + check_low_price = true, + goods_id = goodsSkus.goods_id, + tool_full_channel = "10921_77271__normal", + channel_recognize_code = "b21rZ2V5aGwtNDkyMzc5NjkzLTE3NjA5DNA3OTc4MTY=", + auto_create_after_finished = false, + marketing_tool_detail_option = new marketing_tool_detail_option_info { price_insurance = false, }, + }; + batchStageActParam.stage_activities.Add(stageActParam); + if (chkQuantity.Checked) + stageActParam.pattern = 11; + else + { + stageActParam.start_time = startStamp; + stageActParam.end_time = endStamp; + } + stageActParam.price_list = new List(); + activity_sku_price skuPriceParam = new activity_sku_price(); + stageActParam.price_list.Add(skuPriceParam); + skuPriceParam.user_activity_limit = 0; + skuPriceParam.quantity = null; // 限时购不设置库存 + if (chkQuantity.Checked) // 如果是限量购,设置具体库存参加活动 + skuPriceParam.quantity = Math.Min(goodsSkus.valid_sku_volist.Sum(s=>s.quantity).ParseToInt(), numQuantity.Value.ParseToInt()); + + skuPriceParam.sku_price_dtos = new List(); + foreach (var skuPriceInfo in goodsSkus.valid_sku_volist) + { + skuPriceParam.sku_price_dtos.Add(new sku_price_dto() + { + sku_id = skuPriceInfo.sku_id, + activity_price = chkDiscountTenth.Checked ? (skuPriceInfo.sku_group_price * numDiscountTenth.Value * 0.1m).ParseToInt() : + (skuPriceInfo.sku_group_price - numReducedAmount.Value * 100).ParseToInt(), + }); + } + })); + } + + if (actParam.batch_stage_activities.Count > 0) + { + Thread.Sleep(Randomx.GetId(500, 1500)); + ////设置限量购 + //PDDCouponParam creatCouponParam = new PDDCouponParam(); + //creatCouponParam.ignore_low_price = false; + //creatCouponParam.source_type = 1242; + //creatCouponParam.tool_full_channel = "12110_76109_010921_77272"; + //creatCouponParam.create_request_list = new List(); + //foreach (var pInfo in createLst) + //{ + // Invoke(new Action(() => + // { + // creatCouponParam.create_request_list.Add(new create_request + // { + // batch_desc = txtCoupon1Name.Text, + // batch_end_time = endStamp, + // batch_start_time = startStamp, + // discount = (numCouponValue.Value * 100).ParseToInt(), + // duration = 7, // 固定填7 + // goods_id = pInfo.id, + // init_quantity = pInfo.quantity, + // period_type = 0, + // status = 2, // 固定填2 + // user_limit = cmbCoupon1TicketNum.Text.Replace("张", "").ParseToInt(), + // }); + // })); + //} + var creatRst = create_xianshixianliang_goods(shop, actParam); + creatRst = GetHtml.Unicode2String(creatRst); + if (!creatRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref creatRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = creatRst; + foreach (var pInfo in actParam.batch_stage_activities) + { + var row = dgvProduct.Rows.Cast().FirstOrDefault( + r => r.Cells["colSpuId"].Value.ParseToLong() == pInfo.stage_activities?.FirstOrDefault()?.goods_id); + if (row != null) + { + row.Cells["colOpResult"].Value = error; + } + } + } + else + { + try + { + var jObj = JObject.Parse(creatRst); + var rstStr = JsonHelper.SerializeObject(jObj["result"]); + var pDDCreateActivityResult = JsonHelper.DeserializeJsonToObject(rstStr); + + foreach (var pInfo in createLst) + { + var row = dgvProduct.Rows.Cast().FirstOrDefault(r => r.Cells["colSpuId"].Value.ParseToLong() == pInfo.goods_id); + if (row != null) + { + var createErr = pDDCreateActivityResult.fail_list.FirstOrDefault(er => er.goods_id == pInfo.goods_id); + if (createErr != null) + row.Cells["colOpResult"].Value = createErr.fail_reason; + else + row.Cells["colOpResult"].Value = "设置成功!"; + } + } + } + catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } + } + } + + int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); + totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt(); + } + } + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + + if (!isError) + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "已设置"; + } + } + else + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "设置失败 " + errMsg; + } + } + })); + } + Invoke(new Action(() => + { + ucGroupBoxEx2.Enabled = true; + string sRst = "设置结束!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消设置!"; + + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; + })); + }, cancellationTokenSource.Token); + } + public void GetToken(ShopLoginInfo shop) + { + if (!dicShopGetCount.Keys.Contains(shop)) + dicShopGetCount[shop] = 100; + else + dicShopGetCount[shop]++; + if (dicShopGetCount[shop] > 5) + { + dicShopGetCount[shop] = 0; + + while (PDDShopLoginForm.shopLoginInstance != null && !PDDShopLoginForm.shopLoginInstance.IsDisposed) + { + Thread.Sleep(500); + } + + Invoke(new Action(() => + { + this.panel1.SendToBack(); + PDDShopLoginForm loginForm = new PDDShopLoginForm(shop); + loginForm.TopLevel = false; + loginForm.openType = EnumOpenType.manage; + loginForm.WindowState = FormWindowState.Maximized; + loginForm.InitUrl = "https://mms.pinduoduo.com/tool/surprise-coupon/create/"; + loginForm.Dock = DockStyle.Fill; + this.panel1.Controls.Add(loginForm); + loginForm.Show(); + })); + int sleepTime = Randomx.GetId(2000, 3000); + Thread.Sleep(sleepTime); + + Invoke(new Action(() => + { + if (PDDShopLoginForm.shopLoginInstance != null) + PDDShopLoginForm.shopLoginInstance.Dispose(); + })); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null && !cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource.Cancel(); + } + + private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText; + switch (headerText) + { + case "删除": + //if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + // return; + //var rst = DeleteProduct(dbId); + //if (rst) + //{ + // SearchDbProdSelect(this.ucSplitPage1.CurrentPage); + //} + break; + case "图片": + { + ShowImgForm imgFrom = new ShowImgForm(dgvProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + } + break; + case "": + dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private void chkQuantity_CheckedChanged(object sender, EventArgs e) + { + chkTime.Checked = !chkQuantity.Checked; + lblQuantity.Visible = numQuantity.Visible = chkQuantity.Checked; + if (chkQuantity.Checked) + { + txtCoupon1Name.Text = txtCoupon1Name.Text.Replace("限时优惠", "限量优惠"); + } + else + { + txtCoupon1Name.Text = txtCoupon1Name.Text.Replace("限量优惠", "限时优惠"); + } + } + + private void chkTime_CheckedChanged(object sender, EventArgs e) + { + chkQuantity.Checked = !chkTime.Checked; + pnlTime.Visible = chkTime.Checked; + } + + private void chkDiscountTenth_CheckedChanged(object sender, EventArgs e) + { + chkReducedAmount.Checked = !chkDiscountTenth.Checked; + } + + private void chkReducedAmount_CheckedChanged(object sender, EventArgs e) + { + chkDiscountTenth.Checked = !chkReducedAmount.Checked; + } + } +} diff --git a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.resx b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.resx new file mode 100644 index 0000000..ff9031b --- /dev/null +++ b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdActivityToolXianShiXianLiangForm.resx @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponForm.cs b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponForm.cs index 7f51fa4..c9fb605 100644 --- a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponForm.cs @@ -16,6 +16,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms public Lazy prodCouponJingXiForm = new Lazy(); public Lazy prodCouponShangPinLiJianForm = new Lazy(); public Lazy prodCouponLingQuanZhongXinForm = new Lazy(); + public Lazy prodActivityToolXianShiXianLiangForm = new Lazy(); public PDDProdCouponForm() { @@ -27,7 +28,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms this.ucTabControl1.TabPages.Clear(); this.ucTabControl1.TabPages.Add("惊喜券"); this.ucTabControl1.TabPages.Add("商品立减券"); - this.ucTabControl1.TabPages.Add("领券中心券"); + this.ucTabControl1.TabPages.Add("领券中心券"); + this.ucTabControl1.TabPages.Add("限时限量购"); this.ucTabControl1.SelectedIndex = 0; ucTabControl1_SelectedIndexChanged(null, null); } @@ -48,6 +50,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms case "领券中心券": SetForm(prodCouponLingQuanZhongXinForm.Value); break; + case "限时限量购": + SetForm(prodActivityToolXianShiXianLiangForm.Value); + break; } } diff --git a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponLingQuanZhongXinForm.cs b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponLingQuanZhongXinForm.cs index 202cca1..4020824 100644 --- a/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponLingQuanZhongXinForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/CouponForms/PDDProdCouponLingQuanZhongXinForm.cs @@ -389,16 +389,23 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms // 筛选下不符合条件的直接不去设置了 createLst = pddCouponGoodsTmp.goods_list.Where(g => g.coupon_value_limit.FirstOrDefault() <= discountVal && g.coupon_value_limit.LastOrDefault() >= discountVal).Where(g => g.is_filtered == false).ToList(); - if (createLst.Count > 0) + + while (createLst.Count > 0) { - Thread.Sleep(Randomx.GetId(500, 1500)); + var createLstTmp = createLst.Take(5).ToList(); + foreach (var item in createLstTmp) + { + createLst.Remove(item); + } + + Thread.Sleep(Randomx.GetId(1000, 2000)); //设置商品立减券 PDDCouponParam creatCouponParam = new PDDCouponParam(); creatCouponParam.ignore_low_price = null; creatCouponParam.source_type = 221; //creatCouponParam.tool_full_channel = "12110_76109_010921_57020_"; creatCouponParam.create_request_list = new List(); - foreach (var pInfo in createLst) + foreach (var pInfo in createLstTmp) { Invoke(new Action(() => { @@ -424,7 +431,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms var error = BaseRegex.GetStringJson(ref creatRst, "error_msg"); if (string.IsNullOrEmpty(error)) error = creatRst; - foreach (var pInfo in createLst) + foreach (var pInfo in createLstTmp) { var row = dgvProduct.Rows.Cast().FirstOrDefault(r => r.Cells["colSpuId"].Value.ParseToLong() == pInfo.id); if (row != null) @@ -441,7 +448,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms var rstStr = JsonHelper.SerializeObject(jObj["result"]); var pDDCreateCouponResultV2 = JsonHelper.DeserializeJsonToObject(rstStr); - foreach (var pInfo in createLst) + foreach (var pInfo in createLstTmp) { var row = dgvProduct.Rows.Cast().FirstOrDefault(r => r.Cells["colSpuId"].Value.ParseToLong() == pInfo.id); if (row != null)