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:
@@ -86,12 +86,19 @@
|
||||
<span v-else style="color:#909399">全部显示</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="can('produce.station:edit')" size="small" :type="row.status === 'ENABLED' ? 'warning' : 'success'" @click="toggleStationStatus(row)">{{ row.status === 'ENABLED' ? '停用' : '启用' }}</el-button>
|
||||
<el-button v-if="can('produce.station:edit')" size="small" @click="openName(row)">改名</el-button>
|
||||
<el-button v-if="can('produce.station:edit')" size="small" @click="openTabs(row)">页签</el-button>
|
||||
<el-button v-if="can('produce.station:delete') && !row.isBuiltin" size="small" type="danger" @click="remove(row)">删除</el-button>
|
||||
<el-button v-if="can('produce.station:edit')" 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:#f56c6c' : ''">{{ 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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -219,6 +226,13 @@ 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)
|
||||
}
|
||||
|
||||
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false })
|
||||
|
||||
// 终端可见页签编辑(空数组 = 显示全部)
|
||||
|
||||
Reference in New Issue
Block a user