feat: 新增产品工艺管理与工序审核功能
- 新增产品工艺(product_process)及明细(product_process_item)数据模型 - 新增工序审核开关(need_audit)与审核角色(audit_role)字段 - 新增待审核签字页面与路由 - 优化 WMS/MES 接口交互,增加业务错误处理与友好提示 - 补充库存过滤逻辑,避免返回已出库 SN 数据 - 调整默认查询时间范围为近一个月,优化用户体验
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
<span style="margin-left:12px;color:#909399;font-size:12px">虚拟工位(如 0 上线位、13 下线位)类型选「线下位」,不连 PLC、仅记录上下线。</span>
|
||||
</div>
|
||||
|
||||
<el-form inline style="margin-bottom:10px">
|
||||
<el-form-item label="绑定工艺">
|
||||
<el-select v-model="filterFlow" clearable filterable placeholder="全部" style="width:180px">
|
||||
<el-option v-for="f in flows" :key="f.id" :value="f.id" :label="f.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品工艺">
|
||||
<el-input v-model="filterPP" placeholder="按产品工艺名称筛选(反查)" clearable style="width:190px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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 />
|
||||
@@ -44,6 +55,12 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品工艺(反查)" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.productProcesses && row.productProcesses.length">{{ row.productProcesses.join('、') }}</span>
|
||||
<span v-else style="color:#909399">-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="终端可见页签" min-width="200">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row.visibleTabs && row.visibleTabs.length">
|
||||
@@ -151,10 +168,16 @@ const TAB_OPTIONS = [
|
||||
]
|
||||
const tabLabel = (v) => (TAB_OPTIONS.find((t) => t.v === v) || {}).l || v
|
||||
|
||||
// 筛选:绑定工艺(下拉)+ 产品工艺(名称模糊,反查列 client 端过滤;工位为全量小表无需后端分页)
|
||||
const filterFlow = ref(null)
|
||||
const filterPP = 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 : [] }))
|
||||
.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 : [] }))
|
||||
.filter((r) => (filterFlow.value ? r.flowId === filterFlow.value : true))
|
||||
.filter((r) => (filterPP.value ? r.productProcesses.some((n) => n.toLowerCase().includes(filterPP.value.toLowerCase())) : true))
|
||||
})
|
||||
|
||||
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false })
|
||||
|
||||
Reference in New Issue
Block a user