浏览代码

修改添加工单条件的取数,Grid字段赋值修改

章政 8 年之前
父节点
当前提交
394d5a4da9

+ 61 - 61
UAS-MES/FunctionCode/Make/Make_PositionStock.Designer.cs

@@ -48,6 +48,10 @@
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.pr_batchnum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.BatchProductDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.sc_stepcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.Screen = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.sp_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mss_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -61,10 +65,6 @@
             this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
-            this.sc_stepcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.Screen = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
             this.SuspendLayout();
@@ -322,9 +322,64 @@
             this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
             this.BatchProductDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
             // 
+            // sc_stepcode
+            // 
+            this.sc_stepcode.AutoSize = true;
+            this.sc_stepcode.CutLength = null;
+            this.sc_stepcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sc_stepcode.Location = new System.Drawing.Point(688, 42);
+            this.sc_stepcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.sc_stepcode.Name = "sc_stepcode";
+            this.sc_stepcode.Size = new System.Drawing.Size(0, 21);
+            this.sc_stepcode.TabIndex = 171;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(415, 82);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.TabIndex = 170;
+            this.pr_detail.Tag = "pr_detail";
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(102, 82);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ma_prodcode.TabIndex = 167;
+            this.ma_prodcode.Tag = "ma_prodcode";
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
+            // 
+            // Screen
+            // 
+            this.Screen.AllPower = null;
+            this.Screen.BackColor = System.Drawing.Color.Transparent;
+            this.Screen.DownImage = ((System.Drawing.Image)(resources.GetObject("Screen.DownImage")));
+            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
+            this.Screen.IsShowBorder = true;
+            this.Screen.Location = new System.Drawing.Point(642, 79);
+            this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
+            this.Screen.Name = "Screen";
+            this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
+            this.Screen.Power = null;
+            this.Screen.Size = new System.Drawing.Size(60, 24);
+            this.Screen.TabIndex = 154;
+            this.Screen.Tag = "IfRead";
+            this.Screen.Text = "刷新";
+            this.Screen.UseVisualStyleBackColor = true;
+            this.Screen.Click += new System.EventHandler(this.Screen_Click);
+            // 
             // sp_soncode
             // 
-            this.sp_soncode.DataPropertyName = "sp_soncode";
+            this.sp_soncode.DataPropertyName = "sp_fsoncode";
             this.sp_soncode.HeaderText = "首选料号";
             this.sp_soncode.Name = "sp_soncode";
             this.sp_soncode.ReadOnly = true;
@@ -344,7 +399,7 @@
             // 
             // mss_prodcode
             // 
-            this.mss_prodcode.DataPropertyName = "mss_prodcode";
+            this.mss_prodcode.DataPropertyName = "sp_soncode";
             this.mss_prodcode.HeaderText = "备选料号";
             this.mss_prodcode.Name = "mss_prodcode";
             this.mss_prodcode.ReadOnly = true;
@@ -413,61 +468,6 @@
             this.DeleteRow.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.DeleteRow.Name = "DeleteRow";
             // 
-            // sc_stepcode
-            // 
-            this.sc_stepcode.AutoSize = true;
-            this.sc_stepcode.CutLength = null;
-            this.sc_stepcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sc_stepcode.Location = new System.Drawing.Point(688, 42);
-            this.sc_stepcode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.sc_stepcode.Name = "sc_stepcode";
-            this.sc_stepcode.Size = new System.Drawing.Size(0, 21);
-            this.sc_stepcode.TabIndex = 171;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(415, 82);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
-            this.pr_detail.TabIndex = 170;
-            this.pr_detail.Tag = "pr_detail";
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.CutLength = null;
-            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(102, 82);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
-            this.ma_prodcode.TabIndex = 167;
-            this.ma_prodcode.Tag = "ma_prodcode";
-            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
-            // 
-            // Screen
-            // 
-            this.Screen.AllPower = null;
-            this.Screen.BackColor = System.Drawing.Color.Transparent;
-            this.Screen.DownImage = ((System.Drawing.Image)(resources.GetObject("Screen.DownImage")));
-            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
-            this.Screen.IsShowBorder = true;
-            this.Screen.Location = new System.Drawing.Point(642, 79);
-            this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
-            this.Screen.Name = "Screen";
-            this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
-            this.Screen.Power = null;
-            this.Screen.Size = new System.Drawing.Size(60, 24);
-            this.Screen.TabIndex = 154;
-            this.Screen.Tag = "IfRead";
-            this.Screen.Text = "刷新";
-            this.Screen.UseVisualStyleBackColor = true;
-            this.Screen.Click += new System.EventHandler(this.Screen_Click);
-            // 
             // Make_PositionStock
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 5 - 5
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -160,11 +160,11 @@ namespace UAS_MES.Make
             if (!show_all_check.Checked)
             {
                 sql.Clear();
-                sql.Append("select nvl(mss_makecode,' ') mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
+                sql.Append("select nvl(mss_makecode,' ') mss_makecode,sp_fsoncode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
-                sql.Append("pr_code=sp_mothercode left join makesourcestock on mss_makecode='" + ma_code.Text + "' and  mss_craftcode=sb_craftcode ");
-                sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode where sb_prodcode='" + ma_prodcode.Text + "' and sb_craftcode='" + ma_craftcode.Text + "' ");
-                sql.Append("and sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 order by sp_soncode");
+                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 left join make on ma_bomversion=sb_bomversion where sb_prodcode='" + ma_prodcode.Text + "' and sb_craftcode='" + ma_craftcode.Text + "' ");
+                sql.Append("and sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 and ma_code='" + ma_code.Text + "' order by sp_soncode");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
 
@@ -172,7 +172,7 @@ namespace UAS_MES.Make
             else
             {
                 sql.Clear();
-                sql.Append("select nvl(mss_makecode,' ') mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
+                sql.Append("select nvl(mss_makecode,' ') mss_makecode,sp_fsoncode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 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 where  ");