调整客户端所有页面支持 店铺id 名称 分组 筛选功能
This commit is contained in:
1 parent
a23020725a
commit
ec170f4285
33 files changed
+1571
-799
No files matched your search
@@ -42,7 +42,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
{
|
||||
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
|
||||
dgvShop.Columns["colSelect"].HeaderText = "";
|
||||
chkSelectAll.Width = chkSelectAll.Height = 13;
|
||||
//chkSelectAll.Width = chkSelectAll.Height = 13;
|
||||
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
|
||||
chkSelectAll.Checked = true;
|
||||
|
||||
@@ -97,22 +97,42 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
// 店铺Id
|
||||
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
|
||||
var shopLst = GlobalConfig.ShopLoginList.ToList();
|
||||
if (!string.IsNullOrWhiteSpace(txtShopId.Text.Trim()))
|
||||
{
|
||||
shopLst = shopLst.Where(s => ("," + txtShopId.Text.Trim() + ",").Contains("," + s.ShopId + ",") || s.ShopId.Contains(txtShopId.Text.Trim())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(txtShopName.Text.Trim()))
|
||||
{
|
||||
shopLst = shopLst.Where(s => ("," + txtShopName.Text.Trim() + ",").Contains("," + s.ShopAccount + ",") || s.ShopAccount.ToLower().Contains(txtShopName.Text.Trim().ToLower())).ToList();
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
// 获取被删除的店铺
|
||||
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
|
||||
=> !shopLst.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
|
||||
// 更新被删除的店铺列表
|
||||
foreach (var row in dgvRowList)
|
||||
{
|
||||
dgvShop.Rows.Remove(row);
|
||||
}
|
||||
// 绑定其他店铺(含新导入的店铺)
|
||||
foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList)
|
||||
foreach (ShopLoginInfo shopEntity in shopLst)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(shopEntity.ShopId))
|
||||
BindShop(shopEntity, selectIds);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnEmpty_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
|
||||
}
|
||||
|
||||
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null)
|
||||
{
|
||||
if (shopEntity == null)
|
||||
@@ -297,8 +317,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
"&search_skc=" + txtSKC.Text +
|
||||
"&search_ext_code=" + txtExtCode.Text +
|
||||
"&search_prod_name=" + txtProdName.Text +
|
||||
"&search_shop_id=" + txtShopId.Text +
|
||||
"&search_shop_account=" + txtShopName.Text +
|
||||
"&search_shop_id=" + txtSearchShopId.Text +
|
||||
"&search_shop_account=" + txtSearchShopName.Text +
|
||||
"&search_notes=" + (cmbNotes.Text == "全部" ? "" : cmbNotes.Text) +
|
||||
"&search_user_notes=" + (cmbUserNotes.Text == "全部" ? "" : cmbUserNotes.Text) +
|
||||
"&status=" + (cmbStatus.Text == "全部" ? "" : cmbStatus.Text) +
|
||||
@@ -474,8 +494,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
//this.txtCat.Text = "";
|
||||
this.txtExtCode.Text = "";
|
||||
this.txtProdName.Text = "";
|
||||
this.txtShopId.Text = "";
|
||||
this.txtShopName.Text = "";
|
||||
this.txtSearchShopId.Text = "";
|
||||
this.txtSearchShopName.Text = "";
|
||||
this.txtSKC.Text = "";
|
||||
this.txtSPU.Text = "";
|
||||
this.cmbStatus.Text = "待上传";
|
||||
|
||||
Reference in new issue
Block a user