Bläddra i källkod

更新客户资料列表客户需要复核

章政 6 år sedan
förälder
incheckning
a35601973e

+ 26 - 13
UAS-出货标签管理(标签复核)/UAS_出货标签管理.Designer.cs

@@ -89,6 +89,8 @@
             this.pi_date = new System.Windows.Forms.Label();
             this.CleanBarCode = new System.Windows.Forms.Button();
             this.ExportData = new System.Windows.Forms.Button();
+            this.CollectAll = new System.Windows.Forms.Button();
+            this.cu_needrecheck = new System.Windows.Forms.Label();
             this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.pr_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.CollectionProcess = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
@@ -129,7 +131,6 @@
             this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.CollectAll = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.CollectionProcess.SuspendLayout();
@@ -667,6 +668,28 @@
             this.ExportData.UseVisualStyleBackColor = true;
             this.ExportData.Click += new System.EventHandler(this.ExportData_Click);
             // 
+            // CollectAll
+            // 
+            this.CollectAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CollectAll.Location = new System.Drawing.Point(522, 216);
+            this.CollectAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CollectAll.Name = "CollectAll";
+            this.CollectAll.Size = new System.Drawing.Size(68, 26);
+            this.CollectAll.TabIndex = 92;
+            this.CollectAll.Text = "全部已采";
+            this.CollectAll.UseVisualStyleBackColor = true;
+            this.CollectAll.Click += new System.EventHandler(this.CollectAll_Click);
+            // 
+            // cu_needrecheck
+            // 
+            this.cu_needrecheck.AutoSize = true;
+            this.cu_needrecheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_needrecheck.Location = new System.Drawing.Point(640, 96);
+            this.cu_needrecheck.Name = "cu_needrecheck";
+            this.cu_needrecheck.Size = new System.Drawing.Size(0, 20);
+            this.cu_needrecheck.TabIndex = 93;
+            this.cu_needrecheck.Visible = false;
+            // 
             // cu_code
             // 
             this.cu_code.AllPower = null;
@@ -1119,24 +1142,13 @@
             this.pi_inoutno.TabIndex = 2;
             this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pi_inoutno_KeyDown);
             // 
-            // CollectAll
-            // 
-            this.CollectAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectAll.Location = new System.Drawing.Point(522, 216);
-            this.CollectAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.CollectAll.Name = "CollectAll";
-            this.CollectAll.Size = new System.Drawing.Size(68, 26);
-            this.CollectAll.TabIndex = 92;
-            this.CollectAll.Text = "全部已采";
-            this.CollectAll.UseVisualStyleBackColor = true;
-            this.CollectAll.Click += new System.EventHandler(this.CollectAll_Click);
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1012, 709);
+            this.Controls.Add(this.cu_needrecheck);
             this.Controls.Add(this.CollectAll);
             this.Controls.Add(this.ExportData);
             this.Controls.Add(this.cu_code);
@@ -1291,5 +1303,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_datecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_qty;
         private System.Windows.Forms.Button CollectAll;
+        private System.Windows.Forms.Label cu_needrecheck;
     }
 }

+ 16 - 1
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -182,6 +182,7 @@ namespace UAS_LabelMachine
             {
                 MidSource.EndEdit();
                 dh.SaveDataTable(savedt.GetChanges(), "ProdioBarCode", "pib_id");
+                CheckRecheckStatus();
                 MessageBox.Show("保存成功!");
             }
         }
@@ -416,6 +417,7 @@ namespace UAS_LabelMachine
                     string pib_id = LabelInf.Rows[CurrentRowIndex].Cells["pib_id1"].Value.ToString();
                     ErrorType.Clear();
                     dh.ExecuteSql("update prodiobarcode set pib_datecode='" + datecode + "',pib_lotno='" + lotno + "',pib_ifpick=-1 where pib_id='" + pib_id + "'", "update");
+                    CheckRecheckStatus();
                     LabelInf.Invalidate();
                 }
                 //采集未通过的时候
@@ -711,12 +713,13 @@ namespace UAS_LabelMachine
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' ");
+                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date,nvl(cu_needrecheck,0)cu_needrecheck from prodinout left join customer on cu_code=pi_cardcode where pi_inoutno='" + pi_inoutno.Text + "' ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 ErrorType.Clear();
                 if (dt.Rows.Count > 0)
                 {
                     cu_code.Text = dt.Rows[0]["pi_cardcode"].ToString();
+                    cu_needrecheck.Text = dt.Rows[0]["cu_needrecheck"].ToString();
                     pi_date.Text = dt.Rows[0]["pi_date"].ToString();
                     PI_ID = dt.Rows[0]["pi_id"].ToString();
                     dt = (DataTable)dh.ExecuteSql("select 1 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'", "select");
@@ -1059,5 +1062,17 @@ namespace UAS_LabelMachine
                 }
             }
         }
+
+        private void CheckRecheckStatus()
+        {
+            if (cu_needrecheck.Text == "0")
+            {
+                dh.ExecuteSql("update customer set cu_needrecheck=-1 where cu_code='" + cu_code.Text + "'", "update");
+            }
+            if (dh.getRowCount("prodiobarcode", "nvl(pib_ifpick,0)<>0 and pib_inoutno='" + pi_inoutno.Text + "'") == LabelInf.Rows.Count)
+            {
+                dh.ExecuteSql("update prodinout set pi_recheckstatus='已复核' where pi_inoutno='" + pi_inoutno.Text + "'", "update");
+            }
+        }
     }
 }