This commit is contained in:
菲菲
2025-03-30 18:27:39 +08:00
parent f9fd55c4f2
commit 653f0fa553

View File

@@ -1,92 +1,162 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="left"> <div class="left">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form
<el-form-item label="姓名或证件号" prop="condition"> :model="queryParams"
<el-input v-model="queryParams.condition" placeholder="请输入姓名/证件号" clearable style="width: 150px" ref="queryRef"
@keyup.enter="handleQuery" /> :inline="true"
</el-form-item> v-show="showSearch"
<el-form-item label="就诊日期"> >
<el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始日期" <el-form-item label="姓名或证件号" prop="condition">
end-placeholder="结束日期" style="width: auto" value-format="YYYY-MM-DD" /> <el-input
</el-form-item> v-model="queryParams.condition"
<el-form-item label="科室" prop="departmentId"> placeholder="请输入姓名/证件号"
<el-select v-model="queryParams.departmentId" placeholder="请选择科室" clearable clearable
@keyup.enter="handleQuery" style="width: 160px"> style="width: 150px"
<el-option v-for="item in departmentList" :key="item.value" :label="item.label" @keyup.enter="handleQuery"
:value="item.value" /> />
</el-select> </el-form-item>
</el-form-item> <el-form-item label="就诊日期">
<el-form-item> <el-date-picker
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> v-model="dateRange"
<el-button icon="Refresh" @click="resetQuery">重置</el-button> type="daterange"
</el-form-item> start-placeholder="开始日期"
</el-form> end-placeholder="结束日期"
style="width: auto"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="科室" prop="departmentId">
<el-select
v-model="queryParams.departmentId"
placeholder="请选择科室"
clearable
@keyup.enter="handleQuery"
style="width: 160px"
>
<el-option
v-for="item in departmentList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="patientList" border style="width: 100%; height: 60vh" highlight-current-row <el-table
@current-change="handleCurrentChange"> :data="patientList"
<el-table-column prop="departmentName" label="科室" width="120" /> border
<el-table-column prop="patientName" label="姓名" width="100" /> style="width: 100%; height: 60vh"
<el-table-column prop="genderEnum_enumText" label="性别" width="80" /> highlight-current-row
<!-- <el-table-column prop="ageString" label="开单医生" width="80" /> --> @current-change="handleCurrentChange"
<el-table-column prop="encounterDate" label="就诊日期" width="140" /> >
</el-table> <el-table-column prop="departmentName" label="科室" width="120" />
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" <el-table-column prop="patientName" label="姓名" width="100" />
v-model:limit="queryParams.pageSize" @pagination="getList" /> <el-table-column prop="genderEnum_enumText" label="性别" width="80" />
</div> <!-- <el-table-column prop="ageString" label="开单医生" width="80" /> -->
<el-table-column prop="encounterDate" label="就诊日期" width="140" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
<div class="right"> <div class="right">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center">
<p style="margin-right: 60px;font-size: 19px;">患者基本信息</p> <p style="margin-right: 60px; font-size: 19px">患者基本信息</p>
<!-- <el-button type="success" plain @click="print" icon="Printer" style="margin-left: 30px;">打印</el-button> -->
</div>
<div class="top">
<el-row>
<el-col :span="4">姓名{{ personInfo.patientName }}</el-col>
<el-col :span="3">性别{{ personInfo.genderEnum_enumText }}</el-col>
<el-col :span="3">年龄{{ personInfo.age }}</el-col>
<el-col :span="5">合同类型{{ personInfo.categoryEnum_enumText }}</el-col>
</el-row><br>
<el-row>
<el-col :span="5">就诊科室{{ personInfo.organizationName }}</el-col>
<el-col :span="5">就诊日期{{ personInfo.encounterDate }}</el-col>
<el-col :span="7">证件号{{ personInfo.idCard }}</el-col>
<!-- <el-col :span="6">门诊诊断{{ personInfo.patientName }}</el-col> --> <!-- <el-button type="success" plain @click="print" icon="Printer" style="margin-left: 30px;">打印</el-button> -->
</el-row><br> </div>
<el-row> <div class="top">
<el-col :span="4">总金额{{ personInfo.totalPrice ? personInfo.totalPrice.toFixed(2) : '0.00' }}</el-col> <el-row>
</el-row> <el-col :span="4">姓名{{ personInfo.patientName }}</el-col>
</div> <el-col :span="3">性别{{ personInfo.genderEnum_enumText }}</el-col>
<el-table :data="medicineInfoList" border style="width: 100%; height: 65vh;margin-top: 10px;" <el-col :span="3">年龄{{ personInfo.age }}</el-col>
:row-style="rowStyle" :span-method="spanMethod" @selection-change="handleSelectionChange" <el-col :span="5"
ref="tableRef"> >合同类型{{ personInfo.categoryEnum_enumText }}</el-col
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> > </el-row
<template #default="scope"> ><br />
<el-button link type="primary" icon="SuccessFilled" @click="submitMedicine(scope.row)">发药</el-button> <el-row>
<el-button link type="primary" @click="backMedicine(scope.row)" icon="CircleClose">作废</el-button> <el-col :span="5">就诊科室{{ personInfo.organizationName }}</el-col>
</template> <el-col :span="5">就诊日期{{ personInfo.encounterDate }}</el-col>
</el-table-column> <el-col :span="7">证件号{{ personInfo.idCard }}</el-col>
<el-table-column prop="departmentName" label="科室" width="90" />
<el-table-column prop="doctorName" label="开单医生" width="100" /> <!-- <el-col :span="6">门诊诊断{{ personInfo.patientName }}</el-col> --> </el-row
<el-table-column prop="itemType" label="项目类型" width="100" /> ><br />
<el-table-column prop="conditionName" label="诊断" width="120" /> <el-row>
<el-table-column prop="prescriptionNo" label="处方号" width="120" /> <el-col :span="4"
<el-table-column prop="markers" label="成组" width="60"> >总金额{{
<template #default="scope"> personInfo.totalPrice ? personInfo.totalPrice.toFixed(2) : "0.00"
<span>{{ markers[scope.$index] }}</span> }}</el-col
</template> >
</el-table-column> </el-row>
<el-table-column prop="medicineName" label="药品名称" width="120" /> </div>
<el-table-column prop="totalVolume" label="规格" width="100" /> <el-table
<el-table-column prop="dose" label="剂量" width="100" /> :data="medicineInfoList"
<el-table-column prop="rateCode" label="频次" width="100" /> border
<el-table-column prop="methodCode" label="用法" width="80" /> style="width: 100%; height: 65vh; margin-top: 10px"
<el-table-column prop="dispensePerDuration" label="天数" width="60" /> :row-style="rowStyle"
<el-table-column prop="dispensePerQuantity" label="单次发药数" width="80" /> :span-method="spanMethod"
<el-table-column prop="quantity" label="数量" width="80" /> @selection-change="handleSelectionChange"
<!-- <el-table-column prop="performOrg_dictText" label="是否拆零" width="120"> ref="tableRef"
>
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button
link
type="primary"
icon="SuccessFilled"
@click="submitMedicine(scope.row)"
>发药</el-button
>
<el-button
link
type="primary"
@click="backMedicine(scope.row)"
icon="CircleClose"
>作废</el-button
>
</template>
</el-table-column>
<el-table-column prop="departmentName" label="科室" width="90" />
<el-table-column prop="doctorName" label="开单医生" width="100" />
<el-table-column prop="itemType" label="项目类型" width="100" />
<el-table-column prop="conditionName" label="诊断" width="120" />
<el-table-column prop="prescriptionNo" label="处方号" width="120" />
<el-table-column prop="markers" label="成组" width="60">
<template #default="scope">
<span>{{ markers[scope.$index] }}</span>
</template>
</el-table-column>
<el-table-column prop="medicineName" label="药品名称" width="120" />
<el-table-column prop="totalVolume" label="规格" width="100" />
<el-table-column prop="dose" label="剂量" width="100" />
<el-table-column prop="rateCode" label="频次" width="100" />
<el-table-column prop="methodCode" label="用法" width="80" />
<el-table-column prop="dispensePerDuration" label="天数" width="60" />
<el-table-column
prop="dispensePerQuantity"
label="单次发药数"
width="80"
/>
<el-table-column prop="quantity" label="数量" width="80" />
<!-- <el-table-column prop="performOrg_dictText" label="是否拆零" width="120">
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.performOrg_dictText" placeholder="请选择" <el-select v-model="scope.row.performOrg_dictText" placeholder="请选择"
@change="handleSelectChange(scope.row)"> @change="handleSelectChange(scope.row)">
@@ -95,37 +165,52 @@
</el-select> </el-select>
</template> </template>
</el-table-column> --> </el-table-column> -->
<!-- <el-table-column prop="medicationStatusEnum_enumText" label="追溯码" width="100" /> --> <!-- <el-table-column prop="medicationStatusEnum_enumText" label="追溯码" width="100" /> -->
<el-table-column prop="unitPrice" label="单价" width="60" :formatter="formatPrice" /> <el-table-column
<el-table-column prop="totalPrice" label="金额" width="70" :formatter="formatPrice" /> prop="unitPrice"
</el-table> label="单价"
</div> width="60"
<el-dialog title="选择作废原因" v-model="showDialog" width="30%"> :formatter="formatPrice"
<!-- 下拉选择框 --> />
<el-select v-model="notPerformedReasonEnum" placeholder="请选择作废原因"> <el-table-column
<el-option v-for="item in backReason" :key="item.value" :label="item.label" :value="item.value" /> prop="totalPrice"
</el-select> label="金额"
width="70"
<!-- 弹窗底部按钮 --> :formatter="formatPrice"
<template #footer> />
<span class="dialog-footer"> </el-table>
<el-button @click="handleCancel"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
</span>
</template>
</el-dialog>
</div> </div>
<el-dialog title="选择作废原因" v-model="showDialog" width="30%">
<!-- 下拉选择框 -->
<el-select v-model="notPerformedReasonEnum" placeholder="请选择作废原因">
<el-option
v-for="item in backReason"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- 弹窗底部按钮 -->
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCancel"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
</span>
</template>
</el-dialog>
</div>
</template> </template>
<script setup name="westernmedicine"> <script setup name="westernmedicine">
import { ref, computed,onMounted,onBeforeMount } from "vue"; import { ref, computed, onMounted, onBeforeMount } from "vue";
import { ElMessage } from 'element-plus'; import { ElMessage } from "element-plus";
import { import {
listWesternmedicine, listWesternmedicine,
listPatient, listPatient,
updateMedicion, updateMedicion,
listInit, listInit,
backMedicion backMedicion,
} from "./components/api"; } from "./components/api";
const showSearch = ref(true); const showSearch = ref(true);
@@ -136,9 +221,9 @@ const medicineInfoList = ref([]);
const departmentList = ref([]); const departmentList = ref([]);
const dateRange = ref([]); const dateRange = ref([]);
const personInfo = ref([]); const personInfo = ref([]);
const diagnoses = ref(''); const diagnoses = ref("");
const backReason = ref([]); const backReason = ref([]);
const selectedPrescriptionNo = ref(''); const selectedPrescriptionNo = ref("");
const showDialog = ref(false); const showDialog = ref(false);
const notPerformedReasonEnum = ref(); const notPerformedReasonEnum = ref();
const currentRow = ref(null); const currentRow = ref(null);
@@ -149,13 +234,13 @@ const selectedItems = ref(new Set());
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const data = reactive({ const data = reactive({
form: {}, form: {},
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
condition: null, condition: null,
departmentId: null departmentId: null,
}, },
}); });
const { queryParams } = toRefs(data); const { queryParams } = toRefs(data);
@@ -165,104 +250,97 @@ onMounted(() => {
getList(); getList();
}); });
// 设置默认日期范围为当天 // 设置默认日期范围为当天
function setDefaultDateRange() { function setDefaultDateRange() {
const today = new Date(); const today = new Date();
const year = today.getFullYear(); const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); const month = String(today.getMonth() + 1).padStart(2, "0");
const day = String(today.getDate()).padStart(2, '0'); const day = String(today.getDate()).padStart(2, "0");
const formattedDate = `${year}-${month}-${day}`; const formattedDate = `${year}-${month}-${day}`;
dateRange.value = [formattedDate, formattedDate]; dateRange.value = [formattedDate, formattedDate];
console.log("222",dateRange.value) console.log("222", dateRange.value);
} }
function getList() { function getList() {
console.log("224555552",dateRange.value) console.log("224555552", dateRange.value);
queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00"; queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00";
queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59"; queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59";
console.log("222",queryParams.value) console.log("222", queryParams.value);
listPatient(queryParams.value).then((response) => { listPatient(queryParams.value).then((response) => {
console.log("Full response1:", response); console.log("Full response1:", response);
patientList.value = response.data.records; patientList.value = response.data.records;
total.value = response.data.total; total.value = response.data.total;
}); });
listInit().then((response) => { listInit().then((response) => {
console.log("Full response2:", response); console.log("Full response2:", response);
departmentList.value = [ departmentList.value = [
{ value: null, label: '全部' }, { value: null, label: "全部" },
...response.data.departmentOptions ...response.data.departmentOptions,
]; ];
backReason.value = response.data.notPerformedReasonOptions backReason.value = response.data.notPerformedReasonOptions;
}); });
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
setDefaultDateRange() setDefaultDateRange();
medicineInfoList.value = [] medicineInfoList.value = [];
personInfo.value = [] personInfo.value = [];
proxy.resetForm("queryRef"); proxy.resetForm("queryRef");
getList(); getList();
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
if (dateRange.value) { if (dateRange.value) {
queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00"; queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00";
queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59"; queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59";
} else { } else {
queryParams.value.startTimeSTime = null; queryParams.value.startTimeSTime = null;
queryParams.value.startTimeETime = null; queryParams.value.startTimeETime = null;
} }
queryParams.value.pageNo = 1; queryParams.value.pageNo = 1;
console.log("222",queryParams.value) listPatient(queryParams.value).then((response) => {
listPatient(queryParams.value).then((response) => { patientList.value = response.data.records;
console.log("Full response1:", response); total.value = response.data.total;
patientList.value = response.data.records; });
total.value = response.data.total;
});
} }
function countGroupRows(data) { function countGroupRows(data) {
const groupCounts = new Map(); const groupCounts = new Map();
data.forEach((item, index) => { data.forEach((item, index) => {
if (!groupCounts.has(item.prescriptionNo)) { if (!groupCounts.has(item.prescriptionNo)) {
groupCounts.set(item.prescriptionNo, { count: 0, indices: [] }); groupCounts.set(item.prescriptionNo, { count: 0, indices: [] });
} }
const groupInfo = groupCounts.get(item.prescriptionNo); const groupInfo = groupCounts.get(item.prescriptionNo);
groupInfo.count++; groupInfo.count++;
groupInfo.indices.push(index); groupInfo.indices.push(index);
}); });
console.log("F*******:", groupCounts); return groupCounts;
return groupCounts;
} }
function getRowMarkers(groupCounts, data) { function getRowMarkers(groupCounts, data) {
const markers = new Array(data.length).fill(""); const markers = new Array(data.length).fill("");
groupCounts.forEach((groupInfo, prescriptionNo) => { groupCounts.forEach((groupInfo, prescriptionNo) => {
const { count, indices } = groupInfo; const { count, indices } = groupInfo;
if (count === 1) { if (count === 1) {
// 如果只有一行,不显示标记 // 如果只有一行,不显示标记
return; return;
} else if (count === 2) { } else if (count === 2) {
// 如果有两行,分别显示左右括号 // 如果有两行,分别显示左右括号
markers[indices[0]] = "┏"; markers[indices[0]] = "┏";
markers[indices[1]] = "┗ "; markers[indices[1]] = "┗ ";
} else { } else {
// 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号 // 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号
markers[indices[0]] = "┏"; markers[indices[0]] = "┏";
for (let i = 1; i < indices.length - 1; i++) { for (let i = 1; i < indices.length - 1; i++) {
markers[indices[i]] = "┃"; markers[indices[i]] = "┃";
} }
markers[indices[indices.length - 1]] = "┗ "; markers[indices[indices.length - 1]] = "┗ ";
} }
}); });
console.log("F*******:", markers); return markers;
return markers;
} }
function handleSelectionChange(selection) { function handleSelectionChange(selection) {
@@ -272,7 +350,7 @@ function handleSelectionChange(selection) {
selection.forEach((item) => { selection.forEach((item) => {
selectedItems.value.add(item); selectedItems.value.add(item);
}); });
// 更新 selectedGroupIds // 更新 selectedGroupIds
selection.forEach((item) => { selection.forEach((item) => {
const prescriptionNo = item.prescriptionNo; const prescriptionNo = item.prescriptionNo;
// 检查 prescriptionNo 是否同时存在 // 检查 prescriptionNo 是否同时存在
@@ -292,119 +370,123 @@ function handleSelectionChange(selection) {
} }
function spanMethod({ row, column, rowIndex, columnIndex }) { function spanMethod({ row, column, rowIndex, columnIndex }) {
// 定义需要合并的列范围前6列包括selection列 // 定义需要合并的列范围前6列包括selection列
const columnsToMerge = [ 0,1, 2, 3, 4, 5]; // 假设selection列是第0列其他列依次是1, 2, 3, 4, 5 const columnsToMerge = [0, 1, 2, 3, 4, 5]; // 假设selection列是第0列其他列依次是1, 2, 3, 4, 5
// 检查当前列是否在需要合并的列范围内 // 检查当前列是否在需要合并的列范围内
if (columnsToMerge.includes(columnIndex)) { if (columnsToMerge.includes(columnIndex)) {
const prescriptionNo = row.prescriptionNo; const prescriptionNo = row.prescriptionNo;
// 查找当前处方号在列表中第一次出现的索引 // 查找当前处方号在列表中第一次出现的索引
const firstRowIndex = medicineInfoList.value.findIndex(item => item.prescriptionNo === prescriptionNo); const firstRowIndex = medicineInfoList.value.findIndex(
(item) => item.prescriptionNo === prescriptionNo
);
// 如果当前行是该处方号的首行则合并count行 // 如果当前行是该处方号的首行则合并count行
if (rowIndex === firstRowIndex) { if (rowIndex === firstRowIndex) {
// 计算该处方号的总行数 // 计算该处方号的总行数
const count = medicineInfoList.value.filter(item => item.prescriptionNo === prescriptionNo).length; const count = medicineInfoList.value.filter(
return [count, 1]; // 合并count行1列 (item) => item.prescriptionNo === prescriptionNo
} else { ).length;
return [0, 0]; // 其他行不显示 return [count, 1]; // 合并count行1列
} } else {
return [0, 0]; // 其他行不显示
} }
}
// 其他列不进行合并 // 其他列不进行合并
return [1, 1]; return [1, 1];
} }
function formatPrice(row, column, cellValue) { function formatPrice(row, column, cellValue) {
if (cellValue === null || cellValue === undefined) { if (cellValue === null || cellValue === undefined) {
return '0.00'; // 如果值为空返回0.00 return "0.00"; // 如果值为空返回0.00
} }
return cellValue.toFixed(2); // 保留两位小数 return cellValue.toFixed(2); // 保留两位小数
} }
function handleCurrentChange(row) { function handleCurrentChange(row) {
currentRow.value = row; // 更新当前选中行的数据 currentRow.value = row; // 更新当前选中行的数据
console.log("当前选中行的数据:", currentRow.value); console.log("当前选中行的数据:", currentRow.value);
listWesternmedicine(currentRow.value).then((response) => { listWesternmedicine(currentRow.value).then((response) => {
console.log("121212",response) console.log("121212", response);
personInfo.value = response.data.prescriptionPatientInfoDto; personInfo.value = response.data.prescriptionPatientInfoDto;
medicineInfoList.value = response.data.prescriptionMedicineInfoDtoList; medicineInfoList.value = response.data.prescriptionMedicineInfoDtoList;
// 统计每个 prescriptionNo 的行数 // 统计每个 prescriptionNo 的行数
const groupCounts = countGroupRows(medicineInfoList.value); const groupCounts = countGroupRows(medicineInfoList.value);
// 设置每行的标记 // 设置每行的标记
markers.value = getRowMarkers(groupCounts, medicineInfoList.value); markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
diagnoses.value = medicineInfoList.value.map(item => item.诊断 || '无').join(', '); diagnoses.value = medicineInfoList.value
}); .map((item) => item.诊断 || "无")
.join(", ");
});
} }
function submitMedicine(row) { function submitMedicine(row) {
updateMedicion(row.prescriptionNo).then((response) => { updateMedicion(row.prescriptionNo).then((response) => {
proxy.$modal.msgSuccess("发药成功"); proxy.$modal.msgSuccess("发药成功");
listWesternmedicine(currentRow.value).then((response) => { listWesternmedicine(currentRow.value).then((response) => {
medicineInfoList.value = response.data; medicineInfoList.value = response.data;
// 统计每个 prescriptionNo 的行数 // 统计每个 prescriptionNo 的行数
const groupCounts = countGroupRows(medicineInfoList.value); const groupCounts = countGroupRows(medicineInfoList.value);
// 设置每行的标记 // 设置每行的标记
markers.value = getRowMarkers(groupCounts, medicineInfoList.value); markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
});
}); });
});
} }
function backMedicine(row) { function backMedicine(row) {
showDialog.value = true; showDialog.value = true;
selectedPrescriptionNo.value = row.prescriptionNo selectedPrescriptionNo.value = row.prescriptionNo;
console.log('作废原因:', selectedPrescriptionNo.value,row.prescriptionNo); console.log("作废原因:", selectedPrescriptionNo.value, row.prescriptionNo);
} }
function handleConfirm() { function handleConfirm() {
if (!notPerformedReasonEnum.value) { if (!notPerformedReasonEnum.value) {
ElMessage.error('请选择作废原因'); ElMessage.error("请选择作废原因");
return; return;
} }
// 在这里处理作废逻辑,比如调用 API backMedicion(selectedPrescriptionNo.value, notPerformedReasonEnum.value).then(
console.log('作废原因:', selectedPrescriptionNo.value,notPerformedReasonEnum.value); (response) => {
backMedicion(selectedPrescriptionNo.value,notPerformedReasonEnum.value).then((response) => { proxy.$modal.msgSuccess("作废成功");
proxy.$modal.msgSuccess("作废成功"); }
}); );
listWesternmedicine(currentRow.value).then((response) => { listWesternmedicine(currentRow.value).then((response) => {
medicineInfoList.value = response.data; medicineInfoList.value = response.data;
// 统计每个 prescriptionNo 的行数 // 统计每个 prescriptionNo 的行数
const groupCounts = countGroupRows(medicineInfoList.value); const groupCounts = countGroupRows(medicineInfoList.value);
// 设置每行的标记 // 设置每行的标记
markers.value = getRowMarkers(groupCounts, medicineInfoList.value); markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
}); });
showDialog.value = false; showDialog.value = false;
notPerformedReasonEnum.value = ''; // 清空选择 notPerformedReasonEnum.value = ""; // 清空选择
}; }
function handleCancel() { function handleCancel() {
showDialog.value = false; showDialog.value = false;
notPerformedReasonEnum.value = ''; // 清空选择 notPerformedReasonEnum.value = ""; // 清空选择
}; }
// getList(); // getList();
</script> </script>
<style scoped> <style scoped>
.app-container { .app-container {
padding: 20px; padding: 20px;
display: flex; display: flex;
} }
.left { .left {
width: 28%; width: 28%;
} }
.right { .right {
margin-left: 2%; margin-left: 2%;
width: 70%; width: 70%;
} }
:deep(.el-table tbody tr:hover > td) { :deep(.el-table tbody tr:hover > td) {
background-color: inherit !important; background-color: inherit !important;
} }
</style> </style>