Browse Source

卡通箱拆箱修改

shim 8 years ago
parent
commit
7e3aea7ded

+ 2 - 1
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.Designer.cs

@@ -59,8 +59,9 @@
             this.lock_outbox.AutoSize = true;
             this.lock_outbox.Location = new System.Drawing.Point(342, 35);
             this.lock_outbox.Name = "lock_outbox";
-            this.lock_outbox.Size = new System.Drawing.Size(22, 21);
+            this.lock_outbox.Size = new System.Drawing.Size(70, 22);
             this.lock_outbox.TabIndex = 2;
+            this.lock_outbox.Text = "锁定";
             this.lock_outbox.UseVisualStyleBackColor = true;
             this.lock_outbox.CheckedChanged += new System.EventHandler(this.lock_outbox_CheckedChanged);
             // 

+ 7 - 1
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs

@@ -100,7 +100,7 @@ namespace UAS_MES.Packing
                     //删除明细
                     dh.ExecuteSql("delete from packagedetail where pd_id='"+pd_id+"'", "select");
                     //更新序列号
-                    dh.ExecuteSql("update makeserial set ms_outboxcode='' where ms_id='"+ms_id+"'", "update");
+                    dh.ExecuteSql("update makeserial set ms_outboxcode='' , ms_nextstepcode=ms_stepcode where ms_id='"+ms_id+"'", "update");
                     //更新箱内当前数量
                     dh.ExecuteSql("update package set pa_currentqty=pa_currentqty-1 where pa_outboxcode='"+pa_outboxcode.Text+"'", "update");
                     //记录拆箱操作日志
@@ -165,6 +165,12 @@ namespace UAS_MES.Packing
                     return false;
                 }
             }
+            //验证mothercode是否为空,有没有装大箱
+            if (dh.getFieldDataByCondition("package", "pa_mothercode", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() != "")
+            {
+                OperateResult.AppendText("<<卡通箱:" + pa_outboxcode.Text + "已装箱,不允许拆箱\n", Color.Red, sncode);
+                return false;
+            }
             return true;
         }