Browse Source

卡板称重打标处理

callm 2 weeks ago
parent
commit
0b2821b305

+ 10 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_PalletWeigh.cs

@@ -202,8 +202,12 @@ namespace UAS_MES_NEW.Make
                 OperateResult.AppendText(">>请先选择工单号\n", Color.Red);
                 return;
             }
+            if (weight.Text == "")
+            {
+                OperateResult.AppendText(">>未读取到重量,请先链接电子秤\n", Color.Red);
+                return;
+            }
             sncode.Text = LogicHandler.GetOutBoxCode1("PALLETCODE", ma_code.Text, pr_code.Text, User.UserCode);
-
             if (PrintLabel.Items.Count != 0)
             {
                 string oErrorMessage;
@@ -214,8 +218,12 @@ namespace UAS_MES_NEW.Make
             }
             else
             {
-                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
+                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护卡板标签\n", Color.Red);
+                return;
             }
+            dh.ExecuteSql("insert into pallet(PL_ID, PL_CODE, PL_MAKECODE, PL_INMAN, PL_INDATE, PL_WEIGHT)" +
+                 "values(pallet_seq.nextval,'" + sncode.Text + "','" + ma_code.Text + "','" + User.UserCode + "',sysdate,'" + weight.Text + "')", "insert");
+            OperateResult.AppendText(">>卡板" + sncode.Text + "标签打印成功\n", Color.Green);
         }
 
         Thread threadWatch = null; //负责监听客户端的线程

+ 165 - 1
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionPallet.Designer.cs

@@ -102,15 +102,28 @@
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.PackageDetail = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_prodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.groupBoxWithBorder3 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.RefreshWeigh = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.pr_cartonboxgw = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.weight = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
+            this.groupBoxWithBorder3.SuspendLayout();
             this.SuspendLayout();
             // 
             // pa_makecode
@@ -1079,9 +1092,63 @@
             this.PackageDetail.ReadOnly = true;
             this.PackageDetail.RowHeadersWidth = 82;
             this.PackageDetail.RowTemplate.Height = 23;
-            this.PackageDetail.Size = new System.Drawing.Size(1314, 480);
+            this.PackageDetail.Size = new System.Drawing.Size(1253, 480);
             this.PackageDetail.TabIndex = 134;
             // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "pd_barcode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "序列号";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 250;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
+            this.dataGridViewTextBoxColumn1.Width = 250;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pa_outboxcode";
+            this.dataGridViewTextBoxColumn2.HeaderText = "箱号";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 200;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Width = 201;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "pa_prodcode";
+            this.dataGridViewTextBoxColumn3.HeaderText = "产品编号";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Visible = false;
+            this.dataGridViewTextBoxColumn3.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "pd_innerqty";
+            this.dataGridViewTextBoxColumn4.HeaderText = "箱内数量";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Visible = false;
+            this.dataGridViewTextBoxColumn4.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "pa_indate";
+            this.dataGridViewTextBoxColumn5.HeaderText = "装箱日期";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "pd_id";
+            this.dataGridViewTextBoxColumn6.HeaderText = "ID";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.Visible = false;
+            this.dataGridViewTextBoxColumn6.Width = 200;
+            // 
             // pd_barcode
             // 
             this.pd_barcode.DataPropertyName = "pd_barcode";
@@ -1142,12 +1209,95 @@
             this.pd_id.Visible = false;
             this.pd_id.Width = 200;
             // 
+            // groupBoxWithBorder3
+            // 
+            this.groupBoxWithBorder3.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder3.Controls.Add(this.RefreshWeigh);
+            this.groupBoxWithBorder3.Controls.Add(this.pr_cartonboxgw);
+            this.groupBoxWithBorder3.Controls.Add(this.label4);
+            this.groupBoxWithBorder3.Controls.Add(this.weight);
+            this.groupBoxWithBorder3.Controls.Add(this.label5);
+            this.groupBoxWithBorder3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBoxWithBorder3.Location = new System.Drawing.Point(1271, 356);
+            this.groupBoxWithBorder3.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder3.Name = "groupBoxWithBorder3";
+            this.groupBoxWithBorder3.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder3.Size = new System.Drawing.Size(474, 482);
+            this.groupBoxWithBorder3.TabIndex = 211;
+            this.groupBoxWithBorder3.TabStop = false;
+            this.groupBoxWithBorder3.Text = "称量信息";
+            this.groupBoxWithBorder3.TextColor = System.Drawing.Color.Black;
+            // 
+            // RefreshWeigh
+            // 
+            this.RefreshWeigh.AllPower = "ifall";
+            this.RefreshWeigh.BackColor = System.Drawing.Color.Transparent;
+            this.RefreshWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.DownImage")));
+            this.RefreshWeigh.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.RefreshWeigh.Image = null;
+            this.RefreshWeigh.IsShowBorder = true;
+            this.RefreshWeigh.Location = new System.Drawing.Point(287, 242);
+            this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(6);
+            this.RefreshWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.MoveImage")));
+            this.RefreshWeigh.Name = "RefreshWeigh";
+            this.RefreshWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.NormalImage")));
+            this.RefreshWeigh.Power = null;
+            this.RefreshWeigh.Size = new System.Drawing.Size(116, 48);
+            this.RefreshWeigh.TabIndex = 185;
+            this.RefreshWeigh.Tag = "ifread";
+            this.RefreshWeigh.Text = "刷新重量";
+            this.RefreshWeigh.UseVisualStyleBackColor = true;
+            // 
+            // pr_cartonboxgw
+            // 
+            this.pr_cartonboxgw.AutoSize = true;
+            this.pr_cartonboxgw.Font = new System.Drawing.Font("微软雅黑", 25F);
+            this.pr_cartonboxgw.Location = new System.Drawing.Point(23, 317);
+            this.pr_cartonboxgw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_cartonboxgw.Name = "pr_cartonboxgw";
+            this.pr_cartonboxgw.Size = new System.Drawing.Size(0, 88);
+            this.pr_cartonboxgw.TabIndex = 182;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(7, 243);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(210, 41);
+            this.label4.TabIndex = 181;
+            this.label4.Text = "系统计算重量";
+            // 
+            // weight
+            // 
+            this.weight.AutoSize = true;
+            this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
+            this.weight.ForeColor = System.Drawing.Color.DarkGreen;
+            this.weight.Location = new System.Drawing.Point(19, 105);
+            this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.weight.Name = "weight";
+            this.weight.Size = new System.Drawing.Size(0, 121);
+            this.weight.TabIndex = 180;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(7, 37);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 179;
+            this.label5.Text = "称量重量";
+            // 
             // Packing_PackageCollectionPallet
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.ClientSize = new System.Drawing.Size(1758, 1168);
+            this.Controls.Add(this.groupBoxWithBorder3);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Remark_PreFix);
             this.Controls.Add(this.AllowRepeat);
@@ -1195,6 +1345,8 @@
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
+            this.groupBoxWithBorder3.ResumeLayout(false);
+            this.groupBoxWithBorder3.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1280,5 +1432,17 @@
         private System.Windows.Forms.CheckBox AllowRepeat;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder3;
+        private CustomControl.ButtonUtil.NormalButton RefreshWeigh;
+        private System.Windows.Forms.Label pr_cartonboxgw;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label weight;
+        private System.Windows.Forms.Label label5;
     }
 }

+ 38 - 0
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionPallet.resx

@@ -382,6 +382,44 @@
         q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
         IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
         42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="RefreshWeigh.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="RefreshWeigh.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="RefreshWeigh.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
 </value>
   </data>
 </root>