瀏覽代碼

逻辑调整修复TextArea插件

章政 8 年之前
父節點
當前提交
cd12d092c1

+ 0 - 2
UAS-MES/CustomControl/TextBoxWithIcon/TextBoxWithTextArea.Designer.cs

@@ -54,8 +54,6 @@
             // 
             // TextAreaIcon
             // 
-            this.TextAreaIcon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Right)));
             this.TextAreaIcon.Cursor = System.Windows.Forms.Cursors.Hand;
             this.TextAreaIcon.Image = global::UAS_MES.Properties.Resources.notice_text_editor_16px_11373_easyicon_net;
             this.TextAreaIcon.Location = new System.Drawing.Point(239, 1);

+ 8 - 7
UAS-MES/CustomControl/TextBoxWithIcon/TextBoxWithTextArea.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES.PublicMethod;
 
 namespace UAS_MES.CustomControl.TextBoxWithIcon
 {
@@ -35,11 +34,11 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             string FormName = this.FindForm().Name;
             int i = 0;
             //当前的this是控件的Icon
-            Control c=this;
+            Control c = this;
             //一直通过父级往上找,直到父级的名称和Form的名称相等,记录经过了多少级
             while (GetParent)
             {
-                c= c.Parent;
+                c = c.Parent;
                 if (c.Name == FormName)
                 {
                     GetParent = false;
@@ -47,13 +46,14 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 i++;
             }
             //指定一个数据用来存放查找过的Control的Name
-            string[] ControlsName=new string[i];
+            string[] ControlsName = new string[i];
             //指定Form的名称
             taf.FormName = FormName;
             //重置Icon
             c = this;
             //将控件的名称添加到字符串数组中
-            for (int j = 0; j < i; j++) {
+            for (int j = 0; j < i; j++)
+            {
                 if (c.Name != FormName)
                 {
                     ControlsName[j] = c.Name;
@@ -61,7 +61,8 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 c = c.Parent;
             }
             taf.ControlName = ControlsName;
-            BaseUtil.SetFormCenter(taf);
+            taf.X = screenPoint.X / 2;
+            taf.Y = screenPoint.Y / 2;
             taf.ShowDialog();
         }
 
@@ -75,4 +76,4 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             textBox1.BackColor = Color.GreenYellow;
         }
     }
-}
+}

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -298,7 +298,7 @@ namespace UAS_MES.OQC
                 {
                     //更新下一工序
                     string ErrorMessage = "";
-                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
+                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text,"OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
                     //记录操作日志
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, "批结果判定", Operate, User.UserName);
                 }

+ 6 - 5
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1088,19 +1088,19 @@ namespace UAS_MES.PublicMethod
             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserName + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "'");
-            dh.BatchInsert(sql.ToString(), new string[] { "bg_code", "bc_code", "bc_remark" }, iBadGroupCode, iBadCode, iBadRemark);
+            dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark" }, iBadCode, iBadGroupCode, iBadRemark);
             //更新序列号状态,待维修,返修工序
             string st_rstepcode = dh.getFieldDataByCondition("step", "st_rstepcode", "st_code='" + StepCode + "'").ToString();
             sql.Clear();
             sql.Append("update makeserial set ms_status = 3,ms_nextstepcode ='" + st_rstepcode + "', ");
             sql.Append("ms_stepcode ='" + StepCode + "' where ms_sncode ='" + iSnCode + "' and ms_makecode ='" + iMakeCode + "'");
             dh.ExecuteSql(sql.ToString(), "update");
-            //更新makecraftdetail 工单采集记录表,根据工单号和工序编号 记录当前测试工序采集数量
-            dh.UpdateByCondition("makecraftdetail", "mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1", "mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "'");
+            ////更新makecraftdetail 工单采集记录表,根据工单号和工序编号 记录当前测试工序采集数量
+            //dh.UpdateByCondition("makecraftdetail", "mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1", "mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "'");
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + StepCode + "'", "ms_sncode='" + iSnCode + "'");
             //记录操作日志
-            InsertMakeProcess(iSnCode, iMakeCode, "测试采集", iResult, iUserName);
+            InsertMakeProcess(iSnCode, iMakeCode, "不良采集", iResult, iUserName);
             //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
             SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
@@ -1300,8 +1300,9 @@ namespace UAS_MES.PublicMethod
         /// <param name="iResult"></param>
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
-        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
+        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iMaKind, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
         {
+            InsertMakeProcess(iSnCode, iMakeCode, iMaKind, iResult, iUserName);
             return SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //oErrorMessage = "";
             //string StepCode = "";