1优化店铺查询 2数据库上传次数统计优化

This commit is contained in:
wule committed 2026-01-05 21:14:45 +08:00
1 parent ed5aec05ca
commit ba5dfe3264
18 files changed
+414 -186

No files matched your search

@@ -43,7 +43,14 @@ namespace TemuKJD.KJDForms.ProductForms
private void JoinDeliveryFrom_Load(object sender, EventArgs e)
{
ucSplitPage1.Visible = IsAdmin;
btnRefreshShop.Visible = IsAdmin;
btnRefreshShop.Visible = !IsAdmin;
if (BaseClass.GroupId != 3 || IsAdmin)
{
this.txtSubAccount.Visible = false;
this.lblSubAccount.Visible = false;
this.txtNotes.Width = txtShopName.Width;
}
dgvShop.AddSelectorColumn("colSelect");
dgvStock.AddSelectorColumn("colCheck");
dgvStock.AddImgColumn("colProductSkcPic", "colImgUrl");
@@ -59,12 +66,14 @@ namespace TemuKJD.KJDForms.ProductForms
this.txtShopName.Text = joinDeliveryConfig.SearchShopName;
this.txtRetryInterval.Text = Math.Max(1, joinDeliveryConfig.RetryInterval).ParseToString();
this.chkSearchAllShop.Checked = joinDeliveryConfig.SearchAllShop;
this.txtSubAccount.Text = joinDeliveryConfig.SearchSubAccount;
this.txtNotes.TextChanged += Txt_TextChanged;
this.txtShopId.TextChanged += Txt_TextChanged;
this.txtShopName.TextChanged += Txt_TextChanged;
this.txtRetryInterval.TextChanged += Txt_TextChanged;
this.chkSearchAllShop.CheckedChanged += Txt_TextChanged;
this.txtSubAccount.TextChanged += Txt_TextChanged;
}
private void Txt_TextChanged(object sender, EventArgs e)
@@ -74,6 +83,7 @@ namespace TemuKJD.KJDForms.ProductForms
joinDeliveryConfig.SearchShopName = this.txtShopName.Text.Trim();
joinDeliveryConfig.RetryInterval = Math.Max(1, this.txtRetryInterval.Text.Trim().ParseToInt());
joinDeliveryConfig.SearchAllShop = this.chkSearchAllShop.Checked;
joinDeliveryConfig.SearchSubAccount = this.txtSubAccount.Text.Trim();
if (IsAdmin)
NaiBa.Util.Helper.ConfigHelper.SaveConfig("admin_join_delivery_config", joinDeliveryConfig);
@@ -179,6 +189,7 @@ namespace TemuKJD.KJDForms.ProductForms
"&page_size=" + pageSize +
"&shop_ids=" + txtShopId.Text.Trim().Trim(',') +
"&shop_names=" + txtShopName.Text.Trim().Trim(',') +
"&shop_names=" + txtShopName.Text.Trim().Trim(',') +
"&search_notes=" + txtNotes.Text.Trim().Trim(',');
//if (BaseClass.SaLevel > 1 && !chkSearchAllShop.Checked)
// data += "&operate_sub_sa_name=" + BaseClass.UserName;
@@ -246,7 +257,14 @@ namespace TemuKJD.KJDForms.ProductForms
}
if (!string.IsNullOrWhiteSpace(txtNotes.Text.Trim()))
{
shopLst = shopLst.Where(s => ("," + txtNotes.Text.Trim() + ",").Contains("," + s.Notes + ",") || s.Notes.ToLower().Contains(txtNotes.Text.Trim().ToLower())).ToList();
shopLst = shopLst.Where(s => ("," + txtNotes.Text.Trim().ToLower() + ",").Contains("," + s.Notes.ToLower() + ",") || s.Notes.ToLower().Contains(txtNotes.Text.Trim().ToLower())).ToList();
}
if (BaseClass.GroupId == 3 && !IsAdmin)
{
if (!string.IsNullOrWhiteSpace(txtSubAccount.Text.Trim()))
{
shopLst = shopLst.Where(s => ("," + txtSubAccount.Text.Trim() + ",").Contains("," + s.SubUserName + ",") || s.SubUserName.Contains(txtSubAccount.Text.Trim())).ToList();
}
}
// 获取被删除的店铺
@@ -304,6 +322,8 @@ namespace TemuKJD.KJDForms.ProductForms
private void btnEmpty_Click(object sender, EventArgs e)
{
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
txtSubAccount.Text = "";
FiltShop();
}
private void btnSearch_Click(object sender, EventArgs e)
@@ -877,6 +897,7 @@ namespace TemuKJD.KJDForms.ProductForms
public string SearchShopId { get; set; } = "";
public string SearchShopName { get; set; } = "";
public string SearchNotes { get; set; } = "";
public string SearchSubAccount { get; set; } = "";
/// <summary>
/// 重试加入发货台的时间间隔
/// </summary>