From 600c009509374795cfe662818b208a1cac489de4 Mon Sep 17 00:00:00 2001 From: wule Date: Mon, 9 Feb 2026 19:05:35 +0800 Subject: [PATCH] =?UTF-8?q?1=E8=AE=B0=E4=BD=8F=E5=90=8E=E5=8F=B0=E7=99=BB?= =?UTF-8?q?=E9=99=86=E7=9A=84=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=202?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E7=BB=9F=E8=AE=A1=E5=B1=95=E7=A4=BA=203?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E9=A2=84=E5=94=AE=E8=AE=BE=E7=BD=AE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E4=B8=8B=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 1 + AllBase/BaseClass.cs | 2 +- AllBase/Extension/Extensions.cs | 101 ++++ AllBase/Model/Config/WxShopMainStatistics.cs | 31 ++ AllBase/Model/Result/ShopLoginInfo.cs | 5 +- .../KJD_WebService/BLL/WXXD/WXShopManage.cs | 65 +-- .../Model/ShopModel/ShopParam.cs | 1 + TEMUKJD/BLL/ShopBLL.cs | 1 + .../WXProdPreSaleForm.Designer.cs | 247 ++++----- .../WXForms/ProductForms/WXProdPreSaleForm.cs | 30 ++ TEMUKJD/WXForms/ShopForms/WXShopForm.cs | 2 +- .../ShopForms/WXShopListForm.Designer.cs | 95 ++-- TEMUKJD/WXForms/ShopForms/WXShopListForm.cs | 26 +- TEMUKJD/WXForms/ShopForms/WXShopListForm.resx | 3 + .../ShopForms/WXShopLoginForm.Designer.cs | 34 +- TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs | 242 +++------ .../WxShopStatisticsForm.Designer.cs | 379 +++++++------- .../WXForms/ShopForms/WxShopStatisticsForm.cs | 467 +++++++++++++++--- .../ShopForms/WxShopStatisticsForm.resx | 8 +- 19 files changed, 1114 insertions(+), 626 deletions(-) create mode 100644 AllBase/Extension/Extensions.cs diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 3abb92d..0d30df9 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -159,6 +159,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 5c2b2af..280d75b 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 832; + public static int VersionCount = 836; //public static int VersionCount = 613; /// diff --git a/AllBase/Extension/Extensions.cs b/AllBase/Extension/Extensions.cs new file mode 100644 index 0000000..d3155fd --- /dev/null +++ b/AllBase/Extension/Extensions.cs @@ -0,0 +1,101 @@ +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Extension +{ + public static class Extensions + { + public static long? ParseToNullableLong(this object obj) + { + if (obj == null) + return null; + + try + { + string str = obj.ParseToString(); + if (string.IsNullOrEmpty(str)) + { + return null; + } + return long.Parse(str); + } + catch + { + return null; + } + } + + public static int? ParseToNullableInt(this object str) + { + if (str == null) + return null; + + try + { + return Convert.ToInt32(str); + } + catch + { + return null; + } + } + + public static decimal? ParseToNullableDecimal(this object str) + { + try + { + if (str == null) + return null; + return decimal.Parse(str.ToString()); + } + catch + { + return null; + } + } + + public static DateTime? ParseToNullableDateTime(this string str) + { + try + { + if (string.IsNullOrWhiteSpace(str)) + { + return null; + } + if (str.Contains("-") || str.Contains("/")) + { + return DateTime.Parse(str); + } + else + { + int length = str.Length; + switch (length) + { + case 4: + return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture); + case 6: + return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture); + case 8: + return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture); + case 10: + return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture); + case 12: + return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture); + case 14: + return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); + default: + return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); + } + } + } + catch + { + return null; + } + } + } +} diff --git a/AllBase/Model/Config/WxShopMainStatistics.cs b/AllBase/Model/Config/WxShopMainStatistics.cs index f8f820d..00e8df6 100644 --- a/AllBase/Model/Config/WxShopMainStatistics.cs +++ b/AllBase/Model/Config/WxShopMainStatistics.cs @@ -73,6 +73,10 @@ namespace AllBase.Model.Config public string Notes { get; set; } public string GroupName { get; set; } + public int? ProdCount { get; set; } + public decimal? curScoreValue {get;set;} + public DateTime lastRefreshDate { get; set; } = DateTime.MinValue; + /// /// 主页店铺信息 /// @@ -90,6 +94,8 @@ namespace AllBase.Model.Config /// public WxShopSaleStatisticsInfo WxShopSaleInfo30Day { get; set; } = new WxShopSaleStatisticsInfo(); + public WxAmount WxShopAmount { get; set; } = new WxAmount(); + public string err_msg; } @@ -128,4 +134,29 @@ namespace AllBase.Model.Config public DateTime LastRefreshDate { get; set; } } + + public class WxAmount + { + /// + /// 总货款 + /// + public int? totalAmount { get; set; } + /// + /// 可提现 + /// + public int? availableAmount { get; set; } + /// + /// 待结算 + /// + public int? pendingAmount { get; set; } + + public int? tempFrozenAmount { get; set; } + + /// + /// 保证金,在另一个接口获取 + /// + public int? DepositBalance { get; set; } + + public DateTime LastRefreshDate { get; set; } + } } diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs index 1b5eea7..4a48c9b 100644 --- a/AllBase/Model/Result/ShopLoginInfo.cs +++ b/AllBase/Model/Result/ShopLoginInfo.cs @@ -90,12 +90,13 @@ namespace AllBase.Model.Result } } public string GroupName { get; set; } + public DateTime AddTime { get; set; } public string LastRefreshDate { get; set; } public string AccessToken { get { return CurrentAuthInfo?.AccessToken; } } public string RefreshToken { get { return CurrentAuthInfo?.RefreshToken; } } public string AppKey { get { return CurrentAuthInfo?.AppKey; } } - public DateTime AddTime { get { return CurrentAuthInfo?.AddTime == null ? new DateTime() : CurrentAuthInfo.AddTime; } } - public DateTime ExpiresTime { get { return CurrentAuthInfo?.ExpiresTime == null ? new DateTime() : CurrentAuthInfo.ExpiresTime; } } + public DateTime AuthAddTime { get { return CurrentAuthInfo?.AddTime == null ? new DateTime() : CurrentAuthInfo.AddTime; } } + public DateTime AuthExpiresTime { get { return CurrentAuthInfo?.ExpiresTime == null ? new DateTime() : CurrentAuthInfo.ExpiresTime; } } /// /// 店铺运费模板 /// diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs index c1682f5..9ef171a 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs @@ -135,6 +135,7 @@ namespace KJD_Web.BLL.WXXD operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(), openid = row["openid"].ParseToString(), group_name = row["group_name"].ParseToString(), + add_time = row["add_time"].IsNullOrEmpty() ? DateTime.MinValue : Convert.ToDateTime(row["add_time"]), }; shopList.Add(shop); } @@ -152,40 +153,40 @@ namespace KJD_Web.BLL.WXXD //var result = mySql.ExecuteNonQuery(sql); //mySql.Close(); - int month = DateTime.Now.Month; - var shopMonthList = shopList.Where(s => s.add_product_month != month); - if (shopMonthList.Count() > 0) - { - int remainCount = 300; - var shopMonthIdList = shopMonthList.Select(s => s.id); - mySql = new MysqlUtils(conn); - string ids = string.Join(",", shopMonthIdList); - sql = ""; - sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + - " where 1=1 and id in (" + ids + ");"; + //int month = DateTime.Now.Month; + //var shopMonthList = shopList.Where(s => s.add_product_month != month); + //if (shopMonthList.Count() > 0) + //{ + // int remainCount = 300; + // var shopMonthIdList = shopMonthList.Select(s => s.id); + // mySql = new MysqlUtils(conn); + // string ids = string.Join(",", shopMonthIdList); + // sql = ""; + // sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + + // " where 1=1 and id in (" + ids + ");"; - sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; - foreach (var shop in shopMonthList) - { - sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; - } - sql = sql.TrimEnd(',') + " \r\n"; - sql += "ON DUPLICATE KEY UPDATE " + - "shop_account=VALUES(shop_account)," + - "add_product_remaining=VALUES(add_product_remaining)," + - "add_product_month=VALUES(add_product_month);"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); + // sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + // foreach (var shop in shopMonthList) + // { + // sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; + // } + // sql = sql.TrimEnd(',') + " \r\n"; + // sql += "ON DUPLICATE KEY UPDATE " + + // "shop_account=VALUES(shop_account)," + + // "add_product_remaining=VALUES(add_product_remaining)," + + // "add_product_month=VALUES(add_product_month);"; + // var rst = mySql.ExecuteNonQuery(sql); + // mySql.Close(); - if (rst) - { - foreach (var shop in shopMonthList) - { - shop.add_product_month = month; - shop.add_product_remaining = remainCount; - } - } - } + // if (rst) + // { + // foreach (var shop in shopMonthList) + // { + // shop.add_product_month = month; + // shop.add_product_remaining = remainCount; + // } + // } + //} var data = JsonUtils.SerializerObjectToString(shopList); diff --git a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs index ed504e3..54df444 100644 --- a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs +++ b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs @@ -59,5 +59,6 @@ namespace KJD_Web.Model.ShopModel /// public string ad_login_status { get; set; } public DateTime? jit_expire_time { get; set; } + public DateTime? add_time { get; set; } } } \ No newline at end of file diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs index fcd6958..4779259 100644 --- a/TEMUKJD/BLL/ShopBLL.cs +++ b/TEMUKJD/BLL/ShopBLL.cs @@ -288,6 +288,7 @@ namespace TemuKJD.BLL shop.pddid = BaseRegex.GetStringJson(ref shopStr, "pddid"); shop.openid = BaseRegex.GetStringJson(ref shopStr, "openid"); shop.jit_expire_time = BaseRegex.GetStringJson(ref shopStr, "jit_expire_time") == null ? new DateTime?() : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "jit_expire_time")); + shop.AddTime = BaseRegex.GetStringJson(ref shopStr, "add_time") == null ? DateTime.MinValue : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "add_time")); if (BaseClass.MainPath == "binxixi") { diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs index 9f1e37e..9c72a17 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs @@ -32,13 +32,13 @@ namespace TemuKJD.WXForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.chkNoPreSale = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -99,10 +99,6 @@ namespace TemuKJD.WXForms.ProductForms this.pbLoading = new System.Windows.Forms.PictureBox(); this.chkTestNoAuditUpload = new TemuKJD.UserComponent.UcCheckBox(this.components); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -126,6 +122,11 @@ namespace TemuKJD.WXForms.ProductForms this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn(); this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.chkFailDownProd = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -180,6 +181,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.chkFailDownProd); this.ucGroupBoxEx2.Controls.Add(this.chkNoPreSale); this.ucGroupBoxEx2.Controls.Add(this.label18); this.ucGroupBoxEx2.Controls.Add(this.txtPreDays); @@ -896,19 +898,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1079,19 +1081,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.dgvSelectProduct.AutoRowNumber = true; this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1126,86 +1128,6 @@ namespace TemuKJD.WXForms.ProductForms this.dgvSelectProduct.TabIndex = 187; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); // - // splitContainer4 - // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; - // - // splitContainer4.Panel1 - // - this.splitContainer4.Panel1.Controls.Add(this.statusBar); - // - // splitContainer4.Panel2 - // - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Size = new System.Drawing.Size(1583, 26); - this.splitContainer4.SplitterDistance = 892; - this.splitContainer4.TabIndex = 3; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(892, 26); - this.statusBar.TabIndex = 2; - // - // btnClear - // - this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(475, 2); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; - // - // panelEx1 - // - this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Location = new System.Drawing.Point(568, 2); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(115, 21); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.TabIndex = 668; - this.panelEx1.Text = "停止当前操作"; - this.panelEx1.Visible = false; - // // colCheck // this.colCheck.Frozen = true; @@ -1232,8 +1154,8 @@ namespace TemuKJD.WXForms.ProductForms // // colSupplierName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle12; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1321,8 +1243,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductName // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle13; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -1330,8 +1252,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductCat // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductCat.DefaultCellStyle = dataGridViewCellStyle14; this.colProductCat.HeaderText = "商品类目"; this.colProductCat.Name = "colProductCat"; this.colProductCat.ReadOnly = true; @@ -1394,6 +1316,96 @@ namespace TemuKJD.WXForms.ProductForms this.colOpResult.ReadOnly = true; this.colOpResult.Width = 260; // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Size = new System.Drawing.Size(1583, 26); + this.splitContainer4.SplitterDistance = 892; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(892, 26); + this.statusBar.TabIndex = 2; + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(475, 2); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(568, 2); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Visible = false; + // + // chkFailDownProd + // + this.chkFailDownProd.AutoSize = true; + this.chkFailDownProd.Location = new System.Drawing.Point(130, 64); + this.chkFailDownProd.Name = "chkFailDownProd"; + this.chkFailDownProd.Size = new System.Drawing.Size(183, 21); + this.chkFailDownProd.TabIndex = 820; + this.chkFailDownProd.Text = "如果预售设置失败则下架商品"; + this.chkFailDownProd.UseVisualStyleBackColor = true; + // // WXProdPreSaleForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1526,5 +1538,6 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewLinkColumn ColDelete; private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private UserComponent.UcCheckBox chkFailDownProd; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs index b566964..30bbe8e 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs @@ -709,6 +709,27 @@ namespace TemuKJD.WXForms.ProductForms if (string.IsNullOrWhiteSpace(errmsg)) errmsg = listingAuditFreeRst; + if (getEditProdRst.Contains("biz magic invalid")) + { + WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + row.Cells["colOpResult"].Value = "店铺掉线"; + })); + continue; + } + + if (chkPreSale.Checked && chkFailDownProd.Checked) + { + var downProd = WXPreSale.DownProd(shop, prodId.ParseToLong()); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (downProd.Contains("\"code\":0")) + { + errmsg += " 预售设置失败 已下架"; + } + else + errmsg += " 预售设置失败 下架失败"; + } Invoke(new Action(() => { row.Cells["colOpResult"].Value = errmsg; @@ -1085,6 +1106,15 @@ namespace TemuKJD.WXForms.ProductForms return result; } + public static string DownProd(ShopLoginInfo shop, long prodId) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductlist/cgi/goods/BatchUnListing?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/list"; + string body = @"{""ids"":[" + prodId + @"],""uploadSource"":6}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + public static string getUploadTempImgAuth(ShopLoginInfo shop, int uploadScene = 3) { string url = "https://store.weixin.qq.com/shop-faas/mmecchannelspicture/cgi/getUploadTempImgAuth?token=&lang=zh_CN&uploadScene=" + uploadScene; diff --git a/TEMUKJD/WXForms/ShopForms/WXShopForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopForm.cs index 99d2f24..9e83657 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopForm.cs @@ -33,7 +33,7 @@ namespace TemuKJD.WXForms.ShopForms tv.SelectedNode = tv.Nodes[0].Nodes[0]; tv.ExpandGroup(tv.Nodes[0].Name); - List hideName = new List() { "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计" }; + List hideName = new List() { "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" }; if (BaseClass.GroupId == 3) { diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs index 375753c..3727f1e 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs @@ -58,10 +58,13 @@ this.pbLoading = new System.Windows.Forms.PictureBox(); this.btnImport = new TemuKJD.UserControls.ButtonEx(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.chkAutoDrag = new System.Windows.Forms.CheckBox(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -82,8 +85,6 @@ this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn(); this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); - this.chkAutoDrag = new System.Windows.Forms.CheckBox(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -562,6 +563,7 @@ this.colLoginName, this.colShopId, this.colShopAccount, + this.colAddTime, this.colNotes, this.colGroupName, this.colCookie, @@ -591,6 +593,31 @@ this.dgvShop.TabIndex = 5; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // + // chkAutoDrag + // + this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkAutoDrag.AutoSize = true; + this.chkAutoDrag.BackColor = System.Drawing.Color.White; + this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2); + this.chkAutoDrag.Name = "chkAutoDrag"; + this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); + this.chkAutoDrag.TabIndex = 3; + this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; + this.chkAutoDrag.UseVisualStyleBackColor = false; + this.chkAutoDrag.Visible = false; + this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click); + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom; + 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, -1); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1264, 29); + this.statusBar.TabIndex = 1; + // // colSelect // this.colSelect.FillWeight = 26F; @@ -602,14 +629,15 @@ // // colLoginName // - this.colLoginName.FillWeight = 69.42599F; + this.colLoginName.FillWeight = 70F; this.colLoginName.HeaderText = "店铺登录号码"; this.colLoginName.Name = "colLoginName"; this.colLoginName.ReadOnly = true; + this.colLoginName.Visible = false; // // colShopId // - this.colShopId.FillWeight = 69.42599F; + this.colShopId.FillWeight = 70F; this.colShopId.HeaderText = "店铺Id"; this.colShopId.Name = "colShopId"; this.colShopId.ReadOnly = true; @@ -621,6 +649,13 @@ this.colShopAccount.Name = "colShopAccount"; this.colShopAccount.ReadOnly = true; // + // colAddTime + // + this.colAddTime.FillWeight = 70F; + this.colAddTime.HeaderText = "添加时间"; + this.colAddTime.Name = "colAddTime"; + this.colAddTime.ReadOnly = true; + // // colNotes // this.colNotes.FillWeight = 90F; @@ -651,7 +686,7 @@ // // colUploadAccount // - this.colUploadAccount.FillWeight = 69.42599F; + this.colUploadAccount.FillWeight = 70F; this.colUploadAccount.HeaderText = "上货账户"; this.colUploadAccount.Name = "colUploadAccount"; this.colUploadAccount.ReadOnly = true; @@ -659,7 +694,7 @@ // // colBuyAccount // - this.colBuyAccount.FillWeight = 69.42599F; + this.colBuyAccount.FillWeight = 70F; this.colBuyAccount.HeaderText = "采购账户"; this.colBuyAccount.Name = "colBuyAccount"; this.colBuyAccount.ReadOnly = true; @@ -667,7 +702,7 @@ // // colChatAccount // - this.colChatAccount.FillWeight = 69.42599F; + this.colChatAccount.FillWeight = 70F; this.colChatAccount.HeaderText = "客服账户"; this.colChatAccount.Name = "colChatAccount"; this.colChatAccount.ReadOnly = true; @@ -737,7 +772,7 @@ // // colApiAuth // - this.colApiAuth.FillWeight = 69.42599F; + this.colApiAuth.FillWeight = 70F; this.colApiAuth.HeaderText = "上货授权"; this.colApiAuth.Name = "colApiAuth"; this.colApiAuth.ReadOnly = true; @@ -747,7 +782,7 @@ // // colBuyApiAuth // - this.colBuyApiAuth.FillWeight = 69.42599F; + this.colBuyApiAuth.FillWeight = 70F; this.colBuyApiAuth.HeaderText = "拍单授权"; this.colBuyApiAuth.Name = "colBuyApiAuth"; this.colBuyApiAuth.ReadOnly = true; @@ -789,31 +824,6 @@ this.colDelete.Name = "colDelete"; this.colDelete.ReadOnly = true; // - // chkAutoDrag - // - this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.chkAutoDrag.AutoSize = true; - this.chkAutoDrag.BackColor = System.Drawing.Color.White; - this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2); - this.chkAutoDrag.Name = "chkAutoDrag"; - this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); - this.chkAutoDrag.TabIndex = 3; - this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; - this.chkAutoDrag.UseVisualStyleBackColor = false; - this.chkAutoDrag.Visible = false; - this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click); - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom; - 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, -1); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1264, 29); - this.statusBar.TabIndex = 1; - // // WXShopListForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -872,10 +882,19 @@ private System.Windows.Forms.Label label4; private DevComponents.DotNetBar.PanelEx pnlEmpty; private UserComponent.UcComboBoxMutiSelect cmbNotes; + public UserControls.ButtonEx btnOpenOrder; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label5; + private UserComponent.UcComboBoxMutiSelect cmbSubAccount; + private DevComponents.DotNetBar.PanelEx btnSearch; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private UserComponent.UcComboBoxMutiSelect cmbGroup; + private System.Windows.Forms.Label label6; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName; private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName; private System.Windows.Forms.DataGridViewTextBoxColumn colCookie; @@ -896,13 +915,5 @@ private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies; private System.Windows.Forms.DataGridViewLinkColumn colEdit; private System.Windows.Forms.DataGridViewLinkColumn colDelete; - public UserControls.ButtonEx btnOpenOrder; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Label label5; - private UserComponent.UcComboBoxMutiSelect cmbSubAccount; - private DevComponents.DotNetBar.PanelEx btnSearch; - private DevComponents.DotNetBar.PanelEx btnRefreshShop; - private UserComponent.UcComboBoxMutiSelect cmbGroup; - private System.Windows.Forms.Label label6; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs index 6cf6566..e8ce63b 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs @@ -1,27 +1,22 @@ using AllBase; using AllBase.Helper; using AllBase.Model.Result; -using TemuKJD.Extension; -using TemuKJD.BaseForms; +using NaiBa.Util; using NaiBa.Util.Extension; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; +using System.Globalization; using System.IO; using System.Linq; -using System.Net; -using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using Work; -using NaiBa.Util; -using System.Globalization; +using TemuKJD.BaseForms; using TemuKJD.BLL; -using System.Diagnostics; +using TemuKJD.Extension; +using Work; //using TemuKJD.PDDForms.AdminForms; namespace TemuKJD.WXForms.ShopForms @@ -410,7 +405,7 @@ namespace TemuKJD.WXForms.ShopForms var shopList = GlobalConfig.ShopLoginList.Where(s => !string.IsNullOrEmpty(s.ShopId) || GlobalConfig.ShopLoginList.Where(ss=>ss.LoginName == s.LoginName).Count() == 1) - .OrderBy(s=>s.LoginName).ToList(); + /*.OrderBy(s=>s.LoginName)*/.ToList(); Invoke(new Action(() => { @@ -501,6 +496,7 @@ namespace TemuKJD.WXForms.ShopForms param.LoginName, param.ShopId, param.ShopAccount, + param.AddTime.ToString("yy-MM-dd HH:mm"), param.Notes, param.GroupName, param.Cookies, @@ -1055,9 +1051,15 @@ namespace TemuKJD.WXForms.ShopForms private void btnOpenOrder_Click(object sender, EventArgs e) { - WXShopLoginForm shopLoginForm = new WXShopLoginForm(new ShopLoginInfo()); + ShopLoginInfo shop = NaiBa.Util.Helper.ConfigHelper.LoadConfig("wx_dian_tong_ling_login_info"); + if (shop == null) + shop = new ShopLoginInfo(); + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.manage; shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.txtUserName.ReadOnly = false; + shopLoginForm.txtPassWord.ReadOnly = false; + shopLoginForm.btnSaveUserInfo.Visible = true; shopLoginForm.InitUrl = "https://po.e57.cn/login?redirect=%2Findex"; shopLoginForm.Show(); } diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopListForm.resx index a64552f..c6ae58b 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.resx +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.resx @@ -129,6 +129,9 @@ True + + True + True diff --git a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs index 55fd6e4..34ea3e7 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs @@ -34,6 +34,7 @@ this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx(); this.btnDel = new DevComponents.DotNetBar.PanelEx(); + this.btnSaveUserInfo = new DevComponents.DotNetBar.PanelEx(); this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); @@ -76,6 +77,7 @@ // splitContainer1.Panel2 // this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.btnSaveUserInfo); this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain); this.splitContainer1.Panel2.Controls.Add(this.label2); this.splitContainer1.Panel2.Controls.Add(this.label1); @@ -87,7 +89,7 @@ this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); this.splitContainer1.Size = new System.Drawing.Size(1438, 736); - this.splitContainer1.SplitterDistance = 671; + this.splitContainer1.SplitterDistance = 675; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -165,6 +167,31 @@ this.btnDel.Text = "删"; this.btnDel.Click += new System.EventHandler(this.btnDel_Click); // + // btnSaveUserInfo + // + this.btnSaveUserInfo.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSaveUserInfo.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSaveUserInfo.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSaveUserInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSaveUserInfo.Location = new System.Drawing.Point(338, 4); + this.btnSaveUserInfo.Name = "btnSaveUserInfo"; + this.btnSaveUserInfo.Size = new System.Drawing.Size(104, 25); + this.btnSaveUserInfo.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveUserInfo.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveUserInfo.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveUserInfo.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSaveUserInfo.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSaveUserInfo.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSaveUserInfo.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSaveUserInfo.Style.GradientAngle = 90; + this.btnSaveUserInfo.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveUserInfo.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveUserInfo.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveUserInfo.TabIndex = 466; + this.btnSaveUserInfo.Text = "保存登录信息"; + this.btnSaveUserInfo.Visible = false; + this.btnSaveUserInfo.Click += new System.EventHandler(this.btnSaveUserInfo_Click); + // // btnLoginAgain // this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -392,8 +419,6 @@ private System.Windows.Forms.SplitContainer splitContainer1; private UserControls.ButtonEx btnStop; private UserControls.ButtonEx btnReload; - private System.Windows.Forms.TextBox txtPassWord; - private System.Windows.Forms.TextBox txtUserName; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private UserControls.ButtonEx btnCopyPassword; @@ -408,5 +433,8 @@ private DevComponents.DotNetBar.PanelEx btnDel; private System.Windows.Forms.Button btnNext; private System.Windows.Forms.Button btnPrev; + public System.Windows.Forms.TextBox txtPassWord; + public System.Windows.Forms.TextBox txtUserName; + public DevComponents.DotNetBar.PanelEx btnSaveUserInfo; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs index ae6ebba..33912ab 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs @@ -409,6 +409,34 @@ namespace TemuKJD.WXForms.ShopForms currentUrl = e.Address; txtAddress.Text = e.Address; })); + + if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && shop != null && !string.IsNullOrEmpty(shop.LoginName)) + { + Task.Run(() => + { + Thread.Sleep(2000); + // var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');" + var _account = shop.LoginName; + var _password = DataOpenSSL.DecryptString(shop.Password); + + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); + + var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " + + "changeReactInputValue(usernameId,'" + _account + "');"; + var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1.Wait(1000); + Thread.Sleep(Randomx.GetId(50, 100)); + + if (!string.IsNullOrEmpty(_password)) + { + string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " + + "changeReactInputValue(passwordId,'" + _password + "');"; + var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + } + }); + } } private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e) @@ -567,184 +595,6 @@ namespace TemuKJD.WXForms.ShopForms response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); response.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); - return; - //下面代码原抖音使用,废弃 - - #region 输入用js - string jsSetValue = @" -function keyboardInput(dom, st) { - var evt = new InputEvent('input', { - //var evt = new Event('input', { // cef57 - inputType: 'insertText', - data: st, - dataTransfer: null, - isComposing: false - }); - dom.value = st; - dom.dispatchEvent(evt); - dom.focus(); -};"; - - string jsInputKey = @" -function fireKeyEvent(el, evtType, keyCode) { - var evtObj; - if (document.createEvent) - { - if (window.KeyEvent) - { - //firefox 浏览器下模拟事件 - evtObj = document.createEvent('KeyEvents'); - evtObj.initKeyEvent(evtType, true, true, window, true, false, false, false, keyCode, 0); - } - else - { - //chrome 浏览器下模拟事件 - evtObj = document.createEvent('UIEvents'); - evtObj.initUIEvent(evtType, true, true, window, 1); - - delete evtObj.keyCode; - if (typeof evtObj.keyCode === 'undefined') - { - //为了模拟keycode - Object.defineProperty(evtObj, 'keyCode', { value: keyCode }); - } - else - { - evtObj.key = String.fromCharCode(keyCode); - } - - if (typeof evtObj.ctrlKey === 'undefined') - { - //为了模拟ctrl键 - Object.defineProperty(evtObj, 'ctrlKey', { value: true }); - } - else - { - evtObj.ctrlKey = true; - } - } - el.dispatchEvent(evtObj); - } - else if (document.createEventObject) - { - //IE 浏览器下模拟事件 - evtObj = document.createEventObject(); - evtObj.keyCode = keyCode - el.fireEvent('on' + evtType, evtObj); - } -}"; - #endregion - - #region 输入用户名 - jsStr = @"var txt1 = document.getElementsByName('email')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');" - + "var uname = '" + _account + "';" - + "for(var i = 0; i < uname.length; i++) {" - + " cCode = uname.charCodeAt(i);" - + " fireKeyEvent(txt1, 'keydown', cCode);" - + " fireKeyEvent(txt1, 'keypress', cCode);" - + " fireKeyEvent(txt1, 'keyup', cCode);" - + "}"; - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsSetValue + jsInputKey + jsStr); - response.Wait(2000); - Thread.Sleep(Randomx.GetId(400, 800)); - #endregion - - #region 输入密码 - jsStr = @"var txt2 = document.getElementsByName('password')[0]; txt2.focus(); txt2.click(); keyboardInput(txt2, '" + _password + "');" - + "var pwd = '" + _password + "';" - + "for(var i = 0; i < pwd.length; i++) {" - + " cCode = pwd.charCodeAt(i);" - + " fireKeyEvent(txt2, 'keydown', cCode);" - + " fireKeyEvent(txt2, 'keypress', cCode);" - + " fireKeyEvent(txt2, 'keyup', cCode);" - + "}"; - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsInputKey + jsStr); - response.Wait(2000); - Thread.Sleep(Randomx.GetId(400, 800)); - #endregion - - #region 点击登录按钮 - jsStr = "var btn = document.getElementsByClassName('account-center-action-button')[0]; btn.click(); //btn.dispatchEvent(new Event('change'));"; - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); - response.Wait(2000); - Thread.Sleep(1500 + Randomx.GetId(1000)); - #endregion - - #region 获取验证码 - int getImageCount = 0; - getImageAgain: - if (!this.Created) - return; - - jsStr = "function getImg() { return document.getElementsByClassName('captcha_verify_img--wrapper')[0].innerHTML; }"; - jsStr += "getImg();"; - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); - response.Wait(2000); - if (response.Result?.Result == null) - { - if (getImageCount < 50) - { - Thread.Sleep(2500); - getImageCount++; - goto getImageAgain; - } - } - if (response.Result?.Result != null) - { - var imgStr = response.Result.Result.ToString(); - var src = BaseRegex.GetMatchRegexString(ref imgStr, "src=\"([\\s\\S]*?)\""); - Bitmap bt = (Bitmap)GetHtml.LoadImage(src); - if (bt != null) - { - int Stopxt = 0; - int dragButtonWidth = 53; - //Stopxt = new Base64ChangeImgUrl().CalculateNick(bt, dragButtonWidth); - Thread.Sleep(500 + Randomx.GetId(1000)); - Stopxt = new Base64ChangeImgUrl().CalculateNickNew(bt, dragButtonWidth); - if (Stopxt > 0) - { - jsStr = "function getImgPos() { return document.getElementsByClassName('secsdk-captcha-drag-icon')[0].getBoundingClientRect().left + '|' " - + " + document.getElementsByClassName('secsdk-captcha-drag-icon')[0].getBoundingClientRect().top;} getImgPos();"; - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); - response.Wait(2000); - if (response.Result?.Result != null) - { - var xy = response.Result?.Result.ToString(); - var xyArr = xy.Split('|'); - if (xyArr.Length == 2) - { - try - { - int x = (int)Convert.ToDecimal(xyArr[0]) + 25; - int y = (int)Convert.ToDecimal(xyArr[1]) + 25; - - // 自动滑块图形验证 - if (GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) - { - WXShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); - for (int i = 0; i < 1; i++) - Thread.Sleep(2000 + Randomx.GetId(1000)); - response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); - response.Wait(2000); - if (response.Result?.Result != null && getImageCount < 50) - { - getImageCount++; - goto getImageAgain; - } - } - } - catch - { - } - } - } - for (int i = 0; i < 1; i++) - Thread.Sleep(2000 + Randomx.GetId(1000)); - } - } - } - Thread.Sleep(1500 + Randomx.GetId(1000)); - #endregion } // 鼠标左键按下,移动,移动...左键抬起。 @@ -963,5 +813,41 @@ function getElementWithText(sText) { cefWebBrowser.Forward(); } + + private void btnSaveUserInfo_Click(object sender, EventArgs e) + { + if (shop == null) + return; + + shop.LoginName = this.txtUserName.Text; + shop.Password = DataOpenSSL.EncryptString(this.txtPassWord.Text); + + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_dian_tong_ling_login_info", shop); + + Task.Run(() => + { + Thread.Sleep(100); + // var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');" + var _account = shop.LoginName; + var _password = DataOpenSSL.DecryptString(shop.Password); + + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); + + var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " + + "changeReactInputValue(usernameId,'" + _account + "');"; + var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1.Wait(1000); + Thread.Sleep(Randomx.GetId(50, 100)); + + if (!string.IsNullOrEmpty(_password)) + { + string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " + + "changeReactInputValue(passwordId,'" + _password + "');"; + var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + } + }); + } } } diff --git a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.Designer.cs index 1509ec2..c925f51 100644 --- a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.Designer.cs @@ -34,12 +34,15 @@ namespace TemuKJD.WXForms.ShopForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.cmbFilterShopNotes = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); + this.label18 = new System.Windows.Forms.Label(); + this.txtFilterShopName = new System.Windows.Forms.TextBox(); + this.label19 = new System.Windows.Forms.Label(); this.pnlClear = new DevComponents.DotNetBar.PanelEx(); + this.btnGetSelect = new DevComponents.DotNetBar.PanelEx(); this.pnlFliter = new DevComponents.DotNetBar.PanelEx(); - this.textBox1 = new System.Windows.Forms.TextBox(); this.btnSetColumn = new DevComponents.DotNetBar.PanelEx(); this.btnGetNotGet = new DevComponents.DotNetBar.PanelEx(); - this.btnGetSelect = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label17 = new System.Windows.Forms.Label(); @@ -62,7 +65,7 @@ namespace TemuKJD.WXForms.ShopForms this.label9 = new System.Windows.Forms.Label(); this.lblPay = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); - this.lblAvailableBalance = new System.Windows.Forms.Label(); + this.lblAvailableAmount = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.lblPunish = new System.Windows.Forms.Label(); @@ -72,10 +75,10 @@ namespace TemuKJD.WXForms.ShopForms this.label3 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); - this.lblWithdrawCashAmount = new System.Windows.Forms.Label(); - this.lblMallDepositLimitAmount = new System.Windows.Forms.Label(); + this.lblPendingAmount = new System.Windows.Forms.Label(); + this.lblDepositBalance = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); + this.lblTotalAmount = new System.Windows.Forms.Label(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.Panel(); @@ -105,10 +108,10 @@ namespace TemuKJD.WXForms.ShopForms this.colShipErr = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAfterSale = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colPunish = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colAvailableBalance = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colBalance = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colBond = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colTotalAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAvailableAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPendingAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDepositBalance = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); @@ -144,7 +147,7 @@ namespace TemuKJD.WXForms.ShopForms // this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4); - this.splitContainer1.Size = new System.Drawing.Size(1623, 450); + this.splitContainer1.Size = new System.Drawing.Size(1446, 450); this.splitContainer1.SplitterDistance = 140; this.splitContainer1.TabIndex = 35; // @@ -154,28 +157,73 @@ namespace TemuKJD.WXForms.ShopForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx3.Controls.Add(this.cmbFilterShopNotes); + this.ucGroupBoxEx3.Controls.Add(this.label18); + this.ucGroupBoxEx3.Controls.Add(this.txtFilterShopName); + this.ucGroupBoxEx3.Controls.Add(this.label19); this.ucGroupBoxEx3.Controls.Add(this.pnlClear); + this.ucGroupBoxEx3.Controls.Add(this.btnGetSelect); this.ucGroupBoxEx3.Controls.Add(this.pnlFliter); - this.ucGroupBoxEx3.Controls.Add(this.textBox1); this.ucGroupBoxEx3.Controls.Add(this.btnSetColumn); this.ucGroupBoxEx3.Controls.Add(this.btnGetNotGet); - this.ucGroupBoxEx3.Controls.Add(this.btnGetSelect); - this.ucGroupBoxEx3.Location = new System.Drawing.Point(1390, 2); + this.ucGroupBoxEx3.Location = new System.Drawing.Point(1213, 2); this.ucGroupBoxEx3.Name = "ucGroupBoxEx3"; this.ucGroupBoxEx3.Size = new System.Drawing.Size(230, 140); this.ucGroupBoxEx3.TabIndex = 668; this.ucGroupBoxEx3.TabStop = false; this.ucGroupBoxEx3.Text = "统计查询"; // + // cmbFilterShopNotes + // + this.cmbFilterShopNotes.DefaultText = "全部"; + this.cmbFilterShopNotes.DropDownHeight = 1; + this.cmbFilterShopNotes.DropDownWidth = 1; + this.cmbFilterShopNotes.FormattingEnabled = true; + this.cmbFilterShopNotes.IntegralHeight = false; + this.cmbFilterShopNotes.Location = new System.Drawing.Point(47, 49); + this.cmbFilterShopNotes.Name = "cmbFilterShopNotes"; + this.cmbFilterShopNotes.Size = new System.Drawing.Size(130, 25); + this.cmbFilterShopNotes.TabIndex = 831; + this.cmbFilterShopNotes.Text = "全部"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(16, 53); + this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(32, 17); + this.label18.TabIndex = 833; + this.label18.Text = "备注"; + // + // txtFilterShopName + // + this.txtFilterShopName.Font = new System.Drawing.Font("微软雅黑", 10F); + this.txtFilterShopName.Location = new System.Drawing.Point(47, 21); + this.txtFilterShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtFilterShopName.Name = "txtFilterShopName"; + this.txtFilterShopName.Size = new System.Drawing.Size(130, 25); + this.txtFilterShopName.TabIndex = 832; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(16, 25); + this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(32, 17); + this.label19.TabIndex = 834; + this.label19.Text = "名称"; + // // pnlClear // this.pnlClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pnlClear.CanvasColor = System.Drawing.SystemColors.Control; this.pnlClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.pnlClear.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlClear.Location = new System.Drawing.Point(180, 31); + this.pnlClear.Location = new System.Drawing.Point(180, 49); this.pnlClear.Name = "pnlClear"; - this.pnlClear.Size = new System.Drawing.Size(35, 23); + this.pnlClear.Size = new System.Drawing.Size(35, 25); this.pnlClear.Style.Alignment = System.Drawing.StringAlignment.Center; this.pnlClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.pnlClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -190,6 +238,32 @@ namespace TemuKJD.WXForms.ShopForms this.pnlClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.pnlClear.TabIndex = 815; this.pnlClear.Text = "还原"; + this.pnlClear.Click += new System.EventHandler(this.pnlClear_Click); + // + // btnGetSelect + // + this.btnGetSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnGetSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetSelect.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnGetSelect.DisabledBackColor = System.Drawing.Color.Empty; + this.btnGetSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGetSelect.Location = new System.Drawing.Point(112, 108); + this.btnGetSelect.Name = "btnGetSelect"; + this.btnGetSelect.Size = new System.Drawing.Size(103, 23); + this.btnGetSelect.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnGetSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnGetSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnGetSelect.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnGetSelect.Style.GradientAngle = 90; + this.btnGetSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetSelect.TabIndex = 427; + this.btnGetSelect.Text = "查询选中"; + this.btnGetSelect.Click += new System.EventHandler(this.btnGetSelect_Click); // // pnlFliter // @@ -198,9 +272,9 @@ namespace TemuKJD.WXForms.ShopForms this.pnlFliter.Cursor = System.Windows.Forms.Cursors.Hand; this.pnlFliter.DisabledBackColor = System.Drawing.Color.Empty; this.pnlFliter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.pnlFliter.Location = new System.Drawing.Point(142, 31); + this.pnlFliter.Location = new System.Drawing.Point(180, 21); this.pnlFliter.Name = "pnlFliter"; - this.pnlFliter.Size = new System.Drawing.Size(35, 23); + this.pnlFliter.Size = new System.Drawing.Size(35, 25); this.pnlFliter.Style.Alignment = System.Drawing.StringAlignment.Center; this.pnlFliter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.pnlFliter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -214,15 +288,7 @@ namespace TemuKJD.WXForms.ShopForms this.pnlFliter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.pnlFliter.TabIndex = 435; this.pnlFliter.Text = "过滤"; - // - // textBox1 - // - this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBox1.Location = new System.Drawing.Point(21, 31); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(118, 23); - this.textBox1.TabIndex = 811; + this.pnlFliter.Click += new System.EventHandler(this.pnlFliter_Click); // // btnSetColumn // @@ -230,7 +296,7 @@ namespace TemuKJD.WXForms.ShopForms this.btnSetColumn.CanvasColor = System.Drawing.SystemColors.Control; this.btnSetColumn.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnSetColumn.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSetColumn.Location = new System.Drawing.Point(21, 97); + this.btnSetColumn.Location = new System.Drawing.Point(21, 108); this.btnSetColumn.Name = "btnSetColumn"; this.btnSetColumn.Size = new System.Drawing.Size(74, 23); this.btnSetColumn.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -256,9 +322,9 @@ namespace TemuKJD.WXForms.ShopForms this.btnGetNotGet.Cursor = System.Windows.Forms.Cursors.Hand; this.btnGetNotGet.DisabledBackColor = System.Drawing.Color.Empty; this.btnGetNotGet.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnGetNotGet.Location = new System.Drawing.Point(142, 66); + this.btnGetNotGet.Location = new System.Drawing.Point(112, 82); this.btnGetNotGet.Name = "btnGetNotGet"; - this.btnGetNotGet.Size = new System.Drawing.Size(74, 23); + this.btnGetNotGet.Size = new System.Drawing.Size(103, 23); this.btnGetNotGet.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnGetNotGet.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnGetNotGet.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -271,32 +337,8 @@ namespace TemuKJD.WXForms.ShopForms this.btnGetNotGet.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnGetNotGet.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnGetNotGet.TabIndex = 431; - this.btnGetNotGet.Text = "查询未获取"; - // - // btnGetSelect - // - this.btnGetSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnGetSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnGetSelect.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnGetSelect.DisabledBackColor = System.Drawing.Color.Empty; - this.btnGetSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnGetSelect.Location = new System.Drawing.Point(142, 97); - this.btnGetSelect.Name = "btnGetSelect"; - this.btnGetSelect.Size = new System.Drawing.Size(74, 23); - this.btnGetSelect.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnGetSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnGetSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnGetSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnGetSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnGetSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnGetSelect.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnGetSelect.Style.GradientAngle = 90; - this.btnGetSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnGetSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnGetSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnGetSelect.TabIndex = 427; - this.btnGetSelect.Text = "查询选中"; - this.btnGetSelect.Click += new System.EventHandler(this.btnGetSelect_Click); + this.btnGetNotGet.Text = "查询今日未查询"; + this.btnGetNotGet.Click += new System.EventHandler(this.btnGetNotGet_Click); // // ucGroupBoxEx1 // @@ -308,7 +350,7 @@ namespace TemuKJD.WXForms.ShopForms this.ucGroupBoxEx1.Controls.Add(this.tableLayoutPanel1); this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(1388, 140); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(1211, 140); this.ucGroupBoxEx1.TabIndex = 667; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "统计汇总"; @@ -348,7 +390,7 @@ namespace TemuKJD.WXForms.ShopForms this.tableLayoutPanel1.Controls.Add(this.label9, 3, 0); this.tableLayoutPanel1.Controls.Add(this.lblPay, 3, 1); this.tableLayoutPanel1.Controls.Add(this.label11, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.lblAvailableBalance, 5, 3); + this.tableLayoutPanel1.Controls.Add(this.lblAvailableAmount, 5, 3); this.tableLayoutPanel1.Controls.Add(this.label7, 5, 2); this.tableLayoutPanel1.Controls.Add(this.label5, 3, 2); this.tableLayoutPanel1.Controls.Add(this.lblPunish, 3, 3); @@ -358,10 +400,10 @@ namespace TemuKJD.WXForms.ShopForms this.tableLayoutPanel1.Controls.Add(this.label3, 1, 2); this.tableLayoutPanel1.Controls.Add(this.label14, 0, 2); this.tableLayoutPanel1.Controls.Add(this.label8, 6, 2); - this.tableLayoutPanel1.Controls.Add(this.lblWithdrawCashAmount, 6, 3); - this.tableLayoutPanel1.Controls.Add(this.lblMallDepositLimitAmount, 7, 3); + this.tableLayoutPanel1.Controls.Add(this.lblPendingAmount, 6, 3); + this.tableLayoutPanel1.Controls.Add(this.lblDepositBalance, 7, 3); this.tableLayoutPanel1.Controls.Add(this.label6, 7, 2); - this.tableLayoutPanel1.Controls.Add(this.label18, 4, 3); + this.tableLayoutPanel1.Controls.Add(this.lblTotalAmount, 4, 3); this.tableLayoutPanel1.Location = new System.Drawing.Point(31, 19); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; @@ -369,7 +411,7 @@ namespace TemuKJD.WXForms.ShopForms this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1345, 115); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1168, 115); this.tableLayoutPanel1.TabIndex = 435; // // label17 @@ -377,7 +419,7 @@ namespace TemuKJD.WXForms.ShopForms this.label17.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label17.AutoSize = true; this.label17.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label17.Location = new System.Drawing.Point(599, 60); + this.label17.Location = new System.Drawing.Point(519, 60); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(80, 17); this.label17.TabIndex = 25; @@ -388,7 +430,7 @@ namespace TemuKJD.WXForms.ShopForms this.label16.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label16.AutoSize = true; this.label16.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label16.Location = new System.Drawing.Point(1195, 3); + this.label16.Location = new System.Drawing.Point(1035, 3); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(94, 17); this.label16.TabIndex = 24; @@ -399,7 +441,7 @@ namespace TemuKJD.WXForms.ShopForms this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label15.AutoSize = true; this.label15.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label15.Location = new System.Drawing.Point(1046, 3); + this.label15.Location = new System.Drawing.Point(906, 3); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(87, 17); this.label15.TabIndex = 23; @@ -410,7 +452,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPayRefund30.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPayRefund30.AutoSize = true; this.lblPayRefund30.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPayRefund30.Location = new System.Drawing.Point(1195, 30); + this.lblPayRefund30.Location = new System.Drawing.Point(1035, 30); this.lblPayRefund30.Name = "lblPayRefund30"; this.lblPayRefund30.Size = new System.Drawing.Size(18, 20); this.lblPayRefund30.TabIndex = 21; @@ -421,7 +463,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPayRefund7.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPayRefund7.AutoSize = true; this.lblPayRefund7.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPayRefund7.Location = new System.Drawing.Point(1046, 30); + this.lblPayRefund7.Location = new System.Drawing.Point(906, 30); this.lblPayRefund7.Name = "lblPayRefund7"; this.lblPayRefund7.Size = new System.Drawing.Size(18, 20); this.lblPayRefund7.TabIndex = 20; @@ -432,7 +474,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPayRefund.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPayRefund.AutoSize = true; this.lblPayRefund.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPayRefund.Location = new System.Drawing.Point(897, 30); + this.lblPayRefund.Location = new System.Drawing.Point(777, 30); this.lblPayRefund.Name = "lblPayRefund"; this.lblPayRefund.Size = new System.Drawing.Size(18, 20); this.lblPayRefund.TabIndex = 19; @@ -443,7 +485,7 @@ namespace TemuKJD.WXForms.ShopForms this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label13.AutoSize = true; this.label13.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label13.Location = new System.Drawing.Point(897, 3); + this.label13.Location = new System.Drawing.Point(777, 3); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(80, 17); this.label13.TabIndex = 15; @@ -465,7 +507,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPayCnt30.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPayCnt30.AutoSize = true; this.lblPayCnt30.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPayCnt30.Location = new System.Drawing.Point(301, 30); + this.lblPayCnt30.Location = new System.Drawing.Point(261, 30); this.lblPayCnt30.Name = "lblPayCnt30"; this.lblPayCnt30.Size = new System.Drawing.Size(18, 20); this.lblPayCnt30.TabIndex = 16; @@ -476,7 +518,7 @@ namespace TemuKJD.WXForms.ShopForms this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label12.AutoSize = true; this.label12.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label12.Location = new System.Drawing.Point(748, 3); + this.label12.Location = new System.Drawing.Point(648, 3); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(94, 17); this.label12.TabIndex = 8; @@ -487,7 +529,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPayCnt7.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPayCnt7.AutoSize = true; this.lblPayCnt7.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPayCnt7.Location = new System.Drawing.Point(152, 30); + this.lblPayCnt7.Location = new System.Drawing.Point(132, 30); this.lblPayCnt7.Name = "lblPayCnt7"; this.lblPayCnt7.Size = new System.Drawing.Size(18, 20); this.lblPayCnt7.TabIndex = 15; @@ -498,7 +540,7 @@ namespace TemuKJD.WXForms.ShopForms this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label2.AutoSize = true; this.label2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label2.Location = new System.Drawing.Point(152, 3); + this.label2.Location = new System.Drawing.Point(132, 3); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(63, 17); this.label2.TabIndex = 7; @@ -531,7 +573,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPay30.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPay30.AutoSize = true; this.lblPay30.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPay30.Location = new System.Drawing.Point(748, 30); + this.lblPay30.Location = new System.Drawing.Point(648, 30); this.lblPay30.Name = "lblPay30"; this.lblPay30.Size = new System.Drawing.Size(18, 20); this.lblPay30.TabIndex = 18; @@ -542,7 +584,7 @@ namespace TemuKJD.WXForms.ShopForms this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label10.AutoSize = true; this.label10.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label10.Location = new System.Drawing.Point(599, 3); + this.label10.Location = new System.Drawing.Point(519, 3); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(87, 17); this.label10.TabIndex = 13; @@ -553,7 +595,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPay7.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPay7.AutoSize = true; this.lblPay7.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPay7.Location = new System.Drawing.Point(599, 30); + this.lblPay7.Location = new System.Drawing.Point(519, 30); this.lblPay7.Name = "lblPay7"; this.lblPay7.Size = new System.Drawing.Size(18, 20); this.lblPay7.TabIndex = 17; @@ -564,7 +606,7 @@ namespace TemuKJD.WXForms.ShopForms this.label9.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label9.AutoSize = true; this.label9.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label9.Location = new System.Drawing.Point(450, 3); + this.label9.Location = new System.Drawing.Point(390, 3); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(80, 17); this.label9.TabIndex = 14; @@ -575,7 +617,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPay.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPay.AutoSize = true; this.lblPay.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPay.Location = new System.Drawing.Point(450, 30); + this.lblPay.Location = new System.Drawing.Point(390, 30); this.lblPay.Name = "lblPay"; this.lblPay.Size = new System.Drawing.Size(18, 20); this.lblPay.TabIndex = 16; @@ -586,29 +628,29 @@ namespace TemuKJD.WXForms.ShopForms this.label11.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label11.AutoSize = true; this.label11.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label11.Location = new System.Drawing.Point(301, 3); + this.label11.Location = new System.Drawing.Point(261, 3); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(70, 17); this.label11.TabIndex = 14; this.label11.Text = "近30日订单"; // - // lblAvailableBalance + // lblAvailableAmount // - this.lblAvailableBalance.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblAvailableBalance.AutoSize = true; - this.lblAvailableBalance.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblAvailableBalance.Location = new System.Drawing.Point(748, 87); - this.lblAvailableBalance.Name = "lblAvailableBalance"; - this.lblAvailableBalance.Size = new System.Drawing.Size(18, 20); - this.lblAvailableBalance.TabIndex = 15; - this.lblAvailableBalance.Text = "0"; + this.lblAvailableAmount.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblAvailableAmount.AutoSize = true; + this.lblAvailableAmount.Font = new System.Drawing.Font("微软雅黑", 11F); + this.lblAvailableAmount.Location = new System.Drawing.Point(648, 87); + this.lblAvailableAmount.Name = "lblAvailableAmount"; + this.lblAvailableAmount.Size = new System.Drawing.Size(18, 20); + this.lblAvailableAmount.TabIndex = 15; + this.lblAvailableAmount.Text = "0"; // // label7 // this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label7.AutoSize = true; this.label7.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label7.Location = new System.Drawing.Point(748, 60); + this.label7.Location = new System.Drawing.Point(648, 60); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(92, 17); this.label7.TabIndex = 12; @@ -619,7 +661,7 @@ namespace TemuKJD.WXForms.ShopForms this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label5.AutoSize = true; this.label5.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label5.Location = new System.Drawing.Point(450, 60); + this.label5.Location = new System.Drawing.Point(390, 60); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(56, 17); this.label5.TabIndex = 10; @@ -630,7 +672,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblPunish.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPunish.AutoSize = true; this.lblPunish.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblPunish.Location = new System.Drawing.Point(450, 87); + this.lblPunish.Location = new System.Drawing.Point(390, 87); this.lblPunish.Name = "lblPunish"; this.lblPunish.Size = new System.Drawing.Size(18, 20); this.lblPunish.TabIndex = 15; @@ -641,7 +683,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblAfterSaleAll.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblAfterSaleAll.AutoSize = true; this.lblAfterSaleAll.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblAfterSaleAll.Location = new System.Drawing.Point(301, 87); + this.lblAfterSaleAll.Location = new System.Drawing.Point(261, 87); this.lblAfterSaleAll.Name = "lblAfterSaleAll"; this.lblAfterSaleAll.Size = new System.Drawing.Size(18, 20); this.lblAfterSaleAll.TabIndex = 15; @@ -652,7 +694,7 @@ namespace TemuKJD.WXForms.ShopForms this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label4.AutoSize = true; this.label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label4.Location = new System.Drawing.Point(301, 60); + this.label4.Location = new System.Drawing.Point(261, 60); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(32, 17); this.label4.TabIndex = 9; @@ -663,7 +705,7 @@ namespace TemuKJD.WXForms.ShopForms this.lblWaybillError.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblWaybillError.AutoSize = true; this.lblWaybillError.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblWaybillError.Location = new System.Drawing.Point(152, 87); + this.lblWaybillError.Location = new System.Drawing.Point(132, 87); this.lblWaybillError.Name = "lblWaybillError"; this.lblWaybillError.Size = new System.Drawing.Size(18, 20); this.lblWaybillError.TabIndex = 15; @@ -674,7 +716,7 @@ namespace TemuKJD.WXForms.ShopForms this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label3.AutoSize = true; this.label3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label3.Location = new System.Drawing.Point(152, 60); + this.label3.Location = new System.Drawing.Point(132, 60); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(56, 17); this.label3.TabIndex = 8; @@ -696,55 +738,55 @@ namespace TemuKJD.WXForms.ShopForms this.label8.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label8.AutoSize = true; this.label8.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label8.Location = new System.Drawing.Point(897, 60); + this.label8.Location = new System.Drawing.Point(777, 60); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(92, 17); this.label8.TabIndex = 13; this.label8.Text = "待结算金额总和"; // - // lblWithdrawCashAmount + // lblPendingAmount // - this.lblWithdrawCashAmount.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblWithdrawCashAmount.AutoSize = true; - this.lblWithdrawCashAmount.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblWithdrawCashAmount.Location = new System.Drawing.Point(897, 87); - this.lblWithdrawCashAmount.Name = "lblWithdrawCashAmount"; - this.lblWithdrawCashAmount.Size = new System.Drawing.Size(18, 20); - this.lblWithdrawCashAmount.TabIndex = 15; - this.lblWithdrawCashAmount.Text = "0"; + this.lblPendingAmount.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblPendingAmount.AutoSize = true; + this.lblPendingAmount.Font = new System.Drawing.Font("微软雅黑", 11F); + this.lblPendingAmount.Location = new System.Drawing.Point(777, 87); + this.lblPendingAmount.Name = "lblPendingAmount"; + this.lblPendingAmount.Size = new System.Drawing.Size(18, 20); + this.lblPendingAmount.TabIndex = 15; + this.lblPendingAmount.Text = "0"; // - // lblMallDepositLimitAmount + // lblDepositBalance // - this.lblMallDepositLimitAmount.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblMallDepositLimitAmount.AutoSize = true; - this.lblMallDepositLimitAmount.Font = new System.Drawing.Font("微软雅黑", 11F); - this.lblMallDepositLimitAmount.Location = new System.Drawing.Point(1046, 87); - this.lblMallDepositLimitAmount.Name = "lblMallDepositLimitAmount"; - this.lblMallDepositLimitAmount.Size = new System.Drawing.Size(18, 20); - this.lblMallDepositLimitAmount.TabIndex = 15; - this.lblMallDepositLimitAmount.Text = "0"; + this.lblDepositBalance.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblDepositBalance.AutoSize = true; + this.lblDepositBalance.Font = new System.Drawing.Font("微软雅黑", 11F); + this.lblDepositBalance.Location = new System.Drawing.Point(906, 87); + this.lblDepositBalance.Name = "lblDepositBalance"; + this.lblDepositBalance.Size = new System.Drawing.Size(18, 20); + this.lblDepositBalance.TabIndex = 15; + this.lblDepositBalance.Text = "0"; // // label6 // this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label6.AutoSize = true; this.label6.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label6.Location = new System.Drawing.Point(1046, 60); + this.label6.Location = new System.Drawing.Point(906, 60); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(92, 17); this.label6.TabIndex = 11; this.label6.Text = "保证金金额总和"; // - // label18 + // lblTotalAmount // - this.label18.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label18.AutoSize = true; - this.label18.Font = new System.Drawing.Font("微软雅黑", 11F); - this.label18.Location = new System.Drawing.Point(599, 87); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(18, 20); - this.label18.TabIndex = 26; - this.label18.Text = "0"; + this.lblTotalAmount.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblTotalAmount.AutoSize = true; + this.lblTotalAmount.Font = new System.Drawing.Font("微软雅黑", 11F); + this.lblTotalAmount.Location = new System.Drawing.Point(519, 87); + this.lblTotalAmount.Name = "lblTotalAmount"; + this.lblTotalAmount.Size = new System.Drawing.Size(18, 20); + this.lblTotalAmount.TabIndex = 26; + this.lblTotalAmount.Text = "0"; // // splitContainer2 // @@ -766,7 +808,7 @@ namespace TemuKJD.WXForms.ShopForms // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.statusBar); - this.splitContainer2.Size = new System.Drawing.Size(1623, 306); + this.splitContainer2.Size = new System.Drawing.Size(1446, 306); this.splitContainer2.SplitterDistance = 276; this.splitContainer2.TabIndex = 0; // @@ -774,7 +816,7 @@ namespace TemuKJD.WXForms.ShopForms // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(786, 113); + this.pbLoading.Location = new System.Drawing.Point(698, 113); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -791,7 +833,7 @@ namespace TemuKJD.WXForms.ShopForms this.panel1.Controls.Add(this.flowLayoutPanel1); this.panel1.Location = new System.Drawing.Point(98, 65); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1427, 134); + this.panel1.Size = new System.Drawing.Size(1250, 134); this.panel1.TabIndex = 9; this.panel1.Visible = false; // @@ -802,7 +844,7 @@ namespace TemuKJD.WXForms.ShopForms this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand; this.btnClose.DisabledBackColor = System.Drawing.Color.Empty; this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClose.Location = new System.Drawing.Point(1338, 98); + this.btnClose.Location = new System.Drawing.Point(1161, 98); this.btnClose.Name = "btnClose"; this.btnClose.Size = new System.Drawing.Size(58, 23); this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -826,7 +868,7 @@ namespace TemuKJD.WXForms.ShopForms | System.Windows.Forms.AnchorStyles.Right))); this.flowLayoutPanel1.Location = new System.Drawing.Point(24, 17); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(1372, 75); + this.flowLayoutPanel1.Size = new System.Drawing.Size(1195, 75); this.flowLayoutPanel1.TabIndex = 8; // // dgvShop @@ -871,17 +913,17 @@ namespace TemuKJD.WXForms.ShopForms this.colShipErr, this.colAfterSale, this.colPunish, - this.colAmount, - this.colAvailableBalance, - this.colBalance, - this.colBond}); + this.colTotalAmount, + this.colAvailableAmount, + this.colPendingAmount, + this.colDepositBalance}); this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvShop.Location = new System.Drawing.Point(4, 0); this.dgvShop.Name = "dgvShop"; this.dgvShop.ReadOnly = true; this.dgvShop.RowHeadersWidth = 36; this.dgvShop.RowTemplate.Height = 23; - this.dgvShop.Size = new System.Drawing.Size(1615, 276); + this.dgvShop.Size = new System.Drawing.Size(1438, 276); this.dgvShop.TabIndex = 5; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // @@ -932,11 +974,9 @@ namespace TemuKJD.WXForms.ShopForms // // colShopAccount // - this.colShopAccount.FillWeight = 70F; this.colShopAccount.HeaderText = "店铺名称"; this.colShopAccount.Name = "colShopAccount"; this.colShopAccount.ReadOnly = true; - this.colShopAccount.Width = 68; // // colNotes // @@ -1065,34 +1105,34 @@ namespace TemuKJD.WXForms.ShopForms this.colPunish.ReadOnly = true; this.colPunish.Width = 62; // - // colAmount + // colTotalAmount // - this.colAmount.HeaderText = "货款金额"; - this.colAmount.Name = "colAmount"; - this.colAmount.ReadOnly = true; - this.colAmount.Width = 62; + this.colTotalAmount.HeaderText = "货款金额"; + this.colTotalAmount.Name = "colTotalAmount"; + this.colTotalAmount.ReadOnly = true; + this.colTotalAmount.Width = 62; // - // colAvailableBalance + // colAvailableAmount // - this.colAvailableBalance.HeaderText = "可提现余额"; - this.colAvailableBalance.Name = "colAvailableBalance"; - this.colAvailableBalance.ReadOnly = true; - this.colAvailableBalance.Width = 80; + this.colAvailableAmount.HeaderText = "可提现余额"; + this.colAvailableAmount.Name = "colAvailableAmount"; + this.colAvailableAmount.ReadOnly = true; + this.colAvailableAmount.Width = 80; // - // colBalance + // colPendingAmount // - this.colBalance.HeaderText = "待结算金额"; - this.colBalance.Name = "colBalance"; - this.colBalance.ReadOnly = true; - this.colBalance.Width = 80; + this.colPendingAmount.HeaderText = "待结算金额"; + this.colPendingAmount.Name = "colPendingAmount"; + this.colPendingAmount.ReadOnly = true; + this.colPendingAmount.Width = 80; // - // colBond + // colDepositBalance // - this.colBond.FillWeight = 75F; - this.colBond.HeaderText = "保证金"; - this.colBond.Name = "colBond"; - this.colBond.ReadOnly = true; - this.colBond.Width = 54; + this.colDepositBalance.FillWeight = 75F; + this.colDepositBalance.HeaderText = "保证金"; + this.colDepositBalance.Name = "colDepositBalance"; + this.colDepositBalance.ReadOnly = true; + this.colDepositBalance.Width = 54; // // statusBar // @@ -1102,13 +1142,13 @@ namespace TemuKJD.WXForms.ShopForms 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(1623, 26); + this.statusBar.Size = new System.Drawing.Size(1446, 26); this.statusBar.TabIndex = 1; // // WxShopStatisticsForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(1623, 450); + this.ClientSize = new System.Drawing.Size(1446, 450); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "WxShopStatisticsForm"; @@ -1141,7 +1181,6 @@ namespace TemuKJD.WXForms.ShopForms private UserComponent.UcGroupBoxEx ucGroupBoxEx3; private DevComponents.DotNetBar.PanelEx pnlClear; private DevComponents.DotNetBar.PanelEx pnlFliter; - private System.Windows.Forms.TextBox textBox1; private DevComponents.DotNetBar.PanelEx btnSetColumn; private DevComponents.DotNetBar.PanelEx btnGetNotGet; private DevComponents.DotNetBar.PanelEx btnGetSelect; @@ -1161,11 +1200,11 @@ namespace TemuKJD.WXForms.ShopForms private System.Windows.Forms.Label lblPay; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label lblWithdrawCashAmount; - private System.Windows.Forms.Label lblAvailableBalance; + private System.Windows.Forms.Label lblPendingAmount; + private System.Windows.Forms.Label lblAvailableAmount; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label lblMallDepositLimitAmount; + private System.Windows.Forms.Label lblDepositBalance; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label lblPunish; private System.Windows.Forms.Label label14; @@ -1183,7 +1222,7 @@ namespace TemuKJD.WXForms.ShopForms private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label lblTotalAmount; private System.Windows.Forms.Label lblAfterSaleAll; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label lblWaybillError; @@ -1211,9 +1250,13 @@ namespace TemuKJD.WXForms.ShopForms private System.Windows.Forms.DataGridViewTextBoxColumn colShipErr; private System.Windows.Forms.DataGridViewTextBoxColumn colAfterSale; private System.Windows.Forms.DataGridViewTextBoxColumn colPunish; - private System.Windows.Forms.DataGridViewTextBoxColumn colAmount; - private System.Windows.Forms.DataGridViewTextBoxColumn colAvailableBalance; - private System.Windows.Forms.DataGridViewTextBoxColumn colBalance; - private System.Windows.Forms.DataGridViewTextBoxColumn colBond; + private System.Windows.Forms.DataGridViewTextBoxColumn colTotalAmount; + private System.Windows.Forms.DataGridViewTextBoxColumn colAvailableAmount; + private System.Windows.Forms.DataGridViewTextBoxColumn colPendingAmount; + private System.Windows.Forms.DataGridViewTextBoxColumn colDepositBalance; + private UserComponent.UcComboBoxMutiSelect cmbFilterShopNotes; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.TextBox txtFilterShopName; + private System.Windows.Forms.Label label19; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs index 0fa0338..1641e9c 100644 --- a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs @@ -1,4 +1,5 @@ using AllBase; +using AllBase.Extension; using AllBase.Helper; using AllBase.Model.Config; using AllBase.Model.Result; @@ -11,11 +12,13 @@ using System.Data; using System.Drawing; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using TemuKJD.BLL; using TemuKJD.KJDForms.ShopForms; using TemuKJD.UserComponent; +using TemuKJD.WXForms.ProductForms; namespace TemuKJD.WXForms.ShopForms { @@ -34,13 +37,17 @@ namespace TemuKJD.WXForms.ShopForms foreach(DataGridViewColumn column in dgvShop.Columns) { - if (!string.IsNullOrEmpty(column.HeaderText) && column.HeaderText != "店铺登录号码") + if (!string.IsNullOrEmpty(column.HeaderText) && column.HeaderText != "店铺登录号码" && column.HeaderText != "详情") { var chk = new UcCheckBox() { Name = "chk" + column.Name, Tag = column.Name, Text = column.HeaderText, Checked = column.Visible, }; chk.CheckedChanged += Chk_CheckedChanged; this.flowLayoutPanel1.Controls.Add(chk); } } + + lstShopStatisticsInfo = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_shop_sale_statistics_info"); + if (lstShopStatisticsInfo == null) + lstShopStatisticsInfo = new List(); } private void Chk_CheckedChanged(object sender, EventArgs e) @@ -94,61 +101,122 @@ namespace TemuKJD.WXForms.ShopForms BindShop(shopEntity, selectIds); } + cmbFilterShopNotes.Items.Clear(); + //cmbFilterShopNotes.Items.Add(""); + foreach (var note in GlobalConfig.ShopLoginList.Select(s => s.Notes).Where(s => !s.IsNullOrEmpty()).Distinct()) + { + cmbFilterShopNotes.Items.Add(note); + } + GetShopStatistics(GlobalConfig.ShopLoginList.ToList(), selectIds); } private void GetShopStatistics(List shops, List selectIds) { + Invoke(new Action(() => + { + this.statusBar.pgbTaskProgress.Maximum = shops.Count; + this.statusBar.lblTaskStatus.Text = "正在查询"; + })); Task.Run(() => { + List tLst = new List(); foreach (ShopLoginInfo shopEntity in shops) { - if (string.IsNullOrEmpty(shopEntity.ShopId)) - continue; - bool canUse = shopEntity.LoginStatus == "登录成功"; - if (!canUse) - { - BindShop(shopEntity, selectIds); - continue; - } - - WxShopSaleStatisticsGroup statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.ShopId.ToString() == shopEntity.ShopId); - if (statistics == null) - { - statistics = new WxShopSaleStatisticsGroup() - { - Notes = shopEntity.Notes, - GroupName = shopEntity.GroupName, - ShopId = shopEntity.ShopId.ParseToString(), - ShopAccount = shopEntity.ShopAccount, - }; - lstShopStatisticsInfo.Add(statistics); - } - GetShopStatistics(shopEntity, statistics); Invoke(new Action(() => { - this.lblPayCnt.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_order_cnt.ParseToLong()).ToString(); - this.lblPayCnt7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_order_cnt.ParseToLong()).ToString(); - this.lblPayCnt30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_order_cnt.ParseToLong()).ToString(); - this.lblPay.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_gmv.ParseToDecimal()).ToString("f2"); - this.lblPay7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_gmv.ParseToDecimal()).ToString("f2"); - this.lblPay30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_gmv.ParseToDecimal()).ToString("f2"); - this.lblPayRefund.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_refund_gmv.ParseToLong()).ToString(); - this.lblPayRefund7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_refund_gmv.ParseToLong()).ToString(); - this.lblPayRefund30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_refund_gmv.ParseToLong()).ToString(); - this.lblOrderNum.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.orderNumRet?.num.ParseToInt()).ToString(); - this.lblWaybillError.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.waybillErrorRet?.num.ParseToInt()).ToString(); - this.lblAfterSaleAll.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.aftersaleAllRet?.num.ParseToInt()).ToString(); - this.lblPunish.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.punishRet?.num.ParseToInt()).ToString(); + this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); + this.statusBar.lblTaskStatus.Text = "正在查询 " + this.statusBar.pgbTaskProgress.Value + "/" + shops.Count; + if (this.statusBar.pgbTaskProgress.Value % 10 == 0) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_shop_sale_statistics_info", lstShopStatisticsInfo); - //this.lblAvailableBalance.Text = this.lstShopStatisticsInfo.Sum(s => s.availableBalance).ToString(); - //this.lblMallDepositLimitAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.mallDepositLimitAmount).ToString(); - //this.lblWithdrawCashAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.withdrawCashAmount).ToString(); - BindShop(shopEntity, selectIds); + var row = dgvShop.Rows.Cast().FirstOrDefault( + p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row != null) + { + row.Cells["colOnSaleProductNumber"].Value = ""; // 商品数量 + row.Cells["colScore"].Value = ""; // 店铺体验分 + row.Cells["colPayCnt"].Value = ""; // 今日订单 + row.Cells["colPayCnt7"].Value = ""; // 7日订单 + row.Cells["colPayCnt30"].Value = ""; // 30日订单 + row.Cells["colPay"].Value = ""; // 今日成交金额 + row.Cells["colPay7"].Value = ""; // 7日成交金额 + row.Cells["colPay30"].Value = ""; // 30日成交金额 + row.Cells["colRefund"].Value = ""; // 今日退款金额 + row.Cells["colRefund7"].Value = ""; // 7日退款金额 + row.Cells["colRefund30"].Value = ""; // 30日退款金额 + row.Cells["colOrderNum"].Value = ""; // 待发货 + row.Cells["colShipErr"].Value = ""; // 物流异常 + row.Cells["colAfterSale"].Value = ""; // 售后 + row.Cells["colPunish"].Value = ""; // 店铺违规 + row.Cells["colTotalAmount"].Value = ""; // 货款金额 + row.Cells["colAvailableAmount"].Value = ""; // 可提现余额 + row.Cells["colPendingAmount"].Value = ""; // 待结算金额 + row.Cells["colDepositBalance"].Value = ""; // 保证金 + } })); + var t = Task.Run(() => + { + if (string.IsNullOrEmpty(shopEntity.ShopId)) + return; + bool canUse = shopEntity.LoginStatus == "登录成功"; + if (!canUse) + { + BindShop(shopEntity, selectIds); + return; + } + + WxShopSaleStatisticsGroup statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.ShopId.ToString() == shopEntity.ShopId); + if (statistics == null) + { + statistics = new WxShopSaleStatisticsGroup() + { + Notes = shopEntity.Notes, + GroupName = shopEntity.GroupName, + ShopId = shopEntity.ShopId.ParseToString(), + ShopAccount = shopEntity.ShopAccount, + }; + lstShopStatisticsInfo.Add(statistics); + } + GetShopStatistics(shopEntity, statistics); + Invoke(new Action(() => + { + this.lblPayCnt.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_order_cnt.ParseToLong()).ToString(); + this.lblPayCnt7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_order_cnt.ParseToLong()).ToString(); + this.lblPayCnt30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_order_cnt.ParseToLong()).ToString(); + this.lblPay.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_gmv.ParseToDecimal() * 0.01m).ToString("f2"); + this.lblPay7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_gmv.ParseToDecimal() * 0.01m).ToString("f2"); + this.lblPay30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_gmv.ParseToDecimal() * 0.01m).ToString("f2"); + this.lblPayRefund.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfoToday.pay_refund_gmv.ParseToLong() * 0.01m).ToString(); + this.lblPayRefund7.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo7Day.pay_refund_gmv.ParseToLong() * 0.01m).ToString(); + this.lblPayRefund30.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopSaleInfo30Day.pay_refund_gmv.ParseToLong() * 0.01m).ToString(); + this.lblOrderNum.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.orderNumRet?.num.ParseToInt()).ToString(); + this.lblWaybillError.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.waybillErrorRet?.num.ParseToInt()).ToString(); + this.lblAfterSaleAll.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.aftersaleAllRet?.num.ParseToInt()).ToString(); + this.lblPunish.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopMainInfo.punishRet?.num.ParseToInt()).ToString(); + + this.lblTotalAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopAmount.totalAmount * 0.01m).ToString(); + this.lblAvailableAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopAmount.availableAmount * 0.01m).ToString(); + this.lblPendingAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopAmount.pendingAmount * 0.01m).ToString(); + this.lblDepositBalance.Text = this.lstShopStatisticsInfo.Sum(s => s.WxShopAmount.DepositBalance * 0.01m).ToString(); + BindShop(shopEntity, selectIds); + })); + }); + //t.Wait(); + while(tLst.Where(ta => !ta.IsCompleted && !ta.IsFaulted && !ta.IsCanceled).Count() >= 2) + { + Thread.Sleep(10); + } + tLst.Add(t); + } + while (tLst.Where(ta => !ta.IsCompleted && !ta.IsFaulted && !ta.IsCanceled).Count() > 0) + { + Thread.Sleep(10); } Invoke(new Action(() => { + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_shop_sale_statistics_info", lstShopStatisticsInfo); + this.statusBar.lblTaskStatus.Text = "查询结束"; this.pbLoading.Visible = false; })); }); @@ -188,8 +256,8 @@ namespace TemuKJD.WXForms.ShopForms shopEntity.ShopAccount, shopEntity.Notes, shopEntity.GroupName, - "", // 在售商品 - "", // 店铺体验分 + statistics.ProdCount.ParseToNullableInt(), // 在售商品 + statistics.curScoreValue.ParseToNullableDecimal(), // 店铺体验分 statistics.WxShopSaleInfoToday.pay_order_cnt, // 今日订单 statistics.WxShopSaleInfo7Day.pay_order_cnt, // 7日订单 statistics.WxShopSaleInfo30Day.pay_order_cnt, // 30日订单 @@ -203,10 +271,10 @@ namespace TemuKJD.WXForms.ShopForms statistics.WxShopMainInfo.waybillErrorRet?.num, // 物流异常 statistics.WxShopMainInfo.aftersaleAllRet?.num, // 售后 statistics.WxShopMainInfo.punishRet?.num, // 店铺违规 - "", - "", - "", - "" + statistics.WxShopAmount.totalAmount * 0.01m, // 货款金额 + statistics.WxShopAmount.availableAmount * 0.01m, // 可提现余额 + statistics.WxShopAmount.pendingAmount * 0.01m, // 待结算金额 + statistics.WxShopAmount.DepositBalance * 0.01m // 抱枕金 ); row = dgvShop.Rows[rowId]; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; @@ -228,31 +296,26 @@ namespace TemuKJD.WXForms.ShopForms row.Cells["colShopAccount"].Value = shopEntity.ShopAccount; row.Cells["colNotes"].Value = shopEntity.Notes; row.Cells["colGroup"].Value = shopEntity.GroupName; - // 在售商品 - // 店铺体验分 + row.Cells["colOnSaleProductNumber"].Value = statistics.ProdCount.ParseToNullableInt(); // 商品数量 + row.Cells["colScore"].Value = statistics.curScoreValue.ParseToNullableDecimal(); // 店铺体验分 row.Cells["colPayCnt"].Value = statistics.WxShopSaleInfoToday.pay_order_cnt; // 今日订单 row.Cells["colPayCnt7"].Value = statistics.WxShopSaleInfo7Day.pay_order_cnt; // 7日订单 row.Cells["colPayCnt30"].Value = statistics.WxShopSaleInfo30Day.pay_order_cnt; // 30日订单 - row.Cells["colPay"].Value = statistics.WxShopSaleInfoToday.pay_gmv; // 今日成交金额 - row.Cells["colPay7"].Value = statistics.WxShopSaleInfo7Day.pay_gmv; // 7日成交金额 - row.Cells["colPay30"].Value = statistics.WxShopSaleInfo30Day.pay_gmv; // 30日成交金额 - row.Cells["colRefund"].Value = statistics.WxShopSaleInfoToday.pay_refund_gmv; // 今日退款金额 - row.Cells["colRefund7"].Value = statistics.WxShopSaleInfo7Day.pay_refund_gmv; // 7日退款金额 - row.Cells["colRefund30"].Value = statistics.WxShopSaleInfo30Day.pay_refund_gmv; // 30日退款金额 + row.Cells["colPay"].Value = statistics.WxShopSaleInfoToday.pay_gmv.ParseToNullableLong() * 0.01m; // 今日成交金额 + row.Cells["colPay7"].Value = statistics.WxShopSaleInfo7Day.pay_gmv.ParseToNullableLong() * 0.01m; // 7日成交金额 + row.Cells["colPay30"].Value = statistics.WxShopSaleInfo30Day.pay_gmv.ParseToNullableLong() * 0.01m; // 30日成交金额 + row.Cells["colRefund"].Value = statistics.WxShopSaleInfoToday.pay_refund_gmv.ParseToNullableLong() * 0.01m; // 今日退款金额 + row.Cells["colRefund7"].Value = statistics.WxShopSaleInfo7Day.pay_refund_gmv.ParseToNullableLong() * 0.01m; // 7日退款金额 + row.Cells["colRefund30"].Value = statistics.WxShopSaleInfo30Day.pay_refund_gmv.ParseToNullableLong() * 0.01m; // 30日退款金额 row.Cells["colOrderNum"].Value = statistics.WxShopMainInfo.orderNumRet?.num; // 待发货 row.Cells["colShipErr"].Value = statistics.WxShopMainInfo.waybillErrorRet?.num; // 物流异常 row.Cells["colAfterSale"].Value = statistics.WxShopMainInfo.aftersaleAllRet?.num; // 售后 row.Cells["colPunish"].Value = statistics.WxShopMainInfo.punishRet?.num; // 店铺违规 + row.Cells["colTotalAmount"].Value = statistics.WxShopAmount.totalAmount * 0.01m; // 货款金额 + row.Cells["colAvailableAmount"].Value = statistics.WxShopAmount.availableAmount * 0.01m; ; // 可提现余额 + row.Cells["colPendingAmount"].Value = statistics.WxShopAmount.pendingAmount * 0.01m; // 待结算金额 + row.Cells["colDepositBalance"].Value = statistics.WxShopAmount.DepositBalance * 0.01m; ; // 保证金 - //row.Cells["colOnSaleProductNumber"].Value = statistics.onSaleProductNumber == null ? "-" : statistics.onSaleProductNumber.ToString(); //在售商品数 - //row.Cells["colSaleVolume"].Value = statistics.saleVolume == null ? "-" : statistics.saleVolume.ToString(); //今日销量 - //row.Cells["colTodayProfit"].Value = statistics.todayProfit == null ? "-" : statistics.todayProfit.Value.ToString("0.00"); //今日利润 - //row.Cells["colSevenDaysSaleVolume"].Value = statistics.sevenDaysSaleVolume == null ? "-" : statistics.sevenDaysSaleVolume.ToString(); //7日销量 - //row.Cells["colSevenDaysProfit"].Value = statistics.sevenDaysProfit == null ? "-" : statistics.sevenDaysProfit.Value.ToString("0.00"); //7日利润 - //row.Cells["colThirtyDaysSaleVolume"].Value = statistics.thirtyDaysSaleVolume == null ? "-" : statistics.thirtyDaysSaleVolume.ToString(); //30日销量 - //row.Cells["colThirtyDaysProfit"].Value = statistics.thirtyDaysProfit == null ? "-" : statistics.thirtyDaysProfit.Value.ToString("0.00"); //30日利润 - //row.Cells["colGoodsValue"].Value = statistics.goodsValue == null ? "-" : (statistics.goodsCost.Value * 0.01m).ToString("0.00"); //销售货值 - //row.Cells["colGoodsCost"].Value = statistics.goodsCost == null ? "-" : (statistics.goodsCost.Value * 0.01m).ToString("0.00"); //成本 } } @@ -261,15 +324,67 @@ namespace TemuKJD.WXForms.ShopForms if (statistics == null || statistics.WxShopMainInfo == null || statistics.WxShopSaleInfoToday == null || statistics.WxShopSaleInfo7Day == null || statistics.WxShopSaleInfo30Day == null) return; - if (statistics.WxShopMainInfo.LastRefreshDate != DateTime.Now.Date) + if (statistics.lastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") + { + try + { + var shopScoreRst = GetShopScore(shop); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (shopScoreRst.Contains("\"code\":0")) + { + statistics.curScoreValue = BaseRegex.GetDecimalJson(ref shopScoreRst, "curValue"); + } + else + { + string errStr = BaseRegex.GetStringJson(ref shopScoreRst, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref shopScoreRst, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = shopScoreRst; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + + var prodLstRst = WXPreSale.scanProductPreview(shop, 1, "", 20); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (prodLstRst.Contains("\"success\":true")) + { + var prodObjs = JsonHelper.JObjectParse(prodLstRst); + var totalNum = prodObjs["totalNum"].ParseToInt(); + statistics.ProdCount = totalNum; + } + else + { + string errStr = BaseRegex.GetStringJson(ref prodLstRst, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref prodLstRst, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = prodLstRst; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + statistics.lastRefreshDate = DateTime.Now.Date; + } + catch (Exception ex) + { + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + statistics.err_msg = ex.Message; + return; + } + } + + if (statistics.WxShopMainInfo.LastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") { try { string html = GetShopMainInfoList(shop); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); if (html.Contains("\"code\":0")) { statistics.WxShopMainInfo = JsonHelper.DeserializeJsonToObject(html); - statistics.WxShopMainInfo.LastRefreshDate = DateTime.Now; + statistics.WxShopMainInfo.LastRefreshDate = DateTime.Now.Date; } else { @@ -279,11 +394,161 @@ namespace TemuKJD.WXForms.ShopForms if (string.IsNullOrEmpty(errStr)) errStr = html; ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); - System.Threading.Thread.Sleep(Randomx.GetId(100, 200)); statistics.err_msg = errStr; return; } + } + catch (Exception ex) + { System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + statistics.err_msg = ex.Message; + return; + } + } + + if (statistics.WxShopSaleInfoToday.LastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") + { + try + { + string html = GetShopSaleInfoList(shop, + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date), + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now)); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"code\":0")) + { + var saleStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["total"]); + statistics.WxShopSaleInfoToday = JsonHelper.DeserializeJsonToObject(saleStr); + statistics.WxShopSaleInfoToday.LastRefreshDate = DateTime.Now.Date; + } + else + { + string errStr = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref html, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = html; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + } + catch (Exception ex) + { + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + statistics.err_msg = ex.Message; + return; + } + } + + if (statistics.WxShopSaleInfo7Day.LastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") + { + try + { + string html = GetShopSaleInfoList(shop, + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-7)), + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date) - 1); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"code\":0")) + { + var saleStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["total"]); + statistics.WxShopSaleInfo7Day = JsonHelper.DeserializeJsonToObject(saleStr); + statistics.WxShopSaleInfo7Day.LastRefreshDate = DateTime.Now.Date; + } + else + { + string errStr = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref html, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = html; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + } + catch (Exception ex) + { + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + statistics.err_msg = ex.Message; + return; + } + } + + if (statistics.WxShopSaleInfo30Day.LastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") + { + try + { + string html = GetShopSaleInfoList(shop, + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-30)), + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date) - 1); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"code\":0")) + { + var saleStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["total"]); + statistics.WxShopSaleInfo30Day = JsonHelper.DeserializeJsonToObject(saleStr); + statistics.WxShopSaleInfo30Day.LastRefreshDate = DateTime.Now.Date; + } + else + { + string errStr = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref html, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = html; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + } + catch (Exception ex) + { + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + statistics.err_msg = ex.Message; + return; + } + } + + if (statistics.WxShopAmount.LastRefreshDate != DateTime.Now.Date && shop.LoginStatus == "登录成功") + { + try + { + string html = GetShopAmount(shop); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"code\":0")) + { + var amountStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["data"]); + statistics.WxShopAmount = JsonHelper.DeserializeJsonToObject(amountStr); + } + else + { + string errStr = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref html, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = html; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + + html = GetShopBalance(shop); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"code\":0")) + { + statistics.WxShopAmount.DepositBalance = BaseRegex.GetIntJson(ref html, "depositBalance"); + } + else + { + string errStr = BaseRegex.GetStringJson(ref html, "errorMsg"); + if (string.IsNullOrEmpty(errStr)) + errStr = BaseRegex.GetStringJson(ref html, "error_msg"); + if (string.IsNullOrEmpty(errStr)) + errStr = html; + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + statistics.err_msg = errStr; + return; + } + statistics.WxShopAmount.LastRefreshDate = DateTime.Now.Date; } catch (Exception ex) { @@ -321,6 +586,38 @@ namespace TemuKJD.WXForms.ShopForms //{"code":0,"orderNumRet":{"code":0,"pendingShipNum":"1"},"waybillErrorRet":{"code":0,"totalNum":0},"aftersaleAllRet":{"code":0,"totalNum":3},"guaranteeRet":{"code":0,"totalNum":0},"prewarnRet":{"code":0,"waitStatusCount":0},"punishRet":{"code":0,"pendingNum":1},"mchUndealRet":{"code":0,"totalNum":0}} //pendingShipNum待发货 waybillErrorRet物流异常 aftersaleAllRet售后 guaranteeRet服务保障 prewarnRet店铺预警 punishRet店铺违规 mchUndealRet工单 } + public static string GetShopSaleInfoList(ShopLoginInfo shop, long startTime, long endTime) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodelinercgi/cgi/liner_query/3/home-overview-shop-offline?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/home"; + //string data = @"{""time_query"":{""dateFormat"":2,""dateType"":0,""dateRange"":7,""startMs"":1767974400000,""endMs"":1770566399999}}"; + string data = @"{""time_query"":{""dateFormat"":2,""dateType"":0,""dateRange"":7,""startMs"":" + startTime + @",""endMs"":" + endTime + "}}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, data, referer); + return result; + } + + public static string GetShopScore(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradehome/home/minor?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/home"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } + + public static string GetShopAmount(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradefunds/cgi/generalAccount/getGeneralAccountBalance?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/funds/home"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } + public static string GetShopBalance(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradedeposit/home/cgi/getDepositMPayState?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/funds/home"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) { @@ -387,10 +684,48 @@ namespace TemuKJD.WXForms.ShopForms statistics.WxShopSaleInfo30Day.LastRefreshDate = DateTime.MinValue; } //this.lstSubOrderInfo.RemoveAll(o => o.supplierId.ParseToString() == shop.ShopId); + } this.pbLoading.Visible = true; GetShopStatistics(shopList, reGetShopIds); } + + private void btnGetNotGet_Click(object sender, EventArgs e) + { + RefreshShop(); + } + + private void pnlFliter_Click(object sender, EventArgs e) + { + foreach (DataGridViewRow row in dgvShop.Rows) + { + string notes = cmbFilterShopNotes.Text.Trim().Trim(';'); + if (notes == "全部") + notes = ""; + List notesLst = notes.Split(new string[] { ";", ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries).ToList(); + + if (!row.Cells["colShopAccount"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim())) + { + row.Visible = false; + row.Cells["colSelect"].Value = false; + continue; + } + if (!row.Cells["colNotes"].Value.ParseToString().Contains(notes) && !notesLst.Contains(row.Cells["colNotes"].Value.ParseToString())) + { + row.Visible = false; + row.Cells["colSelect"].Value = false; + continue; + } + row.Visible = true; + } + } + + private void pnlClear_Click(object sender, EventArgs e) + { + txtFilterShopName.Text = ""; + cmbFilterShopNotes.Text = "全部"; + pnlFliter_Click(null, null); + } } } diff --git a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.resx b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.resx index cadf0b7..03223e8 100644 --- a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.resx +++ b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.resx @@ -186,16 +186,16 @@ True - + True - + True - + True - + True \ No newline at end of file