Browse Source

添加退料标签扫描

callm 3 months ago
parent
commit
c38c2af189

+ 4 - 3
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -250,6 +250,7 @@ namespace UAS_MES.Make
                         }
                         if (change.Checked)
                         {
+                            string userprodcode = "";
                             dt1 = new DataTable();
                             sql.Clear();
                             sql.Append("select nvl(ms_bomversion,ma_bomversion) ms_bomversion,ms_craftcode,ms_prodcode from makeserial left join make on ma_code=ms_makecode ");
@@ -270,7 +271,7 @@ namespace UAS_MES.Make
                             sql.Append("sp_bomversion='" + ms_bomversion + "' and  sp_craftcode='" + ms_craftcode_ + "'and sp_mothercode ='" + ms_prodcode_ + "'");
                             sql.Append(" group by sp_fsoncode,sp_tracekind  order by SP_DETNO asc");
                             dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            DataRow[] dtrows = dtbar.Select("sp_soncode like '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "' or sp_repcode like '"+ LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                            DataRow[] dtrows = dtbar.Select("sp_soncode like '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "' or sp_repcode like '%"+ LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "%'");
                             dtbar = BaseUtil.ToDataTable(dtrows);
                             if (dtbar.Rows.Count > 0)
                             {
@@ -285,7 +286,7 @@ namespace UAS_MES.Make
                                 string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                                 string sp_checksalecode = dtbar.Rows[0]["sp_checksalecode"].ToString();
                                 string sp_instr = dtbar.Rows[0]["sp_instr"].ToString();
-                                string userprodcode = "";
+                              
                                 if (sp_tracekind == "1")
                                 {
                                     //上料校验规则判断
@@ -399,7 +400,7 @@ namespace UAS_MES.Make
                             sql.Append("insert into craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,");
                             sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid, cm_materialtype,cm_status,cm_fsoncode,cm_firstsn)");
                             sql.Append("values(Craftmaterial_seq.nextval,'" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maid"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
-                            sql.Append(",'" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
+                            sql.Append(",'" + userprodcode + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
                             sql.Append("'" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_craftname"].Value + "','" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "',1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "','" + LabelDataGridView.Rows[i].Cells["cm_wccode"].Value + "',");
                             sql.Append("'" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_spid"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','" + LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");

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

@@ -190,10 +190,11 @@ namespace UAS_MES.Make
                                     }
                                 }
                                 LabelDataGridView.Rows[RemainIndex].Cells["BarCode"].Value = code.Text;
+                                string str = userprodcode == "" ? sp_fsoncode : userprodcode;
                                 string maincode = LabelDataGridView.Rows[0].Cells["BarCode"].Value.ToString();
                                 sql.Clear();
                                 sql.Append("insert into BEFOREHANDPROCESS(bhp_id,bhp_maincode,bhp_barcode,bhp_prodcode,bhp_indate,bhp_inman)");
-                                sql.Append("values(BEFOREHANDPROCESS_seq.nextval,'" + maincode + "','" + code.Text + "','" + userprodcode==""? sp_fsoncode: userprodcode + "',sysdate,'" + User.UserCode + "')");
+                                sql.Append("values(BEFOREHANDPROCESS_seq.nextval,'" + maincode + "','" + code.Text + "','" + str + "',sysdate,'" + User.UserCode + "')");
                                 dh.ExecuteSql(sql.GetString(), "insert");
                                 OperateResult.AppendText(">> 条码" + code.Text + "上料成功\n", Color.Green, code);
                                 code.Clear();

+ 456 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_BarcodeIn1.Designer.cs

@@ -0,0 +1,456 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_BarcodeIn1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_BarcodeIn1));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.DGV = new System.Windows.Forms.DataGridView();
+            this.bi_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bi_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_inqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_madedate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_vendbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.label1_lll_ = new System.Windows.Forms.Label();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            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.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteBarcode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.barcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.GenProdiodetail = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.pi_inoutno = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.ChooseAll = new System.Windows.Forms.Button();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(19, 15);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.TabIndex = 212;
+            this.ms_makecode_label.Text = "出库单号";
+            // 
+            // DGV
+            // 
+            this.DGV.AllowUserToAddRows = false;
+            this.DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.bi_id,
+            this.choose,
+            this.bi_barcode,
+            this.bi_inqty,
+            this.bi_madedate,
+            this.bi_vendbarcode,
+            this.bi_prodcode,
+            this.pr_spec,
+            this.pr_detail});
+            this.DGV.Location = new System.Drawing.Point(26, 125);
+            this.DGV.Name = "DGV";
+            this.DGV.RowHeadersWidth = 82;
+            this.DGV.RowTemplate.Height = 37;
+            this.DGV.Size = new System.Drawing.Size(1922, 925);
+            this.DGV.TabIndex = 218;
+            // 
+            // bi_id
+            // 
+            this.bi_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bi_id.DataPropertyName = "bi_id";
+            this.bi_id.HeaderText = "ID";
+            this.bi_id.MinimumWidth = 10;
+            this.bi_id.Name = "bi_id";
+            this.bi_id.Visible = false;
+            this.bi_id.Width = 10;
+            // 
+            // choose
+            // 
+            this.choose.HeaderText = "勾选";
+            this.choose.MinimumWidth = 10;
+            this.choose.Name = "choose";
+            this.choose.Width = 80;
+            // 
+            // bi_barcode
+            // 
+            this.bi_barcode.DataPropertyName = "bi_barcode";
+            this.bi_barcode.HeaderText = "条码号";
+            this.bi_barcode.MinimumWidth = 10;
+            this.bi_barcode.Name = "bi_barcode";
+            this.bi_barcode.ReadOnly = true;
+            this.bi_barcode.Width = 150;
+            // 
+            // bi_inqty
+            // 
+            this.bi_inqty.DataPropertyName = "bi_inqty";
+            this.bi_inqty.HeaderText = "数量";
+            this.bi_inqty.MinimumWidth = 10;
+            this.bi_inqty.Name = "bi_inqty";
+            this.bi_inqty.ReadOnly = true;
+            this.bi_inqty.Width = 200;
+            // 
+            // bi_madedate
+            // 
+            this.bi_madedate.DataPropertyName = "bi_madedate";
+            this.bi_madedate.HeaderText = "DC";
+            this.bi_madedate.MinimumWidth = 10;
+            this.bi_madedate.Name = "bi_madedate";
+            this.bi_madedate.Width = 200;
+            // 
+            // bi_vendbarcode
+            // 
+            this.bi_vendbarcode.DataPropertyName = "bi_vendbarcode";
+            this.bi_vendbarcode.HeaderText = "LOTNO";
+            this.bi_vendbarcode.MinimumWidth = 10;
+            this.bi_vendbarcode.Name = "bi_vendbarcode";
+            this.bi_vendbarcode.Width = 200;
+            // 
+            // bi_prodcode
+            // 
+            this.bi_prodcode.DataPropertyName = "bi_prodcode";
+            this.bi_prodcode.HeaderText = "料号";
+            this.bi_prodcode.MinimumWidth = 10;
+            this.bi_prodcode.Name = "bi_prodcode";
+            this.bi_prodcode.ReadOnly = true;
+            this.bi_prodcode.Width = 200;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.MinimumWidth = 10;
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.ReadOnly = true;
+            this.pr_spec.Width = 200;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "名称";
+            this.pr_detail.MinimumWidth = 10;
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
+            this.pr_detail.Width = 80;
+            // 
+            // label1_lll_
+            // 
+            this.label1_lll_.AutoSize = true;
+            this.label1_lll_.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1_lll_.Location = new System.Drawing.Point(1047, 11);
+            this.label1_lll_.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1_lll_.Name = "label1_lll_";
+            this.label1_lll_.Size = new System.Drawing.Size(114, 41);
+            this.label1_lll_.TabIndex = 219;
+            this.label1_lll_.Text = "输入框";
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "lm_id";
+            this.dataGridViewTextBoxColumn1.HeaderText = "ID";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Visible = false;
+            this.dataGridViewTextBoxColumn1.Width = 10;
+            // 
+            // dataGridViewCheckBoxColumn1
+            // 
+            this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
+            this.dataGridViewCheckBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "lm_makecode";
+            this.dataGridViewTextBoxColumn2.HeaderText = "工单号";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "lm_linecode";
+            this.dataGridViewTextBoxColumn3.HeaderText = "线别";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "lm_uptime";
+            this.dataGridViewTextBoxColumn4.HeaderText = "上线时间";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "lm_downtime";
+            this.dataGridViewTextBoxColumn5.HeaderText = "下线时间";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            this.dataGridViewTextBoxColumn5.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "lm_inman";
+            this.dataGridViewTextBoxColumn6.HeaderText = "录入人";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
+            this.dataGridViewTextBoxColumn6.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "lm_mannum";
+            this.dataGridViewTextBoxColumn7.HeaderText = "拉线人数";
+            this.dataGridViewTextBoxColumn7.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.ReadOnly = true;
+            this.dataGridViewTextBoxColumn7.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn8.HeaderText = "名称";
+            this.dataGridViewTextBoxColumn8.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.ReadOnly = true;
+            this.dataGridViewTextBoxColumn8.Width = 80;
+            // 
+            // DeleteBarcode
+            // 
+            this.DeleteBarcode.AllPower = null;
+            this.DeleteBarcode.BackColor = System.Drawing.Color.Transparent;
+            this.DeleteBarcode.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.DownImage")));
+            this.DeleteBarcode.Image = null;
+            this.DeleteBarcode.IsShowBorder = true;
+            this.DeleteBarcode.Location = new System.Drawing.Point(1663, 14);
+            this.DeleteBarcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.DeleteBarcode.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.MoveImage")));
+            this.DeleteBarcode.Name = "DeleteBarcode";
+            this.DeleteBarcode.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.NormalImage")));
+            this.DeleteBarcode.Power = null;
+            this.DeleteBarcode.Size = new System.Drawing.Size(112, 45);
+            this.DeleteBarcode.TabIndex = 221;
+            this.DeleteBarcode.Text = "删除";
+            this.DeleteBarcode.UseVisualStyleBackColor = false;
+            this.DeleteBarcode.Click += new System.EventHandler(this.DeleteBarcode_Click);
+            // 
+            // barcode
+            // 
+            this.barcode.AllPower = null;
+            this.barcode.BackColor = System.Drawing.Color.White;
+            this.barcode.ID = null;
+            this.barcode.Location = new System.Drawing.Point(1175, 15);
+            this.barcode.Margin = new System.Windows.Forms.Padding(4);
+            this.barcode.Name = "barcode";
+            this.barcode.Power = null;
+            this.barcode.Size = new System.Drawing.Size(292, 35);
+            this.barcode.Str = null;
+            this.barcode.Str1 = null;
+            this.barcode.Str2 = null;
+            this.barcode.TabIndex = 220;
+            this.barcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MakeCode_KeyDown);
+            // 
+            // GenProdiodetail
+            // 
+            this.GenProdiodetail.AllPower = null;
+            this.GenProdiodetail.BackColor = System.Drawing.Color.Transparent;
+            this.GenProdiodetail.DownImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.DownImage")));
+            this.GenProdiodetail.Image = null;
+            this.GenProdiodetail.IsShowBorder = true;
+            this.GenProdiodetail.Location = new System.Drawing.Point(1508, 14);
+            this.GenProdiodetail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.GenProdiodetail.MoveImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.MoveImage")));
+            this.GenProdiodetail.Name = "GenProdiodetail";
+            this.GenProdiodetail.NormalImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.NormalImage")));
+            this.GenProdiodetail.Power = null;
+            this.GenProdiodetail.Size = new System.Drawing.Size(122, 45);
+            this.GenProdiodetail.TabIndex = 216;
+            this.GenProdiodetail.Text = "生成明细";
+            this.GenProdiodetail.UseVisualStyleBackColor = false;
+            this.GenProdiodetail.Click += new System.EventHandler(this.Print_Click);
+            // 
+            // pi_inoutno
+            // 
+            this.pi_inoutno.AllPower = "IFALL";
+            this.pi_inoutno.Caller = null;
+            this.pi_inoutno.Condition = null;
+            this.pi_inoutno.DBTitle = "";
+            this.pi_inoutno.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.pi_inoutno.FormName = null;
+            this.pi_inoutno.Location = new System.Drawing.Point(186, 15);
+            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(6);
+            this.pi_inoutno.Name = "pi_inoutno";
+            this.pi_inoutno.Power = "";
+            this.pi_inoutno.ReturnData = null;
+            this.pi_inoutno.SelectField = null;
+            this.pi_inoutno.SetValueField = null;
+            this.pi_inoutno.Size = new System.Drawing.Size(307, 46);
+            this.pi_inoutno.TabIndex = 213;
+            this.pi_inoutno.TableName = null;
+            this.pi_inoutno.Tag = "msl_makecode";
+            this.pi_inoutno.TextBoxEnable = true;
+            this.pi_inoutno.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.pi_inoutno_UserControlTextChanged);
+            // 
+            // ChooseAll
+            // 
+            this.ChooseAll.Location = new System.Drawing.Point(26, 125);
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Size = new System.Drawing.Size(86, 45);
+            this.ChooseAll.TabIndex = 222;
+            this.ChooseAll.Text = "全选";
+            this.ChooseAll.UseVisualStyleBackColor = true;
+            this.ChooseAll.Click += new System.EventHandler(this.ChooseAll_Click);
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(625, 16);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(388, 32);
+            this.PrintLabel.TabIndex = 228;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(523, 15);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 227;
+            this.label3.Text = "标签";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(19, 75);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 230;
+            this.label2.Text = "打印机";
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Location = new System.Drawing.Point(186, 75);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(307, 50);
+            this.PrinterList.TabIndex = 229;
+            // 
+            // Query_BarcodeIn1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1960, 1075);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.PrintLabel);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.ChooseAll);
+            this.Controls.Add(this.DeleteBarcode);
+            this.Controls.Add(this.barcode);
+            this.Controls.Add(this.label1_lll_);
+            this.Controls.Add(this.DGV);
+            this.Controls.Add(this.GenProdiodetail);
+            this.Controls.Add(this.pi_inoutno);
+            this.Controls.Add(this.ms_makecode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Query_BarcodeIn1";
+            this.Tag = "Query!SpecialReport";
+            this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_LoadMake_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pi_inoutno;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.ButtonUtil.NormalButton GenProdiodetail;
+        private System.Windows.Forms.DataGridView DGV;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox barcode;
+        private System.Windows.Forms.Label label1_lll_;
+        private CustomControl.ButtonUtil.NormalButton DeleteBarcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_id;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_inqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_madedate;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_vendbarcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
+        private System.Windows.Forms.Button ChooseAll;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+    }
+}

+ 213 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_BarcodeIn1.cs

@@ -0,0 +1,213 @@
+using DevExpress.Printing.Core.PdfExport.Metafile;
+using HslCommunication;
+using LabelManager2;
+using Seagull.BarTender.Print;
+using System;
+using System.Data;
+using System.Drawing;
+using System.Threading;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+using static System.Runtime.CompilerServices.RuntimeHelpers;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_BarcodeIn1 : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        DataTable Dbfind;
+
+        Thread InitPrint;
+
+        Engine engine;
+
+        public Query_BarcodeIn1()
+        {
+            InitializeComponent();
+        }
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception)
+            {
+                MessageBox.Show("未正确安装BarTender软件");
+            }
+        }
+
+        private void Query_LoadMake_Load(object sender, EventArgs e)
+        {
+            pi_inoutno.TableName = "prodinout";
+            pi_inoutno.SelectField = "pi_inoutno#单号";
+            pi_inoutno.FormName = Name;
+            pi_inoutno.SetValueField = new string[] { "pi_inoutno" };
+            pi_inoutno.Condition = "1=1";
+            pi_inoutno.DbChange += Ma_code_DbChange;
+
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+
+            LoadGridData();
+
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='生产退料标签' and la_templatetype='自定义' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            if (_dt.Rows.Count == 0)
+            {
+                _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='自定义' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            }
+            if (_dt.Rows.Count > 0)
+            {
+                string la_id = _dt.Rows[0]["la_id"].ToString();
+                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_templatetype='自定义' and la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
+                PrintLabel.DataSource = _dt;
+                PrintLabel.DisplayMember = "la_url";
+                PrintLabel.ValueMember = "la_id";
+            }
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = pi_inoutno.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void UpLoadMake_Click(object sender, EventArgs e)
+        {
+            LoadGridData();
+        }
+
+        private void LoadGridData()
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select * from barcodeio left join product on pr_code=bi_prodcode where bi_inoutno='" + pi_inoutno.Text + "'", "select");
+            BaseUtil.FillDgvWithDataTable(DGV, dt);
+        }
+
+        private bool ifcheckrow()
+        {
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                if (DGV.Rows[i].Cells["Choose"].Value != null && DGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        private void Print_Click(object sender, EventArgs e)
+        {
+            string ErrMsg = "";
+            LogicHandler.GenProdiodetail(pi_inoutno.Text, out ErrMsg);
+            MessageBox.Show("生成明细成功");
+        }
+
+
+        private void pi_inoutno_UserControlTextChanged(object sender, EventArgs e)
+        {
+            LoadGridData();
+        }
+
+        private void MakeCode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (pi_inoutno.Text == "")
+                {
+                    MessageBox.Show("出入库单号不能为空");
+                    return;
+                }
+                DataTable dt = (DataTable)dh.ExecuteSql("select bi_inqty,bi_barcode from barcodeio left join product on pr_code=bi_prodcode" +
+                    " where bi_inoutno='" + pi_inoutno.Text + "' and bi_barcode='" + barcode.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    MessageBox.Show("出入库单已采集条码" + barcode.Text);
+                    return;
+                }
+                dt = (DataTable)dh.ExecuteSql("select bar_vendbarcode,bar_remain,to_char(nvl(bar_madedate,sysdate),'yyyy-mm-dd')bar_madedate,bar_code,bar_remain,bar_prodcode from barcode left " +
+                    "join product on pr_code=bar_prodcode where bar_code='" + barcode.Text + "'", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    MessageBox.Show("条码" + barcode.Text + "不存在");
+                    return;
+                }
+                string pi_id = dh.getFieldDataByCondition("prodinout", "pi_id", "pi_inoutno='" + pi_inoutno.Text + "'").ToString();
+                string bar_code = dt.Rows[0]["bar_code"].ToString();
+                string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
+                string bar_madedate = dt.Rows[0]["bar_madedate"].ToString();
+                string bar_remain = dt.Rows[0]["bar_remain"].ToString();
+                string bar_vendbarcode = dt.Rows[0]["bar_vendbarcode"].ToString();
+                dh.ExecuteSql("insert into barcodeio(bi_id,bi_piid,bi_barcode,bi_inoutno,bi_prodcode,bi_indate,bi_inqty,bi_vendbarcode,bi_madedate,bi_sourcecode,bi_printstatus)" +
+                    "values(barcodeio_seq.nextval,'" + pi_id + "','" + barcode.Text + "','" + pi_inoutno.Text + "','" + bar_prodcode + "',sysdate,'" + bar_remain + "','" + bar_vendbarcode + "',to_date('" + bar_madedate + "','yyyy-mm-dd'),'" + bar_code + "',1)", "insert");
+                LoadGridData();
+                string ErrorMessage = "";
+                //if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, newbarcode, int.Parse("1"), pi_inoutno.Text, bar_prodcode, "自定义", "0", out ErrorMessage))
+                //{
+
+                //}
+            }
+        }
+
+        private void Query_BarcodeIn_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void DeleteBarcode_Click(object sender, EventArgs e)
+        {
+            if (!ifcheckrow())
+            {
+                MessageBox.Show("请勾选需要操作的行");
+                return;
+            }
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                if (DGV.Rows[i].Cells["Choose"].Value != null && DGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    string barcode = DGV.Rows[i].Cells["bi_barcode"].Value.ToString();
+                    string prodcode = DGV.Rows[i].Cells["bi_prodcode"].Value.ToString();
+                    dh.ExecuteSql("delete from barcodeio where bi_id=" + DGV.Rows[i].Cells["bi_id"].Value.ToString(), "delete");
+                }
+            }
+            LoadGridData();
+        }
+
+        private void ChooseAll_Click(object sender, EventArgs e)
+        {
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                DGV.Rows[i].Cells["choose"].Value = true;
+            }
+        }
+
+        private void Print_Click_1(object sender, EventArgs e)
+        {
+            if (!ifcheckrow())
+            {
+                MessageBox.Show("请勾选需要操作的行");
+                return;
+            }
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                if (DGV.Rows[i].Cells["Choose"].Value != null && DGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    string barcode = DGV.Rows[i].Cells["bi_barcode"].Value.ToString();
+                    string prodcode = DGV.Rows[i].Cells["bi_prodcode"].Value.ToString();
+                    string ErrorMessage = "";
+                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, barcode, int.Parse("1"), pi_inoutno.Text, prodcode, "自定义", "0", out ErrorMessage))
+                    {
+
+                    }
+                }
+            }
+        }
+    }
+}

+ 227 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_BarcodeIn1.resx

@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="bi_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bi_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bi_inqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bi_madedate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bi_vendbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bi_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="DeleteBarcode.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteBarcode.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteBarcode.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="GenProdiodetail.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="GenProdiodetail.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="GenProdiodetail.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 2 - 2
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.Designer.cs

@@ -215,9 +215,9 @@
             this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Name = "Special_CancelCollection";
             this.Tag = "Special!CancelCollection";
-            this.Text = "取消采集";
+            this.Text = " ";
             this.Load += new System.EventHandler(this.Special_CancelCollection_Load);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 2 - 2
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.resx

@@ -177,7 +177,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -308,7 +308,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B

+ 2 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_Delete.cs

@@ -84,7 +84,8 @@ namespace UAS_MES_NEW.Special
                 sqls.Add("update makesnlist set msl_status=0 where msl_sncode='" + ms_sncode + "' and msl_makecode='" + ms_makecode + "' and msl_type='before'");
                 ////初始化号段状态
                 sqls.Add("update MAKESNRULEDETAIL set msd_status=0 where msd_sncode='" + ms_sncode + "' and msd_makecode='" + ms_makecode + "'  and msd_type='before'");
-                sqls.Add("delete from  makesnrelation where SN='" + ms_sncode + "' and makecode='" + ms_makecode + "' ");
+                sqls.Add("delete from makesnrelation where SN='" + ms_sncode + "' and makecode='" + ms_makecode + "' ");
+                sqls.Add("update make set ma_inqty=ma_inqty-1 where ma_code='" + ms_makecode + "' ");
                 dh.ExecuteSQLTran(sqls.ToArray());
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "工单解绑", "工单解绑成功", sncode, "");
             }