diff --git a/src/api/blood/index.ts b/src/api/blood/index.ts index dbdae45..ba7ccbe 100644 --- a/src/api/blood/index.ts +++ b/src/api/blood/index.ts @@ -314,6 +314,46 @@ export function txsaveData(query?: Object) { data: query }) } +// 临床发血退血查询列表 +export function txqueryList(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/queryList', + method: 'get', + params: query + }) +} +// 临床发血退血查询单个申请单信息 +export function txqueryInfo(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/queryInfo', + method: 'get', + params: query + }) +} +// 临床发血退血 删除血液信息 +export function deleteBloodInfo(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/deleteBloodInfo', + method: 'post', + data: query + }) +} +// 临床发血退血 审核数据 +export function txauditData(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/auditData', + method: 'get', + params: query + }) +} +// 临床发血退血 打印单据 +export function txPrint(query?: Object) { + return request({ + url: '/bus/bloodbank/backin/print', + method: 'get', + params: query + }) +} diff --git a/src/components/BloodTypeStatTable/index.vue b/src/components/BloodTypeStatTable/index.vue new file mode 100644 index 0000000..1597e6b --- /dev/null +++ b/src/components/BloodTypeStatTable/index.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git a/src/utils/classCom.ts b/src/utils/classCom.ts index 0e2e851..d79cd41 100644 --- a/src/utils/classCom.ts +++ b/src/utils/classCom.ts @@ -161,14 +161,27 @@ export function useAutoSize() { /** - * 字节转 MB,保留n位小数 - * @param size 字节 string|number - * @param digits 保留小数,默认2 - * @returns {string} "0.03 MB" + * 字节强制转为指定单位 + * @param size 字节 + * @param targetUnit 目标单位 'B'|'KB'|'MB'|'GB' + * @param digits 保留小数 + * @returns "0.03 MB" */ -export function formatByteToMB(size: string | number, digits = 2): string { +export function formatByteToUnit( + size: string | number, + targetUnit: 'B' | 'KB' | 'MB' | 'GB', + 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` + if (isNaN(byte) || byte <= 0) return `0 ${targetUnit}` + + const unitMap: Record = { + B: 1, + KB: 1024, + MB: 1024 * 1024, + GB: 1024 * 1024 * 1024, + } + const divisor = unitMap[targetUnit] + const val = byte / divisor + return `${val.toFixed(digits)} ${targetUnit}` } \ No newline at end of file diff --git a/src/views/blood/clinical/index.vue b/src/views/blood/clinical/index.vue index 7b16132..87c60b9 100644 --- a/src/views/blood/clinical/index.vue +++ b/src/views/blood/clinical/index.vue @@ -560,6 +560,7 @@ const bloodEnter = () => { } else { ElMessage.warning('该血液流水号不存在,请检查!') } + bloodNo.value = '' } else { if (index > -1) return ElMessage.warning('该血液流水号已存在,请检查!') queryBloodInfoByBloodNo({ bloodNo: bloodNo.value }).then(res => { @@ -726,7 +727,7 @@ const saveBloodApply = (type: number) => { // 1保存 2审核 if (res.code == 0) { if (type == 1) { ElMessage.success('保存成功!') - addMatch() + bloodInfo.value.bill_no = res.data return false } else { return true diff --git a/src/views/blood/retreat/index.vue b/src/views/blood/retreat/index.vue index d45115e..432550e 100644 --- a/src/views/blood/retreat/index.vue +++ b/src/views/blood/retreat/index.vue @@ -11,14 +11,14 @@ 检索 新增单据 保存 - 审核 - 打印 + 审核 + 打印 - +
退血主信息
-
未审核
+
{{ formData.audit_person ? "已审核" : "未审核" }}
@@ -27,7 +27,8 @@ - + @@ -72,10 +73,19 @@ format="YYYY-MM-DD HH:mm" disabled style="width:100%" /> - + + + + + +
@@ -118,7 +128,8 @@
已扫描列表
- + @@ -129,12 +140,18 @@ - + + + + +
@@ -161,7 +178,7 @@ - + @@ -170,29 +187,34 @@ - + - + + -