修改分页总数显示
This commit is contained in:
1 parent
c60e6d1be0
commit
fadda22178
6 files changed
+48
-21
No files matched your search
@@ -505,12 +505,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
this.ucSplitPage1.CurrentPage = 1;
|
this.ucSplitPage1.CurrentPage = 1;
|
||||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.ucSplitPage1.IsShowPageSize = false;
|
this.ucSplitPage1.IsShowPageSize = false;
|
||||||
|
this.ucSplitPage1.IsShowTotalCount = true;
|
||||||
this.ucSplitPage1.Location = new System.Drawing.Point(1115, 0);
|
this.ucSplitPage1.Location = new System.Drawing.Point(1115, 0);
|
||||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||||
this.ucSplitPage1.PageSize = 50;
|
this.ucSplitPage1.PageSize = 50;
|
||||||
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
|
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
|
||||||
this.ucSplitPage1.TabIndex = 4;
|
this.ucSplitPage1.TabIndex = 4;
|
||||||
|
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||||
this.ucSplitPage1.TotalPage = 1;
|
this.ucSplitPage1.TotalPage = 1;
|
||||||
//
|
//
|
||||||
// statusBar
|
// statusBar
|
||||||
|
|||||||
+14
-13
@@ -1087,7 +1087,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"",
|
"",
|
||||||
"修改时间",
|
"修改时间",
|
||||||
"入库时间"});
|
"入库时间"});
|
||||||
this.cmbTime.Location = new System.Drawing.Point(402, 82);
|
this.cmbTime.Location = new System.Drawing.Point(402, 80);
|
||||||
this.cmbTime.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbTime.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbTime.Name = "cmbTime";
|
this.cmbTime.Name = "cmbTime";
|
||||||
this.cmbTime.Size = new System.Drawing.Size(56, 25);
|
this.cmbTime.Size = new System.Drawing.Size(56, 25);
|
||||||
@@ -1101,7 +1101,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"",
|
"",
|
||||||
"是",
|
"是",
|
||||||
"否"});
|
"否"});
|
||||||
this.cmbHasFission.Location = new System.Drawing.Point(800, 45);
|
this.cmbHasFission.Location = new System.Drawing.Point(800, 43);
|
||||||
this.cmbHasFission.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbHasFission.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbHasFission.Name = "cmbHasFission";
|
this.cmbHasFission.Name = "cmbHasFission";
|
||||||
this.cmbHasFission.Size = new System.Drawing.Size(51, 25);
|
this.cmbHasFission.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1136,7 +1136,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"",
|
"",
|
||||||
"是",
|
"是",
|
||||||
"否"});
|
"否"});
|
||||||
this.cmbPddRelation.Location = new System.Drawing.Point(687, 8);
|
this.cmbPddRelation.Location = new System.Drawing.Point(687, 6);
|
||||||
this.cmbPddRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbPddRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbPddRelation.Name = "cmbPddRelation";
|
this.cmbPddRelation.Name = "cmbPddRelation";
|
||||||
this.cmbPddRelation.Size = new System.Drawing.Size(51, 25);
|
this.cmbPddRelation.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1181,7 +1181,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
//
|
//
|
||||||
this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.cmbCat2.FormattingEnabled = true;
|
this.cmbCat2.FormattingEnabled = true;
|
||||||
this.cmbCat2.Location = new System.Drawing.Point(252, 82);
|
this.cmbCat2.Location = new System.Drawing.Point(252, 80);
|
||||||
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbCat2.Name = "cmbCat2";
|
this.cmbCat2.Name = "cmbCat2";
|
||||||
this.cmbCat2.Size = new System.Drawing.Size(51, 25);
|
this.cmbCat2.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1267,7 +1267,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"机会商品",
|
"机会商品",
|
||||||
"以图搜品",
|
"以图搜品",
|
||||||
"多多外部数据"});
|
"多多外部数据"});
|
||||||
this.cmbSourceType.Location = new System.Drawing.Point(252, 45);
|
this.cmbSourceType.Location = new System.Drawing.Point(252, 43);
|
||||||
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbSourceType.Name = "cmbSourceType";
|
this.cmbSourceType.Name = "cmbSourceType";
|
||||||
this.cmbSourceType.Size = new System.Drawing.Size(51, 25);
|
this.cmbSourceType.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1313,7 +1313,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"",
|
"",
|
||||||
"是",
|
"是",
|
||||||
"否"});
|
"否"});
|
||||||
this.cmbWxCat.Location = new System.Drawing.Point(574, 8);
|
this.cmbWxCat.Location = new System.Drawing.Point(574, 6);
|
||||||
this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbWxCat.Name = "cmbWxCat";
|
this.cmbWxCat.Name = "cmbWxCat";
|
||||||
this.cmbWxCat.Size = new System.Drawing.Size(51, 25);
|
this.cmbWxCat.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1335,7 +1335,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
this.cmbSort.Items.AddRange(new object[] {
|
this.cmbSort.Items.AddRange(new object[] {
|
||||||
"入库时间",
|
"入库时间",
|
||||||
"曝光量"});
|
"曝光量"});
|
||||||
this.cmbSort.Location = new System.Drawing.Point(348, 45);
|
this.cmbSort.Location = new System.Drawing.Point(348, 43);
|
||||||
this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbSort.Name = "cmbSort";
|
this.cmbSort.Name = "cmbSort";
|
||||||
this.cmbSort.Size = new System.Drawing.Size(51, 25);
|
this.cmbSort.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1399,7 +1399,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
//
|
//
|
||||||
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.cmbGroupFilter.FormattingEnabled = true;
|
this.cmbGroupFilter.FormattingEnabled = true;
|
||||||
this.cmbGroupFilter.Location = new System.Drawing.Point(156, 45);
|
this.cmbGroupFilter.Location = new System.Drawing.Point(156, 43);
|
||||||
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbGroupFilter.Name = "cmbGroupFilter";
|
this.cmbGroupFilter.Name = "cmbGroupFilter";
|
||||||
this.cmbGroupFilter.Size = new System.Drawing.Size(51, 25);
|
this.cmbGroupFilter.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1414,7 +1414,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"是",
|
"是",
|
||||||
"否",
|
"否",
|
||||||
"导出未拉回"});
|
"导出未拉回"});
|
||||||
this.cmbExportToOutServer.Location = new System.Drawing.Point(574, 45);
|
this.cmbExportToOutServer.Location = new System.Drawing.Point(574, 43);
|
||||||
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
|
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
|
||||||
this.cmbExportToOutServer.Size = new System.Drawing.Size(51, 25);
|
this.cmbExportToOutServer.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1450,7 +1450,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"安全商品",
|
"安全商品",
|
||||||
"违规商品",
|
"违规商品",
|
||||||
"未校验"});
|
"未校验"});
|
||||||
this.cmbWxSafe.Location = new System.Drawing.Point(461, 45);
|
this.cmbWxSafe.Location = new System.Drawing.Point(461, 43);
|
||||||
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbWxSafe.Name = "cmbWxSafe";
|
this.cmbWxSafe.Name = "cmbWxSafe";
|
||||||
this.cmbWxSafe.Size = new System.Drawing.Size(51, 25);
|
this.cmbWxSafe.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1492,7 +1492,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
//
|
//
|
||||||
this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.cmbCat1.FormattingEnabled = true;
|
this.cmbCat1.FormattingEnabled = true;
|
||||||
this.cmbCat1.Location = new System.Drawing.Point(156, 82);
|
this.cmbCat1.Location = new System.Drawing.Point(156, 80);
|
||||||
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbCat1.Name = "cmbCat1";
|
this.cmbCat1.Name = "cmbCat1";
|
||||||
this.cmbCat1.Size = new System.Drawing.Size(51, 25);
|
this.cmbCat1.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1514,7 +1514,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
//
|
//
|
||||||
this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.cmbCat3.FormattingEnabled = true;
|
this.cmbCat3.FormattingEnabled = true;
|
||||||
this.cmbCat3.Location = new System.Drawing.Point(348, 82);
|
this.cmbCat3.Location = new System.Drawing.Point(348, 80);
|
||||||
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbCat3.Name = "cmbCat3";
|
this.cmbCat3.Name = "cmbCat3";
|
||||||
this.cmbCat3.Size = new System.Drawing.Size(51, 25);
|
this.cmbCat3.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -1610,7 +1610,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
"",
|
"",
|
||||||
"普通商品",
|
"普通商品",
|
||||||
"爆款数据"});
|
"爆款数据"});
|
||||||
this.cmbSpProdType.Location = new System.Drawing.Point(800, 8);
|
this.cmbSpProdType.Location = new System.Drawing.Point(800, 6);
|
||||||
this.cmbSpProdType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
this.cmbSpProdType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||||
this.cmbSpProdType.Name = "cmbSpProdType";
|
this.cmbSpProdType.Name = "cmbSpProdType";
|
||||||
this.cmbSpProdType.Size = new System.Drawing.Size(51, 25);
|
this.cmbSpProdType.Size = new System.Drawing.Size(51, 25);
|
||||||
@@ -2234,6 +2234,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
this.ucSplitPage1.PageSize = 100;
|
this.ucSplitPage1.PageSize = 100;
|
||||||
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
|
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
|
||||||
this.ucSplitPage1.TabIndex = 6;
|
this.ucSplitPage1.TabIndex = 6;
|
||||||
|
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||||
this.ucSplitPage1.TotalPage = 1;
|
this.ucSplitPage1.TotalPage = 1;
|
||||||
//
|
//
|
||||||
// statusBar
|
// statusBar
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
|
|
||||||
private void ProductListForm_Load(object sender, EventArgs e)
|
private void ProductListForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
ucSplitPage1.lblTotal.Visible = false;
|
||||||
cmbSpProdType.SelectedIndex = 0;
|
cmbSpProdType.SelectedIndex = 0;
|
||||||
cmbSetWxSafe.SelectedIndex = 0;
|
cmbSetWxSafe.SelectedIndex = 0;
|
||||||
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
|
if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态
|
||||||
@@ -178,8 +179,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
int pageSize = 100;
|
int pageSize = 100;
|
||||||
decimal seconds;
|
decimal seconds;
|
||||||
Invoke(new Action(() => { pageSize = this.ucSplitPage1.PageSize; }));
|
Invoke(new Action(() => { pageSize = this.ucSplitPage1.PageSize; }));
|
||||||
var list = GetProductList(out pageCount, out seconds, page, pageSize);
|
//var list = GetProductList(out pageCount, out seconds, page, pageSize);
|
||||||
//var list = GetHotProductList(out pageCount, out seconds, page, pageSize);
|
var list = GetHotProductList(out pageCount, out seconds, page, pageSize);
|
||||||
lstTemuDbProduct.AddRange(list);
|
lstTemuDbProduct.AddRange(list);
|
||||||
this.ucSplitPage1.TotalPage = pageCount;
|
this.ucSplitPage1.TotalPage = pageCount;
|
||||||
|
|
||||||
@@ -352,8 +353,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
seconds = 0;
|
seconds = 0;
|
||||||
|
|
||||||
var url = BaseClass.BuildWXObjString("product/get_hot_product_list");
|
var url = BaseClass.BuildWXObjString("product/get_hot_product_list");
|
||||||
if (shop != null && shop.DbId.ParseToInt() != 0)
|
if (!txtSPU.Text.Trim().IsNullOrEmpty())
|
||||||
url = BaseClass.BuildWXObjString("product/get_hot_product_list");
|
url = BaseClass.BuildWXObjString("product/get_hot_product_list_detail");
|
||||||
var data = "";
|
var data = "";
|
||||||
|
|
||||||
Invoke(new Action(() =>
|
Invoke(new Action(() =>
|
||||||
|
|||||||
+1
@@ -223,6 +223,7 @@ namespace TemuKJD.UserControls
|
|||||||
this.lblTotal.TabIndex = 446;
|
this.lblTotal.TabIndex = 446;
|
||||||
this.lblTotal.Text = "共1条";
|
this.lblTotal.Text = "共1条";
|
||||||
this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
this.lblTotal.Visible = false;
|
||||||
//
|
//
|
||||||
// lblPageSize
|
// lblPageSize
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -32,6 +32,25 @@ namespace TemuKJD.UserControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示总条数
|
||||||
|
/// </summary>
|
||||||
|
[Description("显示总条数"), Category("UserProperty")]
|
||||||
|
public bool IsShowTotalCount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.lblTotal.Visible;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (lblTotal.Visible != value)
|
||||||
|
{
|
||||||
|
this.lblTotal.Visible = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
long totalCount = 0;
|
long totalCount = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 总数量
|
/// 总数量
|
||||||
|
|||||||
@@ -192,12 +192,14 @@ namespace TemuKJD.WXForms.ProductForms
|
|||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
int pageCount;
|
int pageCount;
|
||||||
|
int totalCount;
|
||||||
int pageSize = 100;
|
int pageSize = 100;
|
||||||
decimal seconds;
|
decimal seconds;
|
||||||
Invoke(new Action(() => { pageSize = this.ucSplitPage1.PageSize; }));
|
Invoke(new Action(() => { pageSize = this.ucSplitPage1.PageSize; }));
|
||||||
var list = GetProductList(out pageCount, out seconds, page, pageSize, isNotCount);
|
var list = GetProductList(out pageCount, out totalCount, out seconds, page, pageSize, isNotCount);
|
||||||
lstTemuDbProduct.AddRange(list);
|
lstTemuDbProduct.AddRange(list);
|
||||||
this.ucSplitPage1.TotalPage = pageCount;
|
this.ucSplitPage1.TotalPage = pageCount;
|
||||||
|
this.ucSplitPage1.TotalCount = totalCount;
|
||||||
|
|
||||||
if (defaultBitmap == null)
|
if (defaultBitmap == null)
|
||||||
defaultBitmap = new Bitmap(80, 80);
|
defaultBitmap = new Bitmap(80, 80);
|
||||||
@@ -367,10 +369,11 @@ namespace TemuKJD.WXForms.ProductForms
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<KJDDBProduct> GetProductList(out int pageCount, out decimal seconds, int page = 1, int pageSize = 200, bool isNotCount = true)
|
public List<KJDDBProduct> GetProductList(out int pageCount, out int totalNum, out decimal seconds, int page = 1, int pageSize = 200, bool isNotCount = true)
|
||||||
{
|
{
|
||||||
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
||||||
pageCount = 1;
|
pageCount = 1;
|
||||||
|
totalNum = 0;
|
||||||
seconds = 0;
|
seconds = 0;
|
||||||
|
|
||||||
var url = BaseClass.BuildPDDObjString("product/get_product_list");
|
var url = BaseClass.BuildPDDObjString("product/get_product_list");
|
||||||
@@ -523,8 +526,8 @@ namespace TemuKJD.WXForms.ProductForms
|
|||||||
}
|
}
|
||||||
|
|
||||||
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
|
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
|
||||||
int count = BaseRegex.GetIntJson(ref html, "count");
|
totalNum = BaseRegex.GetIntJson(ref html, "count");
|
||||||
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
pageCount = Math.Ceiling(1.0 * totalNum / pageSize).ParseToInt();
|
||||||
pageCount = Math.Max(pageCount, 1);
|
pageCount = Math.Max(pageCount, 1);
|
||||||
if (isNotCount)
|
if (isNotCount)
|
||||||
pageCount = 1000;
|
pageCount = 1000;
|
||||||
|
|||||||
Reference in new issue
Block a user