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

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

No files matched your search

+40
View File
@@ -39,6 +39,8 @@ namespace TemuKJD.UserControls
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();
//
@@ -124,6 +126,8 @@ namespace TemuKJD.UserControls
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);
@@ -220,6 +224,40 @@ namespace TemuKJD.UserControls
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",
"500",
"1000",
"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;
@@ -246,5 +284,7 @@ namespace TemuKJD.UserControls
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.Controls.TextBoxX txtJumpPage;
private System.Windows.Forms.Label lblTotal;
private System.Windows.Forms.Label lblPageSize;
private System.Windows.Forms.ComboBox cmbPageSize;
}
}
+60
View File
@@ -13,6 +13,26 @@ namespace TemuKJD.UserControls
{
public partial class UcSplitPage : UserControl
{
/// <summary>
/// 是否显示每页条数(启用每页条数功能)
/// </summary>
[Description("显示每页条数"), Category("UserProperty")]
public bool IsShowPageSize
{
get
{
return this.cmbPageSize.Visible;
}
set
{
if (cmbPageSize.Visible != value)
{
this.lblPageSize.Visible = this.cmbPageSize.Visible = value;
this.Invalidate();
}
}
}
int totalPage = 1;
public int TotalPage
{
@@ -58,6 +78,46 @@ namespace TemuKJD.UserControls
}
}
[Description("每页条数"), Category("UserProperty")]
public int PageSize
{
get
{
int pageSize = 50;
if (InvokeRequired)
{
Invoke(new Action(() =>
{
pageSize = Math.Max(this.cmbPageSize.Text.ParseToInt(), 50);
}));
}
else
pageSize = Math.Max(this.cmbPageSize.Text.ParseToInt(), 50);
return pageSize;
}
set
{
if (InvokeRequired)
{
Invoke(new Action(() =>
{
if (this.cmbPageSize.Text.ParseToInt() != value)
this.cmbPageSize.Text = value.ParseToString();
else
this.cmbPageSize.Text = value.ParseToString();
}));
}
else
{
if (this.cmbPageSize.Text.ParseToInt() != value)
this.cmbPageSize.Text = value.ParseToString();
else
this.cmbPageSize.Text = value.ParseToString();
}
//OnPageChange(this);
}
}
public event Action<object> PageChange;
protected virtual void OnPageChange(object sender)
{