Fix Bug #468: [住院医生工作站-检验申请] 列表页新增【单据状态】列
列表页增加单据状态列(位于申请单号之后),使用 el-tag 显示状态: - applyStatus=0 显示"待开立"(灰色标签) - applyStatus=1 显示"已开立"(绿色标签) - 已收费且已执行显示"已执行"(绿色标签) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请单号" prop="applyNo" min-width="160" align="center" header-align="center" />
|
||||
<el-table-column label="单据状态" prop="applyStatus" width="100" align="center" header-align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getStatusType(scope.row.applyStatus)" size="small">
|
||||
{{ getStatusLabel(scope.row.applyStatus, scope.row) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验项目" prop="itemName" min-width="170px" align="center" header-align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.itemName }}</span>
|
||||
@@ -1445,6 +1452,26 @@ const formatAmount = (amount) => {
|
||||
return num.toFixed(2)
|
||||
}
|
||||
|
||||
// 单据状态标签文字
|
||||
const getStatusLabel = (applyStatus, row) => {
|
||||
// applyStatus: 0=待开立, 1=已开立(已签发)
|
||||
// 结合收费/执行标记推导更丰富的状态
|
||||
if (applyStatus === 1) {
|
||||
// 已收费后根据执行标记判断
|
||||
if (row.needExecute === true) {
|
||||
return '已执行'
|
||||
}
|
||||
return '已开立'
|
||||
}
|
||||
return '待开立'
|
||||
}
|
||||
|
||||
// 单据状态标签颜色
|
||||
const getStatusType = (applyStatus) => {
|
||||
if (applyStatus === 1) return 'success'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
// 格式化日期时间为字符串 YYYY-MM-DD HH:mm:ss
|
||||
const formatDateTime = (date) => {
|
||||
if (!date) return ''
|
||||
|
||||
Reference in New Issue
Block a user