Browse Source

测试提交

章政 8 years ago
parent
commit
883e9da488

+ 3 - 2
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -116,10 +116,11 @@ namespace UAS_MES.Make
                                 OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
                                 if (PrintLabel.SelectedValue == null)
                                 {
-                                    OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red);
+                                    OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, code);
                                     return;
                                 }
                                 ms_sncode.Text = code.Text;
+                                code.Text = "";
                             }
                             //判断当前的执行状态 ,Loading表示执行上料操作,UnLoading表示执行下料操作
                             if (load.Checked == true)
@@ -153,7 +154,7 @@ namespace UAS_MES.Make
                                         string ms_macode = dt.Rows[0]["ms_makecode"].ToString();
                                         string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                                         string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
-                                        dh.ExecuteSql("delete from craftmaterial where cm_sncode='" + code.Text + "' and cm_makecode='" + macode + "'", "delete");
+                                        dh.ExecuteSql("delete from craftmaterial where cm_sncode='" + code.Text + "' and cm_makecode='" + macode + "' and cm_status=0", "delete");
                                         LogicHandler.InsertMakeProcess(ms_macode, code.Text, User.UserSourceCode, "上料采集操作", "下料成功", User.UserCode);
                                         int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + code.Text + "'");
                                         if (count == 0)

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -229,7 +229,7 @@ namespace UAS_MES.Make
                                 string cm_craftcode = dt.Rows[0]["cm_craftcode"].ToString();
                                 if (cm_materialtype == "1" && cm_status == "0")
                                 {
-                                    dh.ExecuteSql("delete from craftmaterial where cm_sncode='" + code.Text + "' and cm_makecode='" + ma_code.Text + "'", "delete");
+                                    dh.ExecuteSql("delete from craftmaterial where cm_sncode='" + code.Text + "' and cm_makecode='" + ma_code.Text + "' and cm_status=0", "delete");
                                     LogicHandler.InsertMakeProcess(ms_macode, code.Text, User.UserSourceCode, "上料采集操作", "下料成功", User.UserCode);
                                     int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + code.Text + "'");
                                     if (count == 0)
@@ -258,6 +258,7 @@ namespace UAS_MES.Make
         private void GetCollectItem()
         {
             //将录入框的值给序列号
+            sn_code.Text = code.Text;
             sql.Clear();
             sql.Append("select ma_prodcode,ma_craftcode,ma_bomversion,ma_qty,ma_code,pr_detail,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
             sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");