From fc203acd68bf624302fcc5807123fb6142698dcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Tue, 21 Apr 2026 17:03:13 +0800
Subject: [PATCH] =?UTF-8?q?feat(CoilSelector):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=88=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
feat(anneal/plan): 支持多目标炉选择并优化表单逻辑
- 在CoilSelector组件的数据配置中添加创建时间列
- 修改退火计划表单,支持选择多个目标炉
- 移除未使用的状态更新对话框
- 新增表单提交时对多目标炉的处理逻辑
---
klp-ui/src/components/CoilSelector/data.js | 7 +++
klp-ui/src/views/wms/anneal/plan/index.vue | 50 +++++++++++-----------
2 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/klp-ui/src/components/CoilSelector/data.js b/klp-ui/src/components/CoilSelector/data.js
index 250c2698..3bcbc004 100644
--- a/klp-ui/src/components/CoilSelector/data.js
+++ b/klp-ui/src/components/CoilSelector/data.js
@@ -55,6 +55,13 @@ export const defaultColumns = [
width: '120',
showOverflowTooltip: true
},
+ {
+ label: '创建时间',
+ align: 'center',
+ prop: 'createTime',
+ width: '100',
+ showOverflowTooltip: true
+ },
{
label: '备注',
align: 'center',
diff --git a/klp-ui/src/views/wms/anneal/plan/index.vue b/klp-ui/src/views/wms/anneal/plan/index.vue
index 9d37c77c..8d9e7cb8 100644
--- a/klp-ui/src/views/wms/anneal/plan/index.vue
+++ b/klp-ui/src/views/wms/anneal/plan/index.vue
@@ -208,19 +208,18 @@
-
-
+
+
-
+
@@ -230,22 +229,6 @@
取 消
-
-
-
-
-
@@ -273,6 +256,7 @@ export default {
total: 0,
planList: [],
furnaceOptions: [],
+ targetFurnaces: [],
title: "",
open: false,
statusOpen: false,
@@ -434,6 +418,7 @@ export default {
status: 0,
remark: undefined,
};
+ this.targetFurnaces = [];
this.resetForm("form");
},
resetMaterialForm() {
@@ -488,7 +473,22 @@ export default {
this.buttonLoading = false;
});
} else {
- addAnnealPlan(this.form).then(() => {
+ if (this.targetFurnaces.length === 0) {
+ this.$message.warning('请选择至少一个目标炉');
+ return;
+ }
+ Promise.all(this.targetFurnaces.map(id => {
+ return addAnnealPlan({
+ ...this.form,
+ targetFurnaceId: id,
+ }).then(() => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ }).finally(() => {
+ this.buttonLoading = false;
+ });
+ })).then(() => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();