Просмотр исходного кода

添加备料数量不足显示

callm 2 недель назад
Родитель
Сommit
f1e7e40a5e

+ 42 - 8
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.Designer.cs

@@ -41,6 +41,7 @@
             this.mss_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_remain = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_useqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Not = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
             this.SuspendLayout();
@@ -51,9 +52,10 @@
             this.label3.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.label3.Location = new System.Drawing.Point(6, 5);
+            this.label3.Location = new System.Drawing.Point(12, 10);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(106, 21);
+            this.label3.Size = new System.Drawing.Size(210, 41);
             this.label3.TabIndex = 99;
             this.label3.Text = "岗位备料汇总";
             // 
@@ -63,9 +65,9 @@
             this.headBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(735, 32);
+            this.headBar1.Size = new System.Drawing.Size(1470, 62);
             this.headBar1.TabIndex = 98;
             this.headBar1.Title = null;
             this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
@@ -84,75 +86,106 @@
             this.mss_remain,
             this.mss_useqty});
             this.BatchProductDGV.EnableContentClick = true;
-            this.BatchProductDGV.Location = new System.Drawing.Point(0, 29);
+            this.BatchProductDGV.Location = new System.Drawing.Point(0, 115);
+            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.BatchProductDGV.Name = "BatchProductDGV";
+            this.BatchProductDGV.RowHeadersWidth = 82;
             this.BatchProductDGV.RowTemplate.Height = 23;
-            this.BatchProductDGV.Size = new System.Drawing.Size(735, 458);
+            this.BatchProductDGV.Size = new System.Drawing.Size(1470, 859);
             this.BatchProductDGV.TabIndex = 175;
             // 
             // mss_linecode
             // 
             this.mss_linecode.DataPropertyName = "mss_linecode";
             this.mss_linecode.HeaderText = "线别";
+            this.mss_linecode.MinimumWidth = 10;
             this.mss_linecode.Name = "mss_linecode";
+            this.mss_linecode.Width = 200;
             // 
             // mss_makecode
             // 
             this.mss_makecode.DataPropertyName = "mss_makecode";
             this.mss_makecode.HeaderText = "工单号";
+            this.mss_makecode.MinimumWidth = 10;
             this.mss_makecode.Name = "mss_makecode";
+            this.mss_makecode.Width = 200;
             // 
             // sp_soncode
             // 
             this.sp_soncode.DataPropertyName = "sp_fsoncode";
             this.sp_soncode.HeaderText = "首选料号";
+            this.sp_soncode.MinimumWidth = 10;
             this.sp_soncode.Name = "sp_soncode";
             this.sp_soncode.ReadOnly = true;
+            this.sp_soncode.Width = 200;
             // 
             // mss_prodcode
             // 
             this.mss_prodcode.DataPropertyName = "sp_soncode";
             this.mss_prodcode.HeaderText = "备选料号";
+            this.mss_prodcode.MinimumWidth = 10;
             this.mss_prodcode.Name = "mss_prodcode";
             this.mss_prodcode.ReadOnly = true;
+            this.mss_prodcode.Width = 200;
             // 
             // sp_oneuseqty
             // 
             this.sp_oneuseqty.DataPropertyName = "sp_oneuseqty";
             this.sp_oneuseqty.HeaderText = "单位用量";
+            this.sp_oneuseqty.MinimumWidth = 10;
             this.sp_oneuseqty.Name = "sp_oneuseqty";
             this.sp_oneuseqty.ReadOnly = true;
+            this.sp_oneuseqty.Width = 200;
             // 
             // mss_qty
             // 
             this.mss_qty.DataPropertyName = "mss_qty";
             this.mss_qty.HeaderText = "备料数量";
+            this.mss_qty.MinimumWidth = 10;
             this.mss_qty.Name = "mss_qty";
+            this.mss_qty.Width = 200;
             // 
             // mss_remain
             // 
             this.mss_remain.DataPropertyName = "mss_remain";
             this.mss_remain.HeaderText = "剩余数";
+            this.mss_remain.MinimumWidth = 10;
             this.mss_remain.Name = "mss_remain";
             this.mss_remain.ReadOnly = true;
+            this.mss_remain.Width = 200;
             // 
             // mss_useqty
             // 
             this.mss_useqty.DataPropertyName = "mss_useqty";
             this.mss_useqty.HeaderText = "已用数量";
+            this.mss_useqty.MinimumWidth = 10;
             this.mss_useqty.Name = "mss_useqty";
             this.mss_useqty.ReadOnly = true;
+            this.mss_useqty.Width = 200;
+            // 
+            // Not
+            // 
+            this.Not.AutoSize = true;
+            this.Not.Location = new System.Drawing.Point(12, 73);
+            this.Not.Name = "Not";
+            this.Not.Size = new System.Drawing.Size(186, 28);
+            this.Not.TabIndex = 176;
+            this.Not.Text = "查看备料不足";
+            this.Not.UseVisualStyleBackColor = true;
+            this.Not.CheckedChanged += new System.EventHandler(this.Not_CheckedChanged);
             // 
             // Make_NewPo
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.HighlightText;
-            this.ClientSize = new System.Drawing.Size(735, 486);
+            this.ClientSize = new System.Drawing.Size(1470, 972);
+            this.Controls.Add(this.Not);
             this.Controls.Add(this.BatchProductDGV);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.headBar1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(8, 10, 8, 10);
             this.Name = "Make_NewPo";
             this.Tag = "ShowDialogWindow";
             this.Text = "备料信息汇总";
@@ -177,5 +210,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_qty;
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_remain;
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_useqty;
+        private System.Windows.Forms.CheckBox Not;
     }
 }

+ 16 - 1
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.cs

@@ -84,6 +84,21 @@ namespace UAS_MES_NEW.Make
             SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
         }
 
-     
+        private void Not_CheckedChanged(object sender, EventArgs e)
+        {
+            if (Not.Checked)
+            {
+                sql.Clear();
+                sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW where mss_makecode = '" + macode + "' and mss_linecode = '" + licode + "' and MSS_REMAIN<MSS_QTY");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
+            }
+            else {
+                sql.Clear();
+                sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW where mss_makecode = '" + macode + "' and mss_linecode = '" + licode + "'");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
+            }
+        }
     }
 }

+ 24 - 0
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.resx

@@ -144,4 +144,28 @@
   <metadata name="mss_useqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mss_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mss_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="sp_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mss_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="sp_oneuseqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mss_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mss_remain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mss_useqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>