feat: 完成产线MES系统全流程功能迭代与优化

本提交完成了多个核心模块的功能完善与业务对齐:
1. 工位终端:固定工位配置、移除自选工位逻辑、适配配置化工位号
2. MES核心:重构工位组合逻辑、新增工单/流程状态管理、补全报工/追溯逻辑
3. WMS客户端:新增修改密码功能、优化帮助弹窗逻辑
4. 文档与权限:补充完整操作手册、统一菜单名称与权限描述
5. 修复多业务校验:排产数量校验、工单状态校验、工位绑定规则
This commit is contained in:
SunYF
2026-08-31 12:58:28 +08:00
parent a3145a8bd6
commit ae4c292487
53 changed files with 1475 additions and 912 deletions
@@ -0,0 +1,84 @@
<template>
<el-card>
<el-alert type="info" :closable="false" style="margin-bottom:12px"
title="产线固定 12 个工位,本页为工位总览(不增删工位)。每个工位的工艺流程在「工艺流程」页维护:工艺流程选工位号并启用后,即自动绑定到该工位;一个工位只能有一个启用的工艺流程。" />
<el-table :data="rows" border size="small">
<el-table-column prop="stationNo" label="工位号" width="90" align="center" />
<el-table-column prop="name" label="工位名称" min-width="170" show-overflow-tooltip />
<el-table-column label="绑定工艺流程" min-width="220" show-overflow-tooltip>
<template #default="{ row }">
<span v-if="row.flowName">{{ row.flowName }}</span>
<span v-else style="color:#909399">未绑定(请在「工艺流程」页为该工位启用流程)</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120" align="center" fixed="right">
<template #default="{ row }">
<el-button v-if="can('produce.station:edit')" size="small" @click="openName(row)">改名</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog v-model="dlg.show" :title="`工位${dlg.stationNo} - 修改名称`" width="420px">
<el-form :model="dlg" label-width="90px">
<el-form-item label="工位名称" required>
<el-input v-model="dlg.name" placeholder="如 一号装配工位" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dlg.show = false">取消</el-button>
<el-button v-if="can('produce.station:edit')" type="primary" @click="save">保存</el-button>
</template>
</el-dialog>
</el-card>
<PageHelp :data="helpStation" />
</template>
<script setup>
import { reactive, ref, computed, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import request from '../utils/request'
import { can } from '../utils/perm'
import PageHelp from '../components/PageHelp.vue'
import { helpStation } from '../help'
const stations = ref([])
const rows = computed(() => {
const map = {}
stations.value.forEach((s) => { map[s.stationNo] = s })
const out = []
for (let i = 1; i <= 12; i++) {
const s = map[i]
out.push({
stationNo: i,
name: s ? s.name : `工位${i}`,
flowName: s ? s.flowName : '',
flowId: s ? s.flowId : 0
})
}
return out
})
const dlg = reactive({ show: false, id: 0, stationNo: 1, name: '' })
async function load() {
stations.value = (await request.get('/stations')) || []
}
function openName(row) {
Object.assign(dlg, { show: true, id: row.id, stationNo: row.stationNo, name: row.name })
}
async function save() {
if (!dlg.name) return ElMessage.warning('请输入工位名称')
await request.post('/stations', {
id: dlg.id, stationNo: dlg.stationNo, name: dlg.name
})
ElMessage.success('已保存')
dlg.show = false
load()
}
onMounted(load)
</script>