浏览代码

关联工单问题处理

callm 5 月之前
父节点
当前提交
8ed4be321b

+ 6 - 1
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -806,7 +806,7 @@ namespace UAS_MES_NEW.Packing
             string Delete = MessageBox.Show(this.ParentForm, "是否确认拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
             if (Delete == "Yes")
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package left join oqcbatch on pa_checkno=ob_checkno where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0)pa_iostatus,pa_type,pa_outno,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package left join oqcbatch on pa_checkno=ob_checkno where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     if (dt.Rows[0]["pa_outno"].ToString() != "")
@@ -819,6 +819,11 @@ namespace UAS_MES_NEW.Packing
                         OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
                         return;
                     }
+                    if (dt.Rows[0]["pa_type"].ToString() != "1")
+                    {
+                        OperateResult.AppendText(">>非卡通箱类型不允许操作\n", Color.Red);
+                        return;
+                    }
                     if (dt.Rows[0]["pa_mothercode"].ToString() == "")
                     {
                         if (dt.Rows[0]["pa_downstatus"].ToString() == "0")

+ 1 - 1
UAS_MES_YD/PublicMethod/LogicHandler.cs

@@ -301,7 +301,7 @@ namespace UAS_MES_NEW.PublicMethod
             }
             else if (iOutBoxCode != "")
             {
-                SQL = "select ms_checkno from MES_PACKAGE_VIEW left join makeserial on v_barcode=ms_sncode where  v_outboxcode='" + iOutBoxCode + "' ";
+                SQL = "select ms_checkno from MES_PACKAGE_VIEW left join makeserial on v_barcode=ms_sncode and ms_makecode=v_makecode where  v_outboxcode='" + iOutBoxCode + "' ";
                 dt = (DataTable)dh.ExecuteSql(SQL, "select");
                 if (dt.Rows.Count == 0)
                 {