Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue
This commit is contained in:
@@ -372,6 +372,23 @@ const validateIdCard = (rule, value, callback) => {
|
|||||||
callback(); // 校验通过
|
callback(); // 校验通过
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 监护人信息条件验证函数
|
||||||
|
const validateGuardianInfo = (rule, value, callback) => {
|
||||||
|
// 只有当年龄小于18岁时才验证监护人信息
|
||||||
|
if (form.value.age) {
|
||||||
|
// 提取年龄数字部分
|
||||||
|
const ageMatch = form.value.age.toString().match(/\d+/);
|
||||||
|
if (ageMatch) {
|
||||||
|
const age = parseInt(ageMatch[0]);
|
||||||
|
// 如果年龄小于18岁,监护人信息必须填写
|
||||||
|
if (age < 18 && !value) {
|
||||||
|
return callback(new Error('年龄小于18岁的患者必须填写监护人信息'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 18岁及以上患者或年龄未填写时,跳过验证
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
isViewMode: false,
|
isViewMode: false,
|
||||||
@@ -394,6 +411,11 @@ const data = reactive({
|
|||||||
{ validator: validateUniquePatient, trigger: 'blur' }
|
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
|
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
|
||||||
|
// 监护人信息条件验证规则
|
||||||
|
guardianName: [{ validator: validateGuardianInfo, trigger: 'blur' }],
|
||||||
|
guardianRelation: [{ validator: validateGuardianInfo, trigger: 'blur' }],
|
||||||
|
guardianPhone: [{ validator: validateGuardianInfo, trigger: 'blur' }],
|
||||||
|
guardianIdNo: [{ validator: validateGuardianInfo, trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -583,13 +605,16 @@ function submitForm() {
|
|||||||
form.value.idCard.toString().substring(12, 14);
|
form.value.idCard.toString().substring(12, 14);
|
||||||
console.log(form.value.birthDate, 123);
|
console.log(form.value.birthDate, 123);
|
||||||
}
|
}
|
||||||
|
// 进行表单验证
|
||||||
proxy.$refs['patientRef'].validate((valid) => {
|
proxy.$refs['patientRef'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 使用
|
// 提交表单前的处理
|
||||||
if (!form.value.identifierNo) {
|
if (!form.value.identifierNo) {
|
||||||
form.value.typeCode = undefined;
|
form.value.typeCode = undefined;
|
||||||
}
|
}
|
||||||
form.value.address = getAddress(form);
|
form.value.address = getAddress(form);
|
||||||
|
|
||||||
|
// 提交新增患者请求
|
||||||
addPatient(form.value).then((response) => {
|
addPatient(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess('新增成功');
|
proxy.$modal.msgSuccess('新增成功');
|
||||||
getPatientInfo(response.data.idCard);
|
getPatientInfo(response.data.idCard);
|
||||||
|
|||||||
@@ -3,46 +3,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="card-box">
|
<el-col :span="24" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header>
|
<template #header> <span style="vertical-align: middle">门诊挂号</span></template>
|
||||||
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%">
|
|
||||||
<span style="vertical-align: middle; font-size: 16px; font-weight: bold;">门诊挂号</span>
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" icon="Plus" @click="handleAddPatient" style="margin-right: 8px;">
|
|
||||||
新建
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Search"
|
|
||||||
@click="handleSearch"
|
|
||||||
style="margin-right: 8px;"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" plain @click="handleReadCard('01')" style="margin-right: 8px;">
|
|
||||||
电子凭证
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
@click="handleReadCard('02')"
|
|
||||||
style="margin-right: 8px;"
|
|
||||||
:disabled="true"
|
|
||||||
>
|
|
||||||
身份证
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" plain @click="handleReadCard('03')" style="margin-right: 8px;">
|
|
||||||
医保卡
|
|
||||||
</el-button>
|
|
||||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear" style="margin-right: 8px;">
|
|
||||||
清空
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" icon="Plus" @click="handleAdd">
|
|
||||||
保存挂号
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
|
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
@@ -67,6 +28,44 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 0">
|
||||||
|
<el-button type="primary" icon="Plus" @click="handleAddPatient" style="width: 65px">
|
||||||
|
新建
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Search"
|
||||||
|
@click="handleSearch"
|
||||||
|
style="width: 65px"
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||||
|
电子凭证
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="handleReadCard('02')"
|
||||||
|
style="width: 65px"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
身份证
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||||
|
医保卡
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="handleReadCard('99')"
|
||||||
|
style="width: 65px"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
学生卡
|
||||||
|
</el-button> -->
|
||||||
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="姓名:" prop="name">
|
<el-form-item label="姓名:" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
|
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
|
||||||
@@ -351,6 +350,12 @@
|
|||||||
<el-input v-model="form.totalPrice" placeholder="" :disabled="true" />
|
<el-input v-model="form.totalPrice" placeholder="" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="4" style="text-align: right">
|
||||||
|
<el-button type="warning" plain icon="CircleClose" @click="handleClear"
|
||||||
|
>清空</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">保存挂号</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row :gutter="24" justify="end">
|
<!-- <el-row :gutter="24" justify="end">
|
||||||
<el-col :span="5" style="text-align: right">
|
<el-col :span="5" style="text-align: right">
|
||||||
|
|||||||
@@ -179,11 +179,19 @@
|
|||||||
label='门诊号'
|
label='门诊号'
|
||||||
align="center"
|
align="center"
|
||||||
key="busNo"
|
key="busNo"
|
||||||
prop="busNo"
|
min-width="150px"
|
||||||
width="110px"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
resizable
|
resizable
|
||||||
/>
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleArchive(scope.row)"
|
||||||
|
>
|
||||||
|
{{ scope.row.busNo }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="科室"
|
label="科室"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -207,7 +215,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
key="ybCode"
|
key="ybCode"
|
||||||
prop="ybCode"
|
prop="ybCode"
|
||||||
width="190px"
|
min-width="200px"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
resizable
|
resizable
|
||||||
/>
|
/>
|
||||||
@@ -217,7 +225,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
key="clinicalName"
|
key="clinicalName"
|
||||||
prop="clinicalName"
|
prop="clinicalName"
|
||||||
min-width="150px"
|
min-width="180px"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
resizable
|
resizable
|
||||||
/>
|
/>
|
||||||
@@ -226,7 +234,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
key="ybNo"
|
key="ybNo"
|
||||||
prop="ybNo"
|
prop="ybNo"
|
||||||
width="220px"
|
min-width="250px"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
resizable
|
resizable
|
||||||
/>
|
/>
|
||||||
@@ -734,6 +742,16 @@ function autoFitColumnWidth(property) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 跳转到患者档案管理页面 */
|
||||||
|
function handleArchive(row) {
|
||||||
|
// 跳转到患者档案管理页面,并传递busNo参数
|
||||||
|
proxy.$router.push({
|
||||||
|
path: '/system/basicmanage/patientmanagement',
|
||||||
|
query: { searchKey: row.busNo }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
getPharmacyCabinetLists()
|
getPharmacyCabinetLists()
|
||||||
|
|||||||
Reference in New Issue
Block a user