docs: 统一修正全项目“SN管理”相关术语为“序列号”
本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
@@ -15,7 +15,19 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品工艺">
|
||||
<el-input v-model="filterPP" placeholder="按产品工艺名称筛选(反查)" clearable style="width:190px" />
|
||||
<el-select v-model="filterPP" clearable filterable placeholder="全部" style="width:190px">
|
||||
<el-option v-for="p in ppOptions" :key="p.id" :value="p.name" :label="p.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="filterStatus" clearable placeholder="全部" style="width:110px">
|
||||
<el-option label="启用" value="ENABLED" />
|
||||
<el-option label="停用" value="DISABLED" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="load">查询</el-button>
|
||||
<el-button @click="resetFilter">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -47,6 +59,11 @@
|
||||
<span v-else style="color:#909399">未绑定</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" :type="row.status === 'ENABLED' ? 'success' : 'info'">{{ row.status === 'ENABLED' ? '启用' : '停用' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定工艺" min-width="240">
|
||||
<template #default="{ row }">
|
||||
<el-select :model-value="row.flowId" size="small" placeholder="未绑定" @change="(v) => bindFlow(row, v)" style="width:100%">
|
||||
@@ -71,6 +88,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230" 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>
|
||||
@@ -171,15 +189,36 @@ const tabLabel = (v) => (TAB_OPTIONS.find((t) => t.v === v) || {}).l || v
|
||||
// 筛选:绑定工艺(下拉)+ 产品工艺(名称模糊,反查列 client 端过滤;工位为全量小表无需后端分页)
|
||||
const filterFlow = ref(null)
|
||||
const filterPP = ref('')
|
||||
const filterStatus = ref('ENABLED')
|
||||
const ppOptions = ref([])
|
||||
|
||||
const rows = computed(() => {
|
||||
return [...stations.value]
|
||||
.sort((a, b) => (a.stationNo || 0) - (b.stationNo || 0))
|
||||
.map((s) => ({ id: s.id, stationNo: s.stationNo, name: s.name, flowId: s.flowId, flowName: s.flowName, stationType: s.stationType, isBuiltin: !!s.isBuiltin, visibleTabs: Array.isArray(s.visibleTabs) ? s.visibleTabs : [], productProcesses: Array.isArray(s.productProcesses) ? s.productProcesses : [] }))
|
||||
.map((s) => ({ id: s.id, stationNo: s.stationNo, name: s.name, flowId: s.flowId, flowName: s.flowName, stationType: s.stationType, status: s.status, isBuiltin: !!s.isBuiltin, visibleTabs: Array.isArray(s.visibleTabs) ? s.visibleTabs : [], productProcesses: Array.isArray(s.productProcesses) ? s.productProcesses : [] }))
|
||||
.filter((r) => (filterFlow.value ? r.flowId === filterFlow.value : true))
|
||||
.filter((r) => (filterPP.value ? r.productProcesses.some((n) => n.toLowerCase().includes(filterPP.value.toLowerCase())) : true))
|
||||
.filter((r) => (filterStatus.value ? r.status === filterStatus.value : true))
|
||||
})
|
||||
|
||||
function resetFilter() {
|
||||
filterFlow.value = null
|
||||
filterPP.value = ''
|
||||
filterStatus.value = 'ENABLED'
|
||||
load()
|
||||
}
|
||||
|
||||
async function toggleStationStatus(row) {
|
||||
const to = row.status === 'ENABLED' ? 'DISABLED' : 'ENABLED'
|
||||
const action = to === 'DISABLED' ? '停用' : '启用'
|
||||
try {
|
||||
await ElMessageBox.confirm(`确认${action}工位${row.stationNo}「${row.name}」?`, '提示', { type: 'warning' })
|
||||
} catch { return }
|
||||
await request.post('/stations/status', { id: row.id, status: to })
|
||||
ElMessage.success(`已${action}`)
|
||||
load()
|
||||
}
|
||||
|
||||
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false })
|
||||
|
||||
// 终端可见页签编辑(空数组 = 显示全部)
|
||||
@@ -259,5 +298,8 @@ async function remove(row) {
|
||||
onMounted(async () => {
|
||||
await Promise.all([load(), loadDocks()])
|
||||
flows.value = (await request.get('/process-flows', { params: { pageSize: 1000, page: 1 } }))?.list || []
|
||||
try {
|
||||
ppOptions.value = (await request.get('/product-processes', { params: { pageSize: 1000, page: 1 } }))?.list || []
|
||||
} catch { ppOptions.value = [] }
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user