@@ -0,0 +1,498 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算单号" prop="settlementNo">
|
||||
<el-input
|
||||
v-model="queryParams.settlementNo"
|
||||
placeholder="请输入结算单号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算日期">
|
||||
<el-date-picker
|
||||
v-model="queryTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算类型" prop="settlementType">
|
||||
<el-select
|
||||
v-model="queryParams.settlementType"
|
||||
placeholder="请选择结算类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="日结" value="daily" />
|
||||
<el-option label="周结" value="weekly" />
|
||||
<el-option label="月结" value="monthly" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保类型" prop="insuranceType">
|
||||
<el-select
|
||||
v-model="queryParams.insuranceType"
|
||||
placeholder="请选择医保类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="城镇职工" value="urbanEmployee" />
|
||||
<el-option label="城乡居民" value="urbanRuralResident" />
|
||||
<el-option label="新农合" value="newRuralCooperative" />
|
||||
<el-option label="自费" value="selfPaid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="Document"
|
||||
@click="handleSettle"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:settle']"
|
||||
>日结</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dayEndMedicalInsuranceSettlementList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="结算单号" align="center" prop="settlementNo" />
|
||||
<el-table-column label="结算日期" align="center" prop="settlementDate" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.settlementDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" align="center" prop="settlementType">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.settlementType === 'daily'" type="success">日结</el-tag>
|
||||
<el-tag v-else-if="scope.row.settlementType === 'weekly'" type="warning">周结</el-tag>
|
||||
<el-tag v-else-if="scope.row.settlementType === 'monthly'" type="info">月结</el-tag>
|
||||
<span v-else>{{ scope.row.settlementType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医保类型" align="center" prop="insuranceType">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.insuranceType === 'urbanEmployee'" type="primary">城镇职工</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'urbanRuralResident'" type="success">城乡居民</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'newRuralCooperative'" type="warning">新农合</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'selfPaid'" type="info">自费</el-tag>
|
||||
<span v-else>{{ scope.row.insuranceType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总人次" align="center" prop="totalVisits" />
|
||||
<el-table-column label="总金额" align="center" prop="totalAmount" />
|
||||
<el-table-column label="医保统筹支付" align="center" prop="insurancePayAmount" />
|
||||
<el-table-column label="个人账户支付" align="center" prop="accountPayAmount" />
|
||||
<el-table-column label="个人自付" align="center" prop="personalPayAmount" />
|
||||
<el-table-column label="基金支付总额" align="center" prop="fundPaySumAmount" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作员" align="center" prop="operator" />
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:query']">查看</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改日结医保结算对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="700px" append-to-body>
|
||||
<el-form ref="dayEndMedicalInsuranceSettlementRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算单号" prop="settlementNo">
|
||||
<el-input v-model="form.settlementNo" placeholder="请输入结算单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算日期" prop="settlementDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.settlementDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择结算日期" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算类型" prop="settlementType">
|
||||
<el-select v-model="form.settlementType" placeholder="请选择结算类型" style="width: 100%">
|
||||
<el-option label="日结" value="daily" />
|
||||
<el-option label="周结" value="weekly" />
|
||||
<el-option label="月结" value="monthly" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保类型" prop="insuranceType">
|
||||
<el-select v-model="form.insuranceType" placeholder="请选择医保类型" style="width: 100%">
|
||||
<el-option label="城镇职工" value="urbanEmployee" />
|
||||
<el-option label="城乡居民" value="urbanRuralResident" />
|
||||
<el-option label="新农合" value="newRuralCooperative" />
|
||||
<el-option label="自费" value="selfPaid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总人次" prop="totalVisits">
|
||||
<el-input-number v-model="form.totalVisits" placeholder="请输入总人次" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总金额" prop="totalAmount">
|
||||
<el-input-number v-model="form.totalAmount" placeholder="请输入总金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保统筹支付" prop="insurancePayAmount">
|
||||
<el-input-number v-model="form.insurancePayAmount" placeholder="请输入医保统筹支付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人账户支付" prop="accountPayAmount">
|
||||
<el-input-number v-model="form.accountPayAmount" placeholder="请输入个人账户支付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人自付" prop="personalPayAmount">
|
||||
<el-input-number v-model="form.personalPayAmount" placeholder="请输入个人自付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="基金支付总额" prop="fundPaySumAmount">
|
||||
<el-input-number v-model="form.fundPaySumAmount" placeholder="请输入基金支付总额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="操作员" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入操作员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DayEndMedicalInsuranceSettlement">
|
||||
import { listDayEndMedicalInsuranceSettlement, getDayEndMedicalInsuranceSettlement, delDayEndMedicalInsuranceSettlement, addDayEndMedicalInsuranceSettlement, updateDayEndMedicalInsuranceSettlement } from "@/api/ybmanagement/dayEndMedicalInsuranceSettlement";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const open = ref(false);
|
||||
const queryTime = ref([]);
|
||||
|
||||
const dayEndMedicalInsuranceSettlementList = ref([]);
|
||||
const queryFormRef = ref();
|
||||
const dayEndMedicalInsuranceSettlementRef = ref();
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
settlementNo: null,
|
||||
settlementDate: null,
|
||||
settlementType: null,
|
||||
insuranceType: null,
|
||||
status: null
|
||||
});
|
||||
|
||||
const form = ref({});
|
||||
const rules = ref({
|
||||
settlementNo: [
|
||||
{ required: true, message: "结算单号不能为空", trigger: "blur" }
|
||||
],
|
||||
settlementDate: [
|
||||
{ required: true, message: "结算日期不能为空", trigger: "blur" }
|
||||
],
|
||||
settlementType: [
|
||||
{ required: true, message: "结算类型不能为空", trigger: "change" }
|
||||
],
|
||||
insuranceType: [
|
||||
{ required: true, message: "医保类型不能为空", trigger: "change" }
|
||||
],
|
||||
totalAmount: [
|
||||
{ required: true, message: "总金额不能为空", trigger: "blur" }
|
||||
]
|
||||
});
|
||||
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
/** 查询日结医保结算列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const response = await listDayEndMedicalInsuranceSettlement(queryParams.value);
|
||||
dayEndMedicalInsuranceSettlementList.value = response.rows;
|
||||
total.value = response.total;
|
||||
} catch (error) {
|
||||
console.error('获取日结医保结算列表失败:', error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
open.value = false;
|
||||
reset();
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
id: null,
|
||||
settlementNo: null,
|
||||
settlementDate: null,
|
||||
settlementType: 'daily',
|
||||
insuranceType: null,
|
||||
totalVisits: null,
|
||||
totalAmount: null,
|
||||
insurancePayAmount: null,
|
||||
accountPayAmount: null,
|
||||
personalPayAmount: null,
|
||||
fundPaySumAmount: null,
|
||||
status: "0",
|
||||
operator: null,
|
||||
remark: null
|
||||
};
|
||||
proxy.resetForm("dayEndMedicalInsuranceSettlementRef");
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
if (queryTime.value && queryTime.value.length === 2) {
|
||||
queryParams.value.settlementDate = queryTime.value[0] + ',' + queryTime.value[1];
|
||||
} else {
|
||||
queryParams.value.settlementDate = null;
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryTime.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多择框多选 */
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加日结医保结算";
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row) => {
|
||||
reset();
|
||||
const settlementId = row.id || ids.value[0];
|
||||
getDayEndMedicalInsuranceSettlement(settlementId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改日结医保结算";
|
||||
});
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
proxy.$refs["dayEndMedicalInsuranceSettlementRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateDayEndMedicalInsuranceSettlement(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDayEndMedicalInsuranceSettlement(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = (row) => {
|
||||
const settlementIds = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除日结医保结算编号为"' + settlementIds + '"的数据项?').then(function() {
|
||||
return delDayEndMedicalInsuranceSettlement(settlementIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy.download("ybmanage/dayEndMedicalInsuranceSettlement/export", {
|
||||
...queryParams.value
|
||||
}, `dayEndMedicalInsuranceSettlement_${new Date().getTime()}.xlsx`);
|
||||
};
|
||||
|
||||
/** 日结按钮操作 */
|
||||
const handleSettle = () => {
|
||||
// TODO: 实现日结功能
|
||||
proxy.$modal.msgSuccess("日结功能待实现");
|
||||
};
|
||||
|
||||
/** 查看按钮操作 */
|
||||
const handleView = (row) => {
|
||||
// TODO: 实现查看功能
|
||||
proxy.$modal.msgSuccess("查看功能待实现");
|
||||
};
|
||||
|
||||
/** 初始化数据 */
|
||||
getList();
|
||||
</script>
|
||||
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<el-row :gutter="20" style="margin-bottom: 10px; display: flex; justify-content: flex-end">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" size="small" @click="enhancedHandleAddDiagnosis">
|
||||
新增诊断
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
size="small"
|
||||
@click="enhancedHandleDeleteDiagnosis"
|
||||
:disabled="multiple"
|
||||
>
|
||||
删除诊断
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-table
|
||||
style="width: 100%; overflow-x: auto"
|
||||
:data="tableData"
|
||||
height="45vh"
|
||||
border
|
||||
ref="diagnosisTableRef"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="诊断名称" align="center" prop="diagName" width="180">
|
||||
<template #default="scope">
|
||||
<div style="margin-top: -5px; margin-bottom: -5px">
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="enhancedHandleSelsectDiagnosis"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
v-model="scope.row.diagName"
|
||||
placeholder="请选择诊断"
|
||||
@input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
:validate-event="false"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="诊断编码" prop="diagCode" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagCode" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类型" prop="diagType" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagType" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否主诊断" align="center" prop="maindiagFlag" width="100">
|
||||
<template #default="scope">
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
:trueLabel="1"
|
||||
:falseLabel="0"
|
||||
v-model="scope.row.maindiagFlag"
|
||||
border
|
||||
size="small"
|
||||
@change="(value) => handleMaindise(value, scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="确诊时间" prop="diagTime" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-date-picker v-model="scope.row.diagTime" type="date" placeholder="选择日期" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" prop="diagDesc" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagDesc" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, watch} from 'vue';
|
||||
import diagnosislist from '../../../../doctorstation/components/diagnosis/diagnosislist.vue';
|
||||
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
tableType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => props.tableData,
|
||||
(newValue) => {
|
||||
if (newValue.length > 0) {
|
||||
setTableData(newValue);
|
||||
} else {
|
||||
setTableData([]);
|
||||
}
|
||||
}
|
||||
);
|
||||
const tableData = ref([]);
|
||||
const diagnosisTableRef = ref(null);
|
||||
const selectedRows = ref([]);
|
||||
const submitTableData = tableData;
|
||||
const setTableData = (data) => {
|
||||
tableData.value = data;
|
||||
};
|
||||
const handleAddDiagnosis = () => {
|
||||
tableData.value.push({
|
||||
diagName: '',
|
||||
diagCode: '',
|
||||
diagType: '',
|
||||
maindiagFlag: '',
|
||||
diagTime: '',
|
||||
diagDesc: '',
|
||||
showPopover: false,
|
||||
diseinfo: null,
|
||||
});
|
||||
};
|
||||
const handleDeleteDiagnosis = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
return;
|
||||
}
|
||||
// 将选中的行从表格数据中移除
|
||||
tableData.value = tableData.value.filter((item) => !selectedRows.value.includes(item));
|
||||
// 清空选中状态
|
||||
selectedRows.value = [];
|
||||
if (diagnosisTableRef.value) {
|
||||
diagnosisTableRef.value.clearSelection();
|
||||
}
|
||||
};
|
||||
const multiple = ref(true);
|
||||
const diagnosisSearchkey = ref('');
|
||||
const currentRow = ref(null);
|
||||
const currentIndex = ref(-1);
|
||||
|
||||
const handleSelectionChange = (selection) => {
|
||||
selectedRows.value = selection;
|
||||
multiple.value = selection.length === 0;
|
||||
emit('selection-change', selection);
|
||||
};
|
||||
|
||||
const handleChange = (value) => {
|
||||
diagnosisSearchkey.value = value;
|
||||
};
|
||||
|
||||
const handleFocus = (row, index) => {
|
||||
currentRow.value = row;
|
||||
currentIndex.value = index;
|
||||
row.showPopover = true;
|
||||
};
|
||||
|
||||
const handleBlur = (row) => {
|
||||
setTimeout(() => {
|
||||
row.showPopover = false;
|
||||
}, 200);
|
||||
};
|
||||
|
||||
const handleSelsectDiagnosis = (row) => {
|
||||
// 入院诊断使用diseinfo数据源
|
||||
currentRow.value.diagName = row.diseinfo?.name || row.name;
|
||||
currentRow.value.diagCode = row.diseinfo?.ybNo || row.ybNo;
|
||||
currentRow.value.diagType = row.diseinfo?.typeName || row.typeName || '';
|
||||
currentRow.value.showPopover = false;
|
||||
};
|
||||
|
||||
function handleMaindise(value, index) {
|
||||
if (value == 1) {
|
||||
// 先将其他所有记录的主诊断标志设为0,确保只有一个主诊断
|
||||
tableData.value.forEach((item, i) => {
|
||||
if (i !== index) {
|
||||
item.maindiagFlag = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 触发数据更新事件,将当前表格数据传递给父组件
|
||||
emit('data-change', tableData.value);
|
||||
}
|
||||
|
||||
// 修改原始函数以触发数据更新事件
|
||||
const originalHandleAddDiagnosis = handleAddDiagnosis;
|
||||
const enhancedHandleAddDiagnosis = () => {
|
||||
originalHandleAddDiagnosis();
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const originalHandleDeleteDiagnosis = handleDeleteDiagnosis;
|
||||
const enhancedHandleDeleteDiagnosis = () => {
|
||||
originalHandleDeleteDiagnosis();
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const originalHandleSelsectDiagnosis = handleSelsectDiagnosis;
|
||||
const enhancedHandleSelsectDiagnosis = (row) => {
|
||||
originalHandleSelsectDiagnosis(row);
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const emit = defineEmits(['selection-change', 'data-change']);
|
||||
|
||||
defineExpose({
|
||||
submitTableData,
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.el-table .cell {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<el-row :gutter="20" style="margin-bottom: 10px; display: flex; justify-content: flex-end">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" size="small" @click="enhancedHandleAddDiagnosis">
|
||||
新增诊断
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
size="small"
|
||||
@click="enhancedHandleDeleteDiagnosis"
|
||||
:disabled="multiple"
|
||||
>
|
||||
删除诊断
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-table
|
||||
style="width: 100%; overflow-x: auto"
|
||||
:data="tableData"
|
||||
height="45vh"
|
||||
border
|
||||
ref="diagnosisTableRef"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="诊断名称" align="center" prop="diagName" width="180">
|
||||
<template #default="scope">
|
||||
<div style="margin-top: -5px; margin-bottom: -5px">
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="enhancedHandleSelsectDiagnosis"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
v-model="scope.row.diagName"
|
||||
placeholder="请选择诊断"
|
||||
@input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
:validate-event="false"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="诊断编码" prop="diagCode" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagCode" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类型" prop="diagType" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagType" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否主诊断" align="center" prop="maindiagFlag" width="100">
|
||||
<template #default="scope">
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
:trueLabel="1"
|
||||
:falseLabel="0"
|
||||
v-model="scope.row.maindiagFlag"
|
||||
border
|
||||
size="small"
|
||||
@change="(value) => handleMaindise(value, scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="确诊时间" prop="diagTime" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-date-picker v-model="scope.row.diagTime" type="date" placeholder="选择日期" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" prop="diagDesc" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.diagDesc" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, watch} from 'vue';
|
||||
import diagnosislist from '../../../../doctorstation/components/diagnosis/diagnosislist.vue';
|
||||
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
tableType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => props.tableData,
|
||||
(newValue) => {
|
||||
if (newValue.length > 0) {
|
||||
setTableData(newValue);
|
||||
} else {
|
||||
setTableData([]);
|
||||
}
|
||||
}
|
||||
);
|
||||
const tableData = ref([]);
|
||||
const diagnosisTableRef = ref(null);
|
||||
const selectedRows = ref([]);
|
||||
const submitTableData = tableData;
|
||||
const setTableData = (data) => {
|
||||
tableData.value = data;
|
||||
};
|
||||
const handleAddDiagnosis = () => {
|
||||
tableData.value.push({
|
||||
diagName: '',
|
||||
diagCode: '',
|
||||
diagType: '',
|
||||
maindiagFlag: '',
|
||||
diagTime: '',
|
||||
diagDesc: '',
|
||||
showPopover: false,
|
||||
outDiseinfo: null,
|
||||
});
|
||||
};
|
||||
const handleDeleteDiagnosis = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
return;
|
||||
}
|
||||
// 将选中的行从表格数据中移除
|
||||
tableData.value = tableData.value.filter((item) => !selectedRows.value.includes(item));
|
||||
// 清空选中状态
|
||||
selectedRows.value = [];
|
||||
if (diagnosisTableRef.value) {
|
||||
diagnosisTableRef.value.clearSelection();
|
||||
}
|
||||
};
|
||||
const multiple = ref(true);
|
||||
const diagnosisSearchkey = ref('');
|
||||
const currentRow = ref(null);
|
||||
const currentIndex = ref(-1);
|
||||
|
||||
const handleSelectionChange = (selection) => {
|
||||
selectedRows.value = selection;
|
||||
multiple.value = selection.length === 0;
|
||||
emit('selection-change', selection);
|
||||
};
|
||||
|
||||
const handleChange = (value) => {
|
||||
diagnosisSearchkey.value = value;
|
||||
};
|
||||
|
||||
const handleFocus = (row, index) => {
|
||||
currentRow.value = row;
|
||||
currentIndex.value = index;
|
||||
row.showPopover = true;
|
||||
};
|
||||
|
||||
const handleBlur = (row) => {
|
||||
setTimeout(() => {
|
||||
row.showPopover = false;
|
||||
}, 200);
|
||||
};
|
||||
|
||||
const handleSelsectDiagnosis = (row) => {
|
||||
// 出院诊断使用outDiseinfo数据源
|
||||
currentRow.value.diagName = row.outDiseinfo?.name || row.name;
|
||||
currentRow.value.diagCode = row.outDiseinfo?.ybNo || row.ybNo;
|
||||
currentRow.value.diagType = row.outDiseinfo?.typeName || row.typeName || '';
|
||||
currentRow.value.showPopover = false;
|
||||
};
|
||||
|
||||
function handleMaindise(value, index) {
|
||||
if (value == 1) {
|
||||
// 先将其他所有记录的主诊断标志设为0,确保只有一个主诊断
|
||||
tableData.value.forEach((item, i) => {
|
||||
if (i !== index) {
|
||||
item.maindiagFlag = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 触发数据更新事件,将当前表格数据传递给父组件
|
||||
emit('data-change', tableData.value);
|
||||
}
|
||||
|
||||
// 修改原始函数以触发数据更新事件
|
||||
const originalHandleAddDiagnosis = handleAddDiagnosis;
|
||||
const enhancedHandleAddDiagnosis = () => {
|
||||
originalHandleAddDiagnosis();
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const originalHandleDeleteDiagnosis = handleDeleteDiagnosis;
|
||||
const enhancedHandleDeleteDiagnosis = () => {
|
||||
originalHandleDeleteDiagnosis();
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const originalHandleSelsectDiagnosis = handleSelsectDiagnosis;
|
||||
const enhancedHandleSelsectDiagnosis = (row) => {
|
||||
originalHandleSelsectDiagnosis(row);
|
||||
emit('data-change', tableData.value);
|
||||
};
|
||||
|
||||
const emit = defineEmits(['selection-change', 'data-change']);
|
||||
|
||||
defineExpose({
|
||||
submitTableData,
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.el-table .cell {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<div class="awaitList-container">
|
||||
<div class="operate">
|
||||
<el-space>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="max-width: 600px"
|
||||
placeholder="请输入内容"
|
||||
class="input-with-select"
|
||||
>
|
||||
</el-input>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
</el-space>
|
||||
<el-space>
|
||||
<!-- <el-button>读卡</el-button> -->
|
||||
<!-- <el-button type="primary">无档登记</el-button> -->
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="treatHospitalizedData"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="申请患者" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源">
|
||||
<template #default="scope">
|
||||
{{ scope.row.sourceName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requestTime" align="center" label="申请时间" />
|
||||
<el-table-column prop="wardName" align="center" label="入院病区" />
|
||||
<el-table-column prop="registrar" align="center" label="登记员" />
|
||||
<el-table-column fixed="right" align="center" label="操作" width="88">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text @click="doEdit(scope.row)"> 查看 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<PatientRegister
|
||||
v-model="patientRegisterVisible"
|
||||
:patientInfo="patient"
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
title="登记"
|
||||
:registrationType="registrationType"
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:noFile="noFile"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import PatientRegister from './patientRegister.vue';
|
||||
import {getAdmissionPage, getInHospitalInfo, getPatientBasicInfo} from './api';
|
||||
//const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
// const props = defineProps({});
|
||||
const searchForm = reactive({
|
||||
searchType: 'name',
|
||||
searchKey: '',
|
||||
});
|
||||
const total = ref();
|
||||
const inHospitalInfo = ref({});
|
||||
const alreadyEdit = ref(true);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
registeredFlag: '1',
|
||||
searchKey: '',
|
||||
});
|
||||
|
||||
const treatHospitalizedData = ref([]);
|
||||
const patientRegisterVisible = ref(false);
|
||||
const noFile = ref(false);
|
||||
const registrationType = ref(true);
|
||||
const patient = ref({});
|
||||
const doEdit = (row) => {
|
||||
getPatientBasicInfo(row.patientId).then((res) => {
|
||||
patient.value = res.data;
|
||||
});
|
||||
getInHospitalInfo(row.encounterId).then((res) => {
|
||||
inHospitalInfo.value = res.data;
|
||||
patientRegisterVisible.value = true;
|
||||
noFile.value = false;
|
||||
});
|
||||
};
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
const activeName = ref('first');
|
||||
|
||||
const patientRegisterOK = () => {
|
||||
patientRegisterVisible.value = false;
|
||||
queryParams.value.searchKey = '';
|
||||
emits('okList');
|
||||
resetQuery();
|
||||
};
|
||||
|
||||
const cancelAct = () => {
|
||||
patientRegisterVisible.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
registeredFlag: '1',
|
||||
searchKey: '',
|
||||
};
|
||||
getList();
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
getAdmissionPage(queryParams.value).then((res) => {
|
||||
treatHospitalizedData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.awaitList-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
}
|
||||
.table-container {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
248
openhis-ui-vue3/src/views/ybmanagement/inhospital/register/components/api.js
Executable file
248
openhis-ui-vue3/src/views/ybmanagement/inhospital/register/components/api.js
Executable file
@@ -0,0 +1,248 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取住院信息初期数据列表
|
||||
export function getInit(query) {
|
||||
return request({
|
||||
url: '/inpatient-manage/init',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院无档登记
|
||||
export function addAdmissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
export function admissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室下拉列表
|
||||
*/
|
||||
export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病区下拉列表
|
||||
*/
|
||||
export function wardList() {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊断基础下拉数据
|
||||
*/
|
||||
export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function doctorList(id) {
|
||||
return request({
|
||||
url: '/inpatient-manage/doctor-list?orgId=' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function getPatientInfo(id, statusEnum) {
|
||||
return request({
|
||||
url: `/inpatient-manage/admission-one?id=${id}&statusEnum=${statusEnum}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取病区床位信息
|
||||
export function getBedInfo(wardBusNo) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/beds-num?wardBusNo=${wardBusNo}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
export function registerInHospital(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-cashier',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 无档登记
|
||||
export function noFilesRegister(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/no-files',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 表单初始化
|
||||
export function patientFormInit() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 合同
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊断定义列表
|
||||
*/
|
||||
export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者基础信息
|
||||
export function getPatientBasicInfo(patientId) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/patient-info?patientId=${patientId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// 查询住院登记信息
|
||||
export function getRegisteInfoPage(query) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/register-info',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 医保登记按钮 获取信息
|
||||
export function getInHospitalInfo(encounterId) {
|
||||
return request({
|
||||
url: `/yb-inpatient-request/in-hospital-info?encounterId=${encounterId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//医保登记按钮 保存
|
||||
export function saveEmr(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-reg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
//医保出院按钮 信息获取
|
||||
export function getInpatientCheckInfo(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-check-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//医保出院按钮 保存
|
||||
export function checkOutInpatient(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-check-out',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//信息变更按钮 获取信息
|
||||
export function getInpatientRegInfo(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-reg-info',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//信息变更按钮 保存
|
||||
export function updateInpatientRegInfo(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/update-inpatient-reg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 入院撤销
|
||||
export function cancelInpatientRegister(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/cancel-inpatient-reg',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//出院撤销
|
||||
export function cancelDischargeRegister(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/cancel-inpatient-check-out',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//病案上传
|
||||
export function uploadEmr(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/emr-up',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者医保信息
|
||||
export function gerPreInfo(data) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-per-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询住院登记信息
|
||||
*/
|
||||
export function getAdmissionPage(query) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/register-info-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="awaitList-container">
|
||||
<div class="operate">
|
||||
<el-space>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="max-width: 600px"
|
||||
placeholder="请输入内容"
|
||||
class="input-with-select"
|
||||
@keydown.enter="handleQuery"
|
||||
>
|
||||
</el-input>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
</el-space>
|
||||
<el-space>
|
||||
<!-- <el-button>读卡</el-button> -->
|
||||
<el-button type="primary" @click="doRegistering('no-file')">无档登记</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="treatHospitalizedData"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="患者姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="requestTime" align="center" label="申请时间" />
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源" />
|
||||
<el-table-column prop="wardName" align="center" label="入院病区" />
|
||||
<el-table-column fixed="right" align="center" label="操作" width="88">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="doRegistering(scope.row)"> 登记 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<PatientRegister
|
||||
v-model="patientRegisterVisible"
|
||||
:patientInfo="patient"
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
title="登记"
|
||||
:registrationType="registrationType"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
:noFile="noFile"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import PatientRegister from './patientRegister.vue';
|
||||
import {getAdmissionPage, getInHospitalInfo, getPatientBasicInfo} from './api';
|
||||
|
||||
const emits = defineEmits(['okList']);
|
||||
|
||||
const total = ref();
|
||||
const patient = ref({});
|
||||
const inHospitalInfo = ref({});
|
||||
const noFile = ref(false);
|
||||
const registrationType = ref(true);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
registeredFlag: '0',
|
||||
searchKey: '',
|
||||
});
|
||||
|
||||
const treatHospitalizedData = ref([]);
|
||||
const doRegistering = (row) => {
|
||||
if (row == 'no-file') {
|
||||
patientRegisterVisible.value = true;
|
||||
noFile.value = true;
|
||||
inHospitalInfo.value = {};
|
||||
} else {
|
||||
getPatientBasicInfo(row.patientId).then((res) => {
|
||||
patient.value = res.data;
|
||||
});
|
||||
getInHospitalInfo(row.encounterId).then((res) => {
|
||||
inHospitalInfo.value = res.data;
|
||||
patientRegisterVisible.value = true;
|
||||
noFile.value = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const getList = () => {
|
||||
getAdmissionPage(queryParams.value).then((res) => {
|
||||
treatHospitalizedData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
registeredFlag: '0',
|
||||
searchKey: '',
|
||||
};
|
||||
getList();
|
||||
}
|
||||
const patientRegisterVisible = ref(false);
|
||||
const patientYbRegisterVisible = ref(false);
|
||||
|
||||
const patientRegisterOK = () => {
|
||||
patientRegisterVisible.value = false;
|
||||
queryParams.value.searchKey = '';
|
||||
emits('okList');
|
||||
};
|
||||
|
||||
const cancelAct = () => {
|
||||
patientRegisterVisible.value = false;
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.awaitList-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
}
|
||||
.table-container {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="awaitList-container">
|
||||
<div class="operate">
|
||||
<el-space>
|
||||
<el-input
|
||||
v-model="searchForm.searchVal"
|
||||
style="max-width: 600px"
|
||||
placeholder="请输入内容"
|
||||
class="input-with-select"
|
||||
>
|
||||
<template #prepend>
|
||||
<el-select v-model="searchForm.searchType" placeholder="" style="width: 115px">
|
||||
<el-option label="患者姓名" value="name" />
|
||||
<el-option label="诊疗卡号" value="MED_ID" />
|
||||
<el-option label="身份证号" value="1" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button>重置</el-button>
|
||||
<el-button type="primary">查询</el-button>
|
||||
</el-space>
|
||||
<el-space>
|
||||
<!-- <el-button>读卡</el-button>
|
||||
<el-button type="primary">无档登记</el-button> -->
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="treatHospitalizedData"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" label="序号" />
|
||||
<el-table-column prop="storageName" label="申请来源"> </el-table-column>
|
||||
<el-table-column prop="createdDate" label="申请时间" min-width="160" />
|
||||
<el-table-column prop="name" label="申请患者" />
|
||||
<el-table-column prop="deptNurseName" label="入院病区" />
|
||||
<el-table-column prop="sexName" label="性别" />
|
||||
<el-table-column prop="purchaseTotalAmount" label="年龄"> </el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {getAdmissionPage} from './api';
|
||||
//const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
// const props = defineProps({});
|
||||
const searchForm = reactive({
|
||||
searchType: 'name',
|
||||
searchVal: '',
|
||||
});
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
registeredFlag: '1',
|
||||
searchKey: '',
|
||||
});
|
||||
const total = ref(0);
|
||||
const treatHospitalizedData = ref([]);
|
||||
const doRegistering = (row) => {};
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
// defineExpose({ state });
|
||||
|
||||
const getList = () => {
|
||||
getAdmissionPage(queryParams.value).then((res) => {
|
||||
treatHospitalizedData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
|
||||
const activeName = ref('first');
|
||||
|
||||
// const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
// console.log(tab, event);
|
||||
// };
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.awaitList-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
}
|
||||
.table-container {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,5 @@
|
||||
import AwaitList from "./awaitList.vue";
|
||||
import AccomplishList from "./accomplishList.vue";
|
||||
import ExistList from "./existList.vue";
|
||||
|
||||
export {AwaitList,AccomplishList,ExistList}
|
||||
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div class="patientInfo-container">
|
||||
<div class="operate">
|
||||
<div>基础信息</div>
|
||||
<!-- <div
|
||||
v-if="props.registrationType"
|
||||
type="primary"
|
||||
@click="toggleEdit"
|
||||
style="margin-right: 0; cursor: pointer; margin-right: 12px"
|
||||
>
|
||||
{{ isEditing ? '取消' : '编辑' }}
|
||||
</div> -->
|
||||
<div>
|
||||
<el-radio-group v-model="typeCode">
|
||||
<el-radio label="电子凭证" value="01"></el-radio>
|
||||
<el-radio label="医保卡" value="03"></el-radio>
|
||||
<el-radio label="身份证" value="02"></el-radio>
|
||||
</el-radio-group>
|
||||
<span
|
||||
@click="handleReadCard(typeCode)"
|
||||
style="cursor: pointer; margin: 0 12px 0 30px; color: #409eff"
|
||||
>
|
||||
{{ '读卡' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 展示模式 -->
|
||||
<div v-if="!noFile" style="margin-left: 30px">
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>患者编码:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.busNo || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>患者姓名:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.name || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>费别类型:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.ybClassEnum_enumText || '-' }}</el-text>
|
||||
<!-- TODO -->
|
||||
<svg-icon size="20" icon-class="hipEdit" style="cursor: pointer" @click="changFeeType" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>证件类型:</el-text>
|
||||
</el-col>
|
||||
<!-- TODO -->
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.patientTypeCode_dictText || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>证件号:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.idCard || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>出生日期:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.birthDate || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>年龄:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.ageString || '-' }}</el-text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>性别:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.genderEnum_enumText || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>民族:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.nationalityCode || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>国籍:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.countryCode || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>婚姻:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.maritalStatusEnum_enumText || '-' }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>职业:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.prfsEnum_enumText || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>手机:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo.phone || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>现住址:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.address || '-' }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<!-- <el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>户口地址:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.nativeExactAddr }}</div>
|
||||
</el-col> -->
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>籍贯:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.nativePlace || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>病人来源:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.organizationId_dictText || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>单位名称:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.workCompany || '-' }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<PatientInfoForm ref="patientInfoFormRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {reactive, ref, watch} from 'vue';
|
||||
import PatientInfoForm from './patientInfoForm.vue';
|
||||
import {getOrgList, patientlLists} from './api';
|
||||
|
||||
const typeList = ref({});
|
||||
const patientInfoFormRef = ref();
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
registrationType: {
|
||||
type: [String, Boolean, Number], // 根据实际类型调整
|
||||
default: null, // 或者 false、'' 等
|
||||
},
|
||||
initOptions: {
|
||||
type: Object,
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
noFile: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['onChangFeeType']);
|
||||
const registerRef = ref();
|
||||
const typeCode = ref('01');
|
||||
const organization = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
});
|
||||
|
||||
// 编辑状态
|
||||
const isEditing = ref(false);
|
||||
|
||||
watch(
|
||||
() => props.registrationType,
|
||||
(newValue) => {
|
||||
isEditing.value = !newValue;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.patientInfo,
|
||||
(newValue) => {},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getInitOptions() {
|
||||
patientlLists().then((res) => {
|
||||
typeList.value = res.data;
|
||||
});
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({});
|
||||
|
||||
// 切换编辑状态
|
||||
const toggleEdit = () => {
|
||||
if (!isEditing.value) {
|
||||
// 取消时恢复原值
|
||||
Object.assign(form, props.patientInfo);
|
||||
}
|
||||
isEditing.value = !isEditing.value;
|
||||
};
|
||||
|
||||
// 提交表单
|
||||
const submitForm = async (callback) => {
|
||||
console.log('提交更新:', form);
|
||||
if (!registerRef.value) return false;
|
||||
registerRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
callback();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
async function handleReadCard(value) {
|
||||
if (window.CefSharp === undefined) {
|
||||
alert('请在医保版本中调用读卡功能!');
|
||||
} else {
|
||||
try {
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await boundAsync
|
||||
.getInfoByQrCodeAsync(
|
||||
'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
'H22010200672',
|
||||
'01101',
|
||||
userStore.id,
|
||||
userStore.name,
|
||||
'D83',
|
||||
'财务科'
|
||||
)
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(jsonResult);
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await boundAsync
|
||||
.readHeaSecCardAsync(
|
||||
JSON.stringify({
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = res;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
// console.log(
|
||||
// 'jsonResult',
|
||||
// JSON.parse({
|
||||
// IssuingAreaCode: '310000',
|
||||
// SocialSecurityNumber: '371324198810224515',
|
||||
// CardNumber: 'M501A1A78',
|
||||
// CardIdentificationCode: '310000D15600000535925154E880AB97',
|
||||
// Name: '\u5218\u5CF0',
|
||||
// CardResetInfo: '00814A444686603100333E4FA9',
|
||||
// SpecificationVersion: '3.00',
|
||||
// IssuingDate: '20190313',
|
||||
// ExpirationDate: '20290313',
|
||||
// TerminalNumber: '000000000000',
|
||||
// TerminalDeviceNumber: '00041161201901000005',
|
||||
// Code: 0,
|
||||
// ErrorMessage: null,
|
||||
// })
|
||||
// );
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
if (userMessage.certNo) {
|
||||
gerPreInfo(userMessage)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.patientId = res.data.id;
|
||||
form.value.name = res.data.name;
|
||||
form.value.age = res.data.age;
|
||||
form.value.idCard = res.data.idCard;
|
||||
form.value.card = res.data.id;
|
||||
form.value.contractNo = res.data.contractBusNo;
|
||||
form.value.genderEnum = res.data.genderEnum;
|
||||
form.value.ybAreaNo = res.data.contractName;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
function getPatientForm() {
|
||||
console.log(patientInfoFormRef.value.form);
|
||||
|
||||
return patientInfoFormRef.value.form;
|
||||
}
|
||||
|
||||
// 患者费别变更
|
||||
const changFeeType = () => {
|
||||
emits('onChangFeeType');
|
||||
};
|
||||
defineExpose({ submitForm, form, isEditing, getPatientForm });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.patientInfo-container {
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
background: rgba(37, 109, 149, 0.05);
|
||||
padding-left: 16px;
|
||||
color: var(--hip-color-primary-light);
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
> .patientInfos {
|
||||
margin-bottom: 16px;
|
||||
|
||||
&:not(.patientInfo-container :has(+ .patientInfos)) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.patInfo-label {
|
||||
color: #606266 !important;
|
||||
font-size: 14px;
|
||||
font-weight: 700 !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,392 @@
|
||||
<template>
|
||||
<el-form ref="patientRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="性别" prop="genderEnum">
|
||||
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
|
||||
<el-radio
|
||||
v-for="item in administrativegenderList"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>
|
||||
{{ item.info }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="活动标识" prop="tempFlag">
|
||||
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
|
||||
<el-radio v-for="dict in patient_temp_flag" :key="dict.value" :label="dict.value">
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="卡类别" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="卡类别" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="dict in sys_idtype"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input v-model="form.idCard" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="就诊卡号" prop="identifierNo">
|
||||
<el-input v-model="form.identifierNo" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="民族" prop="nationalityCode">
|
||||
<el-select v-model="form.nationalityCode" clearable filterable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in nationality_code"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="国家编码" prop="countryCode">
|
||||
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="职业" prop="prfsEnum">
|
||||
<el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in occupationtypeList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="工作单位" prop="workCompany">
|
||||
<el-input v-model="form.workCompany" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="联系人" prop="linkName">
|
||||
<el-input v-model="form.linkName" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="联系人关系" prop="linkRelationCode">
|
||||
<el-select
|
||||
v-model="form.linkRelationCode"
|
||||
placeholder="联系人关系"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in familyrelationshiptypeList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="联系人电话" prop="linkRelationCode">
|
||||
<el-input v-model="form.linkTelcom" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="地址选择" prop="addressSelect">
|
||||
<el-cascader
|
||||
:options="options"
|
||||
:props="{ checkStrictly: true, value: 'code', label: 'name' }"
|
||||
v-model="selectedOptions"
|
||||
@change="handleChange"
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span>{{ data.name }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input v-model="form.address" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="血型ABO" prop="bloodAbo">
|
||||
<el-select v-model="form.bloodAbo" placeholder="血型ABO" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in bloodtypeaboList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="血型RH" prop="bloodRh">
|
||||
<el-select v-model="form.bloodRh" placeholder="血型RH" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in bloodtypearhList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="婚姻状态" prop="maritalStatusEnum">
|
||||
<el-select
|
||||
v-model="form.maritalStatusEnum"
|
||||
placeholder="婚姻状态"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maritalstatusList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="死亡时间" prop="deceasedDate">
|
||||
<el-date-picker
|
||||
v-model="form.deceasedDate"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {watch} from 'vue';
|
||||
import pcas from 'china-division/dist/pcas-code.json';
|
||||
import {patientFormInit} from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
patient_gender_enum,
|
||||
sys_idtype,
|
||||
prfs_enum,
|
||||
blood_rh,
|
||||
blood_abo,
|
||||
marital_status_enum,
|
||||
patient_temp_flag,
|
||||
link_relation_code,
|
||||
nationality_code,
|
||||
} = proxy.useDict(
|
||||
'patient_gender_enum',
|
||||
'sys_idtype',
|
||||
'prfs_enum',
|
||||
'blood_rh',
|
||||
'blood_abo',
|
||||
'marital_status_enum',
|
||||
'patient_temp_flag',
|
||||
'link_relation_code',
|
||||
'nationality_code'
|
||||
);
|
||||
|
||||
const selectedOptions = ref([]); // v-model 绑定的选中值
|
||||
const maritalstatusList = ref([]); //婚姻
|
||||
const occupationtypeList = ref([]); //职业
|
||||
const administrativegenderList = ref([]); //性别
|
||||
const bloodtypeaboList = ref([]); //血型abo
|
||||
const bloodtypearhList = ref([]); //血型RH
|
||||
const familyrelationshiptypeList = ref([]); //家庭关系
|
||||
// 使用 ref 定义查询所得用户信息数据
|
||||
const patientInfo = ref(undefined);
|
||||
const addressCom = ref(''); //地址
|
||||
|
||||
const options = ref(pcas); // 地区数据
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const data = reactive({
|
||||
isViewMode: false,
|
||||
form: {
|
||||
typeCode: '01',
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
|
||||
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules, isViewMode } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => form.value.idCard,
|
||||
(newIdCard) => {
|
||||
if (newIdCard && newIdCard.length === 18) {
|
||||
const birthYear = parseInt(newIdCard.substring(6, 10));
|
||||
const birthMonth = parseInt(newIdCard.substring(10, 12));
|
||||
const birthDay = parseInt(newIdCard.substring(12, 14));
|
||||
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
const currentDay = today.getDate();
|
||||
|
||||
let age = currentYear - birthYear;
|
||||
|
||||
// 如果当前月份小于出生月份,或者月份相同但当前日期小于出生日期,则年龄减1
|
||||
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
}
|
||||
}
|
||||
);
|
||||
getList();
|
||||
/** 查询菜单列表 */
|
||||
function getList() {
|
||||
patientFormInit().then((response) => {
|
||||
console.log(response);
|
||||
occupationtypeList.value = response.data.occupationType;
|
||||
administrativegenderList.value = response.data.sex;
|
||||
bloodtypeaboList.value = response.data.bloodTypeABO;
|
||||
bloodtypearhList.value = response.data.bloodTypeRH;
|
||||
familyrelationshiptypeList.value = response.data.familyRelationshipType;
|
||||
maritalstatusList.value = response.data.maritalStatus;
|
||||
});
|
||||
}
|
||||
|
||||
//地址选择
|
||||
const handleChange = () => {
|
||||
const checkedNodes = selectedOptions.value.map((code) => {
|
||||
const node = findNodeByCode(options.value, code);
|
||||
return node ? node.name : null;
|
||||
});
|
||||
form.value.addressProvince = checkedNodes[0] || '';
|
||||
form.value.addressCity = checkedNodes[1] || '';
|
||||
form.value.addressDistrict = checkedNodes[2] || '';
|
||||
form.value.addressStreet = checkedNodes[3] || '';
|
||||
form.value.address = '';
|
||||
};
|
||||
|
||||
// 递归查找节点
|
||||
const findNodeByCode = (data, code) => {
|
||||
for (const item of data) {
|
||||
if (item.code === code) return item;
|
||||
if (item.children) {
|
||||
const result = findNodeByCode(item.children, code);
|
||||
if (result) return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
name: undefined,
|
||||
nameJson: undefined,
|
||||
menuName: undefined,
|
||||
age: undefined,
|
||||
genderEnum: undefined,
|
||||
typeCode: '01',
|
||||
idCard: undefined,
|
||||
phone: undefined,
|
||||
prfsEnum: undefined,
|
||||
address: undefined,
|
||||
tempFlag: undefined,
|
||||
countryCode: undefined,
|
||||
bloodRh: undefined,
|
||||
bloodAbo: undefined,
|
||||
nationalityCode: undefined,
|
||||
deceasedDate: undefined,
|
||||
linkName: undefined,
|
||||
linkRelationCode: undefined,
|
||||
linkTelcom: undefined,
|
||||
workCompany: undefined,
|
||||
addressCity: undefined,
|
||||
addressDistrict: undefined,
|
||||
addressStreet: undefined,
|
||||
addressProvince: undefined,
|
||||
maritalStatusEnum: undefined,
|
||||
busNo: undefined,
|
||||
organizationId: undefined,
|
||||
};
|
||||
proxy.resetForm('patientRef');
|
||||
}
|
||||
defineExpose({ form });
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,317 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
top="6vh"
|
||||
:width="width"
|
||||
:title="props.title"
|
||||
@open="openAct"
|
||||
@closed="closedAct"
|
||||
:z-index="20"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-scrollbar height="650px">
|
||||
<PatientInfoComp
|
||||
:patientInfo="props.patientInfo"
|
||||
:registrationType="props.registrationType"
|
||||
:initOptions="initOptions"
|
||||
:noFile="noFile"
|
||||
ref="patientInfoRef"
|
||||
@onChangFeeType="onChangFeeType"
|
||||
/>
|
||||
<!-- <PatientRelationList
|
||||
class="relationList"
|
||||
:patCode="patientInfo.code"
|
||||
ref="PatientRelationListRef"
|
||||
/> -->
|
||||
<!--联系人组件 -->
|
||||
<RegisterForm
|
||||
:code="code"
|
||||
ref="RegisterFormRef"
|
||||
:patientInfo="patientApiInfo"
|
||||
:initOptions="initOptions"
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
:noFile="noFile"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<template v-slot:footer>
|
||||
<div class="advance-container">
|
||||
<el-space>
|
||||
<div>缴费预交金</div>
|
||||
<el-input
|
||||
style="width: 142px"
|
||||
placeholder="请输入"
|
||||
v-model="advance"
|
||||
@input="handleAdvanceInput"
|
||||
:formatter="handleAdvanceFormatter"
|
||||
:parser="handleAdvanceParser"
|
||||
></el-input>
|
||||
<div
|
||||
class="feeType"
|
||||
:class="currentFeeType == typeitem.type ? 'activeFeeType' : ''"
|
||||
v-for="typeitem in feeTypeOptions"
|
||||
:key="typeitem.type"
|
||||
@click="currentFeeType = typeitem.type"
|
||||
>
|
||||
<svg-icon
|
||||
:icon-class="typeitem.type"
|
||||
:color="currentFeeType == typeitem.type ? '#13C0B3' : '#666666'"
|
||||
height="18px"
|
||||
width="18px"
|
||||
style="margin-right: 4px"
|
||||
/>
|
||||
{{ typeitem.label }}
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
<el-button size="fixed" class="margin-left-auto" @click="cancelAct">取消 </el-button>
|
||||
<el-button size="fixed" type="primary" @click="handleSubmit">登记</el-button>
|
||||
<!-- <hip-button size="fixed" type="primary" @click="supplementMi">医保登记</hip-button> -->
|
||||
<!-- <AdvancePayment
|
||||
v-model="advancePaymentVisible"
|
||||
@submitOk="advancePaymentSubmitOk"
|
||||
:money="advance"3
|
||||
/> -->
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
const { proxy } = getCurrentInstance();
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import PatientInfoComp from './patientInfo.vue';
|
||||
import RegisterForm from './registerForm.vue';
|
||||
import {getInit, noFilesRegister, registerInHospital} from './api';
|
||||
|
||||
const emits = defineEmits(['okAct', 'cancelAct']);
|
||||
|
||||
const props = defineProps({
|
||||
title: '',
|
||||
registrationType: {
|
||||
type: [String, Boolean, Number], // 根据实际类型调整
|
||||
default: null, // 或者 false、'' 等
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
},
|
||||
inHospitalInfo: {
|
||||
type: Object,
|
||||
},
|
||||
alreadyEdit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
noFile: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.registrationType,
|
||||
(newValue) => {
|
||||
console.log('registrationType changed:', newValue);
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const dialogVisible = defineModel('dialogVisible', {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
const code = defineModel('code');
|
||||
const width = '1128px';
|
||||
const patientApiInfo = ref({});
|
||||
const initOptions = ref({});
|
||||
|
||||
/* 取消 */
|
||||
const cancelAct = () => {
|
||||
emits('cancelAct');
|
||||
};
|
||||
const patientInfoRef = ref();
|
||||
|
||||
/* 预交金 */
|
||||
const advancePaymentVisible = ref(false);
|
||||
/* 保存 */
|
||||
const handleSubmit = () => {
|
||||
let params = {};
|
||||
if (props.noFile) {
|
||||
RegisterFormRef.value.validateData(async () => {
|
||||
params.inHospitalInfo = RegisterFormRef.value.submitForm;
|
||||
params.patientInformation = patientInfoRef.value.getPatientForm();
|
||||
if (params.patientInformation.idCard) {
|
||||
// 验证身份证号长度是否为18位
|
||||
const idCard = params.patientInformation.idCard.toString();
|
||||
if (idCard.length === 18) {
|
||||
params.patientInformation.birthDate =
|
||||
idCard.substring(6, 10) +
|
||||
'-' +
|
||||
idCard.substring(10, 12) +
|
||||
'-' +
|
||||
idCard.substring(12, 14);
|
||||
}
|
||||
}
|
||||
console.log('params', params);
|
||||
params.inHospitalInfo.balanceAmount = advance.value;
|
||||
const performRegistration = () => {
|
||||
noFilesRegister(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
if (advance.value == 0) {
|
||||
ElMessageBox.confirm('住院预交金额未填写,确认登记吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
performRegistration();
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
performRegistration();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
params.balanceAmount = advance.value;
|
||||
params.patientId = props.patientInfo.patientId;
|
||||
RegisterFormRef.value.validateData(async () => {
|
||||
params = { ...params, ...RegisterFormRef.value.submitForm };
|
||||
console.log('params', params);
|
||||
const performRegistration = () => {
|
||||
registerInHospital(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (advance.value == 0) {
|
||||
ElMessageBox.confirm('住院预交金额未填写,确认登记吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
performRegistration();
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
performRegistration();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const openAct = () => {
|
||||
console.log(props.patientInfo, 'patientRegister.vue');
|
||||
console.log(props.inHospitalInfo, 'inHospitalInfo.vue');
|
||||
/* 初始化数据 */
|
||||
advance.value = props.inHospitalInfo.balanceAmount || 0;
|
||||
advancePaymentVisible.value = false;
|
||||
RegisterFormRef.value.init();
|
||||
};
|
||||
const closedAct = () => {
|
||||
dialogVisible.value = false;
|
||||
if (patientInfoRef.value?.isEditing) {
|
||||
patientInfoRef.value.isEditing = false;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getInit().then((res) => {
|
||||
initOptions.value = res.data;
|
||||
});
|
||||
});
|
||||
|
||||
/* 登记 */
|
||||
const RegisterFormRef = ref();
|
||||
|
||||
const feeTypeOptions = reactive([
|
||||
{
|
||||
type: 'hipCash',
|
||||
label: '现金',
|
||||
},
|
||||
{
|
||||
type: 'hipAlipay',
|
||||
label: '支付宝',
|
||||
},
|
||||
{
|
||||
type: 'wechat',
|
||||
label: '微信',
|
||||
},
|
||||
{
|
||||
type: 'hipPayCard',
|
||||
label: '银行卡',
|
||||
},
|
||||
]);
|
||||
const advance = ref('0.00');
|
||||
const currentFeeType = ref('hipCash');
|
||||
/* 预交金录入框格式 */
|
||||
const handleAdvanceInput = (value) => {
|
||||
if (value.length === 1 && value === '.') {
|
||||
value = '0.';
|
||||
} else {
|
||||
advance.value = value.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1');
|
||||
}
|
||||
};
|
||||
const handleAdvanceFormatter = (value) => {
|
||||
return `¥ ${value}`;
|
||||
};
|
||||
const handleAdvanceParser = (value) => {
|
||||
return value.replace(/\$\s?|(,*)/g, '');
|
||||
};
|
||||
const medicalInsuranceVisible = ref(false);
|
||||
const medicalInsuranceTitle = ref('');
|
||||
|
||||
/* 患者费别变更 */
|
||||
const onChangFeeType = () => {
|
||||
medicalInsuranceTitle.value = '医保信息'; //医保信息、医保登记
|
||||
medicalInsuranceVisible.value = true;
|
||||
};
|
||||
|
||||
/* */
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.patientRegister-container {
|
||||
height: 700px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.advance-container {
|
||||
width: 660px;
|
||||
display: flex;
|
||||
|
||||
.feeType {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
padding: 0px 8px;
|
||||
color: #666666;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
:deep(.svg-icon) {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.activeFeeType {
|
||||
color: #13c0b3;
|
||||
background: rgba(19, 192, 179, 0.1);
|
||||
|
||||
:deep(.svg-icon) {
|
||||
color: #13c0b3;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<div class="app-container" v-loading="loading" loading-text="保存中。。。">
|
||||
<!-- 操作框 -->
|
||||
<el-row justify="end" :gutter="20">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 读卡功能区域 -->
|
||||
<div class="read-card-section">
|
||||
<el-radio-group v-model="typeCode">
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
电子凭证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px">
|
||||
身份证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||
医保卡
|
||||
</el-button>
|
||||
</el-radio-group>
|
||||
<el-button type="primary" @click="handleReadCard(typeCode)" :loading="readCardLoading">
|
||||
{{ loadingText }}
|
||||
</el-button>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<RegisterForm ref="registerFormRef" :registerForm="registerForm" />
|
||||
<el-divider></el-divider>
|
||||
<el-row :gutter="80">
|
||||
<el-col :span="12">
|
||||
<h3 style="margin-bottom: 0px">入院诊断</h3>
|
||||
<AdmissionDiagnosis :tableData="inHospitalDiagnosisTableData" @data-change="handleInHospitalDiagnosisChange" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<h3 style="margin-bottom: 0px">出院诊断</h3>
|
||||
<DischargeDiagnosis :tableData="historyDiagnosisTableData" ref="historyDiagnosisTableDataRef"
|
||||
@data-change="handleHistoryDiagnosisChange" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, getCurrentInstance, onMounted, reactive, ref} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import AdmissionDiagnosis from './AdmissionDiagnosis.vue';
|
||||
import DischargeDiagnosis from './DischargeDiagnosis.vue';
|
||||
import RegisterForm from './registerForm.vue';
|
||||
import {
|
||||
checkOutInpatient,
|
||||
gerPreInfo,
|
||||
getInHospitalInfo,
|
||||
getInpatientCheckInfo,
|
||||
getInpatientRegInfo,
|
||||
saveEmr,
|
||||
updateInpatientRegInfo,
|
||||
} from './api';
|
||||
import {invokeYbPlugin5001} from '@/api/public';
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const tagsViewStore = useTagsViewStore();
|
||||
const encounterId = ref('')
|
||||
// const certType = computed(() => route.query.certType);
|
||||
const operationType = computed(() => route.query.operationType || 'register'); // 默认是医保登记
|
||||
const mdtrtId = computed(() => route.query.mdtrtId);
|
||||
const queryRef = ref(null);
|
||||
|
||||
const registerFormRef = ref(null);
|
||||
const inHospitalDiagnosisTableData = ref([]);
|
||||
const inHospitalDiagnosisTableDataRef = ref(null);
|
||||
const historyDiagnosisTableData = ref([]);
|
||||
const historyDiagnosisTableRef = ref(null);
|
||||
const loading = ref(false);
|
||||
const registerForm = ref({});
|
||||
const userStore = useUserStore();
|
||||
const typeCode = ref('01');
|
||||
const readCardLoading = ref(false);
|
||||
const loadingText = ref('读卡');
|
||||
let userCardInfo = ref({});
|
||||
const BusiCardInfo = ref('');
|
||||
const form = reactive({});
|
||||
|
||||
// 处理入院诊断数据变更
|
||||
const handleInHospitalDiagnosisChange = (data) => {
|
||||
inHospitalDiagnosisTableData.value = data;
|
||||
console.log('入院诊断数据已更新:', data);
|
||||
};
|
||||
|
||||
// 处理出院诊断数据变更
|
||||
const handleHistoryDiagnosisChange = (data) => {
|
||||
historyDiagnosisTableData.value = data;
|
||||
console.log('出院诊断数据已更新:', data);
|
||||
};
|
||||
|
||||
const loadRegisterInfo = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
let res;
|
||||
|
||||
// 根据操作类型调用不同的接口
|
||||
switch (operationType.value) {
|
||||
case 'register':
|
||||
// 医保登记 - 使用 getInHospitalInfo 接口
|
||||
if (!encounterId.value) {
|
||||
proxy.$message.error('缺少就诊标识');
|
||||
return;
|
||||
}
|
||||
res = await getInHospitalInfo(encounterId.value);
|
||||
break;
|
||||
|
||||
case 'discharge':
|
||||
// 医保出院 - 使用 getInpatientCheckInfo 接口
|
||||
if (!mdtrtId.value) {
|
||||
proxy.$message.error('缺少医保就诊ID');
|
||||
return;
|
||||
}
|
||||
res = await getInpatientCheckInfo({ mdtrtId: mdtrtId.value });
|
||||
break;
|
||||
|
||||
case 'change':
|
||||
// 信息变更 - 使用 getInpatientRegInfo 接口
|
||||
if (!mdtrtId.value) {
|
||||
proxy.$message.error('缺少医保就诊ID');
|
||||
return;
|
||||
}
|
||||
res = await getInpatientRegInfo({ mdtrtId: mdtrtId.value });
|
||||
break;
|
||||
|
||||
default:
|
||||
ElMessage.error('无效的操作类型');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`获取${operationType.value}信息`, res);
|
||||
|
||||
if (res.code !== 200) {
|
||||
ElMessage.error(res.message || `获取${operationType.value}信息失败`);
|
||||
return;
|
||||
}
|
||||
const data = res.data || {};
|
||||
registerForm.value = data.mdtrtinfo || {};
|
||||
// 入院诊断从diseinfo获取
|
||||
inHospitalDiagnosisTableData.value = (data.diseinfo || []).map((item) => ({
|
||||
id: item.id,
|
||||
diagName: item.diagName || item.name || '',
|
||||
diagCode: item.diagCode,
|
||||
diagType: item.diagType,
|
||||
maindiagFlag: item.maindiagFlag,
|
||||
diagTime: item.diagTime,
|
||||
diagDesc: item.diagDesc,
|
||||
showPopover: false, // 添加弹出框控制标志
|
||||
}));
|
||||
// 出院诊断从outDiseinfo获取
|
||||
historyDiagnosisTableData.value = (data.outDiseinfo || []).map((item) => ({
|
||||
id: item.id,
|
||||
diagName: item.diagName || item.name || '',
|
||||
diagCode: item.diagCode,
|
||||
diagType: item.diagType,
|
||||
maindiagFlag: item.maindiagFlag,
|
||||
diagTime: item.diagTime,
|
||||
diagDesc: item.diagDesc,
|
||||
showPopover: false, // 添加弹出框控制标志
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error('加载登记信息失败:', error);
|
||||
setTimeout(() => {
|
||||
handleCancel();
|
||||
}, 2000);
|
||||
return;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSave = async () => {
|
||||
console.log('registerFormRef.value', registerFormRef.value);
|
||||
if (!registerFormRef.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用async/await获取表单验证结果
|
||||
const valid = await registerFormRef.value.validateData();
|
||||
console.log('valid', valid);
|
||||
|
||||
if (valid) {
|
||||
loading.value = true;
|
||||
try {
|
||||
// 构建请求参数,按照要求的格式组织数据
|
||||
const payload = {
|
||||
// 基本信息存到 mdtrtinfo
|
||||
mdtrtinfo: {
|
||||
...registerFormRef.value.submitForm,
|
||||
encounterId: encounterId.value,
|
||||
mdtrtId: mdtrtId.value,
|
||||
// certType:certType.value,
|
||||
},
|
||||
// 入院诊断信息存到 diseinfo
|
||||
diseinfo: (inHospitalDiagnosisTableDataRef.value?.submitTableData || []).map(
|
||||
(item, index) => ({
|
||||
// 转换诊断数据格式以匹配后端要求
|
||||
diagName: item.diagName || item.name,
|
||||
diagCode: item.diagCode,
|
||||
diagType: item.diagType,
|
||||
maindiagFlag: item.maindiagFlag || '0',
|
||||
diagTime: item.diagTime,
|
||||
diagSrtNo: index + 1,
|
||||
diagDesc: item.diagDesc,
|
||||
})
|
||||
),
|
||||
// 出院诊断信息存到 outDiseinfo
|
||||
outDiseinfo: (historyDiagnosisTableRef.value?.submitTableData || []).map((item, index) => ({
|
||||
// 转换诊断数据格式以匹配后端要求
|
||||
diagName: item.diagName || item.name,
|
||||
diagCode: item.diagCode,
|
||||
diagType: item.diagType,
|
||||
maindiagFlag: item.maindiagFlag || '0',
|
||||
diagTime: item.diagTime,
|
||||
diagSrtNo: index + 1,
|
||||
diagDesc: item.diagDesc,
|
||||
})),
|
||||
};
|
||||
|
||||
let res;
|
||||
|
||||
// 根据操作类型调用不同的保存接口
|
||||
switch (operationType.value) {
|
||||
case ('register', 'HospitalizationRegistration'):
|
||||
// 医保登记 - 使用 saveEmr 接口
|
||||
console.log('保存医保登记数据:', payload);
|
||||
res = await saveEmr(payload);
|
||||
break;
|
||||
|
||||
case 'discharge':
|
||||
// 医保出院 - 使用 checkOutInpatient 接口
|
||||
console.log('保存医保出院数据:', payload);
|
||||
res = await checkOutInpatient(payload);
|
||||
break;
|
||||
|
||||
case 'change':
|
||||
// 信息变更 - 使用 updateInpatientRegInfo 接口
|
||||
console.log('保存信息变更数据:', payload);
|
||||
res = await updateInpatientRegInfo(payload);
|
||||
break;
|
||||
}
|
||||
|
||||
if (res.code === 200) {
|
||||
const operationNames = {
|
||||
register: '医保登记',
|
||||
discharge: '医保出院',
|
||||
change: '信息变更',
|
||||
};
|
||||
ElMessage.success(`${operationNames[operationType.value]}保存成功`);
|
||||
handleCancel();
|
||||
} else {
|
||||
ElMessage.error(res.message || '保存失败');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('保存失败:', error);
|
||||
ElMessage.error('保存失败,请重试');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('表单验证失败,请检查填写内容');
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
const currentView = { ...router.currentRoute.value };
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybInhospitalRegister',
|
||||
})
|
||||
.then(() => {
|
||||
tagsViewStore.delView(currentView);
|
||||
});
|
||||
};
|
||||
|
||||
// 医保信息变更
|
||||
const doYbChange = (row) => {
|
||||
// 跳转到编辑页面,并传递operationType参数标识这是信息变更操作
|
||||
router.push({
|
||||
name: 'YbregisterEdit',
|
||||
query: {
|
||||
encounterId: row.encounterId,
|
||||
operationType: 'change', // 添加操作类型参数,标识是信息变更
|
||||
mdtrtId: row.mdtrtId,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 处理接收到的卡片数据
|
||||
const processCardData = (cardData) => {
|
||||
if (!cardData) return;
|
||||
|
||||
try {
|
||||
console.log('开始处理卡片数据:', cardData);
|
||||
|
||||
// 处理患者基本信息
|
||||
if (cardData.patientInfo) {
|
||||
console.log('患者基本信息:', cardData.patientInfo);
|
||||
// 将患者信息映射到医保登记表单
|
||||
registerForm.value = {
|
||||
...registerForm.value,
|
||||
// 患者基本信息
|
||||
patientName: cardData.patientInfo.patientName || cardData.patientInfo.name || '',
|
||||
idCard: cardData.patientInfo.idCard || '',
|
||||
gender: cardData.patientInfo.gender || '',
|
||||
birthDate: cardData.patientInfo.birthDate || '',
|
||||
phone: cardData.patientInfo.phone || '',
|
||||
// 其他患者相关字段
|
||||
patientId: cardData.patientInfo.patientId || '',
|
||||
patCode: cardData.patientInfo.code || '',
|
||||
};
|
||||
}
|
||||
|
||||
// 处理住院信息
|
||||
if (cardData.inHospitalInfo) {
|
||||
console.log('住院信息:', cardData.inHospitalInfo);
|
||||
registerForm.value = {
|
||||
...registerForm.value,
|
||||
// 住院相关信息
|
||||
admissionDate:
|
||||
cardData.inHospitalInfo.startTime || cardData.inHospitalInfo.admissionDate || '',
|
||||
deptName: cardData.inHospitalInfo.departmentName || cardData.inHospitalInfo.deptName || '',
|
||||
wardName: cardData.inHospitalInfo.wardLocationId || cardData.inHospitalInfo.wardName || '',
|
||||
diagnosisName:
|
||||
cardData.inHospitalInfo.ambDiagnosisName || cardData.inHospitalInfo.diagnosisName || '',
|
||||
// 其他住院相关字段
|
||||
encounterId: cardData.inHospitalInfo.encounterId || '',
|
||||
visitNo: cardData.inHospitalInfo.visitNo || '',
|
||||
bedNo: cardData.inHospitalInfo.bedNo || '',
|
||||
admissionDeptName: cardData.inHospitalInfo.admissionDeptName || '',
|
||||
};
|
||||
}
|
||||
|
||||
console.log('处理后的表单数据:', registerForm.value);
|
||||
} catch (e) {
|
||||
console.error('处理卡片数据时出错:', e);
|
||||
}
|
||||
};
|
||||
|
||||
// 处理读卡功能
|
||||
async function handleReadCard(value) {
|
||||
try {
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
// let certType;
|
||||
|
||||
console.log('encounterId:', registerForm.value.encounterId);
|
||||
// console.log('certType:',certType.value);
|
||||
// encounterId.value = registerForm.value.encounterId;
|
||||
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
await invokeYbPlugin5001({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
officeId: 'D83',
|
||||
officeName: '财务科',
|
||||
// certType: certType.value,
|
||||
encounterId: registerForm.value.encounterId,
|
||||
})
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
console.log(res);
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
const encounterIdValue = registerForm.value.encounterId;
|
||||
console.log('准备使用的encounterId:', registerForm.value.encounterId);
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterIdValue,
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
encounterId: encounterIdValue,
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin5001(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = JSON.stringify(res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
const encounterIdValue2 = registerForm.value.encounterId;
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterIdValue2,
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
encounterId: encounterIdValue2,
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
console.log('发送给gerPreInfo的参数:', userMessage);
|
||||
|
||||
if (userMessage && userMessage.certNo) {
|
||||
// 这里可以根据需要调用获取患者信息的接口
|
||||
// 并将获取到的信息填充到registerForm中
|
||||
// 由于registerEdit.vue没有直接引入gerPreInfo,这里注释掉
|
||||
console.log('开始调用gerPreInfo...');
|
||||
gerPreInfo(userMessage)
|
||||
.then((res) => {
|
||||
console.log('gerPreInfo返回结果:', res);
|
||||
if (res && res.code == 200 && res.data) {
|
||||
// 将获取到的患者信息填充到registerForm
|
||||
processCardData({
|
||||
patientInfo: {
|
||||
patientName: res.data.name,
|
||||
idCard: res.data.idCard,
|
||||
patientId: res.data.id,
|
||||
code: res.data.id,
|
||||
gender: res.data.genderEnum,
|
||||
// 其他需要的字段
|
||||
encounterId:registerForm.value.encounterId,
|
||||
certType:userMessage.certType,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ElMessage.error('未获取到有效的患者信息');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('gerPreInfo调用失败:', error);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
|
||||
ElMessage.success('读卡成功');
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
ElMessage.error('读卡失败');
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
console.log('路由参数:', route.query);
|
||||
console.log('操作类型:', operationType.value);
|
||||
|
||||
// 优先检查是否有卡片数据传递过来
|
||||
const cardDataParam = route.query.cardData || route.params.cardData;
|
||||
const cardType = route.query.cardType || route.params.cardType;
|
||||
|
||||
if (cardDataParam) {
|
||||
try {
|
||||
console.log('卡片数据参数存在:', cardDataParam);
|
||||
const cardData = JSON.parse(decodeURIComponent(cardDataParam));
|
||||
console.log('接收到的卡片数据:', cardData);
|
||||
console.log('卡片类型:', cardType);
|
||||
|
||||
// 处理接收到的数据
|
||||
processCardData(cardData);
|
||||
} catch (e) {
|
||||
console.error('解析卡片数据失败:', e);
|
||||
console.error('原始卡片数据:', cardDataParam);
|
||||
}
|
||||
} else {
|
||||
console.log('没有接收到卡片数据');
|
||||
}
|
||||
|
||||
// 对于HospitalizationRegistration操作类型,不调用loadRegisterInfo,因为数据已通过卡片传递
|
||||
if (operationType.value !== 'HospitalizationRegistration' && encounterId.value) {
|
||||
console.log('调用loadRegisterInfo加载信息');
|
||||
loadRegisterInfo();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.read-card-section {
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,451 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="patientRef" :model="form" :rules="rules" label-width="140px" :inline="true">
|
||||
<el-form-item label="联系人姓名" prop="conerName">
|
||||
<el-input
|
||||
v-model="form.conerName"
|
||||
clearable
|
||||
placeholder="请输入联系人姓名"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="联系电话" prop="tel">
|
||||
<el-input v-model="form.tel" clearable placeholder="请输入联系电话" style="width: 200px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入院时间" prop="begntime">
|
||||
<el-date-picker
|
||||
v-model="form.begntime"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊凭证类型" prop="mdtrtCertType">
|
||||
<el-input
|
||||
v-model="form.mdtrtCertType"
|
||||
clearable
|
||||
placeholder="请输入就诊凭证类型"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊凭证编号" prop="mdtrtCertNo">
|
||||
<el-input
|
||||
v-model="form.mdtrtCertNo"
|
||||
clearable
|
||||
placeholder="请输入就诊凭证编号"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="医疗类别" prop="medType">
|
||||
<el-select v-model="form.medType" placeholder="请选择医疗类别" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="住院号" prop="iptNo">
|
||||
<el-input v-model="form.iptNo" clearable placeholder="请输入住院号" style="width: 200px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="病历号" prop="medrcdno">
|
||||
<el-input
|
||||
v-model="form.medrcdno"
|
||||
clearable
|
||||
placeholder="请输入病历号"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主治医生编码" prop="atddrNo">
|
||||
<el-input
|
||||
v-model="form.atddrNo"
|
||||
clearable
|
||||
placeholder="请输入主治医生编码"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主诊医师姓名" prop="chfpdrName">
|
||||
<el-input
|
||||
v-model="form.chfpdrName"
|
||||
clearable
|
||||
placeholder="请输入主诊医师姓名"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入院诊断描述" prop="admDiagDscr">
|
||||
<el-input
|
||||
v-model="form.admDiagDscr"
|
||||
type="textarea"
|
||||
:rows="1"
|
||||
placeholder="请输入入院诊断描述"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入院科室编码" prop="admDeptCodg">
|
||||
<el-input
|
||||
v-model="form.admDeptCodg"
|
||||
clearable
|
||||
placeholder="请输入入院科室编码"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入院科室名称" prop="admDeptName">
|
||||
<el-input
|
||||
v-model="form.admDeptName"
|
||||
clearable
|
||||
placeholder="请输入入院科室名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入院床位" prop="admBed">
|
||||
<el-input
|
||||
v-model="form.admBed"
|
||||
clearable
|
||||
placeholder="请输入入院床位"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="住院主诊断代码" prop="dscgMaindiagCode">
|
||||
<el-input
|
||||
v-model="form.dscgMaindiagCode"
|
||||
clearable
|
||||
placeholder="请输入住院主诊断代码"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="住院主诊断名称" prop="dscgMaindiagName">
|
||||
<el-input
|
||||
v-model="form.dscgMaindiagName"
|
||||
clearable
|
||||
placeholder="请输入住院主诊断名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="主要病情描述" prop="mainCondDscr">
|
||||
<el-input
|
||||
v-model="form.mainCondDscr"
|
||||
type="textarea"
|
||||
:rows="1"
|
||||
placeholder="请输入主要病情描述"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="病种编码" prop="diseCodg">
|
||||
<el-input
|
||||
v-model="form.diseCodg"
|
||||
clearable
|
||||
placeholder="请输入病种编码"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="病种名称" prop="diseName">
|
||||
<el-input
|
||||
v-model="form.diseName"
|
||||
clearable
|
||||
placeholder="请输入病种名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手术操作代码" prop="oprnOprtCode">
|
||||
<el-input
|
||||
v-model="form.oprnOprtCode"
|
||||
clearable
|
||||
placeholder="请输入手术操作代码"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手术操作名称" prop="oprnOprtName">
|
||||
<el-input
|
||||
v-model="form.oprnOprtName"
|
||||
clearable
|
||||
placeholder="请输入手术操作名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="病种类型" prop="diseTypeCode">
|
||||
<el-input
|
||||
v-model="form.diseTypeCode"
|
||||
clearable
|
||||
placeholder="请输入病种类型"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计划生育服务证号" prop="fpscNo">
|
||||
<el-input
|
||||
v-model="form.fpscNo"
|
||||
clearable
|
||||
placeholder="请输入计划生育服务证号"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="生育类别" prop="matnType">
|
||||
<el-input
|
||||
v-model="form.matnType"
|
||||
clearable
|
||||
placeholder="请输入生育类别"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计划生育手术类别" prop="birctrlType">
|
||||
<el-input
|
||||
v-model="form.birctrlType"
|
||||
clearable
|
||||
placeholder="请输入计划生育手术类别"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="晚育标志" prop="latechbFlag">
|
||||
<el-input
|
||||
v-model="form.latechbFlag"
|
||||
clearable
|
||||
placeholder="请输入晚育标志"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="孕周数" prop="gesoVal">
|
||||
<el-input
|
||||
v-model="form.gesoVal"
|
||||
clearable
|
||||
placeholder="请输入孕周数"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="胎次" prop="fetts">
|
||||
<el-input v-model="form.fetts" clearable placeholder="请输入胎次" style="width: 200px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="胎儿数" prop="fetusCnt">
|
||||
<el-input
|
||||
v-model="form.fetusCnt"
|
||||
clearable
|
||||
placeholder="请输入胎儿数"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="早产标志" prop="pretFlag">
|
||||
<el-input
|
||||
v-model="form.pretFlag"
|
||||
clearable
|
||||
placeholder="请输入早产标志"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手术或生育日期" prop="birctrlMatnDate">
|
||||
<el-date-picker
|
||||
v-model="form.birctrlMatnDate"
|
||||
type="date"
|
||||
placeholder="请选择日期"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="参保地医保区划" prop="insuplcAdmdvs">
|
||||
<el-input
|
||||
v-model="form.insuplcAdmdvs"
|
||||
clearable
|
||||
placeholder="请输入参保地医保区划"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就医地医保区划" prop="mdtrtareaAdmvs">
|
||||
<el-input
|
||||
v-model="form.mdtrtareaAdmvs"
|
||||
clearable
|
||||
placeholder="请输入就医地医保区划"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="扩展内容" prop="expContent">
|
||||
<el-input
|
||||
v-model="form.expContent"
|
||||
type="textarea"
|
||||
:rows="1"
|
||||
placeholder="请输入扩展内容"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {reactive, ref, watch} from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
registerForm: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { med_type } = proxy.useDict('med_type');
|
||||
const patientRef = ref(null);
|
||||
const form = reactive({
|
||||
conerName: props.registerForm.coner_name,
|
||||
tel: props.registerForm.tel,
|
||||
begntime: props.registerForm.begntime,
|
||||
mdtrtCertType: props.registerForm.mdtrt_cert_type,
|
||||
mdtrtCertNo: props.registerForm.mdtrt_cert_no,
|
||||
medType: props.registerForm.med_type,
|
||||
iptNo: props.registerForm.ipt_no,
|
||||
medrcdno: props.registerForm.medrcdno,
|
||||
atddrNo: props.registerForm.atddr_no,
|
||||
chfpdrName: props.registerForm.chfpdr_name,
|
||||
admDiagDscr: props.registerForm.adm_diag_dscr,
|
||||
admDeptCodg: props.registerForm.adm_dept_codg,
|
||||
admDeptName: props.registerForm.adm_dept_name,
|
||||
admBed: props.registerForm.adm_bed,
|
||||
dscgMaindiagCode: props.registerForm.dscg_maindiag_code,
|
||||
dscgMaindiagName: props.registerForm.dscg_maindiag_name,
|
||||
mainCondDscr: props.registerForm.main_cond_dscr,
|
||||
diseCodg: props.registerForm.dise_codg,
|
||||
diseName: props.registerForm.dise_name,
|
||||
oprnOprtCode: props.registerForm.oprn_oprt_code,
|
||||
oprnOprtName: props.registerForm.oprn_oprt_name,
|
||||
diseTypeCode: props.registerForm.dise_type_code,
|
||||
fpscNo: props.registerForm.fpsc_no,
|
||||
matnType: props.registerForm.matn_type,
|
||||
birctrlType: props.registerForm.birctrl_type,
|
||||
latechbFlag: props.registerForm.latechb_flag,
|
||||
gesoVal: props.registerForm.geso_val,
|
||||
fetts: props.registerForm.fetts,
|
||||
fetusCnt: props.registerForm.fetus_cnt,
|
||||
pretFlag: props.registerForm.pret_flag,
|
||||
birctrlMatnDate: props.registerForm.birctrl_matn_date,
|
||||
insuplcAdmdvs: props.registerForm.insuplc_admdvs,
|
||||
mdtrtareaAdmvs: props.registerForm.mdtrtarea_admvs,
|
||||
expContent: props.registerForm.exp_content,
|
||||
});
|
||||
|
||||
// 诊断相关的响应式数据
|
||||
const diagnosisSearchkey = ref('');
|
||||
const rowIndex = ref();
|
||||
const diagnosisOptions = ref([]);
|
||||
const rules = {
|
||||
conerName: [{ required: true, message: '请输入联系人姓名', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
diagSrtNo: [{ required: true, message: '请输入诊断序号', trigger: 'change' }],
|
||||
// tel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
||||
// begntime: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
|
||||
// mdtrtCertType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
||||
// mdtrtCertNo: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
|
||||
// medType: [{ required: true, message: '请选择就诊类型', trigger: 'change' }],
|
||||
// iptNo: [{ required: true, message: '请输入住院号', trigger: 'blur' }],
|
||||
// medrcdno: [{ required: true, message: '请输入就诊人编号', trigger: 'blur' }],
|
||||
// atddrNo: [{ required: true, message: '请输入住院地址编号', trigger: 'blur' }],
|
||||
// chfpdrName: [{ required: true, message: '请输入处方人姓名', trigger: 'blur' }],
|
||||
// admDiagDscr: [{ required: true, message: '请输入主诊断描述', trigger: 'blur' }],
|
||||
// admDeptCodg: [{ required: true, message: '请输入科室编码', trigger: 'blur' }],
|
||||
// admDeptName: [{ required: true, message: '请输入科室名称', trigger: 'blur' }],
|
||||
// admBed: [{ required: true, message: '请输入病床号', trigger: 'blur' }],
|
||||
// dscgNo: [{ required: true, message: '请输入出院编号', trigger: 'blur' }],
|
||||
// dscgDate: [{ required: true, message: '请选择出院时间', trigger: 'change' }],
|
||||
// dscgType: [{ required: true, message: '请选择出院类型', trigger: 'change' }],
|
||||
// dscgReason: [{ required: true, message: '请输入出院原因', trigger: 'blur' }],
|
||||
// dscgMaindiagCode: [{ required: true, message: '请输入出院主要诊断编码', trigger: 'blur' }],
|
||||
// dscgMaindiagName: [{ required: true, message: '请输入出院主要诊断名称', trigger: 'blur' }],
|
||||
// mainCondDscr: [{ required: true, message: '请输入主要诊断描述', trigger: 'blur' }],
|
||||
// diseCodg: [{ required: true, message: '请输入诊断编码', trigger: 'blur' }],
|
||||
// diseName: [{ required: true, message: '请输入诊断名称', trigger: 'blur' }],
|
||||
// oprnOprtCode: [{ required: true, message: '请输入手术操作人编码', trigger: 'blur' }],
|
||||
// oprnOprtName: [{ required: true, message: '请输入手术操作人姓名', trigger: 'blur' }],
|
||||
// diseTypeCode: [{ required: true, message: '请选择诊断类型编码', trigger: 'change' }],
|
||||
// fpscNo: [{ required: true, message: '请输入发票编号', trigger: 'blur' }],
|
||||
// matnType: [{ required: true, message: '请选择Material类型', trigger: 'change' }],
|
||||
// birctrlType: [{ required: true, message: '请选择病案类型', trigger: 'change' }],
|
||||
// latechbFlag: [{ required: true, message: '请选择是否Latechb', trigger: 'change' }],
|
||||
// gesoVal: [{ required: true, message: '请输入Geso值', trigger: 'blur' }],
|
||||
// fetts: [{ required: true, message: '请输入Fetts', trigger: 'blur' }],
|
||||
// fts: [{ required: true, message: '请输入Fts', trigger: 'blur' }],
|
||||
// ftsd: [{ required: true, message: '请输入Ftsd', trigger: 'blur' }],
|
||||
// fetusCnt: [{ required: true, message: '请输入FetusCnt', trigger: 'blur' }],
|
||||
// fetalHb: [{ required: true, message: '请输入FetalHb', trigger: 'blur' }],
|
||||
// fetalHbD: [{ required: true, message: '请输入FetalHbD', trigger: 'blur' }],
|
||||
// fetalHbDd: [{ required: true, message: '请输入FetalHbDd', trigger: 'blur' }],
|
||||
// pretFlag: [{ required: true, message: '请输入FetalHbDdd', trigger: 'blur' }],
|
||||
// birctrlMatnDate: [{ required: true, message: '请输入FetalHbDddd', trigger: 'blur' }],
|
||||
// insuplcAdmdvs: [{ required: true, message: '请输入FetalHbDdddd', trigger: 'blur' }],
|
||||
// mdtrtareaAdmvs: [{ required: true, message: '请输入FetalHbDddddd', trigger: 'blur' }],
|
||||
// expContent: [{ required: true, message: '请输入FetalHbDdddddd', trigger: 'blur' }],
|
||||
};
|
||||
// 重置表单
|
||||
function resetForm() {
|
||||
for (const key in form) {
|
||||
form[key] = '';
|
||||
}
|
||||
}
|
||||
function setFormValue(data = {}) {
|
||||
Object.keys(form).forEach((key) => {
|
||||
form[key] = data?.[key] ?? '';
|
||||
});
|
||||
Object.keys(data || {}).forEach((key) => {
|
||||
if (!(key in form)) {
|
||||
form[key] = data[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
watch(
|
||||
() => props.registerForm,
|
||||
(newVal) => {
|
||||
if (newVal && Object.keys(newVal).length) {
|
||||
setFormValue(newVal);
|
||||
} else {
|
||||
resetForm();
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const submitForm = form;
|
||||
const validateData = async (callback) => {
|
||||
if (!patientRef.value) {
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
await patientRef.value.validate();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({ validateData, submitForm, resetForm });
|
||||
</script>
|
||||
269
openhis-ui-vue3/src/views/ybmanagement/inhospital/register/index.vue
Executable file
269
openhis-ui-vue3/src/views/ybmanagement/inhospital/register/index.vue
Executable file
@@ -0,0 +1,269 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
|
||||
<el-form-item label="内容" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="max-width: 600px"
|
||||
placeholder="请输入内容"
|
||||
class="input-with-select"
|
||||
@keydown.enter="handleQuery"
|
||||
>
|
||||
</el-input>
|
||||
</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>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="treatHospitalizedData"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="患者姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="requestTime" align="center" label="申请时间" width="180" />
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源" />
|
||||
<el-table-column prop="wardName" align="center" label="入院病区" />
|
||||
<el-table-column prop="statusText" align="center" label="医保登记状态">
|
||||
<template #default="scope">
|
||||
<el-tag :type="tagType(scope.row.statusText)">
|
||||
{{ scope.row.statusText || '--' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
align="center"
|
||||
label="操作"
|
||||
class-name="small-padding fixed-width"
|
||||
width="600"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button type="primary" icon="Edit" link @click="doRegistering(scope.row)">
|
||||
医保登记
|
||||
</el-button>
|
||||
<el-button type="success" icon="Edit" link @click="doYbOut(scope.row)">
|
||||
医保出院
|
||||
</el-button>
|
||||
<el-button type="danger" icon="Edit" link @click="doYbChange(scope.row)">
|
||||
信息变更
|
||||
</el-button>
|
||||
<el-button type="warning" icon="Remove" link @click="doYbInCancel(scope.row)">
|
||||
入院撤销
|
||||
</el-button>
|
||||
<el-button type="warning" icon="Remove" link @click="doYbOutCancel(scope.row)">
|
||||
出院撤销
|
||||
</el-button>
|
||||
|
||||
<!-- 更多操作下拉菜单 -->
|
||||
<el-dropdown>
|
||||
<el-button type="primary" link style="margin-top: 4px; margin-left: 10px">
|
||||
更多
|
||||
<el-icon class="el-icon--right"><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="doYbUpload(scope.row)">
|
||||
<el-icon><Upload /></el-icon>
|
||||
<span>病案上传</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {cancelDischargeRegister, cancelInpatientRegister, getRegisteInfoPage, uploadEmr,} from './components/api';
|
||||
import {ElDropdown, ElDropdownItem, ElDropdownMenu, ElMessage, ElMessageBox} from 'element-plus';
|
||||
import {ArrowDown, Upload} from '@element-plus/icons-vue';
|
||||
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
});
|
||||
// 医保状态标签
|
||||
const registerStatusTags = [
|
||||
{
|
||||
value: '1',
|
||||
label: '待登记',
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '已登记',
|
||||
type: 'success',
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '待退费',
|
||||
type: 'danger',
|
||||
},
|
||||
];
|
||||
// 标签类型
|
||||
const tagType = (value) => {
|
||||
return registerStatusTags.find((item) => item.value === value)?.type;
|
||||
};
|
||||
// 列表数据
|
||||
const treatHospitalizedData = ref([]);
|
||||
const queryRef = ref(null);
|
||||
// 就诊信息
|
||||
const mdtrtinfo = ref({});
|
||||
// 诊断信息
|
||||
const mdtrtdiag = ref([]);
|
||||
const router = useRouter();
|
||||
// 医保登记
|
||||
const doRegistering = async (row) => {
|
||||
// 跳转
|
||||
router.push({
|
||||
name: 'YbregisterEdit',
|
||||
query: {
|
||||
encounterId: row.encounterId,
|
||||
operationType: 'register', // 添加操作类型参数,标识这是医保登记操作
|
||||
},
|
||||
});
|
||||
};
|
||||
// 医保出院
|
||||
const doYbOut = async (row) => {
|
||||
router.push({
|
||||
name: 'YbregisterEdit',
|
||||
query: {
|
||||
encounterId: row.encounterId,
|
||||
operationType: 'discharge', // 添加操作类型参数,标识是医保出院
|
||||
mdtrtId: row.mdtrtId,
|
||||
},
|
||||
});
|
||||
};
|
||||
// 医保信息变更
|
||||
const doYbChange = (row) => {
|
||||
router.push({
|
||||
name: 'YbregisterEdit',
|
||||
query: {
|
||||
encounterId: row.encounterId,
|
||||
operationType: 'change', // 添加操作类型参数,标识是信息变更
|
||||
mdtrtId: row.mdtrtId,
|
||||
},
|
||||
});
|
||||
};
|
||||
// 医保入院撤销
|
||||
const doYbInCancel = async (row) => {
|
||||
try {
|
||||
// 添加确认弹窗
|
||||
await ElMessageBox.confirm('确定要撤销该入院登记吗?此操作不可恢复!', '入院撤销', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 用户确认后执行撤销操作 传就诊ID
|
||||
const res = await cancelInpatientRegister({ mdtrtId: row.mdtrtId });
|
||||
|
||||
if (res && res.code === 200) {
|
||||
ElMessage.success('入院撤销成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(res?.message || '入院撤销失败');
|
||||
}
|
||||
} catch (error) {
|
||||
// 用户取消操作或请求失败
|
||||
if (error === 'cancel' || error === 'close') {
|
||||
ElMessage.info('已取消操作');
|
||||
} else {
|
||||
ElMessage.error('操作失败,请重试');
|
||||
console.error('入院撤销操作失败:', error);
|
||||
}
|
||||
} finally {
|
||||
loading.close && loading.close();
|
||||
}
|
||||
};
|
||||
// 医保出院撤销
|
||||
const doYbOutCancel = async (row) => {
|
||||
try {
|
||||
// 添加确认弹窗
|
||||
await ElMessageBox.confirm('确定要撤销该入院登记吗?此操作不可恢复!', '出院撤销', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 用户确认后执行撤销操作 传就诊ID
|
||||
const res = await cancelDischargeRegister({ mdtrtId: row.mdtrtId });
|
||||
|
||||
if (res && res.code === 200) {
|
||||
ElMessage.success('出院撤销成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(res?.message || '出院撤销失败');
|
||||
}
|
||||
} catch (error) {
|
||||
// 用户取消操作或请求失败
|
||||
if (error === 'cancel' || error === 'close') {
|
||||
ElMessage.info('已取消操作');
|
||||
} else {
|
||||
ElMessage.error('操作失败,请重试');
|
||||
console.error('入院撤销操作失败:', error);
|
||||
}
|
||||
} finally {
|
||||
loading.close && loading.close();
|
||||
}
|
||||
};
|
||||
// 病案上传
|
||||
const doYbUpload = (row) => {
|
||||
const res = uploadEmr({ mdtrtId: row.mdtrtId });
|
||||
if (res && res.code === 200) {
|
||||
ElMessage.success('病案上传成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(res?.message || '病案上传失败');
|
||||
}
|
||||
};
|
||||
// 加载中
|
||||
const loading = ref(false);
|
||||
// 获取列表
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
getRegisteInfoPage(queryParams.value).then((res) => {
|
||||
treatHospitalizedData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
// 重置按钮操作
|
||||
function resetQuery() {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
};
|
||||
getList();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
Reference in New Issue
Block a user