From 88389b278165806313d1f382da205caabbfe698a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Mon, 11 May 2026 11:51:56 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat(CoilSelector):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=92=A2=E5=8D=B7=E9=80=89=E6=8B=A9=E5=99=A8=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构钢卷选择器组件布局,改进多选模式下的用户体验。主要变更包括: 1. 调整列顺序和显示内容,优化表格布局 2. 添加全选当前页和清除全部功能按钮 3. 修复对话框滚动问题,优化样式 4. 完善已选钢卷统计区域的布局 5. 增加备注列显示 --- klp-ui/src/assets/styles/element-ui.scss | 3 +- klp-ui/src/components/CoilSelector/data.js | 29 +- klp-ui/src/components/CoilSelector/index.vue | 393 +++++++++++-------- 3 files changed, 243 insertions(+), 182 deletions(-) diff --git a/klp-ui/src/assets/styles/element-ui.scss b/klp-ui/src/assets/styles/element-ui.scss index 9a16eafb..8e0d00d7 100644 --- a/klp-ui/src/assets/styles/element-ui.scss +++ b/klp-ui/src/assets/styles/element-ui.scss @@ -947,7 +947,8 @@ body { .el-dialog.is-fullscreen { .el-dialog__body { padding: $--spacing-lg; - max-height: calc(100vh - 100px); + height: calc(100vh - 100px); + max-height: 100vh; overflow-y: auto; } } diff --git a/klp-ui/src/components/CoilSelector/data.js b/klp-ui/src/components/CoilSelector/data.js index 3bcbc004..1234331d 100644 --- a/klp-ui/src/components/CoilSelector/data.js +++ b/klp-ui/src/components/CoilSelector/data.js @@ -1,5 +1,4 @@ -export const defaultColumns = [ - { +export const defaultColumns = [{ label: '入场卷号', align: 'center', prop: 'enterCoilNo', @@ -30,6 +29,12 @@ export const defaultColumns = [ prop: 'specification', width: '100' }, + { + label: '重量(t)', + align: 'center', + prop: 'netWeight', + width: '100' + }, { label: '材质', align: 'center', @@ -42,12 +47,6 @@ export const defaultColumns = [ prop: 'manufacturer', width: '100' }, - { - label: '重量(t)', - align: 'center', - prop: 'netWeight', - width: '100' - }, { label: '库区', align: 'center', @@ -62,10 +61,10 @@ export const defaultColumns = [ width: '100', showOverflowTooltip: true }, - { - label: '备注', - align: 'center', - prop: 'remark', - showOverflowTooltip: true - } -] \ No newline at end of file + // { + // label: '备注', + // align: 'center', + // prop: 'remark', + // showOverflowTooltip: true + // } +] diff --git a/klp-ui/src/components/CoilSelector/index.vue b/klp-ui/src/components/CoilSelector/index.vue index c072d6b6..26701f9c 100644 --- a/klp-ui/src/components/CoilSelector/index.vue +++ b/klp-ui/src/components/CoilSelector/index.vue @@ -19,179 +19,190 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 搜索 - 重置 - 显示钢卷地图 - 显示订单详情 - - + + 搜索 + 重置 + 全选当前卷 + 显示钢卷地图 + 显示订单详情 + + -
- - - + + +
+ + +
+ + + + + + + + + + + + + +
+ + 总净重:{{ coilTrimStatistics.total_net_weight || 0 }}t + + + +
+ @@ -287,6 +288,75 @@
+ + + +
+ +
+
选择合同
+ + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + +
+ +
+
+ + +
+
选择明细(多选)
+ + + + + + + + + + + + + + + +
+
+ +
@@ -351,7 +421,31 @@ export default { // 订单明细加载状态 orderItemLoading: false, // 当前编辑的行 - currentEditingRow: null + currentEditingRow: null, + // 批量新增对话框 + batchAddDialogVisible: false, + // 批量查询参数 + batchQueryParams: { + pageNum: 1, + pageSize: 10, + contractCode: undefined, + customerName: undefined, + salesman: undefined + }, + // 批量订单列表 + batchOrderList: [], + // 批量订单总数 + batchOrderTotal: 0, + // 批量订单加载状态 + batchOrderLoading: false, + // 批量明细列表 + batchItemList: [], + // 批量明细加载状态 + batchItemLoading: false, + // 选中的合同 + selectedContract: null, + // 选中的明细 + selectedBatchItems: [] }; }, created() { @@ -582,6 +676,98 @@ export default { // 处理订单行点击 handleOrderSelect(row) { this.selectOrder(row); + }, + // 打开批量新增对话框 + handleBatchAdd() { + this.batchAddDialogVisible = true; + this.selectedContract = null; + this.selectedBatchItems = []; + this.getBatchOrderList(); + }, + // 获取批量订单列表 + getBatchOrderList() { + this.batchOrderLoading = true; + listOrder(this.batchQueryParams).then(response => { + this.batchOrderList = response.rows; + this.batchOrderTotal = response.total; + this.batchOrderLoading = false; + }); + }, + // 重置批量查询参数 + resetBatchQuery() { + this.batchQueryParams = { + pageNum: 1, + pageSize: 10, + contractCode: undefined, + customerName: undefined, + salesman: undefined + }; + this.getBatchOrderList(); + }, + // 选择批量合同 + selectBatchContract(row) { + this.selectedContract = row; + this.selectedBatchItems = []; + this.batchItemLoading = true; + listOrderItem({ orderId: row.orderId }).then(res => { + this.batchItemList = res.rows; + this.batchItemLoading = false; + }); + }, + // 处理批量明细选择变更 + handleBatchItemSelectionChange(selection) { + this.selectedBatchItems = selection; + }, + // 确认批量新增 + confirmBatchAdd() { + if (this.selectedBatchItems.length === 0) { + this.$message.warning('请至少选择一条明细'); + return; + } + + this.$confirm(`确认新增 ${this.selectedBatchItems.length} 条明细?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const currentMaxSeqNo = this.planDetailList.length > 0 + ? Math.max(...this.planDetailList.map(item => parseInt(item.bizSeqNo) || 0)) + : 0; + + const addPromises = this.selectedBatchItems.map((item, index) => { + const newRow = { + planSheetId: this.currentPlanSheetId, + bizSeqNo: currentMaxSeqNo + index + 1, + orderCode: this.selectedContract.orderCode, + contractCode: this.selectedContract.contractCode, + customerName: this.selectedContract.companyName, + salesman: this.selectedContract.salesman, + orderId: this.selectedContract.orderId, + productName: item.productType, + productMaterial: item.material, + productWidth: item.width, + rollingThick: item.thickness, + markCoatThick: item.thickness, + tonSteelLengthRange: 0, + planQty: item.productNum, + planWeight: item.weight, + surfaceTreatment: item.surfaceTreatment, + productPackaging: item.packagingReq, + widthReq: item.edgeCuttingReq, + productEdgeReq: item.widthTolerance, + usageReq: item.purpose + }; + return addPlanDetail(newRow); + }); + + Promise.all(addPromises).then(() => { + this.$message.success('批量新增成功'); + this.batchAddDialogVisible = false; + this.getList(); + }).catch(error => { + this.$message.error('批量新增失败'); + }); + }); } } }; @@ -654,4 +840,25 @@ export default { /* ::v-deep .el-input__inner { padding: 0 1px; } */ + +.batch-add-content { + padding: 10px 0; +} + +.contract-section { + margin-bottom: 30px; + padding-bottom: 20px; + border-bottom: 1px solid #eee; +} + +.item-section { + margin-top: 20px; +} + +.section-title { + font-size: 14px; + font-weight: 600; + margin-bottom: 15px; + color: #303133; +} From 83f04bf5cdd21923e0517892a995268c90a8fca1 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Mon, 11 May 2026 14:35:41 +0800 Subject: [PATCH 03/11] =?UTF-8?q?feat(framework):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E5=85=A5=E5=9C=BA=E5=8D=B7=E5=8F=B7=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=92=A2=E5=8D=B7=E5=AE=9E=E9=99=85SEG=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在SqlServerApiBusinessService中新增getSegByHotCoilId方法 - 在SqlServerApiClient中新增queryProSegByHotCoilId数据库查询接口 - 在SqlServerApiController中新增/seg-by-hotcoil/{hotCoilId} REST API端点 - 实现基于HOT_COILID字段的数据库查询逻辑 - 添加相应的JavaDoc注释说明功能用途 --- .../java/com/klp/framework/client/SqlServerApiClient.java | 8 ++++++++ .../framework/service/SqlServerApiBusinessService.java | 7 +++++++ .../klp/framework/sqlserver/SqlServerApiController.java | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java b/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java index 57b16b49..859e8a77 100644 --- a/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java +++ b/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java @@ -368,6 +368,14 @@ public class SqlServerApiClient { ); } + public ExecuteSqlResponse queryProSegByHotCoilId(String hotCoilId) { + return executeSql( + "oracle", + "select * from JXPLTCM.PLTCM_PRO_SEG where HOT_COILID = :hotCoilId order by SEGNO", + singletonParam("hotCoilId", hotCoilId) + ); + } + public ExecuteSqlResponse queryProSegByExcoilId(String excoilId) { return executeSql( "oracle", diff --git a/klp-admin/src/main/java/com/klp/framework/service/SqlServerApiBusinessService.java b/klp-admin/src/main/java/com/klp/framework/service/SqlServerApiBusinessService.java index ef66dff2..727061c6 100644 --- a/klp-admin/src/main/java/com/klp/framework/service/SqlServerApiBusinessService.java +++ b/klp-admin/src/main/java/com/klp/framework/service/SqlServerApiBusinessService.java @@ -89,6 +89,13 @@ public class SqlServerApiBusinessService { return SegSeriesView.fromExecuteSqlResponse(encoilId, client.queryProSegByEncoilId(encoilId)); } + /** + * 钢卷实际 SEG 查询:按入场卷号查询。 + */ + public SegSeriesView getSegByHotCoilId(String hotCoilId) { + return SegSeriesView.fromExecuteSqlResponse(hotCoilId, client.queryProSegByHotCoilId(hotCoilId)); + } + /** * 钢卷实际 SEG 查询:按出口卷号查询。 */ diff --git a/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java b/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java index 14454bbd..eb6ed518 100644 --- a/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java +++ b/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java @@ -62,6 +62,14 @@ public class SqlServerApiController { return R.ok(businessService.getSegSeriesViewByEncoilId(encoilId)); } + /** + * 钢卷实际 SEG,按入场卷号查询。 + */ + @GetMapping("/seg-by-hotcoil/{hotCoilId}") + public R segByHotCoilId(@PathVariable String hotCoilId) { + return R.ok(businessService.getSegByHotCoilId(hotCoilId)); + } + /** * 钢卷实际 SEG,按出口卷号查询。 */ From 90cb7f4e99fec6ba65c461b3c8ea447825289de9 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Mon, 11 May 2026 14:48:06 +0800 Subject: [PATCH 04/11] =?UTF-8?q?feat(SqlServerApiClient):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=83=AD=E5=8D=B7ID=E6=9F=A5=E8=AF=A2=E5=B7=A5?= =?UTF-8?q?=E8=89=BA=E6=AE=B5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加ArrayList导入用于存储COILID列表 - 修改queryProSegByHotCoilId方法实现分步查询 - 首先从PLTCM_PDI_PLAN表查询COILID - 添加空结果检查和异常处理逻辑 - 收集有效的COILID并过滤空值 - 使用IN查询一次性获取PLTCM_PRO_SEG表数据 - 按ENCOILID和SEGNO排序返回结果 --- .../framework/client/SqlServerApiClient.java | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java b/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java index 859e8a77..7728b9dd 100644 --- a/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java +++ b/klp-admin/src/main/java/com/klp/framework/client/SqlServerApiClient.java @@ -10,6 +10,7 @@ import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; import java.net.URI; +import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; @@ -369,11 +370,47 @@ public class SqlServerApiClient { } public ExecuteSqlResponse queryProSegByHotCoilId(String hotCoilId) { - return executeSql( + // 先通过 HOT_COILID 从 PLTCM_PDI_PLAN 表查询到所有的 COILID + ExecuteSqlResponse planResponse = executeSql( "oracle", - "select * from JXPLTCM.PLTCM_PRO_SEG where HOT_COILID = :hotCoilId order by SEGNO", + "select COILID from JXPLTCM.PLTCM_PDI_PLAN where HOT_COILID = :hotCoilId", singletonParam("hotCoilId", hotCoilId) ); + + List> rows = (List>) planResponse.getResult(); + if (rows == null || rows.isEmpty()) { + // 如果没有找到对应的计划记录,返回空结果 + return new ExecuteSqlResponse(); + } + + // 收集所有有效的 COILID + List coilIds = new ArrayList<>(); + for (Map row : rows) { + String coilId = (String) row.get("COILID"); + if (coilId != null && !coilId.trim().isEmpty()) { + coilIds.add(coilId); + } + } + + if (coilIds.isEmpty()) { + return new ExecuteSqlResponse(); + } + + // 用所有的 COILID 去查询 PLTCM_PRO_SEG 表的 ENCOILID + // 使用 IN 查询一次性获取所有数据 + Map params = new java.util.HashMap<>(); + StringBuilder sql = new StringBuilder("select * from JXPLTCM.PLTCM_PRO_SEG where ENCOILID IN ("); + for (int i = 0; i < coilIds.size(); i++) { + if (i > 0) { + sql.append(", "); + } + String paramName = "coilId" + i; + sql.append(":").append(paramName); + params.put(paramName, coilIds.get(i)); + } + sql.append(") order by ENCOILID, SEGNO"); + + return executeSql("oracle", sql.toString(), params); } public ExecuteSqlResponse queryProSegByExcoilId(String excoilId) { From 6cbb7f3c18c5e0f019ddfe993eb61a10422ca948 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Mon, 11 May 2026 14:53:06 +0800 Subject: [PATCH 05/11] =?UTF-8?q?feat(SqlServerApi):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E7=83=AD=E5=8D=B7=E5=8F=B7=E6=9F=A5=E8=AF=A2=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E8=AF=A6=E6=83=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 /plans-by-hotcoil/{hotCoilId} 接口 - 实现按热卷号查询计划详情的功能 - 添加相关 API 文档注释 --- .../klp/framework/sqlserver/SqlServerApiController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java b/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java index eb6ed518..58eb94c1 100644 --- a/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java +++ b/klp-admin/src/main/java/com/klp/framework/sqlserver/SqlServerApiController.java @@ -54,6 +54,14 @@ public class SqlServerApiController { return R.ok(businessService.getPlanByCoilId(coilId)); } + /** + * 计划详情:按热卷号查询。 + */ + @GetMapping("/plans-by-hotcoil/{hotCoilId}") + public R planDetailByHotCoilId(@PathVariable String hotCoilId) { + return R.ok(businessService.getPlanByHotCoilId(hotCoilId)); + } + /** * 钢卷实际 SEG,按入口卷号查询。 */ From f102ef350b838578008ad4b06116dfd07a394843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Mon, 11 May 2026 15:03:32 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix(wms/coil/info):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=95=B0=E6=8D=AE=E5=8A=A0=E8=BD=BD=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=AD=97=E6=AE=B5=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整生产数据加载逻辑,先通过热轧卷号查询计划详情获取卷号,再调用时序数据接口,修复直接使用当前卷号可能取不到数据的问题 --- klp-ui/src/api/l2/timing.js | 16 ++++++++++++++++ klp-ui/src/views/wms/coil/info.vue | 11 ++++++++--- klp-ui/src/views/wms/delivery/waybill/index.vue | 9 +++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/klp-ui/src/api/l2/timing.js b/klp-ui/src/api/l2/timing.js index af5cbdeb..576aea04 100644 --- a/klp-ui/src/api/l2/timing.js +++ b/klp-ui/src/api/l2/timing.js @@ -33,6 +33,22 @@ export function getTimingSegByEncoilId(encoilId) { }) } +export function getTimingSegByHotcoilId(encoilId) { + return request({ + url: '/sql-server-api/seg-by-hotcoil/' + encoilId, + method: 'get' + }) +} + +// 根据热卷好查询计划详情 +export function getTimingPlanDetailByHotcoilId(hotcoilId) { + return request({ + url: '/sql-server-api/plans-by-hotcoil/' + hotcoilId, + method: 'get' + }) +} + + // 钢卷实际 SEG,按出口卷号查询 export function getTimingSegByExcoilId(excoilId) { return request({ diff --git a/klp-ui/src/views/wms/coil/info.vue b/klp-ui/src/views/wms/coil/info.vue index fda62694..c9c297da 100644 --- a/klp-ui/src/views/wms/coil/info.vue +++ b/klp-ui/src/views/wms/coil/info.vue @@ -766,7 +766,7 @@ import { listTransferOrderItem } from '@/api/wms/transferOrderItem' import { listCoilQualityRejudge } from '@/api/wms/coilQualityRejudge' // 引入 ECharts 和 L2 时序数据 API import * as echarts from 'echarts' -import { getTimingSegByEncoilId } from '@/api/l2/timing' +import { getTimingSegByEncoilId, getTimingPlanDetailByHotcoilId } from '@/api/l2/timing' import AbnormalTable from '@/views/wms/coil/components/AbnormalTable.vue'; import FileList from "@/components/FileList"; @@ -1176,11 +1176,16 @@ export default { }, // 加载生产数据 async loadProductionData() { - const encoilId = this.coilInfo.currentCoilNo; - if (!encoilId) return; + const hotCoilId = this.coilInfo.enterCoilNo; + if (!hotCoilId) return; this.perfLoading = true; try { + // 先查询详情 + const detail = await getTimingPlanDetailByHotcoilId(hotCoilId); + const encoilId = detail?.data?.firstRow?.coilid || ''; + if (!encoilId) return; + const res = await getTimingSegByEncoilId(encoilId); const series = res?.data?.series || null; const rows = res?.data?.rows || []; diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue index 9a165f68..3859f3e3 100644 --- a/klp-ui/src/views/wms/delivery/waybill/index.vue +++ b/klp-ui/src/views/wms/delivery/waybill/index.vue @@ -47,6 +47,15 @@ :value="item.value" /> + + + + + + + + + 搜索 重置 From 7eab286e527a1f3ef21aafe4f7ed598dda866616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Mon, 11 May 2026 15:12:20 +0800 Subject: [PATCH 07/11] =?UTF-8?q?feat(crm/objection):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=92=A2=E5=8D=B7=E5=85=B3=E8=81=94=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 为销售异议列表、新增/编辑弹窗、详情页添加钢卷信息展示列 2. 新增钢卷选择组件,支持按订单筛选可发货钢卷 3. 实现钢卷的选择、移除、跳转详情功能 4. 改造提交接口,传递钢卷ID列表 5. 重构原有组件逻辑,优化表单处理流程 --- .../views/crm/components/OrderObjection.vue | 297 +++++++++++------- klp-ui/src/views/crm/objection/index.vue | 120 ++++++- 2 files changed, 303 insertions(+), 114 deletions(-) diff --git a/klp-ui/src/views/crm/components/OrderObjection.vue b/klp-ui/src/views/crm/components/OrderObjection.vue index 88d53e40..869153a8 100644 --- a/klp-ui/src/views/crm/components/OrderObjection.vue +++ b/klp-ui/src/views/crm/components/OrderObjection.vue @@ -42,6 +42,16 @@ 已关闭 + + + - @@ -113,28 +112,28 @@ placeholder="请输入客户诉求" > - @@ -150,17 +149,6 @@ -