Browse Source

添加规格字段

callm 2 tuần trước cách đây
mục cha
commit
7a4cad82b5

+ 37 - 15
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.Designer.cs

@@ -33,15 +33,17 @@
             this.headBar1 = new UAS_MES_NEW.CustomControl.HeadBar();
             this.BadInfo = new System.Windows.Forms.BindingSource(this.components);
             this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.Not = new System.Windows.Forms.CheckBox();
             this.mss_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sp_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sp_oneuseqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             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();
@@ -65,7 +67,7 @@
             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(8, 8, 8, 8);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(8);
             this.headBar1.Name = "headBar1";
             this.headBar1.Size = new System.Drawing.Size(1470, 62);
             this.headBar1.TabIndex = 98;
@@ -80,6 +82,8 @@
             this.mss_linecode,
             this.mss_makecode,
             this.sp_soncode,
+            this.pr_detail,
+            this.pr_spec,
             this.mss_prodcode,
             this.sp_oneuseqty,
             this.mss_qty,
@@ -87,13 +91,24 @@
             this.mss_useqty});
             this.BatchProductDGV.EnableContentClick = true;
             this.BatchProductDGV.Location = new System.Drawing.Point(0, 115);
-            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(6);
             this.BatchProductDGV.Name = "BatchProductDGV";
             this.BatchProductDGV.RowHeadersWidth = 82;
             this.BatchProductDGV.RowTemplate.Height = 23;
             this.BatchProductDGV.Size = new System.Drawing.Size(1470, 859);
             this.BatchProductDGV.TabIndex = 175;
             // 
+            // 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);
+            // 
             // mss_linecode
             // 
             this.mss_linecode.DataPropertyName = "mss_linecode";
@@ -119,6 +134,22 @@
             this.sp_soncode.ReadOnly = true;
             this.sp_soncode.Width = 200;
             // 
+            // pr_detail
+            // 
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "物料名称";
+            this.pr_detail.MinimumWidth = 10;
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Width = 200;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "物料规格";
+            this.pr_spec.MinimumWidth = 10;
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Width = 200;
+            // 
             // mss_prodcode
             // 
             this.mss_prodcode.DataPropertyName = "sp_soncode";
@@ -163,17 +194,6 @@
             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(12F, 24F);
@@ -202,14 +222,16 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.BindingSource BadInfo;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum BatchProductDGV;
+        private System.Windows.Forms.CheckBox Not;
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_linecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_makecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sp_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn mss_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sp_oneuseqty;
         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;
     }
 }

+ 3 - 3
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.cs

@@ -64,7 +64,7 @@ namespace UAS_MES_NEW.Make
             //sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode ");
             //sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode and sp_fsoncode=mss_fprodcode where  ");
             //sql.Append(" sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 and mss_linecode = '" + User.UserLineCode + "' order  by sp_soncode");
-            sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW where mss_makecode = '" + macode + "' and mss_linecode = '" + licode + "'");
+            sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW left join product on pr_code=SP_FSONCODE where mss_makecode = '" + macode + "' and mss_linecode = '" + licode + "'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
 
@@ -89,13 +89,13 @@ namespace UAS_MES_NEW.Make
             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");
+                sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW left join product on pr_code=SP_FSONCODE 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 + "'");
+                sql.Append("select * from MAKESOURCESTOCK_SUM_VIEW left join product on pr_code=SP_FSONCODE where mss_makecode = '" + macode + "' and mss_linecode = '" + licode + "'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
             }

+ 2 - 20
UAS_MES_YTDZ/FunctionCode/Make/Make_NewPo.resx

@@ -129,28 +129,10 @@
   <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">
+  <metadata name="pr_detail.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>
-  <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">
+  <metadata name="pr_spec.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">