chenxy 1 год назад
Родитель
Сommit
d4e6be3de9

+ 98 - 25
DK.Client/Client.Controls/BarcodeBatchSet/F_SET_014002.Designer.cs

@@ -30,6 +30,9 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_SET_014002));
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             this.lblLabel1 = new Dongke.WinForm.Controls.LblLabel();
             this.grpHB = new Dongke.WinForm.Controls.GrpGroupBox();
             this.btnHB_Show = new System.Windows.Forms.Button();
@@ -112,6 +115,10 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.lblLabel25 = new Dongke.WinForm.Controls.LblLabel();
             this.numDisplayNo = new System.Windows.Forms.NumericUpDown();
             this.btnPrint = new System.Windows.Forms.Button();
+            this.pnlPanel1 = new Dongke.WinForm.Controls.PnlPanel();
+            this.dgvTXT_EGS = new System.Windows.Forms.DataGridView();
+            this.colkey = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.colvalue = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.grpHB.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtHB_H)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtHB_W)).BeginInit();
@@ -135,6 +142,8 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             ((System.ComponentModel.ISupportInitialize)(this.txtPageH)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPageW)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.numDisplayNo)).BeginInit();
+            this.pnlPanel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvTXT_EGS)).BeginInit();
             this.SuspendLayout();
             // 
             // lblLabel1
@@ -360,14 +369,16 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.txtBC_EG.Name = "txtBC_EG";
             this.txtBC_EG.Size = new System.Drawing.Size(120, 21);
             this.txtBC_EG.TabIndex = 25;
+            this.txtBC_EG.Visible = false;
             // 
             // lblLabel10
             // 
-            this.lblLabel10.Location = new System.Drawing.Point(13, 109);
+            this.lblLabel10.Location = new System.Drawing.Point(23, 105);
             this.lblLabel10.Name = "lblLabel10";
             this.lblLabel10.Size = new System.Drawing.Size(29, 12);
             this.lblLabel10.TabIndex = 24;
             this.lblLabel10.Text = "示例";
+            this.lblLabel10.Visible = false;
             // 
             // cmbBC_Level
             // 
@@ -709,11 +720,11 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             // 
             // lblLabel15
             // 
-            this.lblLabel15.Location = new System.Drawing.Point(286, 155);
+            this.lblLabel15.Location = new System.Drawing.Point(286, 160);
             this.lblLabel15.Name = "lblLabel15";
-            this.lblLabel15.Size = new System.Drawing.Size(29, 12);
+            this.lblLabel15.Size = new System.Drawing.Size(53, 12);
             this.lblLabel15.TabIndex = 24;
-            this.lblLabel15.Text = "示例";
+            this.lblLabel15.Text = "文本模板";
             // 
             // cmbTXT1_AH
             // 
@@ -976,13 +987,12 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.picPage.Location = new System.Drawing.Point(623, 12);
             this.picPage.Name = "picPage";
             this.picPage.Padding = new System.Windows.Forms.Padding(10);
-            this.picPage.Size = new System.Drawing.Size(385, 578);
+            this.picPage.Size = new System.Drawing.Size(385, 730);
             this.picPage.TabIndex = 31;
             // 
             // btnOut
             // 
-            this.btnOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.btnOut.Location = new System.Drawing.Point(100, 591);
+            this.btnOut.Location = new System.Drawing.Point(85, 5);
             this.btnOut.Name = "btnOut";
             this.btnOut.Size = new System.Drawing.Size(75, 23);
             this.btnOut.TabIndex = 32;
@@ -992,8 +1002,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             // 
             // btnIn
             // 
-            this.btnIn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.btnIn.Location = new System.Drawing.Point(100, 620);
+            this.btnIn.Location = new System.Drawing.Point(85, 34);
             this.btnIn.Name = "btnIn";
             this.btnIn.Size = new System.Drawing.Size(75, 23);
             this.btnIn.TabIndex = 32;
@@ -1003,13 +1012,12 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             // 
             // txtJsonData
             // 
-            this.txtJsonData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.txtJsonData.Location = new System.Drawing.Point(181, 588);
+            this.txtJsonData.Location = new System.Drawing.Point(166, 2);
             this.txtJsonData.MaxLength = 0;
             this.txtJsonData.Multiline = true;
             this.txtJsonData.Name = "txtJsonData";
             this.txtJsonData.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.txtJsonData.Size = new System.Drawing.Size(437, 67);
+            this.txtJsonData.Size = new System.Drawing.Size(437, 55);
             this.txtJsonData.TabIndex = 32;
             // 
             // btnSave
@@ -1019,7 +1027,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
             this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnSave.ForeColor = System.Drawing.Color.White;
-            this.btnSave.Location = new System.Drawing.Point(831, 596);
+            this.btnSave.Location = new System.Drawing.Point(831, 748);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(85, 33);
             this.btnSave.TabIndex = 33;
@@ -1035,7 +1043,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnCancel.ForeColor = System.Drawing.Color.White;
-            this.btnCancel.Location = new System.Drawing.Point(923, 597);
+            this.btnCancel.Location = new System.Drawing.Point(923, 749);
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(85, 33);
             this.btnCancel.TabIndex = 34;
@@ -1118,8 +1126,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             // 
             // btnPrint
             // 
-            this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.btnPrint.Location = new System.Drawing.Point(18, 591);
+            this.btnPrint.Location = new System.Drawing.Point(3, 5);
             this.btnPrint.Name = "btnPrint";
             this.btnPrint.Size = new System.Drawing.Size(75, 23);
             this.btnPrint.TabIndex = 43;
@@ -1127,12 +1134,76 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.btnPrint.UseVisualStyleBackColor = true;
             this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
             // 
+            // pnlPanel1
+            // 
+            this.pnlPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.pnlPanel1.Controls.Add(this.btnPrint);
+            this.pnlPanel1.Controls.Add(this.btnOut);
+            this.pnlPanel1.Controls.Add(this.btnIn);
+            this.pnlPanel1.Controls.Add(this.txtJsonData);
+            this.pnlPanel1.Location = new System.Drawing.Point(30, 744);
+            this.pnlPanel1.Name = "pnlPanel1";
+            this.pnlPanel1.Size = new System.Drawing.Size(637, 63);
+            this.pnlPanel1.TabIndex = 44;
+            // 
+            // dgvTXT_EGS
+            // 
+            this.dgvTXT_EGS.AllowUserToAddRows = false;
+            this.dgvTXT_EGS.AllowUserToDeleteRows = false;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvTXT_EGS.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvTXT_EGS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvTXT_EGS.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.colkey,
+            this.colvalue});
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvTXT_EGS.DefaultCellStyle = dataGridViewCellStyle2;
+            this.dgvTXT_EGS.Location = new System.Drawing.Point(284, 592);
+            this.dgvTXT_EGS.Name = "dgvTXT_EGS";
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvTXT_EGS.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
+            this.dgvTXT_EGS.RowTemplate.Height = 23;
+            this.dgvTXT_EGS.Size = new System.Drawing.Size(273, 150);
+            this.dgvTXT_EGS.TabIndex = 45;
+            // 
+            // colkey
+            // 
+            this.colkey.DataPropertyName = "ITEMCODE";
+            this.colkey.HeaderText = "文本项目";
+            this.colkey.Name = "colkey";
+            this.colkey.ReadOnly = true;
+            // 
+            // colvalue
+            // 
+            this.colvalue.DataPropertyName = "itemsample";
+            this.colvalue.HeaderText = "文本示例";
+            this.colvalue.Name = "colvalue";
+            // 
             // F_SET_014002
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1020, 655);
-            this.Controls.Add(this.btnPrint);
+            this.ClientSize = new System.Drawing.Size(1020, 807);
+            this.Controls.Add(this.dgvTXT_EGS);
+            this.Controls.Add(this.pnlPanel1);
             this.Controls.Add(this.numDisplayNo);
             this.Controls.Add(this.lblLabel25);
             this.Controls.Add(this.chkValueFlag);
@@ -1143,9 +1214,6 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.Controls.Add(this.txtLayoutName);
             this.Controls.Add(this.btnCancel);
             this.Controls.Add(this.picHB);
-            this.Controls.Add(this.txtJsonData);
-            this.Controls.Add(this.btnIn);
-            this.Controls.Add(this.btnOut);
             this.Controls.Add(this.grpPage);
             this.Controls.Add(this.grpTXT1);
             this.Controls.Add(this.grpBC);
@@ -1162,9 +1230,6 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.Controls.SetChildIndex(this.grpBC, 0);
             this.Controls.SetChildIndex(this.grpTXT1, 0);
             this.Controls.SetChildIndex(this.grpPage, 0);
-            this.Controls.SetChildIndex(this.btnOut, 0);
-            this.Controls.SetChildIndex(this.btnIn, 0);
-            this.Controls.SetChildIndex(this.txtJsonData, 0);
             this.Controls.SetChildIndex(this.picHB, 0);
             this.Controls.SetChildIndex(this.btnCancel, 0);
             this.Controls.SetChildIndex(this.txtLayoutName, 0);
@@ -1175,7 +1240,8 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             this.Controls.SetChildIndex(this.chkValueFlag, 0);
             this.Controls.SetChildIndex(this.lblLabel25, 0);
             this.Controls.SetChildIndex(this.numDisplayNo, 0);
-            this.Controls.SetChildIndex(this.btnPrint, 0);
+            this.Controls.SetChildIndex(this.pnlPanel1, 0);
+            this.Controls.SetChildIndex(this.dgvTXT_EGS, 0);
             this.grpHB.ResumeLayout(false);
             this.grpHB.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtHB_H)).EndInit();
@@ -1205,6 +1271,9 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             ((System.ComponentModel.ISupportInitialize)(this.txtPageH)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPageW)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.numDisplayNo)).EndInit();
+            this.pnlPanel1.ResumeLayout(false);
+            this.pnlPanel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvTXT_EGS)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1294,5 +1363,9 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         private System.Windows.Forms.NumericUpDown numDisplayNo;
         private System.Windows.Forms.Button btnTXTOK;
         private System.Windows.Forms.Button btnPrint;
+        private WinForm.Controls.PnlPanel pnlPanel1;
+        private System.Windows.Forms.DataGridView dgvTXT_EGS;
+        private System.Windows.Forms.DataGridViewTextBoxColumn colkey;
+        private System.Windows.Forms.DataGridViewTextBoxColumn colvalue;
     }
 }

+ 120 - 13
DK.Client/Client.Controls/BarcodeBatchSet/F_SET_014002.cs

@@ -32,6 +32,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         private Dictionary<int, BarcodeBatchConfig_TXT> _setDataTXTS;
 
         private DataSet _DataSet = null;
+        private DataTable _DataItem = null;
         private DataRow _DataRow = null;
 
 
@@ -42,6 +43,24 @@ namespace Dongke.IBOSS.PRD.Client.Controls
 
         private void F_SET_014002_Load(object sender, EventArgs e)
         {
+            try
+            {
+                // 调试用
+                pnlPanel1.Visible = false;
+                dgvTXT_EGS.AutoGenerateColumns = false;
+                string usercode = ProxySettings.LoginUserInfo.UserCode + "";
+                if (usercode.StartsWith("DONGKE"))
+                {
+                    pnlPanel1.Visible = true;
+                    dgvTXT_EGS.AutoGenerateColumns = true;
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
         }
 
         private void F_SET_014002_Shown(object sender, EventArgs e)
@@ -56,8 +75,13 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 if (sre != null && sre.Data != null && sre.Data.Tables.Count > 0)
                 {
                     _DataSet = sre.Data;
+                    _DataItem = sre.Data.Tables[1];
+                }
+                else
+                {
+                    this.Close();
+                    return;
                 }
-
 
                 if (LayoutID > 0)
                 {
@@ -81,14 +105,14 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                     _DataSet.Tables[0].Rows.Add(_DataRow);
                     for (int i = 1; i < 3; i++)
                     {
-                        BarcodeBatchConfig_TXT tt = SetDataTXT1();
+                        BarcodeBatchConfig_TXT tt = SetDataTXT1(null);
                         tt.ID = i;
                         tt.Name = "文本" + i;
                         lisTXTS.Items.Add(tt);
                     }
                     for (int i = 3; i < 5; i++)
                     {
-                        BarcodeBatchConfig_TXT tt = SetDataTXT1();
+                        BarcodeBatchConfig_TXT tt = SetDataTXT1(null);
                         tt.ID = i;
                         tt.Name = "文本" + i;
                         tt.IsShow = false;
@@ -100,6 +124,8 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 //SetDataTXT1();
 
                 SetLayoutData();
+
+                dgvTXT_EGS.DataSource = _DataItem;
             }
             catch (Exception ex)
             {
@@ -195,17 +221,28 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             }
         }
 
-        private BarcodeBatchConfig_TXT SetDataTXT1() 
+        private BarcodeBatchConfig_TXT SetDataTXT1SelectedItem() 
         {
             BarcodeBatchConfig_TXT setDataTXT = (lisTXTS.SelectedItem as BarcodeBatchConfig_TXT);
             if (setDataTXT == null)
             {
+                return null;
+            }
+
+            return SetDataTXT1(setDataTXT);
+        }
+        private BarcodeBatchConfig_TXT SetDataTXT1(BarcodeBatchConfig_TXT setDataTXT)
+        {
+            //BarcodeBatchConfig_TXT setDataTXT = (lisTXTS.SelectedItem as BarcodeBatchConfig_TXT);
+            if (setDataTXT == null)
+            {
                 setDataTXT = new BarcodeBatchConfig_TXT();
             }
             setDataTXT.AH = cmbTXT1_AH.Text;
             setDataTXT.AV = cmbTXT1_AV.Text;
             setDataTXT.Angle = cmbTXT1_Angle.Text;
             setDataTXT.EG = txtTXT1_EG.Text;
+            setDataTXT.P_TXT = txtTXT1_EG.Text + "";
             setDataTXT.Clip = chkTXT1_Clip.Checked;
             setDataTXT.Wrap = chkTXT1_Wrap.Checked;
             setDataTXT.Range = new RectangleF();
@@ -320,7 +357,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         {
             try
             {
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
 
                 SetLayoutData();
 
@@ -328,8 +365,28 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 _setData.DpiX = g.DpiX;
                 _setData.DpiX = g.DpiY;
 
+                // 设置文本
+                _DataItem.AcceptChanges();
+                foreach (BarcodeBatchConfig_TXT txt in _setData.TXT_S.Values)
+                {
+                    txt.P_TXT = txt.EG+"";
+                }
+                foreach (DataRow item in _DataItem.Rows)
+                {
+                    string item_code = item["ITEMCODE"] + "";
+                    string item_value = item["ITEMSAMPLE"] + "";
+                    if (item_code == "{#产品条码#}")
+                    {
+                        _setData.BC.P_TXT = item_value;
+                    }
+                    foreach (BarcodeBatchConfig_TXT txt in _setData.TXT_S.Values)
+                    {
+                        txt.P_TXT = txt.P_TXT.Replace(item_code, item_value);
+                    }
+                }
+
                 BarcodeBatchPrint.DoToPixel(_setData);
-                Image image = BarcodeBatchPrint.CreateImageHB(_setData, null);
+                Image image = BarcodeBatchPrint.CreateImageHB(_setData, _DataItem, null);
 
                 picHB.SetImage(image, _setData.RangePixel.X, _setData.RangePixel.Y);
 
@@ -346,7 +403,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         {
             try
             {
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
                 SetLayoutData();
 
                 string tj = Curtain.Framework.Json.JsonHelper.FromObject(_setData);
@@ -367,6 +424,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             try
             {
                 //SetLayoutData();
+                TXTS_SelectedItem = null;
 
                 lisTXTS.Items.Clear();
 
@@ -412,7 +470,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                     return;
                 }
 
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
 
                 SetLayoutData();
 
@@ -420,6 +478,26 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 _setData.DpiX = g.DpiX;
                 _setData.DpiX = g.DpiY;
 
+                // 设置文本
+                _DataItem.AcceptChanges();
+                foreach (BarcodeBatchConfig_TXT txt in _setData.TXT_S.Values)
+                {
+                    txt.P_TXT = txt.EG + "";
+                }
+                foreach (DataRow item in _DataItem.Rows)
+                {
+                    string item_code = item["ITEMCODE"] + "";
+                    string item_value = item["ITEMSAMPLE"] + "";
+                    if (item_code == "{#产品条码#}")
+                    {
+                        _setData.BC.P_TXT = item_value;
+                    }
+                    foreach (BarcodeBatchConfig_TXT txt in _setData.TXT_S.Values)
+                    {
+                        txt.P_TXT = txt.P_TXT.Replace(item_code, item_value);
+                    }
+                }
+
                 BarcodeBatchPrint.DoToPixel(_setData);
                 Image image = BarcodeBatchPrint.ShowImagePage(_setData);
 
@@ -437,7 +515,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
         {
             try
             {
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
             }
             catch (Exception ex)
             {
@@ -447,10 +525,16 @@ namespace Dongke.IBOSS.PRD.Client.Controls
             }
         }
 
+        private object TXTS_SelectedItem = null;
         private void lisTXTS_SelectedIndexChanged(object sender, EventArgs e)
         {
             try
             {
+                if (TXTS_SelectedItem != null)
+                {
+                    SetDataTXT1(TXTS_SelectedItem as BarcodeBatchConfig_TXT);
+                }
+                TXTS_SelectedItem = lisTXTS.SelectedItem;
                 GetDataTXT1();
             }
             catch (Exception ex)
@@ -532,7 +616,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 _DataRow["ValueFlag"] = (chkValueFlag.Checked ? "1" : "0");
                 _DataRow["Remarks"] = txtRemarks.Text;
 
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
                 SetLayoutData();
 
                 _DataRow["WIDTH"] = _setData.PageW;
@@ -657,7 +741,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                     return;
                 }
 
-                SetDataTXT1();
+                SetDataTXT1SelectedItem();
 
                 SetLayoutData();
 
@@ -665,7 +749,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 _setData.DpiX = g.DpiX;
                 _setData.DpiX = g.DpiY;
 
-                List<BarcodeBatchData> bbd = new List<BarcodeBatchData>();
+                /*List<BarcodeBatchData> bbd = new List<BarcodeBatchData>();
                 for (int i = 0; i < 36; i++)
                 {
                     BarcodeBatchData bb = new BarcodeBatchData();
@@ -673,6 +757,29 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                     bb.TXT_S = new Dictionary<int, string>();
                     bb.TXT_S.Add(1, bb.Barcode);
                     bbd.Add(bb);
+                }*/
+
+                List<DataRow> bbd = new List<DataRow>();
+                DataTable ddtt = new DataTable();
+                ddtt.Columns.Add("BarCode");
+                ddtt.Columns.Add("GroutingDate", typeof(DateTime));
+                ddtt.Columns.Add("GroutingBatchNo", typeof(int));
+                ddtt.Columns.Add("GroutingLineCode");
+                ddtt.Columns.Add("GroutingMouldCode");
+                ddtt.Columns.Add("GoodsCode");
+
+                for (int i = 0; i < 36; i++)
+                {
+                    DataRow bb = ddtt.NewRow();
+                    bb["BarCode"] = (12345678901 + i) + "";
+                    bb["GroutingDate"] = DateTime.Now;
+                    bb["GroutingBatchNo"] = i;
+                    bb["GroutingLineCode"] = "C01C" + i;
+                    bb["GroutingMouldCode"] = "C01C" + i + "-00"+ i;
+                    bb["GoodsCode"] = "H0" + i;
+                    ddtt.Rows.Add(bb);
+
+                    bbd.Add(bb);
                 }
 
                 BarcodeBatchPrint.DoToPixel(_setData);
@@ -680,7 +787,7 @@ namespace Dongke.IBOSS.PRD.Client.Controls
                 int nextIndex = 0;
                 while (nextIndex > -1 && nextIndex < bbd.Count)
                 {
-                    Image image = BarcodeBatchPrint.CreateImagePage(_setData, bbd, nextIndex, out nextIndex);
+                    Image image = BarcodeBatchPrint.CreateImagePage(_setData, _DataItem, bbd, nextIndex, out nextIndex);
                     picPage.SetImage(image, _setData.RangePixel.Width, _setData.RangePixel.Height);
 
                     MessageBox.Show(nextIndex+"");

+ 6 - 0
DK.Client/Client.Controls/BarcodeBatchSet/F_SET_014002.resx

@@ -137,6 +137,12 @@
         NPUUUwGmAkwFmAowFWAqwFSAqYBf6n3fpp70Sk0phfY9qTO+PIZEBQZ3CrAAAAAASUVORK5CYII=
 </value>
   </data>
+  <metadata name="colkey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="colvalue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>34</value>
   </metadata>

+ 18 - 16
DK.Client/PMModule/F_PM_0101.Designer.cs

@@ -48,6 +48,7 @@
             this.tsbtnAdaptive = new System.Windows.Forms.ToolStripButton();
             this.tsbtnClose = new System.Windows.Forms.ToolStripButton();
             this.gbxCondition = new Dongke.IBOSS.PRD.Basics.BaseControls.C_GroupBox();
+            this.chkTestMouldFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_StatusCheckBox();
             this.chkDeliverTime = new Dongke.IBOSS.PRD.Basics.BaseControls.C_CheckBox();
             this.btnSearch = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
             this.cboGroutingLineType = new Dongke.IBOSS.PRD.Basics.BaseControls.DKListBoxComboBox();
@@ -81,7 +82,6 @@
             this.lblGroutingLineCode = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
             this.txtGroutingBatchNo = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TXT_Digital();
             this.dgvGroutingDaily = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
-            this.chkTestMouldFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_StatusCheckBox();
             this.GroutingDailyDetailID = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.GroutingDailyID = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.GroutingLineID = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -271,6 +271,20 @@
             this.gbxCondition.TabStop = false;
             this.gbxCondition.Text = "查询条件 ▼";
             // 
+            // chkTestMouldFlag
+            // 
+            this.chkTestMouldFlag.BackColor = System.Drawing.SystemColors.Control;
+            this.chkTestMouldFlag.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkTestMouldFlag.BackgroundImage")));
+            this.chkTestMouldFlag.FalseText = "否";
+            this.chkTestMouldFlag.Location = new System.Drawing.Point(713, 73);
+            this.chkTestMouldFlag.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.chkTestMouldFlag.Name = "chkTestMouldFlag";
+            this.chkTestMouldFlag.Size = new System.Drawing.Size(130, 16);
+            this.chkTestMouldFlag.TabIndex = 45;
+            this.chkTestMouldFlag.Title = "试验标识";
+            this.chkTestMouldFlag.TitleAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.chkTestMouldFlag.TrueText = "是";
+            // 
             // chkDeliverTime
             // 
             this.chkDeliverTime.AutoSize = true;
@@ -772,6 +786,7 @@
             this.dgvGroutingDaily.EnableHeadersVisualStyles = false;
             this.dgvGroutingDaily.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvGroutingDaily.FormatQuantityColumns = null;
+            this.dgvGroutingDaily.HasNode = false;
             this.dgvGroutingDaily.HorizontalMergeColumn = null;
             this.dgvGroutingDaily.IsAutoCountSum = true;
             this.dgvGroutingDaily.IsAutoResizeColumns = false;
@@ -779,7 +794,7 @@
             this.dgvGroutingDaily.IsOpenMergeCellFlag = false;
             this.dgvGroutingDaily.IsSubTotalFlag = false;
             this.dgvGroutingDaily.IsTopDeep = false;
-            this.dgvGroutingDaily.Location = new System.Drawing.Point(0, 168);
+            this.dgvGroutingDaily.Location = new System.Drawing.Point(2, 168);
             this.dgvGroutingDaily.MergeColumnNames = null;
             this.dgvGroutingDaily.MergeDetailColumnNames = null;
             this.dgvGroutingDaily.MergeDetailOnlyColumn = null;
@@ -801,22 +816,9 @@
             this.dgvGroutingDaily.TotalSumColumns = null;
             this.dgvGroutingDaily.ViewRowFilter = "";
             this.dgvGroutingDaily.VirtualMode = true;
+            this.dgvGroutingDaily.VirtualNodes = false;
             this.dgvGroutingDaily.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvGroutingDaily_CellDoubleClick);
             // 
-            // chkTestMouldFlag
-            // 
-            this.chkTestMouldFlag.BackColor = System.Drawing.SystemColors.Control;
-            this.chkTestMouldFlag.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkTestMouldFlag.BackgroundImage")));
-            this.chkTestMouldFlag.FalseText = "否";
-            this.chkTestMouldFlag.Location = new System.Drawing.Point(713, 73);
-            this.chkTestMouldFlag.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.chkTestMouldFlag.Name = "chkTestMouldFlag";
-            this.chkTestMouldFlag.Size = new System.Drawing.Size(130, 16);
-            this.chkTestMouldFlag.TabIndex = 45;
-            this.chkTestMouldFlag.Title = "试验标识";
-            this.chkTestMouldFlag.TitleAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.chkTestMouldFlag.TrueText = "是";
-            // 
             // GroutingDailyDetailID
             // 
             this.GroutingDailyDetailID.DataPropertyName = "GroutingDailyDetailID";

+ 48 - 2
DK.Service/SystemModuleLogic/SystemModuleLogic.cs

@@ -23,6 +23,8 @@ using Curtain.Net.Sockets.PLC;
 using Curtain.Net.Sockets.PLC.Model.Siemens;
 
 using static Dongke.IBOSS.PRD.Basics.BaseResources.Constant;
+using Curtain.Collections;
+using System.Runtime.InteropServices;
 
 namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 {
@@ -7710,7 +7712,7 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 					"   AND (:layoutname IS NULL OR instr(t.layoutname, :layoutname) > 0)\n" +
 					"   AND (:remarks IS NULL OR instr(t.remarks, :remarks) > 0)\n" +
 					"   AND (:valueflag IS NULL OR t.valueflag = :valueflag)\n" +
-					" ORDER BY t.displayno, t.layoutname";
+					" ORDER BY t.displayno, t.layoutname, t.layoutid";
 
 				List<OracleParameter> parameters = new List<OracleParameter>();
 				parameters.Add(new OracleParameter(":accountid", OracleDbType.Int32, sUserInfo.AccountID, ParameterDirection.Input));
@@ -7774,9 +7776,20 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 
 				DataTable data = oracleConn.GetSqlResultToDt(sqlString, parameters.ToArray());
 
+				string sqlString1 = "select :layoutid as layoutid, t.itemcode, t.itemtype, t.col_code, t.displayno, t.itemtags, case when tt.layoutid is null then t.itemsample else tt.itemsample end itemsample\n" +
+				"  from tp_set_barcodeitem t\n" +
+				"  left join tp_set_barcodebatchitem tt\n" +
+				"    on tt.itemcode = t.itemcode\n" +
+				"   and tt.layoutid = :layoutid\n" +
+				" where t.valueflag = '1'\n" +
+				" order by t.displayno";
+
+				DataTable data1 = oracleConn.GetSqlResultToDt(sqlString1, parameters.ToArray());
+
 				ServiceResultEntity sre = new ServiceResultEntity();
 				sre.Data = new DataSet();
 				sre.Data.Tables.Add(data);
+				sre.Data.Tables.Add(data1);
 
 				return sre;
 			}
@@ -7854,6 +7867,20 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 					sre.Status = Constant.ServiceResultStatus.NoModifyData;
 					return sre;
 				}
+				string sqlString1 = "INSERT INTO tp_set_barcodebatchitem\n" +
+				"  (layoutid, itemcode, itemsample)\n" +
+				"VALUES\n" +
+				"  (:layoutid, :itemcode, :itemsample)";
+				DataTable layoutItem = cre.Data.Tables[1];
+                foreach (DataRow item in layoutItem.Rows)
+				{
+					List<OracleParameter> parameters1 = new List<OracleParameter>();
+					parameters1.Add(new OracleParameter(":layoutid", OracleDbType.Int32, layoutID, ParameterDirection.Input));
+					parameters1.Add(new OracleParameter(":itemcode", OracleDbType.Varchar2, item["itemcode"], ParameterDirection.Input));
+					parameters1.Add(new OracleParameter(":itemsample", OracleDbType.Varchar2, item["itemsample"], ParameterDirection.Input));
+
+					result = oracleTrConn.ExecuteNonQuery(sqlString1, parameters1.ToArray());
+				}
 
 				oracleTrConn.Commit();
 				return sre;
@@ -7889,6 +7916,7 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 			{
 				oracleTrConn.Connect();
 				DataRow layoutdata = cre.Data.Tables[0].Rows[0];
+				int layoutID = Convert.ToInt32(layoutdata["LAYOUTID"]);
 				ServiceResultEntity sre = new ServiceResultEntity();
 
 				string sqlString = "UPDATE TP_SET_BarCodeBatchLayout t\n" +
@@ -7904,7 +7932,7 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 				parameters.Add(new OracleParameter(":LAYOUTDATA", OracleDbType.Blob, layoutdata["LAYOUTDATA"], ParameterDirection.Input));
 				parameters.Add(new OracleParameter(":WIDTH", OracleDbType.Decimal, layoutdata["WIDTH"], ParameterDirection.Input));
 				parameters.Add(new OracleParameter(":HEIGHT", OracleDbType.Decimal, layoutdata["HEIGHT"], ParameterDirection.Input));
-				parameters.Add(new OracleParameter(":LAYOUTID", OracleDbType.Int32, layoutdata["LAYOUTID"], ParameterDirection.Input));
+				parameters.Add(new OracleParameter(":LAYOUTID", OracleDbType.Int32, layoutID, ParameterDirection.Input));
 				parameters.Add(new OracleParameter(":UPDATEUSERID", OracleDbType.Int32, sUserInfo.UserID, ParameterDirection.Input));
 
 				int result = oracleTrConn.ExecuteNonQuery(sqlString, parameters.ToArray());
@@ -7915,6 +7943,24 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 				}
 				sre.Result = result;
 
+				string sqlString2 = "delete from tp_set_barcodebatchitem where layoutid=:layoutid";
+				OracleParameter dp = new OracleParameter(":layoutid", OracleDbType.Int32, layoutID, ParameterDirection.Input);
+				result = oracleTrConn.ExecuteNonQuery(sqlString2, new OracleParameter[] { dp });
+
+				string sqlString1 = "INSERT INTO tp_set_barcodebatchitem\n" +
+				"  (layoutid, itemcode, itemsample)\n" +
+				"VALUES\n" +
+				"  (:layoutid, :itemcode, :itemsample)";
+				DataTable layoutItem = cre.Data.Tables[1];
+				foreach (DataRow item in layoutItem.Rows)
+				{
+					List<OracleParameter> parameters1 = new List<OracleParameter>();
+					parameters1.Add(new OracleParameter(":layoutid", OracleDbType.Int32, layoutID, ParameterDirection.Input));
+					parameters1.Add(new OracleParameter(":itemcode", OracleDbType.Varchar2, item["itemcode"], ParameterDirection.Input));
+					parameters1.Add(new OracleParameter(":itemsample", OracleDbType.Varchar2, item["itemsample"], ParameterDirection.Input));
+
+					result = oracleTrConn.ExecuteNonQuery(sqlString1, parameters1.ToArray());
+				}
 
 				oracleTrConn.Commit();
 				return sre;

+ 59 - 16
WCF.Service/WCF.DataModels/BarcodeBatchSet/BarcodeBatchSet.cs

@@ -1,6 +1,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 
@@ -33,6 +34,8 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
         public string Name;
         public bool IsShow = true;
         public string EG;
+        [NonSerialized]
+        public string P_TXT;
         public RectangleF Range;
         [NonSerialized]
         public Rectangle RangePixel;
@@ -59,6 +62,8 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
     public class BarcodeBatchConfig_BC
     {
         public string EG;
+        [NonSerialized]
+        public string P_TXT;
         public RectangleF Range;
         [NonSerialized]
         public Rectangle RangePixel;
@@ -215,11 +220,49 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
             return BBC;
         }
 
-        public static BarcodeBatchConfig DoConfig(BarcodeBatchConfig BBC, BarcodeBatchData BBD)
+        public static BarcodeBatchConfig DoConfig(BarcodeBatchConfig BBC, DataTable layoutItem, DataRow BBD)
         {
             if (BBD != null)
             {
-                BBC.BC.EG = BBD.Barcode;
+                BBC.BC.P_TXT = null;
+                foreach (BarcodeBatchConfig_TXT txt in BBC.TXT_S.Values)
+                {
+                    txt.P_TXT = txt.EG + "";
+                }
+                foreach (DataRow item in layoutItem.Rows)
+                {
+                    string item_code = item["ITEMCODE"] + "";
+                    string col_code = item["COL_CODE"] + "";
+                    string item_type = item["ITEMTYPE"] + "";
+                    //string item_value = item["ITEMSAMPLE"] + "";
+
+                    if (BBD.Table.Columns.Contains(col_code))
+                    {
+                        object col_value = BBD[col_code];
+                        try
+                        {
+                            if (item_type == "DATE")
+                            {
+                                col_value = Convert.ToDateTime(col_value).ToString("yyyy-MM-dd");
+                            }
+                        }
+                        catch
+                        {
+                            col_value = null;
+                        }
+                        string item_value = col_value + "";
+                        if (item_code == "{#产品条码#}")
+                        {
+                            BBC.BC.P_TXT = item_value;
+                        }
+                        foreach (BarcodeBatchConfig_TXT txt in BBC.TXT_S.Values)
+                        {
+                            txt.P_TXT = txt.P_TXT.Replace(item_code, item_value);
+                        }
+                    }
+                }
+
+                /*BBC.BC.P_TXT = BBD.Barcode;
                 if (BBD.TXT_S != null && BBD.TXT_S.Count > 0)
                 {
                     if (BBD.TXT_S.Count == 1)
@@ -227,31 +270,31 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                         string txt = BBD.TXT_S[1];
                         foreach (BarcodeBatchConfig_TXT item in BBC.TXT_S.Values)
                         {
-                            item.EG = txt;
+                            item.P_TXT = txt;
                         }
                     }
                     else
                     {
                         foreach (BarcodeBatchConfig_TXT item in BBC.TXT_S.Values)
                         {
-                            item.EG = "";
+                            item.P_TXT = "";
                         }
                         foreach (int item in BBD.TXT_S.Keys)
                         {
                             if (BBC.TXT_S.ContainsKey(item))
                             {
-                                BBC.TXT_S[item].EG = BBD.TXT_S[item];
+                                BBC.TXT_S[item].P_TXT = BBD.TXT_S[item];
                             }
                         }
                     }
-                }
+                }*/
             }
             return BBC;
         }
 
-        public static Image CreateImageHB(BarcodeBatchConfig BBC, BarcodeBatchData BBD)
+        public static Image CreateImageHB(BarcodeBatchConfig BBC, DataTable layoutItem, DataRow BBD)
         {
-            BBC = DoConfig(BBC, BBD);
+            BBC = DoConfig(BBC, layoutItem, BBD);
 
             //int w = MillimeterToPixel(BBC.HB_W, BBC.DpiX);
             //int h = MillimeterToPixel(BBC.HB_H, BBC.DpiY);
@@ -275,7 +318,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                         };
                         OneDFormat format = (OneDFormat)Enum.Parse(typeof(OneDFormat), BBC.BC.Format);
                         //barcodeImage = OneDHelper.GetOneDImage(BBC.BC.EG, op, format);
-                        OneDHelper.DrawOneD(BBC.BC.EG, op, format);
+                        OneDHelper.DrawOneD(BBC.BC.P_TXT, op, format);
                     }
                     else if (BBC.BC.Type == "二维码")
                     {
@@ -288,7 +331,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                         op.DrawGraphics = imageG;
                         op.BackColor = Color.Transparent;
                         //barcodeImage = QRCodeHelper.GetQRCodeImage(BBC.BC.EG, op, eop);
-                        QRCodeHelper.DrawQRCode(BBC.BC.EG, op, eop);
+                        QRCodeHelper.DrawQRCode(BBC.BC.P_TXT, op, eop);
                     }
                 }
                 catch (ArgumentOutOfRangeException ex)
@@ -334,13 +377,13 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                     }*/
 
                     imageG.DrawRectangle(Pens.Red, item.RangePixel);
-                    if (string.IsNullOrWhiteSpace(item.EG))
+                    if (string.IsNullOrWhiteSpace(item.P_TXT))
                     {
                         continue;
                     }
                     if (item.Angle == "0")
                     {
-                        imageG.DrawString(item.EG, item.DrawFont, Brushes.Black, item.RangePixel, item.DrawFormat);
+                        imageG.DrawString(item.P_TXT, item.DrawFont, Brushes.Black, item.RangePixel, item.DrawFormat);
                     }
                     else
                     {
@@ -356,7 +399,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                             }
                             using (Graphics imageStrG = Graphics.FromImage(imageStr))
                             {
-                                imageStrG.DrawString(item.EG, item.DrawFont, Brushes.Black, item.RangePixelStr, item.DrawFormat);
+                                imageStrG.DrawString(item.P_TXT, item.DrawFont, Brushes.Black, item.RangePixelStr, item.DrawFormat);
                             }
 
                             if (item.Angle == "90")
@@ -406,7 +449,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                     {
                         x = col * BBC.RangePixel.X;
 
-                        using (Image br = CreateImageHB(BBC, null))
+                        using (Image br = CreateImageHB(BBC, null, null))
                         {
                             //imageG.DrawRectangle(Pens.Red, x, y, BBC.RangePixel.X, BBC.RangePixel.Y);
                             imageG.DrawImage(br, x, y);
@@ -438,7 +481,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
             return imagePage;
         }
 
-        public static Image CreateImagePage(BarcodeBatchConfig BBC, List<BarcodeBatchData> BBD_S, int index, out int nextIndex)
+        public static Image CreateImagePage(BarcodeBatchConfig BBC, DataTable layoutItem, List<DataRow> BBD_S, int index, out int nextIndex)
         {
             nextIndex = -1;
             if (BBD_S == null)
@@ -466,7 +509,7 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels.BarcodeBatchSet
                     {
                         x = col * BBC.RangePixel.X;
 
-                        using (Image br = CreateImageHB(BBC, BBD_S[nextIndex]))
+                        using (Image br = CreateImageHB(BBC, layoutItem, BBD_S[nextIndex]))
                         {
                             //imageG.DrawRectangle(Pens.Red, x, y, BBC.RangePixel.X, BBC.RangePixel.Y);
                             imageG.DrawImage(br, x, y);