refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
This commit is contained in:
@@ -79,6 +79,19 @@
|
||||
<template #default="{row}">{{ fmt(row.createdAt) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-divider content-position="left">物料组成(递归展开成品零部件到原材料)</el-divider>
|
||||
<el-table :data="flatBom" border size="small" row-key="_key" default-expand-all>
|
||||
<el-table-column label="物料" min-width="180">
|
||||
<template #default="{row}">
|
||||
<span :style="{paddingLeft: (row._depth*18)+'px'}">{{ row.materialName }} <small>({{ row.materialCode }})</small></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="spec" label="规格" min-width="90" />
|
||||
<el-table-column prop="qty" label="单台用量" width="100" />
|
||||
<el-table-column label="管理方式" width="100">
|
||||
<template #default="{row}">{{ row.manageMode === '2' ? '电气件SN' : '批次' }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@@ -87,7 +100,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import request from '../utils/request'
|
||||
import { openPrintableHtml } from '../utils/print'
|
||||
@@ -134,6 +147,19 @@ async function printCard() {
|
||||
// 直接 window.open 带不上 Bearer 头会被 401,改由 axios 取回 HTML 后写入新窗口
|
||||
await openPrintableHtml('/process-card', { sn: sn.value })
|
||||
}
|
||||
// 把递归的物料组成树扁平化为带层级缩进的列表,避免 el-table 树形 row-key 冲突
|
||||
const flatBom = computed(() => {
|
||||
const out = []
|
||||
const walk = (nodes, depth, prefix) => {
|
||||
;(nodes || []).forEach((n, i) => {
|
||||
const key = prefix + '-' + n.materialCode + '-' + i
|
||||
out.push(Object.assign({}, n, { _depth: depth, _key: key }))
|
||||
if (n.children && n.children.length) walk(n.children, depth + 1, key)
|
||||
})
|
||||
}
|
||||
walk(data.value?.bindTrace?.bomTree || [], 0, 'r')
|
||||
return out
|
||||
})
|
||||
function statusText(st) {
|
||||
const map = { CREATED: '已创建', ONLINE: '生产中', DONE: '已完工', SCRAPPED: '已报废' }
|
||||
return map[st] || st || '-'
|
||||
|
||||
Reference in New Issue
Block a user