From 55258d0d910c1848bac3331c13eb9911c69f6850 Mon Sep 17 00:00:00 2001 From: chfei Date: Mon, 7 Sep 2026 13:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=91=E4=BB=93=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 7 +- AllBase/BindableBase.cs | 275 ++++++++ AllBase/Model/Result/Result.cs | 19 +- TEMUKJD/KJD.csproj | 5 +- .../PDDForms/ProductForms/PDDProductForm.cs | 11 +- .../CloudGoodsForm.Designer.cs | 593 ++++++++++++++++++ .../ProductSelectForms/CloudGoodsForm.cs | 413 ++++++++++++ .../ProductSelectForms/CloudGoodsForm.resx | 141 +++++ TEMUKJD/ToolForms/ShowImgForm.cs | 418 ++++++------ TEMUKJD/UserControls/UcSplitPage.Designer.cs | 468 +++++++------- .../ProductForms/WXProductForm.Designer.cs | 344 +++++----- TEMUKJD/WXForms/ProductForms/WXProductForm.cs | 365 +++++------ Work/Services/CloudGoodsService.cs | 237 +++++++ Work/Work.csproj | 465 +++++++------- 14 files changed, 2733 insertions(+), 1028 deletions(-) create mode 100644 AllBase/BindableBase.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.Designer.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.resx create mode 100644 Work/Services/CloudGoodsService.cs diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 9d1ce85..5c89db6 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -92,7 +92,7 @@ full x64 false - 7.3 + 12.0 prompt MinimumRecommendedRules.ruleset false @@ -104,8 +104,8 @@ pdbonly x64 false - 7.3 - prompt + 12.0 + prompt MinimumRecommendedRules.ruleset false @@ -159,6 +159,7 @@ + diff --git a/AllBase/BindableBase.cs b/AllBase/BindableBase.cs new file mode 100644 index 0000000..6c8739c --- /dev/null +++ b/AllBase/BindableBase.cs @@ -0,0 +1,275 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq.Expressions; +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace AllBase +{ + /// + /// 提供属性更改通知功能的基类 + /// + public abstract class BindableBase : INotifyPropertyChanged + { + public event PropertyChangedEventHandler? PropertyChanged; + + private Dictionary? _propertyBag; + + #region PropertyBag Accessor + + private Dictionary PropertyBag => _propertyBag ??= []; + + #endregion + + #region Constructor & Initialization + + public BindableBase() + { + OnInitialized(); + } + + public virtual void OnInitialized() + { + } + + #endregion + + #region Property Name Extraction + + public static string GetPropertyName(Expression> expression) + { + return GetPropertyNameFast(expression); + } + + internal static string GetPropertyNameFast(LambdaExpression expression) + { + if (expression.Body is not MemberExpression memberExpression) + { + throw new ArgumentException("MemberExpression is expected in expression.Body", nameof(expression)); + } + + MemberInfo member = memberExpression.Member; + if (member.MemberType == MemberTypes.Field && member.Name != null && member.Name.StartsWith("$VB$Local_")) + { + return member.Name.Substring("$VB$Local_".Length); + } + + string result = member.Name + ?? throw new ArgumentNullException(nameof(member.Name), "member.Name is null"); + return result; + } + + #endregion + + #region Property Access (Expression-based) + + protected T? GetProperty(Expression> expression) + { + return GetPropertyCore(GetPropertyName(expression)); + } + + protected bool SetProperty(Expression> expression, T value) + { + return SetProperty(expression, value, (Action?)null); + } + + protected bool SetProperty(Expression> expression, T value, Action? changedCallback) + { + string propertyName = GetPropertyName(expression); + return SetPropertyCore(propertyName, value, changedCallback); + } + + protected bool SetProperty(Expression> expression, T value, Action? changedCallback) + { + string propertyName = GetPropertyName(expression); + return SetPropertyCore(propertyName, value, changedCallback); + } + + protected bool SetProperty(ref T storage, T value, Expression> expression) + { + return SetProperty(ref storage, value, expression, null); + } + + protected bool SetProperty(ref T storage, T value, Expression> expression, Action? changedCallback) + { + return SetProperty(ref storage, value, GetPropertyName(expression), changedCallback); + } + + protected void RaisePropertyChanged(Expression> expression) + { + RaisePropertyChanged(GetPropertyName(expression)); + } + + #endregion + + #region Property Access (CallerMemberName-based) + + protected T? GetValue([CallerMemberName] string? propertyName = null) + { + GuardPropertyName(propertyName); + return GetPropertyCore(propertyName); + } + + protected bool SetValue(T value, [CallerMemberName] string? propertyName = null) + { + return SetValue(value, (Action?)null, propertyName); + } + + protected bool SetValue(T value, Action? changedCallback, [CallerMemberName] string? propertyName = null) + { + return SetPropertyCore(propertyName!, value, changedCallback); + } + + protected bool SetValue(T value, Action? changedCallback, [CallerMemberName] string? propertyName = null) + { + return SetPropertyCore(propertyName!, value, changedCallback); + } + + protected bool SetValue(ref T storage, T value, [CallerMemberName] string? propertyName = null) + { + return SetValue(ref storage, value, null, propertyName); + } + + protected bool SetValue(ref T storage, T value, Action? changedCallback, [CallerMemberName] string? propertyName = null) + { + GuardPropertyName(propertyName); + return SetProperty(ref storage, value, propertyName, changedCallback); + } + + #endregion + + #region Property Access (String-based) + + protected bool SetProperty(ref T storage, T value, string propertyName) + { + return SetProperty(ref storage, value, propertyName, null); + } + + protected virtual bool SetProperty(ref T storage, T value, string propertyName, Action? changedCallback) + { + VerifyAccess(); + if (CompareValues(storage, value, propertyName)) + { + return false; + } + + storage = value; + RaisePropertyChanged(propertyName); + changedCallback?.Invoke(); + return true; + } + + #endregion + + #region PropertyBag Core Access + + private T? GetPropertyCore(string propertyName) + { + if (PropertyBag.TryGetValue(propertyName, out object? value)) + { + return (T?)value; + } + + return default; + } + + protected virtual bool SetPropertyCore(string propertyName, T value, out T? oldValue) + { + VerifyAccess(); + oldValue = default; + if (PropertyBag.TryGetValue(propertyName, out object? value2)) + { + oldValue = (T?)value2; + } + + if (CompareValues(oldValue, value, propertyName)) + { + return false; + } + + lock (PropertyBag) + { + PropertyBag[propertyName] = value; + } + + RaisePropertyChanged(propertyName); + return true; + } + + private bool SetPropertyCore(string propertyName, T value, Action? changedCallback) + { + bool flag = SetPropertyCore(propertyName, value, out T? oldValue); + if (flag) + { + changedCallback?.Invoke(); + } + + return flag; + } + + private bool SetPropertyCore(string propertyName, T value, Action? changedCallback) + { + bool flag = SetPropertyCore(propertyName, value, out T? oldValue); + if (flag) + { + changedCallback?.Invoke(oldValue); + } + + return flag; + } + + #endregion + + #region PropertyChanged Notification + + protected virtual void RaisePropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + protected void RaisePropertyChanged() + { + RaisePropertiesChanged(null); + } + + protected void RaisePropertiesChanged(params string[]? propertyNames) + { + if (propertyNames == null || propertyNames.Length == 0) + { + RaisePropertyChanged(string.Empty); + return; + } + + foreach (string propertyName in propertyNames) + { + RaisePropertyChanged(propertyName); + } + } + + #endregion + + #region Validation & Utility + +#pragma warning disable CS8777 + private static void GuardPropertyName(string? propertyName) + { + if (string.IsNullOrEmpty(propertyName)) + { + throw new ArgumentNullException(nameof(propertyName)); + } + } +#pragma warning restore CS8777 + + protected virtual void VerifyAccess() + { + } + + protected virtual bool CompareValues(T storage, T value, string propertyName) + { + return EqualityComparer.Default.Equals(storage, value); + } + + #endregion + } +} diff --git a/AllBase/Model/Result/Result.cs b/AllBase/Model/Result/Result.cs index 4614db4..96c94e3 100644 --- a/AllBase/Model/Result/Result.cs +++ b/AllBase/Model/Result/Result.cs @@ -30,5 +30,22 @@ namespace AllBase.Model.Result public int Page { get; set; } public int Total { get; set; } } - + public class PageData + { + public long Total { get; set; } + public int PageIndex { get; set; } + public int PageSize { get; set; } + public int TotalPages => PageSize > 0 ? (int)Math.Ceiling((double)Total / PageSize) : 0; + public List List { get; set; } + + public PageData() { } + + public PageData(List list, long total, int pageIndex, int pageSize) + { + List = list; + Total = total; + PageIndex = pageIndex; + PageSize = pageSize; + } + } } diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 9aa730d..dcd466a 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -68,6 +68,9 @@ + + Form + True True @@ -80,4 +83,4 @@ Resources.Designer.cs - \ No newline at end of file + diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductForm.cs b/TEMUKJD/PDDForms/ProductForms/PDDProductForm.cs index efb4f3d..9fc1e30 100644 --- a/TEMUKJD/PDDForms/ProductForms/PDDProductForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/PDDProductForm.cs @@ -23,7 +23,7 @@ namespace TemuKJD.PDDForms.ProductForms public Lazy productUpDownForm = new Lazy(); public Lazy prodCouponForm = new Lazy(); public Lazy addActivityForm = new Lazy(); - + public Lazy cloudgoodsForm = new Lazy(); public PDDProductForm() { InitializeComponent(); @@ -62,11 +62,14 @@ namespace TemuKJD.PDDForms.ProductForms Invoke(new Action(() => { switch (e.Node.Name) - { - case "选品上传": + { + case "选品上传": SetForm(userSelectDbProductForm.Value); break; - case "商品列表": + case "云端数据": + SetForm(cloudgoodsForm.Value); + break; + case "商品列表": SetForm(productUpDownForm.Value); break; case "营销工具": diff --git a/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.Designer.cs new file mode 100644 index 0000000..9fe241f --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.Designer.cs @@ -0,0 +1,593 @@ + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + partial class CloudGoodsForm + { + /// + /// 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() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.bt_importUploadList = new DevComponents.DotNetBar.PanelEx(); + this.label5r = new System.Windows.Forms.Label(); + this.cb_Platform = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect2 = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect1 = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect4 = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect3 = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.num_maxprice = new System.Windows.Forms.NumericUpDown(); + this.num_minprice = new System.Windows.Forms.NumericUpDown(); + this.label7 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.num_maxsold = new System.Windows.Forms.NumericUpDown(); + this.num_minsold = new System.Windows.Forms.NumericUpDown(); + this.txt_title = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label2 = new System.Windows.Forms.Label(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvData = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.c_Platform = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewImageColumn(); + this.c_goodsid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.num_maxprice)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_minprice)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_maxsold)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_minsold)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + 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.bt_importUploadList); + this.splitContainer1.Panel1.Controls.Add(this.label5r); + this.splitContainer1.Panel1.Controls.Add(this.cb_Platform); + this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect2); + this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect1); + this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect4); + this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect3); + this.splitContainer1.Panel1.Controls.Add(this.label4); + this.splitContainer1.Panel1.Controls.Add(this.num_maxprice); + this.splitContainer1.Panel1.Controls.Add(this.num_minprice); + this.splitContainer1.Panel1.Controls.Add(this.label7); + this.splitContainer1.Panel1.Controls.Add(this.label3); + this.splitContainer1.Panel1.Controls.Add(this.num_maxsold); + this.splitContainer1.Panel1.Controls.Add(this.num_minsold); + this.splitContainer1.Panel1.Controls.Add(this.txt_title); + this.splitContainer1.Panel1.Controls.Add(this.label1); + this.splitContainer1.Panel1.Controls.Add(this.label6); + this.splitContainer1.Panel1.Controls.Add(this.btnSearch); + this.splitContainer1.Panel1.Controls.Add(this.pnlEmpty); + this.splitContainer1.Panel1.Controls.Add(this.label2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4); + this.splitContainer1.Size = new System.Drawing.Size(1477, 530); + this.splitContainer1.TabIndex = 35; + // + // bt_importUploadList + // + this.bt_importUploadList.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.bt_importUploadList.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt_importUploadList.DisabledBackColor = System.Drawing.Color.Empty; + this.bt_importUploadList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.bt_importUploadList.Location = new System.Drawing.Point(1407, 15); + this.bt_importUploadList.Name = "bt_importUploadList"; + this.bt_importUploadList.Size = new System.Drawing.Size(58, 23); + this.bt_importUploadList.Style.Alignment = System.Drawing.StringAlignment.Center; + this.bt_importUploadList.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.bt_importUploadList.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.bt_importUploadList.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.bt_importUploadList.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.bt_importUploadList.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.bt_importUploadList.Style.ForeColor.Color = System.Drawing.Color.White; + this.bt_importUploadList.Style.GradientAngle = 90; + this.bt_importUploadList.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.bt_importUploadList.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.bt_importUploadList.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.bt_importUploadList.TabIndex = 439; + this.bt_importUploadList.Text = "上传选中"; + this.bt_importUploadList.Click += new System.EventHandler(this.bt_importUploadList_Click); + // + // label5r + // + this.label5r.AutoSize = true; + this.label5r.Location = new System.Drawing.Point(1048, 16); + this.label5r.Name = "label5r"; + this.label5r.Size = new System.Drawing.Size(44, 17); + this.label5r.TabIndex = 907; + this.label5r.Text = "来源:"; + // + // cb_Platform + // + this.cb_Platform.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cb_Platform.DropDownWidth = 150; + this.cb_Platform.FormattingEnabled = true; + this.cb_Platform.Items.AddRange(new object[] { + "全部", + "多多", + "微信"}); + this.cb_Platform.Location = new System.Drawing.Point(1098, 13); + this.cb_Platform.Name = "cb_Platform"; + this.cb_Platform.Size = new System.Drawing.Size(97, 25); + this.cb_Platform.TabIndex = 906; + // + // cmbCatSelect2 + // + this.cmbCatSelect2.DropDownWidth = 150; + this.cmbCatSelect2.FormattingEnabled = true; + this.cmbCatSelect2.Location = new System.Drawing.Point(745, 12); + this.cmbCatSelect2.Name = "cmbCatSelect2"; + this.cmbCatSelect2.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect2.TabIndex = 897; + // + // cmbCatSelect1 + // + this.cmbCatSelect1.DropDownWidth = 150; + this.cmbCatSelect1.FormattingEnabled = true; + this.cmbCatSelect1.Location = new System.Drawing.Point(648, 12); + this.cmbCatSelect1.Name = "cmbCatSelect1"; + this.cmbCatSelect1.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect1.TabIndex = 896; + // + // cmbCatSelect4 + // + this.cmbCatSelect4.DropDownWidth = 150; + this.cmbCatSelect4.FormattingEnabled = true; + this.cmbCatSelect4.Location = new System.Drawing.Point(939, 12); + this.cmbCatSelect4.Name = "cmbCatSelect4"; + this.cmbCatSelect4.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect4.TabIndex = 899; + // + // cmbCatSelect3 + // + this.cmbCatSelect3.DropDownWidth = 150; + this.cmbCatSelect3.FormattingEnabled = true; + this.cmbCatSelect3.Location = new System.Drawing.Point(842, 12); + this.cmbCatSelect3.Name = "cmbCatSelect3"; + this.cmbCatSelect3.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect3.TabIndex = 898; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Gray; + this.label4.Location = new System.Drawing.Point(518, 17); + this.label4.Margin = new System.Windows.Forms.Padding(0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(13, 17); + this.label4.TabIndex = 488; + this.label4.Text = "-"; + // + // num_maxprice + // + this.num_maxprice.Location = new System.Drawing.Point(534, 14); + this.num_maxprice.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.num_maxprice.Name = "num_maxprice"; + this.num_maxprice.Size = new System.Drawing.Size(70, 23); + this.num_maxprice.TabIndex = 487; + // + // num_minprice + // + this.num_minprice.Location = new System.Drawing.Point(447, 14); + this.num_minprice.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.num_minprice.Name = "num_minprice"; + this.num_minprice.Size = new System.Drawing.Size(70, 23); + this.num_minprice.TabIndex = 486; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(388, 17); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(64, 17); + this.label7.TabIndex = 485; + this.label7.Text = "价格(元):"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.ForeColor = System.Drawing.Color.Gray; + this.label3.Location = new System.Drawing.Point(294, 17); + this.label3.Margin = new System.Windows.Forms.Padding(0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(13, 17); + this.label3.TabIndex = 484; + this.label3.Text = "-"; + // + // num_maxsold + // + this.num_maxsold.Location = new System.Drawing.Point(310, 14); + this.num_maxsold.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.num_maxsold.Name = "num_maxsold"; + this.num_maxsold.Size = new System.Drawing.Size(70, 23); + this.num_maxsold.TabIndex = 483; + // + // num_minsold + // + this.num_minsold.Location = new System.Drawing.Point(223, 14); + this.num_minsold.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.num_minsold.Name = "num_minsold"; + this.num_minsold.Size = new System.Drawing.Size(70, 23); + this.num_minsold.TabIndex = 482; + // + // txt_title + // + this.txt_title.Location = new System.Drawing.Point(60, 14); + this.txt_title.Name = "txt_title"; + this.txt_title.Size = new System.Drawing.Size(118, 23); + this.txt_title.TabIndex = 468; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(8, 17); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(56, 17); + this.label1.TabIndex = 469; + this.label1.Text = "关键词:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(610, 17); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(44, 17); + this.label6.TabIndex = 440; + this.label6.Text = "类目:"; + // + // btnSearch + // + this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearch.Location = new System.Drawing.Point(1208, 14); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(58, 23); + this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearch.Style.GradientAngle = 90; + this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.TabIndex = 435; + this.btnSearch.Text = "查询"; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // pnlEmpty + // + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(1272, 14); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(58, 23); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 413; + this.pnlEmpty.Text = "清空条件"; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(184, 17); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 17); + this.label2.TabIndex = 373; + this.label2.Text = "销量:"; + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.BackColor = System.Drawing.Color.White; + this.splitContainer2.Panel1.Controls.Add(this.pbLoading); + this.splitContainer2.Panel1.Controls.Add(this.dgvData); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer2.Panel2.Controls.Add(this.statusBar); + this.splitContainer2.Size = new System.Drawing.Size(1477, 476); + this.splitContainer2.SplitterDistance = 447; + this.splitContainer2.TabIndex = 0; + // + // 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(713, 198); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 6; + this.pbLoading.TabStop = false; + // + // dgvData + // + this.dgvData.AllowUserToAddRows = false; + this.dgvData.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvData.AutoRowNumber = true; + this.dgvData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvData.BackgroundColor = System.Drawing.Color.White; + this.dgvData.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.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.c_Platform, + this.Column1, + this.c_goodsid, + this.Column2, + this.Column3, + this.Column4}); + this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvData.Location = new System.Drawing.Point(4, 0); + this.dgvData.MultiSelectCheckBox = true; + this.dgvData.Name = "dgvData"; + this.dgvData.ReadOnly = true; + this.dgvData.RowTemplate.Height = 60; + this.dgvData.ShowCellErrors = false; + this.dgvData.Size = new System.Drawing.Size(1469, 447); + this.dgvData.TabIndex = 5; + // + // colSelect + // + this.colSelect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.colSelect.FillWeight = 26F; + 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 = 30; + // + // c_Platform + // + this.c_Platform.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.c_Platform.HeaderText = "来源"; + this.c_Platform.Name = "c_Platform"; + this.c_Platform.ReadOnly = true; + this.c_Platform.Width = 80; + // + // Column1 + // + this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.Column1.FillWeight = 44.62474F; + this.Column1.HeaderText = "主图"; + this.Column1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.Column1.MinimumWidth = 60; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.Column1.Width = 200; + // + // c_goodsid + // + this.c_goodsid.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.c_goodsid.FillWeight = 60.68966F; + this.c_goodsid.HeaderText = "商品ID"; + this.c_goodsid.Name = "c_goodsid"; + this.c_goodsid.ReadOnly = true; + this.c_goodsid.Width = 180; + // + // Column2 + // + this.Column2.FillWeight = 111.5619F; + this.Column2.HeaderText = "标题"; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + // + // Column3 + // + this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.Column3.FillWeight = 111.5619F; + this.Column3.HeaderText = "价格"; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Width = 120; + // + // Column4 + // + this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.Column4.FillWeight = 111.5619F; + this.Column4.HeaderText = "销量"; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Width = 120; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(1115, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(362, 25); + this.ucSplitPage1.TabIndex = 4; + this.ucSplitPage1.TotalPage = 1; + // + // 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(1477, 25); + this.statusBar.TabIndex = 1; + this.statusBar.Visible = false; + // + // CloudGoodsForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1477, 530); + 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; + this.Name = "CloudGoodsForm"; + this.Text = "AdminCardCodeForm"; + this.Load += new System.EventHandler(this.AdminCardCodeForm_Load); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.num_maxprice)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_minprice)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_maxsold)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.num_minsold)).EndInit(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private DevComponents.DotNetBar.PanelEx pnlEmpty; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.PictureBox pbLoading; + private UserComponent.DataGridViewEx dgvData; + private UserControls.UcSplitPage ucSplitPage1; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx btnSearch; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox txt_title; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown num_maxsold; + private System.Windows.Forms.NumericUpDown num_minsold; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.NumericUpDown num_maxprice; + private System.Windows.Forms.NumericUpDown num_minprice; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox cmbCatSelect2; + private System.Windows.Forms.ComboBox cmbCatSelect1; + private System.Windows.Forms.ComboBox cmbCatSelect4; + private System.Windows.Forms.ComboBox cmbCatSelect3; + private System.Windows.Forms.Label label5r; + private System.Windows.Forms.ComboBox cb_Platform; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn c_Platform; + private System.Windows.Forms.DataGridViewImageColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn c_goodsid; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private DevComponents.DotNetBar.PanelEx bt_importUploadList; + } +} \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.cs new file mode 100644 index 0000000..a24337f --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.cs @@ -0,0 +1,413 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using AllBase.Model.Result.PDDResult; +using AllBase.Model.Result.WXResult; +using NaiBa.Util.Extension; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Printing; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.Extension; +using TemuKJD.ToolForms; +using TemuKJD.UserControls; +using TemuKJD.WXForms.ProductForms; +using Work; +using Work.GoodDetail; +using Work.Services; + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + public partial class CloudGoodsForm : BaseForm + { + private GoodsSearchRequest search = new GoodsSearchRequest(); + private List catBoxList = new List(); + private BindingList dataList = new BindingList(); + CheckBox chkSelectAll = null; + public CloudGoodsForm() + { + InitializeComponent(); + } + + private void AdminCardCodeForm_Load(object sender, EventArgs e) + { + pbLoading.Visible = false; + ucSplitPage1.PageChange += UcSplitPage1_PageChange; + InitCategory(); + InitBindingDataGridView(); + txt_title.Text = "连衣裙"; + num_minsold.Value = 0; + num_maxsold.Value = 999; + num_minprice.Value = 0; + num_maxprice.Value = 999; + cb_Platform.SelectedIndex = 0; + //ucSplitPage1.TotalPage + } + + + private void InitBindingDataGridView() + { + this.dgvData.AutoGenerateColumns = false; + this.Column1.Width = 70; + // Column1 是图片列,DataGridViewImageColumn 无法把 ThumbUrl 的 URL 字符串直接渲染成图片, + // 因此不绑定 DataPropertyName,改为数据加载后由 ShowDgvImg() 异步下载图片填入该列。 + this.colSelect.DataPropertyName = nameof(CloudGoods.IsSelected); + this.colSelect.ReadOnly = false; + this.Column2.DataPropertyName = nameof(CloudGoods.Title); + this.Column3.DataPropertyName = nameof(CloudGoods.Price); + this.Column4.DataPropertyName = nameof(CloudGoods.SoldQuantity); + this.c_goodsid.DataPropertyName = nameof(CloudGoods.GoodsId); + this.c_Platform.DataPropertyName = nameof(CloudGoods.Platform); + // 2. 设置列样式 + // 时间列格式化 + //this.Column6.DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; + //this.Column8.DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; + this.dgvData.DataSource = dataList; + + // 滚动到可视区时按需加载缩略图 + this.dgvData.Scroll += (s, e) => ShowDgvImg(); + this.dgvData.CellContentClick += DgvData_CellContentClick; + dgvData.CellFormatting += DgvData_CellFormatting; + + chkSelectAll = dgvData.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); + dgvData.Columns["colSelect"].HeaderText = ""; + //chkSelectAll.Width = chkSelectAll.Height = 13; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + //chkSelectAll.Checked = true; + } + + private void DgvData_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) + { + if (e.ColumnIndex == this.c_Platform.Index && e.Value != null && e.Value != DBNull.Value) + { + if (int.TryParse(e.Value.ToString(), out int v)) + { + e.Value = v == 1 ? ("多多") : v == 2 ? ("微信") : ("未知"); + e.FormattingApplied = true; + } + } + } + + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + foreach (var item in dataList) + { + item.IsSelected = (sender as CheckBox).Checked; + } + //this.dgvData.Refresh(); + } + + private void DgvData_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (dgvData.Columns[e.ColumnIndex] == colSelect) + { + var data = dgvData.Rows[e.RowIndex].DataBoundItem as CloudGoods; + data.IsSelected = !data.IsSelected; + } + if (dgvData.Columns[e.ColumnIndex] == Column1) + { + var data = dgvData.Rows[e.RowIndex].DataBoundItem as CloudGoods; + if (dgvData.Rows[e.RowIndex].Cells[e.ColumnIndex].Value is Image img) + { + ShowImgForm imgFrom = new ShowImgForm(img, data.ThumbUrl); + imgFrom.ShowDialog(); + } + + } + } + + /// + /// 异步下载 CloudGoods.ThumbUrl 图片并填充到 Column1 图片列(只加载可视区行,避免一次下载整页) + /// + private void ShowDgvImg() + { + // 先在 UI 线程上快照“行 + 图片地址”,避免在后台线程遍历绑定的 DataGridView + List> waitList = new List>(); + foreach (DataGridViewRow row in this.dgvData.Rows) + { + try + { + if (row.Index < 0) + continue; + + // 不在可视区:先放占位图,滚动到可视区时再真正加载 + if (row.Index > 0 && row.Cells["Column1"].Displayed == false) + { + if (row.Cells["Column1"].Value != DataGridViewExtension.defaultBitmap) + row.Cells["Column1"].Value = DataGridViewExtension.defaultBitmap; + continue; + } + + // 已加载过就不再重复下载 + if (row.Cells["Column1"].Value != null && row.Cells["Column1"].Value != DataGridViewExtension.defaultBitmap) + continue; + + string imgUrl = (row.DataBoundItem as CloudGoods)?.ThumbUrl; + if (!string.IsNullOrWhiteSpace(imgUrl)) + waitList.Add(new KeyValuePair(row, imgUrl)); + else + row.Cells["Column1"].Value = TemuKJD.Properties.Resources.errpic; + } + catch + { + } + } + + if (waitList.Count == 0) + return; + + Task.Run(() => + { + foreach (var item in waitList) + { + try + { + DataGridViewRow row = item.Key; + string getImgError = ""; + Image image = GetHtml.GetUrlImg(item.Value, out getImgError); + if (image == null) + image = TemuKJD.Properties.Resources.errpic; + + Invoke(new Action(() => + { + try + { + if (row.Index >= 0) + row.Cells["Column1"].Value = image; + } + catch { } + })); + } + catch + { + } + } + }); + } + + + + private void InitCategory() + { + catBoxList.Add(cmbCatSelect1); + catBoxList.Add(cmbCatSelect2); + catBoxList.Add(cmbCatSelect3); + catBoxList.Add(cmbCatSelect4); + + + for (int i = 0; i < catBoxList.Count; i++) + { + catBoxList[i].DropDownStyle = ComboBoxStyle.DropDownList; + catBoxList[i].Tag = i; + catBoxList[i].SelectedIndexChanged += CmbCatSelect_SelectedIndexChanged; + catBoxList[i].DisplayMember = "cat_name"; + catBoxList[i].ValueMember = "cat_id"; + } + + + cmbCatSelect1.Items.Add(new PddCatInfo + { + cat_name = "全部", + cat_id = 0 + }); + foreach (PddCatInfo cat in GlobalConfig.PddCatList.Where(c => c.level == 1).ToList()) + { + cmbCatSelect1.Items.Add(cat); + } + + catBoxList[0].SelectedIndex = 0; + } + + private void CmbCatSelect_SelectedIndexChanged(object sender, EventArgs e) + { + if (sender is ComboBox ccb) + { + ccb.SelectedIndexChanged -= CmbCatSelect_SelectedIndexChanged; + + + try + { + int currentLevel = (int)ccb.Tag; + + // 先清空并禁用所有下级 ComboBox + for (int i = currentLevel + 1; i < catBoxList.Count; i++) + { + catBoxList[i].Items.Clear(); + catBoxList[i].SelectedIndex = -1; + } + var parentCategory = ccb.SelectedItem as PddCatInfo; + + + // 启用并填充当前级别及上级(如果需要) + for (int i = currentLevel + 1; i < catBoxList.Count; i++) + { + // 清空所有下级 + catBoxList[i].Items.Clear(); + catBoxList[i].SelectedIndex = -1; + catBoxList[i].Text = ""; + catBoxList[i].SelectedItem = null; + if (i == currentLevel + 1) + { + catBoxList[i].Enabled = true; + + // 根据当前选中的值过滤下一级数据 + if (parentCategory != null) + { + var childItems = GlobalConfig.PddCatList + .Where(c => c.level == i + 1 && c.parent_cat_id == parentCategory.cat_id) + .ToList(); + + foreach (var cat in childItems) + { + catBoxList[i].Items.Add(cat); + } + } + } + else + { + // 更下级的全部禁用并清空 + catBoxList[i].Enabled = false; + } + } + if (currentLevel == 0) + { + catBoxList[1].Enabled = parentCategory.cat_id != 0; + } + } + finally + { + // 重新绑定事件 + ccb.SelectedIndexChanged += CmbCatSelect_SelectedIndexChanged; + } + + + } + } + private void UcSplitPage1_PageChange(object obj) + { + btnSearch_Click(obj, null); + } + private void btnSearch_Click(object sender, EventArgs e) + { + GoodsSearchRequest search = new GoodsSearchRequest(); + + search.Platform = cb_Platform.SelectedIndex == 1 ? PlatformType.PDD : cb_Platform.SelectedIndex == 2 ? PlatformType.WX : PlatformType.None; + search.Title = txt_title.Text; + search.MinSoldQuantity = (int)num_minsold.Value; + search.MaxSoldQuantity = (int)num_maxsold.Value; + search.MinPrice = (long)num_minprice.Value * 100; + search.MaxPrice = (long)num_maxprice.Value * 100; + if (cmbCatSelect1.SelectedItem is PddCatInfo cat1) + { + search.CatId1 = (int)(cat1.cat_id); + search.CatId1 = search.CatId1 == 0 ? null : search.CatId1; + } + if (cmbCatSelect2.SelectedItem is PddCatInfo cat2) + search.CatId2 = (int)(cat2.cat_id); + if (cmbCatSelect3.SelectedItem is PddCatInfo cat3) + search.CatId3 = (int)(cat3.cat_id); + if (cmbCatSelect4.SelectedItem is PddCatInfo cat4) + search.CatId4 = (int)(cat4.cat_id); + search.PageIndex = ucSplitPage1.CurrentPage; + search.PageSize = ucSplitPage1.PageSize; + + + + GetGoods(search); + + + } + private void pnlEmpty_Click(object sender, EventArgs e) + { + txt_title.Text = ""; + num_minsold.Value = 0; + num_maxsold.Value = 0; + num_minprice.Value = 0; + num_maxprice.Value = 0; + cmbCatSelect1.SelectedIndex = 0; + cb_Platform.SelectedIndex = 0; + ucSplitPage1.PageChange -= UcSplitPage1_PageChange; + ucSplitPage1.CurrentPage = 1; + ucSplitPage1.PageChange += UcSplitPage1_PageChange; + } + + + public void GetGoods(GoodsSearchRequest request) + { + this.pbLoading.Visible = true; + dataList.Clear(); + + Task.Run(() => + { + PageData ret = CloudGoodsService.GetGoods(request); + Invoke(new Action(() => + { + ret.List.ForEach(a => dataList.Add(a)); + ucSplitPage1.TotalPage = Math.Max(1, ret.TotalPages); + this.pbLoading.Visible = false; + // 异步加载商品缩略图(Column1 绑定 ThumbUrl) + ShowDgvImg(); + })); + }); + + } + + + + + /// + /// 导入数据到待上传 + /// + /// + /// + private void bt_importUploadList_Click(object sender, EventArgs e) + { + foreach (var item in dataList) + { + if (item.IsSelected == false) continue; + string catName = ""; + if (item.CatId4.HasValue) + { + catName = GlobalConfig.PddCatList.FirstOrDefault(a => a.cat_id == item.CatId4)?.cat_name ?? ""; + } + else if (item.CatId3.HasValue) + { + catName = GlobalConfig.PddCatList.FirstOrDefault(a => a.cat_id == item.CatId3)?.cat_name ?? ""; + } + else if (item.CatId2.HasValue) + { + catName = GlobalConfig.PddCatList.FirstOrDefault(a => a.cat_id == item.CatId2)?.cat_name ?? ""; + } + WXDBProdUploadForm.Instance.lstTemuDBProductSelect.Add(new TemuDBProductSelect + { + out_product_Id = item.GoodsId.ToString(), + spu_id = item.GoodsId.ToString(), + main_img = item.ThumbUrl, + product_name = item.Title, + cat_name = catName, + }); + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", WXDBProdUploadForm.Instance.lstTemuDBProductSelect); + } + } + + + + + + +} diff --git a/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.resx new file mode 100644 index 0000000..2e4c5e9 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/CloudGoodsForm.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/TEMUKJD/ToolForms/ShowImgForm.cs b/TEMUKJD/ToolForms/ShowImgForm.cs index 686813b..b959fa5 100644 --- a/TEMUKJD/ToolForms/ShowImgForm.cs +++ b/TEMUKJD/ToolForms/ShowImgForm.cs @@ -13,223 +13,231 @@ using TemuKJD.BaseForms; namespace TemuKJD.ToolForms { - public partial class ShowImgForm : BaseGeneralForm - { - string currentImgUrl = null; - Dictionary imgDic = new Dictionary(); + public partial class ShowImgForm : BaseGeneralForm + { + string currentImgUrl = null; + Dictionary imgDic = new Dictionary(); - public ShowImgForm(string picUrl) - { - InitializeComponent(); - currentImgUrl = picUrl; + public ShowImgForm(string picUrl) + { + InitializeComponent(); + currentImgUrl = picUrl; - if (!string.IsNullOrEmpty(currentImgUrl)) - { - if (currentImgUrl.Contains("wxapp")) - { - string getImgError = ""; - this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); - } - else - { - this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - } + if (!string.IsNullOrEmpty(currentImgUrl)) + { + if (currentImgUrl.Contains("wxapp")) + { + string getImgError = ""; + this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); + } + else + { + this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + } - //string getImgError = ""; - //var image = AllBase.GetHtml.GetUrlImg(currentImgUrl, out getImgError); - //if (!string.IsNullOrEmpty(getImgError)) - // //BaseMsgForm.ShowError("图片加载失败 " + getImgError); - // image = TemuKJD.Properties.Resources.errpic; - //this.pictureBox1.Image = image; - } - } + //string getImgError = ""; + //var image = AllBase.GetHtml.GetUrlImg(currentImgUrl, out getImgError); + //if (!string.IsNullOrEmpty(getImgError)) + // //BaseMsgForm.ShowError("图片加载失败 " + getImgError); + // image = TemuKJD.Properties.Resources.errpic; + //this.pictureBox1.Image = image; + } + } - public ShowImgForm(string picUrl, Dictionary picDic) - { - InitializeComponent(); - currentImgUrl = picUrl; - if (picDic != null) - imgDic = picDic; + public ShowImgForm(string picUrl, Dictionary picDic) + { + InitializeComponent(); + currentImgUrl = picUrl; + if (picDic != null) + imgDic = picDic; - if (!string.IsNullOrEmpty(currentImgUrl)) - { - if (picDic != null) - { - if (currentImgUrl.Contains("wxapp")) - { - string getImgError = ""; - this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); - } - else - { - this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - } - } - } - } + if (!string.IsNullOrEmpty(currentImgUrl)) + { + if (picDic != null) + { + if (currentImgUrl.Contains("wxapp")) + { + string getImgError = ""; + this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); + } + else + { + this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + } + } + } + } - public ShowImgForm(Image img) - { - InitializeComponent(); + public ShowImgForm(Image img, string picUrl = null) + { + InitializeComponent(); + currentImgUrl = picUrl; + if (img != null) + { + this.pictureBox1.Image = img; + } + } + public ShowImgForm(Image img) + { + InitializeComponent(); - if (img != null) - { - this.pictureBox1.Image = img; - } - } + if (img != null) + { + this.pictureBox1.Image = img; + } + } + private void btnClose_Click(object sender, EventArgs e) + { + this.Close(); + } - private void btnClose_Click(object sender, EventArgs e) - { - this.Close(); - } + private void ShowImgForm_KeyDown(object sender, KeyEventArgs e) + { + switch (e.KeyCode) + { + //case Keys.A: MessageBox.Show("您按下的是A"); break; + //case Keys.B: MessageBox.Show("您按下的是B"); break; + case Keys.Enter: break; + case Keys.Escape: this.Close(); break; + case Keys.Space: + //if (imgDic != null && imgDic.Keys.Count > 0) + //{ + // for (int i = 0; i < imgDic.Keys.ToList().Count; i++) + // { + // if (imgDic.Keys.ToList()[i] == currentImgUrl) + // { + // int index = i + 1; + // if (index == imgDic.Keys.Count) + // index = 0; + // currentImgUrl = imgDic.Keys.ToList()[index]; + // this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + // break; + // } + // if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl) + // { + // int index = i + 1; + // if (index == imgDic.Keys.Count) + // index = 0; + // currentImgUrl = imgDic[imgDic.Keys.ToList()[index]]; + // this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + // break; + // } + // } + //} + pictureBox1_Click(null, null); + break; + } + } - private void ShowImgForm_KeyDown(object sender, KeyEventArgs e) - { - switch (e.KeyCode) - { - //case Keys.A: MessageBox.Show("您按下的是A"); break; - //case Keys.B: MessageBox.Show("您按下的是B"); break; - case Keys.Enter: break; - case Keys.Escape: this.Close(); break; - case Keys.Space: - //if (imgDic != null && imgDic.Keys.Count > 0) - //{ - // for (int i = 0; i < imgDic.Keys.ToList().Count; i++) - // { - // if (imgDic.Keys.ToList()[i] == currentImgUrl) - // { - // int index = i + 1; - // if (index == imgDic.Keys.Count) - // index = 0; - // currentImgUrl = imgDic.Keys.ToList()[index]; - // this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - // break; - // } - // if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl) - // { - // int index = i + 1; - // if (index == imgDic.Keys.Count) - // index = 0; - // currentImgUrl = imgDic[imgDic.Keys.ToList()[index]]; - // this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - // break; - // } - // } - //} - pictureBox1_Click(null, null); - break; - } - } + private void btnCopyUrl_Click(object sender, EventArgs e) + { + try + { + Clipboard.SetText(currentImgUrl); // 设置剪贴板内容 + BaseMsgForm.ShowInfo("图片地址已复制到剪贴板"); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("复制图片地址到剪贴板失败: " + ex.Message); + } + } - private void btnCopyUrl_Click(object sender, EventArgs e) - { - try - { - Clipboard.SetText(currentImgUrl); // 设置剪贴板内容 - BaseMsgForm.ShowInfo("图片地址已复制到剪贴板"); - } - catch (Exception ex) - { - BaseMsgForm.ShowError("复制图片地址到剪贴板失败: " + ex.Message); - } - } + private void btnCopy_Click(object sender, EventArgs e) + { + try + { + Clipboard.SetImage(this.pictureBox1.Image); // 设置剪贴板内容 + this.btnCopy.Text = "已复制"; + Task.Run(() => + { + Thread.Sleep(2500); + Invoke(new Action(() => { this.btnCopy.Text = "复制图片"; })); + }); + //BaseMsgForm.ShowInfo("图片已复制到剪贴板"); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message); + } + } - private void btnCopy_Click(object sender, EventArgs e) - { - try - { - Clipboard.SetImage(this.pictureBox1.Image); // 设置剪贴板内容 - this.btnCopy.Text = "已复制"; - Task.Run(() => - { - Thread.Sleep(2500); - Invoke(new Action(() => { this.btnCopy.Text = "复制图片"; })); - }); - //BaseMsgForm.ShowInfo("图片已复制到剪贴板"); - } - catch (Exception ex) - { - BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message); - } - } + private void btnSave_Click(object sender, EventArgs e) + { + if (this.pictureBox1.Image == null) + { + BaseMsgForm.ShowError("图片为空!"); + return; + } - private void btnSave_Click(object sender, EventArgs e) - { - if(this.pictureBox1.Image == null) - { - BaseMsgForm.ShowError("图片为空!"); - return; - } + string fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg"; + if (!string.IsNullOrEmpty(this.pictureBox1.ImageLocation)) + { + fileName = this.pictureBox1.ImageLocation.Replace("://", ".").Replace('/', '.'); + } + SaveFileDialog sfd = new SaveFileDialog(); + sfd.Filter = "JPeg Image|*.jpg;*.jpeg"; + sfd.Title = "保存图片"; + sfd.FileName = fileName; + if (sfd.ShowDialog() == DialogResult.OK) + { + try + { + pictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } + } + } - string fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg"; - if (!string.IsNullOrEmpty(this.pictureBox1.ImageLocation)) - { - fileName = this.pictureBox1.ImageLocation.Replace("://",".").Replace('/', '.'); - } - SaveFileDialog sfd = new SaveFileDialog(); - sfd.Filter = "JPeg Image|*.jpg;*.jpeg"; - sfd.Title = "保存图片"; - sfd.FileName = fileName; - if (sfd.ShowDialog() == DialogResult.OK) - { - try - { - pictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); - } - catch (Exception ex) - { - BaseMsgForm.ShowError(ex.Message); - } - } - } + private void pictureBox1_Click(object sender, EventArgs e) + { + if (imgDic != null && imgDic.Keys.Count > 0) + { + for (int i = 0; i < imgDic.Keys.ToList().Count; i++) + { + if (imgDic.Keys.ToList()[i] == currentImgUrl) + { + int index = i + 1; + if (index == imgDic.Keys.Count) + index = 0; + currentImgUrl = imgDic.Keys.ToList()[index]; + if (currentImgUrl.Contains("wxapp")) + { + string getImgError = ""; + this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); + } + else + { + this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + } + break; + } + if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl) + { + int index = i + 1; + if (index == imgDic.Keys.Count) + index = 0; + currentImgUrl = imgDic[imgDic.Keys.ToList()[index]]; + if (currentImgUrl.Contains("wxapp")) + { + string getImgError = ""; + this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); + } + else + { + this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); + } + break; + } + } + } + } - private void pictureBox1_Click(object sender, EventArgs e) - { - if (imgDic != null && imgDic.Keys.Count > 0) - { - for (int i = 0; i < imgDic.Keys.ToList().Count; i++) - { - if (imgDic.Keys.ToList()[i] == currentImgUrl) - { - int index = i + 1; - if (index == imgDic.Keys.Count) - index = 0; - currentImgUrl = imgDic.Keys.ToList()[index]; - if (currentImgUrl.Contains("wxapp")) - { - string getImgError = ""; - this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); - } - else - { - this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - } - break; - } - if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl) - { - int index = i + 1; - if (index == imgDic.Keys.Count) - index = 0; - currentImgUrl = imgDic[imgDic.Keys.ToList()[index]]; - if (currentImgUrl.Contains("wxapp")) - { - string getImgError = ""; - this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError); - } - else - { - this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http"); - } - break; - } - } - } - } - - private void ShowImgForm_Load(object sender, EventArgs e) - { - label1.Visible = this.imgDic != null && this.imgDic.Keys.Count > 0; - } - } + private void ShowImgForm_Load(object sender, EventArgs e) + { + label1.Visible = this.imgDic != null && this.imgDic.Keys.Count > 0; + } + } } diff --git a/TEMUKJD/UserControls/UcSplitPage.Designer.cs b/TEMUKJD/UserControls/UcSplitPage.Designer.cs index 68d25ba..fbbe045 100644 --- a/TEMUKJD/UserControls/UcSplitPage.Designer.cs +++ b/TEMUKJD/UserControls/UcSplitPage.Designer.cs @@ -29,220 +29,220 @@ namespace TemuKJD.UserControls /// private void InitializeComponent() { - this.btnPrev = new DevComponents.DotNetBar.PanelEx(); - this.btnNext = new DevComponents.DotNetBar.PanelEx(); - this.lblPage = new System.Windows.Forms.Label(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.btnJump = new DevComponents.DotNetBar.PanelEx(); - this.label1 = new System.Windows.Forms.Label(); - this.txtJumpPage = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.lblJump = new System.Windows.Forms.Label(); - this.lblTotal = new System.Windows.Forms.Label(); - this.lblPageSize = new System.Windows.Forms.Label(); - this.cmbPageSize = new System.Windows.Forms.ComboBox(); - this.flowLayoutPanel2.SuspendLayout(); - this.SuspendLayout(); - // - // btnPrev - // - this.btnPrev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.btnPrev.AutoSize = true; - this.btnPrev.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnPrev.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnPrev.DisabledBackColor = System.Drawing.Color.Empty; - this.btnPrev.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnPrev.Location = new System.Drawing.Point(259, 0); - this.btnPrev.Margin = new System.Windows.Forms.Padding(0); - this.btnPrev.Name = "btnPrev"; - this.btnPrev.Size = new System.Drawing.Size(31, 20); - this.btnPrev.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnPrev.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnPrev.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnPrev.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnPrev.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnPrev.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnPrev.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnPrev.Style.GradientAngle = 90; - this.btnPrev.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnPrev.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnPrev.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnPrev.TabIndex = 431; - this.btnPrev.Text = "上页"; - this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click); - // - // btnNext - // - this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.btnNext.AutoSize = true; - this.btnNext.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnNext.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnNext.DisabledBackColor = System.Drawing.Color.Empty; - this.btnNext.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnNext.Location = new System.Drawing.Point(311, 0); - this.btnNext.Margin = new System.Windows.Forms.Padding(0); - this.btnNext.Name = "btnNext"; - this.btnNext.Size = new System.Drawing.Size(31, 20); - this.btnNext.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnNext.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnNext.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnNext.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnNext.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnNext.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnNext.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnNext.Style.GradientAngle = 90; - this.btnNext.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnNext.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnNext.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnNext.TabIndex = 435; - this.btnNext.Text = "下页"; - this.btnNext.Click += new System.EventHandler(this.btnNext_Click); - // - // lblPage - // - this.lblPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.lblPage.AutoSize = true; - this.lblPage.Location = new System.Drawing.Point(293, 0); - this.lblPage.Name = "lblPage"; - this.lblPage.Size = new System.Drawing.Size(15, 20); - this.lblPage.TabIndex = 436; - this.lblPage.Text = "1"; - this.lblPage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 100); - this.flowLayoutPanel1.TabIndex = 437; - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Controls.Add(this.btnJump); - this.flowLayoutPanel2.Controls.Add(this.label1); - this.flowLayoutPanel2.Controls.Add(this.txtJumpPage); - this.flowLayoutPanel2.Controls.Add(this.lblJump); - this.flowLayoutPanel2.Controls.Add(this.btnNext); - this.flowLayoutPanel2.Controls.Add(this.lblPage); - this.flowLayoutPanel2.Controls.Add(this.btnPrev); - this.flowLayoutPanel2.Controls.Add(this.lblTotal); - this.flowLayoutPanel2.Controls.Add(this.lblPageSize); - this.flowLayoutPanel2.Controls.Add(this.cmbPageSize); - this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.flowLayoutPanel2.Size = new System.Drawing.Size(480, 23); - this.flowLayoutPanel2.TabIndex = 0; - // - // btnJump - // - this.btnJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.btnJump.AutoSize = true; - this.btnJump.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnJump.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnJump.DisabledBackColor = System.Drawing.Color.Empty; - this.btnJump.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnJump.Location = new System.Drawing.Point(446, 0); - this.btnJump.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0); - this.btnJump.Name = "btnJump"; - this.btnJump.Size = new System.Drawing.Size(31, 20); - this.btnJump.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnJump.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnJump.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnJump.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnJump.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnJump.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnJump.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnJump.Style.GradientAngle = 90; - this.btnJump.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnJump.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnJump.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnJump.TabIndex = 439; - this.btnJump.Text = "跳转"; - this.btnJump.Click += new System.EventHandler(this.pnlJump_Click); - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(423, 0); - this.label1.Margin = new System.Windows.Forms.Padding(0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(20, 20); - this.label1.TabIndex = 445; - this.label1.Text = "页"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtJumpPage - // - this.txtJumpPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - // - // - // - this.txtJumpPage.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.txtJumpPage.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.txtJumpPage.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.txtJumpPage.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.txtJumpPage.Border.Class = "CrumbBarBackgroundKey"; - this.txtJumpPage.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.txtJumpPage.Border.PaddingBottom = 2; - this.txtJumpPage.Border.PaddingLeft = 2; - this.txtJumpPage.Border.PaddingRight = 2; - this.txtJumpPage.Border.PaddingTop = 2; - this.txtJumpPage.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtJumpPage.Location = new System.Drawing.Point(393, 0); - this.txtJumpPage.Margin = new System.Windows.Forms.Padding(0); - this.txtJumpPage.Name = "txtJumpPage"; - this.txtJumpPage.Size = new System.Drawing.Size(30, 21); - this.txtJumpPage.TabIndex = 444; - this.txtJumpPage.Text = "1"; - // - // lblJump - // - this.lblJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.lblJump.AutoSize = true; - this.lblJump.Location = new System.Drawing.Point(345, 0); - this.lblJump.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); - this.lblJump.Name = "lblJump"; - this.lblJump.Size = new System.Drawing.Size(48, 20); - this.lblJump.TabIndex = 437; - this.lblJump.Text = "跳转到 "; - this.lblJump.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblTotal - // - this.lblTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.lblTotal.AutoSize = true; - this.lblTotal.Location = new System.Drawing.Point(220, 0); - this.lblTotal.Margin = new System.Windows.Forms.Padding(0); - this.lblTotal.Name = "lblTotal"; - this.lblTotal.Size = new System.Drawing.Size(39, 20); - this.lblTotal.TabIndex = 446; - this.lblTotal.Text = "共1页"; - this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblPageSize - // - this.lblPageSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.lblPageSize.AutoSize = true; - this.lblPageSize.Location = new System.Drawing.Point(177, 0); - this.lblPageSize.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblPageSize.Name = "lblPageSize"; - this.lblPageSize.Size = new System.Drawing.Size(37, 20); - this.lblPageSize.TabIndex = 453; - this.lblPageSize.Text = "条/页"; - this.lblPageSize.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lblPageSize.Visible = false; - // - // cmbPageSize - // - this.cmbPageSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.cmbPageSize.Font = new System.Drawing.Font("微软雅黑", 7F); - this.cmbPageSize.FormattingEnabled = true; - this.cmbPageSize.Items.AddRange(new object[] { + this.btnPrev = new DevComponents.DotNetBar.PanelEx(); + this.btnNext = new DevComponents.DotNetBar.PanelEx(); + this.lblPage = new System.Windows.Forms.Label(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnJump = new DevComponents.DotNetBar.PanelEx(); + this.label1 = new System.Windows.Forms.Label(); + this.txtJumpPage = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.lblJump = new System.Windows.Forms.Label(); + this.lblTotal = new System.Windows.Forms.Label(); + this.lblPageSize = new System.Windows.Forms.Label(); + this.cmbPageSize = new System.Windows.Forms.ComboBox(); + this.flowLayoutPanel2.SuspendLayout(); + this.SuspendLayout(); + // + // btnPrev + // + this.btnPrev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.btnPrev.AutoSize = true; + this.btnPrev.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnPrev.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnPrev.DisabledBackColor = System.Drawing.Color.Empty; + this.btnPrev.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnPrev.Location = new System.Drawing.Point(259, 0); + this.btnPrev.Margin = new System.Windows.Forms.Padding(0); + this.btnPrev.Name = "btnPrev"; + this.btnPrev.Size = new System.Drawing.Size(31, 20); + this.btnPrev.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnPrev.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnPrev.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnPrev.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnPrev.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnPrev.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnPrev.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnPrev.Style.GradientAngle = 90; + this.btnPrev.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnPrev.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnPrev.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnPrev.TabIndex = 431; + this.btnPrev.Text = "上页"; + this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click); + // + // btnNext + // + this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.btnNext.AutoSize = true; + this.btnNext.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnNext.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnNext.DisabledBackColor = System.Drawing.Color.Empty; + this.btnNext.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnNext.Location = new System.Drawing.Point(311, 0); + this.btnNext.Margin = new System.Windows.Forms.Padding(0); + this.btnNext.Name = "btnNext"; + this.btnNext.Size = new System.Drawing.Size(31, 20); + this.btnNext.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnNext.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnNext.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnNext.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnNext.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnNext.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnNext.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnNext.Style.GradientAngle = 90; + this.btnNext.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnNext.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnNext.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnNext.TabIndex = 435; + this.btnNext.Text = "下页"; + this.btnNext.Click += new System.EventHandler(this.btnNext_Click); + // + // lblPage + // + this.lblPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.lblPage.AutoSize = true; + this.lblPage.Location = new System.Drawing.Point(293, 0); + this.lblPage.Name = "lblPage"; + this.lblPage.Size = new System.Drawing.Size(15, 20); + this.lblPage.TabIndex = 436; + this.lblPage.Text = "1"; + this.lblPage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 100); + this.flowLayoutPanel1.TabIndex = 437; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.btnJump); + this.flowLayoutPanel2.Controls.Add(this.label1); + this.flowLayoutPanel2.Controls.Add(this.txtJumpPage); + this.flowLayoutPanel2.Controls.Add(this.lblJump); + this.flowLayoutPanel2.Controls.Add(this.btnNext); + this.flowLayoutPanel2.Controls.Add(this.lblPage); + this.flowLayoutPanel2.Controls.Add(this.btnPrev); + this.flowLayoutPanel2.Controls.Add(this.lblTotal); + this.flowLayoutPanel2.Controls.Add(this.lblPageSize); + this.flowLayoutPanel2.Controls.Add(this.cmbPageSize); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.flowLayoutPanel2.Size = new System.Drawing.Size(480, 23); + this.flowLayoutPanel2.TabIndex = 0; + // + // btnJump + // + this.btnJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.btnJump.AutoSize = true; + this.btnJump.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnJump.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnJump.DisabledBackColor = System.Drawing.Color.Empty; + this.btnJump.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnJump.Location = new System.Drawing.Point(446, 0); + this.btnJump.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0); + this.btnJump.Name = "btnJump"; + this.btnJump.Size = new System.Drawing.Size(31, 20); + this.btnJump.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnJump.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnJump.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnJump.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnJump.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnJump.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnJump.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnJump.Style.GradientAngle = 90; + this.btnJump.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnJump.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnJump.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnJump.TabIndex = 439; + this.btnJump.Text = "跳转"; + this.btnJump.Click += new System.EventHandler(this.pnlJump_Click); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(423, 0); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(20, 20); + this.label1.TabIndex = 445; + this.label1.Text = "页"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtJumpPage + // + this.txtJumpPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + // + // + // + this.txtJumpPage.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtJumpPage.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtJumpPage.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtJumpPage.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtJumpPage.Border.Class = "CrumbBarBackgroundKey"; + this.txtJumpPage.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtJumpPage.Border.PaddingBottom = 2; + this.txtJumpPage.Border.PaddingLeft = 2; + this.txtJumpPage.Border.PaddingRight = 2; + this.txtJumpPage.Border.PaddingTop = 2; + this.txtJumpPage.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtJumpPage.Location = new System.Drawing.Point(393, 0); + this.txtJumpPage.Margin = new System.Windows.Forms.Padding(0); + this.txtJumpPage.Name = "txtJumpPage"; + this.txtJumpPage.Size = new System.Drawing.Size(30, 21); + this.txtJumpPage.TabIndex = 444; + this.txtJumpPage.Text = "1"; + // + // lblJump + // + this.lblJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.lblJump.AutoSize = true; + this.lblJump.Location = new System.Drawing.Point(345, 0); + this.lblJump.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.lblJump.Name = "lblJump"; + this.lblJump.Size = new System.Drawing.Size(48, 20); + this.lblJump.TabIndex = 437; + this.lblJump.Text = "跳转到 "; + this.lblJump.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblTotal + // + this.lblTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.lblTotal.AutoSize = true; + this.lblTotal.Location = new System.Drawing.Point(220, 0); + this.lblTotal.Margin = new System.Windows.Forms.Padding(0); + this.lblTotal.Name = "lblTotal"; + this.lblTotal.Size = new System.Drawing.Size(39, 20); + this.lblTotal.TabIndex = 446; + this.lblTotal.Text = "共1页"; + this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblPageSize + // + this.lblPageSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.lblPageSize.AutoSize = true; + this.lblPageSize.Location = new System.Drawing.Point(177, 0); + this.lblPageSize.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblPageSize.Name = "lblPageSize"; + this.lblPageSize.Size = new System.Drawing.Size(37, 20); + this.lblPageSize.TabIndex = 453; + this.lblPageSize.Text = "条/页"; + this.lblPageSize.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblPageSize.Visible = false; + // + // cmbPageSize + // + this.cmbPageSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.cmbPageSize.Font = new System.Drawing.Font("微软雅黑", 7F); + this.cmbPageSize.FormattingEnabled = true; + this.cmbPageSize.Items.AddRange(new object[] { "50", "100", "200", @@ -250,26 +250,26 @@ namespace TemuKJD.UserControls "1000", "2000", "5000"}); - this.cmbPageSize.Location = new System.Drawing.Point(132, 0); - this.cmbPageSize.Margin = new System.Windows.Forms.Padding(0); - this.cmbPageSize.Name = "cmbPageSize"; - this.cmbPageSize.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.cmbPageSize.Size = new System.Drawing.Size(45, 22); - this.cmbPageSize.TabIndex = 452; - this.cmbPageSize.Text = "50"; - this.cmbPageSize.Visible = false; - // - // UcSplitPage - // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.Controls.Add(this.flowLayoutPanel2); - this.Controls.Add(this.flowLayoutPanel1); - this.Margin = new System.Windows.Forms.Padding(0); - this.Name = "UcSplitPage"; - this.Size = new System.Drawing.Size(480, 23); - this.flowLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel2.PerformLayout(); - this.ResumeLayout(false); + this.cmbPageSize.Location = new System.Drawing.Point(132, 0); + this.cmbPageSize.Margin = new System.Windows.Forms.Padding(0); + this.cmbPageSize.Name = "cmbPageSize"; + this.cmbPageSize.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.cmbPageSize.Size = new System.Drawing.Size(45, 22); + this.cmbPageSize.TabIndex = 452; + this.cmbPageSize.Text = "50"; + this.cmbPageSize.Visible = false; + // + // UcSplitPage + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.flowLayoutPanel2); + this.Controls.Add(this.flowLayoutPanel1); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "UcSplitPage"; + this.Size = new System.Drawing.Size(480, 23); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.ResumeLayout(false); } diff --git a/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs index b22452f..665ae77 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs @@ -28,176 +28,180 @@ /// private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("选品上传"); - System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("我的商品库"); - System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("商品预售/下架"); - System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("云仓退货地址"); - System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("清理无流量"); - System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("爆单神器"); - System.Windows.Forms.TreeNode treeNode21 = new System.Windows.Forms.TreeNode("活动报名"); - System.Windows.Forms.TreeNode treeNode22 = new System.Windows.Forms.TreeNode("达人广场"); - System.Windows.Forms.TreeNode treeNode23 = new System.Windows.Forms.TreeNode("商品同步"); - System.Windows.Forms.TreeNode treeNode24 = new System.Windows.Forms.TreeNode("订单管理"); - System.Windows.Forms.TreeNode treeNode25 = new System.Windows.Forms.TreeNode("订单代发管理"); - System.Windows.Forms.TreeNode treeNode26 = new System.Windows.Forms.TreeNode("多多商品采集"); - System.Windows.Forms.TreeNode treeNode27 = new System.Windows.Forms.TreeNode("1688商品采集"); - System.Windows.Forms.TreeNode treeNode28 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { - treeNode15, - treeNode16, - treeNode17, - treeNode18, - treeNode19, - treeNode20, - treeNode21, - treeNode22, - treeNode23, - treeNode24, - treeNode25, - treeNode26, - treeNode27}); - this.panel1 = new System.Windows.Forms.Panel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.panel2 = new System.Windows.Forms.Panel(); - this.lblName = new System.Windows.Forms.Label(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.tv = new TemuKJD.UserComponent.UcTreeView(); - this.panel1.SuspendLayout(); - this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.panel3); - this.panel1.Controls.Add(this.panel2); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(793, 521); - this.panel1.TabIndex = 2; - // - // panel3 - // - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(0, 28); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(793, 493); - this.panel3.TabIndex = 1; - // - // panel2 - // - this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.panel2.Controls.Add(this.lblName); - this.panel2.Dock = System.Windows.Forms.DockStyle.Top; - this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(793, 28); - this.panel2.TabIndex = 0; - // - // lblName - // - this.lblName.AutoSize = true; - this.lblName.Location = new System.Drawing.Point(5, 6); - this.lblName.Name = "lblName"; - this.lblName.Size = new System.Drawing.Size(57, 17); - this.lblName.TabIndex = 0; - this.lblName.Text = "lblName"; - // - // splitContainer1 - // - this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - 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"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.tv); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.panel1); - this.splitContainer1.Size = new System.Drawing.Size(934, 521); - this.splitContainer1.SplitterDistance = 140; - this.splitContainer1.SplitterWidth = 1; - this.splitContainer1.TabIndex = 3; - // - // tv - // - this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); - this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.tv.Cursor = System.Windows.Forms.Cursors.Hand; - this.tv.Dock = System.Windows.Forms.DockStyle.Fill; - this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll; - this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - this.tv.FullRowSelect = true; - this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); - this.tv.HideCollapsedGroup = false; - this.tv.ItemHeight = 32; - this.tv.Location = new System.Drawing.Point(0, 0); - this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.tv.Name = "tv"; - treeNode15.Name = "选品上传"; - treeNode15.Text = "选品上传"; - treeNode16.Name = "我的商品库"; - treeNode16.Text = "我的商品库"; - treeNode17.Name = "商品预售/下架"; - treeNode17.Text = "商品预售/下架"; - treeNode18.Name = "云仓退货地址"; - treeNode18.Text = "云仓退货地址"; - treeNode19.Name = "清理无流量"; - treeNode19.Text = "清理无流量"; - treeNode20.Name = "爆单神器"; - treeNode20.Text = "爆单神器"; - treeNode21.Name = "活动报名"; - treeNode21.Text = "活动报名"; - treeNode22.Name = "达人广场"; - treeNode22.Text = "达人广场"; - treeNode23.Name = "商品同步"; - treeNode23.Text = "商品同步"; - treeNode24.Name = "订单管理"; - treeNode24.Text = "订单管理"; - treeNode25.Name = "订单代发管理"; - treeNode25.Text = "订单代发管理"; - treeNode26.Name = "多多商品采集"; - treeNode26.Text = "多多商品采集"; - treeNode27.Name = "1688商品采集"; - treeNode27.Text = "1688商品采集"; - treeNode28.Name = "商品管理"; - treeNode28.Text = "商品管理"; - this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode28}); - this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.tv.Size = new System.Drawing.Size(140, 521); - this.tv.TabIndex = 1; - this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); - // - // WXProductForm - // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(934, 521); - this.Controls.Add(this.splitContainer1); - this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "WXProductForm"; - this.Text = "UploadForms"; - this.Load += new System.EventHandler(this.ShopForm_Load); - this.panel1.ResumeLayout(false); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.ResumeLayout(false); + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("选品上传"); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("云仓数据"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("我的商品库"); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("商品预售/下架"); + System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("云仓退货地址"); + System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("清理无流量"); + System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("爆单神器"); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("活动报名"); + System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("达人广场"); + System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("商品同步"); + System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("订单管理"); + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("订单代发管理"); + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("多多商品采集"); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("1688商品采集"); + System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { + treeNode1, + treeNode2, + treeNode3, + treeNode4, + treeNode5, + treeNode6, + treeNode7, + treeNode8, + treeNode9, + treeNode10, + treeNode11, + treeNode12, + treeNode13, + treeNode14}); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblName = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tv = new TemuKJD.UserComponent.UcTreeView(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(793, 521); + this.panel1.TabIndex = 2; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 28); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(793, 493); + this.panel3.TabIndex = 1; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); + this.panel2.Controls.Add(this.lblName); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(793, 28); + this.panel2.TabIndex = 0; + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Location = new System.Drawing.Point(5, 6); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(57, 17); + this.lblName.TabIndex = 0; + this.lblName.Text = "lblName"; + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + 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"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tv); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.panel1); + this.splitContainer1.Size = new System.Drawing.Size(934, 521); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 3; + // + // tv + // + this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); + this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tv.Cursor = System.Windows.Forms.Cursors.Hand; + this.tv.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll; + this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.tv.FullRowSelect = true; + this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.tv.HideCollapsedGroup = false; + this.tv.ItemHeight = 32; + this.tv.Location = new System.Drawing.Point(0, 0); + this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.tv.Name = "tv"; + treeNode1.Name = "选品上传"; + treeNode1.Text = "选品上传"; + treeNode2.Name = "云仓数据"; + treeNode2.Text = "云仓数据"; + treeNode3.Name = "我的商品库"; + treeNode3.Text = "我的商品库"; + treeNode4.Name = "商品预售/下架"; + treeNode4.Text = "商品预售/下架"; + treeNode5.Name = "云仓退货地址"; + treeNode5.Text = "云仓退货地址"; + treeNode6.Name = "清理无流量"; + treeNode6.Text = "清理无流量"; + treeNode7.Name = "爆单神器"; + treeNode7.Text = "爆单神器"; + treeNode8.Name = "活动报名"; + treeNode8.Text = "活动报名"; + treeNode9.Name = "达人广场"; + treeNode9.Text = "达人广场"; + treeNode10.Name = "商品同步"; + treeNode10.Text = "商品同步"; + treeNode11.Name = "订单管理"; + treeNode11.Text = "订单管理"; + treeNode12.Name = "订单代发管理"; + treeNode12.Text = "订单代发管理"; + treeNode13.Name = "多多商品采集"; + treeNode13.Text = "多多商品采集"; + treeNode14.Name = "1688商品采集"; + treeNode14.Text = "1688商品采集"; + treeNode15.Name = "商品管理"; + treeNode15.Text = "商品管理"; + this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode15}); + this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tv.Size = new System.Drawing.Size(140, 521); + this.tv.TabIndex = 1; + this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); + // + // WXProductForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(934, 521); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "WXProductForm"; + this.Text = "UploadForms"; + this.Load += new System.EventHandler(this.ShopForm_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); } diff --git a/TEMUKJD/WXForms/ProductForms/WXProductForm.cs b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs index ba9e689..84ba5c4 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProductForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs @@ -16,202 +16,205 @@ using TemuKJD.ToolForms; namespace TemuKJD.WXForms.ProductForms { - public partial class WXProductForm : BaseForm - { - public static WXProductForm instance; - public Lazy userSelectDbProductForm = new Lazy(); - public Lazy userCollectAuthProdListForm = new Lazy(); - public Lazy wxProdPreSaleForm = new Lazy(); - public Lazy wxProdClearNoVisitForm = new Lazy(); - public Lazy wxProdClearNoVisit260606Form = new Lazy(); - public Lazy wxProdCouponForm = new Lazy(); - public Lazy wxProdSyncForm = new Lazy(); - public Lazy wxFinderSquareForm = new Lazy(); - public Lazy wxActivityForm = new Lazy(); - public Lazy orderListForm = new Lazy(); - public Lazy orderConsignmentForm = new Lazy(); - public Lazy getChanceProdForm = new Lazy(); - public Lazy get1688ProdForm = new Lazy(); - public Lazy prodNoCheckEditForm = new Lazy(); + public partial class WXProductForm : BaseForm + { + public static WXProductForm instance; + public Lazy userSelectDbProductForm = new Lazy(); + public Lazy userCollectAuthProdListForm = new Lazy(); + public Lazy wxProdPreSaleForm = new Lazy(); + public Lazy wxProdClearNoVisitForm = new Lazy(); + public Lazy wxProdClearNoVisit260606Form = new Lazy(); + public Lazy wxProdCouponForm = new Lazy(); + public Lazy wxProdSyncForm = new Lazy(); + public Lazy wxFinderSquareForm = new Lazy(); + public Lazy wxActivityForm = new Lazy(); + public Lazy orderListForm = new Lazy(); + public Lazy orderConsignmentForm = new Lazy(); + public Lazy getChanceProdForm = new Lazy(); + public Lazy get1688ProdForm = new Lazy(); + public Lazy prodNoCheckEditForm = new Lazy(); + public Lazy cloudgoodsForm = new Lazy(); + public WXProductForm() + { + InitializeComponent(); - public WXProductForm() - { - InitializeComponent(); + try + { + var hideNames = getHideTreeNodes(); - try - { - var hideNames = getHideTreeNodes(); + foreach (var item in hideNames) + { + var n = tv.Nodes[0].Nodes.Find(item, true); + if (n.Count() > 0) + n[0].Remove(); + } - foreach (var item in hideNames) - { - var n = tv.Nodes[0].Nodes.Find(item, true); - if (n.Count() > 0) - n[0].Remove(); - } + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + } + catch { } + } - tv.SelectedNode = tv.Nodes[0].Nodes[0]; - tv.ExpandGroup(tv.Nodes[0].Name); - } - catch { } - } + public List getHideTreeNodes() + { + List hideNames = new List() { "我的商品库", "1688商品采集", "多多商品采集", "爆单神器1", "商品同步1", "清理无流量1" }; - public List getHideTreeNodes() - { - List hideNames = new List() { "我的商品库", "1688商品采集", "多多商品采集", "爆单神器1", "商品同步1", "清理无流量1" }; + if (BaseClass.UserAuthority.Contains("商品采集")) + { + hideNames.Remove("1688商品采集"); + hideNames.Remove("多多商品采集"); + hideNames.Remove("我的商品库"); + } + if (BaseClass.ParentAuthority.Contains("商品采集")) + { + hideNames.Remove("我的商品库"); + } - if (BaseClass.UserAuthority.Contains("商品采集")) - { - hideNames.Remove("1688商品采集"); - hideNames.Remove("多多商品采集"); - hideNames.Remove("我的商品库"); - } - if (BaseClass.ParentAuthority.Contains("商品采集")) - { - hideNames.Remove("我的商品库"); - } - - foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(',')) - { - hideNames.Add(forbiddenPage); - } + foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(',')) + { + hideNames.Add(forbiddenPage); + } - return hideNames; - } + return hideNames; + } - private void tv_AfterSelect(object sender, TreeViewEventArgs e) - { - instance = this; + private void tv_AfterSelect(object sender, TreeViewEventArgs e) + { + instance = this; - MainForm.sCurrentModule = e.Node.Name; - this.lblName.Text = e.Node.Text; + MainForm.sCurrentModule = e.Node.Name; + this.lblName.Text = e.Node.Text; - //如果是一级菜单,不做任何动作 - if (e.Node.Parent == null) return; - new Thread(() => - { - Thread.Sleep(200); - Invoke(new Action(() => - { - switch (e.Node.Name) - { - case "选品上传": - SetForm(userSelectDbProductForm.Value); - break; - case "我的商品库": - SetForm(userCollectAuthProdListForm.Value); - break; - case "商品预售/下架": - SetForm(wxProdPreSaleForm.Value); - break; - case "云仓退货地址": - SetForm(prodNoCheckEditForm.Value); - break; - case "清理无流量": - SetForm(wxProdClearNoVisit260606Form.Value); - break; - case "爆单神器": - SetForm(wxProdCouponForm.Value); - break; - case "达人广场": - SetForm(wxFinderSquareForm.Value); - break; - case "活动报名": - SetForm(wxActivityForm.Value); - break; - case "商品同步": - SetForm(wxProdSyncForm.Value); - break; - case "订单管理": - SetForm(orderListForm.Value); - break; - case "订单代发管理": - SetForm(orderConsignmentForm.Value); - break; - case "多多商品采集": - getChanceProdForm.Value.IsCollectAuthorityUser = true; - SetForm(getChanceProdForm.Value); - break; - case "1688商品采集": - get1688ProdForm.Value.IsCollectAuthorityUser = true; - SetForm(get1688ProdForm.Value); - break; - } - })); - }).Start(); - } + //如果是一级菜单,不做任何动作 + if (e.Node.Parent == null) return; + new Thread(() => + { + Thread.Sleep(200); + Invoke(new Action(() => + { + switch (e.Node.Name) + { + case "选品上传": + SetForm(userSelectDbProductForm.Value); + break; + case "云仓数据": + SetForm(cloudgoodsForm.Value); + break; + case "我的商品库": + SetForm(userCollectAuthProdListForm.Value); + break; + case "商品预售/下架": + SetForm(wxProdPreSaleForm.Value); + break; + case "云仓退货地址": + SetForm(prodNoCheckEditForm.Value); + break; + case "清理无流量": + SetForm(wxProdClearNoVisit260606Form.Value); + break; + case "爆单神器": + SetForm(wxProdCouponForm.Value); + break; + case "达人广场": + SetForm(wxFinderSquareForm.Value); + break; + case "活动报名": + SetForm(wxActivityForm.Value); + break; + case "商品同步": + SetForm(wxProdSyncForm.Value); + break; + case "订单管理": + SetForm(orderListForm.Value); + break; + case "订单代发管理": + SetForm(orderConsignmentForm.Value); + break; + case "多多商品采集": + getChanceProdForm.Value.IsCollectAuthorityUser = true; + SetForm(getChanceProdForm.Value); + break; + case "1688商品采集": + get1688ProdForm.Value.IsCollectAuthorityUser = true; + SetForm(get1688ProdForm.Value); + break; + } + })); + }).Start(); + } - public void SetTvSelect(string name) - { - var n = tv.Nodes[0].Nodes.Find(name, true); - if (n.Count() > 0) - tv.SelectedNode = n[0]; - } + public void SetTvSelect(string name) + { + var n = tv.Nodes[0].Nodes.Find(name, true); + if (n.Count() > 0) + tv.SelectedNode = n[0]; + } - /// - /// 显示隐藏层 - /// - /// - private void SetForm(Form f) - { - if (f == null) - { - foreach (Control form in panel3.Controls) - { - form.Visible = false; - if (form is Form) - { - panel3.Controls.Remove(form); - } - } - return; - } + /// + /// 显示隐藏层 + /// + /// + private void SetForm(Form f) + { + if (f == null) + { + foreach (Control form in panel3.Controls) + { + form.Visible = false; + if (form is Form) + { + panel3.Controls.Remove(form); + } + } + return; + } - bool had = false; - string sCurrentFormName = f.Name; - for (int i = 0; i < panel3.Controls.Count; i++) - { - if (sCurrentFormName == panel3.Controls[i].Name) - { - had = true; - panel3.Controls[i].Visible = true; - } - else - { - panel3.Controls[i].Visible = false; - } - } - if (had) - { - return; - } - f.TopLevel = false; - f.Left = 0; - f.Top = 0; - f.FormBorderStyle = FormBorderStyle.None; - panel3.Controls.Add(f); - f.AutoSize = true; - f.Dock = DockStyle.Fill; - f.Show(); - } + bool had = false; + string sCurrentFormName = f.Name; + for (int i = 0; i < panel3.Controls.Count; i++) + { + if (sCurrentFormName == panel3.Controls[i].Name) + { + had = true; + panel3.Controls[i].Visible = true; + } + else + { + panel3.Controls[i].Visible = false; + } + } + if (had) + { + return; + } + f.TopLevel = false; + f.Left = 0; + f.Top = 0; + f.FormBorderStyle = FormBorderStyle.None; + panel3.Controls.Add(f); + f.AutoSize = true; + f.Dock = DockStyle.Fill; + f.Show(); + } - private void ShopForm_Load(object sender, EventArgs e) - { - try - { - tv.SelectedNode = tv.Nodes[0].Nodes[0]; - tv.ExpandGroup(tv.Nodes[0].Name); + private void ShopForm_Load(object sender, EventArgs e) + { + try + { + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); - List hideName = new List() { /*"营销工具"*/ }; + List hideName = new List() { /*"营销工具"*/ }; - foreach (var item in hideName) - { - var n = tv.Nodes[0].Nodes.Find(item, true); - if (n.Count() > 0) - n[0].Remove(); - } - } - catch { } - } - } + foreach (var item in hideName) + { + var n = tv.Nodes[0].Nodes.Find(item, true); + if (n.Count() > 0) + n[0].Remove(); + } + } + catch { } + } + } } diff --git a/Work/Services/CloudGoodsService.cs b/Work/Services/CloudGoodsService.cs new file mode 100644 index 0000000..4120915 --- /dev/null +++ b/Work/Services/CloudGoodsService.cs @@ -0,0 +1,237 @@ +using AllBase; +using AllBase.Model.Result; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Work.Services +{ + /// + /// 云商品数据服务 + /// + public class CloudGoodsService + { + private const string ServerUrl = "http://119.45.4.202:14312"; + public static PageData GetGoods(GoodsSearchRequest request) + { + string data = JsonHelper.SerializeObject(request); + var html = GetHtml.PostUtf8(ServerUrl + "/Goods/SearchGoods", data, "application/json"); + + var ret = JsonConvert.DeserializeObject>>(html); + if (ret.Code != 200) + { + throw new Exception(ret.Msg); + } + return ret.Data; + } + public static string GetGoodsDetail(long goodsId) + { + var html = GetHtml.GetUtf8(ServerUrl + $"/Goods/GetGoodsRawData?goodsId={goodsId}", "application/json"); + + var ret = JsonConvert.DeserializeObject>(html); + if (ret.Code != 200) + { + throw new Exception(ret.Msg); + } + return ret.Data; + } + } + /// + /// 商品搜索请求 + /// + public class GoodsSearchRequest + { + /// + /// 标题(模糊搜索) + /// + public string Title { get; set; } = string.Empty; + + /// + /// 最低价格(元) + /// + public long? MinPrice { get; set; } + + /// + /// 最高价格(元) + /// + public long? MaxPrice { get; set; } + + /// + /// 一级类目ID + /// + public int? CatId1 { get; set; } + + /// + /// 二级类目ID + /// + public int? CatId2 { get; set; } + + /// + /// 三级类目ID + /// + public int? CatId3 { get; set; } + + /// + /// 四级类目ID + /// + public int? CatId4 { get; set; } + + /// + /// 最低销量 + /// + public int? MinSoldQuantity { get; set; } + + /// + /// 最高销量 + /// + public int? MaxSoldQuantity { get; set; } + + /// + /// 平台类型 + /// + public PlatformType Platform { get; set; } + + /// + /// 页码(默认1) + /// + public int PageIndex { get; set; } = 1; + + /// + /// 每页数量(默认20) + /// + public int PageSize { get; set; } = 20; + + } + + /// + /// 商品搜索返回结果 + /// + public class GoodsSearchResponse + { + /// + /// 商品列表 + /// + [JsonProperty("list")] + public List List { get; set; } = new List(); + + /// + /// 总记录数 + /// + [JsonProperty("total")] + public int Total { get; set; } + + /// + /// 当前页码 + /// + [JsonProperty("pageIndex")] + public int PageIndex { get; set; } + + /// + /// 每页数量 + /// + [JsonProperty("pageSize")] + public int PageSize { get; set; } + + /// + /// 总页数 + /// + [JsonProperty("totalPages")] + public int TotalPages { get; set; } + } + public class CloudGoods : BindableBase + { + public bool IsSelected + { + get => GetValue(); + set => SetValue(value); + } + /// + /// 自增ID + /// + public long Id { get; set; } + + /// + /// 平台类型 + /// + public byte Platform { get; set; } + + /// + /// 商品编号 + /// + public long GoodsId { get; set; } + + /// + /// 标题 + /// + public string Title { get; set; } = string.Empty; + + /// + /// 描述 + /// + public string? Description { get; set; } + + /// + /// 缩略图 + /// + public string? ThumbUrl { get; set; } + + /// + /// 一级类目ID + /// + public int? CatId1 { get; set; } + + /// + /// 二级类目ID + /// + public int? CatId2 { get; set; } + + /// + /// 三级类目ID + /// + public int? CatId3 { get; set; } + + /// + /// 四级类目ID + /// + public int? CatId4 { get; set; } + + /// + /// 最低价快照(元),导入时计算 + /// + public decimal MinPrice { get; set; } + + /// + /// 最高价快照(元),导入时计算 + /// + public decimal MaxPrice { get; set; } + public string Price => $"{MinPrice / 100m:N2}"; + + /// + /// 销量 + /// + public int SoldQuantity { get; set; } + + /// + /// 状态:0正常 1已删除 + /// + public byte Status { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreatedTime { get; set; } + + /// + /// 更新时间(自动更新) + /// + public DateTime UpdatedTime { get; set; } + + /// + /// 索引同步状态:0未同步 1已同步 + /// + public byte IndexStatus { get; set; } + } +} diff --git a/Work/Work.csproj b/Work/Work.csproj index 57d4ce0..e6adb02 100644 --- a/Work/Work.csproj +++ b/Work/Work.csproj @@ -1,234 +1,241 @@  - - - - - - Debug - AnyCPU - {38E74D4C-2D8D-47D2-8A23-417C3C57ADE5} - Library - Properties - Work - Work - v4.6.2 - 512 - - - - - - true - full - false - ..\bin\ - DEBUG;TRACE - prompt - 4 - Off - x64 - - - pdbonly - true - ..\bin\ - DEBUG;TRACE - prompt - 4 - false - x86 - - - true - ..\bin\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - ..\bin\ - TRACE - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - true - ..\bin\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - ..\bin\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.dll - - - ..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.Core.dll - - - ..\packages\CefSharp.WinForms.138.0.340\lib\net462\CefSharp.WinForms.dll - - - - False - True - ..\DllReference\Interop.MSScriptControl.dll - - - False - ..\DllReference\NaiBa.Util.dll - - - ..\DllReference\NaiBa.Util.Winform.dll - - - False - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True - - - - - - False - ..\DllReference\System.Data.SQLite.DLL - - - - - - - - - - - - - False - ..\DllReference\websocket-sharp.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6461d807-b1c8-45f0-b388-e0ca1a418de0} - AllBase - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - - - - -