调整客户端所有页面支持 店铺id 名称 分组 筛选功能
This commit is contained in:
1 parent
a23020725a
commit
ec170f4285
33 files changed
+1571
-799
No files matched your search
@@ -54,7 +54,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
|
||||
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;
|
||||
|
||||
this.dgvStock.AddSelectorColumn("colCheck");
|
||||
@@ -96,16 +96,31 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
// 店铺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);
|
||||
@@ -190,7 +205,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
|
||||
string searchText = txtStockid.Text.Trim();
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
//ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
ucGroupBoxEx4.Enabled = false;
|
||||
|
||||
@@ -358,7 +373,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
//ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
ucGroupBoxEx4.Enabled = true;
|
||||
string sRst = "查询结束!";
|
||||
@@ -594,7 +609,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
//ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
ucGroupBoxEx4.Enabled = true;
|
||||
}));
|
||||
@@ -626,7 +641,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
|
||||
string searchText = txtStockid.Text.Trim();
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
//ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
ucGroupBoxEx4.Enabled = false;
|
||||
|
||||
@@ -722,7 +737,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
//ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
ucGroupBoxEx4.Enabled = true;
|
||||
string sRst = "操作结束(取消待创建)!";
|
||||
@@ -772,7 +787,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
|
||||
string searchText = txtStockid.Text.Trim();
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
//ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
ucGroupBoxEx4.Enabled = false;
|
||||
|
||||
@@ -1040,7 +1055,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
//ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
ucGroupBoxEx4.Enabled = true;
|
||||
string sRst = "查询结束!";
|
||||
@@ -1064,7 +1079,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
return;
|
||||
}
|
||||
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
//ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
ucGroupBoxEx4.Enabled = false;
|
||||
|
||||
@@ -1243,7 +1258,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
//ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
ucGroupBoxEx4.Enabled = true;
|
||||
string sRst = "操作结束(创建备货单)!";
|
||||
@@ -1333,5 +1348,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
label102.Text = "近7日加购大于7日平均销量,7日平均 ×";
|
||||
}
|
||||
}
|
||||
|
||||
private void btnEmpty_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user