商品进货价相关功能 完成度40%
This commit is contained in:
1 parent
6b6d63dd41
commit
eca6a8a9e7
23 files changed
+1912
-98
No files matched your search
@@ -81,7 +81,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
if (isBack)
|
||||
{
|
||||
endTime = this.dtpEndDate.Value.Date.AddDays(1);
|
||||
startTime = endTime.AddMonths(-1);
|
||||
startTime = endTime.AddMonths(-6);
|
||||
}
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
var t = Task.Run(() =>
|
||||
|
||||
+2
-2
@@ -83,7 +83,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 = 676;
|
||||
this.splitContainer1.SplitterDistance = 674;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -95,7 +95,7 @@
|
||||
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.Location = new System.Drawing.Point(651, 31);
|
||||
this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnReturnPackage.Name = "btnReturnPackage";
|
||||
this.btnReturnPackage.Size = new System.Drawing.Size(136, 25);
|
||||
|
||||
+27
-24
@@ -30,8 +30,8 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
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 dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.btnGetNotGet = new DevComponents.DotNetBar.PanelEx();
|
||||
@@ -55,7 +55,6 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -69,6 +68,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
this.colSaleOutSkcNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSoonSaleOutSkcNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colAdviceStockSkcNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -144,6 +144,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
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 = "查询未获取";
|
||||
this.btnGetNotGet.Click += new System.EventHandler(this.btnGetNotGet_Click);
|
||||
//
|
||||
// btnGetSelect
|
||||
//
|
||||
@@ -168,6 +169,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
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);
|
||||
//
|
||||
// ucGroupBoxEx1
|
||||
//
|
||||
@@ -413,19 +415,19 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
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;
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -449,17 +451,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
this.dgvShop.RowTemplate.Height = 23;
|
||||
this.dgvShop.Size = new System.Drawing.Size(1245, 383);
|
||||
this.dgvShop.TabIndex = 5;
|
||||
//
|
||||
// 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(1253, 26);
|
||||
this.statusBar.TabIndex = 1;
|
||||
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
@@ -545,6 +537,17 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
this.colAdviceStockSkcNum.Name = "colAdviceStockSkcNum";
|
||||
this.colAdviceStockSkcNum.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(1253, 26);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// ShopWorkStatisticsForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
|
||||
@@ -301,5 +301,84 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
|
||||
|
||||
return KJDHttpResponse.PostResponse2(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;
|
||||
}
|
||||
ReGetStatistics(rows.Select(s => s.Cells["colShopId"].Value.ParseToString()).ToList());
|
||||
}
|
||||
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();
|
||||
|
||||
ReGetStatistics(selectIds);
|
||||
}
|
||||
|
||||
void ReGetStatistics(List<string> reGetShopIds)
|
||||
{
|
||||
var shopList = GlobalConfig.ShopLoginList.Where(s => reGetShopIds.Contains(s.ShopId)).ToList();
|
||||
foreach (var shop in shopList)
|
||||
{
|
||||
ShopWorkStatisticsInfo statistics = lstShopStatisticsInfo.FirstOrDefault(s => s.shop_id.ToString() == shop.ShopId);
|
||||
if (statistics != null)
|
||||
statistics.is_search_1 = statistics.is_search_2 = false;
|
||||
}
|
||||
|
||||
this.pbLoading.Visible = true;
|
||||
GetShopStatistics(shopList, reGetShopIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user