挂号退款加退款记录
This commit is contained in:
@@ -341,7 +341,14 @@
|
||||
<el-col :span="24" class="card-box">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">当日已挂号</span>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<span style="vertical-align: middle">当日已挂号</span>
|
||||
<el-radio-group v-model="queryType" @change="handleQueryTypeChange" size="small">
|
||||
<el-radio-button label="all">全部</el-radio-button>
|
||||
<el-radio-button label="normal">正常挂号</el-radio-button>
|
||||
<el-radio-button label="returned">退号记录</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
@@ -501,24 +508,78 @@
|
||||
<span>{{ parseTime(scope.row.registerTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" key="registerTime" prop="registerTime">
|
||||
<!-- 退号记录相关列 -->
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号日期/时间"
|
||||
align="center"
|
||||
key="returnDate"
|
||||
prop="returnDate"
|
||||
width="180"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tooltip
|
||||
:content="getReturnTooltip(scope.row)"
|
||||
placement="top"
|
||||
:disabled="!getReturnTooltip(scope.row)"
|
||||
>
|
||||
<span>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleReturn(scope.row)"
|
||||
:disabled="scope.row.statusEnum != 1"
|
||||
>
|
||||
退号
|
||||
</el-button>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span>{{ scope.row.returnDate ? parseTime(scope.row.returnDate) : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号原因"
|
||||
align="center"
|
||||
key="returnReason"
|
||||
prop="returnReason"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.returnReason || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号操作人"
|
||||
align="center"
|
||||
key="operatorName"
|
||||
prop="operatorName"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.operatorName || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号操作工号"
|
||||
align="center"
|
||||
key="operatorId"
|
||||
prop="operatorId"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.operatorId || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退款金额"
|
||||
align="center"
|
||||
key="refundAmount"
|
||||
prop="refundAmount"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refundAmount ? scope.row.refundAmount.toFixed(2) + ' 元' : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退款方式"
|
||||
align="center"
|
||||
key="refundMethod"
|
||||
prop="refundMethod"
|
||||
width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refundMethod || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -571,6 +632,7 @@
|
||||
:feeType="patientInfo.medfeePaymtdCode || ''"
|
||||
:contractName="patientInfo.contractName || ''"
|
||||
:medfee_paymtd_code="medfee_paymtd_code"
|
||||
:registerInfo="registerInfo"
|
||||
/>
|
||||
<ReprintDialog
|
||||
:open="openReprintDialog"
|
||||
@@ -664,6 +726,8 @@ const chargeItemIdList = ref([]);
|
||||
const chrgBchnoList = ref([]);
|
||||
const paymentId = ref('');
|
||||
const loadingText = ref('');
|
||||
const registerInfo = ref({}); // 原挂号记录信息
|
||||
const queryType = ref('all'); // 查询类型:all-全部, normal-正常挂号, returned-退号记录
|
||||
|
||||
// 使用 ref 定义查询所得用户信息数据
|
||||
const patientInfoList = ref(undefined);
|
||||
@@ -996,6 +1060,12 @@ function getList() {
|
||||
loading.value = false;
|
||||
outpatientRegistrationList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
|
||||
// 调试:查看返回的数据结构(仅退号记录查询时)
|
||||
if (queryType.value === 'returned' && res.data.records && res.data.records.length > 0) {
|
||||
console.log('退号记录数据结构:', res.data.records[0]);
|
||||
console.log('所有字段:', Object.keys(res.data.records[0]));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1077,11 +1147,39 @@ function handleClear() {
|
||||
reset();
|
||||
}
|
||||
|
||||
/** 查询类型切换 */
|
||||
function handleQueryTypeChange() {
|
||||
queryParams.value.pageNo = 1;
|
||||
// 根据查询类型设置状态筛选
|
||||
if (queryType.value === 'returned') {
|
||||
// 查询退号记录(状态为6)
|
||||
queryParams.value.statusEnum = 6;
|
||||
} else if (queryType.value === 'normal') {
|
||||
// 查询正常挂号(排除退号状态)
|
||||
queryParams.value.statusEnum = undefined; // 或者设置为非6的状态
|
||||
// 如果需要排除退号,可以在后端处理,这里先不设置
|
||||
} else {
|
||||
// 查询全部
|
||||
queryParams.value.statusEnum = undefined;
|
||||
}
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
queryParams.value.registerTimeSTime = dateRange.value[0] + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = dateRange.value[1] + ' 23:59:59';
|
||||
// 根据查询类型设置状态筛选
|
||||
if (queryType.value === 'returned') {
|
||||
queryParams.value.statusEnum = 6; // 退号状态
|
||||
} else if (queryType.value === 'normal') {
|
||||
// 正常挂号,不设置statusEnum或排除6
|
||||
queryParams.value.statusEnum = undefined;
|
||||
} else {
|
||||
// 全部
|
||||
queryParams.value.statusEnum = undefined;
|
||||
}
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -1226,6 +1324,18 @@ function handleReturn(row) {
|
||||
patientInfo.value.medfeePaymtdCode = row.contractNo; // 使用挂号记录中的费用性质代码
|
||||
patientInfo.value.contractName = row.contractName; // 保存费用性质名称用于显示
|
||||
|
||||
// 保存完整的原挂号记录信息,用于退号记录
|
||||
registerInfo.value = {
|
||||
...row, // 保存完整的挂号记录
|
||||
patientName: row.patientName,
|
||||
age: row.age,
|
||||
genderEnum_enumText: row.genderEnum_enumText,
|
||||
registerTime: row.registerTime,
|
||||
totalPrice: row.totalPrice,
|
||||
encounterId: row.encounterId,
|
||||
patientId: row.patientId,
|
||||
};
|
||||
|
||||
console.log('退号费用性质:', row.contractNo, row.contractName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user