feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期

This commit is contained in:
SunYF
2026-11-02 19:17:05 +08:00
parent 0c03d32682
commit fd2f0e2767
77 changed files with 1773 additions and 664 deletions
+14 -22
View File
@@ -94,20 +94,13 @@
<span v-else style="color:#909399">全部显示</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120" align="center" fixed="right">
<el-table-column label="操作" width="230" align="center" fixed="right">
<template #default="{ row }">
<div style="display:flex;align-items:center;justify-content:center;gap:8px">
<div style="display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap">
<el-button v-if="can('produce.station:edit') && !row.isBuiltin && row.stationType !== 'OFFLINE'" link type="primary" size="small" @click="openName(row)">编辑</el-button>
<el-dropdown trigger="click" @command="(c) => stationCommand(row, c)">
<el-button link type="primary" size="small">更多 ▾</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="tabs">页签</el-dropdown-item>
<el-dropdown-item v-if="can('produce.station:edit')" :command="row.status === 'ENABLED' ? 'disable' : 'enable'" :style="row.status === 'ENABLED' ? 'color:#e6a23c' : ''">{{ row.status === 'ENABLED' ? '停用' : '启用' }}</el-dropdown-item>
<el-dropdown-item v-if="can('produce.station:delete') && !row.isBuiltin" command="del" divided style="color:#f56c6c">删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button link type="primary" size="small" @click="openTabs(row)">页签</el-button>
<el-button v-if="can('produce.station:edit')" link size="small" :type="row.status === 'ENABLED' ? 'warning' : 'success'" @click="toggleStationStatus(row)">{{ row.status === 'ENABLED' ? '停用' : '启用' }}</el-button>
<el-button v-if="can('produce.station:delete') && !row.isBuiltin" link type="danger" size="small" @click="remove(row)">删除</el-button>
</div>
</template>
</el-table-column>
@@ -116,21 +109,25 @@
<el-dialog v-model="dlg.show" :title="dlg.title" width="440px">
<el-form :model="dlg" label-width="90px">
<el-form-item label="工位号" required>
<el-input-number v-model="dlg.stationNo" :min="0" :max="999" :disabled="!dlg.isAdd" style="width:100%" />
<el-input-number v-model="dlg.stationNo" :min="-999" :max="999" :disabled="!dlg.isAdd" style="width:100%" />
<div v-if="dlg.isAdd && dlg.stationNo >= 1 && dlg.stationNo <= 12" style="color:#F56C6C;font-size:12px;line-height:1.5;margin-top:4px">
物理工位 1~12 为硬件锁定,不可新增
</div>
<div v-if="dlg.isAdd" style="color:#909399;font-size:12px;line-height:1.5;margin-top:4px">
1~12 为物理产线工位(已锁定),0 为虚拟工位,≥13 为扩展工位。创建后不可修改。
1~12 为物理产线工位(已锁定,中间连续、不可插入虚拟工位);负数(-1、-2…)为产线前段虚拟工位(排在工位1之前);≥13 为扩展工位。创建后不可修改。
</div>
</el-form-item>
<el-form-item label="工位名称" required>
<el-input v-model="dlg.name" placeholder="如 一号装配工位" />
</el-form-item>
<el-form-item label="工位类型">
<span>{{ dlg.stationType === 'OFFLINE' ? '线下位(虚拟,不连 PLC)' : '线上位(连 PLC)' }}</span>
<el-select v-if="!dlg.isBuiltin" v-model="dlg.stationType" style="width:100%">
<el-option value="OFFLINE" label="线下位(虚拟,不连 PLC,仅记录)" />
<el-option value="LINE" label="线上位(连 PLC)" />
</el-select>
<span v-else>{{ dlg.stationType === 'OFFLINE' ? '线下位(虚拟,不连 PLC)' : '线上位(连 PLC)' }}</span>
<div style="color:#909399;font-size:12px;line-height:1.5;margin-top:4px">
工位类型由系统按产线初始配置固定,不可修改。
{{ dlg.isBuiltin ? '内置工位类型由产线初始配置固定,不可修改。' : '非内置工位可调整类型(看板按「线下位」统计虚拟工位)。' }}
</div>
</el-form-item>
</el-form>
@@ -232,12 +229,7 @@ async function toggleStationStatus(row) {
load()
}
// 操作列「更多 ▾」分发:页签 / 停用·启用 / 删除(启停互斥:启用显「停用」、停用显「启用」)
function stationCommand(row, c) {
if (c === 'tabs') openTabs(row)
else if (c === 'disable' || c === 'enable') toggleStationStatus(row)
else if (c === 'del') remove(row)
}
// 操作列按钮已外露(2026-11-02):页签/停用·启用/删除直接绑定,不再经"更多"下拉分发
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false })