店铺退货包裹读取放到后台

This commit is contained in:
wule committed 2025-08-21 19:34:57 +08:00
1 parent 4693c42024
commit 2a4a3ef744
13 files changed
+1021 -377

No files matched your search

+2 -2
View File
@@ -27,8 +27,8 @@ namespace AllBase
/// <summary> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 535; public static int VersionCount = 538;
//public static int VersionCount = 535; //public static int VersionCount = 538;
/// <summary> /// <summary>
/// 版本号 /// 版本号
+32
View File
@@ -549,6 +549,23 @@ namespace AllBase
return 0; return 0;
} }
/// <summary>
/// 获取值
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static int? GetNullableIntJson(ref string html, string reg)
{
string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]");
if (string.IsNullOrEmpty(temp))
temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d-]+)");
int i;
if (int.TryParse(temp, out i))
return i;
return null;
}
/// <summary> /// <summary>
/// 获取值 /// 获取值
/// </summary> /// </summary>
@@ -564,6 +581,21 @@ namespace AllBase
return false; return false;
} }
/// <summary>
/// 获取值
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static bool? GetNullableBoolJson(ref string html, string reg)
{
var temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*(true|false)");
bool res;
if (bool.TryParse(temp, out res))
return res;
return null;
}
/// <summary> /// <summary>
/// 时间戳转字符串时间 /// 时间戳转字符串时间
/// </summary> /// </summary>
+90 -44
View File
@@ -261,76 +261,122 @@ namespace AllBase.Model.Result
public string notes { get; set; } public string notes { get; set; }
#endregion #endregion
#region 四个模块是否读取成功
/// <summary> /// <summary>
/// 有已发布商品 /// 首页订单信息
/// </summary> /// </summary>
public bool? havePublishProduct { get; set; } = false; public bool is_search_1 { get; set; } = false;
public int? lackSkcNumber { get; set; } = 0;
/// <summary> /// <summary>
/// 建议备货 /// 日到账金额信息
/// </summary> /// </summary>
public int? advicePrepareSkcNumber { get; set; } = 0; public bool is_search_2 { get; set; } = false;
/// <summary> /// <summary>
/// 商品信息待修改 /// 月到账金额信息
/// </summary> /// </summary>
public int? waitProductNumber { get; set; } = 0; public bool is_search_3 { get; set; } = false;
/// <summary> /// <summary>
/// 调价待确认 /// 店铺保证金信息
/// </summary> /// </summary>
public int? adjustPrice { get; set; } = 0; public bool is_search_4 { get; set; } = false;
public string err_msg { get; set; }
#endregion
/// <summary> /// <summary>
/// 开款待价格确认 /// 首页订单信息 有已发布商品
/// </summary> /// </summary>
public int? reviewAdjustPrice { get; set; } = 0; public bool? havePublishProduct { get; set; } = null;
/// <summary> /// <summary>
/// 在售商品数 /// 首页订单信息 缺货数量?
/// </summary> /// </summary>
public int? onSaleProductNumber { get; set; } = 0; public int? lackSkcNumber { get; set; } = null;
/// <summary> /// <summary>
/// 今日销量 /// 首页订单信息 建议备货
/// </summary> /// </summary>
public int? saleVolume { get; set; } = 0; public int? advicePrepareSkcNumber { get; set; } = null;
/// <summary> /// <summary>
/// 近7日销量 /// 首页订单信息 商品信息待修改
/// </summary> /// </summary>
public int? sevenDaysSaleVolume { get; set; } = 0; public int? waitProductNumber { get; set; } = null;
/// <summary> /// <summary>
/// 近30日销量 /// 首页订单信息 调价待确认
/// </summary> /// </summary>
public int? thirtyDaysSaleVolume { get; set; } = 0; public int? adjustPrice { get; set; } = null;
public ShopStatisticsPermissionsInfo permissions { get; set; }
/// <summary> /// <summary>
/// 即将售罄(商品数量) /// 首页订单信息 开款待价格确认
/// </summary> /// </summary>
public int? aboutToSellOutNumber { get; set; } = 0; public int? reviewAdjustPrice { get; set; } = null;
/// <summary> /// <summary>
/// 已经售罄(商品数量) /// 首页订单信息 在售商品数
/// </summary> /// </summary>
public int? alreadySoldOutNumber { get; set; } = 0; public int? onSaleProductNumber { get; set; } = null;
/// <summary> /// <summary>
/// 近90天品质售后率 /// 首页订单信息 今日销量
/// </summary> /// </summary>
public int? qualityAfterSaleRatio90d { get; set; } = 0; public int? saleVolume { get; set; } = null;
/// <summary> /// <summary>
/// 高价限流商品数 /// 首页订单信息 近7日销量
/// </summary> /// </summary>
public int? highPriceLimitNumber { get; set; } = 0; public int? sevenDaysSaleVolume { get; set; } = null;
/// <summary>
/// 首页订单信息 近30日销量
/// </summary>
public int? thirtyDaysSaleVolume { get; set; } = null;
//public ShopStatisticsPermissionsInfo permissions { get; set; }
/// <summary>
/// 首页订单信息 即将售罄(商品数量)
/// </summary>
public int? aboutToSellOutNumber { get; set; } = null;
/// <summary>
/// 首页订单信息 已经售罄(商品数量)
/// </summary>
public int? alreadySoldOutNumber { get; set; } = null;
/// <summary>
/// 首页订单信息 近90天品质售后率
/// </summary>
public int? qualityAfterSaleRatio90d { get; set; } = null;
/// <summary>
/// 首页订单信息 高价限流商品数
/// </summary>
public int? highPriceLimitNumber { get; set; } = null;
public decimal? yesterdayIncomeAmount { get; set; } = 0;
public decimal? thisMonthIncomeAmount { get; set; } = 0;
public decimal? lastMonthIncomeAmount { get; set; } = 0;
/// <summary>
/// 可提现金额(可用余额)
/// </summary>
public decimal? availableBalance { get; set; } = 0;
/// <summary>
/// 预留额度(门槛)(这两个不清楚具体哪个对哪个)
/// </summary>
public decimal? mallDepositThreshold { get; set; } = 0;
/// <summary>
/// 账户预留金额(这两个不清楚具体哪个对哪个)
/// </summary>
public decimal? mallDepositLimitAmount { get; set; } = 0;
/// <summary>
/// 提现总金额
/// </summary>
public decimal? withdrawCashAmount { get; set; } = 0;
} }
public class ShopStatisticsPermissionsInfo //public class ShopStatisticsPermissionsInfo
{ //{
public bool? thirtyDaysSaleVolume { get; set; } // public bool? thirtyDaysSaleVolume { get; set; }
public bool? qualityAfterSaleRatio90d { get; set; } // public bool? qualityAfterSaleRatio90d { get; set; }
public bool? adjustPrice { get; set; } // public bool? adjustPrice { get; set; }
public bool? alreadySoldOutNumber { get; set; } // public bool? alreadySoldOutNumber { get; set; }
public bool? reviewAdjustPrice { get; set; } // public bool? reviewAdjustPrice { get; set; }
public bool? aboutToSellOutNumber { get; set; } // public bool? aboutToSellOutNumber { get; set; }
public bool? advicePrepareSkcNumber { get; set; } // public bool? advicePrepareSkcNumber { get; set; }
public bool? waitProductNumber { get; set; } // public bool? waitProductNumber { get; set; }
public bool? highPriceLimitNumber { get; set; } // public bool? highPriceLimitNumber { get; set; }
public bool? saleVolume { get; set; } // public bool? saleVolume { get; set; }
public bool? lackSkcNumber { get; set; } // public bool? lackSkcNumber { get; set; }
public bool? sevenDaysSaleVolume { get; set; } // public bool? sevenDaysSaleVolume { get; set; }
public bool? onSaleProductNumber { get; set; } // public bool? onSaleProductNumber { get; set; }
} //}
} }
@@ -12,6 +12,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TemuKJD.KJDForms.BaseForms; using TemuKJD.KJDForms.BaseForms;
@@ -444,7 +445,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
string headWords = ""; string headWords = "";
if (!string.IsNullOrWhiteSpace(prod.head_words)) if (!string.IsNullOrWhiteSpace(prod.head_words))
{ {
var numbers = prod.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList(); var numberRegex = BaseRegex.GetMatchRegex(prod.head_words.Trim(), "\\d{1,9}");
var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
//var numbers = prod.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
int minNum = 5; int minNum = 5;
int maxNum = 19; int maxNum = 19;
if (numbers.Count > 0 && numbers[0] > 0) if (numbers.Count > 0 && numbers[0] > 0)
@@ -458,7 +461,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
maxNum = minNum; maxNum = minNum;
} }
headWords += Randomx.GetId(minNum, maxNum + 1) + "个"; headWords += Randomx.GetId(minNum, maxNum + 1) + prod.head_words.Trim().Replace(minNum + "-" + maxNum, "");
} }
} }
@@ -30,6 +30,10 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectEditNotesForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectEditNotesForm));
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.cmbStatus = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.txtDraftId = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.btnFission = new DevComponents.DotNetBar.PanelEx(); this.btnFission = new DevComponents.DotNetBar.PanelEx();
this.lblTextCount = new System.Windows.Forms.Label(); this.lblTextCount = new System.Windows.Forms.Label();
this.txtSkc = new System.Windows.Forms.TextBox(); this.txtSkc = new System.Windows.Forms.TextBox();
@@ -44,10 +48,6 @@
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnOk = new TemuKJD.UserControls.ButtonEx(); this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.txtDraftId = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.cmbStatus = new System.Windows.Forms.ComboBox();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@@ -79,6 +79,47 @@
this.panel2.Size = new System.Drawing.Size(391, 546); this.panel2.Size = new System.Drawing.Size(391, 546);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// cmbStatus
//
this.cmbStatus.Enabled = false;
this.cmbStatus.FormattingEnabled = true;
this.cmbStatus.Items.AddRange(new object[] {
"待上传",
"已上传",
"草稿箱"});
this.cmbStatus.Location = new System.Drawing.Point(252, 397);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(101, 25);
this.cmbStatus.TabIndex = 442;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(220, 401);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 17);
this.label6.TabIndex = 441;
this.label6.Text = "状态";
//
// txtDraftId
//
this.txtDraftId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtDraftId.Location = new System.Drawing.Point(88, 398);
this.txtDraftId.Name = "txtDraftId";
this.txtDraftId.ReadOnly = true;
this.txtDraftId.Size = new System.Drawing.Size(106, 23);
this.txtDraftId.TabIndex = 440;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(42, 401);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(45, 17);
this.label5.TabIndex = 439;
this.label5.Text = "上传ID";
//
// btnFission // btnFission
// //
this.btnFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnFission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -251,47 +292,6 @@
this.btnOk.UseVisualStyleBackColor = false; this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click); this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
// //
// txtDraftId
//
this.txtDraftId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtDraftId.Location = new System.Drawing.Point(88, 398);
this.txtDraftId.Name = "txtDraftId";
this.txtDraftId.ReadOnly = true;
this.txtDraftId.Size = new System.Drawing.Size(106, 23);
this.txtDraftId.TabIndex = 440;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(42, 401);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(45, 17);
this.label5.TabIndex = 439;
this.label5.Text = "上传ID";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(220, 401);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 17);
this.label6.TabIndex = 441;
this.label6.Text = "状态";
//
// cmbStatus
//
this.cmbStatus.Enabled = false;
this.cmbStatus.FormattingEnabled = true;
this.cmbStatus.Items.AddRange(new object[] {
"待上传",
"已上传",
"草稿箱"});
this.cmbStatus.Location = new System.Drawing.Point(252, 397);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(101, 25);
this.cmbStatus.TabIndex = 442;
//
// DbProductSelectEditNotesForm // DbProductSelectEditNotesForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -23,6 +23,7 @@ using TemuKJD.KJDForms.AdminForms;
using TemuKJD.KJDForms.ShopForms; using TemuKJD.KJDForms.ShopForms;
using System.Globalization; using System.Globalization;
using TemuKJD.KJDForms.ToolForms; using TemuKJD.KJDForms.ToolForms;
using System.Text.RegularExpressions;
namespace TemuKJD.KJDForms.ProductSelectForms namespace TemuKJD.KJDForms.ProductSelectForms
{ {
@@ -863,19 +864,25 @@ namespace TemuKJD.KJDForms.ProductSelectForms
// 头词 // 头词
if (chkHeadWords.Checked) if (chkHeadWords.Checked)
{ {
int[] heads = dbProd.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries) //int[] heads = dbProd.head_words.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
.Select(s => s.ParseToInt()).ToArray(); // .Select(s => s.ParseToInt()).ToArray();
string headTemp = dbProd.head_words.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length < 2) if (heads.Length < 2)
{ {
if (string.IsNullOrEmpty(GlobalConfig.ProductWords.HeadWords)) if (GlobalConfig.ProductWords.HeadWords == null)
GlobalConfig.ProductWords.HeadWords = ""; GlobalConfig.ProductWords.HeadWords = "";
heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries) //heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
.Select(s => s.ParseToInt()).ToArray(); // .Select(s => s.ParseToInt()).ToArray();
headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
} }
if (heads.Length > 1 && heads[1] > heads[0]) if (heads.Length > 1 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + "个"; headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
} }
// 尾词 // 尾词
@@ -956,13 +956,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
// 头词 // 头词
if (chkHeadWords.Checked) if (chkHeadWords.Checked)
{ {
if (string.IsNullOrEmpty(GlobalConfig.ProductWords.HeadWords)) if (GlobalConfig.ProductWords.HeadWords == null)
GlobalConfig.ProductWords.HeadWords = ""; GlobalConfig.ProductWords.HeadWords = "";
int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries) //int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
.Select(s => s.ParseToInt()).ToArray(); // .Select(s => s.ParseToInt()).ToArray();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length > 1 && heads[1] > heads[0]) if (heads.Length > 1 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + "个"; headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
} }
// 尾词 // 尾词
@@ -1680,7 +1683,11 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
string headWords = ""; string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords)) if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{ {
var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList(); //var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
int minNum = 5; int minNum = 5;
int maxNum = 19; int maxNum = 19;
if (numbers.Count > 0 && numbers[0] > 0) if (numbers.Count > 0 && numbers[0] > 0)
@@ -1694,7 +1701,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
{ {
maxNum = minNum; maxNum = minNum;
} }
headWords += Randomx.GetId(minNum, maxNum + 1) + "个"; headWords += Randomx.GetId(minNum, maxNum + 1) + headTemp.Replace(minNum + "-" + maxNum, "");
} }
} }
@@ -21,20 +21,20 @@ namespace TemuKJD.KJDForms.ShopForms
public partial class ReturnPackageDetailForm : LRBaseForm public partial class ReturnPackageDetailForm : LRBaseForm
{ {
public CancellationTokenSource cancellationTokenSource { get; set; } = null; public CancellationTokenSource cancellationTokenSource { get; set; } = null;
ShopLoginInfo shop = null; ShopLoginInfo Shop = null;
List<ShopLoginInfo> lstShop = new List<ShopLoginInfo>();
List<TemuReturnPackageDetailInfo> lstReturnPackageInfo = new List<TemuReturnPackageDetailInfo>(); List<TemuReturnPackageDetailInfo> lstReturnPackageInfo = new List<TemuReturnPackageDetailInfo>();
public static ReturnPackageDetailForm instance = null;
Bitmap defaultBitmap = null; Bitmap defaultBitmap = null;
public ReturnPackageDetailForm(ShopLoginInfo _shop) public ReturnPackageDetailForm(ShopLoginInfo _shop)
{ {
InitializeComponent(); InitializeComponent();
instance = this;
if (_shop!= null) if (_shop != null)
{ {
this.shop = _shop; this.Shop = _shop;
lstShop.Add(shop);
} }
pbLoading.Visible = false; pbLoading.Visible = false;
} }
@@ -47,11 +47,18 @@ namespace TemuKJD.KJDForms.ShopForms
private void btnAdd_Click(object sender, EventArgs e) private void btnAdd_Click(object sender, EventArgs e)
{ {
GetReturnPackage(); GetReturnPackage(this.Shop);
} }
void GetReturnPackage() /// <summary>
///
/// </summary>
/// <param name="shop"></param>
/// <param name="isBack">后台静默执行</param>
public bool GetReturnPackage(ShopLoginInfo shop, bool isBack = false)
{ {
bool isError = false;
if (defaultBitmap == null) if (defaultBitmap == null)
defaultBitmap = new Bitmap(80, 80); defaultBitmap = new Bitmap(80, 80);
@@ -61,7 +68,8 @@ namespace TemuKJD.KJDForms.ShopForms
var dgvRows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString())); var dgvRows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString()));
foreach (var row in dgvRows) foreach (var row in dgvRows)
{ {
row.Cells["colMessage"].Value = ""; if (!isBack)
row.Cells["colMessage"].Value = "";
} }
pbLoading.Visible = true; pbLoading.Visible = true;
@@ -69,8 +77,14 @@ namespace TemuKJD.KJDForms.ShopForms
DateTime startTime = this.dtpStartDate.Value.Date; DateTime startTime = this.dtpStartDate.Value.Date;
DateTime endTime = this.dtpEndDate.Value.Date.AddDays(1); DateTime endTime = this.dtpEndDate.Value.Date.AddDays(1);
if (isBack)
{
endTime = this.dtpEndDate.Value.Date.AddDays(1);
startTime = endTime.AddMonths(-1);
}
cancellationTokenSource = new CancellationTokenSource(); cancellationTokenSource = new CancellationTokenSource();
Task.Run(() => var t = Task.Run(() =>
{ {
int i = 0; int i = 0;
while (endTime > startTime) while (endTime > startTime)
@@ -82,13 +96,17 @@ namespace TemuKJD.KJDForms.ShopForms
long startTimeTick = BaseClass.DateTimeToTimestampMilliseconds(midTime); long startTimeTick = BaseClass.DateTimeToTimestampMilliseconds(midTime);
long endTimeTick = BaseClass.DateTimeToTimestampMilliseconds(endTime) - 1; long endTimeTick = BaseClass.DateTimeToTimestampMilliseconds(endTime) - 1;
this.Invoke(new Action(() => if (!isBack)
{ {
this.statusBar.lblTaskStatus.Text = "正在查询" + midTime.ToString(" yy年MM月dd日 至 ") + endTime.ToString("yy年MM月dd日 ") + "..."; this.Invoke(new Action(() =>
this.statusBar.pgbTaskProgress.Maximum = i + 1; {
this.statusBar.UpdateProgressBar(i + 1); this.statusBar.lblTaskStatus.Text = "正在查询" + midTime.ToString(" yy年MM月dd日 至 ") + endTime.ToString("yy年MM月dd日 ") + "...";
i++; this.statusBar.pgbTaskProgress.Maximum = i + 1;
})); this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
}
endTime = midTime; endTime = midTime;
@@ -101,35 +119,43 @@ namespace TemuKJD.KJDForms.ShopForms
#region 检测登录 #region 检测登录
if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线") if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线")
{ {
Invoke(new Action(() => if (!isBack)
{ {
BaseMsgForm.ShowError("店铺掉线,请重新登录"); Invoke(new Action(() =>
})); {
BaseMsgForm.ShowError("店铺掉线,请重新登录");
}));
}
return; return;
} }
AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线") if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线")
{ {
Invoke(new Action(() => if (!isBack)
{ {
BaseMsgForm.ShowError("店铺掉线,请重新登录"); Invoke(new Action(() =>
})); {
BaseMsgForm.ShowError("店铺掉线,请重新登录");
}));
}
return; return;
} }
#endregion #endregion
Invoke(new Action(() => if (!isBack)
{ {
//var rows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); Invoke(new Action(() =>
//foreach (var row in rows) {
//{ //var rows = this.dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId);
// row.Cells["colMessage"].Value = "正在查询"; //foreach (var row in rows)
//} //{
})); // row.Cells["colMessage"].Value = "正在查询";
//}
}));
}
int page = 0; int page = 0;
int totalPage = 1; int totalPage = 1;
bool isError = false;
string errMsg = ""; string errMsg = "";
List<TemuReturnPackageDetailInfo> packageLstTmp = new List<TemuReturnPackageDetailInfo>(); List<TemuReturnPackageDetailInfo> packageLstTmp = new List<TemuReturnPackageDetailInfo>();
while (page < totalPage) while (page < totalPage)
@@ -144,8 +170,14 @@ namespace TemuKJD.KJDForms.ShopForms
string jsonStr = GetReturnPackage(shop, startTimeTick, endTimeTick, page); string jsonStr = GetReturnPackage(shop, startTimeTick, endTimeTick, page);
if (jsonStr.Contains("指定的值含有无效的控制字符")) if (jsonStr.Contains("指定的值含有无效的控制字符"))
{ {
BaseMsgForm.ShowError("店铺" + shop.LoginName + " " + shop.ShopId + "已掉线");
isError = true; isError = true;
if (!isBack)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("店铺" + shop.LoginName + " " + shop.ShopId + "已掉线");
}));
}
break; break;
} }
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5) if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
@@ -175,7 +207,14 @@ namespace TemuKJD.KJDForms.ShopForms
if (jArr == null) if (jArr == null)
jArr = new JArray(); jArr = new JArray();
} }
catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } catch (Exception ex)
{
isError = true;
Invoke(new Action(() =>
{
BaseMsgForm.ShowError(ex.Message);
}));
}
foreach (var item in jArr) foreach (var item in jArr)
{ {
@@ -229,17 +268,31 @@ namespace TemuKJD.KJDForms.ShopForms
} }
} }
} }
catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } catch (Exception ex)
{
isError = true;
if (!isBack)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError(ex.Message);
}));
}
}
} }
else else
{ {
isError = true;
AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线") if (shop.LoginStatus != "登录成功" || shop.LoginStatus2 != "国际版在线")
{ {
Invoke(new Action(() => if (!isBack)
{ {
BaseMsgForm.ShowError("店铺掉线,请重新登录"); Invoke(new Action(() =>
})); {
BaseMsgForm.ShowError("店铺掉线,请重新登录");
}));
}
//将查询到的数组内容清空掉,防止后续商品未获取到仍然匹配并往仓库后台服务端送 //将查询到的数组内容清空掉,防止后续商品未获取到仍然匹配并往仓库后台服务端送
packageLstTmp.Clear(); packageLstTmp.Clear();
break; break;
@@ -296,7 +349,16 @@ namespace TemuKJD.KJDForms.ShopForms
if (!string.IsNullOrWhiteSpace(imgUrl)) if (!string.IsNullOrWhiteSpace(imgUrl))
image = GetHtml.GetUrlImg(imgUrl, out getImgError); image = GetHtml.GetUrlImg(imgUrl, out getImgError);
if (!string.IsNullOrEmpty(getImgError)) if (!string.IsNullOrEmpty(getImgError))
BaseMsgForm.ShowError(getImgError); {
isError = true;
if (!isBack)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError(getImgError);
}));
}
}
string imgBase64 = ""; string imgBase64 = "";
using (MemoryStream memoryStream = new MemoryStream()) using (MemoryStream memoryStream = new MemoryStream())
{ {
@@ -359,48 +421,67 @@ namespace TemuKJD.KJDForms.ShopForms
else else
{ {
rst = BaseRegex.GetStringJson(ref html, "msg"); rst = BaseRegex.GetStringJson(ref html, "msg");
if ((rst.Contains("此退货包裹号") && rst.Contains("已经存在")) || rst.Contains("店铺系统不存在"))
{
//这些情况直接跳过
}
else
{
isError = true;
}
} }
Invoke(new Action(() => if (!isBack)
{ {
int rowId = this.dgvSelectProduct.Rows.Add( Invoke(new Action(() =>
true, {
//shop.ShopAccount, int rowId = this.dgvSelectProduct.Rows.Add(
pack.productSpuId, true,
pack.productSkuId, //shop.ShopAccount,
imgUrl, pack.productSpuId,
defaultBitmap, //image, // skc图片 pack.productSkuId,
pack.productSkcId, imgUrl,
/*"①" +*/ pack.mainSaleSpec + " " + /*"②" +*/ pack.secondarySaleSpec, defaultBitmap, //image, // skc图片
pack.extCode, pack.productSkcId,
pack.purchaseSubOrderSn, // 备货单号 /*"①" +*/ pack.mainSaleSpec + " " + /*"②" +*/ pack.secondarySaleSpec,
string.Join(",", pack.reasonDesc), pack.extCode,
pack.packageSn, pack.purchaseSubOrderSn, // 备货单号
pack.returnTotalNum, string.Join(",", pack.reasonDesc),
pack.quantity, pack.packageSn,
BaseClass.StampToDateTime((pack.outboundTime.ParseToLong() / 1000).ParseToInt()), // 出库时间 pack.returnTotalNum,
rst // 操作结果,状态 pack.quantity,
); BaseClass.StampToDateTime((pack.outboundTime.ParseToLong() / 1000).ParseToInt()), // 出库时间
rst // 操作结果,状态
);
dgvSelectProduct.Rows[rowId].Height = 60; dgvSelectProduct.Rows[rowId].Height = 60;
})); }));
}
} }
lstReturnPackageInfo.AddRange(packageLst); lstReturnPackageInfo.AddRange(packageLst);
ShowDgvImg(); if (!isBack)
ShowDgvImg();
} }
Invoke(new Action(() => if (!isBack)
{ {
splitContainer1.Panel1.Enabled = true; Invoke(new Action(() =>
pbLoading.Visible = false; {
string sRst = "已完成退货包裹明细查询!"; splitContainer1.Panel1.Enabled = true;
if (cancellationTokenSource.IsCancellationRequested) pbLoading.Visible = false;
sRst = "已取消查询!"; string sRst = "已完成退货包裹明细查询!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消查询!";
BaseMsgForm.ShowInfo(sRst); BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst; this.statusBar.lblTaskStatus.Text = sRst;
})); }));
}
}, cancellationTokenSource.Token); }, cancellationTokenSource.Token);
if (isBack)
t.Wait();
return isError;
} }
void ShowDgvImg() void ShowDgvImg()
@@ -460,7 +541,7 @@ namespace TemuKJD.KJDForms.ShopForms
page = Math.Max(page, 1); page = Math.Max(page, 1);
string url = "https://seller.kuajingmaihuo.com/dunland/api/gmp/returnSupplier/package/pageReturnPackageSkuDetailList"; string url = "https://seller.kuajingmaihuo.com/dunland/api/gmp/returnSupplier/package/pageReturnPackageSkuDetailList";
string body; string body;
body = @"{""outboundTimeStart"":" +startTime + @",""outboundTimeEnd"":" + endTime + @",""pageNo"":" + page + @",""pageSize"":200}"; body = @"{""outboundTimeStart"":" + startTime + @",""outboundTimeEnd"":" + endTime + @",""pageNo"":" + page + @",""pageSize"":200}";
string refere = "https://seller.kuajingmaihuo.com/wms/stock-mgt/return-package-detail"; string refere = "https://seller.kuajingmaihuo.com/wms/stock-mgt/return-package-detail";
+20 -20
View File
@@ -30,6 +30,7 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopLoginForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopLoginForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx();
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.pnlMultiLogin = new System.Windows.Forms.Panel();
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
@@ -46,7 +47,6 @@
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox(); this.txtAddress = new System.Windows.Forms.TextBox();
this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
@@ -83,10 +83,27 @@
this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 736); this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 675; this.splitContainer1.SplitterDistance = 676;
this.splitContainer1.SplitterWidth = 3; this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4; this.splitContainer1.TabIndex = 4;
// //
// btnReturnPackage
//
this.btnReturnPackage.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnReturnPackage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReturnPackage.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturnPackage.ForeColor = System.Drawing.Color.White;
this.btnReturnPackage.Location = new System.Drawing.Point(651, 28);
this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2);
this.btnReturnPackage.Name = "btnReturnPackage";
this.btnReturnPackage.Size = new System.Drawing.Size(136, 25);
this.btnReturnPackage.TabIndex = 464;
this.btnReturnPackage.Text = "提交退货到库存管理";
this.btnReturnPackage.UseVisualStyleBackColor = false;
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
//
// btnLoginAgain // btnLoginAgain
// //
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -330,23 +347,6 @@
this.txtAddress.TabIndex = 7; this.txtAddress.TabIndex = 7;
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
// //
// btnReturnPackage
//
this.btnReturnPackage.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnReturnPackage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReturnPackage.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturnPackage.ForeColor = System.Drawing.Color.White;
this.btnReturnPackage.Location = new System.Drawing.Point(651, 28);
this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2);
this.btnReturnPackage.Name = "btnReturnPackage";
this.btnReturnPackage.Size = new System.Drawing.Size(136, 25);
this.btnReturnPackage.TabIndex = 464;
this.btnReturnPackage.Text = "提交退货到库存管理";
this.btnReturnPackage.UseVisualStyleBackColor = false;
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
//
// ShopLoginForm // ShopLoginForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -378,7 +378,6 @@
#endregion #endregion
private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer splitContainer1;
private DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin;
private UserControls.ButtonEx btnStop; private UserControls.ButtonEx btnStop;
private UserControls.ButtonEx btnReload; private UserControls.ButtonEx btnReload;
private System.Windows.Forms.TextBox txtPassWord; private System.Windows.Forms.TextBox txtPassWord;
@@ -395,5 +394,6 @@
private System.Windows.Forms.Panel pnlMultiLogin; private System.Windows.Forms.Panel pnlMultiLogin;
private UserControls.ButtonEx btnLoginAgain; private UserControls.ButtonEx btnLoginAgain;
private UserControls.ButtonEx btnReturnPackage; private UserControls.ButtonEx btnReturnPackage;
public DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin;
} }
} }
@@ -30,21 +30,21 @@ namespace TemuKJD.KJDForms.ShopForms
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnGetNotGet = new DevComponents.DotNetBar.PanelEx(); this.btnGetNotGet = new DevComponents.DotNetBar.PanelEx();
this.btnGetSelect = new DevComponents.DotNetBar.PanelEx(); this.btnGetSelect = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label16 = new System.Windows.Forms.Label(); this.lblWithdrawCashAmount = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label(); this.lblAvailableBalance = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label(); this.lblMallDepositLimitAmount = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label(); this.lblLastMonthIncomeAmount = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.lblThisMonthIncomeAmount = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label(); this.lblYesterdayIncomeAmount = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label(); this.lblSevenDaysSaleVolume = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
@@ -53,11 +53,10 @@ namespace TemuKJD.KJDForms.ShopForms
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label(); this.lblSaleVolume = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox(); this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -70,11 +69,13 @@ namespace TemuKJD.KJDForms.ShopForms
this.colHighPriceLimitNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colHighPriceLimitNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAboutToSellOutNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAboutToSellOutNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAdvicePrepareSkcNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAdvicePrepareSkcNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colYesterdayAmountReceived = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colYesterdayIncomeAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colThisMonthAmountReceived = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colThisMonthIncomeAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLastMonthAmountReceived = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colLastMonthIncomeAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBalance = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAvailableBalance = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBond = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMallDepositLimitAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colWithdrawCashAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@@ -150,6 +151,7 @@ namespace TemuKJD.KJDForms.ShopForms
this.btnGetNotGet.StyleMouseOver.BackColor2.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.TabIndex = 431;
this.btnGetNotGet.Text = "查询未获取"; this.btnGetNotGet.Text = "查询未获取";
this.btnGetNotGet.Click += new System.EventHandler(this.btnGetNotGet_Click);
// //
// btnGetSelect // btnGetSelect
// //
@@ -174,6 +176,7 @@ namespace TemuKJD.KJDForms.ShopForms
this.btnGetSelect.StyleMouseOver.BackColor2.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.TabIndex = 427;
this.btnGetSelect.Text = "查询选中"; this.btnGetSelect.Text = "查询选中";
this.btnGetSelect.Click += new System.EventHandler(this.btnGetSelect_Click);
// //
// ucGroupBoxEx1 // ucGroupBoxEx1
// //
@@ -202,13 +205,13 @@ namespace TemuKJD.KJDForms.ShopForms
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 10F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 10F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 13F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 13F));
this.tableLayoutPanel1.Controls.Add(this.label16, 3, 3); this.tableLayoutPanel1.Controls.Add(this.lblWithdrawCashAmount, 3, 3);
this.tableLayoutPanel1.Controls.Add(this.label15, 2, 3); this.tableLayoutPanel1.Controls.Add(this.lblAvailableBalance, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.label14, 1, 3); this.tableLayoutPanel1.Controls.Add(this.lblMallDepositLimitAmount, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.label13, 0, 3); this.tableLayoutPanel1.Controls.Add(this.lblLastMonthIncomeAmount, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.label12, 3, 1); this.tableLayoutPanel1.Controls.Add(this.lblThisMonthIncomeAmount, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.label11, 2, 1); this.tableLayoutPanel1.Controls.Add(this.lblYesterdayIncomeAmount, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.label10, 1, 1); this.tableLayoutPanel1.Controls.Add(this.lblSevenDaysSaleVolume, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.label8, 3, 2); this.tableLayoutPanel1.Controls.Add(this.label8, 3, 2);
this.tableLayoutPanel1.Controls.Add(this.label7, 2, 2); this.tableLayoutPanel1.Controls.Add(this.label7, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.label6, 1, 2); this.tableLayoutPanel1.Controls.Add(this.label6, 1, 2);
@@ -217,7 +220,7 @@ namespace TemuKJD.KJDForms.ShopForms
this.tableLayoutPanel1.Controls.Add(this.label3, 2, 0); this.tableLayoutPanel1.Controls.Add(this.label3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 1, 0); this.tableLayoutPanel1.Controls.Add(this.label2, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label9, 0, 1); this.tableLayoutPanel1.Controls.Add(this.lblSaleVolume, 0, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(31, 19); this.tableLayoutPanel1.Location = new System.Drawing.Point(31, 19);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4; this.tableLayoutPanel1.RowCount = 4;
@@ -228,82 +231,82 @@ namespace TemuKJD.KJDForms.ShopForms
this.tableLayoutPanel1.Size = new System.Drawing.Size(1253, 115); this.tableLayoutPanel1.Size = new System.Drawing.Size(1253, 115);
this.tableLayoutPanel1.TabIndex = 435; this.tableLayoutPanel1.TabIndex = 435;
// //
// label16 // lblWithdrawCashAmount
// //
this.label16.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblWithdrawCashAmount.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label16.AutoSize = true; this.lblWithdrawCashAmount.AutoSize = true;
this.label16.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblWithdrawCashAmount.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label16.Location = new System.Drawing.Point(924, 87); this.lblWithdrawCashAmount.Location = new System.Drawing.Point(924, 87);
this.label16.Name = "label16"; this.lblWithdrawCashAmount.Name = "lblWithdrawCashAmount";
this.label16.Size = new System.Drawing.Size(18, 20); this.lblWithdrawCashAmount.Size = new System.Drawing.Size(18, 20);
this.label16.TabIndex = 15; this.lblWithdrawCashAmount.TabIndex = 15;
this.label16.Text = "0"; this.lblWithdrawCashAmount.Text = "0";
// //
// label15 // lblAvailableBalance
// //
this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblAvailableBalance.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label15.AutoSize = true; this.lblAvailableBalance.AutoSize = true;
this.label15.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblAvailableBalance.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label15.Location = new System.Drawing.Point(617, 87); this.lblAvailableBalance.Location = new System.Drawing.Point(617, 87);
this.label15.Name = "label15"; this.lblAvailableBalance.Name = "lblAvailableBalance";
this.label15.Size = new System.Drawing.Size(18, 20); this.lblAvailableBalance.Size = new System.Drawing.Size(18, 20);
this.label15.TabIndex = 15; this.lblAvailableBalance.TabIndex = 15;
this.label15.Text = "0"; this.lblAvailableBalance.Text = "0";
// //
// label14 // lblMallDepositLimitAmount
// //
this.label14.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblMallDepositLimitAmount.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label14.AutoSize = true; this.lblMallDepositLimitAmount.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblMallDepositLimitAmount.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label14.Location = new System.Drawing.Point(310, 87); this.lblMallDepositLimitAmount.Location = new System.Drawing.Point(310, 87);
this.label14.Name = "label14"; this.lblMallDepositLimitAmount.Name = "lblMallDepositLimitAmount";
this.label14.Size = new System.Drawing.Size(18, 20); this.lblMallDepositLimitAmount.Size = new System.Drawing.Size(18, 20);
this.label14.TabIndex = 15; this.lblMallDepositLimitAmount.TabIndex = 15;
this.label14.Text = "0"; this.lblMallDepositLimitAmount.Text = "0";
// //
// label13 // lblLastMonthIncomeAmount
// //
this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblLastMonthIncomeAmount.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label13.AutoSize = true; this.lblLastMonthIncomeAmount.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblLastMonthIncomeAmount.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label13.Location = new System.Drawing.Point(3, 87); this.lblLastMonthIncomeAmount.Location = new System.Drawing.Point(3, 87);
this.label13.Name = "label13"; this.lblLastMonthIncomeAmount.Name = "lblLastMonthIncomeAmount";
this.label13.Size = new System.Drawing.Size(18, 20); this.lblLastMonthIncomeAmount.Size = new System.Drawing.Size(18, 20);
this.label13.TabIndex = 15; this.lblLastMonthIncomeAmount.TabIndex = 15;
this.label13.Text = "0"; this.lblLastMonthIncomeAmount.Text = "0";
// //
// label12 // lblThisMonthIncomeAmount
// //
this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblThisMonthIncomeAmount.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label12.AutoSize = true; this.lblThisMonthIncomeAmount.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblThisMonthIncomeAmount.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label12.Location = new System.Drawing.Point(924, 30); this.lblThisMonthIncomeAmount.Location = new System.Drawing.Point(924, 30);
this.label12.Name = "label12"; this.lblThisMonthIncomeAmount.Name = "lblThisMonthIncomeAmount";
this.label12.Size = new System.Drawing.Size(18, 20); this.lblThisMonthIncomeAmount.Size = new System.Drawing.Size(18, 20);
this.label12.TabIndex = 15; this.lblThisMonthIncomeAmount.TabIndex = 15;
this.label12.Text = "0"; this.lblThisMonthIncomeAmount.Text = "0";
// //
// label11 // lblYesterdayIncomeAmount
// //
this.label11.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblYesterdayIncomeAmount.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label11.AutoSize = true; this.lblYesterdayIncomeAmount.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblYesterdayIncomeAmount.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label11.Location = new System.Drawing.Point(617, 30); this.lblYesterdayIncomeAmount.Location = new System.Drawing.Point(617, 30);
this.label11.Name = "label11"; this.lblYesterdayIncomeAmount.Name = "lblYesterdayIncomeAmount";
this.label11.Size = new System.Drawing.Size(18, 20); this.lblYesterdayIncomeAmount.Size = new System.Drawing.Size(18, 20);
this.label11.TabIndex = 15; this.lblYesterdayIncomeAmount.TabIndex = 15;
this.label11.Text = "0"; this.lblYesterdayIncomeAmount.Text = "0";
// //
// label10 // lblSevenDaysSaleVolume
// //
this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblSevenDaysSaleVolume.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label10.AutoSize = true; this.lblSevenDaysSaleVolume.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblSevenDaysSaleVolume.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label10.Location = new System.Drawing.Point(310, 30); this.lblSevenDaysSaleVolume.Location = new System.Drawing.Point(310, 30);
this.label10.Name = "label10"; this.lblSevenDaysSaleVolume.Name = "lblSevenDaysSaleVolume";
this.label10.Size = new System.Drawing.Size(18, 20); this.lblSevenDaysSaleVolume.Size = new System.Drawing.Size(18, 20);
this.label10.TabIndex = 15; this.lblSevenDaysSaleVolume.TabIndex = 15;
this.label10.Text = "0"; this.lblSevenDaysSaleVolume.Text = "0";
// //
// label8 // label8
// //
@@ -393,21 +396,22 @@ namespace TemuKJD.KJDForms.ShopForms
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "今日销量"; this.label1.Text = "今日销量";
// //
// label9 // lblSaleVolume
// //
this.label9.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblSaleVolume.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label9.AutoSize = true; this.lblSaleVolume.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 11F); this.lblSaleVolume.Font = new System.Drawing.Font("微软雅黑", 11F);
this.label9.Location = new System.Drawing.Point(3, 30); this.lblSaleVolume.Location = new System.Drawing.Point(3, 30);
this.label9.Name = "label9"; this.lblSaleVolume.Name = "lblSaleVolume";
this.label9.Size = new System.Drawing.Size(18, 20); this.lblSaleVolume.Size = new System.Drawing.Size(18, 20);
this.label9.TabIndex = 14; this.lblSaleVolume.TabIndex = 14;
this.label9.Text = "0"; this.lblSaleVolume.Text = "0";
// //
// splitContainer2 // splitContainer2
// //
this.splitContainer2.BackColor = System.Drawing.Color.White; this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0); this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
@@ -423,14 +427,14 @@ namespace TemuKJD.KJDForms.ShopForms
// //
this.splitContainer2.Panel2.Controls.Add(this.statusBar); this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1438, 456); this.splitContainer2.Size = new System.Drawing.Size(1438, 456);
this.splitContainer2.SplitterDistance = 422; this.splitContainer2.SplitterDistance = 426;
this.splitContainer2.TabIndex = 0; this.splitContainer2.TabIndex = 0;
// //
// pbLoading // pbLoading
// //
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(694, 186); this.pbLoading.Location = new System.Drawing.Point(694, 188);
this.pbLoading.Name = "pbLoading"; this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -442,19 +446,19 @@ namespace TemuKJD.KJDForms.ShopForms
// //
this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false; this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect, this.colSelect,
@@ -469,30 +473,21 @@ namespace TemuKJD.KJDForms.ShopForms
this.colHighPriceLimitNumber, this.colHighPriceLimitNumber,
this.colAboutToSellOutNumber, this.colAboutToSellOutNumber,
this.colAdvicePrepareSkcNumber, this.colAdvicePrepareSkcNumber,
this.colYesterdayAmountReceived, this.colYesterdayIncomeAmount,
this.colThisMonthAmountReceived, this.colThisMonthIncomeAmount,
this.colLastMonthAmountReceived, this.colLastMonthIncomeAmount,
this.colBalance, this.colAvailableBalance,
this.colBond}); this.colMallDepositLimitAmount,
this.colWithdrawCashAmount});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0); this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop"; this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true; this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 36; this.dgvShop.RowHeadersWidth = 36;
this.dgvShop.RowTemplate.Height = 23; this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(1430, 422); this.dgvShop.Size = new System.Drawing.Size(1430, 426);
this.dgvShop.TabIndex = 5; this.dgvShop.TabIndex = 5;
// this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
// 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(1438, 29);
this.statusBar.TabIndex = 1;
// //
// colSelect // colSelect
// //
@@ -572,35 +567,52 @@ namespace TemuKJD.KJDForms.ShopForms
this.colAdvicePrepareSkcNumber.Name = "colAdvicePrepareSkcNumber"; this.colAdvicePrepareSkcNumber.Name = "colAdvicePrepareSkcNumber";
this.colAdvicePrepareSkcNumber.ReadOnly = true; this.colAdvicePrepareSkcNumber.ReadOnly = true;
// //
// colYesterdayAmountReceived // colYesterdayIncomeAmount
// //
this.colYesterdayAmountReceived.HeaderText = "昨日到账金额"; this.colYesterdayIncomeAmount.HeaderText = "昨日到账金额";
this.colYesterdayAmountReceived.Name = "colYesterdayAmountReceived"; this.colYesterdayIncomeAmount.Name = "colYesterdayIncomeAmount";
this.colYesterdayAmountReceived.ReadOnly = true; this.colYesterdayIncomeAmount.ReadOnly = true;
// //
// colThisMonthAmountReceived // colThisMonthIncomeAmount
// //
this.colThisMonthAmountReceived.HeaderText = "本月到账金额"; this.colThisMonthIncomeAmount.HeaderText = "本月到账金额";
this.colThisMonthAmountReceived.Name = "colThisMonthAmountReceived"; this.colThisMonthIncomeAmount.Name = "colThisMonthIncomeAmount";
this.colThisMonthAmountReceived.ReadOnly = true; this.colThisMonthIncomeAmount.ReadOnly = true;
// //
// colLastMonthAmountReceived // colLastMonthIncomeAmount
// //
this.colLastMonthAmountReceived.HeaderText = "上月到账金额"; this.colLastMonthIncomeAmount.HeaderText = "上月到账金额";
this.colLastMonthAmountReceived.Name = "colLastMonthAmountReceived"; this.colLastMonthIncomeAmount.Name = "colLastMonthIncomeAmount";
this.colLastMonthAmountReceived.ReadOnly = true; this.colLastMonthIncomeAmount.ReadOnly = true;
// //
// colBalance // colAvailableBalance
// //
this.colBalance.HeaderText = "可用余额"; this.colAvailableBalance.HeaderText = "可提现余额";
this.colBalance.Name = "colBalance"; this.colAvailableBalance.Name = "colAvailableBalance";
this.colBalance.ReadOnly = true; this.colAvailableBalance.ReadOnly = true;
// //
// colBond // colMallDepositLimitAmount
// //
this.colBond.HeaderText = "账户预留金额"; this.colMallDepositLimitAmount.HeaderText = "账户预留金额";
this.colBond.Name = "colBond"; this.colMallDepositLimitAmount.Name = "colMallDepositLimitAmount";
this.colBond.ReadOnly = true; this.colMallDepositLimitAmount.ReadOnly = true;
//
// colWithdrawCashAmount
//
this.colWithdrawCashAmount.HeaderText = "提现总金额";
this.colWithdrawCashAmount.Name = "colWithdrawCashAmount";
this.colWithdrawCashAmount.ReadOnly = true;
//
// 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(1438, 26);
this.statusBar.TabIndex = 1;
// //
// ShopStatisticsForm // ShopStatisticsForm
// //
@@ -650,14 +662,14 @@ namespace TemuKJD.KJDForms.ShopForms
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label lblSaleVolume;
private System.Windows.Forms.Label label16; private System.Windows.Forms.Label lblWithdrawCashAmount;
private System.Windows.Forms.Label label15; private System.Windows.Forms.Label lblAvailableBalance;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label lblMallDepositLimitAmount;
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label lblLastMonthIncomeAmount;
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label lblThisMonthIncomeAmount;
private System.Windows.Forms.Label label11; private System.Windows.Forms.Label lblYesterdayIncomeAmount;
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label lblSevenDaysSaleVolume;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
@@ -670,10 +682,11 @@ namespace TemuKJD.KJDForms.ShopForms
private System.Windows.Forms.DataGridViewTextBoxColumn colHighPriceLimitNumber; private System.Windows.Forms.DataGridViewTextBoxColumn colHighPriceLimitNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn colAboutToSellOutNumber; private System.Windows.Forms.DataGridViewTextBoxColumn colAboutToSellOutNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn colAdvicePrepareSkcNumber; private System.Windows.Forms.DataGridViewTextBoxColumn colAdvicePrepareSkcNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn colYesterdayAmountReceived; private System.Windows.Forms.DataGridViewTextBoxColumn colYesterdayIncomeAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colThisMonthAmountReceived; private System.Windows.Forms.DataGridViewTextBoxColumn colThisMonthIncomeAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colLastMonthAmountReceived; private System.Windows.Forms.DataGridViewTextBoxColumn colLastMonthIncomeAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colBalance; private System.Windows.Forms.DataGridViewTextBoxColumn colAvailableBalance;
private System.Windows.Forms.DataGridViewTextBoxColumn colBond; private System.Windows.Forms.DataGridViewTextBoxColumn colMallDepositLimitAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colWithdrawCashAmount;
} }
} }
@@ -1,6 +1,8 @@
using AllBase.Helper; using AllBase;
using AllBase.Helper;
using AllBase.Model.Result; using AllBase.Model.Result;
using NaiBa.Util.Extension; using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -11,11 +13,16 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TemuKJD.Extension; using TemuKJD.Extension;
using TemuKJD.KJDForms.BaseForms;
namespace TemuKJD.KJDForms.ShopForms namespace TemuKJD.KJDForms.ShopForms
{ {
public partial class ShopStatisticsForm : Form public partial class ShopStatisticsForm : Form
{ {
public List<ShopStatisticsInfo> lstShopStatisticsInfo = new List<ShopStatisticsInfo>();
public bool IsOperate = false;
public bool isFirstLoad = false;
public ShopStatisticsForm() public ShopStatisticsForm()
{ {
InitializeComponent(); InitializeComponent();
@@ -23,7 +30,7 @@ namespace TemuKJD.KJDForms.ShopForms
private void ShopStatisticsForm_Load(object sender, EventArgs e) private void ShopStatisticsForm_Load(object sender, EventArgs e)
{ {
this.dgvShop.AddSelectorColumn("colSelect");
} }
private void ShopStatisticsForm_VisibleChanged(object sender, EventArgs e) private void ShopStatisticsForm_VisibleChanged(object sender, EventArgs e)
@@ -34,6 +41,7 @@ namespace TemuKJD.KJDForms.ShopForms
private void RefreshShop() private void RefreshShop()
{ {
this.pbLoading.Visible = true;
// 店铺Id // 店铺Id
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
@@ -45,12 +53,70 @@ namespace TemuKJD.KJDForms.ShopForms
{ {
dgvShop.Rows.Remove(row); dgvShop.Rows.Remove(row);
} }
// 绑定其他店铺(含新导入的店铺) // 获取被删除的统计信息并删除
List<ShopStatisticsInfo> statisticsDeleteLst = lstShopStatisticsInfo.Where(row
=> !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.shop_id.ToString())).ToList();
foreach (var s in statisticsDeleteLst)
{
lstShopStatisticsInfo.Remove(s);
}
// 绑定店铺(含新导入的店铺)
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList) foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
{ {
if (!string.IsNullOrEmpty(shopEntity.ShopId)) if (!string.IsNullOrEmpty(shopEntity.ShopId))
BindShop(shopEntity, selectIds); BindShop(shopEntity, selectIds);
} }
GetShopStatistics(GlobalConfig.ShopLoginList.ToList(), selectIds);
}
private void GetShopStatistics(List<ShopLoginInfo> shops, List<string> selectIds)
{
Task.Run(() =>
{
foreach (ShopLoginInfo shopEntity in shops)
{
if (string.IsNullOrEmpty(shopEntity.ShopId))
continue;
bool canUse = shopEntity.LoginStatus == "登录成功" && shopEntity.LoginStatus2 == "国际版在线";
if (!canUse)
{
BindShop(shopEntity, selectIds);
continue;
}
ShopStatisticsInfo statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.shop_id.ToString() == shopEntity.ShopId);
if (statistics == null)
{
statistics = new ShopStatisticsInfo()
{
notes = shopEntity.Notes,
shop_id = shopEntity.ShopId.ParseToLong(),
shop_account = shopEntity.ShopAccount,
};
lstShopStatisticsInfo.Add(statistics);
}
GetShopStatistics(shopEntity, statistics);
Invoke(new Action(() =>
{
this.lblSaleVolume.Text = this.lstShopStatisticsInfo.Sum(s => s.saleVolume).ToString();
this.lblSevenDaysSaleVolume.Text = this.lstShopStatisticsInfo.Sum(s => s.sevenDaysSaleVolume).ToString();
this.lblYesterdayIncomeAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.yesterdayIncomeAmount).ToString();
this.lblThisMonthIncomeAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.thisMonthIncomeAmount).ToString();
this.lblLastMonthIncomeAmount.Text = this.lstShopStatisticsInfo.Sum(s => s.lastMonthIncomeAmount).ToString();
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);
}));
}
Invoke(new Action(() =>
{
this.pbLoading.Visible = false;
}));
});
} }
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null) private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
@@ -60,24 +126,48 @@ namespace TemuKJD.KJDForms.ShopForms
if (selectShopId == null) if (selectShopId == null)
selectShopId = new List<string>(); selectShopId = new List<string>();
ShopStatisticsInfo statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.shop_id.ToString() == shopEntity.ShopId);
if (statistics == null)
{
statistics = new ShopStatisticsInfo()
{
notes = shopEntity.Notes,
shop_id = shopEntity.ShopId.ParseToLong(),
shop_account = shopEntity.ShopAccount,
};
lstShopStatisticsInfo.Add(statistics);
}
bool canUse = shopEntity.LoginStatus == "登录成功" && shopEntity.LoginStatus2 == "国际版在线"; bool canUse = shopEntity.LoginStatus == "登录成功" && shopEntity.LoginStatus2 == "国际版在线";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault( var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(
p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId);
if (row == null) if (row == null)
{ {
int id = this.dgvShop.Rows.Add( int rowId = this.dgvShop.Rows.Add(
true && canUse, false,
canUse ? "在线" : "掉线", canUse ? "在线" : "掉线",
shopEntity.LoginName, shopEntity.LoginName,
shopEntity.ShopId, shopEntity.ShopId,
shopEntity.ShopAccount, shopEntity.ShopAccount,
shopEntity.Notes, shopEntity.Notes,
string.Empty statistics.onSaleProductNumber == null ? "-" : statistics.onSaleProductNumber.ToString(), //在售商品数
statistics.saleVolume == null ? "-" : statistics.saleVolume.ToString(), //今日销量
statistics.sevenDaysSaleVolume == null ? "-" : statistics.sevenDaysSaleVolume.ToString(), //7日销量
statistics.highPriceLimitNumber == null ? "-" : statistics.highPriceLimitNumber.ToString(), //高价限流商品数
statistics.aboutToSellOutNumber == null ? "-" : statistics.aboutToSellOutNumber.ToString(), //即将售罄
statistics.advicePrepareSkcNumber == null ? "-" : statistics.advicePrepareSkcNumber.ToString(), //建议备货
statistics.yesterdayIncomeAmount,
statistics.thisMonthIncomeAmount,
statistics.lastMonthIncomeAmount,
statistics.availableBalance,
statistics.mallDepositLimitAmount,
statistics.withdrawCashAmount
); );
row = dgvShop.Rows[id]; row = dgvShop.Rows[rowId];
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
row.Height = 32; row.Height = 32;
} }
else else
@@ -86,27 +176,354 @@ namespace TemuKJD.KJDForms.ShopForms
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.Green : Color.Red; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
row.Cells["colShopLoginName"].Value = shopEntity.LoginName; row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
row.Cells["colShopName"].Value = shopEntity.ShopAccount; row.Cells["colShopAccount"].Value = shopEntity.ShopAccount;
row.Cells["colShopNotes"].Value = shopEntity.Notes; row.Cells["colNotes"].Value = shopEntity.Notes;
row.Cells["colOnSaleProductNumber"].Value = statistics.onSaleProductNumber == null ? "-" : statistics.onSaleProductNumber.ToString(); //在售商品数
row.Cells["colSaleVolume"].Value = statistics.saleVolume == null ? "-" : statistics.saleVolume.ToString(); //今日销量
row.Cells["colSevenDaysSaleVolume"].Value = statistics.sevenDaysSaleVolume == null ? "-" : statistics.sevenDaysSaleVolume.ToString(); //7日销量
row.Cells["colHighPriceLimitNumber"].Value = statistics.highPriceLimitNumber == null ? "-" : statistics.highPriceLimitNumber.ToString(); //高价限流商品数
row.Cells["colAboutToSellOutNumber"].Value = statistics.aboutToSellOutNumber == null ? "-" : statistics.aboutToSellOutNumber.ToString(); //即将售罄
row.Cells["colAdvicePrepareSkcNumber"].Value = statistics.advicePrepareSkcNumber == null ? "-" : statistics.advicePrepareSkcNumber.ToString(); //建议备货
row.Cells["colYesterdayIncomeAmount"].Value = statistics.yesterdayIncomeAmount;
row.Cells["colThisMonthIncomeAmount"].Value = statistics.thisMonthIncomeAmount;
row.Cells["colLastMonthIncomeAmount"].Value = statistics.lastMonthIncomeAmount;
row.Cells["colAvailableBalance"].Value = statistics.availableBalance;
row.Cells["colMallDepositLimitAmount"].Value = statistics.mallDepositLimitAmount;
row.Cells["colWithdrawCashAmount"].Value = statistics.withdrawCashAmount;
} }
} }
private string GetMainStatistics(ShopLoginInfo shop, List<string> adjustIdList, string refuseReason) private void GetShopStatistics(ShopLoginInfo shop, ShopStatisticsInfo statistics, List<string> selectShopId = null)
{
if (statistics.is_search_1 != true)
{
try
{
string html = GetMainStatistics(shop);
if (html.Contains("\"success\":true"))
{
statistics.aboutToSellOutNumber = BaseRegex.GetNullableIntJson(ref html, "aboutToSellOutNumber");
statistics.adjustPrice = BaseRegex.GetNullableIntJson(ref html, "adjustPrice");
statistics.advicePrepareSkcNumber = BaseRegex.GetNullableIntJson(ref html, "advicePrepareSkcNumber");
statistics.alreadySoldOutNumber = BaseRegex.GetNullableIntJson(ref html, "alreadySoldOutNumber");
statistics.havePublishProduct = BaseRegex.GetNullableBoolJson(ref html, "havePublishProduct");
statistics.highPriceLimitNumber = BaseRegex.GetNullableIntJson(ref html, "highPriceLimitNumber");
statistics.lackSkcNumber = BaseRegex.GetNullableIntJson(ref html, "lackSkcNumber");
statistics.onSaleProductNumber = BaseRegex.GetNullableIntJson(ref html, "onSaleProductNumber");
statistics.qualityAfterSaleRatio90d = BaseRegex.GetNullableIntJson(ref html, "qualityAfterSaleRatio90d");
statistics.reviewAdjustPrice = BaseRegex.GetNullableIntJson(ref html, "reviewAdjustPrice");
statistics.saleVolume = BaseRegex.GetNullableIntJson(ref html, "saleVolume");
statistics.sevenDaysSaleVolume = BaseRegex.GetNullableIntJson(ref html, "sevenDaysSaleVolume");
statistics.thirtyDaysSaleVolume = BaseRegex.GetNullableIntJson(ref html, "thirtyDaysSaleVolume");
statistics.waitProductNumber = BaseRegex.GetNullableIntJson(ref html, "waitProductNumber");
statistics.is_search_1 = true;
}
else
{
string errStr = BaseRegex.GetStringJson(ref html, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = html;
if (errStr.Contains("Invalid Login State"))
{
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = errStr;
return;
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
}
catch (Exception ex)
{
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = ex.Message;
return;
}
}
if (statistics.is_search_2 != true)
{
try
{
string html = GetFundDaily(shop, DateTime.Now.Date.AddDays(-1));
if (html.Contains("\"success\":true"))
{
JObject jObj = JObject.Parse(html);
string jStr = JsonHelper.SerializeObject(jObj["result"]["resultList"][0]);
statistics.yesterdayIncomeAmount = BaseRegex.GetStringJson(ref jStr, "incomeAmount").Split('¥').LastOrDefault().ParseToDecimal();
statistics.is_search_2 = true;
}
else
{
string errStr = BaseRegex.GetStringJson(ref html, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = html;
if (errStr.Contains("Invalid Login State"))
{
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = errStr;
return;
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
}
catch (Exception ex)
{
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = ex.Message;
return;
}
}
if (statistics.is_search_3 != true)
{
try
{
string html = GetFundMonthly(shop, DateTime.Now.Date);
string html2 = "\"success\":true";
if (DateTime.Now.ToString("MM") == "01")
html2 = GetFundMonthly(shop, DateTime.Now.Date.AddYears(-1));
if (html.Contains("\"success\":true") && html2.Contains("\"success\":true"))
{
JObject jObj = JObject.Parse(html);
string jStr = JsonHelper.SerializeObject(jObj["result"]["resultList"][0]);
statistics.thisMonthIncomeAmount = BaseRegex.GetStringJson(ref jStr, "incomeAmount").Split('¥').LastOrDefault().ParseToDecimal();
if (jObj["result"]["resultList"].Count() > 1)
{
jStr = JsonHelper.SerializeObject(jObj["result"]["resultList"][1]);
statistics.lastMonthIncomeAmount = BaseRegex.GetStringJson(ref jStr, "incomeAmount").Split('¥').LastOrDefault().ParseToDecimal();
}
else
{
jObj = JObject.Parse(html2);
jStr = JsonHelper.SerializeObject(jObj["result"]["resultList"][0]);
statistics.lastMonthIncomeAmount = BaseRegex.GetStringJson(ref jStr, "incomeAmount").Split('¥').LastOrDefault().ParseToDecimal();
}
statistics.is_search_3 = true;
}
else
{
string errStr = BaseRegex.GetStringJson(ref html, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html2, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html2, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = html.Contains("\"success\":true") ? html2 : html;
if (errStr.Contains("Invalid Login State"))
{
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = errStr;
return;
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
}
catch (Exception ex)
{
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = ex.Message;
return;
}
}
if (statistics.is_search_4 != true)
{
try
{
string html = GetAccountAmount(shop);
string html2 = GetWithdrawCash(shop);
if (html.Contains("\"success\":true") && html2.Contains("\"success\":true"))
{
string jStr = html;
statistics.availableBalance = BaseRegex.GetStringJson(ref jStr, "availableBalance").Split('¥').LastOrDefault().ParseToDecimal();
statistics.mallDepositThreshold = BaseRegex.GetStringJson(ref jStr, "mallDepositThreshold").Split('¥').LastOrDefault().ParseToDecimal();
statistics.mallDepositLimitAmount = BaseRegex.GetStringJson(ref jStr, "mallDepositLimitAmount").Split('¥').LastOrDefault().ParseToDecimal();
var jObj = JObject.Parse(html2);
statistics.withdrawCashAmount = 0;
foreach (var item in jObj["result"]["resultList"])
{
jStr = JsonHelper.SerializeObject(item);
if (!item["withdrawCashStatus"].IsNullOrEmpty() && item["withdrawCashStatus"].ParseToString() == "银行受理成功" &&
!item["fundAccount"].IsNullOrEmpty() && item["fundAccount"].ParseToString() == "货款提现")
{
statistics.withdrawCashAmount += BaseRegex.GetDecimalJson(ref jStr, "digitalText");
}
}
statistics.is_search_4 = true;
}
else
{
string errStr = BaseRegex.GetStringJson(ref html, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html2, "errorMsg");
if (string.IsNullOrEmpty(errStr))
errStr = errStr = BaseRegex.GetStringJson(ref html2, "error_msg");
if (string.IsNullOrEmpty(errStr))
errStr = html.Contains("\"success\":true") ? html2 : html;
if (errStr.Contains("Invalid Login State"))
{
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = errStr;
return;
}
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
}
catch (Exception ex)
{
System.Threading.Thread.Sleep(Randomx.GetId(100, 200));
statistics.err_msg = ex.Message;
return;
}
}
}
private string GetMainStatistics(ShopLoginInfo shop)
{ {
string url = "https://agentseller.temu.com/bg/swift/api/common/statistics/web/queryStatisticDataFullManaged"; string url = "https://agentseller.temu.com/bg/swift/api/common/statistics/web/queryStatisticDataFullManaged";
string body = "{\"adjustList\":["; string body = @"{}";
foreach (var adjustId in adjustIdList) string refere = "https://agentseller.temu.com/";
{
body += "{\"adjustId\":" + adjustId + ",\"result\":2,\"reason\":\"" + refuseReason + "\"},";
}
body = body.TrimEnd(',');
body += "]}";
string refere = "https://agentseller.temu.com/main/adjust-price-manage/order-price";
return KJDHttpResponse.PostResponse2(shop, url, body, refere); return KJDHttpResponse.PostResponse2(shop, url, body, refere);
} }
private string GetFundDaily(ShopLoginInfo shop, DateTime date)
{
string url = "https://seller.kuajingmaihuo.com/api/merchant/fund/detail/daily";
string body = @"{""month"":""" + date.ToString("yyyy-MM") + @"""}";
string refere = "https://seller.kuajingmaihuo.com/labor/bill";
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private string GetFundMonthly(ShopLoginInfo shop, DateTime date)
{
string url = "https://seller.kuajingmaihuo.com/api/merchant/fund/detail/monthly";
string body = @"{""year"":""" + date.ToString("yyyy") + @"""}";
string refere = "https://seller.kuajingmaihuo.com/labor/bill";
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
/// <summary>
/// 资金总览
/// </summary>
/// <param name="shop"></param>
/// <returns></returns>
private string GetAccountAmount(ShopLoginInfo shop)
{
string url = "https://seller.kuajingmaihuo.com/api/merchant/payment/account/amount/info";
string body = @"{}";
string refere = "https://seller.kuajingmaihuo.com/labor/account";
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
/// <summary>
/// 提现记录
/// </summary>
/// <param name="shop"></param>
/// <returns></returns>
private string GetWithdrawCash(ShopLoginInfo shop, int page = 1)
{
string url = "https://seller.kuajingmaihuo.com/api/merchant/payment/account/withdraw/cash/record";
string body = @"{""page"":" + page + @",""pageSize"":100}";
string refere = "https://seller.kuajingmaihuo.com/labor/account";
return KJDHttpResponse.PostResponse(shop, url, body, refere);
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string loginName = dgvShop.Rows[e.RowIndex].Cells["colShopLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
switch (headerText)
{
case "检测":
break;
case "进入店铺":
IsOperate = true;
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
//shopLoginForm.Parent = this;
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://agentseller.temu.com";
shopLoginForm.Show();
IsOperate = false;
}
break;
case "状态":
IsOperate = true;
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.chkCloseAfterLogin.Checked = false;
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ToString() == loginName);
bool canUse = shop.LoginStatus == "登录成功" && shop.LoginStatus2 == "国际版在线";
foreach (var row in rows)
{
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
}
}
IsOperate = false;
break;
default:
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value;
break;
}
}
private void btnGetNotGet_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void btnGetSelect_Click(object sender, EventArgs e)
{
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
var shopList = GlobalConfig.ShopLoginList.Where(s => selectIds.Contains(s.ShopId)).ToList();
foreach (var shop in shopList)
{
ShopStatisticsInfo statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.shop_id.ToString() == shop.ShopId);
if (statistics != null)
statistics.is_search_1 = statistics.is_search_2 = statistics.is_search_3 = statistics.is_search_4 = false;
}
this.pbLoading.Visible = true;
GetShopStatistics(shopList, selectIds);
}
} }
} }
@@ -153,19 +153,22 @@
<metadata name="colAdvicePrepareSkcNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colAdvicePrepareSkcNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colYesterdayAmountReceived.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colYesterdayIncomeAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colThisMonthAmountReceived.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colThisMonthIncomeAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colLastMonthAmountReceived.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colLastMonthIncomeAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colBalance.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colAvailableBalance.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colBond.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colMallDepositLimitAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colWithdrawCashAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
</root> </root>
+35
View File
@@ -21,6 +21,7 @@ using System.Threading.Tasks;
using Work; using Work;
using Work.DouyinApiClass; using Work.DouyinApiClass;
using AllBase.Model.Param.TemuProductManage; using AllBase.Model.Param.TemuProductManage;
using TemuKJD.KJDForms.ShopForms;
namespace TemuKJD namespace TemuKJD
{ {
@@ -216,6 +217,40 @@ namespace TemuKJD
//} //}
}); });
#endregion #endregion
#region 读取库存信息
Task.Run(() =>
{
while (!IsShopInit)
{
Thread.Sleep(100);
}
ReturnPackageDetailForm retrunPackageForm = new ReturnPackageDetailForm(null);
retrunPackageForm.Show();
retrunPackageForm.Hide();
Dictionary<ShopLoginInfo, string> dicUpReturn = new Dictionary<ShopLoginInfo, string>();
while(true)
{
foreach(var shop in GlobalConfig.ShopLoginList)
{
if (string.IsNullOrEmpty(shop.ShopId))
continue;
if (dicUpReturn.Keys.Contains(shop) && dicUpReturn[shop] == DateTime.Now.ToString("yyyyMMdd")) //今日已获取过
continue;
var rst = retrunPackageForm.GetReturnPackage(shop, true);
if (rst == false && shop.LoginStatus == "登录成功" && shop.LoginStatus2 == "国际版在线")
{
dicUpReturn[shop] = DateTime.Now.ToString("yyyyMMdd");
}
}
Thread.Sleep(1000 * 60 * 60);
}
});
#endregion
} }
public static void InitProxy() public static void InitProxy()