From 020863d1ef8cdeadbdf8846ef87898f7fd7d3d96 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 30 May 2026 11:04:02 +0800 Subject: [PATCH 01/29] =?UTF-8?q?feat(qc):=20=E6=B7=BB=E5=8A=A0=E5=8C=96?= =?UTF-8?q?=E5=AD=A6=E6=88=90=E5=88=86=E5=92=8C=E7=89=A9=E7=90=86=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E6=A3=80=E6=B5=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在QcChemicalItem实体类中新增铝、钛、铬、镍、铜、氮、铁、硼等化学成分字段 - 在QcChemicalItemBo业务对象中同步添加对应的化学成分属性 - 更新QcChemicalItemMapper.xml映射文件以支持新字段的数据映射 - 在QcChemicalItemServiceImpl服务实现中添加新字段的查询条件支持 - 在QcChemicalItemVo视图对象中添加化学成分字段并配置Excel导出 - 在QcPhysicalItem实体类中新增规定塑性延伸强度、镀层表面结构、镀层重量等物理性能字段 - 在QcPhysicalItemBo业务对象中添加对应的物理性能属性 - 更新QcPhysicalItemMapper.xml映射文件以支持新的物理性能字段映射 - 在QcPhysicalItemServiceImpl服务实现中添加新物理性能字段的查询条件支持 - 在QcPhysicalItemVo视图对象中添加物理性能字段并配置Excel导出功能 --- .../com/klp/mes/qc/domain/QcChemicalItem.java | 32 +++++++++++++ .../com/klp/mes/qc/domain/QcPhysicalItem.java | 12 +++++ .../mes/qc/domain/bo/QcChemicalItemBo.java | 40 ++++++++++++++++ .../mes/qc/domain/bo/QcPhysicalItemBo.java | 15 ++++++ .../mes/qc/domain/vo/QcChemicalItemVo.java | 48 +++++++++++++++++++ .../mes/qc/domain/vo/QcPhysicalItemVo.java | 18 +++++++ .../impl/QcChemicalItemServiceImpl.java | 8 ++++ .../impl/QcPhysicalItemServiceImpl.java | 3 ++ .../mapper/qc/QcChemicalItemMapper.xml | 8 ++++ .../mapper/qc/QcPhysicalItemMapper.xml | 3 ++ 10 files changed, 187 insertions(+) diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/QcChemicalItem.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/QcChemicalItem.java index f47e50f2..760e45ad 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/QcChemicalItem.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/QcChemicalItem.java @@ -65,6 +65,38 @@ public class QcChemicalItem extends BaseEntity { * 酸溶铝(%) */ private BigDecimal als; + /** + * 铝(%) + */ + private BigDecimal al; + /** + * 钛(%) + */ + private BigDecimal ti; + /** + * 铬(%) + */ + private BigDecimal cr; + /** + * 镍(%) + */ + private BigDecimal ni; + /** + * 铜(%) + */ + private BigDecimal cu; + /** + * 氮(%) + */ + private BigDecimal n; + /** + * 铁(%) + */ + private BigDecimal fe; + /** + * 硼(%) + */ + private BigDecimal b; /** * 备注 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/QcPhysicalItem.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/QcPhysicalItem.java index 8cb93679..e44a5b51 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/QcPhysicalItem.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/QcPhysicalItem.java @@ -41,6 +41,10 @@ public class QcPhysicalItem extends BaseEntity { * 拉伸试验-屈服强度(MPa) */ private BigDecimal yieldStrength; + /** + * 规定塑性延伸强度(MPa) + */ + private BigDecimal plasticExtensionStrength; /** * 拉伸试验-抗拉强度(MPa) */ @@ -65,6 +69,14 @@ public class QcPhysicalItem extends BaseEntity { * 表面结构 */ private String surfaceStructure; + /** + * 镀层表面结构 + */ + private String coatingSurfaceStructure; + /** + * 镀层重量 COATING MASS(g/m²) + */ + private BigDecimal coatingMass; /** * 边缘状态 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcChemicalItemBo.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcChemicalItemBo.java index 48a310da..33ddcb25 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcChemicalItemBo.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcChemicalItemBo.java @@ -73,6 +73,46 @@ public class QcChemicalItemBo extends BaseEntity { */ private BigDecimal als; + /** + * 铝(%) + */ + private BigDecimal al; + + /** + * 钛(%) + */ + private BigDecimal ti; + + /** + * 铬(%) + */ + private BigDecimal cr; + + /** + * 镍(%) + */ + private BigDecimal ni; + + /** + * 铜(%) + */ + private BigDecimal cu; + + /** + * 氮(%) + */ + private BigDecimal n; + + /** + * 铁(%) + */ + private BigDecimal fe; + + /** + * 硼(%) + */ + private BigDecimal b; + /** * 备注 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcPhysicalItemBo.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcPhysicalItemBo.java index e0e2e945..2e12e995 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcPhysicalItemBo.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/bo/QcPhysicalItemBo.java @@ -43,6 +43,11 @@ public class QcPhysicalItemBo extends BaseEntity { */ private BigDecimal yieldStrength; + /** + * 规定塑性延伸强度(MPa) + */ + private BigDecimal plasticExtensionStrength; + /** * 拉伸试验-抗拉强度(MPa) */ @@ -73,6 +78,16 @@ public class QcPhysicalItemBo extends BaseEntity { */ private String surfaceStructure; + /** + * 镀层表面结构 + */ + private String coatingSurfaceStructure; + + /** + * 镀层重量 COATING MASS(g/m²) + */ + private BigDecimal coatingMass; + /** * 边缘状态 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcChemicalItemVo.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcChemicalItemVo.java index db3ef9cb..378414eb 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcChemicalItemVo.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcChemicalItemVo.java @@ -86,6 +86,54 @@ public class QcChemicalItemVo { @ExcelProperty(value = "酸溶铝(%)") private BigDecimal als; + /** + * 铝(%) + */ + @ExcelProperty(value = "铝(%)") + private BigDecimal al; + + /** + * 钛(%) + */ + @ExcelProperty(value = "钛(%)") + private BigDecimal ti; + + /** + * 铬(%) + */ + @ExcelProperty(value = "铬(%)") + private BigDecimal cr; + + /** + * 镍(%) + */ + @ExcelProperty(value = "镍(%)") + private BigDecimal ni; + + /** + * 铜(%) + */ + @ExcelProperty(value = "铜(%)") + private BigDecimal cu; + + /** + * 氮(%) + */ + @ExcelProperty(value = "氮(%)") + private BigDecimal n; + + /** + * 铁(%) + */ + @ExcelProperty(value = "铁(%)") + private BigDecimal fe; + + /** + * 硼(%) + */ + @ExcelProperty(value = "硼(%)") + private BigDecimal b; + /** * 备注 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcPhysicalItemVo.java b/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcPhysicalItemVo.java index 29853843..d79d5264 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcPhysicalItemVo.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/domain/vo/QcPhysicalItemVo.java @@ -51,6 +51,12 @@ public class QcPhysicalItemVo { @ExcelProperty(value = "拉伸试验-屈服强度(MPa)") private BigDecimal yieldStrength; + /** + * 规定塑性延伸强度(MPa) + */ + @ExcelProperty(value = "规定塑性延伸强度(MPa)") + private BigDecimal plasticExtensionStrength; + /** * 拉伸试验-抗拉强度(MPa) */ @@ -87,6 +93,18 @@ public class QcPhysicalItemVo { @ExcelProperty(value = "表面结构") private String surfaceStructure; + /** + * 镀层表面结构 + */ + @ExcelProperty(value = "镀层表面结构") + private String coatingSurfaceStructure; + + /** + * 镀层重量 COATING MASS(g/m²) + */ + @ExcelProperty(value = "镀层重量 COATING MASS(g/m²)") + private BigDecimal coatingMass; + /** * 边缘状态 */ diff --git a/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcChemicalItemServiceImpl.java b/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcChemicalItemServiceImpl.java index fbb2e8a3..fb48378f 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcChemicalItemServiceImpl.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcChemicalItemServiceImpl.java @@ -79,6 +79,14 @@ public class QcChemicalItemServiceImpl implements IQcChemicalItemService { lqw.eq(bo.getP() != null, QcChemicalItem::getP, bo.getP()); lqw.eq(bo.getS() != null, QcChemicalItem::getS, bo.getS()); lqw.eq(bo.getAls() != null, QcChemicalItem::getAls, bo.getAls()); + lqw.eq(bo.getAl() != null, QcChemicalItem::getAl, bo.getAl()); + lqw.eq(bo.getTi() != null, QcChemicalItem::getTi, bo.getTi()); + lqw.eq(bo.getCr() != null, QcChemicalItem::getCr, bo.getCr()); + lqw.eq(bo.getNi() != null, QcChemicalItem::getNi, bo.getNi()); + lqw.eq(bo.getCu() != null, QcChemicalItem::getCu, bo.getCu()); + lqw.eq(bo.getN() != null, QcChemicalItem::getN, bo.getN()); + lqw.eq(bo.getFe() != null, QcChemicalItem::getFe, bo.getFe()); + lqw.eq(bo.getB() != null, QcChemicalItem::getB, bo.getB()); // 根据创建时间倒叙 lqw.orderByDesc(QcChemicalItem::getCreateTime); return lqw; diff --git a/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcPhysicalItemServiceImpl.java b/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcPhysicalItemServiceImpl.java index 44f12e69..c18ee318 100644 --- a/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcPhysicalItemServiceImpl.java +++ b/klp-mes/src/main/java/com/klp/mes/qc/service/impl/QcPhysicalItemServiceImpl.java @@ -73,12 +73,15 @@ public class QcPhysicalItemServiceImpl implements IQcPhysicalItemService { lqw.eq(bo.getCoilId() != null, QcPhysicalItem::getCoilId, bo.getCoilId()); lqw.eq(StringUtils.isNotBlank(bo.getCoilNo()), QcPhysicalItem::getCoilNo, bo.getCoilNo()); lqw.eq(bo.getYieldStrength() != null, QcPhysicalItem::getYieldStrength, bo.getYieldStrength()); + lqw.eq(bo.getPlasticExtensionStrength() != null, QcPhysicalItem::getPlasticExtensionStrength, bo.getPlasticExtensionStrength()); lqw.eq(bo.getTensileStrength() != null, QcPhysicalItem::getTensileStrength, bo.getTensileStrength()); lqw.eq(bo.getElongation() != null, QcPhysicalItem::getElongation, bo.getElongation()); lqw.eq(bo.getHardness() != null, QcPhysicalItem::getHardness, bo.getHardness()); lqw.eq(StringUtils.isNotBlank(bo.getBendingTest()), QcPhysicalItem::getBendingTest, bo.getBendingTest()); lqw.eq(StringUtils.isNotBlank(bo.getSurfaceQuality()), QcPhysicalItem::getSurfaceQuality, bo.getSurfaceQuality()); lqw.eq(StringUtils.isNotBlank(bo.getSurfaceStructure()), QcPhysicalItem::getSurfaceStructure, bo.getSurfaceStructure()); + lqw.eq(StringUtils.isNotBlank(bo.getCoatingSurfaceStructure()), QcPhysicalItem::getCoatingSurfaceStructure, bo.getCoatingSurfaceStructure()); + lqw.eq(bo.getCoatingMass() != null, QcPhysicalItem::getCoatingMass, bo.getCoatingMass()); lqw.eq(StringUtils.isNotBlank(bo.getEdgeStatus()), QcPhysicalItem::getEdgeStatus, bo.getEdgeStatus()); // 根据创建时间倒叙 lqw.orderByDesc(QcPhysicalItem::getCreateTime); diff --git a/klp-mes/src/main/resources/mapper/qc/QcChemicalItemMapper.xml b/klp-mes/src/main/resources/mapper/qc/QcChemicalItemMapper.xml index efed952b..283985aa 100644 --- a/klp-mes/src/main/resources/mapper/qc/QcChemicalItemMapper.xml +++ b/klp-mes/src/main/resources/mapper/qc/QcChemicalItemMapper.xml @@ -16,6 +16,14 @@ + + + + + + + + diff --git a/klp-mes/src/main/resources/mapper/qc/QcPhysicalItemMapper.xml b/klp-mes/src/main/resources/mapper/qc/QcPhysicalItemMapper.xml index 5f6b932e..6122459b 100644 --- a/klp-mes/src/main/resources/mapper/qc/QcPhysicalItemMapper.xml +++ b/klp-mes/src/main/resources/mapper/qc/QcPhysicalItemMapper.xml @@ -10,12 +10,15 @@ + + + From 91d1236c37e420b2573beb6faa8f368362405fb4 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 30 May 2026 13:44:31 +0800 Subject: [PATCH 02/29] =?UTF-8?q?feat(cost):=20=E4=B8=BA=E6=88=90=E6=9C=AC?= =?UTF-8?q?=E9=A1=B9=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在CostItem实体类、Bo业务对象和Vo视图对象中新增queryCondition字段,用于存储JSON格式的查询条件 - 更新CostItemMapper.xml映射文件以支持新字段的数据映射 - 在CostItemServiceImpl服务实现中添加新字段的查询条件支持,实现按查询条件过滤成本项的功能 --- klp-cost/src/main/java/com/klp/cost/domain/CostItem.java | 4 ++++ .../src/main/java/com/klp/cost/domain/bo/CostItemBo.java | 5 +++++ .../src/main/java/com/klp/cost/domain/vo/CostItemVo.java | 6 ++++++ .../java/com/klp/cost/service/impl/CostItemServiceImpl.java | 1 + klp-cost/src/main/resources/mapper/cost/CostItemMapper.xml | 1 + 5 files changed, 17 insertions(+) diff --git a/klp-cost/src/main/java/com/klp/cost/domain/CostItem.java b/klp-cost/src/main/java/com/klp/cost/domain/CostItem.java index c8f8bb3e..fcbc32c0 100644 --- a/klp-cost/src/main/java/com/klp/cost/domain/CostItem.java +++ b/klp-cost/src/main/java/com/klp/cost/domain/CostItem.java @@ -44,6 +44,10 @@ public class CostItem extends BaseEntity { * 备注 */ private String remark; + /** + * 查询条件(JSON格式) + */ + private String queryCondition; /** * 删除标识 0=正常 2=删除 */ diff --git a/klp-cost/src/main/java/com/klp/cost/domain/bo/CostItemBo.java b/klp-cost/src/main/java/com/klp/cost/domain/bo/CostItemBo.java index f1cc05dc..25d1cf3b 100644 --- a/klp-cost/src/main/java/com/klp/cost/domain/bo/CostItemBo.java +++ b/klp-cost/src/main/java/com/klp/cost/domain/bo/CostItemBo.java @@ -47,5 +47,10 @@ public class CostItemBo extends BaseEntity { */ private String remark; + /** + * 查询条件(JSON格式) + */ + private String queryCondition; + } diff --git a/klp-cost/src/main/java/com/klp/cost/domain/vo/CostItemVo.java b/klp-cost/src/main/java/com/klp/cost/domain/vo/CostItemVo.java index c2f29d4c..d7aa837e 100644 --- a/klp-cost/src/main/java/com/klp/cost/domain/vo/CostItemVo.java +++ b/klp-cost/src/main/java/com/klp/cost/domain/vo/CostItemVo.java @@ -55,5 +55,11 @@ public class CostItemVo { @ExcelProperty(value = "备注") private String remark; + /** + * 查询条件(JSON格式) + */ + @ExcelProperty(value = "查询条件(JSON格式)") + private String queryCondition; + } diff --git a/klp-cost/src/main/java/com/klp/cost/service/impl/CostItemServiceImpl.java b/klp-cost/src/main/java/com/klp/cost/service/impl/CostItemServiceImpl.java index 437ff716..ff2bb8d4 100644 --- a/klp-cost/src/main/java/com/klp/cost/service/impl/CostItemServiceImpl.java +++ b/klp-cost/src/main/java/com/klp/cost/service/impl/CostItemServiceImpl.java @@ -65,6 +65,7 @@ public class CostItemServiceImpl implements ICostItemService { lqw.like(StringUtils.isNotBlank(bo.getItemName()), CostItem::getItemName, bo.getItemName()); lqw.eq(StringUtils.isNotBlank(bo.getCategory()), CostItem::getCategory, bo.getCategory()); lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CostItem::getUnit, bo.getUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getQueryCondition()), CostItem::getQueryCondition, bo.getQueryCondition()); return lqw; } diff --git a/klp-cost/src/main/resources/mapper/cost/CostItemMapper.xml b/klp-cost/src/main/resources/mapper/cost/CostItemMapper.xml index fe2965c4..c2b63d28 100644 --- a/klp-cost/src/main/resources/mapper/cost/CostItemMapper.xml +++ b/klp-cost/src/main/resources/mapper/cost/CostItemMapper.xml @@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + From 6044413384009fa763894246c4d9075280b0cd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Sat, 30 May 2026 14:31:20 +0800 Subject: [PATCH 03/29] =?UTF-8?q?fix(wms):=20=E7=BB=9F=E4=B8=80=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E5=8D=95=E5=AF=BC=E5=87=BA=E9=80=BB=E8=BE=91=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=B9=E7=AA=97=E6=8B=A6=E6=88=AA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 替换原有的window.open弹窗导出为a标签下载,解决浏览器拦截弹窗的问题 2. 统一使用Date.now()替代new Date().getTime()优化代码 3. 新增释放URL对象的代码避免内存泄漏 4. 调整线圈页面批量移出发货单按钮的显示条件 --- klp-ui/src/views/wms/coil/panels/base.vue | 2 +- .../wms/delivery/components/DugeWayBill1.vue | 17 +++++++---------- .../wms/delivery/components/DugeWayBill2.vue | 17 +++++++---------- .../wms/delivery/components/ZincWayBill1.vue | 17 +++++++---------- .../views/wms/delivery/components/wayBill.vue | 17 +++++++---------- .../views/wms/delivery/components/wayBill2.vue | 17 +++++++---------- 6 files changed, 36 insertions(+), 51 deletions(-) diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index e5c49d1d..c2c86195 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -103,7 +103,7 @@ 搜索 重置 导出 - 批量移出发货单 diff --git a/klp-ui/src/views/wms/delivery/components/DugeWayBill1.vue b/klp-ui/src/views/wms/delivery/components/DugeWayBill1.vue index 3c97c812..ba9217ad 100644 --- a/klp-ui/src/views/wms/delivery/components/DugeWayBill1.vue +++ b/klp-ui/src/views/wms/delivery/components/DugeWayBill1.vue @@ -477,16 +477,13 @@ export default { const blob = new Blob([pdfBytes], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - this.$message.error('打印失败,请检查浏览器设置'); - // const a = document.createElement('a'); - // a.href = url; - // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`; - // document.body.appendChild(a); - // a.click(); - // document.body.removeChild(a); - } + const a = document.createElement('a'); + a.href = url; + a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); }, async exportExcel() { try { diff --git a/klp-ui/src/views/wms/delivery/components/DugeWayBill2.vue b/klp-ui/src/views/wms/delivery/components/DugeWayBill2.vue index 12281830..ecded388 100644 --- a/klp-ui/src/views/wms/delivery/components/DugeWayBill2.vue +++ b/klp-ui/src/views/wms/delivery/components/DugeWayBill2.vue @@ -475,16 +475,13 @@ export default { const blob = new Blob([pdfBytes], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - this.$message.error('打印失败,请检查浏览器设置'); - // const a = document.createElement('a'); - // a.href = url; - // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`; - // document.body.appendChild(a); - // a.click(); - // document.body.removeChild(a); - } + const a = document.createElement('a'); + a.href = url; + a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); }, async exportExcel() { try { diff --git a/klp-ui/src/views/wms/delivery/components/ZincWayBill1.vue b/klp-ui/src/views/wms/delivery/components/ZincWayBill1.vue index a29d9d7d..c40e9d26 100644 --- a/klp-ui/src/views/wms/delivery/components/ZincWayBill1.vue +++ b/klp-ui/src/views/wms/delivery/components/ZincWayBill1.vue @@ -477,16 +477,13 @@ export default { const blob = new Blob([pdfBytes], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - this.$message.error('打印失败,请检查浏览器设置'); - // const a = document.createElement('a'); - // a.href = url; - // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`; - // document.body.appendChild(a); - // a.click(); - // document.body.removeChild(a); - } + const a = document.createElement('a'); + a.href = url; + a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); }, async exportExcel() { try { diff --git a/klp-ui/src/views/wms/delivery/components/wayBill.vue b/klp-ui/src/views/wms/delivery/components/wayBill.vue index 4d61c7ea..80445ca5 100644 --- a/klp-ui/src/views/wms/delivery/components/wayBill.vue +++ b/klp-ui/src/views/wms/delivery/components/wayBill.vue @@ -476,16 +476,13 @@ export default { const blob = new Blob([pdfBytes], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - this.$message.error('打印失败,请检查浏览器设置'); - // const a = document.createElement('a'); - // a.href = url; - // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`; - // document.body.appendChild(a); - // a.click(); - // document.body.removeChild(a); - } + const a = document.createElement('a'); + a.href = url; + a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); }, async exportExcelByXLSX() { try { diff --git a/klp-ui/src/views/wms/delivery/components/wayBill2.vue b/klp-ui/src/views/wms/delivery/components/wayBill2.vue index d6ba5d21..40d256cd 100644 --- a/klp-ui/src/views/wms/delivery/components/wayBill2.vue +++ b/klp-ui/src/views/wms/delivery/components/wayBill2.vue @@ -475,16 +475,13 @@ export default { const blob = new Blob([pdfBytes], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - this.$message.error('打印失败,请检查浏览器设置'); - // const a = document.createElement('a'); - // a.href = url; - // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`; - // document.body.appendChild(a); - // a.click(); - // document.body.removeChild(a); - } + const a = document.createElement('a'); + a.href = url; + a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); }, async exportExcelByXLSX() { try { From 6a5220ad787442856ae9a57106368ba24e18957c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Sat, 30 May 2026 15:05:43 +0800 Subject: [PATCH 04/29] =?UTF-8?q?feat(mes/roll/grind):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8E=82=E5=AE=B6=E6=90=9C=E7=B4=A2=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E5=92=8CCR=E7=B1=BB=E5=9E=8B=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增厂家搜索输入框和筛选逻辑 2. 新增CR类型的单选筛选按钮 3. 在辊子列表中展示厂家信息 4. 优化有效当前辊径的默认返回逻辑 --- klp-ui/src/views/mes/roll/grind/index.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/klp-ui/src/views/mes/roll/grind/index.vue b/klp-ui/src/views/mes/roll/grind/index.vue index 51d66b9a..179a738b 100644 --- a/klp-ui/src/views/mes/roll/grind/index.vue +++ b/klp-ui/src/views/mes/roll/grind/index.vue @@ -27,10 +27,13 @@
+ 全部 WR BR + CR
@@ -47,6 +50,7 @@ {{ statusLabel(r.status) }} φ{{ r.currentDia != null ? r.currentDia : r.initialDia }} +
{{ r.manufacturer }}
{{ r.lineName }}
暂无数据
@@ -260,6 +264,7 @@ export default { filteredRolls: [], filterNo: '', filterType: '', + filterManufacturer: '', // 右侧选中辊 selectedRollId: null, @@ -301,9 +306,9 @@ export default { // 有效当前辊径:优先取 currentDia,无则取最新磨削记录的磨后径 effectiveCurrentDia() { - if (this.selectedRoll && this.selectedRoll.currentDia != null) { - return parseFloat(this.selectedRoll.currentDia) - } + // if (this.selectedRoll && this.selectedRoll.currentDia != null) { + // return parseFloat(this.selectedRoll.currentDia) + // } if (this.grindList.length > 0) { const latest = [...this.grindList].sort((a, b) => { const ta = a.grindTime ? new Date(a.grindTime).getTime() : 0 @@ -311,6 +316,8 @@ export default { return tb - ta })[0] if (latest && latest.diaAfter != null) return parseFloat(latest.diaAfter) + } else { + return null } return null }, @@ -363,7 +370,8 @@ export default { this.filteredRolls = this.allRolls.filter(r => { const matchNo = !this.filterNo || r.rollNo.includes(this.filterNo) const matchType = !this.filterType || r.rollType === this.filterType - return matchNo && matchType + const matchMfr = !this.filterManufacturer || (r.manufacturer || '').toLowerCase().includes(this.filterManufacturer.toLowerCase()) + return matchNo && matchType && matchMfr }) }, selectRoll(r) { @@ -545,6 +553,7 @@ export default { .ri-no { font-family: 'Consolas', monospace; font-size: 13px; font-weight: 600; color: #1f2329; } .ri-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; } .ri-dia { font-size: 11px; color: #9aa0a6; } +.ri-manufacturer { font-size: 10px; color: #909399; margin-top: 2px; } .ri-line { font-size: 10px; color: #b0b3bb; margin-top: 2px; } .ri-status { font-size: 11px; } .roll-empty { text-align: center; color: #c0c4cc; padding: 20px 0; font-size: 12px; } From 62da44382a4f17fc426fff00ab5ddb3fb49bc8ad Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 30 May 2026 17:38:13 +0800 Subject: [PATCH 05/29] =?UTF-8?q?fix(wms/attendance):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8D=88=E4=BC=91=E6=89=93=E5=8D=A1=E6=A8=A1=E5=BC=8F=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 重构打卡记录分割逻辑,将原简单中值法改为基于时间区间和间隔检测的智能分割 2. 新增午休打卡模式检测:支持区间内长间隔、提前下班+午饭回来、午休晚归三种场景识别 3. 当检测到午休打卡模式时,按实际打卡间隔进行合理分割;未检测到时回退使用原中值法 4. 提升考勤统计的准确性,避免因午休打卡时间分布不均导致的上下班时段误判 --- .../impl/WmsAttendanceCheckServiceImpl.java | 91 +++++++++++++++++-- 1 file changed, 82 insertions(+), 9 deletions(-) diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsAttendanceCheckServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsAttendanceCheckServiceImpl.java index d1c51848..dfd4f3df 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsAttendanceCheckServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsAttendanceCheckServiceImpl.java @@ -386,18 +386,91 @@ public class WmsAttendanceCheckServiceImpl implements IWmsAttendanceCheckService if (hasPeriod2) { LocalTime p1End = toLocalTime(schedule.getShiftEndTime()); LocalTime p2Start = toLocalTime(schedule.getShiftStartTime2()); - LocalTime split = LocalTime.of( - (p1End.getHour() + p2Start.getHour()) / 2, - (p1End.getMinute() + p2Start.getMinute()) / 2); + + // 按理论时间范围分割:p1End之前、中间区间、p2Start之后 + List beforeGap = new ArrayList<>(); + List inGap = new ArrayList<>(); + List afterGap = new ArrayList<>(); + for (AttendanceRecords r : records) { + LocalTime t = toLocalDateTime(r.getChecktime()).toLocalTime(); + if (!t.isAfter(p1End)) { + beforeGap.add(r); + } else if (!t.isBefore(p2Start)) { + afterGap.add(r); + } else { + inGap.add(r); + } + } List p1Records = new ArrayList<>(); List p2Records = new ArrayList<>(); - for (AttendanceRecords r : records) { - LocalTime t = toLocalDateTime(r.getChecktime()).toLocalTime(); - if (t.isBefore(split)) { - p1Records.add(r); - } else { - p2Records.add(r); + boolean lunchPatternFound = false; + + // 检测[p1End, p2Start]区间内是否有午休打卡(取最远两条判断>10分钟,按最大连续间隔切开) + if (inGap.size() >= 2) { + LocalDateTime firstInGap = toLocalDateTime(inGap.get(0).getChecktime()); + LocalDateTime lastInGap = toLocalDateTime(inGap.get(inGap.size() - 1).getChecktime()); + if (Duration.between(firstInGap, lastInGap).getSeconds() > 600) { + int splitIdx = 0; + long maxGap = 0; + for (int i = 0; i < inGap.size() - 1; i++) { + LocalDateTime t1 = toLocalDateTime(inGap.get(i).getChecktime()); + LocalDateTime t2 = toLocalDateTime(inGap.get(i + 1).getChecktime()); + long gap = Duration.between(t1, t2).getSeconds(); + if (gap > maxGap) { + maxGap = gap; + splitIdx = i; + } + if (gap > 600) { + break; + } + } + p1Records = new ArrayList<>(beforeGap); + p1Records.addAll(inGap.subList(0, splitIdx + 1)); + p2Records = new ArrayList<>(inGap.subList(splitIdx + 1, inGap.size())); + p2Records.addAll(afterGap); + lunchPatternFound = true; + } + } + + // 检测边界:beforeGap最后一条 与 inGap第一条 间隔>10分钟(提前下班+午饭回来) + if (!lunchPatternFound && !beforeGap.isEmpty() && !inGap.isEmpty()) { + LocalDateTime lastBefore = toLocalDateTime(beforeGap.get(beforeGap.size() - 1).getChecktime()); + LocalDateTime firstIn = toLocalDateTime(inGap.get(0).getChecktime()); + if (Duration.between(lastBefore, firstIn).getSeconds() > 600) { + p1Records = new ArrayList<>(beforeGap); + p2Records = new ArrayList<>(inGap); + p2Records.addAll(afterGap); + lunchPatternFound = true; + } + } + + // 检测边界:inGap最后一条 与 afterGap第一条 间隔>10分钟(午休晚归) + if (!lunchPatternFound && !inGap.isEmpty() && !afterGap.isEmpty()) { + LocalDateTime lastIn = toLocalDateTime(inGap.get(inGap.size() - 1).getChecktime()); + LocalDateTime firstAfter = toLocalDateTime(afterGap.get(0).getChecktime()); + if (Duration.between(lastIn, firstAfter).getSeconds() > 600) { + p1Records = new ArrayList<>(beforeGap); + p1Records.addAll(inGap); + p2Records = new ArrayList<>(afterGap); + lunchPatternFound = true; + } + } + + if (!lunchPatternFound) { + // 没有午休打卡模式,回退原中值法 + LocalTime split = LocalTime.of( + (p1End.getHour() + p2Start.getHour()) / 2, + (p1End.getMinute() + p2Start.getMinute()) / 2); + p1Records = new ArrayList<>(); + p2Records = new ArrayList<>(); + for (AttendanceRecords r : records) { + LocalTime t = toLocalDateTime(r.getChecktime()).toLocalTime(); + if (t.isBefore(split)) { + p1Records.add(r); + } else { + p2Records.add(r); + } } } From 9af5284ff3a1d7c02ff4f0483d839ad4d0a19e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Sat, 30 May 2026 18:00:01 +0800 Subject: [PATCH 06/29] =?UTF-8?q?feat:=20=E5=A4=9A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=E4=B8=8E=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/views/cost/item.vue | 48 ++++++++++-- .../views/mes/qc/certificate/chemistry.vue | 74 +++++++++++++++++-- .../src/views/mes/qc/certificate/physics.vue | 42 +++++++++-- klp-ui/src/views/wms/coil/panels/base.vue | 8 +- .../wms/delivery/components/DugeWayBill1.vue | 3 +- .../wms/delivery/components/DugeWayBill2.vue | 3 +- .../wms/delivery/components/ZincWayBill1.vue | 3 +- .../wms/delivery/components/ZincWayBill2.vue | 21 +++--- .../views/wms/delivery/components/wayBill.vue | 3 +- .../wms/delivery/components/wayBill2.vue | 3 +- 10 files changed, 172 insertions(+), 36 deletions(-) diff --git a/klp-ui/src/views/cost/item.vue b/klp-ui/src/views/cost/item.vue index 6cf80dcc..aacacbad 100644 --- a/klp-ui/src/views/cost/item.vue +++ b/klp-ui/src/views/cost/item.vue @@ -17,13 +17,22 @@ @keyup.enter.native="handleQuery" /> - - + + @change="handleQuery" + > + + + + + + + + + + + + 搜索 重置 @@ -86,9 +103,10 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :items="printItemsData" :template-type="selectedTemplateType" /> + + + +
+ + +
+ + {{ option.label }} +
+
+
+
+ +
@@ -347,6 +445,7 @@ import { listChemicalItem } from "@/api/mes/qc/chemicalItem"; import { listPhysicalItem } from "@/api/mes/qc/physicalItem"; import CoilSelector from "@/components/CoilSelector/index.vue"; import CertificatePrintPreview from "./components/CertificatePrintPreview.vue"; +import { templateOptions } from "./components/templates"; import { print as printPdf } from "./lib/printUtils"; export default { @@ -362,6 +461,7 @@ export default { }, data() { return { + templateOptions, buttonLoading: false, loading: false, certificateLoading: false, @@ -380,6 +480,9 @@ export default { printComponentVisible: false, printCertificateData: {}, printItemsData: [], + templateDialogVisible: false, + selectedTemplateType: 'chromium', + templateDialogResolve: null, certificateForm: { certificateNo: '', contractNo: '', @@ -527,13 +630,15 @@ export default { ]); const chem = chemRes.rows && chemRes.rows[0] || {}; const phys = physRes.rows && physRes.rows[0] || {}; - const { c, si, mn, p, s, als, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus } = { ...chem, ...phys }; - return { c, si, mn, p, s, als, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus }; + const { c, si, mn, p, s, als, al, ti, cr, ni, cu, n, fe, b } = chem; + const { yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus, plasticExtensionStrength, coatingSurfaceStructure, coatingMass, coating, surfaceTreatment, zincCoatingWeight } = phys; + return { c, si, mn, p, s, als, al, ti, cr, ni, cu, n, fe, b, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus, plasticExtensionStrength, coatingSurfaceStructure, coatingMass, coating, surfaceTreatment, zincCoatingWeight }; }, async handleCoilSelect(row) { if (this.currentEditRow) { const editRow = this.currentEditRow; editRow.coilNo = row.currentCoilNo; + editRow.materialNo = row.enterCoilNo; editRow.materialType = row.material; editRow.size = row.specification; editRow.weight = row.netWeight; @@ -718,6 +823,9 @@ export default { }); }, async handlePrint() { + const confirmed = await this.showTemplateDialog(); + if (!confirmed) return; + this.printCertificateData = this.currentCertificateInfo; this.printItemsData = this.certificateItemList || []; this.$nextTick(() => { @@ -725,6 +833,19 @@ export default { console.log(el); printPdf(el); }); + }, + showTemplateDialog() { + return new Promise((resolve) => { + this.templateDialogResolve = resolve; + this.templateDialogVisible = true; + }); + }, + confirmTemplate() { + this.templateDialogVisible = false; + if (this.templateDialogResolve) { + this.templateDialogResolve(true); + this.templateDialogResolve = null; + } } } }; @@ -899,4 +1020,46 @@ export default { ::v-deep .el-table .cell { padding: 0; } + +.template-selection { + padding: 20px; +} + +.template-radio-group { + display: flex; + flex-direction: column; + gap: 15px; +} + +.template-radio { + display: flex; + align-items: center; + margin: 0; + padding: 15px; + border: 1px solid #e4e7ed; + border-radius: 8px; + transition: all 0.3s ease; +} + +.template-radio:hover { + border-color: #409eff; + background-color: #ecf5ff; +} + +.template-radio.is-checked { + border-color: #409eff; + background-color: #ecf5ff; +} + +.template-option { + display: flex; + align-items: center; + gap: 10px; + font-size: 14px; +} + +.template-option i { + font-size: 20px; + color: #409eff; +} diff --git a/klp-ui/src/views/wms/coil/components/CoilInfo.vue b/klp-ui/src/views/wms/coil/components/CoilInfo.vue index f5f6dc7d..b0bf216b 100644 --- a/klp-ui/src/views/wms/coil/components/CoilInfo.vue +++ b/klp-ui/src/views/wms/coil/components/CoilInfo.vue @@ -1,20 +1,16 @@