ui适配调整 权限管理调整 上传数量调整

This commit is contained in:
wule committed 2025-07-19 19:17:55 +08:00
1 parent edb79b9abf
commit deb84144cf
82 files changed
+1026 -485

No files matched your search

@@ -31,7 +31,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnSelect = new TemuKJD.UserControls.ButtonEx();
@@ -334,8 +333,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.dgvDbProduct.Location = new System.Drawing.Point(4, 0);
this.dgvDbProduct.Name = "dgvDbProduct";
this.dgvDbProduct.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvDbProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvDbProduct.RowTemplate.Height = 23;
this.dgvDbProduct.Size = new System.Drawing.Size(1270, 600);
this.dgvDbProduct.TabIndex = 6;
@@ -38,7 +38,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private void ProductListForm_Load(object sender, EventArgs e)
{
if (BaseClass.IsSa && shop == null)
if (BaseClass.SaLevel == 1 && shop == null) // 管理员且不是选品状态
{
this.dgvDbProduct.Columns["col_delete"].Visible = true;
this.dgvDbProduct.Columns["col_edit"].Visible = true;
@@ -281,6 +281,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
continue;
}
if (shop.AddProductRemaining <=0)
{
if (!errorMsg.Contains("本月商品认领限额已用完"))
errorMsg += " 本月商品认领限额已用完,请下个月再操作!";
continue;
}
try
{
var url = BaseClass.BuildObjString("product/add_user_select_product");
@@ -290,6 +297,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
"&shop_account=" + shop.ShopAccount +
"&main_user_name=" + shop.UserName +
"&sub_user_name=" + shop.SubUserName +
"&add_product_remaining=" + shop.AddProductRemaining +
"&status=待上传";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -300,6 +308,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
errorMsg += prod.spu_id + " " + BaseRegex.GetStringJson(ref html, "msg") + "; ";
}
else
{
shop.AddProductRemaining = shop.AddProductRemaining - 1;
}
}
catch (Exception ex) {
errorMsg += ex.Message + "; ";
@@ -309,7 +321,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg);
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg.Trim());
}));
}
else
@@ -30,7 +30,6 @@
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.cmbStatus = new System.Windows.Forms.ComboBox();
@@ -388,8 +387,6 @@
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
this.dgvSelectProduct.RowHeadersWidth = 51;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1270, 552);
this.dgvSelectProduct.TabIndex = 188;
@@ -568,7 +565,6 @@
//
// DbProductSelectListManageForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1280, 672);
this.Controls.Add(this.splitContainer1);
@@ -120,7 +120,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
prodSelect.ext_code,
prodSelect.status,
prodSelect.draft_id,
prodSelect.mdy_time.ToString("yyyy/MM/dd HH:mm:ss"),
prodSelect.status == "待上传" ? "-" : prodSelect.mdy_time.ToString("yyyy/MM/dd HH:mm:ss"),
"删除",
"");
@@ -34,8 +34,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnDelSelect = new DevComponents.DotNetBar.PanelEx();
@@ -54,6 +52,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
@@ -313,14 +312,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colLoginStatus,
this.colSelectProduct,
this.colCanUse,
this.colRemaining,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 30;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(266, 392);
this.dgvShop.TabIndex = 6;
@@ -385,6 +383,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// colRemaining
//
this.colRemaining.HeaderText = "月限额";
this.colRemaining.Name = "colRemaining";
this.colRemaining.ReadOnly = true;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
@@ -407,18 +411,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -440,8 +444,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
this.dgvSelectProduct.Name = "dgvSelectProduct";
this.dgvSelectProduct.ReadOnly = true;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvSelectProduct.RowTemplate.Height = 23;
this.dgvSelectProduct.Size = new System.Drawing.Size(1013, 392);
this.dgvSelectProduct.TabIndex = 187;
@@ -554,6 +556,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
@@ -708,6 +711,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private UserControls.StatusBarUserControl statusBar;
private DevComponents.DotNetBar.PanelEx panelEx1;
private DevComponents.DotNetBar.PanelEx btnClear;
private System.Windows.Forms.PictureBox pbLoading;
private UserControls.UcSplitPage ucSplitPage1;
private System.Windows.Forms.ComboBox cmbStatus;
private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.PanelEx btnDelSelect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
@@ -715,12 +723,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private System.Windows.Forms.PictureBox pbLoading;
private UserControls.UcSplitPage ucSplitPage1;
private System.Windows.Forms.ComboBox cmbStatus;
private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.PanelEx btnDelSelect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -22,7 +22,7 @@ using Work;
namespace TemuKJD.KJDForms.ProductSelectForms
{
public partial class UserSelectDbProductForm : Form
public partial class UserSelectDbProductForm : BaseForm
{
bool isInit = false;
CheckBox chkSelectAll = null;
@@ -126,6 +126,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
shopEntity.LoginStatus,
"选择商品",
canUse,
shopEntity.AddProductRemaining,
string.Empty
);
}
@@ -136,6 +137,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
row.Cells["colCanUse"].Value = canUse;
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
}
isInit = false;
}
@@ -170,9 +172,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
break;
case "colSelectProduct":
case "colSelectProduct": // 认领商品
DbProductListForm dbProductForm = new DbProductListForm(shop);
dbProductForm.ShowDialog();
this.RefreshShop();
break;
}
}
@@ -135,6 +135,9 @@
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRemaining.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>