Przeglądaj źródła

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 lat temu
rodzic
commit
cfed8d2a06

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -57,7 +57,7 @@ namespace UAS_MES.Make
             }
             catch
             {
-                OperateResult.AppendText("未正确安装CodeSoft软件\n",Color.Red);
+                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
             }
         }
 
@@ -143,6 +143,7 @@ namespace UAS_MES.Make
                                 pa_makecode.Text = carton_macode;
                                 dh.ExecuteSql("update package set pa_makecode='" + carton_macode + "' where pa_outboxcode='" + bigoutboxcode.Text + "'", "update");
                             }
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "卡通箱" + outboxcode.Text + "采集成功", outboxcode.Text, "");
                             OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                             LoadGridData();
                             LoadCollectNum();
@@ -221,7 +222,7 @@ namespace UAS_MES.Make
             if (PrintLabel.Items.Count != 0)
             {
                 OperateResult.AppendText(">>打印箱号" + bigoutboxcode.Text + "\n", Color.Black);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
                 OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签\n", Color.Red);
@@ -232,6 +233,7 @@ namespace UAS_MES.Make
             dh.ExecuteSql("delete from packagedetail where pd_paid=(select pa_id from package where pa_outboxcode='" + bigoutboxcode.Text + "' and pa_type=2)", "delete");
             dh.ExecuteSql("update package set pa_totalqty=0,pa_packageqty=0 where pa_outboxcode='" + bigoutboxcode.Text + "' and pa_type=2", "update");
             OperateResult.AppendText(">>箱号" + outboxcode.Text + "解除成功\n", Color.Green);
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "解除大箱" + outboxcode.Text + "成功", bigoutboxcode.Text, "");
             palletcode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
         }
 
@@ -245,6 +247,7 @@ namespace UAS_MES.Make
             if (pa_prodcode.Text != "" && bigoutboxcode.Text != "")
             {
                 OperateResult.AppendText(">>" + bigoutboxcode.Text + "装箱成功\n", Color.Green);
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "装箱" + bigoutboxcode.Text + "成功", outboxcode.Text, "");
                 bigoutboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", "", pa_prodcode.Text, User.UserCode);
                 sql.Clear();
                 sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_standardqty)values");

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

@@ -140,11 +140,12 @@ namespace UAS_MES.Make
                     OperateResult.AppendText("<<<更新成功\n", Color.Green);
                     //刷新grid的历史称重信息;
                     recordResult(pa_outboxcode.Text, weight.Text, System.DateTime.Now.ToString());
+                    LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,pa_makecode.Text,User.UserLineCode,User.UserSourceCode,"大箱称重","称重成功","","");
                     if (autoprint.Checked == true)
                     {
                         try
                         {
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             dh.ExecuteSql("update package set pa_printcount= pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                             printcount++;
                             weightsum.Text = printcount + "";

+ 4 - 2
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -130,12 +130,14 @@ namespace UAS_MES.Make
                     {
                         if (AutoPrint.Checked)
                         {
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                         }
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量合格", outboxcode.Text, "");
                         OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
                     }
                     else
                     {
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量不合格", outboxcode.Text, "");
                         OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red);
                     }
                     ListViewItem lsi = new ListViewItem();
@@ -183,7 +185,7 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
         }
 
         //停止进程,关闭串口

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

@@ -265,6 +265,7 @@ namespace UAS_MES.Make
                             dh.UpdateByCondition("makeserial", "ms_mac = '" + sncode.Text + "' ," + "ms_bt = '" + ms_bt + "'", "ms_id = '" + oMsID + "'");
                             ErrorMessage = "BT/MAC采集完成,执行更新";
                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                            LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,ms_makecode.Text,User.UserLineCode,User.UserSourceCode,"BT/MAC采集","采集成功", sn_code,"");
                             sql.Clear();
                             sql.Append("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
                             sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");

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

@@ -144,6 +144,7 @@ namespace UAS_MES.Make
                             dh.UpdateByCondition("makeserial", "ms_netcode = '" + sncode.Text + "'", "ms_id = '" + oMsID + "'");
                             ErrorMessage = "网标采集完成,执行更新";
                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "网标采集", "采集成功", sn_code, "");
                             sql.Clear();
                             sql.Append("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
                             sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");

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

@@ -226,9 +226,10 @@ namespace UAS_MES.Make
                                 //更新至下一步工序
                                 if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage2))
                                 {
-                                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                                     //提示用户打印成功
                                     OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
+                                    LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,ma_code.Text,User.UserLineCode,User.UserSourceCode,"彩盒打印","彩盒打印成功",sncode.Text,"");
                                     //刷新打印数量和剩余数量
                                     dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
                                     BaseUtil.SetFormValue(Controls, dt);

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -189,7 +189,7 @@ namespace UAS_MES.Make
                             sql.Append("where ma_code='" + ma_code + "'and sp_id=" + sp_id + " and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode.Text + "'");
                             dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode" }, CollectDataSonCode.ToArray(), CollectData.ToArray());
                             OperateResult.AppendText(">>序列号" + ms_sncode.Text + "对应的工单已经采集完成\n", Color.Green);
-                            Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             RemainIndex = 0;
                             CollectData.Clear();
                             CollectDataSonCode.Clear();

+ 13 - 12
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -68,12 +68,12 @@
             this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.AutoPrint = new UAS_MES.CustomControl.CustomCheckBox.AutoPrintCheckBox();
             this.groupBoxWithBorder2 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ob_checkno = new System.Windows.Forms.Label();
             this.ob_nowcheckqty = new System.Windows.Forms.Label();
             this.ob_batchqty = new System.Windows.Forms.Label();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.SendCheck = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ob_checkno = new System.Windows.Forms.Label();
             this.panel4.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -497,6 +497,7 @@
             this.columnHeader2,
             this.columnHeader3,
             this.columnHeader4});
+            this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WeighRecord.Location = new System.Drawing.Point(540, 272);
             this.WeighRecord.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.WeighRecord.Name = "WeighRecord";
@@ -551,6 +552,17 @@
             this.groupBoxWithBorder2.Text = "打印";
             this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
             // 
+            // ob_checkno
+            // 
+            this.ob_checkno.AutoSize = true;
+            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_checkno.Location = new System.Drawing.Point(50, 111);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno.Name = "ob_checkno";
+            this.ob_checkno.Size = new System.Drawing.Size(0, 27);
+            this.ob_checkno.TabIndex = 179;
+            this.ob_checkno.Visible = false;
+            // 
             // ob_nowcheckqty
             // 
             this.ob_nowcheckqty.AutoSize = true;
@@ -614,17 +626,6 @@
             this.SendCheck.Text = "送检";
             this.SendCheck.UseVisualStyleBackColor = true;
             // 
-            // ob_checkno
-            // 
-            this.ob_checkno.AutoSize = true;
-            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(50, 111);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 27);
-            this.ob_checkno.TabIndex = 179;
-            this.ob_checkno.Visible = false;
-            // 
             // Make_ColorBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -222,7 +222,7 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
             {

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -319,6 +319,7 @@ namespace UAS_MES.Make
                             dh.ExecuteSql(sql.GetString(), "insert");
                             OperateResult.AppendText("物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解换料成功\n", Color.Green);
                             decompose = true;
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解换料", "拆解换料成功", ms_sncode.Text, "");
                         }
                     }
                     else if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose2"].Value == true)
@@ -331,6 +332,7 @@ namespace UAS_MES.Make
                         dh.ExecuteSql(sql.GetString(), "update");
                         OperateResult.AppendText("物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解成功\n", Color.Green);
                         decompose = true;
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解", "拆解成功", ms_sncode.Text, "");
                     }
                 }
             }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -141,7 +141,7 @@ namespace UAS_MES.Make
                                 return;
                             }
                             //按照打印张数打印
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             //提示用户打印成功
                             OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
                             //记录日志

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -88,7 +88,7 @@ namespace UAS_MES.Make
 
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' order by pl_isdefault desc ", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_labeltype='SN标签' order by pl_isdefault desc ", "select");
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "pl_laname";
             PrintLabel.ValueMember = "pl_labelcode";
@@ -245,7 +245,7 @@ namespace UAS_MES.Make
                                     if (PrintLabel.Items.Count != 0)
                                     {
                                         OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
-                                        Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                                        Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                                         dh.UpdateByCondition("makeserial", "ms_printcount=nvl(ms_printcount,0)+1", "ms_sncode='" + sn_code.Text + "'");
                                     }
                                     else OperateResult.AppendText(">>" + pr_code.Text + "未维护标签\n", Color.Black);

+ 69 - 69
UAS-MES/FunctionCode/Make/Make_MakeCancelDown.Designer.cs

@@ -32,6 +32,13 @@
             this.ms_makecode = new System.Windows.Forms.Label();
             this.pr_code = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.md_macode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.md_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.md_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.md_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.MD_DOWNMAN = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.md_reson = new System.Windows.Forms.Label();
             this.count_label = new System.Windows.Forms.Label();
             this.md_code_rb = new System.Windows.Forms.RadioButton();
@@ -53,13 +60,6 @@
             this.Sure = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.md_macode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.md_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.md_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.md_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.MD_DOWNMAN = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.inputreson = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
@@ -104,6 +104,68 @@
             this.LabelDataGridView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellValueChanged);
             this.LabelDataGridView.CurrentCellDirtyStateChanged += new System.EventHandler(this.LabelDataGridView_CurrentCellDirtyStateChanged);
             // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.MinimumWidth = 60;
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 60;
+            // 
+            // md_macode
+            // 
+            this.md_macode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_macode.DataPropertyName = "md_macode";
+            this.md_macode.HeaderText = "工单编号";
+            this.md_macode.Name = "md_macode";
+            this.md_macode.ReadOnly = true;
+            this.md_macode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // md_sncode
+            // 
+            this.md_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_sncode.DataPropertyName = "md_sncode";
+            this.md_sncode.HeaderText = "序列号";
+            this.md_sncode.Name = "md_sncode";
+            this.md_sncode.ReadOnly = true;
+            this.md_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // md_prodcode
+            // 
+            this.md_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_prodcode.DataPropertyName = "md_prodcode";
+            this.md_prodcode.HeaderText = "产品代码";
+            this.md_prodcode.Name = "md_prodcode";
+            this.md_prodcode.ReadOnly = true;
+            this.md_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "产品名称";
+            this.pr_detail.MinimumWidth = 80;
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
+            this.pr_detail.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // md_code
+            // 
+            this.md_code.DataPropertyName = "md_code";
+            this.md_code.HeaderText = "";
+            this.md_code.Name = "md_code";
+            this.md_code.ReadOnly = true;
+            this.md_code.Visible = false;
+            // 
+            // MD_DOWNMAN
+            // 
+            this.MD_DOWNMAN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.MD_DOWNMAN.HeaderText = "";
+            this.MD_DOWNMAN.MinimumWidth = 2;
+            this.MD_DOWNMAN.Name = "MD_DOWNMAN";
+            this.MD_DOWNMAN.ReadOnly = true;
+            this.MD_DOWNMAN.Width = 2;
+            // 
             // md_reson
             // 
             this.md_reson.AutoSize = true;
@@ -338,68 +400,6 @@
             this.sn_code.TabIndex = 214;
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.MinimumWidth = 60;
-            this.Choose.Name = "Choose";
-            this.Choose.Width = 60;
-            // 
-            // md_macode
-            // 
-            this.md_macode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_macode.DataPropertyName = "md_macode";
-            this.md_macode.HeaderText = "工单编号";
-            this.md_macode.Name = "md_macode";
-            this.md_macode.ReadOnly = true;
-            this.md_macode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // md_sncode
-            // 
-            this.md_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_sncode.DataPropertyName = "md_sncode";
-            this.md_sncode.HeaderText = "序列号";
-            this.md_sncode.Name = "md_sncode";
-            this.md_sncode.ReadOnly = true;
-            this.md_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // md_prodcode
-            // 
-            this.md_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_prodcode.DataPropertyName = "md_prodcode";
-            this.md_prodcode.HeaderText = "产品代码";
-            this.md_prodcode.Name = "md_prodcode";
-            this.md_prodcode.ReadOnly = true;
-            this.md_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.pr_detail.DataPropertyName = "pr_detail";
-            this.pr_detail.HeaderText = "产品名称";
-            this.pr_detail.MinimumWidth = 80;
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.ReadOnly = true;
-            this.pr_detail.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // md_code
-            // 
-            this.md_code.DataPropertyName = "md_code";
-            this.md_code.HeaderText = "";
-            this.md_code.Name = "md_code";
-            this.md_code.ReadOnly = true;
-            this.md_code.Visible = false;
-            // 
-            // MD_DOWNMAN
-            // 
-            this.MD_DOWNMAN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.MD_DOWNMAN.HeaderText = "";
-            this.MD_DOWNMAN.MinimumWidth = 2;
-            this.MD_DOWNMAN.Name = "MD_DOWNMAN";
-            this.MD_DOWNMAN.ReadOnly = true;
-            this.MD_DOWNMAN.Width = 2;
-            // 
             // inputreson
             // 
             this.inputreson.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

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

@@ -148,6 +148,7 @@ namespace UAS_MES.Make
                             sql.Clear();
                             sql.Append("update makeserial set ms_downstatus=0 where ms_sncode='" + LabelDataGridView.Rows[i].Cells["md_sncode"].Value.ToString() + "' and ms_makecode='" + LabelDataGridView.Rows[i].Cells["md_macode"].Value.ToString() + "'");
                             dh.ExecuteSql(sql.GetString(), "update");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, LabelDataGridView.Rows[i].Cells["md_macode"].Value.ToString(), User.UserLineCode, User.UserSourceCode, "取消下地操作", "序列号" + LabelDataGridView.Rows[i].Cells["md_sncode"].Value.ToString() + "下地成功", LabelDataGridView.Rows[i].Cells["md_sncode"].Value.ToString(), "");
                         }
                     }
                 }
@@ -173,7 +174,7 @@ namespace UAS_MES.Make
             }
             else
             {
-                OperateResult.AppendText(">>>没有填写下地原因\n", Color.Red);
+                OperateResult.AppendText(">>>没有填写取消下地原因\n", Color.Red);
                 return;
             }
         }

+ 0 - 21
UAS-MES/FunctionCode/Make/Make_MakeCancelDown.resx

@@ -177,25 +177,4 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_macode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="MD_DOWNMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 59 - 58
UAS-MES/FunctionCode/Make/Make_MakeDown.Designer.cs

@@ -34,11 +34,6 @@
             this.count_label = new System.Windows.Forms.Label();
             this.md_reson = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
-            this.md_macode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.md_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.md_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.MD_DOWNMAN = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label1 = new System.Windows.Forms.Label();
             this.pr_code = new System.Windows.Forms.Label();
             this.ms_makecode = new System.Windows.Forms.Label();
@@ -46,10 +41,15 @@
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.md_macode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.md_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.md_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.MD_DOWNMAN = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.inputreson = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
-            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -117,56 +117,13 @@
             this.md_prodcode,
             this.pr_detail,
             this.MD_DOWNMAN});
-            this.LabelDataGridView.Location = new System.Drawing.Point(22, 193);
+            this.LabelDataGridView.Location = new System.Drawing.Point(23, 194);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowTemplate.Height = 23;
             this.LabelDataGridView.Size = new System.Drawing.Size(747, 192);
             this.LabelDataGridView.TabIndex = 200;
             // 
-            // md_macode
-            // 
-            this.md_macode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_macode.DataPropertyName = "md_macode";
-            this.md_macode.HeaderText = "工单编号";
-            this.md_macode.Name = "md_macode";
-            this.md_macode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // md_sncode
-            // 
-            this.md_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_sncode.DataPropertyName = "md_sncode";
-            this.md_sncode.HeaderText = "序列号";
-            this.md_sncode.Name = "md_sncode";
-            this.md_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // md_prodcode
-            // 
-            this.md_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.md_prodcode.DataPropertyName = "md_prodcode";
-            this.md_prodcode.HeaderText = "产品代码";
-            this.md_prodcode.Name = "md_prodcode";
-            this.md_prodcode.ReadOnly = true;
-            this.md_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.pr_detail.DataPropertyName = "pr_detail";
-            this.pr_detail.HeaderText = "产品名称";
-            this.pr_detail.MinimumWidth = 80;
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.ReadOnly = true;
-            this.pr_detail.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // MD_DOWNMAN
-            // 
-            this.MD_DOWNMAN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.MD_DOWNMAN.HeaderText = "";
-            this.MD_DOWNMAN.MinimumWidth = 2;
-            this.MD_DOWNMAN.Name = "MD_DOWNMAN";
-            this.MD_DOWNMAN.Width = 2;
-            // 
             // label1
             // 
             this.label1.AutoSize = true;
@@ -231,6 +188,14 @@
             this.dataGridViewTextBoxColumn4.ReadOnly = true;
             this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn5.HeaderText = "";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 2;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.Width = 5;
+            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -255,6 +220,49 @@
             this.sn_code.TabIndex = 201;
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
+            // md_macode
+            // 
+            this.md_macode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_macode.DataPropertyName = "md_macode";
+            this.md_macode.HeaderText = "工单编号";
+            this.md_macode.Name = "md_macode";
+            this.md_macode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // md_sncode
+            // 
+            this.md_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_sncode.DataPropertyName = "md_sncode";
+            this.md_sncode.HeaderText = "序列号";
+            this.md_sncode.Name = "md_sncode";
+            this.md_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // md_prodcode
+            // 
+            this.md_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.md_prodcode.DataPropertyName = "md_prodcode";
+            this.md_prodcode.HeaderText = "产品代码";
+            this.md_prodcode.Name = "md_prodcode";
+            this.md_prodcode.ReadOnly = true;
+            this.md_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "产品名称";
+            this.pr_detail.MinimumWidth = 80;
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
+            this.pr_detail.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // MD_DOWNMAN
+            // 
+            this.MD_DOWNMAN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.MD_DOWNMAN.HeaderText = "";
+            this.MD_DOWNMAN.MinimumWidth = 2;
+            this.MD_DOWNMAN.Name = "MD_DOWNMAN";
+            this.MD_DOWNMAN.Width = 2;
+            // 
             // inputreson
             // 
             this.inputreson.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -265,13 +273,6 @@
             this.inputreson.TabIndex = 199;
             this.inputreson.Text = "";
             // 
-            // dataGridViewTextBoxColumn5
-            // 
-            this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.dataGridViewTextBoxColumn5.HeaderText = "";
-            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
-            this.dataGridViewTextBoxColumn5.Width = 5;
-            // 
             // Make_MakeDown
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -282,13 +283,13 @@
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.sn_code);
-            this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.inputreson);
             this.Controls.Add(this.md_reson);
             this.Controls.Add(this.make_count);
             this.Controls.Add(this.count_label);
             this.Controls.Add(this.mdcode);
             this.Controls.Add(this.md_code_label);
+            this.Controls.Add(this.LabelDataGridView);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Make_MakeDown";
             this.Tag = "Make!MakeDown";

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

@@ -98,6 +98,7 @@ namespace UAS_MES.Make
                                 dh.UpdateByCondition("makeserial", "ms_downstatus='-1'", "ms_id='" + ms_id + "'");
                                 OperateResult.AppendText(">>>序列号" + sn_code.Text + "下地成功\n", Color.Green);
                                 //更新数量
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "下地操作", "序列号" + sn_code.Text + "下地成功", sn_code.Text, "");
                                 count++;
                                 make_count.Text = count + "";
                                 sn_code.Text = "";

+ 6 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -126,6 +126,7 @@ namespace UAS_MES.Make
                 {
                     LoadCheckQTY();
                     OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
                     //满箱更新状态为1
                     if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == int.Parse(pr_outboxinnerqty.Text))
                     {
@@ -148,7 +149,7 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Green);
-                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                 }
                 else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
             }
@@ -294,6 +295,7 @@ namespace UAS_MES.Make
                                         dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty-1,pa_currentqty=pa_currentqty-1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                         //清除序列号箱号
                                         dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='" + oMsID + "'");
+                                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "取消采集成功", sn_code.Text, "");
                                         OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green);
                                         LoadGridData();
                                     }
@@ -306,7 +308,7 @@ namespace UAS_MES.Make
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
-                else OperateResult.AppendText(">>"+ErrorMessage+"\n", Color.Red);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
         }
 
@@ -346,6 +348,7 @@ namespace UAS_MES.Make
             {
                 dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                 pa_status.Text = "1";
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "封箱成功", pa_outboxcode.Text, "");
                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
             }
             else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
@@ -365,7 +368,7 @@ namespace UAS_MES.Make
                 OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
                 LogicHandler.InsertMakeProcess(sn_code.Text, oMakeCode, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
                 //记录操作日志
-                LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
                 ob_checkno.Text = "";
             }
             else OperateResult.AppendText(">>必须封箱才能送检\n", Color.Red);

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -228,7 +228,7 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Green);
-                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                 }
                 else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
             }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -206,7 +206,7 @@ namespace UAS_MES.Make
             if (PrintLabel.Items.Count != 0)
             {
                 OperateResult.AppendText(">>打印箱号" + palletcode.Text + "\n", Color.Black);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
                 OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签\n", Color.Red);

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

@@ -158,7 +158,7 @@ namespace UAS_MES.Make
                                     palletcode.Text = "";
                                     return;
                                 }
-                                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                             }
                             catch (Exception ex)
                             {

+ 11 - 3
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -145,6 +145,7 @@ namespace UAS_MES.Make
             sql.Append("sysdate,'" + User.UserCode + "','" + Barremain + "','" + Barremain + "','" + sp_oneuseqty + "','" + sp_soncode + "','" + ma_id + "','" + User.UserSourceCode + "')");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.UpdateByCondition("barcode", "bar_place='" + ma_code.Text + "'", "bar_code='" + pr_batchnum.Text + "'");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "岗位备料", "上料物料" + pr_batchnum.Text, "", "");
             //数据插入成功后加载Grid的数据
             FillDataGridView();
             OperateResult.AppendText(">>物料批号" + pr_batchnum.Text + "备料成功\n", Color.Green, pr_batchnum);
@@ -196,11 +197,18 @@ namespace UAS_MES.Make
                 if (e.RowIndex >= 0)
                 {
                     string id = BatchProductDGV.Rows[e.RowIndex].Cells["mss_id"].Value.ToString();
+                    string useqty = BatchProductDGV.Rows[e.RowIndex].Cells["mss_useqty"].Value.ToString();
+                    string soncode = BatchProductDGV.Rows[e.RowIndex].Cells["sp_soncode"].Value.ToString();
                     if (id != "0")
                     {
-                        BatchProductDGV.Rows.RemoveAt(e.RowIndex);
-                        dh.ExecuteSql("delete from makesourcestock where mss_id='" + id + "'", "delete");
-                        OperateResult.AppendText(">>删除成功\n");
+                        if (useqty == "0")
+                        {
+                            BatchProductDGV.Rows.RemoveAt(e.RowIndex);
+                            dh.ExecuteSql("delete from makesourcestock where mss_id='" + id + "'", "delete");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "岗位备料", "删除物料" + soncode, "", "");
+                            OperateResult.AppendText(">>料号" + soncode + "删除成功\n");
+                        }
+                        else OperateResult.AppendText(">>料号" + soncode + "已被使用,不允许删除\n", Color.Red);
                     }
                 }
             }

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -243,7 +243,7 @@ namespace UAS_MES.Make
                 //判定通过进行打印
                 //按照打印张数打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, 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, "", User.UserLineCode, User.UserSourceCode, giftBox.Checked?"彩盒标补打印":"机身标补打印", "补打印成功", inputValue.Text, "");
                 //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
@@ -266,7 +266,7 @@ namespace UAS_MES.Make
                 }
                 //判断通过,打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, 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(User.UserCode, "", User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:"+ inputValue.Text, "补打印成功","", "");
                 sql.Clear();

+ 4 - 3
UAS-MES/PublicMethod/Print.cs

@@ -3,6 +3,7 @@ using LabelManager2;
 using System.Data;
 using System.Text;
 using System.IO;
+using UAS_MES.Entity;
 
 namespace UAS_MES.PublicMethod
 {
@@ -22,7 +23,7 @@ namespace UAS_MES.PublicMethod
         /// </summary>
         /// <param name="Url"></param>
         /// <param name="LabelCode"></param>
-        public static void CodeSoft(ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode,int PrintNum,System.DateTime intime)
+        public static void CodeSoft(string iCaller, ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode, int PrintNum, System.DateTime intime)
         {
             //打开模板路径
             doc = lbl.Documents.Open(ftpOperater.DownLoadTo + LabelName);
@@ -39,7 +40,7 @@ namespace UAS_MES.PublicMethod
                         string sql = dt.Rows[j]["lp_sql"].ToString();
                         sql = sql.Substring(0, sql.IndexOf("{")) + "'" + SnCode + "'";
                         doc.Variables.FormVariables.Item(i + 1).Value = dh.GetLabelParam(sql).ToString();
-                        sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql  + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
+                        sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
                     }
                 }
             }
@@ -49,10 +50,10 @@ namespace UAS_MES.PublicMethod
             doc.Printer.SwitchTo(PrinterName);
             doc.PrintDocument(PrintNum);
             doc.Close();
+            LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
             //讲文件最后写入时间改成数据库中拿到的时间
             info = new FileInfo(ftpOperater.DownLoadTo + LabelName);
             info.LastWriteTime = intime;
-            
         }
 
         public static void CodeSoft(ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode)