瀏覽代碼

岗位备料去除线别限制,出库单明细界面调整

Hcsy 8 年之前
父節點
當前提交
0dd762cfed

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

@@ -162,9 +162,9 @@ namespace UAS_MES.Make
         {
             if (!show_all_check.Checked)
             {
-                string ma_linecode = dh.getFieldDataByCondition("make", "ma_linecode", "ma_code = '" + ma_code.Text + "'").ToString();
-                if (User.UserLineCode == ma_linecode)
-                {
+                //string ma_linecode = dh.getFieldDataByCondition("make", "ma_linecode", "ma_code = '" + ma_code.Text + "'").ToString();
+                //if (User.UserLineCode == ma_linecode)
+                //{
                     sql.Clear();
                     sql.Append("select nvl(mss_makecode,' ') mss_makecode,mss_linecode,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 ");
@@ -173,16 +173,16 @@ namespace UAS_MES.Make
                     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);
-                }
-                else if (!(last_macoe == ma_code.Text))
-                {
-                    OperateResult.AppendText(">>所选工单" + ma_code.Text + "所在线别为" + ma_linecode + ",与当前线别" + User.UserLineCode + "不一致\n", Color.Red);
-                    last_macoe = ma_code.Text;
-                    BaseUtil.CleanDGVData(BatchProductDGV);
-                }
-                else {
-                    BaseUtil.CleanDGVData(BatchProductDGV);
-                }
+                //}
+                //else if (!(last_macoe == ma_code.Text))
+                //{
+                //    OperateResult.AppendText(">>所选工单" + ma_code.Text + "所在线别为" + ma_linecode + ",与当前线别" + User.UserLineCode + "不一致\n", Color.Red);
+                //    last_macoe = ma_code.Text;
+                //    BaseUtil.CleanDGVData(BatchProductDGV);
+                //}
+                //else {
+                //    BaseUtil.CleanDGVData(BatchProductDGV);
+                //}
             }
             else
             {

+ 16 - 2
UAS-MES/FunctionCode/Warehouse/Warehouse_ProdDetail.Designer.cs

@@ -31,6 +31,7 @@
             this.headBar1 = new UAS_MES.CustomControl.HeadBar();
             this.InOutDetailDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_ordercode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.getqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -55,12 +56,12 @@
             this.InOutDetailDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.InOutDetailDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.pd_prodcode,
+            this.pd_ordercode,
             this.pr_detail,
             this.outqty,
             this.getqty,
             this.ungetqty});
             this.InOutDetailDGV.EnableContentClick = true;
-            this.InOutDetailDGV.Enabled = false;
             this.InOutDetailDGV.Location = new System.Drawing.Point(32, 37);
             this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
             this.InOutDetailDGV.Name = "InOutDetailDGV";
@@ -74,30 +75,42 @@
             this.pd_prodcode.HeaderText = "产品代码";
             this.pd_prodcode.MinimumWidth = 120;
             this.pd_prodcode.Name = "pd_prodcode";
+            this.pd_prodcode.ReadOnly = true;
             this.pd_prodcode.Width = 120;
             // 
+            // pd_ordercode
+            // 
+            this.pd_ordercode.DataPropertyName = "pd_ordercode";
+            this.pd_ordercode.HeaderText = "订单编号";
+            this.pd_ordercode.Name = "pd_ordercode";
+            this.pd_ordercode.ReadOnly = true;
+            // 
             // pr_detail
             // 
             this.pr_detail.DataPropertyName = "pr_detail";
             this.pr_detail.HeaderText = "产品名称";
             this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
             // 
             // outqty
             // 
             this.outqty.DataPropertyName = "outqty";
             this.outqty.HeaderText = "出货数";
             this.outqty.Name = "outqty";
+            this.outqty.ReadOnly = true;
             // 
             // getqty
             // 
             this.getqty.DataPropertyName = "getqty";
             this.getqty.HeaderText = "已采集数";
             this.getqty.Name = "getqty";
+            this.getqty.ReadOnly = true;
             // 
             // ungetqty
             // 
             this.ungetqty.HeaderText = "未采集数";
             this.ungetqty.Name = "ungetqty";
+            this.ungetqty.ReadOnly = true;
             // 
             // Warehouse_ProdDetail
             // 
@@ -112,7 +125,7 @@
             this.Text = "Warehouse_ProdDetail";
             this.Load += new System.EventHandler(this.Warehouse_ProdDetail_Load);
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
 
         }
 
@@ -121,6 +134,7 @@
         private CustomControl.HeadBar headBar1;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum InOutDetailDGV;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_ordercode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn outqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn getqty;

+ 3 - 3
UAS-MES/FunctionCode/Warehouse/Warehouse_ProdDetail.cs

@@ -44,9 +44,9 @@ namespace UAS_MES.Warehouse
         private void Warehouse_ProdDetail_Load(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select pd_prodcode,pr_detail,outqty ,nvl((select count(1) from prodiomac where pim_inoutno='"+pim_inoutno+"' and pim_prodcode=pd_prodcode),0) getqty ");
-            sql.Append("from (select pd_prodcode,sum(pd_outqty) outqty from prodiodetail ");
-            sql.Append("where pd_piid='"+pd_piid+"'group by pd_prodcode) left join product on pr_code=pd_prodcode");
+            sql.Append("select pd_ordercode,pd_prodcode,pr_detail,outqty ,nvl((select count(1) from prodiomac where pim_inoutno='" + pim_inoutno+"' and pim_prodcode=pd_prodcode),0) getqty ");
+            sql.Append("from (select pd_ordercode,pd_prodcode,sum(pd_outqty) outqty from prodiodetail ");
+            sql.Append("where pd_piid='"+pd_piid+ "'group by pd_prodcode,pd_ordercode) left join product on pr_code=pd_prodcode");
             dbfind = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
             BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dbfind);
             for (int i = 0; i < InOutDetailDGV.Rows.Count; i++)

+ 3 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProdDetail.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="pd_ordercode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>