feat: 全项目列表页操作列规范统一 + 问题.md 六条整改

- 操作列按6条标准统一(WMS 13页/MES 18页):fixed right、宽160超限折更多、一列一填充、危险操作link+二次确认置末、页面级新建移工具栏
- 修复MES物料档案启用报错:改走 POST /product-types/status 专用端点,不再被全字段必填校验拦截
- 附件归档清理由按年改为用户选月(精确到月,截止月最晚6个月前,默认当前月-6),前后端同步
- 序列号文案统一为「是=逐件录SN,否=按数量(不录SN)」,MES 下拉改单选框
- 入库货架/层/位置必填校验(InboundEntry 前端 + inbound.go 后端),杜绝有区域无货架的新脏数据
- 生产流程卡新增列表Tab(新接口 GET /process-card/list 分页),去掉筛选默认时间
- 清理遗留 assets_bak/public_bak 备份目录;更新 WMS/MES 前端构建产物(index.html)
This commit is contained in:
SunYF
2026-10-10 18:09:17 +08:00
parent f6a26256c5
commit 56d56648f9
224 changed files with 687 additions and 1874 deletions
+29 -15
View File
@@ -81,15 +81,19 @@
</template>
</el-table-column>
<el-table-column prop="operator" label="操作人" min-width="90" />
<el-table-column label="操作" width="330">
<el-table-column label="操作" width="160" fixed="right">
<template #default="{ row }">
<el-button size="small" type="primary" link @click="openCell(row)">详情</el-button>
<el-button v-if="can('produce.workorder:dailyplan') && (row.status === 'PENDING' || row.status === 'CONFIRMED')"
size="small" :type="row.status === 'CONFIRMED' ? 'warning' : 'success'" @click="toggleStatus(row)">
{{ row.status === 'CONFIRMED' ? '停用' : '启用' }}
</el-button>
<el-button v-if="can('produce.workorder:dailyplan')" size="small" @click="openEdit(row)">编辑</el-button>
<el-button v-if="can('produce.workorder:dailyplan')" size="small" type="danger" @click="del(row)">删除</el-button>
<el-button link type="primary" size="small" @click="openCell(row)">详情</el-button>
<el-dropdown trigger="click" @command="(c) => planCommand(row, c)">
<el-button link type="primary" size="small">更多 ▾</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="can('produce.workorder:dailyplan')" command="edit">编辑</el-dropdown-item>
<el-dropdown-item v-if="can('produce.workorder:dailyplan') && (row.status === 'PENDING' || row.status === 'CONFIRMED')" :command="row.status === 'CONFIRMED' ? 'disable' : 'enable'" :style="row.status === 'CONFIRMED' ? 'color:#f56c6c' : ''">{{ row.status === 'CONFIRMED' ? '停用' : '启用' }}</el-dropdown-item>
<el-dropdown-item v-if="can('produce.workorder:dailyplan')" command="del" divided style="color:#f56c6c">删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-table-column>
</el-table>
@@ -130,16 +134,20 @@
<el-table-column prop="operator" label="操作人" min-width="90">
<template #default="{ row }">{{ row._isGroup ? '—' : (row.operator || '-') }}</template>
</el-table-column>
<el-table-column label="操作" width="240">
<el-table-column label="操作" width="160" fixed="right">
<template #default="{ row }">
<template v-if="row._isGroup"><span class="dock-empty">展开查看明细</span></template>
<template v-else>
<el-button v-if="can('produce.workorder:dailyplan') && (row.status === 'PENDING' || row.status === 'CONFIRMED')"
size="small" :type="row.status === 'CONFIRMED' ? 'warning' : 'success'" @click="toggleStatus(row)">
{{ row.status === 'CONFIRMED' ? '停用' : '启用' }}
</el-button>
<el-button v-if="can('produce.workorder:dailyplan')" size="small" @click="openEdit(row)">编辑</el-button>
<el-button v-if="can('produce.workorder:dailyplan')" size="small" type="danger" @click="del(row)">删除</el-button>
<el-dropdown trigger="click" @command="(c) => planCommand(row, c)">
<el-button link type="primary" size="small">更多 ▾</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="can('produce.workorder:dailyplan')" command="edit">编辑</el-dropdown-item>
<el-dropdown-item v-if="can('produce.workorder:dailyplan') && (row.status === 'PENDING' || row.status === 'CONFIRMED')" :command="row.status === 'CONFIRMED' ? 'disable' : 'enable'" :style="row.status === 'CONFIRMED' ? 'color:#f56c6c' : ''">{{ row.status === 'CONFIRMED' ? '停用' : '启用' }}</el-dropdown-item>
<el-dropdown-item v-if="can('produce.workorder:dailyplan')" command="del" divided style="color:#f56c6c">删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</template>
</el-table-column>
@@ -654,6 +662,12 @@ async function toggleStatus(row) {
ElMessage.success(`已${label}`)
fetchPage()
}
// 操作列「更多 ▾」分发:编辑 / 停用·启用 / 删除
function planCommand(row, c) {
if (c === 'edit') openEdit(row)
else if (c === 'disable' || c === 'enable') toggleStatus(row)
else if (c === 'del') del(row)
}
onMounted(async () => {
searchWorkOrders('') // 首屏只拉最近 50 条供下拉,其余走远程搜索
productTypes.value = (await request.get('/product-types')) || []