Kaynağa Gözat

添加支持三个标签打印,优化逻辑

callm 3 hafta önce
ebeveyn
işleme
d2308c29b1

+ 12 - 1
UAS_MES_YDCY/.workbuddy/memory/2026-09-10.md

@@ -41,7 +41,18 @@
 4. 关联 `step` 表取工序名称:`select st_name from step where st_code='<cdStepCode>'`(`step.st_code` ↔ `craftdetail.cd_stepcode`);查不到时名称为空串,不阻断流程。
 5. 回写:`update makeserial set ms_nextstepcode='<cdStepCode>' where ms_id='<msId>'`(`ExecuteSql(..., "update")`,与仓库 `Make_ColorBoxWeigh` 等既有写法一致)。
 6. 结果存入字段 `cdStepCode` 并输出到 OperateResult,提示形如 `<<SN001执行测试工序,下一工序为OP20(测试)`。
-7. `cd_ifjump` 是本仓库无既有引用的字段(用户定义):`nvl(cd_ifjump,0)=0` 即不可跳站。取比较基准 cd_detno 的子查询加了 `and rownum=1`,避免同一 `cd_crid` 下工序编号重复导致 ORA-01427;查询不使用 `rownum` 做外层过滤,保证多行校验有效。
+7. **操作日志**:三处调用 `LogicHandler.DoCommandLog`,`cl_operate` 统一填 `<工序类型名>,<cd_stepcode>`(抽检类型 + 具体更新的工序),用逗号分隔以便查库统计;三处分别为回退拦截、中间工序未完成、更新成功。
+8. `cd_ifjump` 是本仓库无既有引用的字段(用户定义):`nvl(cd_ifjump,0)=0` 即不可跳站。取比较基准 cd_detno 的子查询加了 `and rownum=1`,避免同一 `cd_crid` 下工序编号重复导致 ORA-01427;查询不使用 `rownum` 做外层过滤,保证多行校验有效。
+
+## commandlog 用法(UAS_MES_YDCY 全局约定)
+
+- 统一通过 `LogicHandler.DoCommandLog(caller, userCode, makeCode, lineCode, sourceCode, operate, result, sncode, checkno)` 写日志(`UAS_MES_NEW.PublicMethod.LogicHandler`)。
+- 内部固定 `insert into commandlog(cl_id,cl_caller,cl_man,cl_date,cl_linecode,cl_sourcecode,cl_makecode,cl_operate,cl_result,cl_sncode,cl_code) values(commandlog_seq.nextval,:...,sysdate,...)`,主键与时间自动生成,**调用方无需传 ID/时间**。
+- 调用惯例(全仓库一致,参考 `Make_CollectElec` / `Make_ColorBoxWeigh` / `Warehouse_ProductMakeIn`):
+  ```csharp
+  LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, makeCode, User.UserLineCode, User.UserSourceCode, "操作名", "结果描述", sncode, "");
+  ```
+  `Tag.ToString()` 即窗体 `模块!类名`,作为 `cl_caller`。
 
 关联关系已确认:`craftdetail.cd_crid = craft.cr_id`;`craft.cr_code = makeserial.ms_craftcode and craft.cr_prodcode = makeserial.ms_prodcode`(与 `LogicHandler.cs:716` 现有写法一致)。
 

+ 7 - 0
UAS_MES_YDCY/.workbuddy/memory/2026-09-18.md

@@ -19,6 +19,13 @@
 - **发现的模板 bug**:Query_LoadMake 里 `li_code.DbChange` 与 `ma_code.DbChange` 共用一个 handler 且固定读 `ma_code.ReturnData`——线别触发时读到的是工单数据。新代码 handler 改读对应控件(`li_code.ReturnData`)。
 - 菜单:需在 `CS$SYSNAVATION` 插 `sn_classname='Query.Query_LoadMan'`,`CS$USERGROUPPOWER` 授权;代码侧无需改动。
 
+## Make_SNLabelCheckFuge 新增第三组打印配置(2026-09-20)
+
+- 界面原有 2 组「打印机 + 标签(模板) + 份数」:第 1 组 `Printer`/`PrintLabel`/`PrintNum`(无条件打印)、第 2 组 `PrintList1`/`PrintLabel1`/`PrintNum1` + `PrintSecond` 勾选框「打印副标签」。
+- 新增第 3 组:`PrintList2`/`PrintLabel2`/`PrintNum2` + `PrintThird` 勾选框「打印第三标签」,配套 label9(标签2)/label10(打印机2)/label11(份数)。坐标沿用第二组模式整体下移一组(PrintList2 y=672、PrintLabel2 y=742、PrintNum2/PrintThird y≈604/611),仍在 ClientSize(1796,974) 内。
+- 逻辑改动(`.cs`):`ma_prodcode_TextChanged` 里给 `PrintLabel2` 同样绑定 `_dt.Copy()`(`la_url`/`la_id`);打印流程在 `PrintSecond` 分支后追加 `PrintThird.Checked` 分支,调用同样的 `Print.BarTender(...)`(参数 `"机身标","0"` 一致)。
+- 注意:界面里 `PrintList1`/`Printer` 是 **PrinterCombox**(本机打印机列表),`PrintLabel1`/`PrintLabel` 是 **ComboxWithTip**(模板下拉),两者都无需 `ISupportInitialize`;新控件按同样方式声明(`private CustomControl.ComBoxWithFocus.PrinterCombox` 等)即可。
+
 ## 修复共享控件 SearchTextBox 内部布局(CustomControl/TextBoxWithIcon)
 
 - 问题:控件被拉高(如 Query_LoadMan/Query_LoadMake 里的 282x46)后,内部单行 TextBox 高度锁死为字体高、`Dock=Left` 把 Top 锁在 0,放大镜图标 16px 顶对齐 → 内容挤在上半部、下方大片留白;原 `SizeChanged` 只调宽度不管垂直位置。

+ 56 - 0
UAS_MES_YDCY/.workbuddy/memory/2026-09-20.md

@@ -0,0 +1,56 @@
+# 2026-09-20
+
+## Make_StepType 增强(工序推进校验链)
+- 提示下一工序时关联 `step` 表:`select st_name from step where st_code='<cd_stepcode>'`,提示格式 `下一工序为OP20(测试)`。
+- `dtStep` 查到目标工序后新增两道拦截(在回写 `ms_nextstepcode` 之前):
+  - **回退拦截**:本次 `cd_stepcode` 的 `cd_detno` 小于 `ms_nextstepcode` 对应 `cd_detno` → 不更新,提示「下一工序是OPxx(名称)」。
+  - **中间工序未完成**:`ms_nextstepcode` 与目标工序之间的 `craftdetail` 记录存在 `nvl(cd_ifjump,0)=0` → 不更新,提示「中间工序未完成,下一工序是OPxx(名称)」。
+  - 两处拦截都调用 `LogicHandler.DoCommandLog(...)` 记录。
+- 三处 DoCommandLog 的 `cl_operate` 统一填 `工序类型名,cd_stepcode`。
+
+## Make_SNLabelCheckFuge 第三组打印控件(新增 + 布局优化)
+- 新增第三组:`PrintThird`(勾选框) / `PrintList2`(打印机) / `PrintLabel2`(标签) / `PrintNum2`(份数),
+  `.cs` 里在 `PrintSecond.Checked` 分支后追加 `if (PrintThird.Checked)` 调用 `Print.BarTender(...)`。
+- `ma_prodcode_TextChanged` 里 `PrintLabel2.DataSource = _dt.Copy()`(三个下拉共用 label 查询结果,各自 Copy() 独立)。
+
+### 布局优化(三组垂直对齐)
+原问题:第三组控件 y 604~781 与 `OperateResult` 日志面板(x1090~1786, y688~926)重叠;份数框 85 宽比其他框 264 短一截、位置错乱。
+
+最终坐标(`PrintNum1/PrintNum2` 宽度 85→264):
+
+| 组 | 勾选框 | 份数(1490) | 打印机(1490) | 标签(1490) |
+|---|---|---|---|---|
+| 一 主标签 | — | 420 | 220 | 340 |
+| 二 副标签 | PrintSecond 556 | PrintNum1 **599** | PrintList1 687 | PrintLabel1 757 |
+| 三 标签1 | PrintThird 807 | PrintNum2 **759** | PrintList2 847 | PrintLabel2 917 |
+
+- DGV `1282×454 → 1282×406`(让出 48px),`ClientSize 974 → 1112`,`OperateResult` 移到 (1090,668) 尺寸 `696×420`。
+- 左列标签 x 统一 1334(`label2/label4/PrintLabel_label/label3/label7/label8/label9/label10/label11`);
+  勾选框 x 1341。原第二组份数标签在 1522(勾选框右侧)→ 移回左列 1334 并 `AutoSize=false` + `TextAlign=MiddleLeft` 做垂直居中。
+- 组内顺序统一为「勾选框 → 份数 → 打印机 → 标签」。
+- 文案统一:勾选框「打印副标签」/「打印标签1」;标签 `打印机1`/`标签1`;组名与第一组「打印机」「标签」呼应。
+- 份数自动带出:抽出 `GetPrintNums(object selectedValue)`,`PrintLabel/PrintLabel1/PrintLabel2` 三个 `SelectedIndexChanged` 分别调用带出 `la_printnos`(原来只有第一组有)。事件在 Designer 里手工注册。
+
+### 教训
+- Designer 手工加控件时,组间垂直间距要按**最长组**(勾选框+3 行)预留约 180px,否则一定撞到下面的面板。
+- 同一行内不同控件要垂直居中:Label 设 `AutoSize=false` + 固定高度匹配输入框高度 + `TextAlign=MiddleLeft`,比调 Location.Top 更稳。
+
+## 待处理
+- `MaCodeSearchTextBox` 与 `SearchTextBox` 有相同的内部布局问题(Dock=Left 锁顶),尚未修改。
+
+## Make_FuselageLabelPrint 改三组打印机(同日第二轮)
+- 按用户截图圈红位置(现有「标签」下拉下方、采集备注上方的空白 y260~660)新增第二、三组打印配置。
+- 控件命名与 Make_SNLabelCheckFuge 保持同构:`PrintSecond`/`PrintThird`(红字勾选框) + `PrintList1/2`(PrinterCombox) + `PrintLabel1/2`(ComboxWithTip) + `PrintNum1/2`(NumOnlyTextBox) + `label5~label10`。
+- 布局复刻本界面第一组的对齐风格(标签右缘 1512、输入控件左缘 1526/1534):
+
+| 组 | 勾选框(x1341) | 打印张数(1534) | 打印机(1526) | 标签(1534) |
+|---|---|---|---|---|
+| 二 副标签 | PrintSecond 272 | PrintNum1 268 | PrintList1 330 | PrintLabel1 412 |
+| 三 标签2 | PrintThird 472 | PrintNum2 468 | PrintList2 530 | PrintLabel2 612 |
+
+- 每组 3 行(勾选+张数同行 → 打印机 → 标签),组间距 24~29px,底部 644 < 采集备注 673,无重叠;窗体尺寸未动 (1828×896)。
+- `PrintNum1/2` 同第一组 `Enabled=false`,张数由模板 `la_printnos` 带出;事件用本界面原有的 `SelectedValueChanged`(注意 SNLabelCheckFuge 用的是 `SelectedIndexChanged`,两界面事件名不同)。
+- `pr_code_TextChanged` 里 `PrintLabel1/2.DataSource = dt.Copy()`(该方法的 dt 有「Rows.Count==0 时重查 la_prodcode is null」兜底分支,绑定代码放在兜底之后)。
+- 打印分支插在第一组 `Print.BarTender` 之后、`DoCommandLog` 之前,模板类型仍为「机身标」。
+- **核实**:Make_SNLabelCheckFuge 第三组文案实际为「打印标签2/打印机2/标签2」,与第二组「打印副标签/打印机1/标签1」无重复(此前担心重复是误判,未改动)。
+- 两界面新增组的对应关系:SNLabelCheckFuge=打印机/标签/份数,FuselageLabelPrint=打印机/打印张数/标签,文案随界面既有风格走。

+ 16 - 0
UAS_MES_YDCY/.workbuddy/memory/MEMORY.md

@@ -27,13 +27,29 @@
 - 工单输入(带放大镜 DbFind):`TextBoxWithIcon.MaCodeSearchTextBox`,配 `TableName/SelectField/SetValueField/FormName/Condition`
 - 按钮:`ButtonUtil.NormalButton`(未设 NormalImage/DownImage/MoveImage 时自动取 `Properties.Resources` 默认图)
 - 结果面板:`RichText.RichTextAutoBottom`
+- 打印机下拉:`ComBoxWithFocus.PrinterCombox`(`Load` 时自动填 `PrinterSettings.InstalledPrinters` 并选默认打印机,`.Text` 即打印机名)
+- 打印模板下拉:`ComBoxWithFocus.ComboxWithTip`(`ComboBox`,配 `DataSource/DisplayMember=la_url/ValueMember=la_id`)
 - 自适应:`PublicMethod.AutoSizeFormClass`(internal,同程序集内可用)
 
+## 打印流程范式(BarTender)
+- `ma_prodcode_TextChanged` 内按产品编号查模板:`select la_id,la_url,la_isdefault from label where la_prodcode='xx' and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault`,再 `DataSource = _dt.Copy()` 分给每个模板下拉(多个下拉必须各自 `Copy()`,共用同一 DataTable 会互相干扰)。
+- 份数带出:`dh.getFieldDataByCondition("label","la_printnos","la_id='xx'")`,空则默认 `"1"`;每个模板下拉的 `SelectedIndexChanged` 各绑一次。
+- 调用:`Print.BarTender(Tag.ToString(), ref engine, 模板URL, la_id, 打印机名, SN, 份数, 工单号, 产品编号, "机身标", "0", out ErrorMessage)`,返回 bool。
+- 同类可抄界面:`Make_ColorBoxLabelPrintMidBox`(含「打印副标签」勾选 + 第二组打印机/模板/份数,布局最规整)。
+
+## Designer 布局经验(多组控件)
+- 组间垂直间距按**最长组**(勾选框 + 3 行输入)预留约 **180px**,否则一定撞到下方面板。
+- 同一行内 Label 与输入框垂直居中:Label 设 `AutoSize=false` + 高度匹配输入框 + `TextAlign=MiddleLeft`,比反复调 `Location.Top` 稳。
+- `ComboBox`(DropDownList)实际高度由字体决定,`Size.Height` 被忽略;放高处的下拉不要靠 Height 对齐。
+- `TextBox` 单行高度锁死,`Dock` 会覆盖 `Top`。
+- 大日志面板 `RichTextAutoBottom` 字体设为 12F 后,`AutoSizeFormClass` 放大窗体时它会跟着长高 → 需留够余量,否则会压住右下角控件。
+
 ## 数据访问
 - `dh.ExecuteSql(sql, "select")` 返回 `DataTable`;`dh.getFieldDataByCondition(表, 字段, 条件)` 返回单值。
 - 表命名:工序表 `step`(`st_code`/`st_name`),工序类型表 `steptype`(`STP_CODE`/`STP_NAME`,注意是 STP_ 前缀)。
 - 员工上下线表 `loadman`:`LM_ID`(`loadman_seq.nextval`)/`LM_LINECODE`/`LM_EMCODE`/`LM_UPTIME`/`LM_DOWNTIME`/`LM_INMAN`;同构的 `loadmake`(工单上下线)有现成界面 `Query_LoadMake` 可作模板。
 - SQL 多为拼字符串 + Oracle 函数(`nvl`、`ROWNUM`、`DUAL`)。
+- **操作日志表 `commandlog`**:统一调 `LogicHandler.DoCommandLog(caller, userCode, makeCode, lineCode, sourceCode, operate, result, sncode, checkno)`(`UAS_MES_NEW.PublicMethod`),内部固定 insert + `commandlog_seq.nextval` + `sysdate`,调用方不传 ID/时间。惯例:`Tag.ToString(), User.UserCode, 工单号, User.UserLineCode, User.UserSourceCode, "操作名", "结果", sncode, ""`。
 
 ## 已知环境限制
 - 无法本地编译验证:`dotnet build` 卡在 NuGet restore;沙箱拦截 MSBuild.exe / csc.exe。

+ 1 - 1
UAS_MES_YDCY/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -136,7 +136,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.UpperCollection.Properties)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_CheckRFID.Designer.cs

@@ -406,7 +406,7 @@
             this.Load += new System.EventHandler(this.Make_FuselageLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_FuselageLabelPrint_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Delay)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollectionBadOnlyNEW.Designer.cs

@@ -829,7 +829,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollectionNEW.Designer.cs

@@ -839,7 +839,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 220 - 10
UAS_MES_YDCY/FunctionCode/Make/Make_FuselageLabelPrint.Designer.cs

@@ -52,13 +52,27 @@
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.PrintThird = new System.Windows.Forms.CheckBox();
+            this.PrintNum2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.PrintList2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintLabel2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // 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(1398, 38);
+            this.label2.Location = new System.Drawing.Point(1432, 41);
             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);
@@ -69,7 +83,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(1422, 216);
+            this.label1.Location = new System.Drawing.Point(1455, 143);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(82, 41);
@@ -104,7 +118,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(1366, 138);
+            this.label4.Location = new System.Drawing.Point(1400, 86);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
@@ -161,7 +175,7 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(1437, 315);
+            this.CollectRemark.Location = new System.Drawing.Point(1421, 673);
             this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(155, 39);
@@ -204,7 +218,7 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(1430, 370);
+            this.Remark.Location = new System.Drawing.Point(1414, 728);
             this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
             this.Remark.Name = "Remark";
             this.Remark.Size = new System.Drawing.Size(378, 156);
@@ -227,16 +241,16 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1534, 216);
+            this.PrintLabel.Location = new System.Drawing.Point(1561, 148);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(200, 32);
+            this.PrintLabel.Size = new System.Drawing.Size(207, 32);
             this.PrintLabel.TabIndex = 181;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(1526, 38);
+            this.Printer.Location = new System.Drawing.Point(1560, 41);
             this.Printer.Margin = new System.Windows.Forms.Padding(8);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(212, 50);
@@ -296,12 +310,12 @@
             this.PrintNum.Enabled = false;
             this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1534, 131);
+            this.PrintNum.Location = new System.Drawing.Point(1561, 91);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Negative = false;
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(200, 39);
+            this.PrintNum.Size = new System.Drawing.Size(211, 39);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -337,11 +351,193 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
+            // PrintSecond
+            // 
+            this.PrintSecond.AutoSize = true;
+            this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintSecond.ForeColor = System.Drawing.Color.Red;
+            this.PrintSecond.Location = new System.Drawing.Point(1413, 224);
+            this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintSecond.Name = "PrintSecond";
+            this.PrintSecond.Size = new System.Drawing.Size(162, 28);
+            this.PrintSecond.TabIndex = 210;
+            this.PrintSecond.Text = "打印副标签";
+            this.PrintSecond.UseVisualStyleBackColor = true;
+            // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.Enabled = false;
+            this.PrintNum1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1568, 264);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Negative = false;
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(200, 39);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 212;
+            this.PrintNum1.Text = "1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Location = new System.Drawing.Point(1560, 317);
+            this.PrintList1.Margin = new System.Windows.Forms.Padding(8);
+            this.PrintList1.Name = "PrintList1";
+            this.PrintList1.Size = new System.Drawing.Size(212, 50);
+            this.PrintList1.TabIndex = 214;
+            // 
+            // PrintLabel1
+            // 
+            this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel1.FormattingEnabled = true;
+            this.PrintLabel1.Location = new System.Drawing.Point(1560, 377);
+            this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel1.Name = "PrintLabel1";
+            this.PrintLabel1.Size = new System.Drawing.Size(212, 32);
+            this.PrintLabel1.TabIndex = 216;
+            this.PrintLabel1.SelectedValueChanged += new System.EventHandler(this.PrintLabel1_SelectedValueChanged);
+            // 
+            // PrintThird
+            // 
+            this.PrintThird.AutoSize = true;
+            this.PrintThird.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintThird.ForeColor = System.Drawing.Color.Red;
+            this.PrintThird.Location = new System.Drawing.Point(1413, 436);
+            this.PrintThird.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintThird.Name = "PrintThird";
+            this.PrintThird.Size = new System.Drawing.Size(150, 28);
+            this.PrintThird.TabIndex = 217;
+            this.PrintThird.Text = "打印标签2";
+            this.PrintThird.UseVisualStyleBackColor = true;
+            // 
+            // PrintNum2
+            // 
+            this.PrintNum2.AllPower = null;
+            this.PrintNum2.BackColor = System.Drawing.Color.White;
+            this.PrintNum2.Enabled = false;
+            this.PrintNum2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum2.ID = null;
+            this.PrintNum2.Location = new System.Drawing.Point(1558, 488);
+            this.PrintNum2.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum2.Name = "PrintNum2";
+            this.PrintNum2.Negative = false;
+            this.PrintNum2.Power = null;
+            this.PrintNum2.Size = new System.Drawing.Size(210, 39);
+            this.PrintNum2.Str = null;
+            this.PrintNum2.Str1 = null;
+            this.PrintNum2.Str2 = null;
+            this.PrintNum2.TabIndex = 219;
+            this.PrintNum2.Text = "1";
+            // 
+            // PrintList2
+            // 
+            this.PrintList2.Location = new System.Drawing.Point(1560, 550);
+            this.PrintList2.Margin = new System.Windows.Forms.Padding(8);
+            this.PrintList2.Name = "PrintList2";
+            this.PrintList2.Size = new System.Drawing.Size(212, 50);
+            this.PrintList2.TabIndex = 221;
+            // 
+            // PrintLabel2
+            // 
+            this.PrintLabel2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel2.FormattingEnabled = true;
+            this.PrintLabel2.Location = new System.Drawing.Point(1560, 603);
+            this.PrintLabel2.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel2.Name = "PrintLabel2";
+            this.PrintLabel2.Size = new System.Drawing.Size(208, 32);
+            this.PrintLabel2.TabIndex = 223;
+            this.PrintLabel2.SelectedValueChanged += new System.EventHandler(this.PrintLabel2_SelectedValueChanged);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(1400, 317);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(133, 41);
+            this.label5.TabIndex = 213;
+            this.label5.Text = "打印机1";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(1406, 377);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(101, 41);
+            this.label6.TabIndex = 215;
+            this.label6.Text = "标签1";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(1400, 258);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 211;
+            this.label7.Text = "打印张数";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(1400, 483);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(146, 41);
+            this.label8.TabIndex = 218;
+            this.label8.Text = "打印张数";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1400, 539);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(133, 41);
+            this.label9.TabIndex = 220;
+            this.label9.Text = "打印机2";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1406, 594);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(101, 41);
+            this.label10.TabIndex = 222;
+            this.label10.Text = "标签2";
+            // 
             // Make_FuselageLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1828, 896);
+            this.Controls.Add(this.PrintLabel2);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.PrintList2);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrintNum2);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.PrintThird);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.PrintSecond);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.CollectRemark);
@@ -404,5 +600,19 @@
         private CustomControl.RichText.RichTextAutoBottom Remark;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private System.Windows.Forms.CheckBox PrintSecond;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum1;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
+        private System.Windows.Forms.CheckBox PrintThird;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum2;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList2;
+        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel2;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label10;
     }
 }

+ 54 - 6
UAS_MES_YDCY/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -134,7 +134,6 @@ namespace UAS_MES_NEW.Make
                     {
                         sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
                     }
-                    string oStatus = "";
                     //调用公共方法CheckStepSNAndMacode判断工序是否正确
                     string status = "";
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
@@ -214,6 +213,28 @@ namespace UAS_MES_NEW.Make
                             {
                                 OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                             }
+                            if (PrintSecond.Checked)
+                            {
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
+                                {
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                                }
+                            }
+                            if (PrintThird.Checked)
+                            {
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel2.Text, PrintLabel2.SelectedValue.ToString(), PrintList2.Text, sncode.Text, int.Parse(PrintNum2.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
+                                {
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                                }
+                            }
                             //if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
                             //{
                             //    //提示用户打印成功
@@ -288,6 +309,14 @@ namespace UAS_MES_NEW.Make
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
+
+            PrintLabel1.DataSource = dt.Copy();
+            PrintLabel1.DisplayMember = "la_url";
+            PrintLabel1.ValueMember = "la_id";
+
+            PrintLabel2.DataSource = dt.Copy();
+            PrintLabel2.DisplayMember = "la_url";
+            PrintLabel2.ValueMember = "la_id";
             pr_change = true;
         }
 
@@ -306,13 +335,32 @@ namespace UAS_MES_NEW.Make
             asc.controlAutoSize(this);
         }
 
+        /// <summary>
+        /// 按标签模板带出打印张数,la_printnos 为空时默认 1
+        /// </summary>
+        private string GetPrintNums(object selectedValue)
+        {
+            if (selectedValue == null || selectedValue.ToString() == "System.Data.DataRowView") return "";
+            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + selectedValue.ToString() + "'").ToString();
+            return PrintNums == "" ? "1" : PrintNums;
+        }
+
         private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
         {
-            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
-            {
-                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
-            }
+            string nums = GetPrintNums(PrintLabel.SelectedValue);
+            if (nums != "") PrintNum.Text = nums;
+        }
+
+        private void PrintLabel1_SelectedValueChanged(object sender, EventArgs e)
+        {
+            string nums = GetPrintNums(PrintLabel1.SelectedValue);
+            if (nums != "") PrintNum1.Text = nums;
+        }
+
+        private void PrintLabel2_SelectedValueChanged(object sender, EventArgs e)
+        {
+            string nums = GetPrintNums(PrintLabel2.SelectedValue);
+            if (nums != "") PrintNum2.Text = nums;
         }
 
         private void StepCount_Load(object sender, EventArgs e)

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_OutBoxSnCheck.Designer.cs

@@ -187,7 +187,7 @@
             this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
             this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_OutBoxSnCheckPa.Designer.cs

@@ -222,7 +222,7 @@
             this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
             this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 129 - 23
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckFuge.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SNLabelCheckBXK));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SNLabelCheckFuge));
             this.mcd_restqty_label = new System.Windows.Forms.Label();
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
@@ -84,6 +84,13 @@
             this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.label7 = new System.Windows.Forms.Label();
             this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintNum2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.PrintThird = new System.Windows.Forms.CheckBox();
+            this.PrintLabel2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.PrintList2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
@@ -274,7 +281,7 @@
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowHeadersWidth = 82;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1282, 454);
+            this.LabelDataGridView.Size = new System.Drawing.Size(1282, 406);
             this.LabelDataGridView.TabIndex = 193;
             // 
             // lcd_detno
@@ -511,10 +518,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1090, 688);
+            this.OperateResult.Location = new System.Drawing.Point(1102, 726);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(696, 238);
+            this.OperateResult.Size = new System.Drawing.Size(679, 228);
             this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             // 
@@ -606,7 +613,7 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1490, 388);
+            this.PrintNum.Location = new System.Drawing.Point(1490, 286);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
@@ -620,7 +627,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(1334, 388);
+            this.label4.Location = new System.Drawing.Point(1334, 282);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(82, 41);
@@ -631,7 +638,7 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1490, 312);
+            this.PrintLabel.Location = new System.Drawing.Point(1490, 230);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(260, 32);
@@ -642,7 +649,7 @@
             // 
             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(1334, 216);
+            this.label2.Location = new System.Drawing.Point(1334, 170);
             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);
@@ -653,7 +660,7 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(1334, 303);
+            this.PrintLabel_label.Location = new System.Drawing.Point(1334, 227);
             this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
             this.PrintLabel_label.Size = new System.Drawing.Size(82, 41);
@@ -662,7 +669,7 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(1490, 216);
+            this.Printer.Location = new System.Drawing.Point(1490, 170);
             this.Printer.Margin = new System.Windows.Forms.Padding(8);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(262, 50);
@@ -673,12 +680,12 @@
             this.PrintNum1.AllPower = null;
             this.PrintNum1.BackColor = System.Drawing.Color.White;
             this.PrintNum1.ID = null;
-            this.PrintNum1.Location = new System.Drawing.Point(1616, 459);
+            this.PrintNum1.Location = new System.Drawing.Point(1490, 485);
             this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum1.Name = "PrintNum1";
             this.PrintNum1.Negative = false;
             this.PrintNum1.Power = null;
-            this.PrintNum1.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum1.Size = new System.Drawing.Size(264, 35);
             this.PrintNum1.Str = null;
             this.PrintNum1.Str1 = null;
             this.PrintNum1.Str2 = null;
@@ -687,21 +694,21 @@
             // 
             // 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(1522, 455);
+            this.label3.Location = new System.Drawing.Point(1337, 479);
             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.Size = new System.Drawing.Size(82, 35);
             this.label3.TabIndex = 226;
             this.label3.Text = "份数";
+            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
             // PrintSecond
             // 
             this.PrintSecond.AutoSize = true;
             this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintSecond.ForeColor = System.Drawing.Color.Red;
-            this.PrintSecond.Location = new System.Drawing.Point(1341, 466);
+            this.PrintSecond.Location = new System.Drawing.Point(1341, 338);
             this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
             this.PrintSecond.Name = "PrintSecond";
             this.PrintSecond.Size = new System.Drawing.Size(162, 28);
@@ -714,17 +721,18 @@
             this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel1.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintLabel1.FormattingEnabled = true;
-            this.PrintLabel1.Location = new System.Drawing.Point(1490, 597);
+            this.PrintLabel1.Location = new System.Drawing.Point(1486, 436);
             this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
             this.PrintLabel1.Name = "PrintLabel1";
             this.PrintLabel1.Size = new System.Drawing.Size(264, 39);
             this.PrintLabel1.TabIndex = 223;
+            this.PrintLabel1.SelectedIndexChanged += new System.EventHandler(this.PrintLabel1_SelectedIndexChanged);
             // 
             // label7
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(1334, 595);
+            this.label7.Location = new System.Drawing.Point(1334, 431);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(101, 41);
@@ -734,28 +742,119 @@
             // PrintList1
             // 
             this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PrintList1.Location = new System.Drawing.Point(1490, 527);
+            this.PrintList1.Location = new System.Drawing.Point(1488, 376);
             this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
             this.PrintList1.Name = "PrintList1";
             this.PrintList1.Size = new System.Drawing.Size(264, 56);
             this.PrintList1.TabIndex = 222;
             // 
+            // PrintNum2
+            // 
+            this.PrintNum2.AllPower = null;
+            this.PrintNum2.BackColor = System.Drawing.Color.White;
+            this.PrintNum2.ID = null;
+            this.PrintNum2.Location = new System.Drawing.Point(1490, 679);
+            this.PrintNum2.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum2.Name = "PrintNum2";
+            this.PrintNum2.Negative = false;
+            this.PrintNum2.Power = null;
+            this.PrintNum2.Size = new System.Drawing.Size(264, 35);
+            this.PrintNum2.Str = null;
+            this.PrintNum2.Str1 = null;
+            this.PrintNum2.Str2 = null;
+            this.PrintNum2.TabIndex = 232;
+            this.PrintNum2.Text = "1";
+            // 
+            // PrintThird
+            // 
+            this.PrintThird.AutoSize = true;
+            this.PrintThird.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintThird.ForeColor = System.Drawing.Color.Red;
+            this.PrintThird.Location = new System.Drawing.Point(1341, 542);
+            this.PrintThird.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintThird.Name = "PrintThird";
+            this.PrintThird.Size = new System.Drawing.Size(150, 28);
+            this.PrintThird.TabIndex = 231;
+            this.PrintThird.Text = "打印标签2";
+            this.PrintThird.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel2
+            // 
+            this.PrintLabel2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel2.FormattingEnabled = true;
+            this.PrintLabel2.Location = new System.Drawing.Point(1490, 632);
+            this.PrintLabel2.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel2.Name = "PrintLabel2";
+            this.PrintLabel2.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel2.TabIndex = 234;
+            this.PrintLabel2.SelectedIndexChanged += new System.EventHandler(this.PrintLabel2_SelectedIndexChanged);
+            // 
+            // PrintList2
+            // 
+            this.PrintList2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList2.Location = new System.Drawing.Point(1490, 582);
+            this.PrintList2.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList2.Name = "PrintList2";
+            this.PrintList2.Size = new System.Drawing.Size(264, 56);
+            this.PrintList2.TabIndex = 233;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1334, 632);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(101, 41);
+            this.label9.TabIndex = 235;
+            this.label9.Text = "标签2";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1334, 586);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(133, 41);
+            this.label10.TabIndex = 236;
+            this.label10.Text = "打印机2";
+            // 
+            // label11
+            // 
+            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label11.Location = new System.Drawing.Point(1334, 679);
+            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(82, 35);
+            this.label11.TabIndex = 237;
+            this.label11.Text = "份数";
+            this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
             // label8
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(1334, 527);
+            this.label8.Location = new System.Drawing.Point(1337, 377);
             this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(133, 41);
             this.label8.TabIndex = 221;
             this.label8.Text = "打印机1";
             // 
-            // Make_SNLabelCheckBXK
+            // Make_SNLabelCheckFuge
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1796, 974);
+            this.ClientSize = new System.Drawing.Size(1796, 978);
+            this.Controls.Add(this.PrintNum2);
+            this.Controls.Add(this.label11);
+            this.Controls.Add(this.PrintThird);
+            this.Controls.Add(this.PrintLabel2);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrintList2);
+            this.Controls.Add(this.label10);
             this.Controls.Add(this.PrintNum1);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.PrintSecond);
@@ -799,7 +898,7 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
-            this.Name = "Make_SNLabelCheckBXK";
+            this.Name = "Make_SNLabelCheckFuge";
             this.Tag = "Make!FeedingCollection";
             this.Text = "上料采集";
             this.Load += new System.EventHandler(this.Make_FeedingCollection_Load);
@@ -866,6 +965,13 @@
         private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
         private System.Windows.Forms.Label label7;
         private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum2;
+        private System.Windows.Forms.CheckBox PrintThird;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel2;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList2;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label label11;
         private System.Windows.Forms.Label label8;
     }
 }

+ 39 - 5
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckFuge.cs

@@ -272,6 +272,17 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
                                 }
+                                if (PrintThird.Checked)
+                                {
+                                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel2.Text, PrintLabel2.SelectedValue.ToString(), PrintList2.Text, sn_code.Text, int.Parse(PrintNum2.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out ErrorMessage))
+                                    {
+                                        OperateResult.AppendText(">>序列号:" + sn_code.Text + "打印结束\n", Color.Green);
+                                    }
+                                    else
+                                    {
+                                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                                    }
+                                }
                                 if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "标签核对", "标签核对完成", User.UserCode, out ErrorMessage))
                                 {
                                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
@@ -451,16 +462,39 @@ namespace UAS_MES_NEW.Make
             PrintLabel1.DataSource = _dt.Copy();
             PrintLabel1.DisplayMember = "la_url";
             PrintLabel1.ValueMember = "la_id";
+
+            PrintLabel2.DataSource = _dt.Copy();
+            PrintLabel2.DisplayMember = "la_url";
+            PrintLabel2.ValueMember = "la_id";
             code.Str = ma_prodcode.Text;
         }
 
+        /// <summary>
+        /// 按标签模板带出打印份数,la_printnos 为空时默认 1
+        /// </summary>
+        private string GetPrintNums(object selectedValue)
+        {
+            if (selectedValue == null || selectedValue.ToString() == "System.Data.DataRowView") return "";
+            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + selectedValue.ToString() + "'").ToString();
+            return PrintNums == "" ? "1" : PrintNums;
+        }
+
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
-            {
-                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
-            }
+            string nums = GetPrintNums(PrintLabel.SelectedValue);
+            if (nums != "") PrintNum.Text = nums;
+        }
+
+        private void PrintLabel1_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            string nums = GetPrintNums(PrintLabel1.SelectedValue);
+            if (nums != "") PrintNum1.Text = nums;
+        }
+
+        private void PrintLabel2_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            string nums = GetPrintNums(PrintLabel2.SelectedValue);
+            if (nums != "") PrintNum2.Text = nums;
         }
     }
 }

+ 24 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckFuge.resx

@@ -141,6 +141,30 @@
   <metadata name="lcd_sql.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="lcd_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_labeltype.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_prefix.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_suffix.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_alllength.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_length.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lcd_sql.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="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_StepType.Designer.cs

@@ -112,7 +112,7 @@ namespace UAS_MES_NEW.Make
             this.Text = "工序类型维护";
             this.Load += new System.EventHandler(this.Make_StepType_Load);
             this.SizeChanged += new System.EventHandler(this.Make_StepType_SizeChanged);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 8 - 3
UAS_MES_YDCY/FunctionCode/Make/Make_StepType.cs

@@ -19,8 +19,9 @@ namespace UAS_MES_NEW.Make
         //查询结果:craftdetail 中 cd_detno 最小的 cd_stepcode
         string cdStepCode = "";
 
-        //查询结果:makeserial 中的主键、工艺编号、产品编号与当前下一工序
+        //查询结果:makeserial 中的主键、工单号、工艺编号、产品编号与当前下一工序
         string msId = "";
+        string makeCode = "";
         string craftCode = "";
         string prodCode = "";
         string nextStepCode = "";
@@ -92,8 +93,8 @@ namespace UAS_MES_NEW.Make
 
             string sn = sncode.Text.Trim();
 
-            //一、按序列号取 makeserial 的主键、工艺编号、产品编号与当前下一工序
-            DataTable dtSn = (DataTable)dh.ExecuteSql("select ms_id,ms_craftcode,ms_prodcode,ms_nextstepcode from makeserial where ms_sncode='" + sn + "'", "select");
+            //一、按序列号取 makeserial 的主键、工单号、工艺编号、产品编号与当前下一工序
+            DataTable dtSn = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_craftcode,ms_prodcode,ms_nextstepcode from makeserial where ms_sncode='" + sn + "'", "select");
             if (dtSn.Rows.Count == 0)
             {
                 OperateResult.AppendText("<<" + sn + "不存在\n", Color.Red, sncode);
@@ -102,6 +103,7 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             msId = dtSn.Rows[0]["ms_id"].ToString();
+            makeCode = dtSn.Rows[0]["ms_makecode"].ToString();
             craftCode = dtSn.Rows[0]["ms_craftcode"].ToString();
             prodCode = dtSn.Rows[0]["ms_prodcode"].ToString();
             nextStepCode = dtSn.Rows[0]["ms_nextstepcode"].ToString();
@@ -162,6 +164,9 @@ namespace UAS_MES_NEW.Make
             dh.ExecuteSql("update makeserial set ms_nextstepcode='" + cdStepCode + "' where ms_id='" + msId + "'", "update");
 
             OperateResult.AppendText("<<" + sn + "执行" + stepTypeName + ",下一工序为" + cdStepCode + "(" + stepName + ")\n", Color.Green, sncode);
+            //记录操作日志:抽检(工序)类型 + 具体更新的工序
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, makeCode, User.UserLineCode, User.UserSourceCode,
+                stepTypeName + "," + cdStepCode, "更新下一工序成功,下一工序为" + cdStepCode + "(" + stepName + ")", sn, "");
             sncode.Clear();
             sncode.Focus();
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Query/Query_LoadMan.Designer.cs

@@ -231,7 +231,7 @@ namespace UAS_MES_NEW.Query
             this.Load += new System.EventHandler(this.Query_LoadMan_Load);
             this.SizeChanged += new System.EventHandler(this.Query_LoadMan_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.DGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_ActiveSN.Designer.cs

@@ -121,7 +121,7 @@
             this.Tag = "Special!CancelOQC";
             this.Text = "拆箱处理";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyFreeze.Designer.cs

@@ -419,7 +419,7 @@
             this.Text = "重置站点";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
             this.SizeChanged += new System.EventHandler(this.Special_Reset_SizeChanged);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyRelease.Designer.cs

@@ -419,7 +419,7 @@
             this.Text = "重置站点";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
             this.SizeChanged += new System.EventHandler(this.Special_Reset_SizeChanged);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }