bug 467 569
This commit is contained in:
@@ -22,7 +22,7 @@ export const RequestStatus = {
|
||||
DRAFT: 1,
|
||||
/** 已发送/待执行 */
|
||||
ACTIVE: 2,
|
||||
/** 已完成 */
|
||||
/** 已校对 */
|
||||
COMPLETED: 3,
|
||||
/** 暂停 */
|
||||
ON_HOLD: 4,
|
||||
@@ -40,6 +40,8 @@ export const RequestStatus = {
|
||||
PENDING_RECEIVE: 11,
|
||||
/** 已接收(检查申请:医技科室已接单) */
|
||||
CHECK_RECEIVED: 12,
|
||||
/** 已完成(药品发药完成) */
|
||||
DISPENSE_COMPLETED: 20,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -48,7 +50,7 @@ export const RequestStatus = {
|
||||
export const RequestStatusDescriptions = {
|
||||
1: '待发送',
|
||||
2: '已发送/待执行',
|
||||
3: '已完成',
|
||||
3: '已校对',
|
||||
4: '暂停',
|
||||
5: '取消/待退',
|
||||
6: '停嘱',
|
||||
@@ -57,6 +59,7 @@ export const RequestStatusDescriptions = {
|
||||
10: '已校对',
|
||||
11: '待接收',
|
||||
12: '已接收',
|
||||
20: '已完成',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -244,7 +244,8 @@
|
||||
|
||||
/** 发药状态 → 规范状态名称映射(与《药品医嘱状态映射表》保持一致) */
|
||||
const DETAIL_DRUG_STATUS_DISPLAY = {
|
||||
2: '待配药',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
const DETAIL_LEGACY_STATUS_TEXT = {
|
||||
|
||||
@@ -477,7 +477,7 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
condition: null,
|
||||
departmentId: null,
|
||||
statusEnum: 3,
|
||||
statusEnum: 18,
|
||||
classEnum: 1,
|
||||
},
|
||||
});
|
||||
@@ -556,7 +556,7 @@ function getList() {
|
||||
}
|
||||
//打印中西药处方
|
||||
async function printPrescription() {
|
||||
const selectedRows = tableRef.value.getSelectionRows();
|
||||
const selectedRows = tableRef.value.getCheckboxRecords();
|
||||
if (selectedRows.length === 0) {
|
||||
proxy.$modal.msgWarning('未选择要打印的项目,请重新选择,打印失败');
|
||||
return;
|
||||
@@ -762,7 +762,8 @@ function formatPrice(row, column, cellValue) {
|
||||
|
||||
/** 发药状态 → 规范状态名称映射(与《药品医嘱状态映射表》保持一致) */
|
||||
const DRUG_STATUS_DISPLAY = {
|
||||
2: '待配药',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
|
||||
@@ -1000,27 +1001,19 @@ function submitMedicine(saveList) {
|
||||
proxy.$modal.msgError('发药失败: ' + error.message);
|
||||
});
|
||||
} else if (projectTypeCode.value == 2) {
|
||||
let preparationList = saveList.filter((item) => {
|
||||
return item.statusEnum == 2;
|
||||
}); // 待配药列表
|
||||
let preparedList = saveList.filter((item) => {
|
||||
return item.statusEnum == 14;
|
||||
}); // 已配药列表
|
||||
if (preparedList.length > 0) {
|
||||
updateMedicion(preparedList).then((response) => {
|
||||
let submittedList = saveList.filter((item) => {
|
||||
return item.statusEnum == 18;
|
||||
}); // 已提交列表
|
||||
if (submittedList.length === 0) {
|
||||
proxy.$modal.msgWarning('没有可操作的发药项目');
|
||||
return;
|
||||
}
|
||||
updateMedicion(submittedList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess('发药成功');
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
});
|
||||
} else {
|
||||
prepareMedicion(preparationList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
updateMedicion(preparationList).then((response) => {
|
||||
proxy.$modal.msgSuccess('发药成功');
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
deviceDispense(saveList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@@ -1129,8 +1122,8 @@ function handleBatch(row) {
|
||||
};
|
||||
});
|
||||
} else {
|
||||
if (tableRef.value.getSelectionRows().length > 0) {
|
||||
saveList = tableRef.value.getSelectionRows().map((item) => {
|
||||
if (tableRef.value.getCheckboxRecords().length > 0) {
|
||||
saveList = tableRef.value.getCheckboxRecords().map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<template>
|
||||
<div class="med-summary-container">
|
||||
<div style="width: 40%">
|
||||
<el-card style="height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单' }}
|
||||
</template>
|
||||
<div class="summary-card" style="width: 40%; height: 80vh">
|
||||
<div class="summary-card-header">{{ '汇总单' }}</div>
|
||||
<div class="summary-card-body">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<el-input
|
||||
@@ -34,20 +32,19 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: nowrap; gap: 8px">
|
||||
<div style="display: flex; align-items: center; gap: 8px; flex-shrink: 0">
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 400px"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="margin-left: 10px"
|
||||
@click="getSummaryList"
|
||||
>
|
||||
搜索
|
||||
@@ -56,7 +53,7 @@
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: flex; gap: 8px; flex-shrink: 0">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -75,47 +72,55 @@
|
||||
<vxe-table
|
||||
ref="summaryTableRef"
|
||||
:data="summaryList"
|
||||
max-height="85vh"
|
||||
style="width: 100%"
|
||||
border
|
||||
highlight-current-row
|
||||
@cell-click="getDetails"
|
||||
auto-resize
|
||||
@cell-click="({ row }) => getDetails(row)"
|
||||
>
|
||||
<vxe-column
|
||||
type="checkbox"
|
||||
align="center"
|
||||
width="50"
|
||||
min-width="40"
|
||||
/>
|
||||
<vxe-column
|
||||
field="busNo"
|
||||
title="单据号"
|
||||
align="center"
|
||||
width="150"
|
||||
min-width="90"
|
||||
show-overflow
|
||||
/>
|
||||
<vxe-column
|
||||
field="applicantName"
|
||||
title="申请人"
|
||||
align="center"
|
||||
width="100"
|
||||
min-width="65"
|
||||
show-overflow
|
||||
/>
|
||||
<vxe-column
|
||||
field="locationName"
|
||||
title="发药药房"
|
||||
align="center"
|
||||
min-width="75"
|
||||
show-overflow
|
||||
/>
|
||||
<vxe-column
|
||||
field="statusEnum_enumText"
|
||||
title="状态"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatSummaryStatusText(scope.row) }}
|
||||
<el-tag :type="getStatusTagType(scope.row)" size="small" effect="light">
|
||||
{{ formatSummaryStatusText(scope.row) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="applyTime"
|
||||
title="汇总日期"
|
||||
align="center"
|
||||
width="140"
|
||||
min-width="75"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.applyTime ? parseTime(scope.row.applyTime, '{y}-{m}-{d}') : '-' }}
|
||||
@@ -124,6 +129,7 @@
|
||||
<vxe-column
|
||||
title="操作"
|
||||
align="center"
|
||||
min-width="50"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@@ -136,8 +142,8 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-row :gutter="10" justify="end" align="middle" style="margin-bottom: 10px">
|
||||
<el-button type="danger" plain icon="Refresh" @click="handleSendDrug" :disabled="!busNo">
|
||||
发药
|
||||
@@ -146,8 +152,7 @@
|
||||
导出
|
||||
</el-button>
|
||||
</el-row> -->
|
||||
<div style="width: 59%">
|
||||
<el-card style="height: 80vh">
|
||||
<el-card style="width: 59%; height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单详情' }}
|
||||
</template>
|
||||
@@ -221,7 +226,6 @@
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -233,7 +237,8 @@ const { proxy } = getCurrentInstance();
|
||||
|
||||
/** 发药汇总单状态展示(汇总申请→已提交,发药→已发药) */
|
||||
const SUMMARY_STATUS_DISPLAY = {
|
||||
2: '已提交',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
const LEGACY_SUMMARY_STATUS_TEXT = {
|
||||
@@ -249,6 +254,17 @@ function formatSummaryStatusText(row) {
|
||||
return LEGACY_SUMMARY_STATUS_TEXT[row?.statusEnum_enumText] || row?.statusEnum_enumText || '-';
|
||||
}
|
||||
|
||||
/** 状态标签颜色 */
|
||||
const STATUS_TAG_TYPE_MAP = {
|
||||
2: 'warning', // 待配药 - 橙色
|
||||
4: 'success', // 已发药 - 绿色
|
||||
11: 'info', // 已执行 - 灰色
|
||||
18: '', // 已提交 - 蓝色(默认)
|
||||
};
|
||||
function getStatusTagType(row) {
|
||||
return STATUS_TAG_TYPE_MAP[Number(row?.statusEnum)] || 'info';
|
||||
}
|
||||
|
||||
function mapSummaryStatusOptions(options = []) {
|
||||
return options.map((item) => ({
|
||||
...item,
|
||||
@@ -355,6 +371,34 @@ defineExpose({
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.summary-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 18px 20px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.summary-card-body {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.medicationTableDetail {
|
||||
|
||||
@@ -667,12 +667,10 @@ const buildApplicationName = (row) => {
|
||||
// 单一项目:直接显示项目全名
|
||||
return details[0].adviceName || row.name || '-';
|
||||
}
|
||||
// 多个项目:首项 + 第二项 + 等n项
|
||||
// 多个项目:项目1 + 项目2 + ...
|
||||
const names = details.map((d) => d.adviceName).filter(Boolean);
|
||||
if (names.length === 0) return row.name || '-';
|
||||
const first = names[0];
|
||||
const second = names.length > 1 ? ` + ${names[1]}` : '';
|
||||
return `${first}${second} 等${details.length}项`;
|
||||
return names.join(' + ');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -717,13 +717,15 @@ const submit = () => {
|
||||
accountId: patientInfo.value.accountId, // // 账户id
|
||||
};
|
||||
}).filter(Boolean);
|
||||
// 从选中项目中提取检验项目名称,用于申请单名称字段
|
||||
const selectedNames = applicationListAllFilter.map(item => item.adviceName).filter(Boolean).join('、');
|
||||
const params = {
|
||||
activityList: applicationListAllFilter,
|
||||
patientId: patientInfo.value.patientId, //患者ID
|
||||
encounterId: patientInfo.value.encounterId, // 就诊ID
|
||||
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
||||
requestFormId: isEditMode.value ? props.editData.requestFormId : '', // 申请单ID(编辑模式传入,新增为空)
|
||||
name: '检验申请单',
|
||||
name: selectedNames || '检验申请单',
|
||||
descJson: JSON.stringify({
|
||||
...form,
|
||||
// 标本类型显示名称(供申请单查看页使用,避免查看页依赖字典加载)
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
刷新
|
||||
</el-button> -->
|
||||
</div>
|
||||
<div class="operate-btns">
|
||||
<el-space>
|
||||
<div class="operate-btns" style="display: flex; align-items: center; gap: 12px;">
|
||||
<el-radio-group v-model="therapyEnum">
|
||||
<el-radio-button value="">全部</el-radio-button>
|
||||
<el-radio-button value="1">长期</el-radio-button>
|
||||
@@ -90,7 +89,6 @@
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="onNursingStatus">护理状态</el-button>
|
||||
<el-button link type="primary" @click="refresh()">刷新数据</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inpatientDoctor-order-table">
|
||||
@@ -254,8 +252,9 @@
|
||||
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 10" type="primary">已校对</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 11" type="primary">待接收</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 3" type="success">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 3" type="success">已校对</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 6" type="danger">停止</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 20" type="success">已完成</el-tag>
|
||||
<el-tag v-else type="info">{{ scope.row.chargeStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -1239,7 +1238,7 @@ function resolveAllOrgIds() {
|
||||
}
|
||||
|
||||
function handleDelete() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
if (selectRows.length === 0) {
|
||||
proxy.$modal.msgWarning('请选择要删除的医嘱');
|
||||
return;
|
||||
@@ -1326,7 +1325,7 @@ function handleSave() {
|
||||
expandOrder.value = [];
|
||||
}
|
||||
|
||||
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getSelectionRows() : [];
|
||||
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getCheckboxRecords() : [];
|
||||
let sourceList = [];
|
||||
if (selectedRows.length > 0) {
|
||||
sourceList = selectedRows;
|
||||
@@ -1990,7 +1989,7 @@ function escKeyListener(e) {
|
||||
|
||||
// 签退
|
||||
function handleSingOut() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
// 是否存在未保存数据
|
||||
let isSave = true;
|
||||
// statusEnum = 2
|
||||
@@ -2054,7 +2053,7 @@ function handleSingOut() {
|
||||
|
||||
// 停嘱 - 弹出时间选择弹窗
|
||||
function handleStopAdvice() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
console.log('selectRows======>', JSON.stringify(selectRows));
|
||||
if ((selectRows || []).length <= 0) {
|
||||
ElMessage({
|
||||
@@ -2159,7 +2158,7 @@ function confirmStopAdvice() {
|
||||
}
|
||||
// 恢复(取消停嘱)
|
||||
function handleResumeAdvice() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
console.log('handleResumeAdvice selectRows======>', JSON.stringify(selectRows));
|
||||
if ((selectRows || []).length <= 0) {
|
||||
ElMessage({
|
||||
@@ -2224,7 +2223,7 @@ function handleGroupId(paramList) {
|
||||
|
||||
// 组合
|
||||
function combination() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
if (selectRows.length <= 1) {
|
||||
proxy.$modal.msgWarning('至少选择两项');
|
||||
return;
|
||||
@@ -2322,7 +2321,7 @@ function combination() {
|
||||
|
||||
// 拆组
|
||||
function split() {
|
||||
let selectRows = prescriptionRef.value.getSelectionRows();
|
||||
let selectRows = prescriptionRef.value.getCheckboxRecords();
|
||||
if (selectRows.length < 1) {
|
||||
proxy.$modal.msgWarning('至少选择一项');
|
||||
return;
|
||||
@@ -2564,7 +2563,7 @@ function calculateTotalAmount(row, index) {
|
||||
|
||||
// 选择框改变时的处理
|
||||
function handleSelectionChange({ selection, row }) {
|
||||
if (!row) return;
|
||||
if (!row || !selection) return;
|
||||
const isSelected = selection.some((item) => item.uniqueKey === row.uniqueKey);
|
||||
prescriptionList.value
|
||||
.filter((item) => {
|
||||
|
||||
@@ -213,14 +213,14 @@ import useUserStore from '@/store/modules/user';
|
||||
|
||||
/** 发药状态 → 医嘱状态(药品医嘱状态映射表) */
|
||||
const DISPENSE_STATUS_TO_ADVICE_TEXT = {
|
||||
2: '已执行',
|
||||
8: '已提交',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
|
||||
function getStatusDisplayText(row) {
|
||||
const params = row?.medicineSummaryParamList || [];
|
||||
const pending = params.filter((p) => Number(p.dispenseStatus) !== 8);
|
||||
const pending = params.filter((p) => Number(p.dispenseStatus) !== 18);
|
||||
if (pending.length === 0) {
|
||||
return params.length ? '已提交' : '已执行';
|
||||
}
|
||||
@@ -378,7 +378,7 @@ function getSelectRows() {
|
||||
// 获取选中的医嘱信息
|
||||
let list = [];
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getCheckboxRecords()];
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,8 @@ import {patientInfoList} from '../../components/store/patient.js';
|
||||
import {getCurrentInstance, ref} from 'vue';
|
||||
|
||||
const SUMMARY_STATUS_DISPLAY = {
|
||||
2: '已提交',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
|
||||
@@ -228,7 +229,7 @@ function getSelectRows() {
|
||||
// 获取选中的医嘱信息
|
||||
let list = [];
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getCheckboxRecords()];
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -174,8 +174,8 @@
|
||||
:data="item"
|
||||
border
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
@select="(selection, row) => handleRowSelect(selection, row, index)"
|
||||
@checkbox-all="(selection) => handleSelectAll(selection, index)"
|
||||
@checkbox-change="({ selection, row }) => handleRowSelect(selection, row, index)"
|
||||
@checkbox-all="({ selection }) => handleSelectAll(selection, index)"
|
||||
>
|
||||
<vxe-column
|
||||
type="checkbox"
|
||||
@@ -233,11 +233,10 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
v-if="props.exeStatus === 6"
|
||||
type="success"
|
||||
:type="getStatusType(scope.row)"
|
||||
size="small"
|
||||
>
|
||||
已执行
|
||||
{{ getStatusDisplayText(scope.row) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -300,11 +299,13 @@ const REQUEST_STATUS_DISPLAY = {
|
||||
[RequestStatus.DRAFT]: '待签发',
|
||||
[RequestStatus.ACTIVE]: '已签发',
|
||||
[RequestStatus.COMPLETED]: '已校对',
|
||||
[RequestStatus.DISPENSE_COMPLETED]: '已完成',
|
||||
};
|
||||
|
||||
/** 发药状态 → 医嘱状态映射表(汇总申请/发药) */
|
||||
const DISPENSE_STATUS_DISPLAY = {
|
||||
8: '已提交',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
|
||||
@@ -321,20 +322,24 @@ const LEGACY_STATUS_TEXT = {
|
||||
已发送: '已签发',
|
||||
'已发送/待执行': '已签发',
|
||||
已完成: '已校对',
|
||||
已执行: '已执行',
|
||||
待配药: '已提交',
|
||||
已汇总: '已提交',
|
||||
已提交: '已提交',
|
||||
已发放: '已发药',
|
||||
};
|
||||
|
||||
function getStatusDisplayText(row) {
|
||||
const dispenseCode = Number(row?.dispenseStatus);
|
||||
if (DISPENSE_STATUS_DISPLAY[dispenseCode]) {
|
||||
return DISPENSE_STATUS_DISPLAY[dispenseCode];
|
||||
}
|
||||
// 优先使用当前 tab 的统一状态文本
|
||||
const tabText = STATUS_DISPLAY_BY_EXE_TAB[props.exeStatus]?.text;
|
||||
if (tabText) {
|
||||
return tabText;
|
||||
}
|
||||
// 非标准 tab 时,按优先级降级显示
|
||||
const dispenseCode = Number(row?.dispenseStatus);
|
||||
if (DISPENSE_STATUS_DISPLAY[dispenseCode]) {
|
||||
return DISPENSE_STATUS_DISPLAY[dispenseCode];
|
||||
}
|
||||
const requestCode = Number(row?.requestStatus);
|
||||
if (REQUEST_STATUS_DISPLAY[requestCode]) {
|
||||
return REQUEST_STATUS_DISPLAY[requestCode];
|
||||
@@ -349,6 +354,7 @@ function getStatusDisplayText(row) {
|
||||
}
|
||||
|
||||
function getStatusType(row) {
|
||||
// 优先使用当前 tab 的统一类型
|
||||
const tabType = STATUS_DISPLAY_BY_EXE_TAB[props.exeStatus]?.type;
|
||||
if (tabType) {
|
||||
return tabType;
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
:data="item"
|
||||
border
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
@select="handleSelectionChange"
|
||||
@checkbox-change="({ selection, row }) => handleSelectionChange(selection, row)"
|
||||
>
|
||||
<vxe-column
|
||||
type="checkbox"
|
||||
@@ -275,7 +275,8 @@ const REQUEST_STATUS_DISPLAY = {
|
||||
|
||||
/** 发药状态 → 医嘱状态映射表 */
|
||||
const DISPENSE_STATUS_DISPLAY = {
|
||||
8: '已提交',
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
|
||||
@@ -285,8 +286,10 @@ const LEGACY_STATUS_TEXT = {
|
||||
已发送: '已签发',
|
||||
'已发送/待执行': '已签发',
|
||||
已完成: '已校对',
|
||||
已执行: '已执行',
|
||||
待配药: '已提交',
|
||||
已汇总: '已提交',
|
||||
已提交: '已提交',
|
||||
已发放: '已发药',
|
||||
};
|
||||
|
||||
@@ -502,7 +505,7 @@ function getSelectRows() {
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
const ref = proxy.$refs['tableRef' + index];
|
||||
if (ref && ref[0]) {
|
||||
list = [...list, ...ref[0].getSelectionRows()];
|
||||
list = [...list, ...ref[0].getCheckboxRecords()];
|
||||
}
|
||||
});
|
||||
return list.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user