namespace 成套报价软件 { /// /// 费用模板 窗口布局(SD 设计器可打开微调)。 /// 控件:dgv模板(模板列表)/txt名称/cbo方式/cbo计入/txt数值(编辑区) /// btn新增/btn修改/btn删除/btn应用/btn清空费用。 /// 事件在 InitializeComponent 内挂接,处理器方法与业务逻辑在 费用模板.cs(2026-10-01 G1-1)。 /// partial class 费用模板 : System.Windows.Forms.Form { /// 必需的设计器变量。 private System.ComponentModel.IContainer components = null; /// 清理正在使用的资源。 protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 /// 设计器支持所需的方法。 private void InitializeComponent() { this.dgv模板 = new System.Windows.Forms.DataGridView(); this.col启用 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.col名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col方式 = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.col数值 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.btn新增 = new System.Windows.Forms.Button(); this.btn修改 = new System.Windows.Forms.Button(); this.txt名称 = new System.Windows.Forms.TextBox(); this.lbl名称 = new System.Windows.Forms.Label(); this.cbo方式 = new System.Windows.Forms.ComboBox(); this.lbl方式 = new System.Windows.Forms.Label(); this.txt数值 = new System.Windows.Forms.TextBox(); this.lbl数值 = new System.Windows.Forms.Label(); this.btn删除 = new System.Windows.Forms.Button(); this.btn清空费用 = new System.Windows.Forms.Button(); this.btn应用 = new System.Windows.Forms.Button(); this.lbl说明 = new System.Windows.Forms.Label(); // ★ 2026-10-01 修复:col计入/cbo计入/lbl计入 已删——"仅报出"在公式链(报出单价=采购单价× // 报出系数)下数学不成立,费用固定"采购+报出"双向计入 ((System.ComponentModel.ISupportInitialize)(this.dgv模板)).BeginInit(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // dgv模板 // this.dgv模板.AllowUserToAddRows = false; this.dgv模板.AllowUserToDeleteRows = false; this.dgv模板.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dgv模板.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgv模板.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.col启用, this.col名称, this.col方式, this.col数值}); this.dgv模板.Location = new System.Drawing.Point(12, 12); this.dgv模板.MultiSelect = false; this.dgv模板.Name = "dgv模板"; this.dgv模板.ReadOnly = true; this.dgv模板.RowHeadersVisible = false; this.dgv模板.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgv模板.Size = new System.Drawing.Size(660, 240); this.dgv模板.TabIndex = 0; this.dgv模板.SelectionChanged += new System.EventHandler(this.dgv模板_SelectionChanged); this.dgv模板.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dgv模板_DataError); // // col启用 // this.col启用.HeaderText = "启用"; this.col启用.Name = "col启用"; this.col启用.ReadOnly = true; this.col启用.Width = 45; // // col名称 // this.col名称.HeaderText = "费用名称"; this.col名称.Name = "col名称"; this.col名称.ReadOnly = true; this.col名称.Width = 150; // // col方式 // this.col方式.HeaderText = "计算方式"; this.col方式.Items.AddRange(new object[] { "固定金额(每柜)", "元件采购价×%", "元件报出价×%"}); this.col方式.Name = "col方式"; this.col方式.ReadOnly = true; this.col方式.Width = 150; // // col数值 // this.col数值.HeaderText = "数值"; this.col数值.Name = "col数值"; this.col数值.ReadOnly = true; // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.txt数值); this.groupBox1.Controls.Add(this.lbl数值); this.groupBox1.Controls.Add(this.cbo方式); this.groupBox1.Controls.Add(this.lbl方式); this.groupBox1.Controls.Add(this.txt名称); this.groupBox1.Controls.Add(this.lbl名称); this.groupBox1.Controls.Add(this.btn新增); this.groupBox1.Controls.Add(this.btn修改); this.groupBox1.Location = new System.Drawing.Point(12, 258); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(660, 100); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "编辑(先在上方列表选中一行再改,或直接填新值点新增)"; // // btn新增 // this.btn新增.Location = new System.Drawing.Point(545, 20); this.btn新增.Name = "btn新增"; this.btn新增.Size = new System.Drawing.Size(96, 28); this.btn新增.TabIndex = 4; this.btn新增.Text = "新增"; this.btn新增.UseVisualStyleBackColor = true; this.btn新增.Click += new System.EventHandler(this.btn新增_Click); // // btn修改 // this.btn修改.Location = new System.Drawing.Point(545, 54); this.btn修改.Name = "btn修改"; this.btn修改.Size = new System.Drawing.Size(96, 28); this.btn修改.TabIndex = 5; this.btn修改.Text = "修改选中"; this.btn修改.UseVisualStyleBackColor = true; this.btn修改.Click += new System.EventHandler(this.btn修改_Click); // // txt名称 // this.txt名称.Location = new System.Drawing.Point(116, 26); this.txt名称.Name = "txt名称"; this.txt名称.Size = new System.Drawing.Size(180, 24); this.txt名称.TabIndex = 0; // // lbl名称 // this.lbl名称.AutoSize = true; this.lbl名称.Location = new System.Drawing.Point(54, 29); this.lbl名称.Name = "lbl名称"; this.lbl名称.Size = new System.Drawing.Size(56, 17); this.lbl名称.TabIndex = 0; this.lbl名称.Text = "名称:"; // // cbo方式 // this.cbo方式.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbo方式.FormattingEnabled = true; this.cbo方式.Items.AddRange(new object[] { "固定金额(每柜)", "元件采购价×%", "元件报出价×%"}); this.cbo方式.Location = new System.Drawing.Point(116, 60); this.cbo方式.Name = "cbo方式"; this.cbo方式.Size = new System.Drawing.Size(180, 25); this.cbo方式.TabIndex = 2; // // lbl方式 // this.lbl方式.AutoSize = true; this.lbl方式.Location = new System.Drawing.Point(54, 63); this.lbl方式.Name = "lbl方式"; this.lbl方式.Size = new System.Drawing.Size(56, 17); this.lbl方式.TabIndex = 0; this.lbl方式.Text = "方式:"; // // txt数值 // this.txt数值.Location = new System.Drawing.Point(400, 60); this.txt数值.Name = "txt数值"; this.txt数值.Size = new System.Drawing.Size(100, 24); this.txt数值.TabIndex = 3; // // lbl数值 // this.lbl数值.AutoSize = true; this.lbl数值.Location = new System.Drawing.Point(338, 63); this.lbl数值.Name = "lbl数值"; this.lbl数值.Size = new System.Drawing.Size(56, 17); this.lbl数值.TabIndex = 2; this.lbl数值.Text = "数值:"; // // btn删除 // this.btn删除.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btn删除.Location = new System.Drawing.Point(116, 375); this.btn删除.Name = "btn删除"; this.btn删除.Size = new System.Drawing.Size(96, 30); this.btn删除.TabIndex = 6; this.btn删除.Text = "删除选中"; this.btn删除.UseVisualStyleBackColor = true; this.btn删除.Click += new System.EventHandler(this.btn删除_Click); // // btn清空费用 // this.btn清空费用.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btn清空费用.Location = new System.Drawing.Point(228, 375); this.btn清空费用.Name = "btn清空费用"; this.btn清空费用.Size = new System.Drawing.Size(120, 30); this.btn清空费用.TabIndex = 7; this.btn清空费用.Text = "清空项目费用行"; this.btn清空费用.UseVisualStyleBackColor = true; this.btn清空费用.Click += new System.EventHandler(this.btn清空费用_Click); // // btn应用 // this.btn应用.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btn应用.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn应用.Location = new System.Drawing.Point(544, 375); this.btn应用.Name = "btn应用"; this.btn应用.Size = new System.Drawing.Size(128, 30); this.btn应用.TabIndex = 8; this.btn应用.Text = "应用到当前项目"; this.btn应用.UseVisualStyleBackColor = true; this.btn应用.Click += new System.EventHandler(this.btn应用_Click); // // lbl说明 // this.lbl说明.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lbl说明.ForeColor = System.Drawing.Color.Gray; this.lbl说明.Location = new System.Drawing.Point(12, 375); this.lbl说明.Name = "lbl说明"; this.lbl说明.Size = new System.Drawing.Size(100, 30); this.lbl说明.TabIndex = 9; this.lbl说明.Text = "操作:"; this.lbl说明.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // 费用模板 // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(684, 417); this.Controls.Add(this.btn清空费用); this.Controls.Add(this.btn删除); this.Controls.Add(this.btn应用); this.Controls.Add(this.lbl说明); this.Controls.Add(this.groupBox1); this.Controls.Add(this.dgv模板); this.MinimumSize = new System.Drawing.Size(700, 456); this.Name = "费用模板"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "模板费用 — 费用行按公式计入各箱号合计"; ((System.ComponentModel.ISupportInitialize)(this.dgv模板)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.DataGridView dgv模板; private System.Windows.Forms.DataGridViewCheckBoxColumn col启用; private System.Windows.Forms.DataGridViewTextBoxColumn col名称; private System.Windows.Forms.DataGridViewComboBoxColumn col方式; private System.Windows.Forms.DataGridViewTextBoxColumn col数值; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button btn新增; private System.Windows.Forms.Button btn修改; private System.Windows.Forms.TextBox txt名称; private System.Windows.Forms.Label lbl名称; private System.Windows.Forms.ComboBox cbo方式; private System.Windows.Forms.Label lbl方式; private System.Windows.Forms.TextBox txt数值; private System.Windows.Forms.Label lbl数值; private System.Windows.Forms.Button btn删除; private System.Windows.Forms.Button btn清空费用; private System.Windows.Forms.Button btn应用; private System.Windows.Forms.Label lbl说明; } }