From a91ee6d956d689cbf41f6700a21be887a68cf526 Mon Sep 17 00:00:00 2001
From: Joshi <3040996759@qq.com>
Date: Wed, 20 May 2026 14:26:55 +0800
Subject: [PATCH 1/9] =?UTF-8?q?feat(WmsMaterialCoil):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=8D=B7=E6=96=99=E6=8A=A5=E8=A1=A8=E4=B8=AD=E7=9A=84=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 WmsMaterialCoilMapper.xml 查询中新增 createTime 字段映射
- 在 WmsMaterialCoilReportVo 中添加 createTime 属性
- 更新数据库查询以包含卷料创建时间信息
- 为报表功能提供更完整的时间维度数据支持
---
.../main/java/com/klp/domain/vo/WmsMaterialCoilReportVo.java | 2 ++
.../src/main/resources/mapper/klp/WmsMaterialCoilMapper.xml | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/klp-wms/src/main/java/com/klp/domain/vo/WmsMaterialCoilReportVo.java b/klp-wms/src/main/java/com/klp/domain/vo/WmsMaterialCoilReportVo.java
index 9c8238f8..92ef015c 100644
--- a/klp-wms/src/main/java/com/klp/domain/vo/WmsMaterialCoilReportVo.java
+++ b/klp-wms/src/main/java/com/klp/domain/vo/WmsMaterialCoilReportVo.java
@@ -24,4 +24,6 @@ public class WmsMaterialCoilReportVo {
// 班组
private String team;
+ // 创建时间
+ private String createTime;
}
diff --git a/klp-wms/src/main/resources/mapper/klp/WmsMaterialCoilMapper.xml b/klp-wms/src/main/resources/mapper/klp/WmsMaterialCoilMapper.xml
index 5a81ff2e..c3d1f987 100644
--- a/klp-wms/src/main/resources/mapper/klp/WmsMaterialCoilMapper.xml
+++ b/klp-wms/src/main/resources/mapper/klp/WmsMaterialCoilMapper.xml
@@ -481,7 +481,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mc.net_weight AS netWeight,
mc.warehouse_id AS warehouseId,
mc.quality_status AS qualityStatus,
- mc.team AS team
+ mc.team AS team,
+ mc.create_time AS createTime
FROM wms_material_coil mc
LEFT JOIN wms_raw_material rm ON mc.item_type = 'raw_material' AND mc.item_id = rm.raw_material_id
LEFT JOIN wms_product p ON mc.item_type = 'product' AND mc.item_id = p.product_id
From 7b75940258e440fdbb63f5052f723ea9e0cd5afa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Thu, 21 May 2026 08:59:44 +0800
Subject: [PATCH 2/9] =?UTF-8?q?feat(wms):=20=E5=A4=9A=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 新增镀锌待打包仓库选项
2. 注释发货单为空打印校验逻辑
3. 优化钢卷查询API参数处理
4. 调整报表接口调用与数据解析
5. 移除发货单模板中的原料厂家列
---
klp-ui/src/api/wms/coil.js | 12 +-
.../views/wms/delivery/components/wayBill.vue | 78 +++++-----
.../wms/delivery/components/wayBill2.vue | 137 +++++++++---------
.../src/views/wms/delivery/waybill/index.vue | 10 +-
klp-ui/src/views/wms/report/js/config.js | 1 +
klp-ui/src/views/wms/report/js/fetch.js | 32 ++--
.../src/views/wms/report/template/action.vue | 12 +-
7 files changed, 144 insertions(+), 138 deletions(-)
diff --git a/klp-ui/src/api/wms/coil.js b/klp-ui/src/api/wms/coil.js
index 101254be..1731c628 100644
--- a/klp-ui/src/api/wms/coil.js
+++ b/klp-ui/src/api/wms/coil.js
@@ -188,10 +188,16 @@ export function exportCoilData(coilIds) {
// 报表查询使用的post类型的查询,查询所有符合条件的钢卷
export function listCoilWithIds(data) {
+ // 如果存在pageSize, 或者pageNum, 将其放入params中
+ const { pageSize, pageNum, ...rest } = data
return request({
url: '/wms/materialCoil/listByPost',
method: 'post',
- data,
+ data: rest,
+ params: {
+ pageSize,
+ pageNum,
+ },
timeout: 600000
})
}
@@ -478,8 +484,8 @@ export function excludeLock(coilId) {
export function listLightCoil(data) {
return request({
url: '/wms/materialCoil/listForReport',
- method: 'get',
+ method: 'post',
timeout: 600000,
- params: data
+ data: data
})
}
\ No newline at end of file
diff --git a/klp-ui/src/views/wms/delivery/components/wayBill.vue b/klp-ui/src/views/wms/delivery/components/wayBill.vue
index 12328983..4d61c7ea 100644
--- a/klp-ui/src/views/wms/delivery/components/wayBill.vue
+++ b/klp-ui/src/views/wms/delivery/components/wayBill.vue
@@ -56,7 +56,7 @@
包装 |
仓库位置 |
结算 |
- 原料厂家 |
+
卷号 |
规格 |
材质 |
@@ -68,13 +68,13 @@
-
+
|
@@ -92,9 +92,9 @@
|
{{ item.settlementType }}
|
-
+
|
{{ item.coilNumber }}
|
@@ -120,7 +120,7 @@
|
|
|
- |
+
|
|
|
@@ -508,7 +508,7 @@ export default {
undefined, undefined,
`车牌:${this.localWaybill.licensePlate || ''}`
], // 负责人/订单号/合同号/车牌行(r=2)
- ["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '单价', '备注'], // 表格表头(r=3)
+ ["品名", '切边', '包装', '仓库位置', '结算', '卷号', '规格', '材质', '重量(t)', '单价', '备注'], // 表格表头(r=3)
];
// 表格明细行(替换原有E1/F1等占位符,使用真实明细)
@@ -518,7 +518,7 @@ export default {
item.packageType || '',
item.actualWarehouseName || '',
item.settlementType || '',
- item.rawMaterialFactory || '',
+ // item.rawMaterialFactory || '',
item.coilNumber || '',
item.specification || '',
item.material || '',
@@ -578,7 +578,7 @@ export default {
{ wpx: 50 }, // 包装
{ wpx: 90 }, // 仓库位置
{ wpx: 60 }, // 结算
- { wpx: 70 }, // 原料厂家
+ // { wpx: 70 }, // 原料厂家
{ wpx: 110 }, // 卷号
{ wpx: 90 }, // 规格
{ wpx: 80 }, // 材质
@@ -756,14 +756,14 @@ export default {
contract: `合同号:${this.localWaybill.contractCode || ''}`,
license: `车牌:${this.localWaybill.licensePlate || ''}`
};
- const tableHeader = ["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '单价', '备注']; // 表格表头
+ const tableHeader = ["品名", '切边', '包装', '仓库位置', '结算', '卷号', '规格', '材质', '重量(t)', '单价', '备注']; // 表格表头
const tableData = this.displayWaybillDetails.map(item => [ // 表格明细
item.productName || '',
item.edgeType || '',
item.packageType || '',
item.actualWarehouseName || '',
item.settlementType || '',
- item.rawMaterialFactory || '',
+ // item.rawMaterialFactory || '',
item.coilNumber || '',
item.specification || '',
item.material || '',
@@ -784,25 +784,25 @@ export default {
// 3.1 标题行(第1行)
const titleCell = worksheet.getCell(`A${rowIdx}`);
titleCell.value = title;
- worksheet.mergeCells(`A${rowIdx}:L${rowIdx}`); // 合并A1-L1
+ worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A1-K1
// 3.2 收货单位行(第2行)
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = header1.consignee;
worksheet.getCell(`E${rowIdx}`).value = header1.date;
- worksheet.getCell(`I${rowIdx}`).value = header1.sender;
+ worksheet.getCell(`H${rowIdx}`).value = header1.sender;
worksheet.mergeCells(`A${rowIdx}:D${rowIdx}`); // 收货单位:A2-D2
- worksheet.mergeCells(`E${rowIdx}:H${rowIdx}`); // 日期:E2-H2
- worksheet.mergeCells(`I${rowIdx}:L${rowIdx}`); // 发货单位:I2-L2
+ worksheet.mergeCells(`E${rowIdx}:G${rowIdx}`); // 日期:E2-G2
+ worksheet.mergeCells(`H${rowIdx}:K${rowIdx}`); // 发货单位:H2-K2
// 3.3 负责人行(第3行)
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = header2.principal;
worksheet.getCell(`D${rowIdx}`).value = header2.phone;
worksheet.getCell(`G${rowIdx}`).value = header2.contract;
- worksheet.getCell(`J${rowIdx}`).value = header2.license;
+ worksheet.getCell(`I${rowIdx}`).value = header2.license;
worksheet.mergeCells(`A${rowIdx}:C${rowIdx}`); // 负责人:A3-C3
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 订单号:D3-F3
- worksheet.mergeCells(`G${rowIdx}:I${rowIdx}`); // 合同号:G3-I3
- worksheet.mergeCells(`J${rowIdx}:L${rowIdx}`); // 车牌:J3-L3
+ worksheet.mergeCells(`G${rowIdx}:H${rowIdx}`); // 合同号:G3-H3
+ worksheet.mergeCells(`I${rowIdx}:K${rowIdx}`); // 车牌:I3-K3
// 3.4 表格表头(第4行)
rowIdx++;
tableHeader.forEach((text, colIdx) => {
@@ -821,12 +821,12 @@ export default {
rowIdx++;
const remarkCell = worksheet.getCell(`A${rowIdx}`);
remarkCell.value = remark;
- worksheet.mergeCells(`A${rowIdx}:L${rowIdx}`); // 合并A*_L*
+ worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A*_L*
// 3.7 取货地点行
rowIdx++;
const pickupCell = worksheet.getCell(`A${rowIdx}`);
pickupCell.value = pickupLocation;
- worksheet.mergeCells(`A${rowIdx}:L${rowIdx}`); // 合并A*_L*
+ worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A*_L*
// 3.8 签名栏行
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = footer.deliveryman;
@@ -834,10 +834,10 @@ export default {
worksheet.getCell(`I${rowIdx}`).value = footer.weightRoom;
worksheet.mergeCells(`A${rowIdx}:D${rowIdx}`); // 发货:A*_D*
worksheet.mergeCells(`E${rowIdx}:H${rowIdx}`); // 司机:E*_H*
- worksheet.mergeCells(`I${rowIdx}:L${rowIdx}`); // 磅房:I*_L*
+ worksheet.mergeCells(`I${rowIdx}:K${rowIdx}`); // 磅房:I*_L*
// 4. 配置列宽(完全匹配Web端)
- const columnWidths = [70, 60, 50, 90, 70, 70, 110, 90, 80, 70, 50, 60];
+ const columnWidths = [70, 60, 50, 90, 70, 110, 90, 80, 70, 50, 60];
worksheet.columns = columnWidths.map((width, idx) => ({
key: `col${idx + 1}`,
width: width / 5 // exceljs的width单位是字符宽度,转换为px(约1px=0.072字符)
@@ -881,13 +881,13 @@ export default {
setCellStyle(worksheet.getCell(`G3`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`J3`), { size: 18, border: false });
// 5.3 表格表头样式(16px、宋体、加粗、居中、带边框)
- for (let col = 0; col < 12; col++) {
+ for (let col = 0; col < 11; col++) {
const colLetter = String.fromCharCode(65 + col);
setCellStyle(worksheet.getCell(`${colLetter}4`), { size: 16, border: true, horizontal: 'center' });
}
// 5.4 表格明细样式(16px、宋体、加粗、居中、带边框)
for (let r = 5; r < rowIdx - 2; r++) { // 明细行范围:第5行到备注行前一行
- for (let col = 0; col < 12; col++) {
+ for (let col = 0; col < 11; col++) {
const colLetter = String.fromCharCode(65 + col);
setCellStyle(worksheet.getCell(`${colLetter}${r}`), { size: 16, border: true, horizontal: 'center' });
}
@@ -1108,26 +1108,26 @@ export default {
/* 结算 */
}
-.waybill-table th:nth-child(6),
+/* 原料厂家 */
+/* .waybill-table th:nth-child(6),
.waybill-table td:nth-child(6) {
width: 70px;
- /* 原料厂家 */
-}
+} */
-.waybill-table th:nth-child(7),
-.waybill-table td:nth-child(7) {
+.waybill-table th:nth-child(6),
+.waybill-table td:nth-child(6) {
width: 110px;
/* 卷号 */
}
-.waybill-table th:nth-child(8),
-.waybill-table td:nth-child(8) {
+.waybill-table th:nth-child(7),
+.waybill-table td:nth-child(7) {
width: 90px;
/* 规格 */
}
-.waybill-table th:nth-child(9),
-.waybill-table td:nth-child(9) {
+.waybill-table th:nth-child(8),
+.waybill-table td:nth-child(8) {
width: 80px;
/* 材质 */
}
@@ -1140,21 +1140,21 @@ export default {
} */
/* 重量(kg) */
-.waybill-table th:nth-child(10),
-.waybill-table td:nth-child(10) {
+.waybill-table th:nth-child(9),
+.waybill-table td:nth-child(9) {
width: 70px;
}
/* 单价 */
-.waybill-table th:nth-child(11),
-.waybill-table td:nth-child(11) {
+.waybill-table th:nth-child(10),
+.waybill-table td:nth-child(10) {
width: 50px;
}
/* 备注 */
-.waybill-table th:nth-child(12),
-.waybill-table td:nth-child(12) {
+.waybill-table th:nth-child(11),
+.waybill-table td:nth-child(11) {
/* width: 40px; */
}
diff --git a/klp-ui/src/views/wms/delivery/components/wayBill2.vue b/klp-ui/src/views/wms/delivery/components/wayBill2.vue
index 3afe63e4..d6ba5d21 100644
--- a/klp-ui/src/views/wms/delivery/components/wayBill2.vue
+++ b/klp-ui/src/views/wms/delivery/components/wayBill2.vue
@@ -56,7 +56,7 @@
包装 |
仓库位置 |
结算 |
- 原料厂家 |
+
卷号 |
规格 |
材质 |
@@ -68,13 +68,13 @@
-
+
|
@@ -92,9 +92,9 @@
|
{{ item.settlementType }}
|
-
+
|
{{ item.coilNumber }}
|
@@ -120,7 +120,7 @@
|
|
|
- |
+
|
|
|
@@ -128,7 +128,6 @@
|
-
|
|
@@ -508,22 +507,22 @@ export default {
undefined,
`车牌:${this.localWaybill.licensePlate || ''}`
], // 负责人/订单号/合同号/车牌行(r=2)
- ["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '备注'], // 表格表头(r=3,11列)
+ ["品名", '切边', '包装', '仓库位置', '结算', '卷号', '规格', '材质', '重量(t)', '备注'], // 表格表头(r=3,10列)
];
- // 表格明细行(确保11列)
+ // 表格明细行(确保10列)
const detailRows = this.displayWaybillDetails.map(item => [
item.productName || '',
item.edgeType || '',
item.packageType || '',
item.actualWarehouseName || '',
item.settlementType || '',
- item.rawMaterialFactory || '',
+ // item.rawMaterialFactory || '',
item.coilNumber || '',
item.specification || '',
item.material || '',
item.weight || '',
- item.remark || '' // 第11列:备注,无多余列
+ item.remark || '' // 第10列:备注,无多余列
]);
// 底部备注/取货地点/签名栏(确保列数匹配)
@@ -555,34 +554,34 @@ export default {
const ws = XLSX.utils.aoa_to_sheet(data);
ws["!cellStyles"] = true;
ws["!merges"] = [
- { s: { c: 0, r: titleRowIdx }, e: { c: 10, r: titleRowIdx } }, // 标题合并0-10列(无多余)
+ { s: { c: 0, r: titleRowIdx }, e: { c: 9, r: titleRowIdx } }, // 标题合并0-9列(无多余)
{ s: { c: 0, r: headerRow1Idx }, e: { c: 3, r: headerRow1Idx } }, // 收货单位(0-3)
- { s: { c: 4, r: headerRow1Idx }, e: { c: 6, r: headerRow1Idx } }, // 日期(4-7)
- { s: { c: 8, r: headerRow1Idx }, e: { c: 10, r: headerRow1Idx } }, // 发货单位(8-10,无多余)
+ { s: { c: 4, r: headerRow1Idx }, e: { c: 6, r: headerRow1Idx } }, // 日期(4-6)
+ { s: { c: 7, r: headerRow1Idx }, e: { c: 9, r: headerRow1Idx } }, // 发货单位(7-9,无多余)
{ s: { c: 0, r: headerRow2Idx }, e: { c: 2, r: headerRow2Idx } }, // 负责人(0-2)
{ s: { c: 3, r: headerRow2Idx }, e: { c: 5, r: headerRow2Idx } }, // 订单号(3-5)
- { s: { c: 6, r: headerRow2Idx }, e: { c: 7, r: headerRow2Idx } }, // 合同号(6-8)
- { s: { c: 9, r: headerRow2Idx }, e: { c: 10, r: headerRow2Idx } }, // 车牌(9-10,无多余)
- { s: { c: 0, r: remarkRowIdx }, e: { c: 10, r: remarkRowIdx } }, // 备注合并0-10列
- { s: { c: 0, r: pickupRowIdx }, e: { c: 10, r: pickupRowIdx } }, // 取货地点合并0-10列
+ { s: { c: 6, r: headerRow2Idx }, e: { c: 7, r: headerRow2Idx } }, // 合同号(6-7)
+ { s: { c: 8, r: headerRow2Idx }, e: { c: 9, r: headerRow2Idx } }, // 车牌(8-9,无多余)
+ { s: { c: 0, r: remarkRowIdx }, e: { c: 9, r: remarkRowIdx } }, // 备注合并0-9列
+ { s: { c: 0, r: pickupRowIdx }, e: { c: 9, r: pickupRowIdx } }, // 取货地点合并0-9列
{ s: { c: 0, r: footerRowIdx }, e: { c: 3, r: footerRowIdx } }, // 发货(0-3)
- { s: { c: 4, r: footerRowIdx }, e: { c: 6, r: footerRowIdx } }, // 司机(4-7)
- { s: { c: 8, r: footerRowIdx }, e: { c: 10, r: footerRowIdx } }, // 磅房(8-10,无多余)
+ { s: { c: 4, r: footerRowIdx }, e: { c: 6, r: footerRowIdx } }, // 司机(4-6)
+ { s: { c: 7, r: footerRowIdx }, e: { c: 9, r: footerRowIdx } }, // 磅房(7-9,无多余)
];
- // ===== 3. 配置列宽(仅11列,对应0-10索引)=====
+ // ===== 3. 配置列宽(仅10列,对应0-9索引)=====
ws['!cols'] = [
{ wpx: 70 }, // 品名(0)
{ wpx: 40 }, // 切边(1)
{ wpx: 50 }, // 包装(2)
{ wpx: 90 }, // 仓库位置(3)
{ wpx: 60 }, // 结算(4)
- { wpx: 70 }, // 原料厂家(5)
- { wpx: 150 }, // 卷号(6)
- { wpx: 90 }, // 规格(7)
- { wpx: 80 }, // 材质(8)
- { wpx: 70 }, // 重量(t)(9)
- { wpx: 130 }, // 备注(10)→ 最后一列,无多余
+ // { wpx: 70 }, // 原料厂家(5)
+ { wpx: 150 }, // 卷号(5)
+ { wpx: 90 }, // 规格(6)
+ { wpx: 80 }, // 材质(7)
+ { wpx: 70 }, // 重量(t)(8)
+ { wpx: 130 }, // 备注(9)→ 最后一列,无多余
];
// ===== 4. 单元格样式配置(无修改)=====
@@ -621,11 +620,11 @@ export default {
const headerCells = [
XLSX.utils.encode_cell({ r: headerRow1Idx, c: 0 }),
XLSX.utils.encode_cell({ r: headerRow1Idx, c: 4 }),
- XLSX.utils.encode_cell({ r: headerRow1Idx, c: 8 }),
+ XLSX.utils.encode_cell({ r: headerRow1Idx, c: 7 }),
XLSX.utils.encode_cell({ r: headerRow2Idx, c: 0 }),
XLSX.utils.encode_cell({ r: headerRow2Idx, c: 3 }),
XLSX.utils.encode_cell({ r: headerRow2Idx, c: 6 }),
- XLSX.utils.encode_cell({ r: headerRow2Idx, c: 9 }),
+ XLSX.utils.encode_cell({ r: headerRow2Idx, c: 8 }),
];
headerCells.forEach(cellAddr => {
if (ws[cellAddr]) {
@@ -639,7 +638,7 @@ export default {
});
// 表格表头
- for (let c = 0; c < 11; c++) { // 仅循环0-10列
+ for (let c = 0; c < 10; c++) { // 仅循环0-9列
const cellAddr = XLSX.utils.encode_cell({ r: tableHeaderIdx, c });
if (ws[cellAddr]) {
ws[cellAddr].s = createCellStyle({ sz: 16 });
@@ -648,7 +647,7 @@ export default {
// 表格明细行
for (let r = tableHeaderIdx + 1; r < remarkRowIdx; r++) {
- for (let c = 0; c < 11; c++) { // 仅循环0-10列
+ for (let c = 0; c < 10; c++) { // 仅循环0-9列
const cellAddr = XLSX.utils.encode_cell({ r, c });
if (ws[cellAddr]) {
ws[cellAddr].s = createCellStyle({ sz: 16 });
@@ -683,7 +682,7 @@ export default {
const footerCells = [
XLSX.utils.encode_cell({ r: footerRowIdx, c: 0 }),
XLSX.utils.encode_cell({ r: footerRowIdx, c: 4 }),
- XLSX.utils.encode_cell({ r: footerRowIdx, c: 8 }),
+ XLSX.utils.encode_cell({ r: footerRowIdx, c: 7 }),
];
footerCells.forEach(cellAddr => {
if (ws[cellAddr]) {
@@ -747,14 +746,14 @@ export default {
contract: `合同号:${this.localWaybill.contractCode || ''}`,
license: `车牌:${this.localWaybill.licensePlate || ''}`
};
- const tableHeader = ["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '备注']; // 表格表头
- const tableData = this.displayWaybillDetails.map(item => [ // 表格明细
+ const tableHeader = ["品名", '切边', '包装', '仓库位置', '结算', '卷号', '规格', '材质', '重量(t)', '备注']; // 表格表头(10列)
+ const tableData = this.displayWaybillDetails.map(item => [ // 表格明细(10列)
item.productName || '',
item.edgeType || '',
item.packageType || '',
item.actualWarehouseName || '',
item.settlementType || '',
- item.rawMaterialFactory || '',
+ // item.rawMaterialFactory || '',
item.coilNumber || '',
item.specification || '',
item.material || '',
@@ -775,25 +774,25 @@ export default {
// 3.1 标题行(第1行)
const titleCell = worksheet.getCell(`A${rowIdx}`);
titleCell.value = title;
- worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A1-K1
+ worksheet.mergeCells(`A${rowIdx}:J${rowIdx}`); // 合并A1-J1(10列)
// 3.2 收货单位行(第2行)
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = header1.consignee;
worksheet.getCell(`E${rowIdx}`).value = header1.date;
- worksheet.getCell(`I${rowIdx}`).value = header1.sender;
+ worksheet.getCell(`H${rowIdx}`).value = header1.sender;
worksheet.mergeCells(`A${rowIdx}:D${rowIdx}`); // 收货单位:A2-D2
- worksheet.mergeCells(`E${rowIdx}:H${rowIdx}`); // 日期:E2-H2
- worksheet.mergeCells(`I${rowIdx}:K${rowIdx}`); // 发货单位:I2-L2
+ worksheet.mergeCells(`E${rowIdx}:G${rowIdx}`); // 日期:E2-G2
+ worksheet.mergeCells(`H${rowIdx}:J${rowIdx}`); // 发货单位:H2-J2(10列)
// 3.3 负责人行(第3行)
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = header2.principal;
worksheet.getCell(`D${rowIdx}`).value = header2.phone;
worksheet.getCell(`G${rowIdx}`).value = header2.contract;
- worksheet.getCell(`J${rowIdx}`).value = header2.license;
+ worksheet.getCell(`I${rowIdx}`).value = header2.license;
worksheet.mergeCells(`A${rowIdx}:C${rowIdx}`); // 负责人:A3-C3
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 订单号:D3-F3
- worksheet.mergeCells(`G${rowIdx}:I${rowIdx}`); // 合同号:G3-I3
- worksheet.mergeCells(`J${rowIdx}:K${rowIdx}`); // 车牌:J3-L3
+ worksheet.mergeCells(`G${rowIdx}:H${rowIdx}`); // 合同号:G3-H3
+ worksheet.mergeCells(`I${rowIdx}:J${rowIdx}`); // 车牌:I3-J3(10列)
// 3.4 表格表头(第4行)
rowIdx++;
tableHeader.forEach((text, colIdx) => {
@@ -812,23 +811,23 @@ export default {
rowIdx++;
const remarkCell = worksheet.getCell(`A${rowIdx}`);
remarkCell.value = remark;
- worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A*_L*
+ worksheet.mergeCells(`A${rowIdx}:J${rowIdx}`); // 合并A*_J*(10列)
// 3.7 取货地点行
rowIdx++;
const pickupCell = worksheet.getCell(`A${rowIdx}`);
pickupCell.value = pickupLocation;
- worksheet.mergeCells(`A${rowIdx}:K${rowIdx}`); // 合并A*_L*
+ worksheet.mergeCells(`A${rowIdx}:J${rowIdx}`); // 合并A*_J*(10列)
// 3.8 签名栏行
rowIdx++;
worksheet.getCell(`A${rowIdx}`).value = footer.deliveryman;
worksheet.getCell(`E${rowIdx}`).value = footer.driver;
- worksheet.getCell(`I${rowIdx}`).value = footer.weightRoom;
+ worksheet.getCell(`H${rowIdx}`).value = footer.weightRoom;
worksheet.mergeCells(`A${rowIdx}:D${rowIdx}`); // 发货:A*_D*
- worksheet.mergeCells(`E${rowIdx}:H${rowIdx}`); // 司机:E*_H*
- worksheet.mergeCells(`I${rowIdx}:K${rowIdx}`); // 磅房:I*_L*
+ worksheet.mergeCells(`E${rowIdx}:G${rowIdx}`); // 司机:E*_G*
+ worksheet.mergeCells(`H${rowIdx}:J${rowIdx}`); // 磅房:H*_J*(10列)
- // 4. 配置列宽(完全匹配Web端)
- const columnWidths = [70, 60, 50, 90, 70, 70, 150, 90, 80, 70, 60];
+ // 4. 配置列宽(完全匹配Web端,10列)
+ const columnWidths = [70, 60, 50, 90, 70, 150, 90, 80, 70, 60]; // 去掉原料厂家列
worksheet.columns = columnWidths.map((width, idx) => ({
key: `col${idx + 1}`,
width: width / 5 // exceljs的width单位是字符宽度,转换为px(约1px=0.072字符)
@@ -866,19 +865,19 @@ export default {
// 5.2 头部信息样式(18px、宋体、加粗、居中、无边框)
setCellStyle(worksheet.getCell(`A2`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`E2`), { size: 18, border: false });
- setCellStyle(worksheet.getCell(`I2`), { size: 18, border: false });
+ setCellStyle(worksheet.getCell(`H2`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`A3`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`D3`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`G3`), { size: 18, border: false });
- setCellStyle(worksheet.getCell(`J3`), { size: 18, border: false });
+ setCellStyle(worksheet.getCell(`I3`), { size: 18, border: false });
// 5.3 表格表头样式(16px、宋体、加粗、居中、带边框)
- for (let col = 0; col < 11; col++) {
+ for (let col = 0; col < 10; col++) { // 10列
const colLetter = String.fromCharCode(65 + col);
setCellStyle(worksheet.getCell(`${colLetter}4`), { size: 16, border: true, horizontal: 'center' });
}
// 5.4 表格明细样式(16px、宋体、加粗、居中、带边框)
for (let r = 5; r < rowIdx - 2; r++) { // 明细行范围:第5行到备注行前一行
- for (let col = 0; col < 11; col++) {
+ for (let col = 0; col < 10; col++) { // 10列
const colLetter = String.fromCharCode(65 + col);
setCellStyle(worksheet.getCell(`${colLetter}${r}`), { size: 16, border: true, horizontal: 'center' });
}
@@ -890,7 +889,7 @@ export default {
// 5.7 签名栏样式(18px、宋体、加粗、居中、无边框)
setCellStyle(worksheet.getCell(`A${rowIdx}`), { size: 18, border: false });
setCellStyle(worksheet.getCell(`E${rowIdx}`), { size: 18, border: false });
- setCellStyle(worksheet.getCell(`I${rowIdx}`), { size: 18, border: false });
+ setCellStyle(worksheet.getCell(`H${rowIdx}`), { size: 18, border: false });
// 第一行的行高
const row1 = worksheet.getRow(1);
@@ -1099,26 +1098,26 @@ export default {
/* 结算 */
}
-.waybill-table th:nth-child(6),
+/* 原料厂家已移除 */
+/* .waybill-table th:nth-child(6),
.waybill-table td:nth-child(6) {
width: 70px;
- /* 原料厂家 */
-}
+} */
-.waybill-table th:nth-child(7),
-.waybill-table td:nth-child(7) {
+.waybill-table th:nth-child(6),
+.waybill-table td:nth-child(6) {
width: 150px;
/* 卷号 */
}
-.waybill-table th:nth-child(8),
-.waybill-table td:nth-child(8) {
+.waybill-table th:nth-child(7),
+.waybill-table td:nth-child(7) {
width: 90px;
/* 规格 */
}
-.waybill-table th:nth-child(9),
-.waybill-table td:nth-child(9) {
+.waybill-table th:nth-child(8),
+.waybill-table td:nth-child(8) {
width: 80px;
/* 材质 */
}
@@ -1131,21 +1130,21 @@ export default {
} */
/* 重量(kg) */
-.waybill-table th:nth-child(10),
-.waybill-table td:nth-child(10) {
+.waybill-table th:nth-child(9),
+.waybill-table td:nth-child(9) {
width: 70px;
}
/* 单价 */
-/* .waybill-table th:nth-child(11),
-.waybill-table td:nth-child(11) {
+/* .waybill-table th:nth-child(10),
+.waybill-table td:nth-child(10) {
width: 50px;
} */
/* 备注 */
-.waybill-table th:nth-child(11),
-.waybill-table td:nth-child(11) {
+.waybill-table th:nth-child(10),
+.waybill-table td:nth-child(10) {
/* width: 40px; */
}
diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue
index ece8ba29..c90d603f 100644
--- a/klp-ui/src/views/wms/delivery/waybill/index.vue
+++ b/klp-ui/src/views/wms/delivery/waybill/index.vue
@@ -653,11 +653,11 @@ export default {
pageSize: 1000 // 获取所有明细
}).then(response => {
// 该发货单不能是空的
- if (response.rows.length === 0) {
- this.$modal.msgError("发货单为空不能打印");
- this.loading = false;
- return;
- }
+ // if (response.rows.length === 0) {
+ // this.$modal.msgError("发货单为空不能打印");
+ // this.loading = false;
+ // return;
+ // }
updateDeliveryWaybill({
waybillId: row.waybillId,
status: 2
diff --git a/klp-ui/src/views/wms/report/js/config.js b/klp-ui/src/views/wms/report/js/config.js
index bcf6601b..0e63882a 100644
--- a/klp-ui/src/views/wms/report/js/config.js
+++ b/klp-ui/src/views/wms/report/js/config.js
@@ -104,6 +104,7 @@ export const zincConfig = {
warehouseOptions: [
{ value: '1988150323162836993', label: '镀锌成品库' },
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
+ { value: '2056545127927787522', label: '镀锌待打包' },
{ value: '2019583656787259393', label: '技术部' },
{ value: '2019583325311414274', label: '小钢卷库' },
{ value: '2019583429955104769', label: '废品库' },
diff --git a/klp-ui/src/views/wms/report/js/fetch.js b/klp-ui/src/views/wms/report/js/fetch.js
index a5116696..222e0598 100644
--- a/klp-ui/src/views/wms/report/js/fetch.js
+++ b/klp-ui/src/views/wms/report/js/fetch.js
@@ -1,8 +1,12 @@
-import { listCoilWithIds } from "@/api/wms/coil";
import {
- listPendingAction,
+ listCoilWithIds, listLightCoil
+} from "@/api/wms/coil";
+import {
+ listLightPendingAction,
} from '@/api/wms/pendingAction';
-import { Message } from 'element-ui'
+import {
+ Message
+} from 'element-ui'
export async function fetchOutputList(queryParams) {
const resList = await Promise.all([
@@ -38,18 +42,14 @@ export async function fetchOutputList(queryParams) {
}
export async function fetchLossList(actionTypes, queryParams, callback) {
- const resultList = await Promise.all(actionTypes.map(actionType => {
- return listPendingAction({
- actionStatus: 2,
- actionType,
- createBys: queryParams.createBys,
- startTime: queryParams.byCreateTimeStart,
- endTime: queryParams.byCreateTimeEnd,
- pageSize: 99999,
- pageNum: 1,
- })
- }))
- const actions = resultList.flatMap(item => item.rows)
+ const resultList = await listLightPendingAction({
+ actionStatus: 2,
+ actionTypes: actionTypes.join(','),
+ createBys: queryParams.createBys,
+ startTime: queryParams.byCreateTimeStart,
+ endTime: queryParams.byCreateTimeEnd,
+ })
+ const actions = resultList.data
const actionIds = actions.map(item => item.actionId).join(',')
console.log(actionIds)
if (!actionIds) {
@@ -80,4 +80,4 @@ export async function fetchLossList(actionTypes, queryParams, callback) {
})
callback(actionIds)
return lossList
-}
\ No newline at end of file
+}
diff --git a/klp-ui/src/views/wms/report/template/action.vue b/klp-ui/src/views/wms/report/template/action.vue
index 38bc67ba..f6b2a136 100644
--- a/klp-ui/src/views/wms/report/template/action.vue
+++ b/klp-ui/src/views/wms/report/template/action.vue
@@ -207,7 +207,7 @@
diff --git a/klp-ui/src/views/wms/coil/views/typeError.vue b/klp-ui/src/views/wms/coil/views/typeError.vue
index 816d8489..3a80804c 100644
--- a/klp-ui/src/views/wms/coil/views/typeError.vue
+++ b/klp-ui/src/views/wms/coil/views/typeError.vue
@@ -5,8 +5,8 @@
类型缺失
原料类型缺失
匹配异常
- 分条锁定
- 退火锁定
+
刷新
From 531fccb22b0feb3993f797df559ffe0e0e2de7c8 Mon Sep 17 00:00:00 2001
From: Joshi <3040996759@qq.com>
Date: Thu, 21 May 2026 11:04:44 +0800
Subject: [PATCH 5/9] =?UTF-8?q?feat(transfer):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E6=89=B9=E9=87=8F=E7=A1=AE=E8=AE=A4=E8=B0=83=E6=8B=A8=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在服务接口中新增批量确认调拨方法
- 在控制器中实现批量确认调拨的API端点
- 在服务实现中添加批量处理逻辑,循环调用单个确认方法
- 添加参数校验和空值检查机制
- 集成日志记录和重复提交防护功能
---
.../WmsTransferOrderItemController.java | 10 ++++++++++
.../service/IWmsTransferOrderItemService.java | 5 +++++
.../impl/WmsTransferOrderItemServiceImpl.java | 17 +++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/klp-wms/src/main/java/com/klp/controller/WmsTransferOrderItemController.java b/klp-wms/src/main/java/com/klp/controller/WmsTransferOrderItemController.java
index 3894186c..bf4446f3 100644
--- a/klp-wms/src/main/java/com/klp/controller/WmsTransferOrderItemController.java
+++ b/klp-wms/src/main/java/com/klp/controller/WmsTransferOrderItemController.java
@@ -147,6 +147,16 @@ public class WmsTransferOrderItemController extends BaseController {
return toAjax(iWmsTransferOrderItemService.confirmTransfer(bo));
}
+ /**
+ * 批量确认调拨
+ */
+ @Log(title = "调拨单明细", businessType = BusinessType.UPDATE)
+ @RepeatSubmit()
+ @PostMapping("/batchConfirm")
+ public R batchConfirm(@Validated(AddGroup.class) @RequestBody List boList) {
+ return toAjax(iWmsTransferOrderItemService.batchConfirmTransfer(boList));
+ }
+
/**
* 取消调拨
*/
diff --git a/klp-wms/src/main/java/com/klp/service/IWmsTransferOrderItemService.java b/klp-wms/src/main/java/com/klp/service/IWmsTransferOrderItemService.java
index 71aa6384..99a7be7e 100644
--- a/klp-wms/src/main/java/com/klp/service/IWmsTransferOrderItemService.java
+++ b/klp-wms/src/main/java/com/klp/service/IWmsTransferOrderItemService.java
@@ -64,6 +64,11 @@ public interface IWmsTransferOrderItemService {
*/
Boolean confirmTransfer(WmsTransferOrderItemBo bo);
+ /**
+ * 批量确认调拨
+ */
+ Boolean batchConfirmTransfer(List boList);
+
/**
* 取消调拨
*/
diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsTransferOrderItemServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsTransferOrderItemServiceImpl.java
index 51ebc2bb..abbd2561 100644
--- a/klp-wms/src/main/java/com/klp/service/impl/WmsTransferOrderItemServiceImpl.java
+++ b/klp-wms/src/main/java/com/klp/service/impl/WmsTransferOrderItemServiceImpl.java
@@ -600,6 +600,23 @@ public class WmsTransferOrderItemServiceImpl implements IWmsTransferOrderItemSer
return true;
}
+ /**
+ * 批量确认调拨
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean batchConfirmTransfer(List boList) {
+ if (boList == null || boList.isEmpty()) {
+ throw new IllegalArgumentException("调拨明细列表不能为空");
+ }
+
+ for (WmsTransferOrderItemBo bo : boList) {
+ confirmTransfer(bo);
+ }
+
+ return true;
+ }
+
/**
* 取消调拨
*/
From 2fc8cf02d1fd061cf0334b29ef16584b3880ebd3 Mon Sep 17 00:00:00 2001
From: Joshi <3040996759@qq.com>
Date: Thu, 21 May 2026 13:04:04 +0800
Subject: [PATCH 6/9] =?UTF-8?q?feat(wms):=20=E6=9B=B4=E6=96=B0=E5=8E=86?=
=?UTF-8?q?=E5=8F=B2=E9=92=A2=E5=8D=B7=E6=93=8D=E4=BD=9C=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=AD=97=E6=AE=B5=E5=92=8C=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 添加物品名称、材质、规格、生产厂家、锌层等物料信息列
- 新增创建人和完成时间列,完善操作记录信息
- 替换字典标签为映射值显示,优化操作类型和状态展示
- 集成操作状态标签颜色映射,提升视觉效果
- 移除字典依赖改为本地映射数据,提高性能
- 调整各列宽度以适应内容,优化表格布局
- 添加操作状态标签类型映射方法
---
klp-ui/src/views/wms/todo/stale.vue | 53 +++++++++++++++++++++++------
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/klp-ui/src/views/wms/todo/stale.vue b/klp-ui/src/views/wms/todo/stale.vue
index a427b3c9..07a229e1 100644
--- a/klp-ui/src/views/wms/todo/stale.vue
+++ b/klp-ui/src/views/wms/todo/stale.vue
@@ -2,25 +2,36 @@
-
-
-
+
+
+
+
+
+
+
+
-
+ {{ actionTypeMap[scope.row.actionType] || scope.row.actionType }}
-
+
-
+ {{ actionStatusMap[scope.row.actionStatus] || scope.row.actionStatus }}
-
-
-
+
+
+
+
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
+
+
+ {{ parseTime(scope.row.completeTime, '{y}-{m}-{d} {h}:{i}') }}
+
+
{
return completeAction(row.actionId, '-');
From 1cbc8da78cbd097f9a24dab67dfbf5f4987c9ac9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Thu, 21 May 2026 13:37:58 +0800
Subject: [PATCH 7/9] =?UTF-8?q?fix(wms):=20=E8=B0=83=E6=95=B4=E9=80=80?=
=?UTF-8?q?=E7=81=AB=E7=BB=A9=E6=95=88=E5=92=8C=E5=BC=82=E5=B8=B8=E6=8A=A5?=
=?UTF-8?q?=E8=A1=A8=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E4=B8=BA=E6=98=A8=E6=97=A5=E5=88=B0=E4=BB=8A=E6=97=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
统一两个报表页面的默认查询时间范围,将初始默认时间改为昨日00:00:00到当日00:00:00,简化了异常报表的时间处理逻辑,移除冗余的日期范围工具函数。
---
.../views/wms/anneal/performance/report.vue | 10 +++-
klp-ui/src/views/wms/report/abnormal.vue | 46 ++-----------------
2 files changed, 12 insertions(+), 44 deletions(-)
diff --git a/klp-ui/src/views/wms/anneal/performance/report.vue b/klp-ui/src/views/wms/anneal/performance/report.vue
index 0a416038..d3a39318 100644
--- a/klp-ui/src/views/wms/anneal/performance/report.vue
+++ b/klp-ui/src/views/wms/anneal/performance/report.vue
@@ -81,8 +81,14 @@ export default {
return {
loading: false,
queryParams: {
- startTime: undefined,
- endTime: undefined,
+ startTime: (() => {
+ const d = new Date(); d.setDate(d.getDate() - 1);
+ return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
+ })(),
+ endTime: (() => {
+ const d = new Date();
+ return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
+ })(),
targetFurnaceId: undefined,
planNo: undefined,
enterCoilNo: undefined,
diff --git a/klp-ui/src/views/wms/report/abnormal.vue b/klp-ui/src/views/wms/report/abnormal.vue
index 24d5a068..c5c35b73 100644
--- a/klp-ui/src/views/wms/report/abnormal.vue
+++ b/klp-ui/src/views/wms/report/abnormal.vue
@@ -155,52 +155,14 @@ export default {
},
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
- // 工具函数:个位数补零
const addZero = (num) => num.toString().padStart(2, '0')
- // 获取当前日期(默认选中当天)
const now = new Date()
- const currentDate = `${now.getFullYear()}-${addZero(now.getMonth() + 1)}`
+ const yesterday = new Date(now)
+ yesterday.setDate(yesterday.getDate() - 1)
- /**
- * 生成指定日期/月份的时间范围字符串
- * @param {string} dateStr - 支持格式:yyyy-MM(月份) 或 yyyy-MM-dd(具体日期)
- * @returns {object} 包含start(开始时间)和end(结束时间)的对象
- */
- const getDayTimeRange = (dateStr) => {
- // 先校验输入格式是否合法
- const monthPattern = /^\d{4}-\d{2}$/; // yyyy-MM 正则
- const dayPattern = /^\d{4}-\d{2}-\d{2}$/; // yyyy-MM-dd 正则
-
- if (!monthPattern.test(dateStr) && !dayPattern.test(dateStr)) {
- throw new Error('输入格式错误,请传入 yyyy-MM 或 yyyy-MM-dd 格式的字符串');
- }
-
- let startDate, endDate;
-
- if (monthPattern.test(dateStr)) {
- // 处理 yyyy-MM 格式:获取本月第一天和最后一天
- const [year, month] = dateStr.split('-').map(Number);
- // 月份是0基的(0=1月,1=2月...),所以要减1
- // 第一天:yyyy-MM-01
- startDate = `${dateStr}-01`;
- // 最后一天:通过 new Date(year, month, 0) 计算(month是原始月份,比如2代表2月,传2则取3月0日=2月最后一天)
- const lastDayOfMonth = new Date(year, month, 0).getDate();
- endDate = `${dateStr}-${lastDayOfMonth.toString().padStart(2, '0')}`;
- } else {
- // 处理 yyyy-MM-dd 格式:直接使用传入的日期
- startDate = dateStr;
- endDate = dateStr;
- }
-
- // 拼接时间部分
- return {
- start: `${startDate} 00:00:00`,
- end: `${endDate} 23:59:59`
- };
- };
-
- const { start, end } = getDayTimeRange(currentDate)
+ const start = `${yesterday.getFullYear()}-${addZero(yesterday.getMonth() + 1)}-${addZero(yesterday.getDate())} 00:00:00`
+ const end = `${now.getFullYear()}-${addZero(now.getMonth() + 1)}-${addZero(now.getDate())} 00:00:00`
return {
lossList: [],
outList: [],
From 96b49e71f42fa6267b50a97d95c904ef3f9d4acb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Thu, 21 May 2026 13:38:35 +0800
Subject: [PATCH 8/9] =?UTF-8?q?feat(KLPService=E9=80=89=E6=8B=A9=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6):=20=E6=96=B0=E5=A2=9E=E9=BB=98=E8=AE=A4=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81=E5=B9=B6=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E9=92=A2=E5=8D=B7=E5=BD=95=E5=85=A5=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 为ProductSelect和RawMaterialSelect组件新增defaultQueryParams属性,支持传入默认查询参数合并到请求参数中
2. 优化钢卷录入页面:默认选中成品类型,根据解析的钢卷数据自动设置物料选择器的查询参数
3. 移除页面冗余空行和注释代码
---
.../KLPService/ProductSelect/index.vue | 7 +++
.../KLPService/RawMaterialSelect/index.vue | 7 +++
.../views/wms/anneal/performance/report.vue | 55 ++++++++++++-------
klp-ui/src/views/wms/coil/typing.vue | 33 +++++------
4 files changed, 64 insertions(+), 38 deletions(-)
diff --git a/klp-ui/src/components/KLPService/ProductSelect/index.vue b/klp-ui/src/components/KLPService/ProductSelect/index.vue
index 69890d26..389537a4 100644
--- a/klp-ui/src/components/KLPService/ProductSelect/index.vue
+++ b/klp-ui/src/components/KLPService/ProductSelect/index.vue
@@ -163,6 +163,10 @@ export default {
filters: {
type: Object,
default: () => ({})
+ },
+ defaultQueryParams: {
+ type: Object,
+ default: () => ({})
}
},
data() {
@@ -235,6 +239,9 @@ export default {
this.getList();
this.listRecentlySelected();
}
+ },
+ defaultQueryParams(val) {
+ this.queryParams = { ...this.queryParams, ...val };
}
},
methods: {
diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
index 89d9a7aa..4e4a9de2 100644
--- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
+++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
@@ -151,6 +151,10 @@ export default {
filters: {
type: Object,
default: () => ({})
+ },
+ defaultQueryParams: {
+ type: Object,
+ default: () => ({})
}
},
data() {
@@ -234,6 +238,9 @@ export default {
this.listRecentlySelected();
this.getList();
}
+ },
+ defaultQueryParams(val) {
+ this.queryParams = { ...this.queryParams, ...val };
}
},
methods: {
diff --git a/klp-ui/src/views/wms/anneal/performance/report.vue b/klp-ui/src/views/wms/anneal/performance/report.vue
index d3a39318..1e1499b5 100644
--- a/klp-ui/src/views/wms/anneal/performance/report.vue
+++ b/klp-ui/src/views/wms/anneal/performance/report.vue
@@ -1,13 +1,10 @@
-
-
-
-
-
+
+
@@ -74,21 +71,35 @@ import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect/index.vue";
+import TimeRangePicker from "@/views/wms/report/components/timeRangePicker.vue";
export default {
name: "AnnealPerformance",
+ components: {
+ ProductInfo,
+ RawMaterialInfo,
+ CoilNo,
+ WarehouseSelect,
+ TimeRangePicker,
+ },
data() {
+ const startTime = (() => {
+ const d = new Date(); d.setDate(d.getDate() - 1);
+ return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
+ })()
+ const endTime = (() => {
+ const d = new Date();
+ return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
+ })()
return {
loading: false,
+ timeRangeParams: {
+ startTime,
+ endTime,
+ },
queryParams: {
- startTime: (() => {
- const d = new Date(); d.setDate(d.getDate() - 1);
- return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
- })(),
- endTime: (() => {
- const d = new Date();
- return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} 00:00:00`;
- })(),
+ startTime,
+ endTime,
targetFurnaceId: undefined,
planNo: undefined,
enterCoilNo: undefined,
@@ -98,11 +109,15 @@ export default {
furnaceOptions: [],
};
},
- components: {
- ProductInfo,
- RawMaterialInfo,
- CoilNo,
- WarehouseSelect,
+ watch: {
+ timeRangeParams: {
+ handler(newVal) {
+ this.queryParams.startTime = newVal.startTime
+ this.queryParams.endTime = newVal.endTime
+ },
+ deep: true,
+ immediate: true
+ }
},
created() {
this.loadFurnaces();
diff --git a/klp-ui/src/views/wms/coil/typing.vue b/klp-ui/src/views/wms/coil/typing.vue
index 2eff8fe2..b755781b 100644
--- a/klp-ui/src/views/wms/coil/typing.vue
+++ b/klp-ui/src/views/wms/coil/typing.vue
@@ -1,16 +1,5 @@
-
-
-
@@ -65,8 +54,6 @@
-
-
@@ -80,9 +67,11 @@
+ placeholder="请选择原料" style="width: 100%" clearable :disabled="!updateForm.materialType"
+ :default-query-params="itemSelectorQueryParams" />
+ placeholder="请选择成品" style="width: 100%" clearable :disabled="!updateForm.materialType"
+ :default-query-params="itemSelectorQueryParams" />
请先选择物料类型
@@ -371,8 +360,8 @@ export default {
updateForm: {
currentCoilNo: '',
team: '',
- materialType: null,
- itemType: null,
+ materialType: '成品',
+ itemType: 'product',
itemId: null,
grossWeight: undefined,
netWeight: undefined,
@@ -460,6 +449,7 @@ export default {
cacheDialogVisible: false,
currentCache: null,
parsedCacheData: null,
+ itemSelectorQueryParams: {},
};
},
computed: {
@@ -567,6 +557,14 @@ export default {
}
if (data.exit_thick != null) this.$set(this.updateForm, 'actualThickness', parseFloat(data.exit_thick))
if (data.exit_width != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.exit_width))
+
+ const query = {
+ specification: data.exit_thick ? `${data.exit_thick}*${data.exit_width}` : '',
+ material: data.grade,
+ }
+
+ this.itemSelectorQueryParams = query
+
// 包装要求
if (data.park_type != null && data.park_type !== '') {
this.$set(this.updateForm, 'packagingRequirement', data.park_type)
@@ -633,7 +631,6 @@ export default {
}
},
-
// 复制当前信息到更新表单
copyFromCurrent() {
// 复制除了指定字段之外的其他字段
From 613acfc9981985744f5047d277e656c35eee27ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Thu, 21 May 2026 13:39:27 +0800
Subject: [PATCH 9/9] =?UTF-8?q?fix(acid/actual-performance):=20=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E5=B7=A5=E8=89=BA=E6=9B=B2=E7=BA=BF=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E9=80=BB=E8=BE=91=E5=B9=B6=E6=B7=BB=E5=8A=A0=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 添加了加载遮罩来提示用户正在获取工艺曲线数据
2. 将openQualityReport改为异步方法,并行获取多个接口数据
3. 统一处理异常情况并提示用户加载失败
4. 优化了数据获取和复用逻辑,减少不必要的接口请求
---
.../acid/components/ActualPerformance.vue | 45 ++++++++++++++-----
1 file changed, 35 insertions(+), 10 deletions(-)
diff --git a/klp-ui/src/views/micro/pages/acid/components/ActualPerformance.vue b/klp-ui/src/views/micro/pages/acid/components/ActualPerformance.vue
index 728ffdce..d9aa7d83 100644
--- a/klp-ui/src/views/micro/pages/acid/components/ActualPerformance.vue
+++ b/klp-ui/src/views/micro/pages/acid/components/ActualPerformance.vue
@@ -1,5 +1,5 @@
-
+
@@ -396,7 +396,8 @@ export default {
pagination: { page: 1, pageSize: 50, total: 0 },
topTableHeight: 'calc(40vh - 80px)',
chartInstances: [],
- resizeHandler: null
+ resizeHandler: null,
+ qualityLoading: false
}
},
created() {
@@ -1045,15 +1046,39 @@ export default {
return items
},
- openQualityReport(row) {
- // If the clicked row is already the selected row, use in-memory data
+ async openQualityReport(row) {
+ const excoilId = row.EXCOILID || row.excoilid
const isSame = this.selectedRow &&
- (row.EXCOILID || row.excoilid) === (this.selectedRow.EXCOILID || this.selectedRow.excoilid)
- const segData = isSame ? this.segData : null
- const gaugeRows = isSame ? this.gaugeRows : null
- const shapeRows = isSame ? this.shapeRows : null
- const presetData = isSame ? this.presetData : null
- this.$refs.qualityReport.open(row, segData, gaugeRows, shapeRows, presetData)
+ excoilId === (this.selectedRow.EXCOILID || this.selectedRow.excoilid)
+
+ if (isSame) {
+ this.$refs.qualityReport.open(row, this.segData, this.gaugeRows, this.shapeRows, this.presetData)
+ return
+ }
+
+ this.qualityLoading = true
+ try {
+ const encoilId = row.ENCOILID || row.encoilid
+ const [segRes, presetRes, rtRes] = await Promise.all([
+ encoilId ? getTimingSegByEncoilId(encoilId) : Promise.resolve({ data: { rows: [], series: null } }),
+ encoilId ? getPresetSetupByCoilId(encoilId) : Promise.resolve({ data: { data: null } }),
+ excoilId ? getTimingRealtimeData(excoilId) : Promise.resolve({ data: { gauge: { result: null }, shape: { result: null } } })
+ ])
+
+ const segRows = segRes?.data?.rows || []
+ const segData = segRows.length ? (segRes?.data?.series || null) : null
+ const presetData = presetRes?.data?.data || null
+ const g = rtRes?.data?.gauge?.result
+ const s = rtRes?.data?.shape?.result
+ const gaugeRows = Array.isArray(g) ? g : null
+ const shapeRows = Array.isArray(s) ? s : null
+
+ this.$refs.qualityReport.open(row, segData, gaugeRows, shapeRows, presetData)
+ } catch (_) {
+ this.$message.error('获取工艺曲线数据失败')
+ } finally {
+ this.qualityLoading = false
+ }
},
calcLengthPerTon(row) {