diff --git a/docs/double-rack-ddl.sql b/docs/double-rack-ddl.sql
new file mode 100644
index 00000000..74382905
--- /dev/null
+++ b/docs/double-rack-ddl.sql
@@ -0,0 +1,81 @@
+-- 双机架 (double-rack) 数据库 DDL
+-- 在 jdbc:mysql://140.143.206.120:13306/double-rack 上执行
+
+-- 工艺方案主表
+CREATE TABLE IF NOT EXISTS `mill_process_recipe` (
+ `recipe_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `recipe_no` VARCHAR(64) NOT NULL COMMENT '方案记录号(唯一)',
+ `alloy_no` VARCHAR(32) NOT NULL COMMENT '合金号',
+ `pass_count` INT NOT NULL DEFAULT 0 COMMENT '道次数量',
+ `in_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '原料厚度(mm)',
+ `out_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '成品厚度(mm)',
+ `out_width` DECIMAL(8,1) DEFAULT NULL COMMENT '成品宽度(mm)',
+ `status` CHAR(1) NOT NULL DEFAULT '0' COMMENT '状态: 0-正常 1-停用',
+ `del_flag` CHAR(1) NOT NULL DEFAULT '0' COMMENT '删除标志: 0-存在 2-删除',
+ `create_by` VARCHAR(64) DEFAULT NULL,
+ `create_time` DATETIME DEFAULT NULL,
+ `update_by` VARCHAR(64) DEFAULT NULL,
+ `update_time` DATETIME DEFAULT NULL,
+ `remark` VARCHAR(512) DEFAULT NULL,
+ PRIMARY KEY (`recipe_id`),
+ UNIQUE KEY `uk_recipe_no` (`recipe_no`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='双机架工艺方案主表';
+
+-- 工艺方案道次表
+CREATE TABLE IF NOT EXISTS `mill_process_pass` (
+ `pass_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `recipe_id` BIGINT NOT NULL COMMENT '关联方案ID',
+ `pass_no` INT NOT NULL COMMENT '道次序号',
+ `in_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '入口厚度(mm)',
+ `out_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '出口厚度(mm)',
+ `width` DECIMAL(8,1) DEFAULT NULL COMMENT '宽度(mm)',
+ `roll_force` DECIMAL(10,2) DEFAULT NULL COMMENT '轧制力(kN)',
+ `in_tension` DECIMAL(10,2) DEFAULT NULL COMMENT '入口张力(kN)',
+ `out_tension` DECIMAL(10,2) DEFAULT NULL COMMENT '出口张力(kN)',
+ `max_speed` DECIMAL(8,2) DEFAULT NULL COMMENT '最高速度(m/min)',
+ `in_unit_tension` DECIMAL(10,4) DEFAULT NULL COMMENT '入口单位张力(N/mm²)',
+ `out_unit_tension` DECIMAL(10,4) DEFAULT NULL COMMENT '出口单位张力(N/mm²)',
+ `reduction` DECIMAL(8,3) DEFAULT NULL COMMENT '压下量(mm)',
+ `total_reduction` DECIMAL(8,3) DEFAULT NULL COMMENT '总压下量(mm)',
+ `del_flag` CHAR(1) NOT NULL DEFAULT '0' COMMENT '删除标志',
+ `create_by` VARCHAR(64) DEFAULT NULL,
+ `create_time` DATETIME DEFAULT NULL,
+ `update_by` VARCHAR(64) DEFAULT NULL,
+ `update_time` DATETIME DEFAULT NULL,
+ `remark` VARCHAR(512) DEFAULT NULL,
+ PRIMARY KEY (`pass_id`),
+ KEY `idx_recipe_id` (`recipe_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='双机架工艺方案道次表';
+
+-- 生产计划表(轧制队列)
+CREATE TABLE IF NOT EXISTS `mill_production_plan` (
+ `plan_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `plan_no` VARCHAR(64) NOT NULL COMMENT '计划号',
+ `plan_status` CHAR(1) NOT NULL DEFAULT '0' COMMENT '计划状态: 0-待生产 1-生产中 2-完成 3-撤销',
+ `prod_status` VARCHAR(16) NOT NULL DEFAULT 'Idle' COMMENT '生产状态: Idle/Rolling/NextCoil/Done/Error',
+ `sort_no` INT NOT NULL DEFAULT 0 COMMENT '队列序号',
+ `in_mat_no` VARCHAR(64) DEFAULT NULL COMMENT '钢卷编号(入场钢卷号)',
+ `sg_sign` VARCHAR(64) DEFAULT NULL COMMENT '合金牌号',
+ `in_mat_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '采料厚度(mm)',
+ `in_mat_width` DECIMAL(8,1) DEFAULT NULL COMMENT '采料宽度(mm)',
+ `in_mat_wt` DECIMAL(10,3) DEFAULT NULL COMMENT '采料重量(t)',
+ `in_mat_len` DECIMAL(10,2) DEFAULT NULL COMMENT '采料长度(m)',
+ `in_mat_in_dia` DECIMAL(8,1) DEFAULT NULL COMMENT '采料内径(mm)',
+ `in_mat_dia` DECIMAL(8,1) DEFAULT NULL COMMENT '采料外径(mm)',
+ `out_thick` DECIMAL(8,3) DEFAULT NULL COMMENT '成品厚度(mm)',
+ `pass_count` INT NOT NULL DEFAULT 0 COMMENT '道次数',
+ `recipe_id` BIGINT DEFAULT NULL COMMENT '关联工艺方案ID',
+ `recipe_no` VARCHAR(64) DEFAULT NULL COMMENT '工艺方案号',
+ `enter_coil_no` VARCHAR(64) DEFAULT NULL COMMENT '关联三级入场钢卷号',
+ `current_coil_no` VARCHAR(64) DEFAULT NULL COMMENT '关联三级当前钢卷号',
+ `del_flag` CHAR(1) NOT NULL DEFAULT '0' COMMENT '删除标志',
+ `create_by` VARCHAR(64) DEFAULT NULL,
+ `create_time` DATETIME DEFAULT NULL,
+ `update_by` VARCHAR(64) DEFAULT NULL,
+ `update_time` DATETIME DEFAULT NULL,
+ `remark` VARCHAR(512) DEFAULT NULL,
+ PRIMARY KEY (`plan_id`),
+ KEY `idx_in_mat_no` (`in_mat_no`),
+ KEY `idx_enter_coil_no` (`enter_coil_no`),
+ KEY `idx_current_coil_no` (`current_coil_no`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='双机架生产计划表(轧制队列)';
diff --git a/klp-admin/src/main/resources/application-dev.yml b/klp-admin/src/main/resources/application-dev.yml
index a5fe3783..38d92067 100644
--- a/klp-admin/src/main/resources/application-dev.yml
+++ b/klp-admin/src/main/resources/application-dev.yml
@@ -98,6 +98,14 @@ spring:
url: jdbc:mysql://140.143.206.120:3306/cgldb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
username: klp
password: KeLunPu123@
+ # 双机架数据源
+ double-rack:
+ lazy: true
+ type: ${spring.datasource.type}
+ driverClassName: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://140.143.206.120:13306/double-rack?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
+ username: klp
+ password: KeLunPu@123
# Oracle 数据源
acid-l2:
lazy: true
@@ -167,7 +175,7 @@ redisson:
# 客户端名称
clientName: ${klp.name}
# 最小空闲连接数
- connectionMinimumIdleSize: 8
+ connectionMinimumIdleSize: 4
# 连接池大小
connectionPoolSize: 32
# 连接空闲超时,单位:毫秒
diff --git a/klp-admin/src/main/resources/application-prod.yml b/klp-admin/src/main/resources/application-prod.yml
index 5a18a336..f4555360 100644
--- a/klp-admin/src/main/resources/application-prod.yml
+++ b/klp-admin/src/main/resources/application-prod.yml
@@ -103,6 +103,15 @@ spring:
password: root
hikari:
connectionTestQuery: SELECT 1 FROM DUAL
+
+ # 双机架数据源
+ double-rack:
+ lazy: true
+ type: ${spring.datasource.type}
+ driverClassName: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://140.143.206.120:13306/double-rack?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
+ username: klp
+ password: KeLunPu@123
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
diff --git a/klp-ui/src/api/wms/drMill.js b/klp-ui/src/api/wms/drMill.js
new file mode 100644
index 00000000..83868bd2
--- /dev/null
+++ b/klp-ui/src/api/wms/drMill.js
@@ -0,0 +1,100 @@
+import request from '@/utils/request'
+
+// ── 双机架工艺规程 ──
+
+export function listDrRecipe(params) {
+ return request({ url: '/dr/mill/recipe/list', method: 'get', params })
+}
+
+export function getDrRecipeDetail(id) {
+ return request({ url: `/dr/mill/recipe/${id}`, method: 'get' })
+}
+
+export function addDrRecipe(data) {
+ return request({ url: '/dr/mill/recipe', method: 'post', data })
+}
+
+export function updateDrRecipe(data) {
+ return request({ url: '/dr/mill/recipe', method: 'put', data })
+}
+
+export function delDrRecipe(ids) {
+ return request({ url: `/dr/mill/recipe/${ids}`, method: 'delete' })
+}
+
+// ── 双机架工艺规程版本 ──
+
+export function listDrRecipeVersions(recipeId) {
+ return request({ url: `/dr/mill/recipe/version/list/${recipeId}`, method: 'get' })
+}
+
+export function getDrRecipeVersionDetail(versionId) {
+ return request({ url: `/dr/mill/recipe/version/${versionId}`, method: 'get' })
+}
+
+export function addDrRecipeVersion(data) {
+ return request({ url: '/dr/mill/recipe/version', method: 'post', data })
+}
+
+export function updateDrRecipeVersion(data) {
+ return request({ url: '/dr/mill/recipe/version', method: 'put', data })
+}
+
+export function activateDrRecipeVersion(versionId) {
+ return request({ url: `/dr/mill/recipe/version/activate/${versionId}`, method: 'put' })
+}
+
+export function delDrRecipeVersion(versionId) {
+ return request({ url: `/dr/mill/recipe/version/${versionId}`, method: 'delete' })
+}
+
+// ── 双机架生产计划 ──
+
+export function listDrPlan(params) {
+ return request({ url: '/dr/mill/plan/list', method: 'get', params })
+}
+
+export function addDrPlan(data) {
+ return request({ url: '/dr/mill/plan', method: 'post', data })
+}
+
+export function updateDrPlan(data) {
+ return request({ url: '/dr/mill/plan', method: 'put', data })
+}
+
+export function delDrPlan(id) {
+ return request({ url: `/dr/mill/plan/${id}`, method: 'delete' })
+}
+
+export function getDrPlanByActionId(actionId) {
+ return request({ url: `/dr/mill/plan/byAction/${actionId}`, method: 'get' })
+}
+
+/** 实绩分页查询(double-rack 库,按创建时间倒序) */
+export function listDrActualPage(params) {
+ return request({ url: '/dr/mill/plan/actual/page', method: 'get', params })
+}
+
+export function moveUpDrPlan(id) {
+ return request({ url: `/dr/mill/plan/moveUp/${id}`, method: 'put' })
+}
+
+export function moveDownDrPlan(id) {
+ return request({ url: `/dr/mill/plan/moveDown/${id}`, method: 'put' })
+}
+
+export function finishDrPlan(id) {
+ return request({ url: `/dr/mill/plan/finish/${id}`, method: 'put' })
+}
+
+// ── WMS 钢卷号查询(供计划绑定) ──
+
+export function queryCoilByNo(coilNo) {
+ return request({ url: '/wms/materialCoil/queryByCoilNo', method: 'get', params: { coilNo } })
+}
+
+// ── 双机架操作录入(保存 coilWarehouseOperationLog) ──
+
+import { addCoilWarehouseOperationLog, listCoilWarehouseOperationLog } from '@/api/wms/coilWarehouseOperationLog'
+
+export { addCoilWarehouseOperationLog, listCoilWarehouseOperationLog }
diff --git a/klp-ui/src/components/CoilSelector/index.vue b/klp-ui/src/components/CoilSelector/index.vue
index 8bf21d68..0e2d6efa 100644
--- a/klp-ui/src/components/CoilSelector/index.vue
+++ b/klp-ui/src/components/CoilSelector/index.vue
@@ -142,7 +142,7 @@
-
+
diff --git a/klp-ui/src/layout/components/TagsView/ScrollPane.vue b/klp-ui/src/layout/components/TagsView/ScrollPane.vue
index f92d99b7..b7251076 100644
--- a/klp-ui/src/layout/components/TagsView/ScrollPane.vue
+++ b/klp-ui/src/layout/components/TagsView/ScrollPane.vue
@@ -88,6 +88,12 @@ export default {
}
.el-scrollbar__wrap {
height: 39px;
+ overflow-x: auto;
+ overflow-y: hidden;
+ }
+ .el-scrollbar__view {
+ display: inline-block; /* 让所有 tag 排在同一行,不换行 */
+ white-space: nowrap;
}
}
}
diff --git a/klp-ui/src/layout/components/TagsView/index.vue b/klp-ui/src/layout/components/TagsView/index.vue
index 3d898700..d780c960 100644
--- a/klp-ui/src/layout/components/TagsView/index.vue
+++ b/klp-ui/src/layout/components/TagsView/index.vue
@@ -245,7 +245,7 @@ export default {
// background: #454c51;
border-bottom: 1px solid #a0a6ad;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.05) inset;
-
+
.tags-view-wrapper {
.tags-view-item {
display: inline-block;
@@ -253,6 +253,7 @@ export default {
cursor: pointer;
height: 26px;
line-height: 26px;
+ white-space: nowrap;
border: 1px solid #a0a6ad;
color: #111;
// 标签金属渐变背景
@@ -262,32 +263,32 @@ export default {
margin-left: 5px;
margin-top: 4px;
border-radius: 4px;
- box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1),
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1),
-1px -1px 2px rgba(255, 255, 255, 0.05);
transition: all 0.2s ease;
-
+
&:first-of-type {
margin-left: 15px;
}
-
+
&:last-of-type {
margin-right: 15px;
}
-
+
&:hover {
- box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15),
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15),
-1px -1px 2px rgba(255, 255, 255, 0.08);
border-color: #8d939b;
}
-
+
&.active {
// 激活状态主色调渐变
background: linear-gradient(145deg, #6b809d, #637994);
color: #fff;
border-color: #5a6d86;
- box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15),
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15),
-1px -1px 2px rgba(255, 255, 255, 0.1) inset;
-
+
&::before {
content: '';
background: rgba(255, 255, 255, 0.8);
@@ -302,7 +303,7 @@ export default {
}
}
}
-
+
.contextmenu {
margin: 0;
// 右键菜单金属背景
@@ -317,15 +318,15 @@ export default {
font-size: 12px;
font-weight: 400;
color: #606266;
- box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.15),
+ box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.15),
-2px -2px 5px rgba(255, 255, 255, 0.08);
-
+
li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
transition: all 0.2s ease;
-
+
&:hover {
background: rgba(99, 121, 148, 0.15);
color: #637994;
@@ -349,13 +350,13 @@ export default {
transition: all .3s cubic-bezier(.645, .045, .355, 1);
transform-origin: 100% 50%;
margin-left: 4px;
-
+
&:before {
transform: scale(.6);
display: inline-block;
vertical-align: -3px;
}
-
+
&:hover {
background-color: rgba(0, 0, 0, 0.15);
color: #ddd;
@@ -363,7 +364,7 @@ export default {
inset -1px -1px 2px rgba(255, 255, 255, 0.05);
}
}
-
+
&.active {
.el-icon-close:hover {
background-color: rgba(255, 255, 255, 0.2);
@@ -372,4 +373,4 @@ export default {
}
}
}
-
\ No newline at end of file
+
diff --git a/klp-ui/src/views/micro/pages/acid/index.vue b/klp-ui/src/views/micro/pages/acid/index.vue
index 0675fa83..e8e39034 100644
--- a/klp-ui/src/views/micro/pages/acid/index.vue
+++ b/klp-ui/src/views/micro/pages/acid/index.vue
@@ -1,11 +1,7 @@
diff --git a/klp-ui/src/views/micro/pages/dr/components/Actual.vue b/klp-ui/src/views/micro/pages/dr/components/Actual.vue
new file mode 100644
index 00000000..eb1f4fdc
--- /dev/null
+++ b/klp-ui/src/views/micro/pages/dr/components/Actual.vue
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.enterCoilNo || row.inMatNo || '—' }}
+
+
+ {{ row.currentCoilNo || '—' }}
+
+
+ {{ row.alloyNo || '—' }}
+
+
+
+
+ {{ planStatusLabel(row.planStatus) }}
+
+
+
+
+
+
+ {{ row.prodStatus || '—' }}
+
+
+
+
+ {{ row.inMatThick || '—' }}
+
+
+ {{ row.inMatWidth || '—' }}
+
+
+ {{ row.inMatWeight || '—' }}
+
+
+
+ {{ row.outThick || '—' }}
+
+
+
+ {{ row.passCount || '—' }}
+
+
+ {{ row.recipeNo || '—' }}
+
+
+ {{ formatDate(row.createTime) }}
+
+
+ {{ row.createBy || '—' }}
+
+
+ {{ row.remark || '—' }}
+
+
+
+
+
+
+
+
+
+
+
+
查找
+
+
+ 钢卷号
+
+
+
+
+ 开始时间
+
+
+
+
+ 结束时间
+
+
+
+
+ 查找
+ 重置
+
+
+
+
+
+
计划详情
+
+
+ 计划号
+ {{ selectedRow.planNo }}
+
+
+ 入场卷号
+ {{ selectedRow.enterCoilNo || selectedRow.inMatNo || '—' }}
+
+
+ 出口卷号
+ {{ selectedRow.currentCoilNo || '—' }}
+
+
+ 合金牌号
+ {{ selectedRow.alloyNo || '—' }}
+
+
+ 来料厚
+ {{ selectedRow.inMatThick ? selectedRow.inMatThick + ' mm' : '—' }}
+
+
+ 来料宽
+ {{ selectedRow.inMatWidth ? selectedRow.inMatWidth + ' mm' : '—' }}
+
+
+ 来料重
+ {{ selectedRow.inMatWeight ? selectedRow.inMatWeight + ' t' : '—' }}
+
+
+ 来料长
+ {{ selectedRow.inMatLength ? selectedRow.inMatLength + ' m' : '—' }}
+
+
+ 成品厚
+ {{ selectedRow.outThick ? selectedRow.outThick + ' mm' : '—' }}
+
+
+ 道次数
+ {{ selectedRow.passCount || '—' }}
+
+
+ 工艺方案
+ {{ selectedRow.recipeNo || '—' }}
+
+
+ 计划状态
+
+
+ {{ planStatusLabel(selectedRow.planStatus) }}
+
+
+
+
+ 生产状态
+
+
+ {{ selectedRow.prodStatus || '—' }}
+
+
+
+
+ 创建人
+ {{ selectedRow.createBy || '—' }}
+
+
+ 创建时间
+ {{ formatDate(selectedRow.createTime) }}
+
+
+ 备注
+ {{ selectedRow.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/micro/pages/dr/components/Plan.vue b/klp-ui/src/views/micro/pages/dr/components/Plan.vue
new file mode 100644
index 00000000..46e56f0b
--- /dev/null
+++ b/klp-ui/src/views/micro/pages/dr/components/Plan.vue
@@ -0,0 +1,516 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ prodStatusLabel(row.prodStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请在上方选择一条计划
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.reduction }}
+
+
+ {{ row.totalReduction }}
+
+
+
+
+
+
+
+
该计划尚未绑定工艺参数
+
+ 选择已有方案
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 不显示已完成
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+ 新增计划
+ 修改
+ 完成
+ 删除
+ Up 上移
+ Down 下移
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mm
+
+
+
+
+ mm
+
+
+
+
+ mm
+
+
+
+
+ t
+
+
+
+
+ m
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 该方案暂无版本,请先在「规程」页新增版本
+
+
+
+
+ 取消
+ 确定绑定
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/micro/pages/dr/components/ProcessSpec.vue b/klp-ui/src/views/micro/pages/dr/components/ProcessSpec.vue
new file mode 100644
index 00000000..cd68086f
--- /dev/null
+++ b/klp-ui/src/views/micro/pages/dr/components/ProcessSpec.vue
@@ -0,0 +1,485 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{ r.recipeNo }}
+
{{ r.alloyNo }} · {{ r.inThick }}→{{ r.outThick }}mm
+
+
暂无方案
+
+
+
+
+
+
+
+
+
+ {{ v.versionCode }}
+ 激活
+ 已发布
+ 草稿
+
+
{{ v.remark }}
+
+ 激活
+ 删除
+
+
+
暂无版本,请新增
+
请先选择方案
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.passNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.reduction }}
+
+
+ {{ row.totalReduction }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mm
+
+
+ mm
+
+
+ mm
+
+
+
+ 取消
+ 确定
+ 删除
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/micro/pages/dr/index.vue b/klp-ui/src/views/micro/pages/dr/index.vue
new file mode 100644
index 00000000..acbf332f
--- /dev/null
+++ b/klp-ui/src/views/micro/pages/dr/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/timing/acid/rollConfig.vue b/klp-ui/src/views/timing/acid/rollConfig.vue
new file mode 100644
index 00000000..3ce9290f
--- /dev/null
+++ b/klp-ui/src/views/timing/acid/rollConfig.vue
@@ -0,0 +1,355 @@
+
+
+
+
+
+
+
+
+ | 机架 |
+ 位置 |
+ 备 辊 |
+ 在线辊 |
+ 换辊参考 |
+
+
+
+ | 辊号 |
+ 外径(mm) |
+ 凸度 |
+ 粗糙度 |
+
+ 辊号 |
+ 上/下 |
+ 辊型 |
+ 直径(mm) |
+ 凸度 |
+ 粗糙度 |
+ 本次长度 |
+ 本次重量 |
+ 安装时间 |
+
+ 本次长度 |
+ 累计长度 |
+ 本次重量 |
+ 累计重量 |
+
+
+
+
+
+ |
+ {{ stand.name }}
+ |
+ {{ pos.label }} |
+
+
+ {{ sv(pos.standby, 'rollid') }} |
+ {{ nv(pos.standby, 'diameter') }} |
+ {{ nv(pos.standby, 'crown') }} |
+ {{ nv(pos.standby, 'rough') }} |
+
+
+ {{ sv(pos.online, 'rollid') }} |
+ {{ dispPos(pos.online && pos.online.position) }} |
+
+
+ {{ dispType(pos.online && pos.online.type) }}
+
+ |
+ {{ nv(pos.online, 'diameter') }} |
+ {{ nv(pos.online, 'crown') }} |
+ {{ nv(pos.online, 'rough') }} |
+ {{ iv(pos.online, 'rolled_length') }} |
+ {{ iv(pos.online, 'rolled_weight') }} |
+ {{ dv(pos.online, 'instal_time') }} |
+
+
+ {{ iv(pos.online, 'rolled_length') }} |
+ {{ iv(pos.online, 'total_rolled_length') }} |
+ {{ iv(pos.online, 'rolled_weight') }} |
+ {{ iv(pos.online, 'total_rolled_weight') }} |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/timing/acid/rollHistory.vue b/klp-ui/src/views/timing/acid/rollHistory.vue
new file mode 100644
index 00000000..c00b93f1
--- /dev/null
+++ b/klp-ui/src/views/timing/acid/rollHistory.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
酸轧换辊历史
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+ {{ standName(row.standid) }}
+
+
+ {{ dispPos(row.position) }}
+
+
+
+ {{ dispType(row.type) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ fmtDate(row.instal_time) }}
+
+
+ {{ fmtDate(row.deinstal_time) }}
+
+
+ {{ fmtDate(row.change_time) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/coil/do/dr-normal.vue b/klp-ui/src/views/wms/coil/do/dr-normal.vue
new file mode 100644
index 00000000..874dc0b0
--- /dev/null
+++ b/klp-ui/src/views/wms/coil/do/dr-normal.vue
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 出口实绩
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+
+ 新增录入(同步创建计划)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ coilInfo.enterCoilNo }}
+ {{ coilInfo.currentCoilNo }}
+ {{ coilInfo.actualThickness }} mm
+ {{ coilInfo.actualWidth }} mm
+ {{ coilInfo.netWeight }} t
+ {{ coilInfo.length }} m
+ {{ coilInfo.qualityStatus }}
+ {{ coilInfo.materialType }}
+
+
+ 写入表单
+
+
+
+ 输入入场钢卷号后自动查询
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/coil/do/dr-repair.vue b/klp-ui/src/views/wms/coil/do/dr-repair.vue
new file mode 100644
index 00000000..3c1bf4a1
--- /dev/null
+++ b/klp-ui/src/views/wms/coil/do/dr-repair.vue
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修复参数
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+
+ 新增修复录入(同步创建计划)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ coilInfo.enterCoilNo }}
+ {{ coilInfo.currentCoilNo }}
+ {{ coilInfo.actualThickness }} mm
+ {{ coilInfo.actualWidth }} mm
+ {{ coilInfo.netWeight }} t
+ {{ coilInfo.length }} m
+ {{ coilInfo.qualityStatus }}
+
+
+ 写入表单
+
+
+
+ 输入入场钢卷号后自动查询
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/coil/do/split.vue b/klp-ui/src/views/wms/coil/do/split.vue
index 9c2387c8..fd534c40 100644
--- a/klp-ui/src/views/wms/coil/do/split.vue
+++ b/klp-ui/src/views/wms/coil/do/split.vue
@@ -33,6 +33,7 @@
{value: '1988150263284953089', label: '镀锌原料库'},
{value: '1988150323162836993', label: '镀锌成品库'},
{value: '1988150487185289217', label: '镀锌纵剪分条原料库'},
+ {value: '2056545127927787522', label: '镀锌待打包'}
],
'脱脂工序': [
{value: '1988150545175736322', label: '脱脂原料库'},
diff --git a/klp-ui/src/views/wms/coil/panels/DrMatchPanel.vue b/klp-ui/src/views/wms/coil/panels/DrMatchPanel.vue
new file mode 100644
index 00000000..4646b7ce
--- /dev/null
+++ b/klp-ui/src/views/wms/coil/panels/DrMatchPanel.vue
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+ 计划号
+ {{ plan.planNo }}
+
+
+ 合金牌号
+ {{ plan.alloyNo || '—' }}
+
+
+ 采料厚度
+ {{ plan.inMatThick != null ? plan.inMatThick + ' mm' : '—' }}
+
+
+ 成品厚度
+ {{ plan.outThick != null ? plan.outThick + ' mm' : '—' }}
+
+
+ 采料宽度
+ {{ plan.inMatWidth != null ? plan.inMatWidth + ' mm' : '—' }}
+
+
+ 采料重量
+ {{ plan.inMatWeight != null ? plan.inMatWeight + ' t' : '—' }}
+
+
+ 采料长度
+ {{ plan.inMatLength != null ? plan.inMatLength + ' m' : '—' }}
+
+
+ 绑定方案
+ {{ plan.recipeNo || '未绑定' }}
+
+
+
+
+
+ 写入计划数据(重量/宽度/长度/厚度)
+
+
+
+
+
未找到关联的双机架计划
+
+
+
+
+
+
+
+
+
+ {{ row.inThick != null ? row.inThick : '—' }}
+
+
+
+ {{ row.outThick != null ? row.outThick : '—' }}
+
+
+
+ {{ row.rollForce != null ? row.rollForce : '—' }}
+
+
+
+ 写入
+
+
+
+
+
↑ 通常选最后一道次的出口厚度作为成品实测厚度
+
+
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/coil/split.vue b/klp-ui/src/views/wms/coil/split.vue
index e3a6713d..2775ba04 100644
--- a/klp-ui/src/views/wms/coil/split.vue
+++ b/klp-ui/src/views/wms/coil/split.vue
@@ -680,7 +680,7 @@ export default {
}))
};
- const response = await splitMaterialCoil(splitData);
+ const response = await splitMaterialCoil({ ...splitData, actionId: this.actionId });
if (response.code === 200) {
this.$message.success('分条保存成功');
@@ -698,9 +698,9 @@ export default {
}));
// 如果是从待操作列表进来的,标记操作为完成
- if (this.actionId) {
- await completeAction(this.actionId, response.msg);
- }
+ // if (this.actionId) {
+ // await completeAction(this.actionId, response.msg);
+ // }
// 延迟返回,让用户看到成功提示
setTimeout(() => {
diff --git a/klp-ui/src/views/wms/coil/typing.vue b/klp-ui/src/views/wms/coil/typing.vue
index 34c30e14..2eff8fe2 100644
--- a/klp-ui/src/views/wms/coil/typing.vue
+++ b/klp-ui/src/views/wms/coil/typing.vue
@@ -7,7 +7,7 @@
钢卷信息更新
-->
@@ -26,9 +26,10 @@
-
+
-
+
+
@@ -326,7 +327,8 @@ import AbnormalForm from './components/AbnormalForm';
import { generateCoilNoPrefix } from "@/utils/coil/coilNo";
import { addCoilContractRel } from "@/api/wms/coilContractRel";
import ContractSelect from "@/components/KLPService/ContractSelect";
-import L2MatchPanel from './panels/L2MatchPanel.vue';
+import L2MatchPanel from './panels/L2MatchPanel.vue'
+import DrMatchPanel from './panels/DrMatchPanel.vue';
export default {
@@ -340,6 +342,7 @@ export default {
AbnormalForm,
ContractSelect,
L2MatchPanel,
+ DrMatchPanel,
},
dicts: ['coil_quality_status', 'coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree', 'coil_business_purpose'],
data() {
@@ -429,6 +432,7 @@ export default {
],
},
actionId: null,
+ actionType: null, // 待操作类型,504/524 = 双机架
acidPrefill: {
visible: false,
type: 'info',
@@ -462,6 +466,10 @@ export default {
l2HotCoilId() {
return (this.currentInfo && this.currentInfo.enterCoilNo) || ''
},
+ /** 是否双机架工序(actionType 504=正常 / 524=修复) */
+ isDrAction() {
+ return this.actionType === 504 || this.actionType === 524
+ },
// 动态显示标签
getItemLabel() {
if (this.updateForm.materialType === '成品') {
@@ -490,6 +498,11 @@ export default {
// 填写生产开始时间
this.$set(this.updateForm, 'productionStartTime', pendingActionRes.data.createTime)
+ // 记录操作类型(用于判断是否双机架工序)
+ if (pendingActionRes.data && pendingActionRes.data.actionType != null) {
+ this.actionType = pendingActionRes.data.actionType
+ }
+
if (coilId) {
await this.loadCoilInfo(coilId);
}
@@ -523,6 +536,20 @@ export default {
}
},
methods: {
+ /** 双机架计划/道次快捷写入 */
+ applyDrFill(data) {
+ if (data.outThick != null) this.$set(this.updateForm, 'actualThickness', parseFloat(data.outThick))
+ if (data.inMatWidth != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.inMatWidth))
+ if (data.inMatWeight != null) {
+ this.$set(this.updateForm, 'netWeight', parseFloat(data.inMatWeight))
+ this.$set(this.updateForm, 'grossWeight', parseFloat(data.inMatWeight))
+ }
+ if (data.inMatLength != null) {
+ this.$set(this.updateForm, 'actualLength', parseFloat(data.inMatLength))
+ this.$set(this.updateForm, 'length', parseFloat(data.inMatLength))
+ }
+ },
+
applyL2Fill(data) {
if (data.entry_weight != null) {
const w = parseFloat(data.entry_weight)
@@ -686,7 +713,7 @@ export default {
abnormals: this.abnormals,
};
- const response = await updateMaterialCoil(updateData);
+ const response = await updateMaterialCoil({ ...updateData, actionId: this.actionId });
// 更新完成后如果选定了合同,需要增加与合同的绑定关系
const coilId = response.msg;
@@ -701,11 +728,9 @@ export default {
this.$message.success('钢卷信息更新成功');
// 如果是从待操作列表进来的,标记操作为完成
- if (this.actionId) {
- await completeAction(this.actionId, response.msg);
- }
-
-
+ // if (this.actionId) {
+ // await completeAction(this.actionId, response.msg);
+ // }
// 延迟返回
setTimeout(() => {
diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue
index 22acffa5..ece8ba29 100644
--- a/klp-ui/src/views/wms/delivery/waybill/index.vue
+++ b/klp-ui/src/views/wms/delivery/waybill/index.vue
@@ -26,8 +26,8 @@
-
+
@@ -55,7 +55,7 @@
-
+
搜索
重置
@@ -113,7 +113,8 @@
-
+
@@ -140,7 +141,8 @@
-
+
@@ -190,8 +192,10 @@
-
-
+
+
@@ -642,18 +646,24 @@ export default {
handlePrint(row, printType) {
this.loading = true;
this.printType = printType || 0;
- updateDeliveryWaybill({
- waybillId: row.waybillId,
- status: 2
- }).then(() => {
- row.status = 2;
- });
// 获取发货单明细
listDeliveryWaybillDetail({
waybillId: row.waybillId,
pageNum: 1,
pageSize: 1000 // 获取所有明细
}).then(response => {
+ // 该发货单不能是空的
+ if (response.rows.length === 0) {
+ this.$modal.msgError("发货单为空不能打印");
+ this.loading = false;
+ return;
+ }
+ updateDeliveryWaybill({
+ waybillId: row.waybillId,
+ status: 2
+ }).then(() => {
+ row.status = 2;
+ });
// 处理字段映射,确保与wayBill组件使用的字段名一致
this.currentWaybillDetails = response.rows.map(item => ({
coilId: item.coilId,
diff --git a/klp-ui/src/views/wms/mill/dr-plan.vue b/klp-ui/src/views/wms/mill/dr-plan.vue
new file mode 100644
index 00000000..b3f06c84
--- /dev/null
+++ b/klp-ui/src/views/wms/mill/dr-plan.vue
@@ -0,0 +1,385 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ prodStatusLabel(row.prodStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请在上方选择一条计划
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.reduction }}
+
+
+ {{ row.totalReduction }}
+
+
+
+
+
+
+
+
该计划尚未绑定工艺参数
+
+ 选择已有方案
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 不显示已完成
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+ 新增计划
+ 修改
+ 完成
+ 删除
+ Up 上移
+ Down 下移
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mm
+
+
+
+
+ mm
+
+
+
+
+ mm
+
+
+
+
+ t
+
+
+
+
+ m
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定绑定
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/mill/dr-process.vue b/klp-ui/src/views/wms/mill/dr-process.vue
new file mode 100644
index 00000000..357981d4
--- /dev/null
+++ b/klp-ui/src/views/wms/mill/dr-process.vue
@@ -0,0 +1,461 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{ r.recipeNo }}
+
{{ r.alloyNo }} · {{ r.inThick }}→{{ r.outThick }}mm
+
+ 编辑
+ 删除
+
+
+
暂无方案
+
+
+
+
+
+
+
+
+
+ {{ v.versionCode }}
+ 激活
+ 已发布
+ 草稿
+
+
{{ v.remark }}
+
+ 激活
+ 删除
+
+
+
暂无版本,请新增
+
请先选择方案
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.passNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.reduction }}
+
+
+ {{ row.totalReduction }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mm
+
+
+ mm
+
+
+ mm
+
+
+
+ 取消
+ 确定
+ 删除
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/processSpec/planSpec.vue b/klp-ui/src/views/wms/processSpec/planSpec.vue
index 25035a53..51228f16 100644
--- a/klp-ui/src/views/wms/processSpec/planSpec.vue
+++ b/klp-ui/src/views/wms/processSpec/planSpec.vue
@@ -65,7 +65,7 @@
/>
- 点位名称:
+ 参数名称:
新建参数
+ 新建方案点位
+ >管理点位
模板导入
-
+
-
-
- {{ segLabel(row.segmentType) }} › {{ row.segmentName || '—' }}
-
-
-
-
+
- 编辑
- 参数
- 删除
+ {{ row._segmentLabel }}
+
+
+
+
+
+
+
+
+
+
+
+ 异常
+
+
+ 正常
+
+ —
+
+
+
+
+ 编辑
+ 删除
-
-
-
-
-
-
-
-
- {{ row.actualSrcId || '—' }}
-
-
- {{ row.presetSrcId || '—' }}
-
-
-
-
-
-
- {{ (row.updateTime || row.createTime || '').substring(0, 16) || '—' }}
-
-
-
-
- 异常
-
-
- 正常
-
- —
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
-
-
-
- {{ row.storedTarget != null ? row.storedTarget : '—' }}
-
-
- {{ row.storedUpper != null ? row.storedUpper : '—' }}
-
-
- {{ row.storedLower != null ? row.storedLower : '—' }}
-
-
-
-
- {{ row.actualMax != null ? row.actualMax : '—' }}
-
-
-
-
-
-
- {{ row.actualMin != null ? row.actualMin : '—' }}
-
-
-
-
-
- +{{ row.deviationMax }}
- —
-
-
-
-
- {{ row.deviationMin }}
- —
-
-
-
-
- {{ (row.detectedAt || '').substring(0, 16) || '—' }}
-
-
-
- 超上限
- 低于下限
-
-
-
-
-
-
-
-
@@ -361,6 +274,16 @@
+
+
+
+
+
@@ -488,7 +411,7 @@ const TEMPLATE_HEADERS = ['段类型', '段名称', '点位名称', '参数名
/** 表头字段映射 */
const HEADER_MAP = {
'段类型': 'segmentType',
- '段名称': 'segmentName',
+ '段名称': 'segmentName',
'点位名称': 'pointName',
'参数名称': 'paramName',
'设定值': 'targetValue',
@@ -514,9 +437,8 @@ export default {
appliedFilterName: '',
planList: [],
planLoading: false,
- selectedPlan: null,
- paramList: [],
- paramLoading: false,
+ allParamList: [],
+ allParamLoading: false,
planOpen: false,
planTitle: '',
planSubmitLoading: false,
@@ -531,6 +453,7 @@ export default {
paramSubmitLoading: false,
paramForm: {},
paramRules: {
+ planId: [{ required: true, message: '请选择所属点位', trigger: 'change' }],
paramCode: [{ required: true, message: '参数编码不能为空', trigger: 'blur' }],
paramName: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }]
},
@@ -632,12 +555,6 @@ export default {
extra.sort((a, b) => String(a.label).localeCompare(String(b.label), 'zh-CN'))
return [...SEGMENT_FORM_OPTIONS, ...extra]
},
- /** 当前选中点位下的异常条目 */
- planAnomalies() {
- if (!this.selectedPlan) return []
- return this.allAnomalies.filter(a => a.paramCode === this.selectedPlan.pointCode ||
- this.paramList.some(p => p.paramCode === a.paramCode))
- },
/** paramCode → anomaly 的快速索引(用于状态列) */
paramAnomalyMap() {
const map = {}
@@ -648,45 +565,42 @@ export default {
if (!this.coilAnomalyCoilId) return []
return this.allAnomalies.filter(a => a.coilId === this.coilAnomalyCoilId)
},
- filteredPlans() {
+ /** 所有 plan 的参数平铺成一行,带 plan 的段/点位信息 */
+ flatRows() {
+ const SEG_LABELS = { INLET: '入口段', PROCESS: '工艺段', OUTLET: '出口段' }
+ const planMap = {}
+ for (const plan of this.planList) planMap[plan.planId] = plan
+ const rows = []
+ for (const param of this.allParamList) {
+ const plan = planMap[param.planId]
+ if (!plan) continue
+ rows.push({
+ ...param,
+ _planId: plan.planId,
+ _segmentType: plan.segmentType,
+ _segmentLabel: SEG_LABELS[plan.segmentType] || plan.segmentName || plan.segmentType,
+ _pointName: plan.pointName,
+ _sortOrder: plan.sortOrder || 0
+ })
+ }
+ rows.sort((a, b) => {
+ const s = (a._sortOrder || 0) - (b._sortOrder || 0)
+ return s !== 0 ? s : (a.paramId || 0) - (b.paramId || 0)
+ })
+ return rows
+ },
+ filteredFlatRows() {
const type = this.activeSegmentType
- const sub = this.activeSegmentName
- return this.planList.filter(p => {
- const typeOk =
- type === '' || type === undefined || type === null
- ? true
- : String(p.segmentType) === String(type)
- let nameOkSeg = true
- if (typeOk && type !== '' && type !== undefined && type !== null) {
- if (sub === '' || sub === undefined || sub === null) {
- nameOkSeg = true
- } else if (sub === '__EMPTY__') {
- const sn = p.segmentName != null ? String(p.segmentName).trim() : ''
- nameOkSeg = !sn
- } else {
- const sn = p.segmentName != null ? String(p.segmentName).trim() : ''
- nameOkSeg = sn === String(sub).trim()
- }
- }
- const nameOk = !this.appliedFilterName || (p.pointName || '').includes(this.appliedFilterName)
- return typeOk && nameOkSeg && nameOk
+ const name = this.appliedFilterName
+ return this.flatRows.filter(r => {
+ const typeOk = !type || String(r._segmentType) === String(type)
+ const nameOk = !name || (r.paramName || '').includes(name) || (r.paramCode || '').includes(name)
+ return typeOk && nameOk
})
}
},
watch: {
$route: { immediate: true, handler() { this.syncFromRoute() } },
- planAnomalies: {
- handler(list) {
- if (list.length && this.anomalyExpanded) {
- this.$nextTick(() => this.renderAnomalyChart())
- }
- }
- },
- anomalyExpanded(val) {
- if (val && this.planAnomalies.length) {
- this.$nextTick(() => this.renderAnomalyChart())
- }
- },
segmentTypeTabOptions: {
handler() {
const a = this.activeSegmentType
@@ -852,22 +766,26 @@ export default {
},
loadPlans() {
this.planLoading = true
- this.selectedPlan = null
- this.paramList = []
listProcessPlan({ versionId: this.versionId, pageNum: 1, pageSize: 500 }).then(res => {
this.planList = res.rows || []
+ this.loadAllParams()
}).catch(e => console.error(e)).finally(() => { this.planLoading = false })
},
- loadParams(planId) {
- this.paramLoading = true
- listProcessPlanParam({ planId, pageNum: 1, pageSize: 500 }).then(res => {
- this.paramList = res.rows || []
- }).catch(e => console.error(e)).finally(() => { this.paramLoading = false })
- },
- onPlanSelect(row) {
- if (!row) return
- this.selectedPlan = row
- this.loadParams(row.planId)
+ async loadAllParams() {
+ if (!this.planList.length) { this.allParamList = []; return }
+ this.allParamLoading = true
+ try {
+ const results = await Promise.all(
+ this.planList.map(plan =>
+ listProcessPlanParam({ planId: plan.planId, pageNum: 1, pageSize: 500 })
+ .then(res => res.rows || [])
+ .catch(() => [])
+ )
+ )
+ this.allParamList = results.flat()
+ } finally {
+ this.allParamLoading = false
+ }
},
applyFilter() { this.appliedFilterName = this.filterName },
resetFilter() {
@@ -921,28 +839,33 @@ export default {
}).catch(() => {})
},
openParamDialog(planRow, paramRow) {
- const targetPlan = planRow || this.selectedPlan
- if (!targetPlan) { this.$message.warning('请先选择一个方案点位'); return }
- if (!this.selectedPlan || this.selectedPlan.planId !== targetPlan.planId) {
- this.selectedPlan = targetPlan
- this.loadParams(targetPlan.planId)
- }
this.paramForm = paramRow
? { ...paramRow }
: {
- planId: targetPlan.planId,
- paramCode: undefined,
- paramName: undefined,
+ planId: planRow ? planRow.planId : undefined,
+ paramCode: undefined,
+ paramName: undefined,
targetValue: undefined,
- lowerLimit: undefined,
- upperLimit: undefined,
- unit: undefined,
- remark: undefined
+ lowerLimit: undefined,
+ upperLimit: undefined,
+ unit: undefined,
+ remark: undefined
}
this.paramTitle = paramRow ? '编辑方案参数' : '新建方案参数'
this.paramOpen = true
this.$nextTick(() => this.$refs.paramFormRef && this.$refs.paramFormRef.clearValidate())
},
+ editParamFromFlat(row) {
+ this.openParamDialog(null, row)
+ },
+ deleteParamFromFlat(row) {
+ this.$modal.confirm('确认删除该参数?').then(() => {
+ return delProcessPlanParam(row.paramId)
+ }).then(() => {
+ this.$modal.msgSuccess('删除成功')
+ this.loadAllParams()
+ }).catch(() => {})
+ },
submitParam() {
this.$refs.paramFormRef.validate(ok => {
if (!ok) return
@@ -951,18 +874,10 @@ export default {
req.then(() => {
this.$modal.msgSuccess('保存成功')
this.paramOpen = false
- this.loadParams(this.selectedPlan.planId)
+ this.loadAllParams()
}).catch(e => console.error(e)).finally(() => { this.paramSubmitLoading = false })
})
},
- removeParam(row) {
- this.$modal.confirm('确认删除该参数?').then(() => {
- return delProcessPlanParam(row.paramId)
- }).then(() => {
- this.$modal.msgSuccess('删除成功')
- this.loadParams(this.selectedPlan.planId)
- }).catch(() => {})
- },
// ===================== 导入相关方法 =====================
/**
* 打开导入对话框
@@ -1218,7 +1133,7 @@ export default {
async batchImport() {
// �照点位名称分组,每个点位创建一条记录,然后添加多个参数
const pointGroups = {}
-
+
// 分组处理
this.tableData.forEach(row => {
const pointKey = `${row.segmentType}_${row.segmentName}_${row.pointName}`
@@ -1249,12 +1164,12 @@ export default {
try {
await this.importOnePoint(group)
this.importedCount += group.params.length
-
+
// 更新进度
index += group.params.length
const currentProgress = Math.round((index / this.totalCount) * 100)
this.progress = currentProgress
-
+
await new Promise(resolve => setTimeout(resolve, 50))
} catch (error) {
throw new Error(`导入点位"${group.pointName}"失败:${error.message}`)
@@ -1275,7 +1190,7 @@ export default {
pointCode: group.pointCode,
sortOrder: 0
}
-
+
const planRes = await addProcessPlan(planParams)
if (planRes.code !== 200) {
throw new Error(`点位创建失败:${planRes.msg || '接口返回异常'}`)
@@ -1293,7 +1208,7 @@ export default {
lowerLimit: param.lowerLimit ? Number(param.lowerLimit) : null,
unit: param.unit
}
-
+
const paramRes = await addProcessPlanParam(paramParams)
if (paramRes.code !== 200) {
throw new Error(`参数"${param.paramName}"创建失败:${paramRes.msg || '接口返回异常'}`)
@@ -1354,7 +1269,7 @@ export default {
// 创建工作簿
const wb = XLSX.utils.book_new()
const ws = XLSX.utils.aoa_to_sheet(templateData)
-
+
// 设置列宽
ws['!cols'] = [
{ wch: 10 }, // 段类型
@@ -1366,7 +1281,7 @@ export default {
{ wch: 10 }, // 下限
{ wch: 10 } // 单位
]
-
+
XLSX.utils.book_append_sheet(wb, ws, '导入模板')
XLSX.writeFile(wb, '方案点位导入模板.xlsx')
},
@@ -1558,6 +1473,19 @@ export default {
.btn-danger { color: #f56c6c; }
+/* ── 段 chip ── */
+.seg-chip {
+ display: inline-block;
+ padding: 2px 7px;
+ border-radius: 10px;
+ font-size: 11px;
+ font-weight: 600;
+ white-space: nowrap;
+}
+.seg-inlet { background: #ecf5ff; color: #3a6ea8; border: 1px solid #b3d8ff; }
+.seg-process { background: #f0f9eb; color: #3a7a2a; border: 1px solid #b3e19d; }
+.seg-outlet { background: #fdf6ec; color: #a86a00; border: 1px solid #f5dab1; }
+
/* ── 偏差分析 ── */
.anomaly-section-header {
display: flex;
diff --git a/klp-ui/src/views/wms/report/abnormal.vue b/klp-ui/src/views/wms/report/abnormal.vue
index f36081df..24d5a068 100644
--- a/klp-ui/src/views/wms/report/abnormal.vue
+++ b/klp-ui/src/views/wms/report/abnormal.vue
@@ -37,6 +37,10 @@
+
+
+
@@ -99,14 +103,16 @@
- {settingVisible = true; activeColumnConfig = 'coil-report-output';}">列设置
+ { settingVisible = true; activeColumnConfig = 'coil-report-output'; }">列设置
- {settingVisible = true; activeColumnConfig = 'coil-report-loss';}">列设置
+ { settingVisible = true; activeColumnConfig = 'coil-report-loss'; }">列设置
@@ -147,7 +153,7 @@ export default {
ColumnsSetting,
TimeRangePicker
},
- dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
+ dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
// 工具函数:个位数补零
const addZero = (num) => num.toString().padStart(2, '0')
diff --git a/klp-ui/src/views/wms/report/delivery.vue b/klp-ui/src/views/wms/report/delivery.vue
index fd892589..d3fb6ba6 100644
--- a/klp-ui/src/views/wms/report/delivery.vue
+++ b/klp-ui/src/views/wms/report/delivery.vue
@@ -3,14 +3,8 @@
-
+
+
+
+
查询
导出
@@ -93,7 +91,7 @@ export default {
CoilTable,
TimeRangePicker,
},
- dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
+ dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
const addZero = (num) => num.toString().padStart(2, '0')
diff --git a/klp-ui/src/views/wms/report/receive.vue b/klp-ui/src/views/wms/report/receive.vue
index eb7b3006..4d48bf4b 100644
--- a/klp-ui/src/views/wms/report/receive.vue
+++ b/klp-ui/src/views/wms/report/receive.vue
@@ -20,26 +20,32 @@
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
@@ -115,7 +121,7 @@ export default {
HierarchicalPivot,
CrossTable,
},
- dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
+ dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
const addZero = (num) => num.toString().padStart(2, '0')
diff --git a/klp-ui/src/views/wms/report/template/action.vue b/klp-ui/src/views/wms/report/template/action.vue
index e010e378..38bc67ba 100644
--- a/klp-ui/src/views/wms/report/template/action.vue
+++ b/klp-ui/src/views/wms/report/template/action.vue
@@ -71,12 +71,19 @@
-
-
+
+
+
+
+
查询
@@ -219,7 +226,7 @@ export default {
name: 'MergeTemplate',
props: {
actionType: {
- type: Number,
+ type: [Number, String],
required: true
},
productionLine: {
@@ -246,7 +253,7 @@ export default {
ColumnsSetting,
TimeRangePicker
},
- dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
+ dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
// 工具函数:个位数补零
const addZero = (num) => num.toString().padStart(2, '0')
@@ -466,7 +473,7 @@ export default {
this.loading = true;
// 所有报表类型都使用原始的 listPendingAction 方式获取数据
- const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 });
+ const res = await listPendingAction({ ...this.queryParams, actionTypes: this.actionType, actionStatus: 2 });
// 获取两层数据
const lossIds = res.rows.filter(item => item.coilId).map(item => item.coilId);
const lossActionIds = res.rows.filter(item => item.actionId).map(item => item.actionId);
diff --git a/klp-ui/src/views/wms/report/template/comprehensive.vue b/klp-ui/src/views/wms/report/template/comprehensive.vue
index d2b61d38..510228c4 100644
--- a/klp-ui/src/views/wms/report/template/comprehensive.vue
+++ b/klp-ui/src/views/wms/report/template/comprehensive.vue
@@ -2,8 +2,6 @@
-
-
日视图
月视图
@@ -42,10 +40,14 @@
-
+
+
+
+
+
+
查询
导出产出钢卷
@@ -86,7 +92,6 @@
{{ summary.countDiff }}(昨日: {{ yesterdaySummary.countDiff }})
{{ summary.weightDiff }}(昨日: {{ yesterdaySummary.weightDiff }})
{{ summary.avgWeightDiff }}t(昨日: {{ yesterdaySummary.avgWeightDiff }}t)
-
{{ summary.passRate }}(昨日: {{ yesterdaySummary.passRate }})
@@ -216,7 +221,7 @@ export default {
default: '',
},
},
- dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
+ dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
data() {
// 工具函数:个位数补零
const addZero = (num) => num.toString().padStart(2, '0')
@@ -443,7 +448,7 @@ export default {
fetchOutputList({
...this.queryParams,
...this.baseQueryParams,
- warehouseIds: this.warehouseIds.join(','),
+ // warehouseIds: this.warehouseIds.join(','),
}),
]).then(([lossList, outputList]) => {
this.lossList = lossList
diff --git a/klp-ui/src/views/wms/report/template/day.vue b/klp-ui/src/views/wms/report/template/day.vue
index c9843b98..236368ef 100644
--- a/klp-ui/src/views/wms/report/template/day.vue
+++ b/klp-ui/src/views/wms/report/template/day.vue
@@ -14,10 +14,14 @@
-
+
+
+
+
+
+
查询
导出产出钢卷
@@ -153,6 +161,7 @@ export default {
CoilTable,
SplitSummary,
},
+ dicts: ['coil_quality_status'],
props: {
actionTypes: {
type: Array,
@@ -332,7 +341,7 @@ export default {
fetchOutputList({
...this.queryParams,
...this.baseQueryParams,
- warehouseIds: this.warehouseIds.join(','),
+ // warehouseIds: this.warehouseIds.join(','),
}),
]).then(([lossList, outputList]) => {
this.lossList = lossList
diff --git a/klp-ui/src/views/wms/report/template/loss.vue b/klp-ui/src/views/wms/report/template/loss.vue
index f7601cc3..7f3bba64 100644
--- a/klp-ui/src/views/wms/report/template/loss.vue
+++ b/klp-ui/src/views/wms/report/template/loss.vue
@@ -40,6 +40,10 @@
+
+
+
查询
导出
@@ -111,7 +115,7 @@ export default {
default: '',
},
},
- dicts: ['coil_material', 'coil_manufacturer'],
+ dicts: ['coil_quality_status'],
data() {
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
const addZero = (num) => num.toString().padStart(2, '0')
diff --git a/klp-ui/src/views/wms/report/template/mands.vue b/klp-ui/src/views/wms/report/template/mands.vue
index ce4a55f9..434945e7 100644
--- a/klp-ui/src/views/wms/report/template/mands.vue
+++ b/klp-ui/src/views/wms/report/template/mands.vue
@@ -42,10 +42,14 @@
-
+
+
+
+
+
+
查询
导出产出钢卷
@@ -163,7 +171,6 @@