2025-12-06 发版补丁
This commit is contained in:
@@ -1,146 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-input placeholder="住院号/姓名">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
@node-click="handleNodeClick"
|
||||
@check="handleCheckChange"
|
||||
@node-expand="onNodeExpand"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node" v-if="node.level === 2">
|
||||
<span>{{ data.bedName + ' / ' + node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
{{ data.genderEnum_enumText + ' / ' + data.age }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPatientList, getWardList } from './api';
|
||||
import { updatePatientInfoList } from '../store/patient';
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
|
||||
const treeRef = ref(null);
|
||||
const allNodesLoaded = ref(false);
|
||||
// 树节点加载完成后的回调
|
||||
function onTreeLoaded() {
|
||||
if (!allNodesLoaded.value && treeRef.value) {
|
||||
// 等待DOM更新后设置全选
|
||||
nextTick(() => {
|
||||
// 获取所有节点并设置为选中状态
|
||||
const allNodes = getAllNodes(treeRef.value.store.root.childNodes);
|
||||
const allKeys = allNodes.map((node) => node.key);
|
||||
|
||||
treeRef.value.setCheckedKeys(allKeys, true); // 第二个参数设为true表示级联选中
|
||||
allNodesLoaded.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 递归获取所有节点
|
||||
function getAllNodes(nodes) {
|
||||
let result = [];
|
||||
if (nodes && nodes.length > 0) {
|
||||
nodes.forEach((node) => {
|
||||
result.push(node);
|
||||
if (node.childNodes && node.childNodes.length > 0) {
|
||||
result = result.concat(getAllNodes(node.childNodes));
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadNode(node, resolve) {
|
||||
// 初始加载:获取所有病区(父级节点)
|
||||
if (node.level === 0) {
|
||||
getWardList().then((res) => {
|
||||
// 确保病区节点不是叶子节点
|
||||
const wards = res.map((ward) => ({
|
||||
...ward,
|
||||
leaf: false,
|
||||
}));
|
||||
return resolve(wards);
|
||||
});
|
||||
}
|
||||
// 展开病区节点时:获取该病区下的患者列表
|
||||
else if (node.level === 1) {
|
||||
const wardId = node.data.id;
|
||||
getPatientList({ wardId: wardId }).then((res) => {
|
||||
let children = res.data.records.map((item) => {
|
||||
return {
|
||||
leaf: true, // 患者节点为叶子节点
|
||||
...item,
|
||||
name: item.patientName,
|
||||
};
|
||||
});
|
||||
return resolve(children);
|
||||
});
|
||||
}
|
||||
// 更深层级直接返回空数组
|
||||
else {
|
||||
return resolve([]);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有选中的子节点(叶子节点)
|
||||
function getCheckedLeafNodes() {
|
||||
if (!treeRef.value) return [];
|
||||
|
||||
// 获取所有选中的节点key
|
||||
const checkedKeys = treeRef.value.getCheckedKeys();
|
||||
// 获取所有半选中的节点key(父节点)
|
||||
const halfCheckedKeys = treeRef.value.getHalfCheckedKeys();
|
||||
|
||||
// 获取所有选中的节点数据
|
||||
const checkedNodes = treeRef.value.getCheckedNodes();
|
||||
|
||||
// 只返回叶子节点(患者节点)
|
||||
return checkedNodes.filter((node) => node.leaf === true);
|
||||
}
|
||||
|
||||
// 处理节点选中状态变化
|
||||
function handleCheckChange(data, checked) {
|
||||
// 可以在这里处理选中状态变化的逻辑
|
||||
let list = getCheckedLeafNodes();
|
||||
console.log(list, '2345678');
|
||||
|
||||
updatePatientInfoList(list);
|
||||
handleGetPrescription();
|
||||
}
|
||||
const handleGetPrescription = inject('handleGetPrescription');
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree-node-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content) {
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,112 +0,0 @@
|
||||
<template>
|
||||
<div class="patientList-container">
|
||||
<div class="search-container">
|
||||
<el-space :size="4">
|
||||
<el-input v-model="searchForm.searchVal" style="width: 100px" placeholder="请输入" />
|
||||
<el-button>查询</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="patientList-table">
|
||||
<el-table :data="patientListData" row-key="id" style="width: 100%; height: 100%" highlight-current-row
|
||||
@selection-change="handleSelectionChange" :show-header="false" show-overflow-tooltip>
|
||||
<el-table-column label="姓名" prop="name" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<span class="name" v-if="row.children"> {{ row.department }}({{ row.children?.length || 0 }})</span>
|
||||
<div class="patient-name" v-else>
|
||||
<span class="name">{{ row.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
const searchForm = ref({
|
||||
searchVal: '',
|
||||
})
|
||||
const patientListData = ref([
|
||||
{
|
||||
id: 1,
|
||||
department: '儿科',
|
||||
children: [
|
||||
{
|
||||
id: 11,
|
||||
name: '张三',
|
||||
bedName: '1201',
|
||||
gender: '男',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '张三-2',
|
||||
age: 3,
|
||||
gender: '女',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
department: '神经内科科',
|
||||
children: [
|
||||
{
|
||||
id: 21,
|
||||
name: '张三',
|
||||
bedName: '1201',
|
||||
gender: '男',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
},
|
||||
{
|
||||
id: 22,
|
||||
name: '张三-2',
|
||||
age: 3,
|
||||
gender: '女',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
console.log('handleSelectionChange', selection)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.patientList-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
width: 240px;
|
||||
border-right: 1px solid #e4e7ed;
|
||||
|
||||
.search-container {
|
||||
flex: none;
|
||||
padding: 0px 8px;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.patientList-table {
|
||||
flex: 1;
|
||||
|
||||
:deep(.el-table__indent) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__placeholder) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +0,0 @@
|
||||
// 选择患者信息
|
||||
export const patientInfo = ref()
|
||||
export function updatePatientInfo(info) {
|
||||
patientInfo.value = info
|
||||
}
|
||||
|
||||
// 多选患者
|
||||
export const patientInfoList = ref([])
|
||||
export function updatePatientInfoList(info) {
|
||||
patientInfoList.value = info
|
||||
}
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-input placeholder="住院号/姓名">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
@node-click="handleNodeClick"
|
||||
@check="handleCheckChange"
|
||||
@node-expand="onNodeExpand"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node" v-if="node.level === 2">
|
||||
<span>{{ data.bedName + ' / ' + node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
{{ data.genderEnum_enumText + ' / ' + data.age }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPatientList, getWardList } from './api';
|
||||
import { updatePatientInfoList } from '../store/patient';
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
|
||||
const treeRef = ref(null);
|
||||
const allNodesLoaded = ref(false);
|
||||
// 树节点加载完成后的回调
|
||||
function onTreeLoaded() {
|
||||
if (!allNodesLoaded.value && treeRef.value) {
|
||||
// 等待DOM更新后设置全选
|
||||
nextTick(() => {
|
||||
// 获取所有节点并设置为选中状态
|
||||
const allNodes = getAllNodes(treeRef.value.store.root.childNodes);
|
||||
const allKeys = allNodes.map((node) => node.key);
|
||||
|
||||
treeRef.value.setCheckedKeys(allKeys, true); // 第二个参数设为true表示级联选中
|
||||
allNodesLoaded.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 递归获取所有节点
|
||||
function getAllNodes(nodes) {
|
||||
let result = [];
|
||||
if (nodes && nodes.length > 0) {
|
||||
nodes.forEach((node) => {
|
||||
result.push(node);
|
||||
if (node.childNodes && node.childNodes.length > 0) {
|
||||
result = result.concat(getAllNodes(node.childNodes));
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadNode(node, resolve) {
|
||||
// 初始加载:获取所有病区(父级节点)
|
||||
if (node.level === 0) {
|
||||
getWardList().then((res) => {
|
||||
// 确保病区节点不是叶子节点
|
||||
const wards = res.map((ward) => ({
|
||||
...ward,
|
||||
leaf: false,
|
||||
}));
|
||||
return resolve(wards);
|
||||
});
|
||||
}
|
||||
// 展开病区节点时:获取该病区下的患者列表
|
||||
else if (node.level === 1) {
|
||||
const wardId = node.data.id;
|
||||
getPatientList({ wardId: wardId }).then((res) => {
|
||||
let children = res.data.records.map((item) => {
|
||||
return {
|
||||
leaf: true, // 患者节点为叶子节点
|
||||
...item,
|
||||
name: item.patientName,
|
||||
};
|
||||
});
|
||||
return resolve(children);
|
||||
});
|
||||
}
|
||||
// 更深层级直接返回空数组
|
||||
else {
|
||||
return resolve([]);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有选中的子节点(叶子节点)
|
||||
function getCheckedLeafNodes() {
|
||||
if (!treeRef.value) return [];
|
||||
|
||||
// 获取所有选中的节点key
|
||||
const checkedKeys = treeRef.value.getCheckedKeys();
|
||||
// 获取所有半选中的节点key(父节点)
|
||||
const halfCheckedKeys = treeRef.value.getHalfCheckedKeys();
|
||||
|
||||
// 获取所有选中的节点数据
|
||||
const checkedNodes = treeRef.value.getCheckedNodes();
|
||||
|
||||
// 只返回叶子节点(患者节点)
|
||||
return checkedNodes.filter((node) => node.leaf === true);
|
||||
}
|
||||
|
||||
// 处理节点选中状态变化
|
||||
function handleCheckChange(data, checked) {
|
||||
// 可以在这里处理选中状态变化的逻辑
|
||||
let list = getCheckedLeafNodes();
|
||||
console.log(list, '2345678');
|
||||
|
||||
updatePatientInfoList(list);
|
||||
handleGetPrescription()
|
||||
}
|
||||
const handleGetPrescription = inject('handleGetPrescription')
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree-node-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content) {
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +0,0 @@
|
||||
// 选择患者信息
|
||||
export const patientInfo = ref()
|
||||
export function updatePatientInfo(info) {
|
||||
patientInfo.value = info
|
||||
}
|
||||
|
||||
// 多选患者
|
||||
export const patientInfoList = ref([])
|
||||
export function updatePatientInfoList(info) {
|
||||
patientInfoList.value = info
|
||||
}
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-input placeholder="住院号/姓名">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
@node-click="handleNodeClick"
|
||||
@check="handleCheckChange"
|
||||
@node-expand="onNodeExpand"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node" v-if="node.level === 2">
|
||||
<span>{{ data.bedName + ' / ' + node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
{{ data.genderEnum_enumText + ' / ' + data.age }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPatientList, getWardList } from './api';
|
||||
import { updatePatientInfoList } from '../store/patient';
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
|
||||
const treeRef = ref(null);
|
||||
const allNodesLoaded = ref(false);
|
||||
// 树节点加载完成后的回调
|
||||
function onTreeLoaded() {
|
||||
if (!allNodesLoaded.value && treeRef.value) {
|
||||
// 等待DOM更新后设置全选
|
||||
nextTick(() => {
|
||||
// 获取所有节点并设置为选中状态
|
||||
const allNodes = getAllNodes(treeRef.value.store.root.childNodes);
|
||||
const allKeys = allNodes.map((node) => node.key);
|
||||
treeRef.value.setCheckedKeys(allKeys, true); // 第二个参数设为true表示级联选中
|
||||
allNodesLoaded.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 递归获取所有节点
|
||||
function getAllNodes(nodes) {
|
||||
let result = [];
|
||||
if (nodes && nodes.length > 0) {
|
||||
nodes.forEach((node) => {
|
||||
result.push(node);
|
||||
if (node.childNodes && node.childNodes.length > 0) {
|
||||
result = result.concat(getAllNodes(node.childNodes));
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadNode(node, resolve) {
|
||||
// 初始加载:获取所有病区(父级节点)
|
||||
if (node.level === 0) {
|
||||
getWardList().then((res) => {
|
||||
// 确保病区节点不是叶子节点
|
||||
const wards = res.map((ward) => ({
|
||||
...ward,
|
||||
leaf: false,
|
||||
}));
|
||||
return resolve(wards);
|
||||
});
|
||||
}
|
||||
// 展开病区节点时:获取该病区下的患者列表
|
||||
else if (node.level === 1) {
|
||||
const wardId = node.data.id;
|
||||
getPatientList({ wardId: wardId }).then((res) => {
|
||||
let children = res.data.records.map((item) => {
|
||||
return {
|
||||
leaf: true, // 患者节点为叶子节点
|
||||
...item,
|
||||
name: item.patientName,
|
||||
};
|
||||
});
|
||||
return resolve(children);
|
||||
});
|
||||
}
|
||||
// 更深层级直接返回空数组
|
||||
else {
|
||||
return resolve([]);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有选中的子节点(叶子节点)
|
||||
function getCheckedLeafNodes() {
|
||||
if (!treeRef.value) return [];
|
||||
|
||||
// 获取所有选中的节点key
|
||||
const checkedKeys = treeRef.value.getCheckedKeys();
|
||||
// 获取所有半选中的节点key(父节点)
|
||||
const halfCheckedKeys = treeRef.value.getHalfCheckedKeys();
|
||||
|
||||
// 获取所有选中的节点数据
|
||||
const checkedNodes = treeRef.value.getCheckedNodes();
|
||||
|
||||
// 只返回叶子节点(患者节点)
|
||||
return checkedNodes.filter((node) => node.leaf === true);
|
||||
}
|
||||
|
||||
// 处理节点选中状态变化
|
||||
function handleCheckChange(data, checked) {
|
||||
// 可以在这里处理选中状态变化的逻辑
|
||||
let list = getCheckedLeafNodes();
|
||||
console.log(list, '2345678');
|
||||
|
||||
updatePatientInfoList(list);
|
||||
handleGetPrescription();
|
||||
}
|
||||
|
||||
const handleGetPrescription = inject('handleGetPrescription');
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree-node-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content) {
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +0,0 @@
|
||||
// 选择患者信息
|
||||
export const patientInfo = ref()
|
||||
export function updatePatientInfo(info) {
|
||||
patientInfo.value = info
|
||||
}
|
||||
|
||||
// 多选患者
|
||||
export const patientInfoList = ref([])
|
||||
export function updatePatientInfoList(info) {
|
||||
patientInfoList.value = info
|
||||
}
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
<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, getPatientBasicInfo, getInHospitalInfo } 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>
|
||||
@@ -1,150 +0,0 @@
|
||||
<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, getPatientBasicInfo, getInHospitalInfo } 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>
|
||||
@@ -1,99 +0,0 @@
|
||||
<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>
|
||||
@@ -1,4 +0,0 @@
|
||||
import AwaitList from "./awaitList.vue";
|
||||
import AccomplishList from "./accomplishList.vue";
|
||||
import ExistList from "./existList.vue";
|
||||
export {AwaitList,AccomplishList,ExistList}
|
||||
@@ -1,407 +0,0 @@
|
||||
<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 { ref, reactive, watch } from 'vue';
|
||||
import PatientInfoForm from './patientInfoForm.vue';
|
||||
import { patientlLists, getOrgList } 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>
|
||||
@@ -1,392 +0,0 @@
|
||||
<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>
|
||||
@@ -1,317 +0,0 @@
|
||||
<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 { ElMessageBox } from 'element-plus';
|
||||
import PatientInfoComp from './patientInfo.vue';
|
||||
import RegisterForm from './registerForm.vue';
|
||||
import { noFilesRegister, registerInHospital, getInit } 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');
|
||||
import { ElMessage } from 'element-plus';
|
||||
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>
|
||||
Reference in New Issue
Block a user