feat(linkage): 鞍座改为预备生产位 + 在线改人工触发 + 计划删除
- 上卷鞍座=预备生产位(不生产);投入生产后离开鞍座、进入生产中并转入物料跟踪,鞍座随即空出
- 在线状态改为人工触发:移动到入口端才变在线,引擎不再自动上线(ensure_online 置空)
- 单卷在产:投入生产时若已有在产卷则拒绝
- 物料跟踪显示在产卷实时进度(客户端外推带头长度/进度条)
- 入口跟踪鞍座卡片改为预备生产展示(去掉进度)
- 计划管理新增删除按钮 + DELETE /plan/{id}(生产中不可删)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -78,8 +78,10 @@
|
||||
<td><span :class="['badge', statusBadge(row.status)]">{{ statusLabel(row.status) }}</span></td>
|
||||
<td @click.stop>
|
||||
<span class="action-link" @click="openDialog(row)">编辑</span>
|
||||
<span v-if="row.status === 'online' || row.status === 'ready'"
|
||||
<span v-if="row.status === 'ready' || row.status === 'online'"
|
||||
class="action-link" style="color:var(--accent-green)" @click="openMove(row)">移动</span>
|
||||
<span v-if="row.status !== 'producing'"
|
||||
class="action-link" style="color:var(--accent-red)" @click="removeRow(row)">删除</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="!tableData.length && !loading">
|
||||
@@ -268,7 +270,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPlans, createPlan, updatePlan, confirmPlan as apiConfirm, movePlan, getLastPlanTemplate } from '@/api'
|
||||
import { getPlans, createPlan, updatePlan, deletePlan, confirmPlan as apiConfirm, movePlan, getLastPlanTemplate } from '@/api'
|
||||
|
||||
const SADDLE = '上卷鞍座'
|
||||
const POSITIONS = [
|
||||
@@ -381,6 +383,17 @@ export default {
|
||||
this.$message.success('已上线')
|
||||
this.fetchData()
|
||||
},
|
||||
async removeRow(row) {
|
||||
if (!confirm(`确认删除计划 ${row.cold_coil_no || row.plan_no}?`)) return
|
||||
try {
|
||||
await deletePlan(row.id)
|
||||
this.$message.success('已删除')
|
||||
if (this.selectedRow && this.selectedRow.id === row.id) this.selectedRow = null
|
||||
this.fetchData()
|
||||
} catch (e) {
|
||||
this.$message.error(e?.response?.data?.detail || '删除失败')
|
||||
}
|
||||
},
|
||||
openMove(row) {
|
||||
this.moveDialog = { visible: true, plan: row, target: row.position || '' }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user