Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
72be24a903

+ 1 - 1
UAS-MES/CustomControl/TextBoxWithIcon/TextBoxGeneratePaCode.cs

@@ -107,7 +107,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             }
             catch (Exception)
             {
-                MessageBox.Show("请先获取产品编号和工单号");
+                LogManager.DoLog("请先获取产品编号和工单号");
             }
         }
 

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -252,6 +252,7 @@ namespace UAS_MES.Make
             {
                 doc.Close();
             }
+            BaseUtil.ClosePrint(lbl);
         }
 
         private void pr_code_Leave(object sender, EventArgs e)

+ 4 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -26,6 +26,8 @@ namespace UAS_MES.Make
 
         ApplicationClass lbl;
 
+        Document doc;
+
         Thread InitPrint;
 
         Thread thread;
@@ -155,7 +157,8 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>产品:" + pa_prodcode.Text + "未维护栈板标签模板\n", Color.Red, palletcode);
                                     return;
                                 }
-                                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                                doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
+                                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                             }
                             catch (Exception ex)
                             {

+ 9 - 5
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -25,6 +25,8 @@ namespace UAS_MES.Make
 
         ApplicationClass lbl;
 
+        Document doc;
+
         Thread InitPrint;//实例化打印进程
 
         DataTable dt;
@@ -227,9 +229,10 @@ namespace UAS_MES.Make
                 //判定通过进行打印
                 //按照打印张数打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
+                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
-                LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
                 //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
                 if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
                 {
@@ -251,7 +254,8 @@ namespace UAS_MES.Make
                 }
                 //判断通过,打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
+                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
                 //如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
@@ -311,7 +315,7 @@ namespace UAS_MES.Make
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     return;
                 }
-                OperateResult.AppendText(">>"+rePrintCheck.Text+"\n", Color.Black);
+                OperateResult.AppendText(">>" + rePrintCheck.Text + "\n", Color.Black);
                 if (giftBox.Checked || fuselagel.Checked)
                 {
                     //TSN为空,说明是第一次
@@ -348,7 +352,7 @@ namespace UAS_MES.Make
                                 dh.ExecuteSQLTran("update makeserial set ms_downstatus='0' where ms_id='" + re_ms_id + "'", sql.GetString());
                             }
                             //记录操作日志commandlog , 补打核对,核对成功
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode,infoc.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对", "核对成功", TSN, "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对", "核对成功", TSN, "");
                         }
                         else
                         {