西药发药
This commit is contained in:
@@ -64,7 +64,25 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
>
|
>
|
||||||
|
<el-form-item label="执行时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRangeRight"
|
||||||
|
type="datetimerange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
style="width: auto"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="Search"
|
||||||
|
@click="handleQueryRight"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" @click="resetQueryRight">重置</el-button>
|
||||||
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit"
|
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit"
|
||||||
>确认执行</el-button
|
>确认执行</el-button
|
||||||
>
|
>
|
||||||
@@ -219,6 +237,7 @@ import {
|
|||||||
updateInfusionRecord,
|
updateInfusionRecord,
|
||||||
listInfusionRecord,
|
listInfusionRecord,
|
||||||
editPatientInfusionTime,
|
editPatientInfusionTime,
|
||||||
|
listPatientInfusionRecord,
|
||||||
listPatientInfusionPerformRecord,
|
listPatientInfusionPerformRecord,
|
||||||
} from "./component/api";
|
} from "./component/api";
|
||||||
|
|
||||||
@@ -255,6 +274,21 @@ const { queryParams } = toRefs(data);
|
|||||||
|
|
||||||
/** 查询门诊输液列表 */
|
/** 查询门诊输液列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
|
listInfusionRecord(queryParams.value).then((response) => {
|
||||||
|
console.log("Full response1:", response);
|
||||||
|
infusionList.value = response.data;
|
||||||
|
// 为每个 groupId 分配固定颜色
|
||||||
|
response.data.forEach((item) => {
|
||||||
|
const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引
|
||||||
|
item.color = groupColors[colorIndex];
|
||||||
|
});
|
||||||
|
// 更新表格行的样式
|
||||||
|
updateTableRowStyles();
|
||||||
|
// 统计每个 groupId 的行数
|
||||||
|
const groupCounts = countGroupRows(infusionList.value);
|
||||||
|
// 设置每行的标记
|
||||||
|
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||||
|
});
|
||||||
listPatients().then((response) => {
|
listPatients().then((response) => {
|
||||||
patientList.value = response.data.records;
|
patientList.value = response.data.records;
|
||||||
});
|
});
|
||||||
@@ -283,13 +317,54 @@ function handleQuery() {
|
|||||||
patientList.value = response.data.records;
|
patientList.value = response.data.records;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 右边搜索按钮操作 */
|
||||||
|
function handleQueryRight() {
|
||||||
|
const createTimeSTime = dateRangeRight.value[0];
|
||||||
|
const createTimeETime = dateRangeRight.value[1];
|
||||||
|
timeRightStart.value = createTimeSTime;
|
||||||
|
timeRightEnd.value = createTimeETime;
|
||||||
|
listInfusionRecord(createTimeSTime, createTimeETime).then((response) => {
|
||||||
|
infusionList.value = response.data;
|
||||||
|
});
|
||||||
|
listPatientInfusionPerformRecord(createTimeSTime, createTimeETime).then((response) => {
|
||||||
|
historyRecordsList.value = response.data;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
dateRange.value = [];
|
dateRange.value = [];
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef");
|
||||||
getList();
|
getList();
|
||||||
|
listPatientInfusionPerformRecord().then((response) => {
|
||||||
|
historyRecordsList.value = response.data;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 右边重置按钮操作 */
|
||||||
|
function resetQueryRight() {
|
||||||
|
if (historyRecordsList.value.length > 0) {
|
||||||
|
dateRangeRight.value = [];
|
||||||
|
listInfusionRecord().then((response) => {
|
||||||
|
infusionList.value = response.data;
|
||||||
|
});
|
||||||
|
listPatientInfusionPerformRecord().then((response) => {
|
||||||
|
historyRecordsList.value = response.data;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 清空选中状态
|
||||||
|
selectedItems.value.clear();
|
||||||
|
selectedGroupIds.value.clear();
|
||||||
|
dateRangeRight.value = [];
|
||||||
|
// 取消表格所有行的选中状态
|
||||||
|
infusionList.value.forEach((row) => {
|
||||||
|
tableRef.value.toggleRowSelection(row, false);
|
||||||
|
});
|
||||||
|
listPatientInfusionRecord(currentRow.value).then((response) => {
|
||||||
|
infusionList.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getRowMarkers(groupCounts, data) {
|
function getRowMarkers(groupCounts, data) {
|
||||||
const markers = new Array(data.length).fill("");
|
const markers = new Array(data.length).fill("");
|
||||||
@@ -388,11 +463,19 @@ function handleSelectionChange(selection) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function clearSelections() {
|
function clearSelections() {
|
||||||
currentRow.value.patientId= Number(currentRow.value.patientId)
|
dateRangeRight.value = [];
|
||||||
listInfusionRecord(currentRow.value.patientId).then((response) => {
|
if (!currentRow.value) {
|
||||||
|
const createTimeSTime = timeRightStart.value || null;
|
||||||
|
const createTimeETime = timeRightEnd.value || null;
|
||||||
|
listInfusionRecord(createTimeSTime, createTimeETime).then((response) => {
|
||||||
infusionList.value = response.data;
|
infusionList.value = response.data;
|
||||||
});
|
});
|
||||||
listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
|
} else {
|
||||||
|
listPatientInfusionRecord(currentRow.value).then((response) => {
|
||||||
|
infusionList.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
listPatientInfusionPerformRecord().then((response) => {
|
||||||
historyRecordsList.value = response.data;
|
historyRecordsList.value = response.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -411,24 +494,15 @@ function handleUpdateTime(row) {
|
|||||||
|
|
||||||
function handleCurrentChange(row) {
|
function handleCurrentChange(row) {
|
||||||
currentRow.value = row; // 更新当前选中行的数据
|
currentRow.value = row; // 更新当前选中行的数据
|
||||||
currentRow.value.patientId= Number(currentRow.value.patientId)
|
console.log("当前选中行的数据:", currentRow.value);
|
||||||
console.log("当前选中行的数据:", currentRow.value.patientId,typeof currentRow.value.patientId);
|
listPatientInfusionRecord(currentRow.value).then((response) => {
|
||||||
listInfusionRecord(currentRow.value.patientId).then((response) => {
|
|
||||||
console.log("Full response1:", response);
|
|
||||||
infusionList.value = response.data;
|
infusionList.value = response.data;
|
||||||
// 为每个 groupId 分配固定颜色
|
|
||||||
response.data.forEach((item) => {
|
|
||||||
const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引
|
|
||||||
item.color = groupColors[colorIndex];
|
|
||||||
});
|
|
||||||
// 更新表格行的样式
|
|
||||||
updateTableRowStyles();
|
|
||||||
// 统计每个 groupId 的行数
|
// 统计每个 groupId 的行数
|
||||||
const groupCounts = countGroupRows(infusionList.value);
|
const groupCounts = countGroupRows(infusionList.value);
|
||||||
// 设置每行的标记
|
// 设置每行的标记
|
||||||
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||||
});
|
});
|
||||||
listPatientInfusionPerformRecord(Number(currentRow.value.patientId)).then((response) => {
|
listPatientInfusionPerformRecord(currentRow.value).then((response) => {
|
||||||
historyRecordsList.value = response.data;
|
historyRecordsList.value = response.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,20 +24,24 @@ export function listWesternmedicine(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updateMedicion(prescriptionNo) {
|
||||||
export function updateMedicion(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense',
|
url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
params: {
|
||||||
|
prescriptionNo: prescriptionNo
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function backMedicion(data) {
|
export function backMedicion(prescriptionNo,notPerformedReasonEnum) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel',
|
url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
params: {
|
||||||
|
prescriptionNo: prescriptionNo,
|
||||||
|
notPerformedReasonEnum:notPerformedReasonEnum
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -38,10 +38,8 @@
|
|||||||
<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="primary" plain @click="submitMedicine" icon="SuccessFilled">发药</el-button>
|
|
||||||
<el-button type="warning" plain @click="backMedicine" icon="CircleClose"
|
<!-- <el-button type="success" plain @click="print" icon="Printer" style="margin-left: 30px;">打印</el-button> -->
|
||||||
style="margin-left: 30px;">作废</el-button>
|
|
||||||
<el-button type="success" plain @click="print" icon="Printer" style="margin-left: 30px;">打印</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -49,25 +47,31 @@
|
|||||||
<el-col :span="3">性别:{{ personInfo.genderEnum_enumText }}</el-col>
|
<el-col :span="3">性别:{{ personInfo.genderEnum_enumText }}</el-col>
|
||||||
<el-col :span="3">年龄:{{ personInfo.age }}</el-col>
|
<el-col :span="3">年龄:{{ personInfo.age }}</el-col>
|
||||||
<el-col :span="5">合同类型:{{ personInfo.categoryEnum_enumText }}</el-col>
|
<el-col :span="5">合同类型:{{ personInfo.categoryEnum_enumText }}</el-col>
|
||||||
<el-col :span="6">证件号:{{ personInfo.idCard }}</el-col>
|
|
||||||
</el-row><br>
|
</el-row><br>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">就诊科室:{{ personInfo.organizationName }}</el-col>
|
<el-col :span="5">就诊科室:{{ personInfo.organizationName }}</el-col>
|
||||||
<el-col :span="5">就诊日期:{{ personInfo.encounterDate }}</el-col>
|
<el-col :span="5">就诊日期:{{ personInfo.encounterDate }}</el-col>
|
||||||
<el-col :span="6">门诊诊断:{{ personInfo.patientName }}</el-col>
|
<el-col :span="7">证件号:{{ personInfo.idCard }}</el-col>
|
||||||
|
|
||||||
|
<!-- <el-col :span="6">门诊诊断:{{ personInfo.patientName }}</el-col> -->
|
||||||
</el-row><br>
|
</el-row><br>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">总金额:{{ totalPrice ? totalPrice.toFixed(2) : '0.00' }}元</el-col>
|
<el-col :span="4">总金额:{{ personInfo.totalPrice ? personInfo.totalPrice.toFixed(2) : '0.00' }}元</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="medicineInfoList" border style="width: 100%; height: 65vh;margin-top: 10px;"
|
<el-table :data="medicineInfoList" border style="width: 100%; height: 65vh;margin-top: 10px;"
|
||||||
:row-style="rowStyle" :span-method="spanMethod" @selection-change="handleSelectionChange"
|
:row-style="rowStyle" :span-method="spanMethod" @selection-change="handleSelectionChange"
|
||||||
ref="tableRef">
|
ref="tableRef">
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<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="departmentName" label="科室" width="90" />
|
||||||
<el-table-column prop="doctorName" label="开单医生" width="100" />
|
<el-table-column prop="doctorName" label="开单医生" width="100" />
|
||||||
<el-table-column prop="itemType" label="项目类型" width="100" />
|
<el-table-column prop="itemType" label="项目类型" width="100" />
|
||||||
<el-table-column prop="doneNum" label="诊断" width="120" />
|
<el-table-column prop="conditionName" label="诊断" width="120" />
|
||||||
<el-table-column prop="prescriptionNo" label="处方号" width="120" />
|
<el-table-column prop="prescriptionNo" label="处方号" width="120" />
|
||||||
<el-table-column prop="markers" label="成组" width="60">
|
<el-table-column prop="markers" label="成组" width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -114,7 +118,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="westernmedicine">
|
<script setup name="westernmedicine">
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed,onMounted,onBeforeMount } from "vue";
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import {
|
import {
|
||||||
listWesternmedicine,
|
listWesternmedicine,
|
||||||
@@ -138,7 +142,9 @@ 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);
|
||||||
|
const tableRef = ref(null);
|
||||||
|
const selectedGroupIds = ref(new Set());
|
||||||
|
const selectedItems = ref(new Set());
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
@@ -153,14 +159,30 @@ const data = reactive({
|
|||||||
});
|
});
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
// 在组件挂载后调用 getList
|
||||||
|
onMounted(() => {
|
||||||
|
setDefaultDateRange();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 设置默认日期范围为当天
|
||||||
|
function setDefaultDateRange() {
|
||||||
|
const today = new Date();
|
||||||
|
const year = today.getFullYear();
|
||||||
|
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(today.getDate()).padStart(2, '0');
|
||||||
|
const formattedDate = `${year}-${month}-${day}`;
|
||||||
|
dateRange.value = [formattedDate, formattedDate];
|
||||||
|
console.log("222",dateRange.value)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
const currentDate = new Date();
|
console.log("224555552",dateRange.value)
|
||||||
const year = currentDate.getFullYear();
|
queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00";
|
||||||
const month = String(currentDate.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1
|
queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59";
|
||||||
const day = String(currentDate.getDate()).padStart(2, '0');
|
|
||||||
const formattedDateTime = `${year}-${month}-${day}`;
|
|
||||||
queryParams.value.startTimeSTime = formattedDateTime + " 00:00:00";
|
|
||||||
queryParams.value.startTimeETime = formattedDateTime + " 23:59:59";
|
|
||||||
|
|
||||||
console.log("222",queryParams.value)
|
console.log("222",queryParams.value)
|
||||||
listPatient(queryParams.value).then((response) => {
|
listPatient(queryParams.value).then((response) => {
|
||||||
@@ -178,6 +200,14 @@ function getList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
setDefaultDateRange()
|
||||||
|
medicineInfoList.value = []
|
||||||
|
personInfo.value = []
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
getList();
|
||||||
|
}
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
if (dateRange.value) {
|
if (dateRange.value) {
|
||||||
@@ -236,18 +266,34 @@ function getRowMarkers(groupCounts, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
selectedPrescriptionNo.value = '';
|
// 清空之前选中的数据
|
||||||
if (selection.length > 0) {
|
selectedItems.value.clear();
|
||||||
// 获取选中行的 prescriptionNo
|
// 将当前选中的数据存到 selectedItems 中
|
||||||
selectedPrescriptionNo.value = selection[0].prescriptionNo;
|
selection.forEach((item) => {
|
||||||
|
selectedItems.value.add(item);
|
||||||
|
});
|
||||||
|
// 更新 selectedGroupIds
|
||||||
|
selection.forEach((item) => {
|
||||||
|
const prescriptionNo = item.prescriptionNo;
|
||||||
|
// 检查 prescriptionNo 是否同时存在
|
||||||
|
if (selectedGroupIds.value.has(prescriptionNo)) {
|
||||||
|
// 如果都存在,则移除它们
|
||||||
|
selectedGroupIds.value.delete(prescriptionNo);
|
||||||
} else {
|
} else {
|
||||||
selectedPrescriptionNo.value = '';
|
// 否则添加它们
|
||||||
|
selectedGroupIds.value.add(prescriptionNo);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// 动态更新表格行的选中状态
|
||||||
|
medicineInfoList.value.forEach((row) => {
|
||||||
|
const isSelected = selectedGroupIds.value.has(row.prescriptionNo);
|
||||||
|
tableRef.value.toggleRowSelection(row, isSelected);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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)) {
|
||||||
@@ -284,7 +330,7 @@ function handleCurrentChange(row) {
|
|||||||
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;
|
||||||
// 统计每个 groupId 的行数
|
// 统计每个 prescriptionNo 的行数
|
||||||
const groupCounts = countGroupRows(medicineInfoList.value);
|
const groupCounts = countGroupRows(medicineInfoList.value);
|
||||||
// 设置每行的标记
|
// 设置每行的标记
|
||||||
markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
|
markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
|
||||||
@@ -293,12 +339,12 @@ function handleCurrentChange(row) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitMedicine() {
|
function submitMedicine(row) {
|
||||||
updateMedicion(selectedPrescriptionNo.value).then((response) => {
|
updateMedicion(row.prescriptionNo).then((response) => {
|
||||||
proxy.$modal.msgSuccess("发药成功");
|
proxy.$modal.msgSuccess("发药成功");
|
||||||
listWesternmedicine(currentRow.value.encounterId).then((response) => {
|
listWesternmedicine(currentRow.value).then((response) => {
|
||||||
medicineInfoList.value = response.data;
|
medicineInfoList.value = response.data;
|
||||||
// 统计每个 groupId 的行数
|
// 统计每个 prescriptionNo 的行数
|
||||||
const groupCounts = countGroupRows(medicineInfoList.value);
|
const groupCounts = countGroupRows(medicineInfoList.value);
|
||||||
// 设置每行的标记
|
// 设置每行的标记
|
||||||
markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
|
markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
|
||||||
@@ -306,8 +352,11 @@ function submitMedicine() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function backMedicine() {
|
function backMedicine(row) {
|
||||||
showDialog.value = true;
|
showDialog.value = true;
|
||||||
|
selectedPrescriptionNo.value = row.prescriptionNo
|
||||||
|
console.log('作废原因:', selectedPrescriptionNo.value,row.prescriptionNo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleConfirm() {
|
function handleConfirm() {
|
||||||
@@ -317,9 +366,16 @@ function handleConfirm() {
|
|||||||
}
|
}
|
||||||
// 在这里处理作废逻辑,比如调用 API
|
// 在这里处理作废逻辑,比如调用 API
|
||||||
console.log('作废原因:', selectedPrescriptionNo.value,notPerformedReasonEnum.value);
|
console.log('作废原因:', selectedPrescriptionNo.value,notPerformedReasonEnum.value);
|
||||||
// backMedicion(selectedPrescriptionNo.value,notPerformedReasonEnum.value).then((response) => {
|
backMedicion(selectedPrescriptionNo.value,notPerformedReasonEnum.value).then((response) => {
|
||||||
// proxy.$modal.msgSuccess("作废成功");
|
proxy.$modal.msgSuccess("作废成功");
|
||||||
// });
|
});
|
||||||
|
listWesternmedicine(currentRow.value).then((response) => {
|
||||||
|
medicineInfoList.value = response.data;
|
||||||
|
// 统计每个 prescriptionNo 的行数
|
||||||
|
const groupCounts = countGroupRows(medicineInfoList.value);
|
||||||
|
// 设置每行的标记
|
||||||
|
markers.value = getRowMarkers(groupCounts, medicineInfoList.value);
|
||||||
|
});
|
||||||
showDialog.value = false;
|
showDialog.value = false;
|
||||||
notPerformedReasonEnum.value = ''; // 清空选择
|
notPerformedReasonEnum.value = ''; // 清空选择
|
||||||
};
|
};
|
||||||
@@ -329,7 +385,7 @@ function handleCancel() {
|
|||||||
notPerformedReasonEnum.value = ''; // 清空选择
|
notPerformedReasonEnum.value = ''; // 清空选择
|
||||||
};
|
};
|
||||||
|
|
||||||
getList();
|
// getList();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user