feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
<el-tag v-else type="info" size="small">工位叫料</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="借料来源" min-width="180" align="center">
|
||||
<template #default="{row}">
|
||||
<span v-if="borrowText(row)" style="color:#e6a23c">{{ borrowText(row) }}</span>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="130" align="center" fixed="right">
|
||||
<template #default="{row}">
|
||||
<el-button
|
||||
@@ -91,6 +97,16 @@ const completingNo = ref('')
|
||||
const rejectingNo = ref('')
|
||||
const rejectDlg = reactive({ visible: false, row: null, reason: '' })
|
||||
|
||||
// 借料来源展示:排除本工位自取项(borrowFrom 含本工位 stationNo),仅显示真正借出的兄弟工位
|
||||
function borrowText(row) {
|
||||
const b = row.borrowFrom || {}
|
||||
const self = String(row.stationNo)
|
||||
const parts = Object.entries(b)
|
||||
.filter(([k, v]) => Number(v) > 0 && String(k) !== self)
|
||||
.map(([k, v]) => `工位${k} ${v}个`)
|
||||
return parts.length ? '含借:' + parts.join('、') : ''
|
||||
}
|
||||
|
||||
function resetFilters() {
|
||||
Object.assign(query, { stationNo: '', materialCode: '', requestNo: '' })
|
||||
load()
|
||||
|
||||
Reference in New Issue
Block a user