新增功能

This commit is contained in:
Your Name
2026-04-01 09:46:25 +08:00
parent 099bc1dd22
commit a780356908
332 changed files with 7845 additions and 866 deletions
@@ -1,7 +1,7 @@
<template>
<el-drawer
v-model="visible"
title="中医处方单"
:title="drawerTitle"
size="1200px"
:close-on-click-modal="false"
@close="handleClose"
@@ -264,7 +264,19 @@
<h2 class="prescription-title">{{ templateConfig.stationName }}处方笺</h2>
<div class="prescription-type">
<el-tag v-if="savedPrescription.void_status === 1" type="danger" size="small">已作废</el-tag>
<template v-else>
<el-tag
v-else-if="approvedPreviewOnly"
type="success"
size="small"
class="mr-1"
>已通过</el-tag>
<el-tag
v-else-if="Number(savedPrescription.audit_status) === 0"
type="warning"
size="small"
class="mr-1"
>待审核</el-tag>
<template v-if="savedPrescription.void_status !== 1">
<div>普通处方</div>
<div class="text-sm">当日有效</div>
</template>
@@ -460,7 +472,7 @@
下载PDF
</el-button>
<el-button
v-if="savedPrescription.void_status !== 1"
v-if="savedPrescription.void_status !== 1 && !approvedPreviewOnly"
type="danger"
plain
:loading="voiding"
@@ -468,7 +480,7 @@
>
作废处方
</el-button>
<el-button @click="handleNewPrescription">新建处方</el-button>
<el-button v-if="!approvedPreviewOnly" @click="handleNewPrescription">新建处方</el-button>
<el-button @click="handleClose">关闭</el-button>
</div>
</div>
@@ -609,6 +621,15 @@ const signatureCanvasRef = ref<HTMLCanvasElement>()
const isDrawing = ref(false)
const savedPrescription = ref<any>(null)
/** 已通过且未作废:与消费者处方「查看」一致,仅预览,不可作废/再开新方 */
const approvedPreviewOnly = computed(() => {
const s = savedPrescription.value
if (!s) return false
return Number(s.audit_status) === 1 && Number(s.void_status) !== 1
})
const drawerTitle = computed(() => (approvedPreviewOnly.value ? '查看处方' : '中医处方单'))
// 处方库相关
const showLibraryDialog = ref(false)
const libraryLoading = ref(false)