代发管理 爆款数据更新曝光量 店铺统计优化 增加反向物流考核功能
This commit is contained in:
1 parent
ad325eaec5
commit
ef35522b6a
42 files changed
+7102
-908
No files matched your search
@@ -42,9 +42,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
public bool IsLoadComplate { get; set; } = false;
|
||||
|
||||
public ConcurrentList<WXShopTokenInfo> lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
|
||||
public Dictionary<string, WxShopUploadInfo> dicShopUpload = new Dictionary<string, WxShopUploadInfo>();
|
||||
|
||||
WXAddFinderParam wxAddFinderParam = new WXAddFinderParam();
|
||||
|
||||
ChromiumWebBrowser mainWebBrowser = null;
|
||||
@@ -65,11 +62,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
this.splitContainer1.Dock = DockStyle.Fill;
|
||||
|
||||
// 授权Token
|
||||
lstWXShopTokenInfo = NaiBa.Util.Helper.ConfigHelper.LoadConfig<NaiBa.Util.ConcurrentList<WXShopTokenInfo>>("wx_shop_token_list");
|
||||
if (lstWXShopTokenInfo == null)
|
||||
lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
|
||||
|
||||
// 选中信息
|
||||
//dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
|
||||
//if (dicCheckedShopId == null)
|
||||
@@ -246,6 +238,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
cmbFilterShopNotes.Items.Add(note);
|
||||
}
|
||||
cmbFilterShopGroup.Items.Clear();
|
||||
foreach (var group in GlobalConfig.ShopLoginList.Select(s => s.GroupName).Where(s => !s.IsNullOrEmpty()).Distinct())
|
||||
{
|
||||
cmbFilterShopGroup.Items.Add(group);
|
||||
}
|
||||
pbLoadingShop.Visible = false;
|
||||
}
|
||||
|
||||
@@ -270,14 +267,13 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
shopEntity.ShopId,
|
||||
shopEntity.ShopAccount,
|
||||
shopEntity.Notes,
|
||||
shopEntity.GroupName,
|
||||
"选择商品",
|
||||
canUse ? "在线" : "掉线",
|
||||
GlobalConfig.lstWxShopAuthInfo.FirstOrDefault(sa => sa.ShopId == shopEntity.ShopId)?.ExpiresTime > DateTime.Now.AddMinutes(5) ? "可用" : "过期",
|
||||
canUse,
|
||||
dicShopUpload.ContainsKey(shopEntity.ShopId) && dicShopUpload[shopEntity.ShopId].DicDayUploadCount.ContainsKey(day) ?
|
||||
dicShopUpload[shopEntity.ShopId].DicDayUploadCount[day] : 0,
|
||||
dicShopUpload.ContainsKey(shopEntity.ShopId) && dicShopUpload[shopEntity.ShopId].OnSaleRefreshDay == DateTime.Now.ToString("yyyyMMdd").ParseToInt() ?
|
||||
dicShopUpload[shopEntity.ShopId].OnSaleCount : 0,
|
||||
GlobalConfig.dicWxShopUploadInfo.ContainsKey(shopEntity.ShopId) ? GlobalConfig.dicWxShopUploadInfo[shopEntity.ShopId].DicDayUploadCount[day] : 0,
|
||||
GlobalConfig.dicWxShopUploadInfo.ContainsKey(shopEntity.ShopId) ? GlobalConfig.dicWxShopUploadInfo[shopEntity.ShopId].OnSaleCount : 0,
|
||||
shopEntity.AddProductRemaining,
|
||||
msg
|
||||
);
|
||||
@@ -293,10 +289,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
row.Cells["colCanUse"].Value = canUse;
|
||||
row.Cells["colApi"].Value = GlobalConfig.lstWxShopAuthInfo.FirstOrDefault(sa => sa.ShopId == shopEntity.ShopId)?.ExpiresTime > DateTime.Now.AddMinutes(5) ? "可用" : "过期";
|
||||
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
|
||||
row.Cells["colUploadCount"].Value = dicShopUpload.ContainsKey(shopEntity.ShopId) && dicShopUpload[shopEntity.ShopId].DicDayUploadCount.ContainsKey(day) ?
|
||||
dicShopUpload[shopEntity.ShopId].DicDayUploadCount[day] : 0;
|
||||
row.Cells["colOnSaleNum"].Value = dicShopUpload.ContainsKey(shopEntity.ShopId) && dicShopUpload[shopEntity.ShopId].OnSaleRefreshDay == DateTime.Now.ToString("yyyyMMdd").ParseToInt() ?
|
||||
dicShopUpload[shopEntity.ShopId].OnSaleCount : 0;
|
||||
row.Cells["colUploadCount"].Value = GlobalConfig.dicWxShopUploadInfo.ContainsKey(shopEntity.ShopId) ? GlobalConfig.dicWxShopUploadInfo[shopEntity.ShopId].DicDayUploadCount[day] : 0;
|
||||
row.Cells["colOnSaleNum"].Value = GlobalConfig.dicWxShopUploadInfo.ContainsKey(shopEntity.ShopId) ? GlobalConfig.dicWxShopUploadInfo[shopEntity.ShopId].OnSaleCount : 0;
|
||||
row.Cells["colMessage"].Value = msg;
|
||||
}
|
||||
|
||||
@@ -665,13 +659,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
private void btnFilterShop_Click(object sender, EventArgs e)
|
||||
{
|
||||
string notes = cmbFilterShopNotes.Text.Trim().Trim(';');
|
||||
if (notes == "全部")
|
||||
notes = "";
|
||||
List<string> notesLst = notes.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
string group = cmbFilterShopGroup.Text.Trim().Trim(';');
|
||||
if (group == "全部")
|
||||
group = "";
|
||||
List<string> groupLst = group.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
foreach (DataGridViewRow row in dgvShop.Rows)
|
||||
{
|
||||
string notes = cmbFilterShopNotes.Text.Trim().Trim(';');
|
||||
if (notes == "全部")
|
||||
notes = "";
|
||||
List<string> notesLst = notes.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
if (!row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim()))
|
||||
{
|
||||
row.Visible = false;
|
||||
@@ -684,6 +683,12 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
row.Cells["colSelect"].Value = false;
|
||||
continue;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(group) && !groupLst.Contains(row.Cells["colGroup"].Value.ParseToString()))
|
||||
{
|
||||
row.Visible = false;
|
||||
row.Cells["colSelect"].Value = false;
|
||||
continue;
|
||||
}
|
||||
row.Visible = true;
|
||||
}
|
||||
}
|
||||
@@ -692,6 +697,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
txtFilterShopName.Text = "";
|
||||
cmbFilterShopNotes.Text = "全部";
|
||||
cmbFilterShopGroup.Text = "全部";
|
||||
btnFilterShop_Click(null, null);
|
||||
}
|
||||
|
||||
@@ -711,16 +717,24 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
notes = "";
|
||||
List<string> notesLst = notes.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
string group = cmbFilterShopGroup.Text.Trim().Trim(';');
|
||||
if (group == "全部")
|
||||
group = "";
|
||||
List<string> groupLst = group.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
foreach (DataGridViewRow row in dgvShop.Rows)
|
||||
{
|
||||
if (row.Visible == true)
|
||||
{
|
||||
if (row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim()) &&
|
||||
(string.IsNullOrWhiteSpace(notes) || notesLst.Contains(row.Cells["colShopNotes"].Value.ParseToString())))
|
||||
{
|
||||
row.Cells["colSelect"].Value = true;
|
||||
}
|
||||
}
|
||||
if (row.Visible == false)
|
||||
continue;
|
||||
|
||||
if (!row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim()))
|
||||
continue;
|
||||
if (!string.IsNullOrWhiteSpace(notes) && !notesLst.Contains(row.Cells["colShopNotes"].Value.ParseToString()))
|
||||
continue;
|
||||
if (!string.IsNullOrWhiteSpace(group) && !groupLst.Contains(row.Cells["colGroup"].Value.ParseToString()))
|
||||
continue;
|
||||
|
||||
row.Cells["colSelect"].Value = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -731,16 +745,24 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
notes = "";
|
||||
List<string> notesLst = notes.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
string group = cmbFilterShopGroup.Text.Trim().Trim(';');
|
||||
if (group == "全部")
|
||||
group = "";
|
||||
List<string> groupLst = group.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
|
||||
foreach (DataGridViewRow row in dgvShop.Rows)
|
||||
{
|
||||
if (row.Visible == true)
|
||||
{
|
||||
if (row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim()) &&
|
||||
(string.IsNullOrWhiteSpace(notes) || notesLst.Contains(row.Cells["colShopNotes"].Value.ParseToString())))
|
||||
{
|
||||
row.Cells["colSelect"].Value = false;
|
||||
}
|
||||
}
|
||||
if (row.Visible == false)
|
||||
continue;
|
||||
|
||||
if (!row.Cells["colShopName"].Value.ParseToString().Contains(txtFilterShopName.Text.Trim()))
|
||||
continue;
|
||||
if (!string.IsNullOrWhiteSpace(notes) && !notesLst.Contains(row.Cells["colShopNotes"].Value.ParseToString()))
|
||||
continue;
|
||||
if (!string.IsNullOrWhiteSpace(group) && !groupLst.Contains(row.Cells["colGroup"].Value.ParseToString()))
|
||||
continue;
|
||||
|
||||
row.Cells["colSelect"].Value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user