From 2e00ada8cd86d820f4a098d72366d9bd4292b594 Mon Sep 17 00:00:00 2001 From: wuyy Date: Fri, 4 Sep 2026 18:08:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E5=BA=8A=E5=8F=91=E8=A1=80=E9=80=80?= =?UTF-8?q?=E8=A1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/blood/index.ts | 18 + src/utils/classCom.ts | 14 + src/views/blood/clinical/index.vue | 5 +- src/views/blood/retreat/index.vue | 424 ++++++++++++++++++ src/views/doctor/application/index.vue | 134 +++--- .../system/templateMaintenance/index.vue | 14 +- 6 files changed, 544 insertions(+), 65 deletions(-) create mode 100644 src/views/blood/retreat/index.vue diff --git a/src/api/blood/index.ts b/src/api/blood/index.ts index 33d4131..dbdae45 100644 --- a/src/api/blood/index.ts +++ b/src/api/blood/index.ts @@ -298,6 +298,24 @@ export function printReport(query?: Object) { params: query }) } +// 临床发血获取血液信息 +export function queryBloodInfo(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/queryBloodInfo', + method: 'get', + params: query + }) +} +// 临床发血退血保存数据 +export function txsaveData(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/saveData', + method: 'post', + data: query + }) +} + + diff --git a/src/utils/classCom.ts b/src/utils/classCom.ts index 813dfeb..0e2e851 100644 --- a/src/utils/classCom.ts +++ b/src/utils/classCom.ts @@ -157,4 +157,18 @@ export function useAutoSize() { }); return autoSize; +} + + +/** + * 字节转 MB,保留n位小数 + * @param size 字节 string|number + * @param digits 保留小数,默认2 + * @returns {string} "0.03 MB" + */ +export function formatByteToMB(size: string | number, digits = 2): string { + const byte = Number(size) + if (isNaN(byte) || byte <= 0) return '0 MB' + const mb = byte / 1024 / 1024 + return `${mb.toFixed(digits)} MB` } \ No newline at end of file diff --git a/src/views/blood/clinical/index.vue b/src/views/blood/clinical/index.vue index 31e08dc..7b16132 100644 --- a/src/views/blood/clinical/index.vue +++ b/src/views/blood/clinical/index.vue @@ -388,7 +388,8 @@ - +