Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # openhis-ui-vue3/src/views/doctorstation/components/diagnosis/addDiagnosisDialog.vue # openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue
This commit is contained in:
39
openhis-ui-vue3/src/views/appoinmentmanage/deptManage/api.js
Normal file
39
openhis-ui-vue3/src/views/appoinmentmanage/deptManage/api.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 添加医生排班
|
||||
* @param {Object} data - 排班数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function addDoctorSchedule(data) {
|
||||
return request({
|
||||
url: '/doctor-schedule/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除医生排班
|
||||
* @param {String|Number} id - 排班记录ID
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function deleteDoctorSchedule(id) {
|
||||
return request({
|
||||
url: '/doctor-schedule/delete/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存医生排班
|
||||
* @param {Array} data - 排班数据数组
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function batchSaveDoctorSchedule(data) {
|
||||
return request({
|
||||
url: '/doctor-schedule/batch-save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -79,6 +79,9 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="属性代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入属性代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体温单类型编码" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="请输入体温单属性编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位顺序" prop="displayOrder">
|
||||
<el-input-number v-model="form.displayOrder" controls-position="right" :min="0" />
|
||||
@@ -197,6 +200,7 @@ function reset() {
|
||||
displayOrder: 0, // 显示顺序
|
||||
dictName: '', //字典名称
|
||||
dictType: '', //字典类型
|
||||
typeCode:'',//体温单类型编码
|
||||
};
|
||||
proxy.resetForm('statisticsRef');
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<PopoverList @search="handleSearch" :width="800" :modelValue="scope.row.name">
|
||||
<template #popover-content="{}">
|
||||
<DeviceList
|
||||
v-if="scope.row.type == '2' || props.tab == 2 "
|
||||
v-if="scope.row.type == '2' || props.tab == 2"
|
||||
@selectRow="(row) => selectRow(row, scope.$index)"
|
||||
:searchKey="searchKey"
|
||||
/>
|
||||
@@ -171,7 +171,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { reactive, watch } from 'vue';
|
||||
import { bind, deleteBind, init } from './api';
|
||||
@@ -345,6 +345,5 @@ function selectRow(row, index) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -79,8 +79,12 @@ import { getActivityList, getBindList, getRegistrationfeeList } from './componen
|
||||
import ConsumablesList from './components/consumablesList.vue';
|
||||
|
||||
const activityList = ref([]);
|
||||
const queryParams = ref({});
|
||||
const queryParamsRegistration = ref({});
|
||||
const queryParams = ref({
|
||||
statusEnum: 2,
|
||||
});
|
||||
const queryParamsRegistration = ref({
|
||||
activeFlag: 1,
|
||||
});
|
||||
const bindList = ref([]);
|
||||
const bindInfo = ref({});
|
||||
const activeTab = ref(1);
|
||||
@@ -91,19 +95,18 @@ const { proxy } = getCurrentInstance();
|
||||
const { method_code } = proxy.useDict('method_code');
|
||||
|
||||
getList();
|
||||
getRegistrationList()
|
||||
getRegistrationList();
|
||||
function getList() {
|
||||
// queryParams.value.typeEnum = activeTab.value;
|
||||
getActivityList(queryParams.value).then((res) => {
|
||||
activityList.value = res.data.records;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getRegistrationList() {
|
||||
getRegistrationfeeList(queryParamsRegistration.value).then(res => {
|
||||
getRegistrationfeeList(queryParamsRegistration.value).then((res) => {
|
||||
RegistrationfeeList.value = res.data.records;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 点击诊疗列表 获取绑定的耗材
|
||||
@@ -119,5 +122,4 @@ function clickRow(row) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column
|
||||
label="取药科室"
|
||||
label="开立科室"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
@@ -64,6 +64,29 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
key="itemCode"
|
||||
prop="itemCode"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.itemCode"
|
||||
placeholder="项目类型"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option label="药品" value="1" />
|
||||
<el-option label="耗材" value="2" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
@@ -81,12 +104,22 @@
|
||||
style="width: 200px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<template v-if="scope.row.itemCode == '1'">
|
||||
<el-option
|
||||
v-for="dict in med_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="scope.row.itemCode == '2'">
|
||||
<el-option
|
||||
v-for="dict in device_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
@@ -184,7 +217,11 @@ import {
|
||||
deletePharmacyDepartment,
|
||||
} from './components/pharmacyDepartment';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { med_category_code } = proxy.useDict('med_category_code');
|
||||
const { distribution_category_code, med_category_code, device_category_code } = proxy.useDict(
|
||||
'distribution_category_code',
|
||||
'med_category_code',
|
||||
'device_category_code'
|
||||
);
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
@@ -293,10 +330,6 @@ function handleSelectionChange(selection) {
|
||||
}
|
||||
|
||||
function openAddPharmacyDepartment() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning('请先保存当前行后再新增!');
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
id: '',
|
||||
organizationId: '',
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<span style="vertical-align: middle">病区</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-button type="primary" @click="open = true" class="mb8"> 新增 </el-button>
|
||||
<el-button type="primary" @click="onIncrease" class="mb8"> 新增 </el-button>
|
||||
<el-button type="success" plain @click="handleEnableBatch('wardRef')" class="mb8">
|
||||
批量启用
|
||||
</el-button>
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-table
|
||||
max-height="630"
|
||||
:data="wardList"
|
||||
@cell-click="(row) => clickRow(row, 10)"
|
||||
@cell-click="(row) => clickRow(row, 10, 0)"
|
||||
highlight-current-row
|
||||
ref="wardRef"
|
||||
>
|
||||
@@ -95,7 +95,7 @@
|
||||
<el-table
|
||||
height="280"
|
||||
:data="houseList"
|
||||
@cell-click="(row) => clickRow(row, 8)"
|
||||
@cell-click="(row) => clickRow(row, 8, 0, 1)"
|
||||
highlight-current-row
|
||||
v-loading="loading"
|
||||
ref="hourseRef"
|
||||
@@ -134,7 +134,7 @@
|
||||
@click.stop="
|
||||
() => {
|
||||
handleUnable(scope.row).then(() => {
|
||||
clickRow(houseRow, 10);
|
||||
getHouseList();
|
||||
});
|
||||
}
|
||||
"
|
||||
@@ -153,7 +153,7 @@
|
||||
@click.stop="
|
||||
() => {
|
||||
handleEnable(scope.row).then(() => {
|
||||
clickRow(houseRow, 10);
|
||||
getHouseList();
|
||||
});
|
||||
}
|
||||
"
|
||||
@@ -206,7 +206,7 @@
|
||||
@click.stop="
|
||||
() => {
|
||||
handleUnable(scope.row, 10).then(() => {
|
||||
clickRow(bedRow, 8);
|
||||
getBedList();
|
||||
});
|
||||
}
|
||||
"
|
||||
@@ -225,7 +225,7 @@
|
||||
@click.stop="
|
||||
() => {
|
||||
handleEnable(scope.row, 10).then(() => {
|
||||
clickRow(bedRow, 8);
|
||||
getBedList();
|
||||
});
|
||||
}
|
||||
"
|
||||
@@ -255,7 +255,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="type + '名称'" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入科室名称" />
|
||||
<el-input v-model="form.name" :placeholder="'请输入' + type + '名称'" />
|
||||
</el-form-item>
|
||||
<el-col>
|
||||
<el-form-item :label="upLabel" prop="busNoParent">
|
||||
@@ -304,8 +304,9 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup name="Ward">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import {
|
||||
getList,
|
||||
addLocation,
|
||||
@@ -315,33 +316,65 @@ import {
|
||||
unableLocation,
|
||||
enableLocation,
|
||||
} from './components/api';
|
||||
import { ElMessage } from 'element-plus';
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 病区参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
formEnum: 4,
|
||||
formEnum: 4, //4 病区 10 病房 8床位
|
||||
// locationFormList: [4],
|
||||
});
|
||||
// 病房参数
|
||||
const queryHouseParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
formEnum: 10, //4 病区 10 病房 8床位
|
||||
// locationFormList: [4],
|
||||
});
|
||||
// 病床参数
|
||||
const querybedParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
formEnum: 8, //4 病区 10 病房 8床位
|
||||
// locationFormList: [4],
|
||||
});
|
||||
// 病区、病房、病床类型
|
||||
const type = ref('病区');
|
||||
// 病区列表
|
||||
const wardList = ref([]);
|
||||
// 床位列表
|
||||
const bedList = ref([]);
|
||||
// 病房列表
|
||||
const houseList = ref([]);
|
||||
const wardListOption = ref([]);
|
||||
const organization = ref([]);
|
||||
const loading = ref(false);
|
||||
const isEdit = ref(false);
|
||||
const open = ref(false);
|
||||
// 病区row
|
||||
const wardRow = ref({});
|
||||
// 床位row
|
||||
const bedRow = ref({});
|
||||
// 病房row
|
||||
const houseRow = ref({});
|
||||
// 记录点击的是启用
|
||||
const clickType = ref(0);
|
||||
const orgRef = ref();
|
||||
// 新增数据参数
|
||||
const form = reactive({
|
||||
formEnum: 4,
|
||||
busNoParent: '',
|
||||
organizationId: '',
|
||||
name: '',
|
||||
busNo: '',
|
||||
});
|
||||
const upLabel = ref('关联科室');
|
||||
const title = ref('新增');
|
||||
const rules = ref({
|
||||
name: [
|
||||
{ required: true, message: '请输入科室名称', trigger: 'blur' },
|
||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
{ required: true, min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
||||
],
|
||||
busNoParent: [
|
||||
{
|
||||
@@ -351,23 +384,76 @@ const rules = ref({
|
||||
},
|
||||
],
|
||||
});
|
||||
/**
|
||||
* 病区列表
|
||||
*/
|
||||
function getWardList() {
|
||||
queryParams.value.formEnum = 4;
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取科室下啦树
|
||||
function init() {
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 病区列表
|
||||
*/
|
||||
function getWardList() {
|
||||
houseList.value = [];
|
||||
bedList.value = [];
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
// 获取病房列表
|
||||
const getHouseList = () => {
|
||||
// 4病区 10病房 8床位
|
||||
loading.value = true;
|
||||
// 病区号
|
||||
queryHouseParams.value.busNo = wardRow.value.busNo;
|
||||
bedList.value = [];
|
||||
getList(queryHouseParams.value).then((res) => {
|
||||
houseList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
// 获取床位列表
|
||||
const getBedList = () => {
|
||||
// 4病区 10病房 8床位
|
||||
loading.value = true;
|
||||
querybedParams.value.busNo = houseRow.value.busNo;
|
||||
bedList.value = [];
|
||||
getList(querybedParams.value).then((res) => {
|
||||
bedList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
// 点击新增按钮
|
||||
const onIncrease = () => {
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
// 查询病房和病区的下拉选
|
||||
const getHomeOrBed = (formEnum) => {
|
||||
const params = {
|
||||
formEnum,
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
};
|
||||
getList(params).then((res) => {
|
||||
if (formEnum == 10) {
|
||||
const datas = res.data?.records || [];
|
||||
const optionsList = datas.map((item) => {
|
||||
let obj = {
|
||||
...item,
|
||||
};
|
||||
obj.name = item.parentName + '-' + item.name;
|
||||
return obj;
|
||||
});
|
||||
wardListOption.value = optionsList;
|
||||
} else {
|
||||
wardListOption.value = res.data?.records || [];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function handleRadioChange(val) {
|
||||
let formEnum = 4;
|
||||
if (val == 4) {
|
||||
type.value = '病区';
|
||||
upLabel.value = '关联科室';
|
||||
@@ -375,38 +461,56 @@ function handleRadioChange(val) {
|
||||
} else if (val == 10) {
|
||||
type.value = '病房';
|
||||
upLabel.value = '所属病区';
|
||||
queryParams.value.formEnum = 4;
|
||||
formEnum = 4;
|
||||
// queryParams.value.formEnum = 4;
|
||||
} else {
|
||||
type.value = '床位';
|
||||
upLabel.value = '所属病房';
|
||||
queryParams.value.formEnum = 10;
|
||||
formEnum = 10;
|
||||
// queryParams.value.formEnum = 10;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardListOption.value = res.data.records;
|
||||
});
|
||||
form.organizationId = '';
|
||||
form.busNo = '';
|
||||
form.busNoParent = '';
|
||||
form.name = '';
|
||||
getHomeOrBed(formEnum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击患者列表行 获取处方列表
|
||||
*/
|
||||
function clickRow(row, val) {
|
||||
loading.value = true;
|
||||
queryParams.value.formEnum = val;
|
||||
queryParams.value.busNo = row.busNo;
|
||||
bedList.value = [];
|
||||
getList(queryParams.value).then((res) => {
|
||||
if (val == 10) {
|
||||
houseList.value = res.data.records;
|
||||
houseRow.value = row;
|
||||
} else if (val == 8) {
|
||||
bedRow.value = row;
|
||||
bedList.value = res.data.records;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryParams.value.busNo = undefined;
|
||||
loading.value = false;
|
||||
}, 100);
|
||||
});
|
||||
function clickRow(row, val, type) {
|
||||
// 1点击了启用
|
||||
clickType.value = type;
|
||||
console.log('val=====>', JSON.stringify(row));
|
||||
console.log('type=====>', JSON.stringify(type));
|
||||
console.log('val=====>', JSON.stringify(val));
|
||||
// if (type !== 1) {
|
||||
// if (val == 10) {
|
||||
// wardRow.value = row;
|
||||
// getHouseList();
|
||||
// } else if (val == 8) {
|
||||
// houseRow.value = row;
|
||||
// getBedList();
|
||||
// }
|
||||
// } else {
|
||||
// if (val == 10) {
|
||||
// houseRow.value = row;
|
||||
// getHouseList();
|
||||
// } else if (val == 8) {
|
||||
// bedRow.value = row;
|
||||
// getBedList();
|
||||
// }
|
||||
// }
|
||||
if (val == 10) {
|
||||
wardRow.value = row;
|
||||
getHouseList();
|
||||
} else if (val == 8) {
|
||||
houseRow.value = row;
|
||||
console.log('houseRow=====>', houseRow.value);
|
||||
|
||||
getBedList();
|
||||
}
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
@@ -459,38 +563,113 @@ function handleUnableBatch(tableRef) {
|
||||
});
|
||||
}
|
||||
|
||||
// 新增病床拆分"busNo": "LOC055.LOC056",
|
||||
const splitBusNo = (busNo) => {
|
||||
const busNoArr = busNo.split('.') || [];
|
||||
let busNoParent = '';
|
||||
if (busNoArr.length > 1) {
|
||||
busNoParent = busNoArr[0];
|
||||
}
|
||||
return busNoParent;
|
||||
};
|
||||
function submitForm() {
|
||||
if (form.busNoParent) {
|
||||
if (form.formEnum == 4) {
|
||||
form.organizationId = form.busNoParent;
|
||||
} else {
|
||||
form.busNo = form.busNoParent;
|
||||
if (!orgRef) return;
|
||||
const params = {
|
||||
...form,
|
||||
};
|
||||
console.log('form========>', JSON.stringify(form));
|
||||
console.log('params11========>', JSON.stringify(params));
|
||||
orgRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log('99999999');
|
||||
|
||||
if (form.busNoParent) {
|
||||
if (form.formEnum == 4) {
|
||||
params.organizationId = form.busNoParent;
|
||||
} else {
|
||||
if (!isEdit.value) {
|
||||
params.busNo = form.busNoParent;
|
||||
// params.busNoParent = splitBusNo(form.busNoParent);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (form.formEnum == 4) {
|
||||
if (!(params.organizationId && params.organizationId.length > 0)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择关联科室!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else if (form.formEnum == 10) {
|
||||
if (!(params.busNo && params.busNo.length > 0)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择所属病区!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!(params.busNo && params.busNo.length > 8)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择所属病房!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log('params========>', JSON.stringify(form));
|
||||
console.log('params========>', JSON.stringify(params));
|
||||
// console.log('params========>', isEdit.value);
|
||||
if (!isEdit.value) {
|
||||
addLocation(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
if (params.formEnum == 4) {
|
||||
cancel();
|
||||
getWardList();
|
||||
} else if (params.formEnum == 10) {
|
||||
getHouseList();
|
||||
open.value = false;
|
||||
} else if (params.formEnum == 8) {
|
||||
getBedList();
|
||||
open.value = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
editLocation(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
if (params.formEnum == 4) {
|
||||
cancel();
|
||||
getWardList();
|
||||
} else if (params.formEnum == 10) {
|
||||
getHouseList();
|
||||
open.value = false;
|
||||
} else if (params.formEnum == 8) {
|
||||
getBedList();
|
||||
open.value = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(form);
|
||||
if (!isEdit.value) {
|
||||
addLocation(form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
cancel();
|
||||
getWardList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
editLocation(form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
cancel();
|
||||
getWardList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
deleteLocation(row.busNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
if (row.formEnum == 4) {
|
||||
getWardList();
|
||||
} else if (row.formEnum == 10) {
|
||||
getHouseList();
|
||||
} else {
|
||||
getBedList();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -501,24 +680,27 @@ function getLastPartOfString(str) {
|
||||
}
|
||||
|
||||
function handleEdit(row, val) {
|
||||
console.log('editRow=========>', JSON.stringify(row));
|
||||
|
||||
form.id = row.id;
|
||||
form.name = row.name;
|
||||
form.formEnum = row.formEnum;
|
||||
form.busNo = row.busNo;
|
||||
if (row.organizationId) {
|
||||
form.busNoParent = row.organizationId;
|
||||
form.organizationId = row.organizationId;
|
||||
} else {
|
||||
form.busNoParent = row.busNo.split('.').slice(0, -1).join('.');
|
||||
}
|
||||
isEdit.value = true;
|
||||
title.value = '编辑';
|
||||
if (val) {
|
||||
queryParams.value.formEnum = val;
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardListOption.value = res.data.records;
|
||||
});
|
||||
}
|
||||
open.value = true;
|
||||
console.log('editRow1=========>', JSON.stringify(form));
|
||||
if (val == 4) {
|
||||
getHomeOrBed(4);
|
||||
} else if (val == 10) {
|
||||
getHomeOrBed(10);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
@@ -532,10 +714,13 @@ function cancel() {
|
||||
isEdit.value = false;
|
||||
title.value = '新增';
|
||||
}
|
||||
|
||||
init();
|
||||
getWardList();
|
||||
// 页面挂在成功
|
||||
onMounted(() => {
|
||||
// 获取所有科室
|
||||
init();
|
||||
// 获取病区列表
|
||||
getWardList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -36,7 +36,8 @@ export function updateWarehouse(data) {
|
||||
// 删除
|
||||
export function deleteWarehouse(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location',
|
||||
// url: '/base-data-manage/location/location?locationId=' + data.locationId,
|
||||
url: '/base-data-manage/location/location?busNo=' + data.busNo,
|
||||
method: 'delete',
|
||||
params: {
|
||||
locationId: data.locationId,
|
||||
|
||||
@@ -292,29 +292,12 @@ function submitForm() {
|
||||
|
||||
// 删除
|
||||
function handelDelete(data) {
|
||||
proxy.$modal.confirm('是否确认删除该仓库位置?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
loading.value = true;
|
||||
deleteWarehouse({ locationId: data.id, busNo: data.busNo }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
getPageList();
|
||||
} else {
|
||||
// 检查错误信息是否与药品数据关联有关
|
||||
if (res.msg && res.msg.includes('药品')) {
|
||||
proxy.$modal.msgError('该仓库名称已有药品信息请核对确认');
|
||||
} else {
|
||||
proxy.$modal.msgError('删除失败:' + (res.msg || '未知错误'));
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
}).finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
loading.value = true;
|
||||
console.log(data, 'data');
|
||||
deleteWarehouse({ busNo: data.busNo }).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
// // 停用
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
@click="
|
||||
() => {
|
||||
form.ybNo = item.ybNo;
|
||||
form.busNo = item.busNo;
|
||||
form.price = item.retailPrice;
|
||||
}
|
||||
"
|
||||
@@ -756,7 +757,7 @@ const transformFormData = (form) => {
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
practitionerId,
|
||||
busNo,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
@@ -774,7 +775,7 @@ const transformFormData = (form) => {
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
practitionerId,
|
||||
busNo,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
@@ -813,7 +814,7 @@ const transformFormEditData = (form) => {
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
practitionerId,
|
||||
busNo,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
@@ -831,7 +832,7 @@ const transformFormEditData = (form) => {
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
practitionerId,
|
||||
busNo,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -94,11 +94,6 @@
|
||||
v-model="form.unitCode"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
:remote-method="handleUnitCodeSearch"
|
||||
:loading="unitCodeLoading"
|
||||
@focus="handleUnitCodeFocus"
|
||||
@change="handleUnitCodeChange"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
@@ -266,7 +261,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -472,8 +467,7 @@ function getDeptTree() {
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect({ formList: '11,16,17' }).then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
locationTreeSelect({ formList: '11,16' }).then((response) => {
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
:data="deviceList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
/>
|
||||
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" width="90%" border resizable-column>
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
@@ -112,7 +111,7 @@
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材名称"
|
||||
@@ -120,7 +119,15 @@
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装规格"
|
||||
align="center"
|
||||
key="size"
|
||||
prop="size"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="拼音"
|
||||
@@ -153,14 +160,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装规格"
|
||||
align="center"
|
||||
key="size"
|
||||
prop="size"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
@@ -183,7 +182,7 @@
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="所属科室"
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -206,12 +206,9 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select
|
||||
v-model="form.itemTypeCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-select v-model="form.itemTypeCode" clearable filterable>
|
||||
<!-- :disabled="form.isEditInfoDisable === 1" -->
|
||||
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -253,8 +250,13 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="诊疗子项">
|
||||
<div v-if="form.isEditInfoDisable === 0" style="position: relative">
|
||||
<PopoverList @search="handleSearch" :width="1000" :modelValue="item.name">
|
||||
<div style="position: relative">
|
||||
<PopoverList
|
||||
@search="handleSearch"
|
||||
:width="1000"
|
||||
:modelValue="item.name"
|
||||
@focus="popoverListhandleFocus(item.name)"
|
||||
>
|
||||
<template #popover-content="{}">
|
||||
<medicineList
|
||||
@selectRow="(row) => selectRow(row, index)"
|
||||
@@ -280,7 +282,7 @@
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<span v-else>{{ item.name || '' }}</span>
|
||||
<!-- <span v-else>{{ item.name || '' }}</span> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -369,6 +371,7 @@ const { unit_code, med_chrgitm_type, fin_type_code, activity_category_code, chrg
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
const isTemplateActive = ref(true);
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
@@ -384,7 +387,6 @@ const diagnosisTreatmentList = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
||||
permittedUnitCode: [{ required: true, message: '使用单位不能为空', trigger: 'blur' }],
|
||||
@@ -426,6 +428,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
isEditInfoDisable: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 表单数组,初始一条记录
|
||||
@@ -490,6 +496,7 @@ function show() {
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
form.value.isEditInfoDisable = props.isEditInfoDisable;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
@@ -645,10 +652,20 @@ function handleSearch(value) {
|
||||
medicineSearchKey.value = value;
|
||||
}
|
||||
|
||||
function popoverListhandleFocus(value) {
|
||||
// debugger;
|
||||
console.log(value);
|
||||
if (value === '') {
|
||||
return;
|
||||
}
|
||||
medicineSearchKey.value = value;
|
||||
}
|
||||
|
||||
function selectRow(row, index) {
|
||||
treatmentItems.value[index].name = row.name;
|
||||
treatmentItems.value[index].adviceDefinitionId = row.id;
|
||||
treatmentItems.value[index].retailPrice = row.retailPrice || 0;
|
||||
medicineSearchKey.value = '';
|
||||
calculateTotalPrice();
|
||||
}
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:exeOrganizations="exeOrganizations"
|
||||
:typeEnumOptions="typeEnumOptions"
|
||||
:isEditInfoDisable="isEditInfoDisable"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
@submit="getList()"
|
||||
|
||||
@@ -46,6 +46,21 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断类型" prop="typeCode">
|
||||
<el-select
|
||||
v-model="queryParams.typeCode"
|
||||
placeholder="请选择"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in condition_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -86,84 +101,84 @@
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<!-- 添加外层滚动容器,确保表格可以水平滚动 -->
|
||||
<div class="table-scroll-container">
|
||||
<!-- 移除style="width: 100%",让Element UI表格根据内容自动调整 -->
|
||||
<el-table v-loading="loading" :data="diseaseList" @selection-change="handleSelectionChange" border resizable>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- 使用prop属性并设置合适的最小宽度,启用列宽调整 -->
|
||||
<el-table-column label="编码" align="center" prop="conditionCode" min-width="150" />
|
||||
<!-- 名称列使用标准配置 -->
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
min-width="280"
|
||||
/>
|
||||
<!-- 其他列使用标准配置 -->
|
||||
<el-table-column
|
||||
label="疾病分类"
|
||||
align="center"
|
||||
prop="sourceEnum_enumText"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拼音助记码"
|
||||
align="center"
|
||||
prop="pyStr"
|
||||
min-width="220"
|
||||
/>
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
prop="typeCode_dictText"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
prop="ybMatchFlag_enumText"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保对码标志"
|
||||
align="center"
|
||||
prop="ybMatchFlag_enumText"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
prop="statusEnum_enumText"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="描述"
|
||||
align="center"
|
||||
prop="description"
|
||||
min-width="250"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
min-width="120"
|
||||
class-name="small-padding"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
<el-table v-loading="loading" :data="diseaseList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="编码" align="center" key="conditionCode" prop="conditionCode" />
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="疾病分类"
|
||||
align="center"
|
||||
key="sourceEnum_enumText"
|
||||
prop="sourceEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="拼音助记码"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="typeCode_dictText"
|
||||
prop="typeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保编码 "
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保对码标志"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag_enumText"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="描述"
|
||||
align="center"
|
||||
key="description"
|
||||
prop="description"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
@@ -211,7 +226,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeCode">
|
||||
<el-form-item label="诊断类型" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in condition_type_code"
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in chrgitm_lv"
|
||||
:key="dict.value"
|
||||
@@ -97,6 +98,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="69码" prop="drug69Code">
|
||||
<el-input v-model="form.drug69Code" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">临床信息</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
@@ -113,11 +121,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input
|
||||
v-model="form.totalVolume"
|
||||
placeholder=""
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="form.totalVolume" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -452,7 +456,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -613,14 +617,15 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="DDD值" prop="dddCode">
|
||||
<el-select v-model="antibioticForm.dddCode" clearable>
|
||||
<!-- <el-select v-model="antibioticForm.dddCode" clearable>
|
||||
<el-option
|
||||
v-for="category in ddd_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="antibioticForm.dddCode" placeholder="请输入dddCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -860,18 +865,13 @@ function setValue(row) {
|
||||
approvalNumber: formatValue(row.approvalNo), // 批准文号
|
||||
manufacturerText: formatValue(row.manufacturerName), // 生产厂家
|
||||
basicFlag: formatValue(row.essentialDrugFlag), // 基药标识
|
||||
// injectFlag: row., // 注射药物
|
||||
// childrenFlag: row.pediatricUse, // 儿童用药标志
|
||||
// selfFlag: row., // 自制药标识
|
||||
// activeFlag: row., // 是否活性
|
||||
restrictedFlag: formatValue(row.restrictedFlag), // 限制使用
|
||||
restrictedScope: formatValue(row.restrictedScope), // 限制使用范围
|
||||
rxFlag: formatValue(row.rxFlag), // 处方标志
|
||||
chrgitmLv: formatValue(
|
||||
row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||
), // 医保等级
|
||||
// antibioticFlag: row., // 抗生素
|
||||
};
|
||||
};
|
||||
setFlag(form.value);
|
||||
}
|
||||
|
||||
@@ -888,8 +888,6 @@ function formatValue(str) {
|
||||
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// getList();
|
||||
console.log(props, '22222');
|
||||
title.value = '编辑药品';
|
||||
reset();
|
||||
activeName.value = 'basic';
|
||||
@@ -946,13 +944,10 @@ function setFlag(data) {
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
medicineCode: '',
|
||||
medicineName: '',
|
||||
tradeName: '',
|
||||
spec: '',
|
||||
manufacturer: '',
|
||||
rxFlag: '0', // 默认设置为非处方
|
||||
dose: undefined,
|
||||
medicationDefId: undefined,
|
||||
locationId: undefined,
|
||||
activeFlag: undefined,
|
||||
doseFrom: undefined,
|
||||
rateCode: undefined,
|
||||
approvalNumber: undefined,
|
||||
name: undefined,
|
||||
@@ -998,7 +993,8 @@ function reset() {
|
||||
thoPartAttributeEnum: undefined,
|
||||
usageLimit: undefined,
|
||||
basicFlag: undefined,
|
||||
chrgitmLv: '3',
|
||||
rxFlag: undefined,
|
||||
chrgitmLv: '3', // 默认设置为自费
|
||||
};
|
||||
antibioticForm.value = {
|
||||
antibioticCode: undefined,
|
||||
@@ -1045,10 +1041,9 @@ function submitForm() {
|
||||
|
||||
proxy.$refs['medicationRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 处理抗生素相关字段
|
||||
if (form.value.activeFlag == 1) {
|
||||
form.value.antibioticCode = antibioticForm.value.antibioticCode === undefined ? '3' : antibioticForm.value.antibioticCode;
|
||||
form.value.restrictedEnum = antibioticForm.value.restrictedEnum === undefined ? '4' : antibioticForm.value.restrictedEnum;
|
||||
if (form.value.activeFlag == true) {
|
||||
form.value.antibioticCode = antibioticForm.value.antibioticCode;
|
||||
form.value.restrictedEnum = antibioticForm.value.restrictedEnum;
|
||||
form.value.minRateCode = antibioticForm.value.minRateCode;
|
||||
form.value.maxRateCode = antibioticForm.value.maxRateCode;
|
||||
form.value.dddUnitCode = antibioticForm.value.dddUnitCode;
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
:show-overflow-tooltip="true"
|
||||
min-width="110"
|
||||
width="200px"
|
||||
sortable
|
||||
:sort-by="(row) => getPinyinFirstLetter(row)"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
@@ -217,6 +219,13 @@
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="69码"
|
||||
align="center"
|
||||
key="drug69Code"
|
||||
prop="drug69Code"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="医保上传"
|
||||
align="center"
|
||||
@@ -588,6 +597,12 @@ function submitForm(formData) {
|
||||
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
|
||||
// 药品名称按照第一个汉字首字母排序
|
||||
function getPinyinFirstLetter(row) {
|
||||
const firstChar = row.merchandisePyStr.charAt(0);
|
||||
return firstChar.toUpperCase();
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
|
||||
@@ -129,4 +129,25 @@ export function getChargeInfo(param) {
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function wxPay (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-query'+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,18 +31,23 @@
|
||||
<template v-for="(item, index) in formData.selfPay" :key="index">
|
||||
<div v-show="item.payEnum != 220500" class="payment-item">
|
||||
<span>支付方式:</span>
|
||||
<img
|
||||
v-if="item.payEnum == 220100 || item.payEnum == 220200"
|
||||
:src="imgs[item.payEnum == 220100 ? 0 : 1]"
|
||||
style="width: 20px; height: 20px"
|
||||
/>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
@change="(value) => clearAmount(index, value)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
@@ -94,6 +99,17 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
<el-table-column prop="payEnumText" label="支付类型" align="center" />
|
||||
@@ -137,14 +153,25 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables, getChargeInfo } from './api';
|
||||
import {
|
||||
savePayment,
|
||||
unprecharge,
|
||||
dispenseMedicalConsumables,
|
||||
wxPay,
|
||||
WxPayResult,
|
||||
getChargeInfo,
|
||||
} from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import templateJson from './template.json';
|
||||
|
||||
import { pa } from 'element-plus/es/locales.mjs';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import image1 from '../../../../assets/images/weixinzhifu.png';
|
||||
import image2 from '../../../../assets/images/zhifubaozhifu.png';
|
||||
const imgs = ref([image1, image2]);
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -168,34 +195,37 @@ const props = defineProps({
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
consumablesIdList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargedItems: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { charge_discount } = proxy.useDict('charge_discount');
|
||||
// 单位字典
|
||||
const { unit_code } = proxy.useDict('unit_code');
|
||||
|
||||
const userStore = useUserStore();
|
||||
const discountRadio = ref(undefined);
|
||||
const discountRadio = ref();
|
||||
const discountAmount = ref(0);
|
||||
const txtCode = ref('');
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -219,121 +249,363 @@ watch(
|
||||
const emit = defineEmits(['close']);
|
||||
let displayAmountTemp = 0;
|
||||
|
||||
// 打印小票
|
||||
function printReceipt(param) {
|
||||
let total = 0;
|
||||
props.chargedItems.forEach((item) => {
|
||||
total += item.totalPrice || 0;
|
||||
});
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 100000)?.amount.toFixed(2) + ' 元' ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
// 获取单位字典数据的方法
|
||||
const getUnitLabel = (unitCode) => {
|
||||
if (!unitCode) return '';
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 110000)?.amount.toFixed(2) + ' 元' ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 120000)?.amount.toFixed(2) + ' 元' ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 130000)?.amount.toFixed(2) + ' 元' ?? 0, // 医疗救助基金支出
|
||||
// YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
// 从已加载的 unit_code 字典中查找对应项
|
||||
const unit = unit_code.value?.find((item) => item.value === unitCode);
|
||||
return unit ? unit.label : ''; // 如果找不到则返回空字符串
|
||||
};
|
||||
|
||||
// 职工基本医疗保险
|
||||
// YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
// YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
async function printReceipt(param) {
|
||||
// 打印收费小票数据
|
||||
console.log('打印收费小票数据:', param.chargeItem);
|
||||
// console.log('!!!!!!!!!选中的收费项目:', param.chargedItems);
|
||||
console.log('患者信息:', props.patientInfo);
|
||||
// formData.totalAmount = props.totalAmount;
|
||||
// 确保第一个支付方式的金额与总金额一致;
|
||||
if (formData.selfPay.length > 0) {
|
||||
formData.selfPay[0].amount = props.totalAmount;
|
||||
}
|
||||
formData.selfPay = [
|
||||
{
|
||||
payEnum: 220100, // 现金支付
|
||||
amount: props.totalAmount,
|
||||
payLevelEnum: 2,
|
||||
},
|
||||
];
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
// YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
// YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
// YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
// YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
try {
|
||||
// 处理param.chargedItems,添加quantityWithUnit字段
|
||||
const processedChargeItems = (param.chargeItem || []).map((item) => {
|
||||
// 获取单位标签
|
||||
const unitLabel = getUnitLabel(item.quantityUnit);
|
||||
// 拼接数量和单位
|
||||
const quantityWithUnit = unitLabel
|
||||
? `${item.quantityValue} ${unitLabel}`
|
||||
: item.quantityValue;
|
||||
|
||||
// 其他支出细分
|
||||
// OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
// OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
// OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
// OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
// OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
// OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
// OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
// OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
// OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
// OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
// HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
return {
|
||||
...item,
|
||||
quantityWithUnit, // 添加带单位的数量字段供打印使用
|
||||
};
|
||||
});
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT:
|
||||
param.detail?.find((t) => t.payEnum === 1)?.amount.toFixed(2) + ' 元' ?? 0, // 全自费金额
|
||||
// OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
// PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail?.find((t) => t.payEnum === 5)?.amount.toFixed(2) + ' 元' ?? 0, // 符合政策范围金额
|
||||
// ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
// POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
// BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
// 构造打印数据,整合选中行信息
|
||||
const printData = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 210000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人医保账户支付
|
||||
// SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
// SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
// SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
// SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
// 收费项目列表
|
||||
chargeItemsList: processedChargeItems,
|
||||
// chargeItemsList: param.chargeItem,
|
||||
|
||||
// 现金支付细分
|
||||
// SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
// SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
// SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
// SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// 基础支付类型
|
||||
|
||||
// 基金类型(扩展)
|
||||
// BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
// RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
// URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
// URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
// MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
// GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
// ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
// CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
// FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
// HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
// SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
// HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
itemTotalAmount: total.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmountTemp + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
};
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// 金额大于0时显示金额和单位,等于0时不显示单位
|
||||
YB_FUND_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基金支付总额
|
||||
SELF_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人负担总金额
|
||||
OTHER_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 其他(如医院负担金额)
|
||||
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
printer: 'xp',
|
||||
title: '门诊收费结算单',
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 居民基本医疗保险
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 1)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 全自费金额
|
||||
OVERLMT_SELFPAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 3)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 超限价自费费用
|
||||
PRESELFPAY_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 4)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 先行自付金额
|
||||
INSCP_SCP_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 5)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 符合政策范围金额
|
||||
ACT_PAY_DEDC: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 6)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 7)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基本医疗保险统筹基金支付比例
|
||||
BALC: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 8)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 账户共济支付金额
|
||||
SELF_CASH_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额
|
||||
SELF_VX_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 微信支付金额
|
||||
SELF_ALI_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 生育基金
|
||||
RETIREE_MEDICAL: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 意外伤害基金
|
||||
CARE_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 照护保险基金
|
||||
FINANCIAL_FUND: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政基金
|
||||
HOSPITAL_ADVANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 保健预支基金
|
||||
//微信刷卡支付
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return vxValue + unionValue + aliValue + ' 元';
|
||||
})(),
|
||||
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo?.genderEnum_enumText || '',
|
||||
age: props.patientInfo?.age || '',
|
||||
|
||||
personType: param.contractName,
|
||||
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
|
||||
//电子收据二维码
|
||||
pictureUrl: param.pictureUrl || 'https://chinaebill.com/img/xiaochengxu.png',
|
||||
|
||||
// 添加本地患者信息,注意安全访问
|
||||
name: props.patientInfo?.patientName || '',
|
||||
gender: props.patientInfo?.genderEnum_enumText || '',
|
||||
encounterBusNo: props.patientInfo?.encounterBusNo || '',
|
||||
currentDate: currentDate.value,
|
||||
// chargedItems: props.chargedItems,
|
||||
// 优先使用选中行的金额字段值(从图片中获取)
|
||||
totalAmount:
|
||||
(param.selectedRow?.receivableAmount
|
||||
? param.selectedRow.receivableAmount.toFixed(2)
|
||||
: props.totalAmount.toFixed(2)) + ' 元',
|
||||
displayAmount:
|
||||
(param.selectedRow?.receivedAmount
|
||||
? param.selectedRow.receivedAmount.toFixed(2)
|
||||
: displayAmount.value) + ' 元',
|
||||
returnedAmount: returnedAmount.value + ' 元',
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// 使用printUtils进行打印
|
||||
// 选择门诊收费打印模板并传递正确的数据格式
|
||||
console.log('789797987897', printData.data[0]);
|
||||
await printUtils.print(PRINT_TEMPLATE.OUTPATIENT_CHARGE, printData.data[0]);
|
||||
|
||||
console.log('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
proxy.$modal.msgError('打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
|
||||
function handleWxPay() {
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
formData.totalAmount = props.totalAmount;
|
||||
@@ -342,8 +614,6 @@ function handleOpen() {
|
||||
|
||||
async function submit() {
|
||||
displayAmountTemp = displayAmount.value;
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
|
||||
let amount = formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
@@ -366,12 +636,13 @@ async function submit() {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
getChargeInfo({ paymentId: props.paymentId }).then((res) => {
|
||||
printReceipt(res.data);
|
||||
// 传递完整的选中数据信息到打印方法
|
||||
printReceipt({ ...res.data, chargedItems: props.chargedItems });
|
||||
});
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success', res.msg);
|
||||
emit('refresh'); // 发送刷新事件给父组件
|
||||
// 长春大学自动发耗材
|
||||
// 长春市朝阳区中医院自动发耗材
|
||||
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
|
||||
dispenseMedicalConsumables(props.consumablesIdList);
|
||||
}
|
||||
@@ -422,11 +693,11 @@ async function print() {
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '优惠', value: 220500 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
{ label: '优惠', value: 220500, isWebPay: false },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -459,8 +730,25 @@ function handleDiscountChange(value) {
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
@@ -478,8 +766,18 @@ const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index, value) => {
|
||||
const selectedOption = selfPayMethods.find((item) => item.value === value);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
|
||||
@@ -430,4 +430,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,18 +83,36 @@
|
||||
:disabled="buttonDisabled">
|
||||
自费转医保
|
||||
</el-button>
|
||||
<el-button type="primary" @click="studentPayTosStudentSelf()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentPayTosStudentSelf()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生医保转学生自费
|
||||
</el-button>
|
||||
<el-button type="primary" @click="studentSelfToStudentPay()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentSelfToStudentPay()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生自费转学生医保
|
||||
</el-button>
|
||||
<span style="float: right">合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span>
|
||||
<span style="float: right"
|
||||
>合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span
|
||||
>
|
||||
</div>
|
||||
<el-table ref="chargeListRef" height="530" :data="chargeList" row-key="id"
|
||||
@selection-change="handleSelectionChange" v-loading="chargeLoading" :span-method="objectSpanMethod" border>
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="530"
|
||||
:data="chargeList"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
|
||||
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
|
||||
@@ -104,7 +122,16 @@
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.statusEnum === 1 ? 'default' : 'success'" disable-transitions>
|
||||
<el-tag v-if="scope.row.statusEnum === 1" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 5" type="success" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 8" type="danger" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -115,9 +142,20 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<el-table-column label="操作" align="center" fixed="right" header-align="center" class-name="no-hover-column">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button :disabled="!scope.row.paymentId" link type="primary" @click="printCharge(scope.row)">
|
||||
<el-button
|
||||
:disabled="!scope.row.paymentId"
|
||||
link
|
||||
type="primary"
|
||||
@click="printCharge(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -127,6 +165,7 @@
|
||||
</div>
|
||||
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
@@ -158,7 +197,7 @@ import {
|
||||
changeStudentPayTosStudentSelf,
|
||||
changeStudentSelfToStudentPay,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import { invokeYbPlugin5000, invokeYbPlugin5001 } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
@@ -228,7 +267,6 @@ function handleTotalAmount() {
|
||||
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, new Decimal(0));
|
||||
|
||||
} else {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
@@ -298,7 +336,6 @@ const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
console.log('selectRows:', selectRows);
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
@@ -315,6 +352,9 @@ function confirmCharge() {
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// 将选中的行数据赋值给chargedItems
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
// }, 0);
|
||||
@@ -364,7 +404,7 @@ async function handleReadCard(value) {
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await invokeYbPlugin({
|
||||
await invokeYbPlugin5000({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
@@ -386,7 +426,7 @@ async function handleReadCard(value) {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
let message = JSON.parse(cardInfo.data);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
@@ -406,7 +446,7 @@ async function handleReadCard(value) {
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
await invokeYbPlugin5001(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
@@ -583,6 +623,19 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// function printCharge(row) {
|
||||
// // 打印功能实现
|
||||
// let rows = [];
|
||||
// chargeList.value.forEach((item, index) => {
|
||||
// if (item.paymentId === row.paymentId) {
|
||||
// rows.push(item);
|
||||
// }
|
||||
// });
|
||||
// chargedItems.value = rows;
|
||||
// getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
// proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
// });
|
||||
// }
|
||||
function printCharge(row) {
|
||||
// 打印功能实现
|
||||
let rows = [];
|
||||
@@ -593,7 +646,37 @@ function printCharge(row) {
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
// 设置实收金额
|
||||
if (res.data && res.data.detail) {
|
||||
const amountDetail = res.data.detail.find((item) => item.payEnum == 220000);
|
||||
if (amountDetail) {
|
||||
totalAmount.value = amountDetail.amount;
|
||||
|
||||
// 为合并的行设置金额相关字段值
|
||||
rows.forEach((item) => {
|
||||
if (item.actualPrice === undefined || item.actualPrice === null) {
|
||||
item.actualPrice = 0;
|
||||
}
|
||||
if (item.discountAmount === undefined || item.discountAmount === null) {
|
||||
item.discountAmount = 0;
|
||||
}
|
||||
if (item.discountRate === undefined || item.discountRate === null) {
|
||||
item.discountRate = 100;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 增强打印数据,包含选中行的完整信息
|
||||
const enhancedPrintData = {
|
||||
...res.data,
|
||||
selectedRow: row, // 添加选中行的完整数据
|
||||
chargedItems: rows, // 添加所有相关的收费项目
|
||||
};
|
||||
// 通知子组件更新内部状态
|
||||
// 通过 nextTick 确保 DOM 更新后再调用打印
|
||||
nextTick(() => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(enhancedPrintData);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -605,4 +688,4 @@ function printCharge(row) {
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -197,8 +197,15 @@ const emit = defineEmits(['close']);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
console.log(
|
||||
displayAmount.value,
|
||||
parseFloat(displayAmount.value),
|
||||
formData.totalAmount,
|
||||
formData,
|
||||
'feeRefund'
|
||||
);
|
||||
//比较时,将金额都转换为两位小数的字符串再转换为浮点数,避免浮点数精度问题
|
||||
if (parseFloat(displayAmount.value) < parseFloat(formData.totalAmount.toFixed(2))) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
@@ -255,7 +262,7 @@ function submit() {
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 长春大学自动退耗材
|
||||
// 长春市朝阳区中医院自动退耗材
|
||||
|
||||
emit('close', 'success');
|
||||
}
|
||||
@@ -457,4 +464,4 @@ const getFeeTypeText = computed(() => {
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -139,16 +139,6 @@
|
||||
prop="chargeStatus_enumText"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="发药/执行状态"
|
||||
align="center"
|
||||
prop="dispenseStatus_enumText"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.dispenseStatus_enumText || scope.row.serviceStatus_enumText }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantityValue + ' ' + scope.row.quantityUnit_dictText }}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<el-dialog title="确认收费" v-model="props.open" width="700px" append-to-body destroy-on-close>
|
||||
<el-dialog
|
||||
title="确认收费"
|
||||
v-model="props.open"
|
||||
@close="close"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
收费日期:{{ currentDate }}
|
||||
@@ -27,7 +34,7 @@
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
@@ -66,6 +73,17 @@
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
@@ -90,12 +108,13 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { savePayment } from './outpatientregistration';
|
||||
import { savePayment, wxPay, WxPayResult } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
|
||||
// 获取费用性质文本
|
||||
const getFeeTypeText = computed(() => {
|
||||
@@ -147,18 +166,19 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
medfee_paymtd_code: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
feeType: {
|
||||
orgId: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
orgName: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogLoading = ref(false);
|
||||
const txtCode = ref('');
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -182,114 +202,231 @@ watch(
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
// 根据printUtils实现的打印方法
|
||||
async function printReceipt(param) {
|
||||
console.log(param, 'param');
|
||||
console.log(props.patientInfo, 'props.patientInfo');
|
||||
console.log('打印收费小票数据:', param);
|
||||
console.log('患者信息:', props.patientInfo);
|
||||
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
try {
|
||||
// 构造打印数据
|
||||
const printData = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
// 医保结算返回值 - 修复运算符优先级问题,添加括号确保正确拼接'元'
|
||||
FULAMT_OWNPAY_AMT: (param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0) + '元', // 全自费金额
|
||||
OVERLMT_SELFPAY: (param.detail?.find((t) => t.payEnum === 3)?.amount ?? 0) + '元', // 超限价自费费用
|
||||
PRESELFPAY_AMT: (param.detail?.find((t) => t.payEnum === 4)?.amount ?? 0) + '元', // 先行自付金额
|
||||
INSCP_SCP_AMT: (param.detail?.find((t) => t.payEnum === 5)?.amount ?? 0) + '元', // 符合政策范围金额
|
||||
ACT_PAY_DEDC: (param.detail?.find((t) => t.payEnum === 6)?.amount ?? 0) + '元', // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: (param.detail?.find((t) => t.payEnum === 7)?.amount ?? 0) + '元', // 基本医疗保险统筹基金支付比例
|
||||
BALC: (param.detail?.find((t) => t.payEnum === 8)?.amount ?? 0) + '元', // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0) + '元'
|
||||
: '', // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0) + '元'
|
||||
: '', // 账户共济支付金额
|
||||
SELF_CASH_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额
|
||||
SELF_VX_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0) + '元'
|
||||
: '', // 微信支付金额
|
||||
SELF_ALI_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0) + '元'
|
||||
: '', // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND:
|
||||
(param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0) + '元'
|
||||
: '', // 生育基金
|
||||
RETIREE_MEDICAL:
|
||||
(param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0) + '元'
|
||||
: '', // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL:
|
||||
(param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS:
|
||||
(param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0) + '元'
|
||||
: '', // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY:
|
||||
(param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0) + '元'
|
||||
: '', // 政府兜底基金
|
||||
ACCIDENT_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0) + '元'
|
||||
: '', // 意外伤害基金
|
||||
CARE_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0) + '元'
|
||||
: '', // 照护保险基金
|
||||
FINANCIAL_FUND:
|
||||
(param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0) + '元'
|
||||
: '', // 财政基金
|
||||
HOSPITAL_ADVANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0) + '元'
|
||||
: '', // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT:
|
||||
(param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0) + '元'
|
||||
: '', // 保健预支基金
|
||||
//微信刷卡支付
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return vxValue + unionValue + aliValue + '元';
|
||||
})(),
|
||||
|
||||
// 患者信息
|
||||
patientName: param.patientName || '',
|
||||
sex: param.sex === 1 ? '女' : param.sex === 0 ? '男' : param.sex || '',
|
||||
age: param.age ? param.age + '岁' : '',
|
||||
personType: param.contractName, //病人类型
|
||||
|
||||
// 挂号和就诊信息
|
||||
encounterId: props.patientInfo?.encounterId || '',
|
||||
busNo: props.patientInfo?.busNo || '',
|
||||
Mr_QR_Code: param.regNo || props.registerBusNo,
|
||||
// 科室和医生信息
|
||||
organizationName: props.orgName || props.patientInfo?.organizationName || '',
|
||||
practitionerName: props.patientInfo?.practitionerName || '',
|
||||
healthcareName: props.patientInfo?.healthcareName || '',
|
||||
// 费用信息
|
||||
fixmedinsName: param.fixmedinsName
|
||||
? param.fixmedinsName + '门诊收费明细'
|
||||
: '门诊收费明细',
|
||||
// 收费员
|
||||
cashier: param.paymentEmployee,
|
||||
|
||||
// 收费时间
|
||||
chargeTime: new Date().toLocaleString(),
|
||||
//电子收据二维码
|
||||
pictureUrl: param.pictureUrl || 'https://chinaebill.com/img/xiaochengxu.png',
|
||||
},
|
||||
],
|
||||
};
|
||||
// 选择门诊挂号打印模板
|
||||
console.log('printDataprintDataprintDataprintDataprintData', printData.data[0]);
|
||||
await printUtils.print(PRINT_TEMPLATE.OUTPATIENT_REGISTRATION, printData.data[0]);
|
||||
console.log('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
proxy.$modal.msgError('打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
function handleWxPay() {
|
||||
console.log('开始微信支付,当前支付详情:', formData.selfPay);
|
||||
console.log(
|
||||
'支付金额详情:',
|
||||
formData.selfPay.map((item) => ({ payEnum: item.payEnum, amount: item.amount }))
|
||||
);
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
//chargeItemIds: props.chargeItemIds,
|
||||
//encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
// ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
// busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
})
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
console.log('微信支付请求成功:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
console.error('微信支付请求失败:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
@@ -311,8 +448,8 @@ function submit() {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
printReceipt(res.data);
|
||||
(formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]),
|
||||
emit('close', 'success');
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success');
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -323,10 +460,10 @@ function submit() {
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -349,10 +486,27 @@ const getMax = (index) => {
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
debugger;
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
@@ -367,9 +521,21 @@ const addPayment = () => {
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const selectedOption = selfPayMethods.find(
|
||||
(item) => item.value === formData.selfPay[index].payEnum
|
||||
);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
@@ -387,6 +553,8 @@ const returnedAmount = computed(() => {
|
||||
});
|
||||
|
||||
function close() {
|
||||
//清空表单数据
|
||||
txtCode.value = '';
|
||||
emit('close', 'cancel');
|
||||
}
|
||||
</script>
|
||||
@@ -486,4 +654,4 @@ function close() {
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
import request from '@/utils/request';
|
||||
import { parseStrEmpty } from '@/utils/openhis';
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者信息
|
||||
@@ -14,16 +14,16 @@ export function getOutpatientRegistrationList(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/patient-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询费用性质
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询诊断信息
|
||||
@@ -31,8 +31,8 @@ export function getConditionDefinitionMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// // 查询就诊位置
|
||||
@@ -49,8 +49,8 @@ export function getLocationTree(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/org-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据位置id筛选医生
|
||||
@@ -58,8 +58,8 @@ export function getPractitionerMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/practitioner-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据机构id筛选服务项目
|
||||
@@ -67,8 +67,17 @@ export function getHealthcareMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/healthcare-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新患者手机号
|
||||
export function updatePatientPhone(data) {
|
||||
return request({
|
||||
url: '/patient-manage/information/update-patient-phone',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 门诊挂号查询
|
||||
@@ -76,8 +85,8 @@ export function getOutpatientRegistrationCurrent(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/current-day-encounter',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增门诊挂号信息
|
||||
@@ -85,8 +94,8 @@ export function addOutpatientRegistration(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pre-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增病人信息
|
||||
@@ -94,83 +103,79 @@ export function addPatient(data) {
|
||||
return request({
|
||||
url: '/patient-manage/information/patient-information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function listmaritalstatus() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-maritalstatus',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listoccupationtype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-occupationtype',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function lisadministrativegender() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-administrativegender',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listbloodtypeabo() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypeabo',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function listbloodtypearh() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypearh',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listfamilyrelationshiptype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 患者退号
|
||||
export function returnRegister(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
// 患者退号
|
||||
export function returnRegister(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return?encounterId=' + encounterId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
*/
|
||||
@@ -178,8 +183,8 @@ export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,8 +194,20 @@ export function refund(data) {
|
||||
return request({
|
||||
url: '/payment/payment/uncharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 退费预检(挂号预取消)
|
||||
* GET /payment/payment/pre-cancel-reg?encounterId=xxx
|
||||
*/
|
||||
export function preCancelReg(encounterId) {
|
||||
return request({
|
||||
url: '/payment/payment/pre-cancel-reg',
|
||||
method: 'get',
|
||||
params: { encounterId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,8 +217,8 @@ export function cancelRegister(data) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,24 +228,30 @@ export function gerPreInfo(userMaessage) {
|
||||
return request({
|
||||
url: '/yb-request/per-info',
|
||||
method: 'post',
|
||||
params: userMaessage
|
||||
})
|
||||
params: userMaessage,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据就诊卡号查询挂号记录
|
||||
* 注意:此接口可能不存在,实际使用getOutpatientRegistrationCurrent接口
|
||||
* 保留此函数以便将来使用,目前使用getOutpatientRegistrationCurrent替代
|
||||
* 微信支付
|
||||
*/
|
||||
export function getRegistrationByCardNo(query) {
|
||||
// 如果后端提供了专门的接口,可以取消注释使用
|
||||
// return request({
|
||||
// url: '/charge-manage/register/encounter-by-card',
|
||||
// method: 'get',
|
||||
// params: query
|
||||
// })
|
||||
// 暂时使用现有的接口
|
||||
return getOutpatientRegistrationCurrent(query);
|
||||
export function wxPay(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-query',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -238,6 +261,6 @@ export function reprintRegistration(data) {
|
||||
return request({
|
||||
url: '/charge-manage/register/reprint',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,8 +10,58 @@
|
||||
<el-input v-model="form.name" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="民族" prop="nationalityCode" label-width="80px">
|
||||
<el-col :span="8">
|
||||
<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="8">
|
||||
<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="8">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="证件类型" prop="typeCode">
|
||||
<el-select
|
||||
v-model="form.typeCode"
|
||||
placeholder="证件类型"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
@change="typeChange"
|
||||
>
|
||||
<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="8">
|
||||
<el-form-item label="身份证号码" prop="idCard">
|
||||
<el-input v-model="form.idCard" clearable :disabled="isViewMode" @blur="onBlur" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="民族" prop="nationalityCode">
|
||||
<el-select v-model="form.nationalityCode" clearable filterable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in nationality_code"
|
||||
@@ -50,83 +100,23 @@
|
||||
|
||||
<!-- 第二行:证件类别、证件号码、*年龄 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件类别" prop="typeCode" label-width="80px">
|
||||
<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="8">
|
||||
<el-form-item label="证件号码" prop="idCard" label-width="80px">
|
||||
<el-input v-model="form.idCard" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="年龄" prop="age" label-width="80px">
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="handleAgeInput"
|
||||
placeholder="请输入龄"
|
||||
>
|
||||
<template #suffix>岁</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 第三行:国籍、*联系方式、工作单位 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="国籍" prop="countryCode" label-width="80px">
|
||||
<el-select v-model="form.countryCode" placeholder="请选择国籍" clearable filterable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in countryCodeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="phone" label-width="80px">
|
||||
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出生日期" prop="birthDate">
|
||||
<el-date-picker
|
||||
v-model="form.birthDate"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"
|
||||
format="YYYY年MM月DD日"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleBirthDateChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 第三行:就诊卡号、职业、邮政编码 -->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="就诊卡号" prop="identifierNo">
|
||||
<el-input v-model="form.identifierNo" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="国家编码" prop="countryCode">
|
||||
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
|
||||
</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="8">
|
||||
<el-form-item label="职业" prop="prfsEnum">
|
||||
<el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode">
|
||||
@@ -350,10 +340,16 @@
|
||||
</template>
|
||||
|
||||
<script setup name="PatientAddDialog">
|
||||
import { watch, defineProps } from "vue";
|
||||
import { watch } from 'vue';
|
||||
import pcas from 'china-division/dist/pcas-code.json';
|
||||
import { addPatient, patientlLists, getOutpatientRegistrationList } from './outpatientregistration';
|
||||
import {
|
||||
isValidCNPhoneNumber,
|
||||
isValidCNidCardNumber,
|
||||
getGenderAndAge,
|
||||
} from '../../../../utils/validate';
|
||||
import { fromPairs } from 'lodash';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
@@ -606,15 +602,9 @@ const validateGuardianInfo = (rule, value, callback) => {
|
||||
const data = reactive({
|
||||
isViewMode: false,
|
||||
form: {
|
||||
typeCode: '08',
|
||||
birthDate: undefined,
|
||||
age: undefined,
|
||||
genderEnum: '1', // 默认设置为'男'
|
||||
hukouAddressSelect: undefined,
|
||||
hukouAddress: undefined,
|
||||
postalCode: undefined,
|
||||
companyAddress: undefined,
|
||||
patientDerived: undefined,
|
||||
typeCode: '01',
|
||||
tempFlag: '1',
|
||||
// genderEnum: 0,
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' },
|
||||
@@ -631,18 +621,7 @@ const data = reactive({
|
||||
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
||||
identifierNo: [{ required: true, message: '就诊卡号不能为空', trigger: 'change' }],
|
||||
idCard: [
|
||||
{ required: false, message: '证件号码不能为空', trigger: 'change' },
|
||||
{ validator: validateIdCard, trigger: 'blur' },
|
||||
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||
],
|
||||
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' }],
|
||||
idCard: [{ required: true, message: '证件号不能为空', trigger: 'change' }],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -664,74 +643,30 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
// 处理出生日期变化,自动计算年龄
|
||||
function handleBirthDateChange() {
|
||||
if (form.value.birthDate) {
|
||||
const birthDate = new Date(form.value.birthDate);
|
||||
const today = new Date();
|
||||
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
|
||||
// 计算精确年龄
|
||||
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
}
|
||||
}
|
||||
// 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));
|
||||
|
||||
// 处理年龄输入,自动计算出生日期
|
||||
function handleAgeInput() {
|
||||
// 提取数字部分
|
||||
const ageMatch = form.value.age.match(/\d+/);
|
||||
if (ageMatch) {
|
||||
const age = parseInt(ageMatch[0]);
|
||||
// 移除非数字字符,保留数字和可能的单位
|
||||
form.value.age = age ;
|
||||
|
||||
// 计算出生日期
|
||||
const today = new Date();
|
||||
const birthYear = today.getFullYear() - age;
|
||||
const birthMonth = today.getMonth();
|
||||
const birthDay = today.getDate();
|
||||
|
||||
const birthDate = new Date(birthYear, birthMonth, birthDay);
|
||||
|
||||
// 格式化为YYYY-MM-DD
|
||||
const formattedBirthDate = birthDate.toISOString().split('T')[0];
|
||||
form.value.birthDate = formattedBirthDate;
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
// 设置出生日期
|
||||
form.value.birthDate = `${birthYear}-${birthMonth.toString().padStart(2, '0')}-${birthDay.toString().padStart(2, '0')}`;
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
const currentDay = today.getDate();
|
||||
// let age = currentYear - birthYear;
|
||||
|
||||
let age = currentYear - birthYear;
|
||||
// // 如果当前月份小于出生月份,或者月份相同但当前日期小于出生日期,则年龄减1
|
||||
// if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
||||
// age--;
|
||||
// }
|
||||
|
||||
// 如果当前月份小于出生月份,或者月份相同但当前日期小于出生日期,则年龄减1
|
||||
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
|
||||
form.value.age = age ;
|
||||
}
|
||||
}
|
||||
);
|
||||
// form.value.age = age;
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
/** 查询菜单列表 */
|
||||
function getList() {
|
||||
patientlLists().then((response) => {
|
||||
@@ -742,6 +677,7 @@ function getList() {
|
||||
bloodtypearhList.value = response.data.bloodTypeRH;
|
||||
familyrelationshiptypeList.value = response.data.familyRelationshipType;
|
||||
maritalstatusList.value = response.data.maritalStatus;
|
||||
console.log('administrativegenderList======>', JSON.stringify(administrativegenderList.value));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1217,7 +1153,7 @@ function reset() {
|
||||
menuName: undefined,
|
||||
age: undefined,
|
||||
genderEnum: undefined,
|
||||
typeCode: '08',
|
||||
typeCode: '01',
|
||||
idCard: undefined,
|
||||
phone: undefined,
|
||||
prfsEnum: undefined,
|
||||
@@ -1245,14 +1181,45 @@ function reset() {
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (!isValidCNPhoneNumber(form.value.phone)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '手机号有误,请重新输入',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (form.value.typeCode === '01') {
|
||||
if (!isValidCNidCardNumber(form.value.idCard)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '身份证号有误,请重新输入',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 活动标识 2 启用 3 停用
|
||||
if (form.value.tempFlag == '1') {
|
||||
form.value.activeFlag = 2;
|
||||
} else {
|
||||
form.value.activeFlag = 3;
|
||||
}
|
||||
form.value.patientIdInfoList = [
|
||||
{
|
||||
typeCode: form.value.typeCode,
|
||||
},
|
||||
];
|
||||
if (form.value.idCard) {
|
||||
form.value.birthDate =
|
||||
form.value.idCard.toString().substring(6, 10) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(10, 12) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(12, 14);
|
||||
console.log(form.value.birthDate, 123);
|
||||
if (form.value.typeCode === '01') {
|
||||
form.value.birthDate =
|
||||
form.value.idCard.toString().substring(6, 10) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(10, 12) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(12, 14);
|
||||
console.log(form.value.birthDate, 123);
|
||||
} else {
|
||||
form.value.birthDate = undefined;
|
||||
}
|
||||
}
|
||||
// 进行表单验证
|
||||
proxy.$refs['patientRef'].validate((valid) => {
|
||||
@@ -1293,6 +1260,22 @@ function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
// 身份证号失去焦点获取年龄和性别
|
||||
const onBlur = () => {
|
||||
if (form.value.typeCode === '01') {
|
||||
const info = getGenderAndAge(form.value.idCard || '');
|
||||
form.value.age = info.age;
|
||||
form.value.genderEnum = info.gender;
|
||||
}
|
||||
};
|
||||
//切换证件类型
|
||||
const typeChange = () => {
|
||||
if (form.value.typeCode === '01') {
|
||||
const info = getGenderAndAge(form.value.idCard || '');
|
||||
form.value.age = info.age;
|
||||
form.value.genderEnum = info.gender;
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
|
||||
@@ -1,63 +1,46 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="确认退费"
|
||||
:title="eventType == '1' ? '确认退费' : '挂号详情'"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
退费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ getFeeTypeText }}</el-text>
|
||||
<el-text size="large">费用性质:{{ props.category || '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应退金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.toFixed(2) + ' 元' }}
|
||||
{{ (calculatedTotalAmount || 0) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
<div class="amount-row" v-if="calculatedReturnAmount > 0">
|
||||
<el-text size="large">退费金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ (calculatedReturnAmount || 0) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<!-- 退费方式列表(从接口数据中筛选) -->
|
||||
<div class="payment-container">
|
||||
<div v-for="(item, index) in formData.selfPay" :key="index" class="payment-item">
|
||||
<div v-for="(item, index) in refundMethodsFromApi" :key="index" class="payment-item">
|
||||
<span>退费方式:</span>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择退费方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input :value="getPayMethodLabel(item.payEnum)" readonly style="width: 160px" />
|
||||
<span>退费金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:model-value="(Number(item.amount) || 0) - (Number(item.returnAmount) || 0)"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
disabled
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
</div>
|
||||
<div class="payment-container" style="position: relative">
|
||||
<span style="position: absolute; top: 5px">退费原因:</span>
|
||||
@@ -67,29 +50,27 @@
|
||||
v-model="reason"
|
||||
placeholder="退费原因"
|
||||
class="reason-textarea"
|
||||
@change="handleAmountChange"
|
||||
:disabled="eventType == '1' ? false : true"
|
||||
/>
|
||||
</div>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
<!-- 添加退费方式功能暂时注释 -->
|
||||
<!-- <div class="add-payment">
|
||||
<el-button type="primary" plain @click="addPayment" :disabled="canAddPayment">
|
||||
添加退费方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应退,不可继续添加
|
||||
<el-text v-if="canAddPayment" type="danger" class="tip">
|
||||
退费金额已等于应退金额,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实退合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
<el-text type="success">{{
|
||||
displayAmount > 0 ? displayAmount + ' 元' : props.totalAmount + ' 元'
|
||||
}}</el-text>
|
||||
</div>
|
||||
<!-- <div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
@@ -97,10 +78,32 @@
|
||||
</div> -->
|
||||
</el-space>
|
||||
</div>
|
||||
|
||||
<!-- 退费明细表格 -->
|
||||
<div v-if="preCancelData && preCancelData.length > 0" class="pre-cancel-table-wrapper">
|
||||
<el-table :data="preCancelData" border stripe max-height="300" style="width: 100%">
|
||||
<el-table-column prop="payEnum_dictText" label="支付方式" min-width="200" />
|
||||
<el-table-column prop="amount" label="金额" width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.amount ? Number(row.amount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="returnAmount" label="退费金额" width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.returnAmount ? Number(row.returnAmount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="chargeAmount" label="收费金额" min-width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.chargeAmount ? Number(row.chargeAmount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button v-if="eventType == 1" type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -108,7 +111,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { cancelRegister } from './outpatientregistration';
|
||||
import { cancelRegister, preCancelReg } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
@@ -153,27 +156,16 @@ const props = defineProps({
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
medfee_paymtd_code: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
feeType: {
|
||||
eventType: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: 1,
|
||||
},
|
||||
contractName: {
|
||||
type: String,
|
||||
default: '', // 新增:接收费用性质名称
|
||||
},
|
||||
registerInfo: {
|
||||
type: Object,
|
||||
default: () => ({}), // 原挂号记录信息
|
||||
}
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const reason = ref('');
|
||||
const userStore = useUserStore();
|
||||
const preCancelData = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -195,25 +187,51 @@ watch(
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
watch(
|
||||
() => props.open,
|
||||
async (val) => {
|
||||
if (val && props.patientInfo && props.patientInfo.encounterId) {
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await preCancelReg(props.patientInfo.encounterId);
|
||||
if (res && res.code === 200 && res.data) {
|
||||
preCancelData.value = res.data;
|
||||
// 计算应退金额并更新表单数据
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = res.data
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((total, item) => total + (Number(item.amount) || 0), 0);
|
||||
if (sum > 0) {
|
||||
formData.totalAmount = sum;
|
||||
// 如果第一个退费方式的金额为0或等于原来的totalAmount,则自动填充
|
||||
if (
|
||||
formData.selfPay[0].amount === 0 ||
|
||||
formData.selfPay[0].amount === props.totalAmount
|
||||
) {
|
||||
formData.selfPay[0].amount = sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('pre-cancel-reg error', err);
|
||||
preCancelData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
} else {
|
||||
preCancelData.value = [];
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取当前时间作为退号操作日期
|
||||
const returnDate = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
|
||||
|
||||
// 获取当前用户信息作为操作工号(使用用户管理中的用户账号)
|
||||
// userStore.name 对应后端的 userName(用户账号),如 'admin'
|
||||
const operatorId = userStore.name || null; // 退号操作工号(用户账号)
|
||||
const operatorName = userStore.nickName || userStore.name || ''; // 退号操作人姓名
|
||||
|
||||
// 计算退款总金额
|
||||
const refundAmount = formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
|
||||
|
||||
// if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
// proxy.$modal.msgError('请输入正确的金额');
|
||||
// return;
|
||||
// }
|
||||
cancelRegister({
|
||||
paymentEnum: 0,
|
||||
kindEnum: 1,
|
||||
@@ -254,23 +272,16 @@ const selfPayMethods = [
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
(sum, item, i) => (i !== index ? sum + (Number(item.amount) || 0) : sum),
|
||||
0
|
||||
);
|
||||
const maxAmount = calculatedTotalAmount.value - otherSum;
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
return maxAmount + 100;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
return maxAmount;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
@@ -283,10 +294,11 @@ const handleAmountChange = () => {
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
if (canAddPayment.value) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
// 添加新的退费方式,初始金额为0,由用户输入
|
||||
formData.selfPay.push({ payEnum: '', amount: 0 });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
@@ -297,9 +309,16 @@ const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
// 计算属性 - 实退合计(使用接口返回的退费方式数据)
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
|
||||
return sum.toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
@@ -311,6 +330,72 @@ const returnedAmount = computed(() => {
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
const calculatedTotalAmount = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return props.totalAmount || 0;
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
// 应退金额 = (amount - returnAmount) 的总和,即剩余应退金额
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce(
|
||||
(total, item) => total + ((Number(item.amount) || 0) - (Number(item.returnAmount) || 0)),
|
||||
0
|
||||
);
|
||||
return sum > 0 ? sum : props.totalAmount || 0;
|
||||
});
|
||||
|
||||
const calculatedReturnAmount = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((total, item) => total + (Number(item.returnAmount) || 0), 0);
|
||||
return sum || 0;
|
||||
});
|
||||
|
||||
// 从接口数据中筛选符合条件的退费方式
|
||||
const refundMethodsFromApi = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
return preCancelData.value.filter(
|
||||
(item) =>
|
||||
targetPayEnums.includes(item.payEnum) &&
|
||||
item.payEnum_dictText &&
|
||||
item.payEnum_dictText.trim() !== ''
|
||||
);
|
||||
});
|
||||
|
||||
// 根据 payEnum 获取支付方式标签
|
||||
const getPayMethodLabel = (payEnum) => {
|
||||
const method = selfPayMethods.find((m) => m.value === payEnum);
|
||||
if (method) {
|
||||
return method.label;
|
||||
}
|
||||
// 如果找不到,尝试从接口返回的 dictText 中获取
|
||||
const apiItem = preCancelData.value?.find((item) => item.payEnum === payEnum);
|
||||
return apiItem?.payEnum_dictText || `支付方式${payEnum}`;
|
||||
};
|
||||
|
||||
// 计算所有退费方式的总和
|
||||
const totalRefundAmount = computed(() => {
|
||||
return refundMethodsFromApi.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
|
||||
});
|
||||
|
||||
// 计算剩余可输入金额(应退金额 - 已输入的退费金额总和)
|
||||
const remainingAmount = computed(() => {
|
||||
return calculatedTotalAmount.value - totalRefundAmount.value;
|
||||
});
|
||||
|
||||
// 判断是否可以添加退费方式:退费金额总和等于或大于应退金额时不能添加
|
||||
const canAddPayment = computed(() => {
|
||||
return totalRefundAmount.value >= calculatedTotalAmount.value || formData.selfPay.length >= 10;
|
||||
});
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
@@ -420,4 +505,21 @@ function close() {
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
.pre-cancel-table-wrapper {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
|
||||
:deep(.el-table) {
|
||||
width: 100%;
|
||||
|
||||
.el-table__body-wrapper {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -43,6 +43,38 @@
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</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">
|
||||
身份证
|
||||
</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-form-item label="姓名:" prop="name">
|
||||
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
|
||||
@@ -245,7 +277,6 @@
|
||||
setchargeItem;
|
||||
}
|
||||
"
|
||||
@clear="handleOrgClear"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -516,98 +547,33 @@
|
||||
<span>{{ parseTime(scope.row.registerTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 退号记录相关列 -->
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号日期/时间"
|
||||
align="center"
|
||||
key="returnDate"
|
||||
prop="returnDate"
|
||||
width="180"
|
||||
>
|
||||
<el-table-column label="操作" align="center" key="registerTime" prop="registerTime" do>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.returnDate ? parseTime(scope.row.returnDate) : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号原因"
|
||||
align="center"
|
||||
key="returnReason"
|
||||
prop="returnReason"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.returnReason || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号操作人"
|
||||
align="center"
|
||||
key="operatorName"
|
||||
prop="operatorName"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.operatorName || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退号操作工号"
|
||||
align="center"
|
||||
key="operatorId"
|
||||
prop="operatorId"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.operatorId || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退款金额"
|
||||
align="center"
|
||||
key="refundAmount"
|
||||
prop="refundAmount"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refundAmount ? scope.row.refundAmount.toFixed(2) + ' 元' : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="queryType === 'returned'"
|
||||
label="退款方式"
|
||||
align="center"
|
||||
key="refundMethod"
|
||||
prop="refundMethod"
|
||||
width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refundMethod || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 操作列:只在全部和正常挂号标签页显示,退号记录标签页不显示 -->
|
||||
<el-table-column
|
||||
v-if="queryType !== 'returned'"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="120"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
:disabled="scope.row.statusEnum === 6 || scope.row.statusEnum !== 1"
|
||||
:title="getReturnTooltip(scope.row)"
|
||||
@click="handleReturn(scope.row)"
|
||||
>
|
||||
退号
|
||||
</el-button>
|
||||
<!-- <el-tooltip
|
||||
:content="
|
||||
scope.row.statusEnum == 6
|
||||
? '已退号'
|
||||
: scope.row.statusEnum == 2
|
||||
? '已接诊,不允许退号'
|
||||
: ''
|
||||
"
|
||||
placement="top"
|
||||
:disabled="scope.row.statusEnum != 6"
|
||||
> -->
|
||||
<div style="display: flex">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleReturn(scope.row, 1)"
|
||||
:disabled="scope.row.statusEnum == 6"
|
||||
>
|
||||
退号
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="handleReturn(scope.row, 0)">
|
||||
详情
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -657,21 +623,7 @@
|
||||
:patientInfo="patientInfo"
|
||||
:paymentId="paymentId"
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:feeType="patientInfo.medfeePaymtdCode || ''"
|
||||
:contractName="patientInfo.contractName || ''"
|
||||
:medfee_paymtd_code="medfee_paymtd_code"
|
||||
:registerInfo="registerInfo"
|
||||
/>
|
||||
<ReprintDialog
|
||||
:open="openReprintDialog"
|
||||
@close="
|
||||
(value) => {
|
||||
if (value == 'success') {
|
||||
getList();
|
||||
}
|
||||
openReprintDialog = false;
|
||||
}
|
||||
"
|
||||
:eventType="eventType"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -691,8 +643,9 @@ import {
|
||||
precharge,
|
||||
cancelRegister,
|
||||
gerPreInfo,
|
||||
updatePatientPhone,
|
||||
} from './components/outpatientregistration';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import { invokeYbPlugin5000, invokeYbPlugin5001 } from '@/api/public';
|
||||
import patientInfoDialog from './components/patientInfoDialog';
|
||||
import PatientAddDialog from './components/patientAddDialog';
|
||||
import patientList from './components/patientList';
|
||||
@@ -703,18 +656,11 @@ import ReprintDialog from './components/reprintDialog.vue';
|
||||
import { handleColor } from '@/utils/his';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import { getConfigKey } from '@/api/system/config';
|
||||
import { isValidCNPhoneNumber } from '../../../utils/validate';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const patientInfo = ref({});
|
||||
// 监护人规定年龄配置
|
||||
const guardianAgeConfig = ref(null);
|
||||
|
||||
// 跳转到患者档案管理页面
|
||||
const goToPatientRecord = () => {
|
||||
// 使用Vue Router进行路由导航,在当前页面打开新的路由层级
|
||||
router.push('/system/basicmanage/patientmanagement');
|
||||
};
|
||||
|
||||
const eventType = ref(0);
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex, med_chrgitm_type,medfee_paymtd_code } = proxy.useDict(
|
||||
@@ -765,9 +711,8 @@ const patientInfoList = ref(undefined);
|
||||
// 费用性质
|
||||
const contractList = ref(undefined);
|
||||
// const locationOptions = ref(undefined); // 地点树选项
|
||||
const doctorList = ref(undefined); // 医生选项(过滤后的)
|
||||
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
|
||||
const healthcareList = ref(undefined); // 挂号项目选项
|
||||
const doctorList = ref(undefined); // 医生选项
|
||||
const healthcareList = ref([]); // 挂号项目选项
|
||||
const orgOptions = ref(undefined); // 科室选项
|
||||
const readCardLoading = ref(false);
|
||||
const transformedData = ref({});
|
||||
@@ -801,11 +746,10 @@ const data = reactive({
|
||||
serviceTypeId: [{ required: true, message: '挂号类型不能为空', trigger: 'blur' }],
|
||||
organizationId: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
|
||||
// practitionerId: [
|
||||
// { required: true, message: "医生不能为空", trigger: "blur" },
|
||||
// ],
|
||||
practitionerId: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
|
||||
typeCode: [{ required: true, message: '账户类型不能为空', trigger: 'blur' }],
|
||||
definitionId: [{ required: true, message: '费用定价不能为空', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: "总价不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
@@ -932,10 +876,10 @@ async function handleReadCard(value) {
|
||||
// .getInfoByQrCodeAsync(
|
||||
|
||||
// )
|
||||
await invokeYbPlugin({
|
||||
await invokeYbPlugin5000({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
orgId: 'H22010402403',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
@@ -952,7 +896,7 @@ async function handleReadCard(value) {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
let message = JSON.parse(cardInfo.data);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
@@ -972,7 +916,7 @@ async function handleReadCard(value) {
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
await invokeYbPlugin5001(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
@@ -1087,29 +1031,6 @@ function setchargeItem() {
|
||||
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
|
||||
}
|
||||
}
|
||||
|
||||
/** 处理挂号类型变化 */
|
||||
function handleServiceTypeChange() {
|
||||
// 先设置费用项信息
|
||||
setchargeItem();
|
||||
// 然后根据就诊科室和挂号类型过滤医生
|
||||
filterDoctorsByHealthcare();
|
||||
}
|
||||
|
||||
/** 处理科室清空 */
|
||||
function handleOrgClear() {
|
||||
// 清空科室时,清空相关数据
|
||||
form.value.orgId = undefined;
|
||||
form.value.organizationId = undefined;
|
||||
healthcareList.value = [];
|
||||
form.value.serviceTypeId = undefined;
|
||||
form.value.practitionerId = undefined;
|
||||
form.value.doctorName = '';
|
||||
// 如果有医生列表,显示所有医生
|
||||
if (allDoctorList.value) {
|
||||
doctorList.value = allDoctorList.value;
|
||||
}
|
||||
}
|
||||
/** 查询患者信息 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
@@ -1386,13 +1307,37 @@ function reset() {
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
console.log('isValidCNPhoneNumber=======>', isValidCNPhoneNumber(form.value.phone));
|
||||
|
||||
transformedData.value = transformFormData(form.value);
|
||||
console.log(transformedData, 'transformedData门诊挂号');
|
||||
chargeItemIdList.value = [];
|
||||
patientInfo.value.patientId = form.value.patientId;
|
||||
patientInfo.value.medfeePaymtdCode = form.value.contractNo; // 设置费用性质
|
||||
// patientInfo.value.patientId = form.value.patientId;
|
||||
patientInfo.value = {
|
||||
patientId: form.value.patientId,
|
||||
patientName: form.value.name,
|
||||
genderEnum_enumText: form.value.genderEnum_enumText,
|
||||
age: form.value.age,
|
||||
contractName: form.value.contractNo
|
||||
? contractList.value.find((item) => item.busNo === form.value.contractNo)?.contractName ||
|
||||
'自费'
|
||||
: '自费',
|
||||
idCard: form.value.idCard,
|
||||
phone: form.value.phone,
|
||||
categoryEnum: form.value.categoryEnum || '门诊',
|
||||
organizationName: form.value.locationId_dictText || '',
|
||||
practitionerName: form.value.doctorName || '',
|
||||
healthcareName: '', // 可根据实际情况补充
|
||||
};
|
||||
proxy.$refs['outpatientRegistrationRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!isValidCNPhoneNumber(patientInfo.value.phone)) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '手机号格式不正确,请重新输入!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
transformedData.value.busiCardInfo = userCardInfo.busiCardInfo;
|
||||
transformedData.value.certType = userCardInfo.certType;
|
||||
@@ -1401,13 +1346,13 @@ function handleAdd() {
|
||||
addOutpatientRegistration(transformedData.value)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log('挂号成功,返回数据:', res.data);
|
||||
// 立即刷新列表,确保挂号信息显示在当日已挂号列表中
|
||||
getList();
|
||||
|
||||
console.log('78989798', 'res', res);
|
||||
// proxy.$modal.msgSuccess('挂号成功');
|
||||
chrgBchno.value = res.data.chrgBchno;
|
||||
registerBusNo.value = res.data.busNo;
|
||||
totalAmount.value = res.data.psnCashPay;
|
||||
patientInfo.value.encounterId = res.data.encounterId || '';
|
||||
patientInfo.value.busNo = res.data.busNo || '';
|
||||
readCardLoading.value = false;
|
||||
openDialog.value = true;
|
||||
// chargeItemIdList.value = res.data;
|
||||
@@ -1459,47 +1404,15 @@ function handleSearchPatient(value) {
|
||||
patientSearchKey.value = value;
|
||||
}
|
||||
|
||||
function getReturnTooltip(row) {
|
||||
if (!row) {
|
||||
return '';
|
||||
}
|
||||
if (row.statusEnum == 6) {
|
||||
return '已退号';
|
||||
}
|
||||
if (row.statusEnum != 1) {
|
||||
return '该患者医生已接诊,不能退号!';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function handleReturn(row) {
|
||||
if (row.statusEnum != 1) {
|
||||
proxy.$modal.msgError('该患者医生已接诊,不能退号!');
|
||||
return;
|
||||
}
|
||||
function handleReturn(row, type = '1') {
|
||||
openRefundDialog.value = true;
|
||||
patientInfo.value.patientId = row.patientId;
|
||||
patientInfo.value.encounterId = row.encounterId;
|
||||
totalAmount.value = row.totalPrice;
|
||||
chargeItemIdList.value = row.chargeItemIds.split(',');
|
||||
paymentId.value = row.paymentId;
|
||||
// 从挂号记录中获取正确的费用性质
|
||||
patientInfo.value.medfeePaymtdCode = row.contractNo; // 使用挂号记录中的费用性质代码
|
||||
patientInfo.value.contractName = row.contractName; // 保存费用性质名称用于显示
|
||||
|
||||
// 保存完整的原挂号记录信息,用于退号记录
|
||||
registerInfo.value = {
|
||||
...row, // 保存完整的挂号记录
|
||||
patientName: row.patientName,
|
||||
age: row.age,
|
||||
genderEnum_enumText: row.genderEnum_enumText,
|
||||
registerTime: row.registerTime,
|
||||
totalPrice: row.totalPrice,
|
||||
encounterId: row.encounterId,
|
||||
patientId: row.patientId,
|
||||
};
|
||||
|
||||
console.log('退号费用性质:', row.contractNo, row.contractName);
|
||||
eventType.value = type;
|
||||
console.log(paymentId.value);
|
||||
}
|
||||
|
||||
function handleReturnRegister() {
|
||||
@@ -1565,13 +1478,31 @@ function transformFormData(form) {
|
||||
},
|
||||
};
|
||||
}
|
||||
// 更新患者手机号
|
||||
async function updatePhone() {
|
||||
const params = {
|
||||
id: patientInfo.value.patientId,
|
||||
phone: patientInfo.value.phone,
|
||||
};
|
||||
console.log('params========>', JSON.stringify(params));
|
||||
|
||||
try {
|
||||
await updatePatientPhone(params);
|
||||
getList();
|
||||
reset();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
function handleClose(value) {
|
||||
openDialog.value = false;
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
reset();
|
||||
// 更新患者手机号
|
||||
updatePhone();
|
||||
// getList();
|
||||
// reset();
|
||||
// addOutpatientRegistration(transformedData.value).then((response) => {
|
||||
// reset();
|
||||
// proxy.$modal.msgSuccess('新增成功');
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request';
|
||||
import { dateEquals } from 'element-plus';
|
||||
|
||||
// 获取网银支付参数列表
|
||||
export function getList (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/page',
|
||||
method: 'get',
|
||||
params:data,
|
||||
});
|
||||
}
|
||||
|
||||
export function getPayinfo (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-query?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnfee (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-bill?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnFeednext (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-goods?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnResult (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-query?id='+data.id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
119
openhis-ui-vue3/src/views/charge/threePayRecord/index.vue
Normal file
119
openhis-ui-vue3/src/views/charge/threePayRecord/index.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="app-continer">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true">
|
||||
<el-form-item label="患者姓名" prop="patientName">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="请输入患者姓名" />
|
||||
</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>
|
||||
|
||||
<el-table :data="recordList" v-loading="loading" border ref="tableRef">
|
||||
<el-table-column label="患者姓名" align="center" prop="patientName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="支付单号" align="center" prop="paymentBusNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易金额(元)" align="right" prop="txnAmt" header-align="center" width="100"
|
||||
:show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="交易类型" align="center" prop="tranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="支付方式" align="center" prop="payType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易时间" align="center" prop="txnTime" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.txnTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原交易类型" align="center" prop="orgTranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="原交易类型" align="center" prop="orgTranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="第三方优惠说明" align="center" prop="otherMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="错误信息" align="center" prop="errMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="查询结果" align="center" prop="queryResult" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="查询结果说明" align="center" prop="queryResultMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" prop="paymentEnum_enumText" width="340">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link :disabled="!scope.row.paymentId"
|
||||
@click="getPayInfo(scope.row.paymentId)">支付结果查询</el-button>
|
||||
<el-button type="warning" link :disabled="!scope.row.paymentId"
|
||||
@click="returnFee(scope.row.paymentId)">退费</el-button>
|
||||
<el-button type="danger" link auto-insert-space :disabled="!scope.row.paymentId"
|
||||
@click="returnFeeNext(scope.row.paymentId)">隔天退费</el-button>
|
||||
<el-button type="success" link @click="returnFeeResultQuery(scope.row.id)">退费结果查询</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="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicRecord">
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getList, getPayinfo, returnfee, returnFeednext, returnResult } from './components/api.js';
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
searchKey: '',
|
||||
});
|
||||
const recordList = ref([]);
|
||||
const loading = ref(false);
|
||||
const getPayInfo = (paymentId) => {
|
||||
console
|
||||
getPayinfo({ paymentId }).then((res) => {
|
||||
proxy.$message.success('支付结果查询成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFee = (paymentId) => {
|
||||
returnfee({ paymentId }).then((res) => {
|
||||
proxy.$message.success('退费成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFeeNext = (paymentId) => {
|
||||
returnFeednext({ paymentId }).then((res) => {
|
||||
proxy.$message.success('隔天退费成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFeeResultQuery = (id) => {
|
||||
returnResult({ id }).then((res) => {
|
||||
proxy.$message.success(res.data);
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const handleQuery = () => {
|
||||
//queryParams.value.pageNum = 1;
|
||||
getList(queryParams.value);
|
||||
};
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm('queryRef');
|
||||
handleQuery();
|
||||
};
|
||||
const getLists = async () => {
|
||||
loading.value = true;
|
||||
getList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
recordList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
getLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.app-continer {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
height: 90vh !important;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -357,7 +357,7 @@ async function print() {
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: '长春大学医院',
|
||||
fixmedinsName: '长春市朝阳区中医院医院',
|
||||
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
|
||||
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
|
||||
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
|
||||
@@ -433,4 +433,4 @@ getPharmacyCabinetLists();
|
||||
.el-col {
|
||||
margin-right: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -218,13 +218,13 @@
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['229900reg'] ? reportValue['229900reg'] + ' 人' : '0 人' }}
|
||||
{{ reportValue['229900reg'] ? reportValue['229900reg'] + '人' : '0 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['220100reg'] ? reportValue['220100reg'] + ' 人' : '0 人' }}
|
||||
{{ (reportValue['220100reg'] || 0) + (reportValue['220199reg'] || 0) + ' 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">
|
||||
@@ -273,19 +273,27 @@
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100cash']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100cash'] || 0) + (reportValue['220199cash'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保统筹:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100tcSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100tcSum'] || 0) + (reportValue['220199tcSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保账户:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100zhSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100zhSum'] || 0) + (reportValue['220199zhSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保基金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100fundSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100fundSum'] || 0) + (reportValue['220199fundSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
@@ -329,6 +337,7 @@
|
||||
{{
|
||||
formatValue(
|
||||
(reportValue['220100cash'] || 0) +
|
||||
(reportValue['220199cash'] || 0) +
|
||||
(reportValue['229900cash'] || 0) +
|
||||
(reportValue['0000cash'] || 0)
|
||||
)
|
||||
@@ -443,16 +452,33 @@ function processObjectWithFinType(obj) {
|
||||
async function print() {
|
||||
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
console.log(reportValue.value, '==reportValue.value==');
|
||||
// 计算市医保相关字段
|
||||
const municipalYbReg =
|
||||
(reportValue.value['220100reg'] || 0) + (reportValue.value['220199reg'] || 0);
|
||||
const municipalYbCash =
|
||||
(reportValue.value['220100cash'] || 0) + (reportValue.value['220199cash'] || 0);
|
||||
const municipalYbTcSum =
|
||||
(reportValue.value['220100tcSum'] || 0) + (reportValue.value['220199tcSum'] || 0);
|
||||
const municipalYbZhSum =
|
||||
(reportValue.value['220100zhSum'] || 0) + (reportValue.value['220199zhSum'] || 0);
|
||||
const municipalYbFundSum =
|
||||
(reportValue.value['220100fundSum'] || 0) + (reportValue.value['220199fundSum'] || 0);
|
||||
const municipalYbTotal = municipalYbZhSum + municipalYbFundSum;
|
||||
const totalCash =
|
||||
municipalYbCash + (reportValue.value['229900cash'] || 0) + (reportValue.value['0000cash'] || 0);
|
||||
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: userStore.hospitalName,
|
||||
fixmedinsName: userStore.hospitalName,
|
||||
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
|
||||
scheduler: userStore.nickName,
|
||||
timeRange: queryTime.value[0] + '~' + queryTime.value[1],
|
||||
|
||||
// 计算字段
|
||||
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
|
||||
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
|
||||
.add(reportValue.value.CHECK_FEE || 0)
|
||||
@@ -465,14 +491,23 @@ async function print() {
|
||||
.add(reportValue.value.REGISTRATION_FEE || 0)
|
||||
.add(reportValue.value.OTHER_FEE || 0)
|
||||
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
|
||||
|
||||
// 省医保相关
|
||||
provinceYbTotal:
|
||||
(reportValue.value['229900zhSum'] || 0) + (reportValue.value['229900fundSum'] || 0),
|
||||
municipalYbTotal:
|
||||
(reportValue.value['220100zhSum'] || 0) + (reportValue.value['220100fundSum'] || 0),
|
||||
totalCash:
|
||||
(reportValue.value['220100cash'] || 0) +
|
||||
(reportValue.value['229900cash'] || 0) +
|
||||
(reportValue.value['0000cash'] || 0),
|
||||
(reportValue.value['229900fundSum'] || 0) + (reportValue.value['229900zhSum'] || 0),
|
||||
|
||||
// 市医保相关(220100和220199)
|
||||
municipalYbReg,
|
||||
municipalYbCash,
|
||||
municipalYbTcSum,
|
||||
municipalYbZhSum,
|
||||
municipalYbFundSum,
|
||||
municipalYbTotal,
|
||||
|
||||
// 现金收入总额
|
||||
totalCash,
|
||||
|
||||
// 体检人次
|
||||
physicalExaminationCount: getPhysicalExaminationCount(),
|
||||
},
|
||||
],
|
||||
@@ -546,4 +581,4 @@ function formatValue(value) {
|
||||
background-color: #000;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -92,3 +92,15 @@ export function printBloodCode (query) {
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取本次就诊处方单
|
||||
*/
|
||||
export function getEnPrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
"paperType": "A5",
|
||||
"height": 210,
|
||||
"width": 148,
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 592.4409448818898,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {
|
||||
"content": "",
|
||||
"opacity": 0.7,
|
||||
@@ -24,20 +27,19 @@
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
"panelLayoutOptions": {},
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 841.8897637795277,
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 169.5,
|
||||
"left": 0,
|
||||
"top": 22.5,
|
||||
"height": 12,
|
||||
"width": 88.5,
|
||||
"title": "长春大学医院",
|
||||
"width": 420,
|
||||
"title": "长春市朝阳区中医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 13.5,
|
||||
"qrCodeLevel": 0
|
||||
"qrCodeLevel": 0,
|
||||
"textAlign": "center"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
@@ -46,15 +48,16 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 189,
|
||||
"left": 0,
|
||||
"top": 45,
|
||||
"height": 9.75,
|
||||
"width": 42,
|
||||
"width": 420,
|
||||
"title": "处置单",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 11.25,
|
||||
"qrCodeLevel": 0
|
||||
"qrCodeLevel": 0,
|
||||
"textAlign": "center"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
@@ -331,4 +334,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@close="close"
|
||||
>
|
||||
<el-table :data="recordList" highlight-current-row max-height="650" style="width: 100%" border>
|
||||
<el-table-column prop="occurrenceTime" label="执行时间" align="center" />
|
||||
<el-table-column prop="recordTime" label="执行时间" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="执行状态" align="center" />
|
||||
<el-table-column prop="orgName" label="执行科室" align="center" />
|
||||
<el-table-column prop="practitionerName" label="执行人" align="center" />
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"top": 16.5,
|
||||
"height": 22.5,
|
||||
"width": 120,
|
||||
"title": "长春大学医院",
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontFamily": "Microsoft YaHei",
|
||||
@@ -637,4 +637,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,16 @@
|
||||
<el-table-column prop="patientName" label="姓名" align="center" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="receptionTime" label="挂号时间" align="center" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@pagination="getPatientList"
|
||||
:pager-count="1"
|
||||
:layout="'total, prev, pager, next'"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -96,6 +98,7 @@
|
||||
>
|
||||
打印处置单
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="getEnPrescription()"> 处方单 </el-button>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="6">
|
||||
<el-form
|
||||
@@ -282,16 +285,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="unitPrice" label="单价">
|
||||
<template #default="scope">
|
||||
<template #default="{ row }">
|
||||
<span>
|
||||
{{ scope.unitPrice ? scope.unitPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
{{ row.unitPrice ? row.unitPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="totalPrice" label="总价">
|
||||
<template #default="scope">
|
||||
<template #default="{ row }">
|
||||
<span>
|
||||
{{ scope.totalPrice ? scope.totalPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
{{ row.totalPrice ? row.totalPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -301,6 +304,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<PerformRecordDialog :open="openDialog" :recordList="recordList" @close="openDialog = false" />
|
||||
<PrescriptionInfo
|
||||
:open="openPrescriptionDialog"
|
||||
:precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -311,20 +319,24 @@ import {
|
||||
getDisposalList,
|
||||
execute,
|
||||
cancel,
|
||||
getEnPrescriptionInfo,
|
||||
getPerformRecord,
|
||||
listWesternmedicine,
|
||||
printBloodCode,
|
||||
} from './components/api';
|
||||
import PerformRecordDialog from './components/performRecordDialog';
|
||||
import PrescriptionInfo from '../../doctorstation/components/prescription/prescriptionInfo.vue';
|
||||
import templateJson from './components/template.json';
|
||||
import prescriptionTemplate from './components/prescriptionTemplate.json';
|
||||
import bloodTemplate from './components/bloodTemplate.json';
|
||||
import disposalTemplate from './components/disposalTemplate.json';
|
||||
import { advicePrint, getAdjustPriceSwitchState, lotNumberMatch } from '@/api/public';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import { advicePrint } from '@/api/public';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { getGroupMarkers } from '@/utils/his';
|
||||
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
// 患者搜索
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
@@ -334,6 +346,10 @@ const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
|
||||
const openPrescriptionDialog = ref(false);
|
||||
const prescriptionInfo = ref([]);
|
||||
|
||||
const total = ref(0);
|
||||
// 患者数据
|
||||
const patientList = ref([]);
|
||||
@@ -424,10 +440,23 @@ function handleServiceCategoryChange(value) {
|
||||
function handlePatientSelect(row) {
|
||||
loading.value = true;
|
||||
currentPatient.value = row;
|
||||
getAdjustPriceSwitchState().then((res) => {
|
||||
if (res.data) {
|
||||
lotNumberMatch({ encounterIdList: row.encounterId }).then(() => {
|
||||
getAllList(row);
|
||||
});
|
||||
} else {
|
||||
getAllList(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getAllList(row) {
|
||||
getDisposalList(row.encounterId).then((res) => {
|
||||
deviceList.value = res.data.records.filter((item) => {
|
||||
return item.requestTable == 'wor_device_request';
|
||||
});
|
||||
console.log('耗材列表=====>', JSON.stringify(deviceList.value));
|
||||
activityList.value = res.data.records.filter((item) => {
|
||||
return (
|
||||
item.requestTable == 'wor_service_request' || item.requestTable == 'med_medication_request'
|
||||
@@ -642,6 +671,23 @@ function printPrescription() {
|
||||
}); //开始打印
|
||||
});
|
||||
}
|
||||
// 查看本次就诊处方单
|
||||
function getEnPrescription() {
|
||||
getEnPrescriptionInfo({ encounterId: currentPatient.value.encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
// 打印处置单
|
||||
function printDisposal() {
|
||||
let requestIds = deviceActivityList.value
|
||||
@@ -749,7 +795,100 @@ function handleCancel(row) {
|
||||
});
|
||||
}
|
||||
// 打印瓶贴
|
||||
function printBottleLabel() {
|
||||
// function printBottleLabel() {
|
||||
// let result = [];
|
||||
// // 过滤出全部输液药品
|
||||
// let selectRows = activityListRef.value.getSelectionRows();
|
||||
// let printLiist = [];
|
||||
// // 有选中的优先打印选中行,没有的话打印全部的输液药品
|
||||
// if (selectRows.length > 0) {
|
||||
// printLiist = selectRows.filter((item) => {
|
||||
// return item.medCategory == '2' || item.medCategory == '1';
|
||||
// });
|
||||
// } else {
|
||||
// printLiist = activityList.value.filter((item) => {
|
||||
// return item.medCategory == '2' || item.medCategory == '1';
|
||||
// });
|
||||
// }
|
||||
// // 按照groupId分组,但将多天的项目展开为独立项目
|
||||
// let expandedList = [];
|
||||
|
||||
// printLiist.forEach((item) => {
|
||||
// // 如果用药天数大于1,则创建多个项目
|
||||
// if (item.dispensePerDuration && item.dispensePerDuration > 1) {
|
||||
// // 为每一天创建一个项目
|
||||
// for (let i = 0; i < item.dispensePerDuration; i++) {
|
||||
// // 克隆项目并调整数量
|
||||
// const clonedItem = {
|
||||
// ...item,
|
||||
// // 数量除以天数
|
||||
// quantity: item.quantity ? item.quantity / item.dispensePerDuration : item.quantity,
|
||||
// // 可以添加一个字段表示是第几天
|
||||
// dayIndex: i + 1,
|
||||
// totalDays: item.dispensePerDuration,
|
||||
// data: item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText,
|
||||
// };
|
||||
|
||||
// // 获取当前时间做执行日期,如果用药天数大于1,依次累加
|
||||
// const date = new Date();
|
||||
// date.setDate(date.getDate() + i);
|
||||
// clonedItem.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
|
||||
|
||||
// // 将克隆的项目添加到展开列表中,不按groupId分组
|
||||
// expandedList.push(clonedItem);
|
||||
// }
|
||||
// } else {
|
||||
// // 天数为1或没有设置天数,直接使用原项目
|
||||
// item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
|
||||
// expandedList.push(item);
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 重新按groupId分组,但每个展开的项目都是独立的
|
||||
// const groupedByGroupId = expandedList.reduce((acc, item) => {
|
||||
// // 为展开的项目生成新的唯一groupId
|
||||
// const groupId = item.dayIndex
|
||||
// ? `${item.groupId || item.requestId}_day${item.dayIndex}`
|
||||
// : item.groupId || item.requestId;
|
||||
|
||||
// if (!acc[groupId]) {
|
||||
// acc[groupId] = [];
|
||||
// }
|
||||
// acc[groupId].push(item);
|
||||
// return acc;
|
||||
// }, {});
|
||||
// const resultList = Object.values(groupedByGroupId);
|
||||
// console.log(resultList, '23456789');
|
||||
|
||||
// result = resultList.map((item) => {
|
||||
// return {
|
||||
// patientName: currentPatient.value.patientName,
|
||||
// prepareName: userStore.nickName,
|
||||
// genderEnum_enumText: currentPatient.value.genderEnum_enumText,
|
||||
// age: currentPatient.value.age,
|
||||
// date: item[0].performDateTime,
|
||||
// infuseData: item,
|
||||
// };
|
||||
// });
|
||||
// const printElements = templateJson;
|
||||
// var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// console.log(result, '打印机列表');
|
||||
// hiprintTemplate.print2(result, {
|
||||
// // printer: 'Xprinter XP-365B',
|
||||
// height: 210,
|
||||
// width: 148,
|
||||
// });
|
||||
// // 直接打印回调
|
||||
// // 发送任务到打印机成功
|
||||
// hiprintTemplate.on('printSuccess', function (e) {
|
||||
// console.log('打印成功');
|
||||
// });
|
||||
// // 发送任务到打印机失败
|
||||
// hiprintTemplate.on('printError', function (e) {
|
||||
// console.log('打印失败');
|
||||
// });
|
||||
// }
|
||||
async function printBottleLabel() {
|
||||
let result = [];
|
||||
// 过滤出全部输液药品
|
||||
let selectRows = activityListRef.value.getSelectionRows();
|
||||
@@ -795,6 +934,9 @@ function printBottleLabel() {
|
||||
// 天数为1或没有设置天数,直接使用原项目
|
||||
item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
|
||||
expandedList.push(item);
|
||||
//将当前时间传到expandedList中
|
||||
const date = new Date();
|
||||
item.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -815,6 +957,7 @@ function printBottleLabel() {
|
||||
console.log(resultList, '23456789');
|
||||
|
||||
result = resultList.map((item) => {
|
||||
console.log(item, '111323item');
|
||||
return {
|
||||
patientName: currentPatient.value.patientName,
|
||||
prepareName: userStore.nickName,
|
||||
@@ -824,23 +967,25 @@ function printBottleLabel() {
|
||||
infuseData: item,
|
||||
};
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
console.log(result, '打印机列表');
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'Xprinter XP-365B',
|
||||
height: 210,
|
||||
width: 148,
|
||||
});
|
||||
console.log(result, '打印数据');
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_INFUSION, result);
|
||||
// console.log('打印成功');
|
||||
// const printElements = templateJson;
|
||||
// var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// console.log(result, '打印机列表');
|
||||
// hiprintTemplate.print2(result, {
|
||||
// height: 210,
|
||||
// width: 148,
|
||||
// });
|
||||
// 直接打印回调
|
||||
// 发送任务到打印机成功
|
||||
hiprintTemplate.on('printSuccess', function (e) {
|
||||
console.log('打印成功');
|
||||
});
|
||||
// 发送任务到打印机失败
|
||||
hiprintTemplate.on('printError', function (e) {
|
||||
console.log('打印失败');
|
||||
});
|
||||
// hiprintTemplate.on('printSuccess', function (e) {
|
||||
// console.log('打印成功');
|
||||
// });
|
||||
// // 发送任务到打印机失败
|
||||
// hiprintTemplate.on('printError', function (e) {
|
||||
// console.log('打印失败');
|
||||
// });
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
@@ -850,8 +995,8 @@ function handleSelectionChange(selection, row) {
|
||||
.filter((item) => {
|
||||
return item.groupId && item.groupId == row?.groupId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
activityListRef.value.toggleRowSelection(row, isSelected);
|
||||
.forEach((item) => {
|
||||
activityListRef.value.toggleRowSelection(item, isSelected);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1039,4 +1184,4 @@ function getRecord(row) {
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="门诊号" align="center" prop="iptOtpNo" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" />
|
||||
<el-table-column label="诊断名" align="center" prop="conditionName" />
|
||||
<el-table-column
|
||||
label="慢性诊断名"
|
||||
align="center"
|
||||
prop="specialConditionName"
|
||||
width="180"
|
||||
/>
|
||||
|
||||
<el-table-column label="请求数量" align="center" prop="quantity" />
|
||||
<el-table-column label="请求单位" align="center" prop="unitCode" />
|
||||
<el-table-column label="审核状态" align="center" prop="statusEnum_enumText" />
|
||||
@@ -38,8 +48,7 @@
|
||||
<el-table-column label="给药间隔" align="center" prop="dispenseInterval" />
|
||||
<el-table-column label="单次发药数" align="center" prop="dispensePerQuantity" />
|
||||
<el-table-column label="每次发药供应天数" align="center" prop="dispensePerDuration" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" />
|
||||
|
||||
<el-table-column label="开方医生名" align="center" prop="practitionerName" />
|
||||
<el-table-column label="挂号科室" align="center" prop="mdtrtDeptName" />
|
||||
<el-table-column label="开单科室" align="center" prop="prscDeptName" />
|
||||
@@ -53,7 +62,6 @@
|
||||
{{ formatDate(scope.row.prscTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断名" align="center" prop="conditionName" />
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>CF0000000001</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
@@ -235,4 +235,4 @@ getList();
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,32 +8,73 @@
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px" @keyup.enter="getEncounterList">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
|
||||
@keyup.enter="getEncounterList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getEncounterList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select v-model="queryParams.refundEnum" style="width: 48%; margin-bottom: 10px" placeholder="收费状态"
|
||||
@change="getEncounterList">
|
||||
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-select
|
||||
v-model="queryParams.refundEnum"
|
||||
style="width: 48%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getEncounterList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px" value-format="YYYY-MM-DD" placement="bottom"
|
||||
@change="getEncounterList" />
|
||||
<el-button type="primary" @click="getEncounterList" style="margin-bottom: 10px; margin-left: 18px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placement="bottom"
|
||||
@change="getEncounterList"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="getEncounterList"
|
||||
style="margin-bottom: 10px; margin-left: 18px"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="encounterList" border style="width: 100%" height="calc(100vh - 300px)" highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList">
|
||||
<el-table-column prop="patientName" align="center" label="姓名" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="genderEnum_enumText" align="center" label="性别" show-overflow-tooltip />
|
||||
<el-table
|
||||
:data="encounterList"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList"
|
||||
>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="genderEnum_enumText"
|
||||
align="center"
|
||||
label="性别"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
|
||||
@@ -52,16 +93,35 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-button type="primary" :disabled="!selectedMedicines.length" @click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!selectedMedicines.length"
|
||||
@click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
确认退药
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
|
||||
<el-table ref="returnDrugRef" :data="returDrugList" style="width: 100%" height="calc(100vh - 300px)" border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table
|
||||
ref="returnDrugRef"
|
||||
:data="returDrugList"
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
border
|
||||
@select="handleSelection"
|
||||
@selection-change="handelSelectRows"
|
||||
:span-method="handelSpanMethod"
|
||||
class="no-hover-table"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" header-align="center">
|
||||
<el-table-column
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="100"
|
||||
align="right"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
|
||||
</template>
|
||||
@@ -74,29 +134,30 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.reqStatus_enumText == null
|
||||
? scope.row.refundEnum_enumText
|
||||
: scope.row.reqStatus_enumText
|
||||
}}
|
||||
{{ scope.row.refundEnum_enumText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity)
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity) + ' ' + scope.row.unitCode_dictText
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-popconfirm width="150" hide-after="10" title="操作确认" placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)">
|
||||
<el-popconfirm
|
||||
width="150"
|
||||
hide-after="10"
|
||||
title="操作确认"
|
||||
placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" link :disabled="scope.row.reqStatus != 11">
|
||||
<el-button type="primary" link :disabled="scope.row.refundEnum != 16">
|
||||
退药
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -113,13 +174,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<TraceNoDialog :ypName="ypName" :openDialog="openTraceNoDialog" @submit="submit"
|
||||
@cancel="openTraceNoDialog = false" />
|
||||
<TraceNoDialog
|
||||
:ypName="ypName"
|
||||
:openDialog="openTraceNoDialog"
|
||||
@submit="submit"
|
||||
@cancel="openTraceNoDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ReturnDrug">
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getCurrentInstance, nextTick } from 'vue';
|
||||
import { getList, getReturnDrugList, returnDrug, init, itemTraceNo } from './components/api';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { debounce } from 'lodash-es';
|
||||
@@ -128,7 +193,7 @@ import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
refundEnum: 5,
|
||||
refundEnum: 16,
|
||||
});
|
||||
const openTraceNo = ref(false);
|
||||
const traceNoList = ref([]);
|
||||
@@ -138,8 +203,10 @@ const encounterId = ref('');
|
||||
const returDrugList = ref([]);
|
||||
const selectedMedicines = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const dateRange = ref([formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),]);
|
||||
const dateRange = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const traceNoTemp = ref('');
|
||||
const traceNoTempRef = ref();
|
||||
const totalAmount = ref(0);
|
||||
@@ -226,14 +293,16 @@ function handleReturnDrug(row) {
|
||||
console.log(row);
|
||||
let saveList = [];
|
||||
if (row) {
|
||||
saveList = [
|
||||
{
|
||||
requestId: row.requestId,
|
||||
dispenseId: row.dispenseId,
|
||||
tableName: row.serviceTable,
|
||||
traceNo: row.traceNo,
|
||||
},
|
||||
];
|
||||
saveList = returDrugList.value
|
||||
.filter((item) => item.requestId == row.requestId)
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
saveList = proxy.$refs.returnDrugRef.getSelectionRows().map((item) => {
|
||||
return {
|
||||
@@ -248,7 +317,7 @@ function handleReturnDrug(row) {
|
||||
returnDrug(saveList).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('退药成功');
|
||||
getEncounterList()
|
||||
getEncounterList();
|
||||
getReturnDrugList({
|
||||
encounterId: encounterId.value,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
@@ -259,12 +328,79 @@ function handleReturnDrug(row) {
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange(selectRows) {
|
||||
selectedMedicines.value = selectRows;
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// 选择框改变时的处理
|
||||
function handleSelection(selection, row) {
|
||||
const isSelected = selection.some((item) => item.dispenseId === row.dispenseId);
|
||||
returDrugList.value
|
||||
.filter((item) => {
|
||||
return item.requestId == row.requestId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
proxy.$refs['returnDrugRef'].toggleRowSelection(row, isSelected);
|
||||
});
|
||||
nextTick(() => {
|
||||
selectedMedicines.value = proxy.$refs['returnDrugRef'].getSelectionRows();
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function handelSelectRows(selection) {
|
||||
selectedMedicines.value = selection;
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 根据 requestId 合并相同行的方法(只合并药品名称和总价列)
|
||||
function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 定义需要合并的列索引
|
||||
// 1: 药品名称列, 2: 总价列
|
||||
const mergeColumns = [1, 2, 5, 7, 8];
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
const currentRequestId = row.requestId;
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
let rowspan = 1;
|
||||
let colspan = 1;
|
||||
|
||||
// 向上查找相同 requestId 的行
|
||||
let startIndex = rowIndex;
|
||||
while (startIndex > 0 && returDrugList.value[startIndex - 1].requestId === currentRequestId) {
|
||||
startIndex--;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
let endIndex = rowIndex;
|
||||
while (
|
||||
endIndex < returDrugList.value.length - 1 &&
|
||||
returDrugList.value[endIndex + 1].requestId === currentRequestId
|
||||
) {
|
||||
endIndex++;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 只有当 rowspan > 1 时才进行合并
|
||||
return rowspan > 1 ? [rowspan, colspan] : [1, 1];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -336,7 +472,11 @@ function handleSelectionChange(selectRows) {
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.el-textarea .el-textarea__inner {
|
||||
:deep(.el-textarea .el-textarea__inner) {
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
:deep(.no-hover-table) .el-table__body tr:hover > td {
|
||||
background: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,34 +1,77 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function listSkinRecord(query) {
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-page',
|
||||
url: '/outpatient-manage/treatment/encounter-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取皮试记录列表
|
||||
*/
|
||||
export function listSkinRecord(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/record-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**后台没有对应接口,暂无
|
||||
* 更新护士签名
|
||||
*/
|
||||
export function updateNurseSign(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/nurse-sign',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新皮试记录
|
||||
*/
|
||||
export function updateSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/save-record-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化选项
|
||||
*/
|
||||
export function lists() {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护士列表
|
||||
*/
|
||||
export function getNurseList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/nurse-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-skin-test',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function updateNurseSign(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-sign-check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 新增皮试记录
|
||||
*/
|
||||
export function addSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/save-record-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -211,26 +211,7 @@ watch(
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
// function getList() {
|
||||
// queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
// getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
// if (res.data.records.length > 0) {
|
||||
// adviceBaseList.value = res.data.records.filter((item) => {
|
||||
// if (item.adviceType == 1 || item.adviceType == 2) {
|
||||
// return handleQuantity(item) != 0;
|
||||
// } else {
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// total.value = res.data.total;
|
||||
// nextTick(() => {
|
||||
// currentIndex.value = 0;
|
||||
// // adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
getList();
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 病历相关接口
|
||||
/**
|
||||
* 获取患者列表
|
||||
@@ -7,8 +7,8 @@ export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/main/patient-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@ export function getEmrHistoryList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,8 +29,8 @@ export function getEmrTemplateList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ export function receiveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/receive-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ export function leaveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/leave-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ export function completeEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/complete-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,39 +81,39 @@ export function saveEmr(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病历模板
|
||||
*/
|
||||
export function deleteEmrTemplate(id){
|
||||
export function deleteEmrTemplate(id) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病历详情
|
||||
*/
|
||||
export function getEmrDetail(encounterId){
|
||||
export function getEmrDetail(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-detail?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历模板
|
||||
*/
|
||||
export function saveEmrTemplate(data){
|
||||
export function saveEmrTemplate(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
@@ -122,10 +122,10 @@ export function saveEmrTemplate(data){
|
||||
*/
|
||||
export function saveDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosisnew',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,8 +135,8 @@ export function saveDiagnosisBind(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除诊断绑定
|
||||
@@ -145,7 +145,7 @@ export function deleteDiagnosisBind(id) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,8 +155,8 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +166,7 @@ export function getConditionDefinitionInfo(patientId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,40 +176,51 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断回显数据
|
||||
*/
|
||||
export function getEncounterDiagnosis(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisListEle(searchKey,encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis-ele?searchKey=' + searchKey+'&encounterId='+encounterId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisList(searchKey) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 删除就诊诊断
|
||||
*/
|
||||
export function delEncounterDiagnosis(conditionId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/encounter-diagnosis?conditionId=' + conditionId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 处方相关接口
|
||||
@@ -220,8 +231,8 @@ export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,8 +252,8 @@ export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/save-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 签发处方
|
||||
@@ -251,8 +262,8 @@ export function savePrescriptionSign(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 处方签退
|
||||
@@ -262,8 +273,7 @@ export function singOut(data) {
|
||||
url: '/doctor-station/advice/sign-off',
|
||||
method: 'post',
|
||||
data: data,
|
||||
skipErrorMsg: true
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
@@ -272,7 +282,7 @@ export function getPrescriptionList(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-base-info?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取科室列表
|
||||
@@ -281,7 +291,7 @@ export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取退费账单
|
||||
@@ -290,7 +300,7 @@ export function getEncounterPatientPayment(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/patient-payment?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 申请退费
|
||||
@@ -299,11 +309,10 @@ export function refundPayment(data) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/refund-payment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 电子处方相关接口
|
||||
/**
|
||||
* 电子处方查询
|
||||
@@ -312,8 +321,8 @@ export function getVeriPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 处方开立相关接口
|
||||
@@ -324,16 +333,16 @@ export function getAllMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 当返回的list为空时在调用get-allMedicationInfo
|
||||
export function getAllMedicationUsualInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationUsualInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 电子处方下拉框
|
||||
@@ -341,8 +350,8 @@ export function getAllMedicationUsualInfo(queryParams) {
|
||||
export function elepPrescriptionInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,8 +361,8 @@ export function getPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-prescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,8 +372,8 @@ export function getMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-medicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,8 +382,8 @@ export function getMedicationInfo(queryParams) {
|
||||
export function prescriptionNoInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/prescriptionNoInit',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -384,8 +393,8 @@ export function savePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/save-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -395,8 +404,8 @@ export function updatePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/update-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,8 +415,8 @@ export function deletePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/delete-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,8 +426,8 @@ export function issuancePrescription(prescriptionNoList) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/issuance-prescription',
|
||||
method: 'post',
|
||||
data: prescriptionNoList
|
||||
})
|
||||
data: prescriptionNoList,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -428,8 +437,8 @@ export function getAdviceHistoryInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-history-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -439,8 +448,8 @@ export function updateGroupId(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/update-groupid',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -450,8 +459,8 @@ export function getOrderGroupList(params) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,11 +470,10 @@ export function getContract(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/get-encounter-contract',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取得药品最新数据
|
||||
*/
|
||||
@@ -473,8 +481,8 @@ export function queryYbCatalogue(params) {
|
||||
return request({
|
||||
url: '/yb-request/query-yb-catalogue',
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -484,8 +492,8 @@ export function getChronicDisease(params) {
|
||||
return request({
|
||||
url: '/yb-request/getConditionDefinition',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,8 +503,8 @@ export function getTcmMedicine(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-advice-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -506,8 +514,8 @@ export function getTcmCondition(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/condition-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,8 +525,8 @@ export function getTcmSyndrome(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/syndrome-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -528,8 +536,8 @@ export function getTcmDiagnosis(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/get-tcm-encounter-diagnosis',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,8 +547,20 @@ export function saveTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存中医诊断
|
||||
*/
|
||||
export function updateTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/update-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,7 +570,7 @@ export function deleteTcmDiagnosis(syndromeGroupNo) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-diagnosis?syndromeGroupNo=' + syndromeGroupNo,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -560,8 +580,8 @@ export function saveTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -571,8 +591,8 @@ export function signTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -582,8 +602,8 @@ export function signOutTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-off',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -593,11 +613,10 @@ export function getTcmAdviceList(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-request-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取预约记录
|
||||
*/
|
||||
@@ -605,8 +624,8 @@ export function getReservationInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/reservation-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -616,8 +635,8 @@ export function addReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/save-reservation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -627,8 +646,8 @@ export function editReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/edit-reservation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -638,17 +657,16 @@ export function delReservationInfo(id) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/del-reservation',
|
||||
method: 'delete',
|
||||
params: id
|
||||
})
|
||||
params: id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -658,8 +676,8 @@ export function queryParticipantList(params) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -669,7 +687,7 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -679,8 +697,8 @@ export function wardList(params) {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -690,8 +708,8 @@ export function handleHospitalization(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-doctor',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -701,8 +719,8 @@ export function getEnPrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,8 +730,8 @@ export function getOrderGroup(data) {
|
||||
return request({
|
||||
url: '/personalization/orders-group-package/group-package-for-order',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -723,8 +741,8 @@ export function getBindDevice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/order-bind-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -734,6 +752,46 @@ export function isFoodDiseasesNew(params) {
|
||||
return request({
|
||||
url: '/external-integration/foodborne-acquisition/is-food-diseases-new',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 是否入院登记
|
||||
export function isHospitalization(params) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/isRegister',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 校验三十天内是否开过相同检查检验项目
|
||||
export function checkServicesHistory(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-test-history',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验报告 url
|
||||
*/
|
||||
export function getProofResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查报告 url
|
||||
*/
|
||||
export function getTestResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/test-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ import {
|
||||
getTcmCondition,
|
||||
getTcmSyndrome,
|
||||
saveTcmDiagnosis,
|
||||
deleteTcmDiagnosis,
|
||||
getTcmDiagnosis,
|
||||
updateTcmDiagnosis,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import { update } from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
openAddDiagnosisDialog: {
|
||||
@@ -104,6 +104,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
updateZy: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const conditionList = ref([]);
|
||||
@@ -117,127 +121,186 @@ const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function handleOpen() {
|
||||
// 加载诊断和证候选项
|
||||
getTcmCondition().then((res) => {
|
||||
conditionList.value = res.data.records;
|
||||
});
|
||||
|
||||
// 加载已保存的中医诊断
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.data && res.data.illness && res.data.illness.length > 0) {
|
||||
tcmDiagonsisList.value = [];
|
||||
tcmDiagonsisSaveList.value = [];
|
||||
|
||||
res.data.illness.forEach((illness, index) => {
|
||||
const symptom = res.data.symptom[index];
|
||||
const syndromeGroupNo = illness.syndromeGroupNo || symptom.syndromeGroupNo;
|
||||
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: illness.name,
|
||||
syndromeName: symptom.name,
|
||||
syndromeGroupNo: syndromeGroupNo,
|
||||
isSaved: true, // 标记为已保存的诊断
|
||||
});
|
||||
|
||||
tcmDiagonsisSaveList.value=[];
|
||||
tcmDiagonsisList.value=[];
|
||||
debugger;
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
let name=item.name.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: illness.definitionId,
|
||||
syndromeGroupNo: syndromeGroupNo,
|
||||
isSaved: true,
|
||||
conditionId: updateIds[0],
|
||||
definitionId: item.illnessDefinitionId,
|
||||
ybNo: item.ybNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: name[0],
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
conditionId: updateIds[1],
|
||||
definitionId: item.symptomDefinitionId,
|
||||
ybNo: item.symptomYbNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error('加载中医诊断失败:', error);
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = name[1];
|
||||
console.log("这是修改时带入的数据");
|
||||
console.log(tcmDiagonsisList.value);
|
||||
console.log(tcmDiagonsisSaveList.value);
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value == 0) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value.length == 0) {
|
||||
syndromeSelected.value = false;
|
||||
selectedDisease.value = true;
|
||||
syndromeSelected.value = false;
|
||||
timestamp.value = Date.now();
|
||||
getTcmSyndrome().then((res) => {
|
||||
syndromeList.value = res.data.records;
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[0],
|
||||
conditionId: updateIds[0],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
debugger;
|
||||
if(tcmDiagonsisList.value.length>0){
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName = row.name;
|
||||
}else{
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// tcmDiagonsisList.value.push({
|
||||
// conditionName: row.name,
|
||||
// syndromeGroupNo: timestamp.value,
|
||||
// });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function clickSyndromeRow(row) {
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
debugger;
|
||||
let flag=true;
|
||||
tcmDiagonsisList.value.forEach( item => {
|
||||
if(tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName==item.conditionName){
|
||||
if(item.syndromeName==row.name ){
|
||||
proxy.$modal.msgWarning('不能存在完全相同的诊断和证侯');
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
if(flag){
|
||||
if(props.updateZy.length>0){
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[1],
|
||||
conditionId: updateIds[1],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
}
|
||||
|
||||
|
||||
// tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
// syndromeSelected.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 删除诊断
|
||||
function removeDiagnosis(row, index) {
|
||||
// 如果是已保存的诊断,需要调用API从服务器删除
|
||||
if (row.isSaved && row.syndromeGroupNo) {
|
||||
proxy.$modal.confirm('确定要删除这个中医诊断吗?').then(() => {
|
||||
deleteTcmDiagnosis(row.syndromeGroupNo).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
// 从列表中移除
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '删除失败');
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error('删除中医诊断失败:', error);
|
||||
proxy.$modal.msgError('删除失败,请重试');
|
||||
});
|
||||
}).catch(() => {
|
||||
// 用户取消删除
|
||||
});
|
||||
} else {
|
||||
// 未保存的诊断,直接从数组中删除
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
}
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function save() {
|
||||
// 为每个诊断项添加诊断医生和诊断时间
|
||||
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
if(props.updateZy.length>0){
|
||||
updateTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: diagnosisChildList,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (tcmDiagonsisSaveList.value.length > 0 && syndromeSelected.value) {
|
||||
debugger;
|
||||
if (
|
||||
tcmDiagonsisSaveList.value.length > 0 &&
|
||||
(syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0)
|
||||
) {
|
||||
save();
|
||||
} else {
|
||||
proxy.$modal.msgWarning('请选择证候');
|
||||
|
||||
@@ -8,14 +8,29 @@
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-tree ref="treeRef" :data="tree" node-key="id" :props="{ label: 'name', children: 'children' }"
|
||||
highlight-current default-expand-all :filter-node-method="filterNode" @node-click="handleNodeClick">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
node-key="id"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:filter-node-method="filterNode"
|
||||
class="tree-with-scrollbar"
|
||||
@node-click="handleNodeClick"
|
||||
max-height="650"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
<template v-if="node.level === 1 && data.name != '常用' && data.name != '历史'">
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="addChild(data)"
|
||||
>
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@@ -24,11 +39,17 @@
|
||||
<el-popconfirm width="200" :hide-after="10" title="确认删除此常用诊断吗" placement="top-start"
|
||||
@confirm="deleteChild(data)">
|
||||
<template #reference>
|
||||
<el-button style="color: #000000" v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
" type="text" size="small" @click.stop="">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop=""
|
||||
>
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
@@ -46,6 +67,9 @@
|
||||
<el-button type="primary" plain @click="handleSaveDiagnosis()"> 保存诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleImport()"> 导入慢性病诊断 </el-button>
|
||||
<span style="font-size: 12px; margin-left: 10px"
|
||||
>注意 : 若使用电子处方,请不要导入慢性病诊断</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
@@ -76,9 +100,18 @@
|
||||
<el-table-column label="诊断名称" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
trigger="manual" :width="800">
|
||||
<diagnosislist :diagnosisSearchkey="diagnosisSearchkey" @selectDiagnosis="handleSelsectDiagnosis" />
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="handleSelsectDiagnosis"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
@@ -87,11 +120,9 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
|
||||
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="类别" align="center" prop="typeName" width="100" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
<template #default="scope">
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||
<el-checkbox
|
||||
@@ -130,9 +161,17 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
:radio="orgOrUser"
|
||||
/>
|
||||
<AddDiagnosisDialog
|
||||
:openAddDiagnosisDialog="openAddDiagnosisDialog"
|
||||
:updateZy="updateZy"
|
||||
:patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -155,10 +194,12 @@ import {
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
|
||||
import diagnosislist from '../diagnosis/diagnosislist.vue';
|
||||
import { onMounted, onBeforeUnmount } from 'vue';
|
||||
// const diagnosisList = ref([]);
|
||||
const allowAdd = ref(false);
|
||||
const tree = ref([]);
|
||||
const openDiagnosis = ref(false);
|
||||
const updateZy = ref([]);
|
||||
const openAddDiagnosisDialog = ref(false);
|
||||
const diagnosisSearchkey = ref('');
|
||||
const diagnosisOptions = ref([]);
|
||||
@@ -167,6 +208,7 @@ const diagnosis = ref();
|
||||
const orgOrUser = ref();
|
||||
const form = ref({
|
||||
diagnosisList: [],
|
||||
isDataLoaded: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
@@ -203,45 +245,46 @@ function getDetail(encounterId) {
|
||||
});
|
||||
}
|
||||
|
||||
function refreshData() {
|
||||
getList();
|
||||
}
|
||||
let maxNo = 99;
|
||||
function getList() {
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||
return;
|
||||
}
|
||||
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 为每个诊断项添加默认的诊断医生和时间(如果不存在)
|
||||
form.value.diagnosisList = res.data.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: item.diagnosisDoctor || props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: item.diagnosisTime || new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
|
||||
// 获取诊断列表后按排序号排序
|
||||
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
|
||||
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + (res.data.symptom[index]?.name || ''),
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
});
|
||||
});
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.diagnosisList = res.data;
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
|
||||
maxNo = form.value.diagnosisList.length;
|
||||
})
|
||||
.then(() => {
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
if (item.diagSrtNo <= maxNo) {
|
||||
return;
|
||||
}
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
typeName: '中医诊断',
|
||||
updateId:item.encounterDiagnosisId+'-'+res.data.symptom[index].encounterDiagnosisId,
|
||||
illnessDefinitionId : item.definitionId,
|
||||
symptomDefinitionId : res.data.symptom[index].definitionId,
|
||||
symptomYbNo: res.data.symptom[index].ybNo,
|
||||
});
|
||||
maxNo = item.diagSrtNo;
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -366,15 +409,10 @@ function getTree() {
|
||||
function handleAddDiagnosis() {
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// 计算现有最大排序号
|
||||
const maxSortNo = form.value.diagnosisList.length > 0
|
||||
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
|
||||
: 0;
|
||||
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
form.value.diagnosisList.push({
|
||||
showPopover: false,
|
||||
name: undefined,
|
||||
@@ -399,6 +437,7 @@ function handleAddDiagnosis() {
|
||||
|
||||
// 添加中医诊断
|
||||
function handleAddTcmDiagonsis() {
|
||||
updateZy.value = [];
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -414,6 +453,11 @@ function handleDeleteDiagnosis(row, index) {
|
||||
getTree();
|
||||
}
|
||||
});
|
||||
} else if (row.syndromeGroupNo) {
|
||||
deleteTcmDiagnosis(row.syndromeGroupNo).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
} else {
|
||||
form.value.diagnosisList.splice(index, 1);
|
||||
// 删除后不重新计算排序号,保持用户设置的排序不变
|
||||
@@ -487,9 +531,9 @@ function closeDiagnosisDialog(str) {
|
||||
if (str === 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
|
||||
openAddDiagnosisDialog.value = false;
|
||||
openDiagnosis.value = false;
|
||||
getList();
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -509,8 +553,24 @@ function handleSelsectDiagnosis(row) {
|
||||
}
|
||||
/**获取焦点时 打开列表 */
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
if(row.typeName==='中医诊断'){
|
||||
updateZy.value = [];
|
||||
updateZy.value.push({
|
||||
illnessDefinitionId: row.illnessDefinitionId,
|
||||
symptomDefinitionId: row.symptomDefinitionId,
|
||||
syndromeGroupNo: row.syndromeGroupNo,
|
||||
symptomYbNo:row.symptomYbNo,
|
||||
ybNo:row.ybNo,
|
||||
updateId: row.updateId,
|
||||
diagSrtNo: row.diagSrtNo,
|
||||
name:row.name,
|
||||
});
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}else{
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
}
|
||||
|
||||
}
|
||||
/**失去焦点时 关闭列表 */
|
||||
function handleBlur(row) {
|
||||
@@ -524,10 +584,10 @@ function handleNodeClick(data) {
|
||||
// 如果是根节点,不执行任何操作
|
||||
return;
|
||||
}
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
const isDuplicate = form.value.diagnosisList.some(
|
||||
(diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name
|
||||
);
|
||||
@@ -567,7 +627,10 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tree-with-scrollbar {
|
||||
max-height: 650px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-scrollbar height="200px">
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
max-height="400"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="prev, pager, next"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
@@ -31,9 +30,13 @@
|
||||
<script setup>
|
||||
import { getEmrTemplateList, deleteEmrTemplate } from '../api';
|
||||
|
||||
const queryParams = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
});
|
||||
const emrTemplate = ref([]);
|
||||
const emrTemplateRef = ref();
|
||||
const total = ref(0);
|
||||
const emits = defineEmits(['selectRow']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const selectRow = ref({});
|
||||
@@ -43,10 +46,11 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
getList();
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
total.value = res.data.total;
|
||||
emrTemplate.value = res.data.records;
|
||||
console.log(emrTemplate.value, 'emrTemplate.value');
|
||||
});
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisListOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.definitionId"
|
||||
:label="item.name + '--' + item.ybNo"
|
||||
:value="item.definitionId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -432,7 +432,7 @@ import { computed, onMounted, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
// import { useModal, useDict } from '@/hooks';
|
||||
import { parseTime, formatNumber } from '@/utils/his';
|
||||
import { queryYbCatalogue, getDiagnosisList } from './api';
|
||||
import { queryYbCatalogue, getDiagnosisListEle } from './api';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
import {
|
||||
@@ -565,7 +565,7 @@ const unitMap = ref({
|
||||
|
||||
function getInit(searchKey) {
|
||||
if(searchKey) {
|
||||
getDiagnosisList(searchKey).then(res => {
|
||||
getDiagnosisListEle(searchKey,infoForm.encounterId).then(res => {
|
||||
diagnosisListOption.value = res.data
|
||||
})
|
||||
}
|
||||
@@ -946,12 +946,12 @@ defineExpose({
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-table .cell {
|
||||
:deep(.el-table .cell) {
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中对齐 */
|
||||
}
|
||||
|
||||
::v-deep .el-table td {
|
||||
:deep(.el-table td) {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
</style>
|
||||
@@ -276,7 +276,6 @@ function getRowDisabled(row) {
|
||||
* 新增处方按钮操作
|
||||
*/
|
||||
function handleAddPrescription() {
|
||||
console.log('新增处方按钮操作 - 打开新增处方弹窗');
|
||||
title.value = '新增处方';
|
||||
openPrescriptionDialog();
|
||||
}
|
||||
|
||||
@@ -150,12 +150,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
placeholder="诊断"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
remote
|
||||
:remote-method="getDiagnosisInfo"
|
||||
style="width: 400px"
|
||||
>
|
||||
@@ -166,7 +166,10 @@
|
||||
:value="item.id"
|
||||
@click="handleDiagnosisChange(item)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="props.mainDiagnosis.name" disabled style="width: 400px" />
|
||||
<!-- 隐藏存储ID的字段 -->
|
||||
<input type="hidden" v-model="submitForm.diagnosisDefinitionId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -179,7 +182,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getInit,
|
||||
@@ -206,6 +209,7 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
mainDiagnosis: { type: Object, default: null },
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
@@ -244,9 +248,17 @@ const rules = reactive({
|
||||
});
|
||||
|
||||
function openDialog() {
|
||||
console.log('orgId==========>', props.patientInfo.orgId);
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records;
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
console.log('organization==========>', organization.value);
|
||||
submitForm.inHospitalOrgId =
|
||||
organization.value.find((item) => item.id === props.patientInfo.orgId)?.id || '';
|
||||
});
|
||||
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
@@ -256,6 +268,14 @@ function openDialog() {
|
||||
});
|
||||
console.log(props.patientInfo, 'patientInfo');
|
||||
getDiagnosisInfo(undefined);
|
||||
console.log(props.mainDiagnosis, 'mainDiagnosis');
|
||||
if (props.mainDiagnosis) {
|
||||
submitForm.diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisYbNo = props.mainDiagnosis.ybNo || '';
|
||||
submitForm.medTypeCode = props.mainDiagnosis.medTypeCode;
|
||||
diagnosisDefinitionList.value = [props.mainDiagnosis];
|
||||
}
|
||||
}
|
||||
|
||||
function getDiagnosisInfo(value) {
|
||||
@@ -333,4 +353,4 @@ function close() {
|
||||
.patInfo-value {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,34 +1,76 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
* @Description:
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// ====== 文书记录
|
||||
// 保存或更新记录
|
||||
export function saveOrUpdateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/saveOrUpdateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改记录
|
||||
export function updateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/updateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除历史记录
|
||||
export function deleteRecord(ids) {
|
||||
return request({
|
||||
url: '/document/record/deleteRecord',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 记录打印次数
|
||||
export function recordPrint(recordId) {
|
||||
return request({
|
||||
url: '/document/record/record-print',
|
||||
method: 'get',
|
||||
params: { recordId },
|
||||
});
|
||||
}
|
||||
//删除模板
|
||||
export function deleteTemplate(id) {
|
||||
return request({
|
||||
url: `/document/template/delete`,
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
@@ -37,24 +79,22 @@ export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
params: {definitionId}
|
||||
})
|
||||
params: { definitionId },
|
||||
});
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,29 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
|
||||
<el-scrollbar
|
||||
class="emr-history-scrollbar-container"
|
||||
style="width: 100%; height: calc(100vh - 300px)"
|
||||
>
|
||||
<div
|
||||
v-for="item in historyData"
|
||||
:key="item.id"
|
||||
class="scrollbar-item"
|
||||
:class="{ 'selected-history-item': item.id === props.selectedRecordId }"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
|
||||
<el-icon
|
||||
class="ml-2"
|
||||
style="margin-left: 26px; cursor: pointer"
|
||||
:disabled="item.printCount && item.printCount > 0"
|
||||
:class="{ 'disabled-icon': item.printCount && item.printCount > 0 }"
|
||||
@click.stop="handleDelete(item)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -20,8 +38,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
@@ -31,6 +49,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
selectedRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
@@ -59,14 +81,30 @@ const queryList = async () => {
|
||||
historyData.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
// ElMessage.error(' 获取模板树失败 ');
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
const currentSelectTemplate = ref({});
|
||||
// 删除历史记录
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 检查是否已打印
|
||||
if (item.printCount && item.printCount > 0) {
|
||||
ElMessage.warning('已打印的记录不允许删除');
|
||||
return;
|
||||
}
|
||||
|
||||
await deleteRecord([item.id]);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
@@ -90,6 +128,16 @@ defineExpose({ queryList });
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.selected-history-item {
|
||||
background-color: rgb(194, 231, 255);
|
||||
}
|
||||
|
||||
.disabled-icon {
|
||||
color: #d9d9d9;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,15 @@
|
||||
</div> -->
|
||||
<el-scrollbar class="emr-template-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in templateData" :key="item.id" class="scrollbar-item">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="`${item.name}`"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}`" placement="bottom">
|
||||
<el-text class="2" truncated @click="handleNodeClick(item)">
|
||||
<div class="template-item">{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
</el-space></div>
|
||||
|
||||
<div class="template-item">
|
||||
{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
<el-icon><Delete @click="handleDelete(item)" /></el-icon>
|
||||
</el-space>
|
||||
</div>
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -29,11 +27,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getListByDefinitionId } from '../api';
|
||||
import { getListByDefinitionId, deleteTemplate } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick','edit']);
|
||||
const emits = defineEmits(['templateClick', 'edit']);
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
@@ -53,15 +51,24 @@ const queryParams = ref({
|
||||
isPage: 0,
|
||||
});
|
||||
const templateData = ref([]);
|
||||
// 删除模板
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
await deleteTemplate(item.id);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if ( unref(definitionId)&&unref(definitionId) !== '') {
|
||||
if (unref(definitionId) && unref(definitionId) !== '') {
|
||||
const res = await getListByDefinitionId(unref(definitionId));
|
||||
templateData.value = res.data || [];
|
||||
}else{
|
||||
} else {
|
||||
templateData.value = [];
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板失败');
|
||||
templateData.value = [];
|
||||
@@ -79,34 +86,33 @@ defineExpose({ queryList });
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-template-container {
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container{
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container {
|
||||
padding: 8px;
|
||||
height: 100%;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text{
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text {
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-18 15:41:10
|
||||
* @Description: 门诊病历组件
|
||||
-->
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div
|
||||
@@ -48,18 +43,21 @@
|
||||
<!-- <el-button type="primary" @click="newEmr">新建</el-button> -->
|
||||
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
|
||||
<el-button @click="refresh">刷新</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<!-- <el-button type="primary" @click="print">打印</el-button> -->
|
||||
<el-button type="primary" @click="print">打印</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="operate-main">
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
<div v-loading="loading" class="loading-container">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,6 +70,7 @@
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
:selectedRecordId="selectedHistoryRecordId"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
@@ -95,18 +94,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { addRecord, addTemplate } from './api';
|
||||
import { saveOrUpdateRecord, addTemplate, getRecordByEncounterIdList, recordPrint } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
// import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { getEncounterDiagnosis } from '../api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['emrSaved']);
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
@@ -129,6 +129,7 @@ const queryParams = ref({
|
||||
useRanges: [1, 2], // 0 暂不使用 1 全院 2 科室 3 个人
|
||||
organizationId: userStore.orgId,
|
||||
});
|
||||
const loading = ref(false); // 数据加载状态
|
||||
|
||||
const currentSelectTemplate = ref({
|
||||
id: '',
|
||||
@@ -138,6 +139,7 @@ const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
const templateTree = ref(null);
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
@@ -150,6 +152,9 @@ const queryTemplateTree = async () => {
|
||||
try {
|
||||
const res = await getTreeList(queryParams.value);
|
||||
templateData.value = res.data || [];
|
||||
|
||||
// 组件挂载后,患者信息变化时会自动调用selectDefaultTemplate
|
||||
// 这里不再重复调用,避免重复操作
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
templateData.value = [];
|
||||
@@ -169,7 +174,20 @@ const handleNodeClick = (data, node) => {
|
||||
};
|
||||
// currentComponent.value = null;
|
||||
}
|
||||
historyRef.value?.queryList();
|
||||
|
||||
// 确保组件状态更新后再查询历史记录
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
|
||||
// 选择任何病历模板后,都加载该病历类型的最新历史记录
|
||||
if (node.isLeaf && props.patientInfo && props.patientInfo.patientId) {
|
||||
loadLatestMedicalRecord();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
@@ -229,19 +247,24 @@ const handleSubmitOk = async (data) => {
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
await addRecord(editForm.value);
|
||||
ElMessage.success('病历保存成功');
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
ElMessage.success('保存成功');
|
||||
|
||||
// 刷新历史记录列表
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
// 通知父组件病历保存成功
|
||||
emits('emrSaved', true);
|
||||
|
||||
// 等待历史记录列表更新后,重新加载最新病历并更新选中状态
|
||||
setTimeout(() => {
|
||||
loadLatestMedicalRecord();
|
||||
}, 100);
|
||||
} catch (error) {
|
||||
ElMessage.error('提交失败');
|
||||
console.log(error);
|
||||
}
|
||||
} else if (currentOperate.value === 'addTemplate') {
|
||||
// 新增或者编辑模板
|
||||
// editTemplateForm.value.id=
|
||||
// 新增或修改模板
|
||||
editTemplateForm.value.name =
|
||||
currentSelectTemplate.value.name + dayjs().format('YYYY/MM/DD HH:mm');
|
||||
editTemplateForm.value.contextJson = JSON.stringify(data);
|
||||
@@ -256,17 +279,12 @@ const refresh = () => {
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
const deleteEmr = async () => {
|
||||
try {
|
||||
// 这里应该添加实际的删除逻辑
|
||||
ElMessage.success('删除成功!');
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
if (editForm.value && editForm.value.printCount && editForm.value.printCount > 0) {
|
||||
ElMessage.warning('该病历已打印,不允许修改');
|
||||
return;
|
||||
}
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
@@ -274,6 +292,50 @@ const save = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 重置表单数据
|
||||
const resetForm = async () => {
|
||||
try {
|
||||
// 重置editForm为初始值
|
||||
editForm.value = {
|
||||
id: '',
|
||||
definitionId: '',
|
||||
definitionBusNo: '',
|
||||
contentJson: '',
|
||||
statusEnum: 1,
|
||||
organizationId: 0,
|
||||
encounterId: '',
|
||||
patientId: '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy: '',
|
||||
source: '',
|
||||
};
|
||||
|
||||
// 先将组件设置为空,强制卸载
|
||||
const currentComponentName = currentComponent.value;
|
||||
if (currentComponentName) {
|
||||
currentComponent.value = '';
|
||||
|
||||
// 等待DOM更新
|
||||
await nextTick();
|
||||
|
||||
// 重新加载组件
|
||||
currentComponent.value = currentComponentName;
|
||||
|
||||
// 再次等待DOM更新后设置空数据
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
// 重置动态组件表单数据
|
||||
if (emrComponentRef.value && emrComponentRef.value.setFormData) {
|
||||
emrComponentRef.value.setFormData({});
|
||||
}
|
||||
|
||||
ElMessage.success('表单已重置');
|
||||
} catch (error) {
|
||||
ElMessage.error('重置表单失败');
|
||||
}
|
||||
};
|
||||
|
||||
const historyRef = ref(null);
|
||||
const handleHistoryClick = (data) => {
|
||||
newEmr();
|
||||
@@ -282,11 +344,115 @@ const handleHistoryClick = (data) => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
|
||||
});
|
||||
};
|
||||
|
||||
// 默认选中门诊病历模板
|
||||
const selectOutpatientMedicalRecordTemplate = async () => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
await queryTemplateTree();
|
||||
}
|
||||
|
||||
// 查找门诊病历模板
|
||||
const findOutpatientTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findOutpatientTemplate(node.children);
|
||||
if (found) return found;
|
||||
}
|
||||
if (
|
||||
node.document &&
|
||||
node.document.name &&
|
||||
(node.document.name.includes('门诊病历') ||
|
||||
node.document.name === '门诊病历 (1.0.0)' ||
|
||||
node.document.name === '门诊病历(1.0.0)')
|
||||
) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const outpatientTemplateNode = findOutpatientTemplate(templateData.value);
|
||||
if (outpatientTemplateNode) {
|
||||
//选中节点
|
||||
nextTick(() => {
|
||||
if (templateTree.value && outpatientTemplateNode.id) {
|
||||
templateTree.value.setCurrentKey(outpatientTemplateNode.id);
|
||||
}
|
||||
|
||||
// 选中门诊病历模板
|
||||
handleNodeClick(outpatientTemplateNode, {
|
||||
isLeaf: true,
|
||||
data: outpatientTemplateNode,
|
||||
});
|
||||
|
||||
// 等待模板加载完成,然后获取并回显最新病历数据
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
loadLatestMedicalRecord();
|
||||
}, 500);
|
||||
});
|
||||
} else {
|
||||
ElMessage.info('未找到门诊病历模板');
|
||||
}
|
||||
};
|
||||
|
||||
// 当前选中的历史病历ID,用于在History组件中高亮显示
|
||||
const selectedHistoryRecordId = ref('');
|
||||
|
||||
// 加载最新的病历数据并回显
|
||||
const loadLatestMedicalRecord = async () => {
|
||||
if (!patientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
const historyRecords = res.data || [];
|
||||
if (historyRecords.length > 0) {
|
||||
// 按时间排序,获取最新的病历记录
|
||||
historyRecords.sort((a, b) => new Date(b.recordTime) - new Date(a.recordTime));
|
||||
const latestRecord = historyRecords[0];
|
||||
|
||||
// 保存最新病历ID,用于在History组件中高亮显示
|
||||
selectedHistoryRecordId.value = latestRecord.id;
|
||||
|
||||
// 自动回显最新病历数据到模板
|
||||
editForm.value = latestRecord;
|
||||
nextTick(() => {
|
||||
if (emrComponentRef.value && latestRecord.contentJson) {
|
||||
emrComponentRef.value.setFormData(JSON.parse(latestRecord.contentJson));
|
||||
}
|
||||
|
||||
// 通知History组件更新选中状态
|
||||
if (historyRef.value && typeof historyRef.value.updateSelectedRecord === 'function') {
|
||||
historyRef.value.updateSelectedRecord(latestRecord.id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('加载最新病历数据失败');
|
||||
// 出错时也清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
const templateRef = ref(null);
|
||||
|
||||
const handleTemplateClick = (data) => {
|
||||
newEmr();
|
||||
editForm.value = data;
|
||||
editForm.value.id = '';
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
nextTick(() => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contextJson));
|
||||
});
|
||||
@@ -299,39 +465,77 @@ const templateEdit = (data) => {
|
||||
const templateEditVisible = ref(false);
|
||||
// const templateEditSubmitOk = () => {};
|
||||
|
||||
// 打印方法实现
|
||||
// 定义病历模板类型与打印模板的映射关系
|
||||
const templateToPrintTemplateMap = {
|
||||
// 手术记录相关模板
|
||||
手术记录: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
'手术记录(1.0.0)': PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
tySurgicalRecord: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
// 门诊病历相关模板
|
||||
门诊病历: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
'门诊病历(1.0.0)': PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
测试新增: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
};
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const getPrintTemplateByTemplateName = (templateName) => {
|
||||
// 默认使用门诊病历模板
|
||||
let printTemplate = PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD;
|
||||
|
||||
if (templateName) {
|
||||
for (const [key, value] of Object.entries(templateToPrintTemplateMap)) {
|
||||
if (templateName.includes(key)) {
|
||||
printTemplate = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return printTemplate;
|
||||
};
|
||||
|
||||
// 打印
|
||||
const print = async () => {
|
||||
try {
|
||||
// 检查是否有选中的病历模板
|
||||
if (!currentSelectTemplate.value || !currentSelectTemplate.value.id) {
|
||||
ElMessage.warning('请先选择病历模板');
|
||||
return;
|
||||
}
|
||||
// 检查是否已保存
|
||||
if (!editForm.value.id || editForm.value.id === '') {
|
||||
ElMessage.warning('请先保存病历后再进行打印');
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取当前病历组件的表单数据
|
||||
const formData = emrComponentRef.value?.formData || {};
|
||||
|
||||
// 准备打印数据(不依赖子组件的getPrintData方法)
|
||||
// const printData = {
|
||||
// // 使用当前选中的模板信息
|
||||
// templateInfo: currentSelectTemplate.value,
|
||||
// // 添加患者信息
|
||||
// patientInfo: props.patientInfo,
|
||||
// // 添加打印时间
|
||||
// printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// // 添加基本病历信息
|
||||
// emrInfo: {
|
||||
// documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
// documentId: currentSelectTemplate.value.id || '',
|
||||
// encounterId: props.patientInfo.encounterId || '',
|
||||
// patientId: props.patientInfo.patientId || '',
|
||||
// recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
// // 添加病历表单数据(包含红框内的所有字段)
|
||||
// formData: formData,
|
||||
// doctorName: userStore.nickName,
|
||||
// };
|
||||
// 获取诊断数据
|
||||
let diagnosisList = [];
|
||||
let diagnosisText = '';
|
||||
if (props.patientInfo && props.patientInfo.encounterId) {
|
||||
try {
|
||||
const diagnosisRes = await getEncounterDiagnosis(props.patientInfo.encounterId);
|
||||
diagnosisList = diagnosisRes.data || [];
|
||||
// 格式化诊断文本,区分主诊断和其他诊断
|
||||
diagnosisText = diagnosisList
|
||||
.map((item) => {
|
||||
const prefix = item.maindiseFlag === 1 ? '[主]' : '';
|
||||
return `${prefix}${item.name || ''}`;
|
||||
})
|
||||
.join(';');
|
||||
} catch (error) {
|
||||
ElMessage.error('获取诊断数据失败');
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前模板名称
|
||||
const templateName = currentSelectTemplate.value.name || '';
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const selectedPrintTemplate = getPrintTemplateByTemplateName(templateName);
|
||||
|
||||
// 打印数据
|
||||
const printData = {
|
||||
// 模板信息
|
||||
templateName: currentSelectTemplate.value.name || '住院病历',
|
||||
@@ -355,21 +559,42 @@ const print = async () => {
|
||||
department: props.patientInfo.department || '',
|
||||
attendingDoctor: props.patientInfo.attendingDoctor || '',
|
||||
|
||||
// 诊断信息
|
||||
diagnosisList: JSON.stringify(diagnosisList),
|
||||
diagnosisText: diagnosisText,
|
||||
|
||||
// 病历信息
|
||||
documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
documentId: currentSelectTemplate.value.id || '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
|
||||
//病历号
|
||||
busNo: props.patientInfo.busNo || '',
|
||||
//费用类型
|
||||
contractName: props.patientInfo.contractName || '',
|
||||
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
console.log('打印数据:', printData);
|
||||
|
||||
// 执行打印,使用根据模板类型选择的打印模板
|
||||
await simplePrint(selectedPrintTemplate, printData);
|
||||
|
||||
// 调用打印记录接口
|
||||
try {
|
||||
await recordPrint(editForm.value.id);
|
||||
|
||||
// 刷新历史记录列表,确保删除按钮状态根据最新的printCount值更新
|
||||
historyRef.value?.queryList();
|
||||
} catch (printLogError) {
|
||||
ElMessage.error('保存打印记录失败');
|
||||
// 打印记录失败不影响打印成功提示
|
||||
}
|
||||
|
||||
// 执行打印
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD, printData);
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
ElMessage.error('打印失败: ' + (error.message || '未知错误'));
|
||||
}
|
||||
};
|
||||
@@ -403,44 +628,100 @@ const templateEditSubmitOk = () => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
// onBeforeMount(() => {});
|
||||
// 刚进页面默认显示门诊病历
|
||||
|
||||
// 选择默认模板 - 获取门诊病历分类下的第一个模板
|
||||
const selectDefaultTemplate = () => {
|
||||
nextTick(() => {
|
||||
// 查找门诊病历(1.0.0)节点
|
||||
const findTemplate = (nodes) => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
console.log('模板数据为空,无法选择默认模板');
|
||||
return;
|
||||
}
|
||||
|
||||
// 查找门诊病历分类节点,然后获取其下的第一个模板
|
||||
const findOutpatientRecordCategoryAndFirstTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
// 检查是否是门诊病历分类节点
|
||||
if (!node.document && node.name && node.name.includes('门诊病历')) {
|
||||
// 这是一个分类节点,检查是否有子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
// 返回第一个有document属性的子节点(即第一个模板)
|
||||
for (const child of node.children) {
|
||||
if (child.document) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 递归查找子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findTemplate(node.children);
|
||||
const found = findOutpatientRecordCategoryAndFirstTemplate(node.children);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
// 根据ID查找门诊病历模板
|
||||
if (node.document && node.document.id === '1963474077201162242') {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const defaultTemplate = findTemplate(templateData.value);
|
||||
const defaultTemplate = findOutpatientRecordCategoryAndFirstTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
nextTick(() => {
|
||||
templateTree.value?.setCurrentKey(defaultTemplate.id);
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
|
||||
// 直接加载最新病历数据,不再使用额外的setTimeout延迟
|
||||
// 因为handleNodeClick中已经有nextTick和setTimeout处理组件渲染
|
||||
loadLatestMedicalRecord();
|
||||
});
|
||||
} else {
|
||||
console.log('未找到门诊病历模板');
|
||||
}
|
||||
});
|
||||
};
|
||||
// 监听患者信息变化,实现联动显示
|
||||
watch(
|
||||
() => props.patientInfo,
|
||||
(newPatientInfo) => {
|
||||
// 当患者信息变化时,默认选中门诊病历模板并加载最新病历数据
|
||||
if (newPatientInfo && newPatientInfo.patientId && Object.keys(newPatientInfo).length > 0) {
|
||||
// 确保模板树已经加载
|
||||
if (templateData.value && templateData.value.length > 0) {
|
||||
// 优先尝试使用更精确的selectDefaultTemplate函数
|
||||
selectDefaultTemplate();
|
||||
} else {
|
||||
// 重新加载模板树
|
||||
queryTemplateTree().then(() => {
|
||||
// 使用nextTick确保DOM更新,移除setTimeout避免多次渲染
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
console.log('hospitalizationEmr mounted', userStore);
|
||||
await queryTemplateTree();
|
||||
selectDefaultTemplate();
|
||||
// 组件挂载完成后,如果已有患者信息,默认选中门诊病历模板
|
||||
if (
|
||||
props.patientInfo &&
|
||||
props.patientInfo.patientId &&
|
||||
Object.keys(props.patientInfo).length > 0
|
||||
) {
|
||||
// 使用nextTick确保模板树数据已更新
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
// defineExpose({ state }); // state未使用
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
@@ -554,12 +835,29 @@ const disNode_R = () => {
|
||||
}
|
||||
|
||||
.operate-main {
|
||||
height: calc(100vh - 150px);
|
||||
flex: auto;
|
||||
flex: 1;
|
||||
min-height: 0; /* 允许flex子项高度收缩 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
/* 确保滚动条样式正常 */
|
||||
-ms-overflow-style: auto;
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
/* 确保动态加载的组件不会破坏布局 */
|
||||
.operate-main .template-tree-scrollbar > .loading-container {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 确保组件内部内容不会溢出 */
|
||||
.operate-main .template-tree-scrollbar > * {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,4 +879,10 @@ const disNode_R = () => {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载状态样式 */
|
||||
.loading-container {
|
||||
min-height: 400px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span>{{ item.prescriptionNo }}</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,14 +59,6 @@
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="收款金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="发放状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.dispenseStatus != 0" type="danger">
|
||||
{{ scope.row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="default">{{ scope.row.serviceStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付状态" align="center" prop="refundStatus_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<!-- consumableDialog.vue -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="皮试检查"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="consumable-dialog">
|
||||
<div class="dialog-header">
|
||||
<el-alert
|
||||
title="下列药品需要执行皮试项目,请确认,点击确定将自动添加皮试检查项目到医嘱列表"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
ref="consumableTableRef"
|
||||
:data="consumableList"
|
||||
row-key="orderDefinitionId"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="adviceName" align="center" label="项目名称" />
|
||||
<el-table-column prop="unitCodeName" label="单位" align="center" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCodeName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行次数" align="center" width="120">
|
||||
<template #default="scope">
|
||||
{{ '1' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link size="small" @click="handleDeleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 下次不再提示复选框 -->
|
||||
<div class="dont-show-again">
|
||||
<!-- <el-checkbox v-model="dontShowAgain" @change="handleDontShowAgainChange">
|
||||
下次不再提示
|
||||
</el-checkbox> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button ref="submitRef" type="primary" @click="handleSubmit">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, nextTick, onBeforeUnmount } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const consumableList = ref([]);
|
||||
const consumableTableRef = ref();
|
||||
const submitRef = ref();
|
||||
const dontShowAgain = ref(false); // 下次不再提示的状态
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(['submit']);
|
||||
|
||||
// 键盘事件处理函数
|
||||
const handleKeyDown = (event) => {
|
||||
// 检查是否按下了回车键
|
||||
if (event.key === 'Enter' && dialogVisible.value) {
|
||||
event.preventDefault();
|
||||
handleSubmit();
|
||||
}
|
||||
};
|
||||
|
||||
// 打开弹窗方法
|
||||
const open = (data) => {
|
||||
consumableList.value = data;
|
||||
dialogVisible.value = true;
|
||||
|
||||
// 默认全选
|
||||
nextTick(() => {
|
||||
if (consumableTableRef.value) {
|
||||
consumableList.value.forEach((row) => {
|
||||
consumableTableRef.value.toggleRowSelection(row, true);
|
||||
});
|
||||
}
|
||||
// 注册键盘事件监听器
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
};
|
||||
|
||||
// 关闭弹窗方法
|
||||
const handleClose = () => {
|
||||
// 移除键盘事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 页面卸载前清理事件监听器
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
|
||||
// 删除行处理
|
||||
const handleDeleteRow = (row) => {
|
||||
ElMessageBox.confirm(`确定要删除 "${row.orderDefinitionName}" 吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
const index = consumableList.value.findIndex(
|
||||
(item) => item.orderDefinitionId === row.orderDefinitionId
|
||||
);
|
||||
if (index > -1) {
|
||||
consumableList.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 提交处理
|
||||
const handleSubmit = () => {
|
||||
const selectedRows = consumableTableRef.value.getSelectionRows();
|
||||
// 保存到本地存储
|
||||
// localStorage.setItem('doctor' + userStore.id.toString(), dontShowAgain.value);
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请至少选择一项');
|
||||
return;
|
||||
}
|
||||
// 发送事件给父组件
|
||||
emit('submit', selectedRows);
|
||||
// 关闭弹窗并清理事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
open,
|
||||
close: handleClose,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.consumable-dialog {
|
||||
.dialog-header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dont-show-again {
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dialog-footer-summary {
|
||||
text-align: right;
|
||||
|
||||
.summary-text {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
|
||||
.total-amount {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #e64545;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检查报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingCheck }"
|
||||
@click="handleRefreshCheck"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingCheck"
|
||||
:data="checkReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检验报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingInspection }"
|
||||
@click="handleRefreshInspection"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingInspection"
|
||||
:data="inspectionReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { getProofResult, getTestResult } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const checkReportList = ref([]);
|
||||
const inspectionReportList = ref([]);
|
||||
const loadingCheck = ref(false);
|
||||
const loadingInspection = ref(false);
|
||||
|
||||
const fetchCheckReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getTestResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
checkReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchInspectionReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getProofResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
inspectionReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchAll = async () => {
|
||||
if (!props.patientInfo?.encounterId) {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
return;
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
if (loadingCheck.value || !props.patientInfo?.encounterId) return;
|
||||
loadingCheck.value = true;
|
||||
try {
|
||||
await fetchCheckReport();
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshInspection = async () => {
|
||||
if (loadingInspection.value || !props.patientInfo?.encounterId) return;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await fetchInspectionReport();
|
||||
} finally {
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.patientInfo?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchAll();
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
max-height: 55%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.report-link-disabled {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,259 @@
|
||||
const formData = reactive({
|
||||
//医院信息
|
||||
hospitalInfo: {
|
||||
//组织机构代码
|
||||
medins_orgcode: '',
|
||||
//医疗付款方式
|
||||
medfee_paymtd_code: '',
|
||||
},
|
||||
//患者信息
|
||||
patientInfo: {
|
||||
// 健康卡号
|
||||
healthCardNo: '',
|
||||
// 患者姓名
|
||||
patient_name: '',
|
||||
// 患者性别
|
||||
gend: '',
|
||||
// 出生日期
|
||||
brdy: '',
|
||||
// 年龄
|
||||
age: '',
|
||||
// 国籍
|
||||
ntly: '中国',
|
||||
// 籍贯
|
||||
napl: '',
|
||||
// 民族
|
||||
naty: '1',
|
||||
// 身份证号
|
||||
certno: '',
|
||||
// 户口住址
|
||||
resd_addr: '',
|
||||
// 工作单位地址
|
||||
empr_addr: '',
|
||||
// 联系人姓名
|
||||
coner_name: '',
|
||||
// 关系
|
||||
coner_rlts_code: '',
|
||||
// 联系人地址
|
||||
coner_addr: '',
|
||||
// 联系人电话
|
||||
coner_tel: '',
|
||||
},
|
||||
// 住院信息
|
||||
admission: {
|
||||
// 第几次住院
|
||||
patn_ipt_cnt: 1,
|
||||
// 住院号
|
||||
ipt_no: '',
|
||||
// 病案号
|
||||
medcasno: '',
|
||||
// 入院途径
|
||||
adm_way_code: '',
|
||||
// 入院时间
|
||||
adm_time: '',
|
||||
// 入院科室
|
||||
adm_dept_name: '',
|
||||
// 病房
|
||||
adm_ward: '',
|
||||
// 确诊日期
|
||||
adm_date: '',
|
||||
// 出院时间
|
||||
dscg_date: '',
|
||||
// 出院科室
|
||||
dscg_caty: '',
|
||||
// 病房
|
||||
dscg_ward: '',
|
||||
// 实际住院天数
|
||||
act_ipt_days: '',
|
||||
},
|
||||
// 诊断信息
|
||||
diagnosis: {
|
||||
// 主要诊断
|
||||
mainDiagnosis: '',
|
||||
// 其他诊断
|
||||
otherDiagnosis: '',
|
||||
},
|
||||
// 诊断信息
|
||||
diagnosisList: [],
|
||||
// 医疗信息
|
||||
medicalInfo: {
|
||||
// 是否输血
|
||||
bloodTransfusion: '',
|
||||
// 血型
|
||||
abo_code: '',
|
||||
// rh类型
|
||||
rh_code: '',
|
||||
// 药物过敏史
|
||||
die_autp_flag: '',
|
||||
},
|
||||
// 医师信息
|
||||
doctorInfo: {
|
||||
// 科主任
|
||||
deptdrt_name: '',
|
||||
// 副主任
|
||||
chfdr_name: '',
|
||||
// 主治医师
|
||||
chfpdr_name: '',
|
||||
// 住院医师
|
||||
ipt_dr_name: '',
|
||||
// 责任护士
|
||||
resp_nurs_name: '',
|
||||
// 住院总医师
|
||||
chiefResident: '',
|
||||
// 实习医师
|
||||
intn_dr_name: '',
|
||||
// 病案质量
|
||||
medcas_qlt_code: '',
|
||||
// 编码员
|
||||
codr_name: '',
|
||||
// 控制日期
|
||||
qltctrl_date: '',
|
||||
},
|
||||
// 病案首页2
|
||||
medicalSecond: {
|
||||
// 手术方式
|
||||
surgeryType: '',
|
||||
// 离院方式
|
||||
dscg_way: '',
|
||||
// 31天是否计划出院
|
||||
dscg_31days_rinp_flag: '',
|
||||
// 目的
|
||||
dscg_31days_rinp_pup: '',
|
||||
//昏迷时间---入院前
|
||||
brn_damg_bfadm_coma_dura: '',
|
||||
//昏迷时间---入院后
|
||||
brn_damg_afadm_coma_dura: '',
|
||||
// 肿瘤分期
|
||||
tumorStaging: '',
|
||||
// T
|
||||
tumor_T: '',
|
||||
// N
|
||||
tumor_N: '',
|
||||
// M
|
||||
tumor_M: '',
|
||||
// 判断依据
|
||||
judgmentBase: '',
|
||||
// 分化程度
|
||||
bkup_deg_code: '',
|
||||
// 临床路径
|
||||
enterPath: '',
|
||||
// 变异
|
||||
mutation: '',
|
||||
// 退出路径
|
||||
outPath: '',
|
||||
// 特级护理
|
||||
nursingLevel_spec: '',
|
||||
// 1级护理
|
||||
nursingLevel_1: '',
|
||||
// 2级护理
|
||||
nursingLevel_2: '',
|
||||
// 3级护理
|
||||
nursingLevel_3: '',
|
||||
// 呼吸机使用
|
||||
use_vent_flag: '',
|
||||
// 有创呼吸机使用小时
|
||||
vent_used_dura: '',
|
||||
// 手术表
|
||||
surgery_tableData: [],
|
||||
},
|
||||
// 病案首页3
|
||||
// 住院费用
|
||||
hospitalization: {
|
||||
// 总费用
|
||||
medfee_sumamt: '',
|
||||
// 自付金额
|
||||
selfpay_amt: '',
|
||||
},
|
||||
// 综合医疗服务类
|
||||
medicalServices: {
|
||||
// 一般医疗服务类
|
||||
ordn_med_servfee: '',
|
||||
// 一般治疗操作费
|
||||
ordn_trt_oprt_fee: '',
|
||||
// 护理费
|
||||
nurs_fee: '',
|
||||
// 其他费用
|
||||
com_med_serv_oth_fee: '',
|
||||
},
|
||||
// 诊断类
|
||||
diagnosisClass: {
|
||||
// 病理诊断
|
||||
palg_diag_fee: '',
|
||||
// 实验室诊断
|
||||
lab_diag_fee: '',
|
||||
// 影像学诊断
|
||||
rdhy_diag_fee: '',
|
||||
// 临床诊断
|
||||
clnc_dise_fee: '',
|
||||
},
|
||||
// 治疗类
|
||||
treatmentClass: {
|
||||
// 非手术治疗项目费
|
||||
nsrgtrt_item_fee: '',
|
||||
// 临床物理治疗
|
||||
clnc_phys_trt_fee: '',
|
||||
// 手术治疗费
|
||||
rgtrt_trt_fee: '',
|
||||
// 麻醉费
|
||||
anst_fee: '',
|
||||
// 手术费
|
||||
rgtrt_fee: '',
|
||||
},
|
||||
// 康复类
|
||||
recoveryClass: {
|
||||
// 康复费
|
||||
rhab_fee: '',
|
||||
},
|
||||
// 中医类
|
||||
TCMClass: {
|
||||
// 中医治疗费
|
||||
tcm_trt_fee: '',
|
||||
},
|
||||
// 西药类
|
||||
WesternClass: {
|
||||
// 西药费
|
||||
wm_fee: '',
|
||||
// 抗菌药物费
|
||||
abtl_medn_fee: '',
|
||||
},
|
||||
// 中药类
|
||||
chineseClass: {
|
||||
//中成药
|
||||
tcmpat_fee: '',
|
||||
// 中草药
|
||||
tcmherb_fee: '',
|
||||
},
|
||||
// 血液和血液制品类
|
||||
bloodClass: {
|
||||
// 血费
|
||||
blo_fee: '',
|
||||
// 蛋白类制品费
|
||||
albu_fee: '',
|
||||
// 球蛋白制品费
|
||||
glon_fee: '',
|
||||
// 凝血因子制品费
|
||||
clotfac_fee: '',
|
||||
// 细胞因子制品费
|
||||
cyki_fee: '',
|
||||
},
|
||||
// 耗材类
|
||||
consumablesClass: {
|
||||
// 检查用一次性医用材料费
|
||||
exam_dspo_matl_fee: '',
|
||||
// 治疗用一次性医用材料费
|
||||
trt_dspo_matl_fee: '',
|
||||
// 手术用一次性医用材料费
|
||||
oprn_dspo_matl_fee: '',
|
||||
},
|
||||
// 其他类
|
||||
otherClass: {
|
||||
// 其他费用
|
||||
oth_fee: '',
|
||||
},
|
||||
// 其他诊断及手术附加页
|
||||
other_tableData: [],
|
||||
// 手术操作数组
|
||||
surgery_tableData: [],
|
||||
});
|
||||
|
||||
export default formData;
|
||||
@@ -3,7 +3,7 @@
|
||||
<div
|
||||
class="prescription-section"
|
||||
v-for="(prescription, pIndex) in tcmPrescriptionList"
|
||||
:key="pIndex"
|
||||
:key="prescription.id"
|
||||
>
|
||||
<div class="section-header">
|
||||
<div class="title first-prescription">
|
||||
@@ -18,18 +18,20 @@
|
||||
<plus />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="delete-icon"
|
||||
title="删除处方单"
|
||||
@click="handleDeletePrescriptionClick(pIndex)"
|
||||
:class="{ 'disabled-icon': isPrescriptionDeletable(pIndex) !== true }"
|
||||
style="font-size: 20px !important; margin-left: 10px; color: #f56c6c"
|
||||
class="add-icon"
|
||||
title="删除处方"
|
||||
@click="deletePrescription(prescription)"
|
||||
style="font-size: 26px !important; margin-left: 10px; color: red"
|
||||
>
|
||||
<minus />
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<span class="summary-item">药品数: {{ getPrescriptionMedicineCount(pIndex) }}种</span>
|
||||
<span class="summary-item">总价: ¥ {{ getPrescriptionTotalPrice(pIndex) }}</span>
|
||||
<span class="summary-item">
|
||||
药品数:
|
||||
{{ prescription.prescriptionList ? prescription.prescriptionList.length : '0' }}种
|
||||
</span>
|
||||
<span class="summary-item">总价: ¥ {{ calculatePrescriptionTotal(pIndex) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -41,6 +43,9 @@
|
||||
<el-button type="danger" plain @click="handleDelete(pIndex)" :disabled="false">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handlePrint(pIndex)" :disabled="false">
|
||||
打印
|
||||
</el-button>
|
||||
</div>
|
||||
<div
|
||||
class="doctor-station"
|
||||
@@ -69,10 +74,8 @@
|
||||
:value="item.accountId"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="doctor-station"> 配方名称: </span>
|
||||
<el-input v-model="formulaName" placeholder=" " style="width: 100px" />
|
||||
<span class="doctor-station"> 用药途径: </span>
|
||||
<el-select v-model="methodCode" placeholder="费用性质" style="width: 120px">
|
||||
<span class="doctor-station"> 用法: </span>
|
||||
<el-select v-model="prescription.methodCode" placeholder="用法" style="width: 120px">
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
:key="dict.value"
|
||||
@@ -134,7 +137,6 @@
|
||||
<span class="doctor-station" style="float: right"> </span>
|
||||
</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="prescriptionRef"
|
||||
:data="prescription.prescriptionList"
|
||||
row-key="uniqueKey"
|
||||
@@ -243,21 +245,23 @@
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<span class="doctor-station"> 脚注: </span>
|
||||
<!-- 单次剂量 -->
|
||||
<el-form-item
|
||||
label="特殊煎法:"
|
||||
prop="dosageInstruction"
|
||||
class="required-field"
|
||||
data-prop="dosageInstruction"
|
||||
>
|
||||
<el-select
|
||||
v-model="footNote"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
style="width: 120px; margin-right: 20px"
|
||||
placeholder="">
|
||||
<el-option
|
||||
v-for="dict in hjerbal_footnotes"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value">
|
||||
</el-option>
|
||||
v-model="scope.row.dosageInstruction"
|
||||
style="width: 90px; margin-right: 20px"
|
||||
placeholder=" "
|
||||
>
|
||||
<template v-for="item in dosage_instruction" :key="item.value">
|
||||
<el-option :value="item.value" :label="item.label" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<span class="total-amount">
|
||||
总金额:{{
|
||||
@@ -360,7 +364,7 @@
|
||||
? formatNumber(scope.row.quantity) +
|
||||
' ' +
|
||||
scope.row.doseUnitCode_dictText +
|
||||
' (' +
|
||||
' (' +
|
||||
scope.row.chineseHerbsDoseQuantity +
|
||||
'付)'
|
||||
: ''
|
||||
@@ -401,10 +405,10 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<tcmdiagnosisDialog ref="tcmDianosis" :patientInfo="props.patientInfo" @flush="handleDiagnosisFlush()" />
|
||||
<tcmdiagnosisDialog ref="tcmDianosis" :patientInfo="props.patientInfo" @flush="getListInfo()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
@@ -414,7 +418,6 @@ import {
|
||||
getOrgTree,
|
||||
signTcmAdvice,
|
||||
getTcmDiagnosis,
|
||||
deleteTcmDiagnosis,
|
||||
signOutTcmAdvice,
|
||||
updateGroupId,
|
||||
getContract,
|
||||
@@ -427,7 +430,9 @@ import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import Decimal from 'decimal.js';
|
||||
import tcmdiagnosisDialog from './tcmdiagnosisDialog';
|
||||
import { Delete, Minus } from '@element-plus/icons-vue';
|
||||
|
||||
import { ElMessage } from 'element-plus';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import { advicePrint } from '@/api/public';
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
@@ -441,8 +446,14 @@ const encounterId = ref('');
|
||||
const accountId = ref('');
|
||||
const encounterDiagnosisId = ref('');
|
||||
|
||||
let prescriptionIdCounter = 1;
|
||||
const generatePrescriptionId = () => {
|
||||
return `prescription_${Date.now()}_${prescriptionIdCounter++}`;
|
||||
};
|
||||
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: '',
|
||||
@@ -462,29 +473,9 @@ const tcmPrescriptionList = ref([
|
||||
const unitCodeList = ref([]);
|
||||
const adviceTableRef = ref([]);
|
||||
const organization = ref([]);
|
||||
const conditionDefinitionId = ref('');
|
||||
const diagnosisName = ref('');
|
||||
const diagnosisInfo = ref({});
|
||||
const rateCode = ref('');
|
||||
const footNote = ref('');
|
||||
const decoctionMethod = ref('');
|
||||
const chineseHerbsDoseQuantity = ref('');
|
||||
const dispensePerDuration = ref('');
|
||||
const formulaName = ref('');
|
||||
const sufferingFlag = ref(false);
|
||||
const methodCode = ref('');
|
||||
const loading = ref(false);
|
||||
const rowRules = ref({
|
||||
conditionDefinitionId: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
minUnitQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
doseQuantity: [{ required: true, message: '请输入单次剂量单位', trigger: 'change' }],
|
||||
quantity: [{ required: true, message: '请输入数量', trigger: 'change' }],
|
||||
dispensePerDuration: [{ required: true, message: '请输入用药天数', trigger: 'change' }],
|
||||
formulaName: [{ required: true, message: '请输入配方名称', trigger: 'change' }],
|
||||
executeNum: [{ required: true, message: '请输入执行次数', trigger: 'change' }],
|
||||
rateCode: [{ required: true, message: '请选择频次', trigger: 'change' }],
|
||||
methodCode: [{ required: true, message: '请选择给药途径', trigger: 'change' }],
|
||||
orgId: [{ required: true, message: '请选择执行科室', trigger: 'change' }],
|
||||
});
|
||||
const unitMap = ref({
|
||||
dose: 'dose',
|
||||
@@ -514,37 +505,15 @@ const inputRefs = ref({}); // 存储输入框实例
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
const totalAmount = ref(0);
|
||||
const tcmDianosis = ref();
|
||||
const { method_code, unit_code, rate_code, method_of_decocting_medicine,hjerbal_footnotes,distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'method_of_decocting_medicine',
|
||||
'hjerbal_footnotes',
|
||||
'distribution_category_code'
|
||||
);
|
||||
const { method_code, unit_code, rate_code, distribution_category_code, dosage_instruction } =
|
||||
proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code',
|
||||
'dosage_instruction'
|
||||
);
|
||||
|
||||
const adviceTypeList = ref([
|
||||
{
|
||||
label: '西药',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '中成药',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '耗材',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '诊疗',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '',
|
||||
},
|
||||
]);
|
||||
onMounted(() => {
|
||||
document.addEventListener('keydown', escKeyListener);
|
||||
});
|
||||
@@ -570,91 +539,101 @@ function getList() {
|
||||
});
|
||||
}
|
||||
|
||||
function getListInfo(addNewRow) {
|
||||
// 确保isAdding变量存在
|
||||
if (typeof isAdding !== 'undefined') {
|
||||
isAdding.value = false;
|
||||
}
|
||||
|
||||
// 确保有患者信息
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.error('患者信息不完整');
|
||||
return;
|
||||
}
|
||||
|
||||
getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res && res.data && Array.isArray(res.data)) {
|
||||
// 处理返回的数据
|
||||
if (res.data.length > 0) {
|
||||
// 如果有数据,清空当前列表并重新添加
|
||||
tcmPrescriptionList.value = [];
|
||||
|
||||
res.data.forEach((item) => {
|
||||
try {
|
||||
// 解析contentJson获取完整的医嘱数据
|
||||
const contentData = item.contentJson ? JSON.parse(item.contentJson) : {};
|
||||
|
||||
// 创建一个新的处方对象
|
||||
const newPrescription = {
|
||||
...item,
|
||||
...contentData,
|
||||
// 确保关键显示字段存在
|
||||
adviceName: contentData.adviceName || item.adviceName || '',
|
||||
quantity: contentData.quantity || item.quantity || '',
|
||||
totalPrice: contentData.totalPrice || item.totalPrice || '',
|
||||
diagnosisName: contentData.diagnosisName || item.diagnosisName || '',
|
||||
positionName: contentData.positionName || item.positionName || '',
|
||||
doseUnitCode_dictText: contentData.doseUnitCode_dictText || item.doseUnitCode_dictText || '',
|
||||
chineseHerbsDoseQuantity: contentData.chineseHerbsDoseQuantity || item.chineseHerbsDoseQuantity || '',
|
||||
prescriptionList: [contentData]
|
||||
};
|
||||
|
||||
// 添加到处方列表
|
||||
tcmPrescriptionList.value.push(newPrescription);
|
||||
} catch (error) {
|
||||
console.error('解析医嘱数据失败:', error, '数据项:', item);
|
||||
}
|
||||
});
|
||||
async function getListInfo(addNewRow) {
|
||||
// 重置所有处方的添加状态
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
prescription.isAdding = false;
|
||||
});
|
||||
await getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then(async (res) => {
|
||||
// 按 groupId 分组数据
|
||||
const groupedData = {};
|
||||
res.data.forEach((item) => {
|
||||
const groupId = item.groupId || 'default';
|
||||
if (!groupedData[groupId]) {
|
||||
groupedData[groupId] = [];
|
||||
}
|
||||
|
||||
// 重新计算总金额
|
||||
handleTotalAmount();
|
||||
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddMedicine();
|
||||
groupedData[groupId].push({
|
||||
...item,
|
||||
doseQuantity: JSON.parse(item.contentJson)?.doseQuantity,
|
||||
doseUnitCode_dictText: JSON.parse(item.contentJson)?.doseUnitCode_dictText,
|
||||
});
|
||||
});
|
||||
|
||||
await getContract({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
contractList.value = res.data;
|
||||
});
|
||||
// 更新处方列表
|
||||
const groupIds = Object.keys(groupedData);
|
||||
tcmPrescriptionList.value = groupIds.map((groupId, index) => {
|
||||
const prescription = tcmPrescriptionList.value[index] || {
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
};
|
||||
|
||||
if (!prescription.id) {
|
||||
prescription.id = generatePrescriptionId();
|
||||
}
|
||||
} else {
|
||||
console.error('获取医嘱列表失败或数据格式错误:', res);
|
||||
// 保持当前列表不变,不要清空
|
||||
|
||||
prescription.prescriptionList = groupedData[groupId];
|
||||
return prescription;
|
||||
});
|
||||
|
||||
// 如果没有处方数据,确保至少有一个空处方
|
||||
if (tcmPrescriptionList.value.length === 0) {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
});
|
||||
}
|
||||
tcmPrescriptionList.value.accountId = contractList.value[0].accountId;
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddMedicine(0);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取医嘱列表异常:', error);
|
||||
// 保持当前列表不变,不要清空
|
||||
});
|
||||
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
|
||||
getContract({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
contractList.value = res?.data || [];
|
||||
}).catch(error => {
|
||||
console.error('获取合同信息失败:', error);
|
||||
});
|
||||
|
||||
accountId.value = props.patientInfo.accountId || '';
|
||||
accountId.value = props.patientInfo.accountId;
|
||||
}
|
||||
|
||||
function getDiagnosisInfo() {
|
||||
diagnosisList.value = [];
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.data.illness && res.data.illness.length > 0) {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
diagnosisList.value.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
definitionId: item.definitionId,
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,
|
||||
conditionId: item.conditionId,
|
||||
syndromeGroupNo: item.syndromeGroupNo || res.data.symptom[index].syndromeGroupNo, // 保存syndromeGroupNo用于删除
|
||||
...item, // 保存完整的item数据
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -751,39 +730,36 @@ function handleChange(value) {
|
||||
adviceQueryParams.value.searchKey = value;
|
||||
}
|
||||
|
||||
function openDialog() {
|
||||
tcmDianosis.value.openDialog();
|
||||
}
|
||||
|
||||
function deleteDiagnosisBind(syndromeGroupNo) {
|
||||
if (!syndromeGroupNo) {
|
||||
proxy.$modal.msgWarning('缺少诊断标识,无法删除');
|
||||
return;
|
||||
}
|
||||
|
||||
// 调用API从服务器删除中医诊断
|
||||
deleteTcmDiagnosis(syndromeGroupNo).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
handleDiagnosisFlush();
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '删除失败');
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error('删除中医诊断失败:', error);
|
||||
proxy.$modal.msgError('删除失败,请重试');
|
||||
function addNewPrescription() {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: accountId.value,
|
||||
methodCode: '',
|
||||
rateCode: '',
|
||||
dispensePerDuration: '',
|
||||
chineseHerbsDoseQuantity: '',
|
||||
sufferingFlag: '0',
|
||||
checkAll: false,
|
||||
groupIndexList: [],
|
||||
expandOrder: [],
|
||||
totalAmount: 0,
|
||||
nextId: 1,
|
||||
isAdding: false,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断数据刷新处理函数
|
||||
function handleDiagnosisFlush() {
|
||||
// 同时刷新医嘱列表和诊断列表,确保诊断数据同步
|
||||
getListInfo();
|
||||
getDiagnosisInfo();
|
||||
}
|
||||
function deletePrescription(prescription) {
|
||||
if (tcmPrescriptionList.value.length <= 1) {
|
||||
proxy.$modal.msgError('至少保留一张处方');
|
||||
return;
|
||||
}
|
||||
|
||||
function addNewPrescription(){
|
||||
tcmPrescriptionList.value.push({})
|
||||
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
|
||||
if (index !== -1) {
|
||||
tcmPrescriptionList.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// 删除处方单
|
||||
@@ -991,13 +967,8 @@ function handleDelete(pIndex) {
|
||||
prescription.expandOrder = [];
|
||||
prescription.isAdding = false;
|
||||
adviceQueryParams.value.adviceType = undefined;
|
||||
// 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
const allPrescriptions = tcmPrescriptionList.value.flatMap(p => p.prescriptionList);
|
||||
groupMarkers.value = getGroupMarkers(allPrescriptions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function handleNumberClick(item, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
prescription.prescriptionList[index].unitPrice = item.price;
|
||||
@@ -1077,132 +1048,72 @@ function handleSave(pIndex) {
|
||||
}
|
||||
|
||||
// 单行处方保存
|
||||
function handleSaveSign(row, index) {
|
||||
try {
|
||||
// 直接执行保存逻辑,不再进行表单验证
|
||||
function handleSaveSign(row, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const formRefName = 'formRef' + pIndex + '-' + index;
|
||||
proxy.$refs[formRefName][0].validate((valid) => {
|
||||
row.isEdit = false;
|
||||
isAdding.value = false;
|
||||
expandOrder.value = [];
|
||||
|
||||
// 确保必要的字段有值
|
||||
if (props.patientInfo) {
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
}
|
||||
|
||||
row.accountId = accountId.value || '';
|
||||
row.quantity = row.minUnitQuantity || 1; // 确保数量有值
|
||||
row.conditionId = conditionId.value || '';
|
||||
row.conditionDefinitionId = conditionDefinitionId.value || '';
|
||||
row.encounterDiagnosisId = encounterDiagnosisId.value || '';
|
||||
row.diagnosisName = diagnosisName.value || '';
|
||||
|
||||
// 计算单价
|
||||
if (row.unitCodeList && row.unitCode) {
|
||||
const unitItem = row.unitCodeList.find((item) => item.value === row.unitCode);
|
||||
if (unitItem?.type !== 'unit' && row.unitPrice) {
|
||||
row.unitPrice = new Decimal(row.unitPrice).div(row.partPercent || 1).toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
// 计算总金额
|
||||
if (row.minUnitQuantity && row.unitPrice) {
|
||||
row.totalPrice = new Decimal(row.minUnitQuantity).mul(row.unitPrice).toFixed(2);
|
||||
}
|
||||
|
||||
// 确保显示所需的字段都有值
|
||||
row.adviceName = row.adviceName || '未命名药品';
|
||||
row.positionName = row.positionName || '默认药房';
|
||||
|
||||
// 创建要保存的数据对象,避免循环引用
|
||||
const saveData = {
|
||||
...row,
|
||||
// 排除可能导致循环引用的复杂对象
|
||||
unitCodeList: undefined,
|
||||
stockList: undefined,
|
||||
contentJson: undefined
|
||||
};
|
||||
|
||||
// 序列化数据用于存储
|
||||
saveData.contentJson = JSON.stringify(saveData);
|
||||
|
||||
// 只保存当前行的数据,而不是整个列表
|
||||
savePrescription({ adviceSaveList: [saveData] }).then((res) => {
|
||||
if (res && res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
// 此处错误调用getListInfo,导致医嘱信息被覆盖,从而不显示。
|
||||
// getListInfo(true);
|
||||
nextId.value = 1;
|
||||
} else {
|
||||
proxy.$modal.msgError('保存失败,请重试');
|
||||
console.error('保存失败响应:', res);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('保存处方失败:', error);
|
||||
proxy.$modal.msgError('保存失败,请检查网络或联系管理员');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('处理保存时出错:', error);
|
||||
proxy.$modal.msgError('操作异常,请重试');
|
||||
}
|
||||
prescription.isAdding = false;
|
||||
prescription.expandOrder = [];
|
||||
row.contentJson = undefined;
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
row.accountId = prescription.accountId;
|
||||
row.quantity = row.minUnitQuantity;
|
||||
row.conditionId = prescription.conditionId;
|
||||
row.unitPrice =
|
||||
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
||||
? row.unitPrice
|
||||
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
||||
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
||||
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
||||
row.diagnosisName = prescription.diagnosisName;
|
||||
row.contentJson = JSON.stringify(row);
|
||||
});
|
||||
}
|
||||
|
||||
function handleSaveBatch(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
|
||||
function handleSaveBatch() {
|
||||
// 收集所有需要保存的处方项目
|
||||
let saveList = [];
|
||||
|
||||
// 遍历所有处方
|
||||
for (const prescription of tcmPrescriptionList.value) {
|
||||
if (prescription.prescriptionList) {
|
||||
// 检查处方是否有必填的付数
|
||||
if (!prescription.chineseHerbsDoseQuantity || prescription.chineseHerbsDoseQuantity == 0) {
|
||||
proxy.$modal.msgWarning('请输入付数');
|
||||
return;
|
||||
}
|
||||
|
||||
// 收集该处方下需要保存的项目
|
||||
const itemsToSave = prescription.prescriptionList
|
||||
.filter((item) => item.statusEnum == 1)
|
||||
.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
accountId: accountId.value,
|
||||
conditionId: prescription.conditionId,
|
||||
encounterDiagnosisId: prescription.encounterDiagnosisId,
|
||||
conditionDefinitionId: prescription.conditionDefinitionId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
requestId: item.requestId,
|
||||
groupId: item.groupId ? item.groupId : timestamp.toString(),
|
||||
chineseHerbsDoseQuantity: prescription.chineseHerbsDoseQuantity,
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
});
|
||||
|
||||
// 将项目添加到保存列表
|
||||
saveList = saveList.concat(itemsToSave);
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否有可保存的项目
|
||||
let timestamp = new Date().getTime();
|
||||
let saveList = prescription.prescriptionList
|
||||
.filter((item) => {
|
||||
return item.statusEnum == 1;
|
||||
})
|
||||
.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
accountId: accountId.value,
|
||||
conditionId: prescription.conditionId,
|
||||
encounterDiagnosisId: prescription.encounterDiagnosisId,
|
||||
conditionDefinitionId: prescription.conditionDefinitionId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
requestId: item.requestId,
|
||||
groupId: item.groupId ? item.groupId : timestamp.toString(),
|
||||
methodCode: prescription.methodCode,
|
||||
rateCode: prescription.rateCode,
|
||||
dispensePerDuration: prescription.dispensePerDuration,
|
||||
chineseHerbsDoseQuantity: prescription.chineseHerbsDoseQuantity,
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
});
|
||||
if (saveList.length == 0) {
|
||||
proxy.$modal.msgWarning('当前没有可保存医嘱');
|
||||
return;
|
||||
}
|
||||
|
||||
// 保存处方
|
||||
if (
|
||||
prescription.chineseHerbsDoseQuantity == undefined ||
|
||||
prescription.chineseHerbsDoseQuantity == 0
|
||||
) {
|
||||
proxy.$modal.msgWarning('请输入付数');
|
||||
return;
|
||||
}
|
||||
saveTcmAdvice({ adviceSaveList: saveList }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getListInfo(true);
|
||||
|
||||
// 重置所有处方的nextId
|
||||
tcmPrescriptionList.value.forEach(prescription => {
|
||||
if (prescription.nextId) {
|
||||
prescription.nextId = 1;
|
||||
}
|
||||
});
|
||||
prescription.nextId = 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1370,26 +1281,75 @@ function validateGroups(saveList) {
|
||||
return true;
|
||||
}
|
||||
|
||||
async function handlePrint(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const selectedRows = prescription.prescriptionList.filter((item) => item.check);
|
||||
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请先选择要打印的处方');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否有待签发或已退费的记录
|
||||
const invalidRows = selectedRows.filter(
|
||||
(item) => item.statusEnum === 1 || item.chargeStatus === 8
|
||||
);
|
||||
|
||||
if (invalidRows.length > 0) {
|
||||
ElMessage.warning('待签发和已退费的项目不能打印,请重新选择');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const performPrint = async (rows) => {
|
||||
const requestIds = rows.map((item) => item.requestId).join(',');
|
||||
console.log('中药处方打印开始', requestIds);
|
||||
|
||||
const apiParams = { requestIds, isPrescription: '1' };
|
||||
const res = await advicePrint(apiParams);
|
||||
|
||||
const groupedRows = {};
|
||||
res.data.adviceItemList.forEach((row) => {
|
||||
const prescriptionNo = row.prescriptionNo;
|
||||
if (!groupedRows[prescriptionNo]) {
|
||||
groupedRows[prescriptionNo] = [];
|
||||
}
|
||||
row.contractName = res.data.contractName;
|
||||
groupedRows[prescriptionNo].push(row);
|
||||
});
|
||||
|
||||
const groupedArray = Object.values(groupedRows);
|
||||
const result = groupedArray.map((group) => ({
|
||||
...res.data,
|
||||
|
||||
// 药费
|
||||
medTotalAmount:
|
||||
'¥' + group.reduce((sum, item) => sum + (item.totalPrice || 0), 0).toFixed(2) + '元',
|
||||
|
||||
prescriptionList: group,
|
||||
}));
|
||||
|
||||
// 使用中药医生处方打印模板
|
||||
return { result, template: PRINT_TEMPLATE.DOC_CHINESE_MEDICINE_PRESCRIPTION };
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 执行打印
|
||||
const { result, template } = await performPrint(selectedRows);
|
||||
printUtils.print(template, result);
|
||||
ElMessage.success('中药处方打印成功');
|
||||
} catch (error) {
|
||||
console.error('中药处方打印过程出错:', error);
|
||||
ElMessage.error('中药处方打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -1431,9 +1391,11 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.doctor-station {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
@@ -1495,25 +1457,4 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.add-icon:hover {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.delete-icon {
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
padding: 4px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.delete-icon:hover {
|
||||
background-color: #fef0f0;
|
||||
}
|
||||
|
||||
.delete-icon.disabled-icon {
|
||||
cursor: not-allowed;
|
||||
color: #c0c4cc !important;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.delete-icon.disabled-icon:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -15,9 +15,16 @@
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-date-picker v-model="registerTime" @change="handleTimeChange" type="daterange"
|
||||
style="width: 100%; margin-bottom: 10px" :clearable="false" placeholder="挂号时间" format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD" />
|
||||
<el-date-picker
|
||||
v-model="registerTime"
|
||||
@change="handleTimeChange"
|
||||
type="date"
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
:clearable="false"
|
||||
placeholder="挂号时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-scrollbar height="700px">
|
||||
<div v-for="(item, index) in patientList" :class="item.active ? 'patient-card actived' : 'patient-card'"
|
||||
:key="item.id" @click="handleCardClick(item, index)">
|
||||
@@ -53,38 +60,47 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="personal-info-container">
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
<el-text tclass="name" width="auto">病历号:</el-text>
|
||||
<el-text tclass="name" width="auto">
|
||||
{{ item.busNo ? item.busNo : '-' }}
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disabled-wrapper" style="width: 85%; border: 1px solid #eee; position: relative">
|
||||
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-left: 0">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="患者信息:" width="150">
|
||||
<el-descriptions :column="5" class="patient-info-descriptions">
|
||||
<el-descriptions-item label="患者信息:" width="420">
|
||||
{{
|
||||
Object.keys(patientInfo).length !== 0
|
||||
? patientInfo.patientName +
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
patientInfo.contractName
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
(patientInfo?.contractName ? patientInfo.contractName : '') +
|
||||
'/' +
|
||||
patientInfo.phone +
|
||||
'/' +
|
||||
patientInfo.busNo
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号时间:" width="150">
|
||||
<el-descriptions-item label="挂号时间:" width="300">
|
||||
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="350">
|
||||
<!-- 初诊 / 复诊 按钮 -->
|
||||
<el-radio v-model="visitType" label="FIRST" :disabled="visitTypeDisabled">初诊</el-radio>
|
||||
<el-radio v-model="visitType" label="FOLLOW_UP" :disabled="visitTypeDisabled">复诊</el-radio>
|
||||
|
||||
<!-- 原有按钮 -->
|
||||
<el-descriptions-item label="医生:" width="250">
|
||||
{{ userStore.nickName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
@@ -97,25 +113,36 @@
|
||||
<el-button type="primary" plain @click.stop="getEnPrescription(patientInfo.encounterId)">
|
||||
处方单
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="openDialog = true">
|
||||
办理住院
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleCancelEncounter">
|
||||
取消接诊
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="onHospitalization"> 办理住院 </el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
<el-tabs type="card" style="width: 100%; height: 100%" v-loading="loading" v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)">
|
||||
<el-tab-pane label="病历" name="emr">
|
||||
<Emr :patientInfo="patientInfo" ref="emrRef" @save="
|
||||
(value) => {
|
||||
saveStatus = value;
|
||||
}
|
||||
" :visitType="visitType" :firstVisitDate="firstVisitDate" />
|
||||
<el-tabs
|
||||
type="card"
|
||||
style="width: 100%; height: 100%"
|
||||
v-loading="loading"
|
||||
v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)"
|
||||
>
|
||||
<el-tab-pane label="门诊病历" name="hospitalizationEmr">
|
||||
<hospitalizationEmr
|
||||
:patientInfo="patientInfo"
|
||||
:activeTab="activeTab"
|
||||
@emrSaved="handleEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="病历" name="emr">
|
||||
<Emr
|
||||
:patientInfo="patientInfo"
|
||||
ref="emrRef"
|
||||
@save="
|
||||
(value) => {
|
||||
saveStatus = value;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="诊断" name="diagnosis">
|
||||
<Diagnosis :patientInfo="patientInfo" ref="diagnosisRef" @diagnosisSave="
|
||||
(value) => {
|
||||
@@ -124,7 +151,12 @@
|
||||
" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="医嘱" name="prescription">
|
||||
<prescriptionlist :patientInfo="patientInfo" ref="prescriptionRef" :activeTab="activeTab" />
|
||||
<prescriptionlist
|
||||
:patientInfo="patientInfo"
|
||||
ref="prescriptionRef"
|
||||
:activeTab="activeTab"
|
||||
:outpatientEmrSaved="outpatientEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
@@ -132,6 +164,9 @@
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报告查询" name="reportQuery">
|
||||
<ReportQuery :patientInfo="patientInfo" ref="reportQueryRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
@@ -139,26 +174,40 @@
|
||||
<el-drawer v-model="drawer" title="患者队列" direction="ltr" @open="handleOpen">
|
||||
<PatientList ref="patientDrawerRef" @toCurrent="handleReceive" />
|
||||
</el-drawer>
|
||||
<RefundListDialog :open="openRefundListDialog" :encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false" />
|
||||
<HospitalizationDialog :open="openDialog" :patientInfo="patientInfo" :encounterId="currentEncounterId"
|
||||
@close="openDialog = false" />
|
||||
<PrescriptionInfo :open="openPrescriptionDialog" :precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false" />
|
||||
<RefundListDialog
|
||||
:open="openRefundListDialog"
|
||||
:encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false"
|
||||
@refresh="() => prescriptionRef.getListInfo()"
|
||||
/>
|
||||
<HospitalizationDialog
|
||||
:open="openDialog"
|
||||
:patientInfo="patientInfo"
|
||||
:encounterId="currentEncounterId"
|
||||
:mainDiagnosis="mainDiagnosis"
|
||||
@close="openDialog = false"
|
||||
/>
|
||||
<PrescriptionInfo
|
||||
:open="openPrescriptionDialog"
|
||||
:precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import Emr from './components/emr/emr.vue';
|
||||
import {
|
||||
getList,
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
cancelEncounter,
|
||||
getEmrHistoryList
|
||||
isHospitalization,
|
||||
getEncounterDiagnosis,
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
import ReportQuery from './components/reportQuery.vue';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import Diagnosis from './components/diagnosis/diagnosis.vue';
|
||||
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
@@ -169,6 +218,8 @@ import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -197,15 +248,18 @@ const openRefundListDialog = ref(false);
|
||||
const openDialog = ref(false);
|
||||
const openPrescriptionDialog = ref(false);
|
||||
const saveStatus = ref(false);
|
||||
const outpatientEmrSaved = ref(false); // 门诊病历保存状态
|
||||
const currentEncounterId = ref('');
|
||||
const emits = defineEmits(['click']);
|
||||
const activeTab = ref('emr');
|
||||
// const activeTab = ref('emr');
|
||||
const activeTab = ref('hospitalizationEmr');
|
||||
const mainDiagnosis = ref(null);
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const visitTypeDisabled = ref(false);
|
||||
|
||||
const prescriptionInfo = ref([]);
|
||||
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
||||
const registerTime = ref(formatDate(new Date()));
|
||||
const patientDrawerRef = ref();
|
||||
const prescriptionRef = ref();
|
||||
const tcmRef = ref();
|
||||
@@ -219,12 +273,41 @@ const firstVisitDate = ref('');
|
||||
const disabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '今天',
|
||||
value: new Date(),
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 1);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三天内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 3);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '一周内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 7);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const eprescriptionRef = ref();
|
||||
onMounted(() => {
|
||||
getWaitPatient();
|
||||
});
|
||||
|
||||
getPatientList();
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
@@ -333,65 +416,19 @@ function handleClick(tab) {
|
||||
|
||||
// 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息)
|
||||
function getEnPrescription(encounterId) {
|
||||
// 检查是否有选中的患者
|
||||
if (!patientInfo.value || !patientInfo.value.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否在医嘱Tab页,如果不在则切换到医嘱Tab页
|
||||
if (activeTab.value !== 'prescription') {
|
||||
activeTab.value = 'prescription';
|
||||
// 等待Tab切换完成后再获取数据
|
||||
nextTick(() => {
|
||||
// 确保数据已加载
|
||||
if (prescriptionRef.value) {
|
||||
// 先刷新数据,确保获取最新的处方单信息
|
||||
if (prescriptionRef.value.getListInfo) {
|
||||
prescriptionRef.value.getListInfo(false);
|
||||
}
|
||||
// 等待数据加载完成后再获取处方单信息
|
||||
setTimeout(() => {
|
||||
if (prescriptionRef.value && prescriptionRef.value.getSignedPrescriptionInfo) {
|
||||
const signedPrescriptions = prescriptionRef.value.getSignedPrescriptionInfo();
|
||||
if (signedPrescriptions && signedPrescriptions.length > 0) {
|
||||
prescriptionInfo.value = signedPrescriptions;
|
||||
openPrescriptionDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgWarning('当前患者没有已签发的处方单');
|
||||
}
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}, 300);
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 如果已经在医嘱Tab页,先刷新数据再获取
|
||||
if (prescriptionRef.value) {
|
||||
if (prescriptionRef.value.getListInfo) {
|
||||
prescriptionRef.value.getListInfo(false);
|
||||
}
|
||||
// 等待数据加载完成后再获取处方单信息
|
||||
setTimeout(() => {
|
||||
if (prescriptionRef.value && prescriptionRef.value.getSignedPrescriptionInfo) {
|
||||
const signedPrescriptions = prescriptionRef.value.getSignedPrescriptionInfo();
|
||||
if (signedPrescriptions && signedPrescriptions.length > 0) {
|
||||
prescriptionInfo.value = signedPrescriptions;
|
||||
openPrescriptionDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgWarning('当前患者没有已签发的处方单');
|
||||
}
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}, 300);
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
function handleRefund(encounterId) {
|
||||
@@ -410,33 +447,15 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
|
||||
// 优先使用数据库中保存的初复诊值
|
||||
if (item.visitType) {
|
||||
visitType.value = item.visitType;
|
||||
// 已完诊的记录禁用修改
|
||||
visitTypeDisabled.value = item.statusEnum !== 2;
|
||||
// 如果有初诊日期也从数据库获取
|
||||
// if (item.firstVisitDate) {
|
||||
// firstVisitDate.value = item.firstVisitDate;
|
||||
// }
|
||||
} else {
|
||||
// 对于没有初复诊记录的患者,才使用原有的判断逻辑
|
||||
checkPatientHistory(item);
|
||||
}
|
||||
activeTab.value = 'emr';
|
||||
// 将患者信息保存到store中,供hospitalizationEmr组件使用
|
||||
updatePatientInfo(item);
|
||||
activeTab.value = 'hospitalizationEmr';
|
||||
nextTick(() => {
|
||||
// 确保所有组件引用都已初始化
|
||||
if (prescriptionRef.value) prescriptionRef.value.getListInfo();
|
||||
if (tcmRef.value) tcmRef.value.getListInfo();
|
||||
if (diagnosisRef.value) diagnosisRef.value.getList();
|
||||
if (eprescriptionRef.value) eprescriptionRef.value.getList();
|
||||
if (emrRef.value) {
|
||||
emrRef.value.getDetail(item.encounterId);
|
||||
} else {
|
||||
console.error('emr组件未正确初始化');
|
||||
proxy.$modal.msgError('病历组件加载失败,请刷新页面重试');
|
||||
}
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
diagnosisRef.value.getList();
|
||||
eprescriptionRef.value.getList();
|
||||
// emrRef.value.getDetail(item.encounterId);
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 200);
|
||||
@@ -466,8 +485,8 @@ function handleFinish(encounterId) {
|
||||
}
|
||||
|
||||
function handleTimeChange(value) {
|
||||
queryParams.value.registerTimeSTime = value[0] + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value[1] + ' 23:59:59';
|
||||
queryParams.value.registerTimeSTime = value + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value + ' 23:59:59';
|
||||
getPatientList();
|
||||
}
|
||||
|
||||
@@ -480,36 +499,56 @@ function handleReceive(row) {
|
||||
getWaitPatient();
|
||||
}
|
||||
|
||||
// 处理门诊病历保存成功事件
|
||||
function handleEmrSaved(isSaved) {
|
||||
outpatientEmrSaved.value = isSaved;
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
|
||||
function handleCancelEncounter() {
|
||||
proxy.$modal.confirm('您确定要取消病人本次的就诊记录吗?', '提示信息', {
|
||||
confirmButtonText: '是(Y)',
|
||||
cancelButtonText: '否(N)',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
//调用取消接诊API,添加skipGlobalError配置跳过全局错误提示
|
||||
cancelEncounter(patientInfo.value.encounterId, { skipErrorMsg: true }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('取消接诊成功');
|
||||
patientInfo.value = {};
|
||||
getPatientList();
|
||||
}
|
||||
}).catch((error) => {
|
||||
proxy.$modal.confirm('该病人本次就诊已经有业务产生,不能取消接诊!', '提示信息', {
|
||||
confirmButtonText: '是(Y)',
|
||||
type: 'warning'
|
||||
});
|
||||
// 判断是否已经入院登记
|
||||
const onHospitalization = async () => {
|
||||
const diagnosisRes = await getEncounterDiagnosis(patientInfo.value.encounterId);
|
||||
const hasDiagnosis = diagnosisRes.data?.length > 0;
|
||||
if (!hasDiagnosis) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者暂无诊断信息,无法办理住院!',
|
||||
});
|
||||
}).catch(() => {
|
||||
// 用户取消操作
|
||||
return;
|
||||
}
|
||||
const mainDiag = diagnosisRes.data.find((item) => item.maindiseFlag === 1);
|
||||
if (!mainDiag) {
|
||||
ElMessage({ type: 'error', message: '该患者暂无主诊断信息,无法办理住院!' });
|
||||
return;
|
||||
}
|
||||
mainDiagnosis.value = mainDiag;
|
||||
const res = await isHospitalization({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
});
|
||||
}
|
||||
if (!res.data) {
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者,已办理入院,不允许重复办理',
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 患者信息
|
||||
.patient-info-descriptions {
|
||||
:deep(.el-descriptions__label) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
:deep(.el-descriptions__content) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.patient-card {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"top": 16.5,
|
||||
"height": 22.5,
|
||||
"width": 120,
|
||||
"title": "长春大学医院",
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontFamily": "Microsoft YaHei",
|
||||
@@ -614,4 +614,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="med-summary-container">
|
||||
<div style="width: 40%">
|
||||
<el-card style="height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单' }}
|
||||
</template>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<el-input style="width: 250px" v-model="queryParams.searchKey" placeholder="单据号">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getSummaryList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
placeholder="发放状态"
|
||||
style="width: 250px; margin-left: 10px"
|
||||
v-model="queryParams.statusEnum"
|
||||
@change="getSummaryList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnumOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 510px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
@change="getSummaryList"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain @click="handleSend">批量发药</el-button>
|
||||
<el-button type="warning" plain>批量作废</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="summaryList"
|
||||
max-height="85vh"
|
||||
border
|
||||
ref="summaryTableRef"
|
||||
highlight-current-row
|
||||
@row-click="getDetails"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column prop="busNo" label="单据号" align="center" width="150" />
|
||||
<el-table-column prop="applicantName" label="申请人" align="center" width="100" />
|
||||
<el-table-column prop="locationName" label="发药药房" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="状态" align="center" />
|
||||
<el-table-column prop="applyTime" label="汇总日期" align="center" width="140">
|
||||
<template #default="scope">
|
||||
{{ scope.row.applyTime ? parseTime(scope.row.applyTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleSend(scope.row)">发药</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- <el-row :gutter="10" justify="end" align="middle" style="margin-bottom: 10px">
|
||||
<el-button type="danger" plain icon="Refresh" @click="handleSendDrug" :disabled="!busNo">
|
||||
发药
|
||||
</el-button>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport" :disabled="!busNo">
|
||||
导出
|
||||
</el-button>
|
||||
</el-row> -->
|
||||
<div style="width: 59%">
|
||||
<el-card style="height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单详情' }}
|
||||
</template>
|
||||
<el-table
|
||||
:data="summaryDetailsData"
|
||||
style="width: 100%"
|
||||
border
|
||||
v-loading="loading"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column prop="itemName" label="项目名称" min-width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalVolume" label="规格" min-width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalVolume || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotNumber" label="批次号" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.lotNumber || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量" min-width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemQuantity + ' ' + scope.row.minUnitCode_dictText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="categoryCode_dictText" label="药品类型" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.categoryCode_dictText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="manufacturerText"
|
||||
label="生产厂家"
|
||||
min-width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.manufacturerText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import {
|
||||
totalSendDrug,
|
||||
getFromSummaryList,
|
||||
getFromSummaryDetails,
|
||||
getFromSummaryInit,
|
||||
} from './api.js';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const statusEnumOptions = ref([]);
|
||||
const summaryList = ref([]);
|
||||
const queryParams = ref({
|
||||
applyTime: [
|
||||
proxy.formatDateStr(new Date().setMonth(new Date().getMonth() - 1), 'YYYY-MM-DD'),
|
||||
proxy.formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
],
|
||||
});
|
||||
|
||||
// 定义组件属性
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
selectedId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
busNo: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const selectedRows = ref([]);
|
||||
const summaryDetailsData = ref([]);
|
||||
// 定义loading状态
|
||||
const loading = ref(false);
|
||||
|
||||
getSummaryList();
|
||||
// 获取汇总单信息
|
||||
function getSummaryList() {
|
||||
queryParams.value.applyTimeSTime = queryParams.value.applyTime[0] + ' 00:00:00';
|
||||
queryParams.value.applyTimeETime = queryParams.value.applyTime[1] + ' 23:59:59';
|
||||
getFromSummaryList(queryParams.value).then((res) => {
|
||||
summaryList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function getDetails(row) {
|
||||
loading.value = true;
|
||||
getFromSummaryDetails({ summaryNo: row.busNo }).then((res) => {
|
||||
summaryDetailsData.value = res.data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 发药
|
||||
function handleSend(row) {
|
||||
let sendList = [];
|
||||
if (row.busNo) {
|
||||
sendList.push(row.busNo);
|
||||
} else {
|
||||
proxy.$refs['summaryTableRef'].getSelectionRows().forEach((item) => {
|
||||
sendList.push(item.busNo);
|
||||
});
|
||||
}
|
||||
console.log(sendList);
|
||||
|
||||
totalSendDrug(sendList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getSummaryList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取发药状态
|
||||
const getStatusOption = async () => {
|
||||
try {
|
||||
const res = await getFromSummaryInit();
|
||||
statusEnumOptions.value = res.data.dispenseStatusOptions;
|
||||
} catch (error) {}
|
||||
};
|
||||
getStatusOption();
|
||||
|
||||
// 定义暴露给父组件的数据和方法
|
||||
defineExpose({
|
||||
selectedRows,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.med-summary-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.medicationTableDetail {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.buttonGroup {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 10px 0;
|
||||
gap: 10px;
|
||||
margin-right: 20px;
|
||||
|
||||
:deep(.el-button) {
|
||||
padding: 6px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -173,7 +173,7 @@ defineExpose({
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
height: 48px !important;
|
||||
lineheight: 48px !important;
|
||||
line-height: 48px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 左侧患者列表 -->
|
||||
<el-card class="patient-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>患者列表</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
|
||||
@keyup.enter="getEncounterList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getEncounterList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.refundEnum"
|
||||
style="width: 48%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getEncounterList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placement="bottom"
|
||||
@change="getEncounterList"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="getEncounterList"
|
||||
style="margin-bottom: 10px; margin-left: 18px"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="encounterList"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList"
|
||||
>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="genderEnum_enumText"
|
||||
align="center"
|
||||
label="性别"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<!-- 右侧退药列表 -->
|
||||
<el-card class="refund-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>退药单</span>
|
||||
<!-- <div v-if="selectedPatient">
|
||||
<span class="patient-info">{{ selectedPatient.name }}</span>
|
||||
<el-tag type="info">{{ selectedPatient.visitNo }}</el-tag>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!selectedMedicines.length"
|
||||
@click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
确认退药
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
|
||||
<el-table
|
||||
ref="returnDrugRef"
|
||||
:data="returDrugList"
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
border
|
||||
@select="handleSelection"
|
||||
@selection-change="handelSelectRows"
|
||||
:span-method="handelSpanMethod"
|
||||
class="no-hover-table"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
|
||||
<el-table-column
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="100"
|
||||
align="right"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotNumber" label="批号" width="180" align="center" />
|
||||
<el-table-column prop="traceNo" label="追溯码" width="180" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.traceNo" placeholder="请输入追溯码" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.refundEnum_enumText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity) + ' ' + scope.row.unitCode_dictText
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-popconfirm
|
||||
width="150"
|
||||
hide-after="10"
|
||||
title="操作确认"
|
||||
placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" link :disabled="scope.row.refundEnum != 16">
|
||||
退药
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<div class="footer">
|
||||
<div class="statistics">
|
||||
<span>已选 {{ selectedMedicines.length }} 种药品</span>
|
||||
<span class="total">合计金额:¥ {{ totalAmount.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<TraceNoDialog
|
||||
:ypName="ypName"
|
||||
:openDialog="openTraceNoDialog"
|
||||
@submit="submit"
|
||||
@cancel="openTraceNoDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ReturnDrug">
|
||||
import { getCurrentInstance, nextTick } from 'vue';
|
||||
import { getList, getReturnDrugList, returnDrug, init, itemTraceNo } from './api';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { debounce } from 'lodash-es';
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
refundEnum: 16,
|
||||
classEnum: 1,
|
||||
});
|
||||
const openTraceNo = ref(false);
|
||||
const traceNoList = ref([]);
|
||||
const traceNo = ref('');
|
||||
const encounterList = ref([]);
|
||||
const encounterId = ref('');
|
||||
const returDrugList = ref([]);
|
||||
const selectedMedicines = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const dateRange = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const traceNoTemp = ref('');
|
||||
const traceNoTempRef = ref();
|
||||
const totalAmount = ref(0);
|
||||
const openTraceNoDialog = ref(false);
|
||||
const ypName = ref('');
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
getEncounterList();
|
||||
function getEncounterList() {
|
||||
queryParams.value.startTimeSTime = dateRange.value[0] + ' 00:00:00';
|
||||
queryParams.value.startTimeETime = dateRange.value[1] + ' 23:59:59';
|
||||
getList(queryParams.value).then((res) => {
|
||||
encounterList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
initOptions();
|
||||
function initOptions() {
|
||||
init().then((res) => {
|
||||
statusOptions.value = res.data.refundStatusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
function handleGetReturnDrugList(row) {
|
||||
encounterId.value = row.encounterId;
|
||||
getReturnDrugList({
|
||||
encounterId: row.encounterId,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
}).then((res) => {
|
||||
returDrugList.value = res.data;
|
||||
});
|
||||
}
|
||||
function handleScan() {
|
||||
openTraceNoDialog.value = true;
|
||||
}
|
||||
function submit(value) {
|
||||
let list = [];
|
||||
if (value) {
|
||||
list = value.split(',');
|
||||
}
|
||||
itemTraceNo(list).then((res) => {
|
||||
if (res.code === 200) {
|
||||
returDrugList.value.forEach((item, index) => {
|
||||
if (res.data[item.itemId] && res.data[item.itemId].split(',') > item.quantity) {
|
||||
proxy.$modal.msgWarning('操作失败');
|
||||
return;
|
||||
}
|
||||
returDrugList.value[index].traceNo = res.data[item.itemId];
|
||||
});
|
||||
openTraceNoDialog.value = false;
|
||||
// proxy.$modal.msgSuccess('退药成功');
|
||||
// getReturnDrugList(encounterId.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(handelTraceNo, 500);
|
||||
|
||||
let inputValue = '';
|
||||
function handelTraceNo(value) {
|
||||
traceNoList.value.push(value);
|
||||
traceNo.value = traceNo.value + '[' + traceNoList.value.length + ']' + ' ' + value + '\n';
|
||||
traceNoTemp.value = '';
|
||||
// let saveValue = value.substring(inputValue.length + 5, value.length);
|
||||
// inputValue = value;
|
||||
// console.log(value);
|
||||
// console.log(saveValue);
|
||||
// traceNoList.value.push(saveValue);
|
||||
// traceNo.value = value + '[' + (traceNoList.value.length + 1) + ']' + ' ';
|
||||
}
|
||||
|
||||
function handleClear() {
|
||||
traceNo.value = '';
|
||||
traceNoList.value = [];
|
||||
}
|
||||
function cancel() {
|
||||
openTraceNo.value = false;
|
||||
traceNoList.value = [];
|
||||
traceNo.value = '';
|
||||
}
|
||||
/**
|
||||
* 退药
|
||||
*/
|
||||
function handleReturnDrug(row) {
|
||||
console.log(row);
|
||||
let saveList = [];
|
||||
if (row) {
|
||||
saveList = returDrugList.value
|
||||
.filter((item) => item.requestId == row.requestId)
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
saveList = proxy.$refs.returnDrugRef.getSelectionRows().map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
console.log(saveList);
|
||||
}
|
||||
returnDrug(saveList).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('退药成功');
|
||||
getEncounterList();
|
||||
getReturnDrugList({
|
||||
encounterId: encounterId.value,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
}).then((res) => {
|
||||
returDrugList.value = res.data;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
function handleSelection(selection, row) {
|
||||
const isSelected = selection.some((item) => item.dispenseId === row.dispenseId);
|
||||
returDrugList.value
|
||||
.filter((item) => {
|
||||
return item.requestId == row.requestId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
proxy.$refs['returnDrugRef'].toggleRowSelection(row, isSelected);
|
||||
});
|
||||
nextTick(() => {
|
||||
selectedMedicines.value = proxy.$refs['returnDrugRef'].getSelectionRows();
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function handelSelectRows(selection) {
|
||||
selectedMedicines.value = selection;
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 根据 requestId 合并相同行的方法(只合并药品名称和总价列)
|
||||
function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 定义需要合并的列索引
|
||||
// 1: 药品名称列, 2: 总价列
|
||||
const mergeColumns = [1, 2, 5, 7, 8];
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
const currentRequestId = row.requestId;
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
let rowspan = 1;
|
||||
let colspan = 1;
|
||||
|
||||
// 向上查找相同 requestId 的行
|
||||
let startIndex = rowIndex;
|
||||
while (startIndex > 0 && returDrugList.value[startIndex - 1].requestId === currentRequestId) {
|
||||
startIndex--;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
let endIndex = rowIndex;
|
||||
while (
|
||||
endIndex < returDrugList.value.length - 1 &&
|
||||
returDrugList.value[endIndex + 1].requestId === currentRequestId
|
||||
) {
|
||||
endIndex++;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 只有当 rowspan > 1 时才进行合并
|
||||
return rowspan > 1 ? [rowspan, colspan] : [1, 1];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
height: 80vh;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.patient-list {
|
||||
width: 600px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.refund-list {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.patient-item {
|
||||
padding: 12px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #ecf5ff;
|
||||
border-left: 4px solid #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.patient-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.name {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.visit-no {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.visit-time {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
|
||||
.total {
|
||||
margin-left: 20px;
|
||||
color: #f56c6c;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-textarea .el-textarea__inner) {
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
:deep(.no-hover-table) .el-table__body tr:hover > td {
|
||||
background: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,26 +1,44 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取病区下拉选
|
||||
export function getPractitionerWard (queryParams) {
|
||||
return request ({
|
||||
export function getPractitionerWard(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院汇总发药单左侧
|
||||
export function getFromSummaryList (queryParams) {
|
||||
return request ({
|
||||
url: 'pharmacy-manage/summary-dispense-medicine/from_summary-list',
|
||||
// 住院汇总发药单左侧,汇总单列表
|
||||
export function getFromSummaryList(queryParams) {
|
||||
return request({
|
||||
url: 'nurse-station/medicine-summary/summary-form',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 发药汇总发放状态
|
||||
export function getFromSummaryInit(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/medicine-summary/summary-init',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 汇总发药单详情
|
||||
export function getFromSummaryDetails(queryParams) {
|
||||
return request({
|
||||
url: 'nurse-station/medicine-summary/summary-form-detail',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院汇总发药单右侧
|
||||
export function getFromDetailList (queryParams) {
|
||||
return request ({
|
||||
export function getFromDetailList(queryParams) {
|
||||
return request({
|
||||
url: 'pharmacy-manage/summary-dispense-medicine/from-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -28,16 +46,16 @@ export function getFromDetailList (queryParams) {
|
||||
}
|
||||
|
||||
// 明细左侧
|
||||
export function getEncounterList (queryParams) {
|
||||
return request ({
|
||||
export function getEncounterList(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/encounter-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
//明细 右侧
|
||||
export function getMedicationSummaryDetail (queryParams) {
|
||||
return request ({
|
||||
export function getMedicationSummaryDetail(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medication_summary-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -48,8 +66,8 @@ export function getMedicationSummaryDetail (queryParams) {
|
||||
/**
|
||||
* 获取住院患者列表
|
||||
*/
|
||||
export function getPatientList (queryParams) {
|
||||
return request ({
|
||||
export function getPatientList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -59,8 +77,8 @@ export function getPatientList (queryParams) {
|
||||
/**
|
||||
* 获取当前登录人管理病区
|
||||
*/
|
||||
export function getWardList (queryParams) {
|
||||
return request ({
|
||||
export function getWardList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -70,8 +88,8 @@ export function getWardList (queryParams) {
|
||||
/**
|
||||
* 获取当前选中患者全部医嘱
|
||||
*/
|
||||
export function getPrescriptionList (queryParams) {
|
||||
return request ({
|
||||
export function getPrescriptionList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient-advice',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -81,8 +99,8 @@ export function getPrescriptionList (queryParams) {
|
||||
/**
|
||||
* 执行医嘱
|
||||
*/
|
||||
export function adviceExecute (data) {
|
||||
return request ({
|
||||
export function adviceExecute(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-execute',
|
||||
method: 'post',
|
||||
data: data,
|
||||
@@ -92,8 +110,8 @@ export function adviceExecute (data) {
|
||||
/**
|
||||
* 取消执行医嘱
|
||||
*/
|
||||
export function adviceCancel (data) {
|
||||
return request ({
|
||||
export function adviceCancel(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-cancel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
@@ -102,10 +120,10 @@ export function adviceCancel (data) {
|
||||
|
||||
/**
|
||||
* 明细发药
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function totalSendDrug (data) {
|
||||
return request ({
|
||||
export function totalSendDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/summary-dispense-medicine',
|
||||
method: 'put',
|
||||
data: data,
|
||||
@@ -114,10 +132,168 @@ export function totalSendDrug (data) {
|
||||
/**
|
||||
* 明细退药
|
||||
*/
|
||||
export function totalReturnDrug (data) {
|
||||
return request ({
|
||||
export function totalReturnDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------门诊发药接口------------------------------------------------------------
|
||||
export function listPatient(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/encounter-list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function devicePatientList(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/encounter-list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function listInit(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/init',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function listWesternmedicine(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-order',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateMedicion(prescriptionList) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense',
|
||||
method: 'put',
|
||||
data: prescriptionList,
|
||||
});
|
||||
}
|
||||
export function prepareMedicion(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/prepare',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function backMedicion(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//扫码枪返回追溯码筛选
|
||||
export function itemTraceNo(params) {
|
||||
return request({
|
||||
url: '/app-common/item-trace-no?traceNoList=' + params,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材查询列表
|
||||
*/
|
||||
export function getReportRegisterInit(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-order',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材发药
|
||||
*/
|
||||
export function deviceDispense(params) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-dispense',
|
||||
method: 'put',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材作废
|
||||
*/
|
||||
export function deviceInvalid(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-cancel',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跨批次发药匹配批号
|
||||
*/
|
||||
export function medicineMatch(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-match',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// ----------------------------------------------门诊退药接口----------------------------------------------------------------------
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/return-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取退药列表
|
||||
*/
|
||||
export function getReturnDrugList(params) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return-list',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 退药
|
||||
*/
|
||||
export function returnDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// //扫码枪返回追溯码筛选
|
||||
// export function itemTraceNo(params) {
|
||||
// return request({
|
||||
// url: '/app-common/item-trace-no?traceNoList=' + params,
|
||||
// method: 'get',
|
||||
// })
|
||||
// }
|
||||
|
||||
@@ -1,184 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20" style="margin-bottom: 20px">
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-button
|
||||
:type="selectType === 'total' ? 'primary' : 'default'"
|
||||
@click="handleSelectType('total')"
|
||||
>汇总</el-button
|
||||
>
|
||||
<el-button
|
||||
:type="selectType === 'drug' ? 'primary' : 'default'"
|
||||
@click="handleSelectType('drug')"
|
||||
>发药</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="18" :xs="24">
|
||||
<el-form ref="queryParams" label-width="100px" :model="queryParams" :inline="true">
|
||||
<el-form-item label="窗口" prop="windowDataText" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.windowDataText"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in windowData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="摆药单" prop="medicationListText" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.medicationListText"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in medicationList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="范围" prop="time" label-width="100px">
|
||||
<el-radio-group v-model="queryParams.timeRange">
|
||||
<el-radio v-for="(item, index) in timeRangeList" :key="index" :value="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="time" label-width="100px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="datetimerange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="left-container">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form
|
||||
:model="queryParamsPatient"
|
||||
ref="queryRef"
|
||||
v-show="showSearch"
|
||||
label-width="120"
|
||||
inline="true"
|
||||
>
|
||||
<el-form-item label="患者信息" prop="searchKey" label-width="120">
|
||||
<el-input
|
||||
v-model="queryParamsPatient.searchKey"
|
||||
placeholder="请输入姓名/证件号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="发药状态"
|
||||
prop="statusEnum"
|
||||
v-if="selectType !== 'drug'"
|
||||
label-width="120"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParamsPatient.statusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dispenseStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="border-radius: 4px">
|
||||
<el-col :span="24">
|
||||
<el-table
|
||||
:data="patientList"
|
||||
border
|
||||
highlight-current-row
|
||||
style="height: cal(100%-200px); width: 100%"
|
||||
@row-click="handleCurrentChange"
|
||||
>
|
||||
<!-- 汇总状态下显示的字段 -->
|
||||
<template v-if="selectType === 'total'">
|
||||
<el-table-column prop="applicantName" label="申请人" align="center" />
|
||||
<el-table-column prop="sourceLocationName" label="发药药房" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="状态" align="center" />
|
||||
<el-table-column prop="applyTime" label="申请日期" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.applyTime ? parseTime(scope.row.applyTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<!-- 明细状态下显示的字段 -->
|
||||
<template v-else>
|
||||
<el-table-column prop="patientName" label="姓名" align="center" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="startTime" label="就诊日期" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.startTime ? parseTime(scope.row.startTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="24" style="padding: 10px 12px 12px 12px">
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="18" :xs="24">
|
||||
<!-- 根据当前选中的tab显示不同的表格组件 -->
|
||||
<MedicationTable v-if="selectType === 'total'" :tableData="tableData" :busNo="busNo" />
|
||||
<DetailMedicationTable
|
||||
v-else-if="selectType === 'drug'"
|
||||
:tableData="detailTableData"
|
||||
:encounterId="encounterId"
|
||||
@call-medication-summary-detail="callMedicationSummaryDetail"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="app-container" style="padding-top: 0px">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" class="centered-tabs tabs-font">
|
||||
<el-tab-pane label="发药汇总单" name="summary">
|
||||
<MedicationSummary />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发药明细单" name="detail">
|
||||
<MedicationDetails />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="住院退药" name="return">
|
||||
<ReturnDrug />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -186,6 +18,9 @@
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import MedicationTable from './components/MedicationTable.vue';
|
||||
import MedicationSummary from './components/MedicationSummary.vue';
|
||||
import MedicationDetails from './components/MedicationDetails.vue';
|
||||
import ReturnDrug from './components/ReturnDrug.vue';
|
||||
import DetailMedicationTable from './components/DetailMedicationTable.vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import {
|
||||
@@ -195,7 +30,7 @@ import {
|
||||
getFromDetailList,
|
||||
} from './components/api';
|
||||
|
||||
// 响应式数据
|
||||
const activeName = ref('summary');
|
||||
const loading = ref(false);
|
||||
const patientList = ref([]);
|
||||
const total = ref(0);
|
||||
@@ -453,4 +288,19 @@ onMounted(() => {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav-wrap) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav-scroll) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__item) {
|
||||
font-size: 16px !important;
|
||||
padding: 0 60px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,725 @@
|
||||
<template>
|
||||
<div style="padding: 20px; max-width: 1200px; margin: 0 auto" ref="bodyRef">
|
||||
<!-- 标题区域 - 居中加粗,增加层次感 -->
|
||||
<div style="text-align: center; margin-bottom: 30px">
|
||||
<div style="font-size: 22px; color: #333; letter-spacing: 1px">长春市朝阳区中医院</div>
|
||||
<div
|
||||
style="
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #222;
|
||||
padding: 12px 0;
|
||||
border-bottom: 2px solid #333;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
入院记录
|
||||
</div>
|
||||
<div style="margin-top: 8px; font-size: 14px; color: #666">(第 1 页,共 1 页)</div>
|
||||
</div>
|
||||
|
||||
<!-- 基本信息模块 - 卡片式布局,优化间距和对齐 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
基本信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 18px;
|
||||
"
|
||||
>
|
||||
<!-- 第一列 -->
|
||||
<div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>姓名:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.patientName
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>性别:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.gender
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>民族:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.nation || '汉族'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>婚姻状况:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.marriage || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>入院时间:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.admissionTime || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>病史陈述:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.historyReporter || ''
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 第二列 -->
|
||||
<div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>住院号:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.hospitalNo || '123456'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>年龄:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.age || '16 岁'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>职业:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.occupation || '中医'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>出生地:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.birthplace || '阿拉善'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>记录时间:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.recordTime || '2025-12-18 14:04:00'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>可靠程度:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.5">{{
|
||||
formData.reliability
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 病史信息模块 - 优化布局,内容可换行 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
病史信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 18px;
|
||||
"
|
||||
>
|
||||
<!-- 第一列 -->
|
||||
<div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>家族史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.familyHistory || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>现病史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.presentIllness || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>既往史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.pastIllness || formData.pastHistory || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>主诉:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.complaint || ''
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 第二列 -->
|
||||
<div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>婚育史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.maritalHistory || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 16px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>月经史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.menstrualHistory || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 80px; font-size: 15px"
|
||||
>个人史:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.6">{{
|
||||
formData.personalHistory || ''
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中医望闻问切模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
中医望闻问切
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 120px; font-size: 15px"
|
||||
>详细记录:</span
|
||||
>
|
||||
<span style="font-size: 14px; color: #666; line-height: 1.8">{{
|
||||
formData.tcmInfo || ''
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 体格检查模块 - 优化两列布局,信息对齐 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
体格检查
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 25px;
|
||||
"
|
||||
>
|
||||
<!-- 第一列:生命体征 -->
|
||||
<div>
|
||||
<div
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
生命体征
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px">
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">体温</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.temp || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">脉搏</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.pulse || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">呼吸</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.respiration || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">血压</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.bp || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">身高</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.height || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; background: #f8f8f8; border-radius: 4px; text-align: center">
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">体重</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.weight || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
padding: 10px;
|
||||
background: #f8f8f8;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
grid-column: 1/3;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 13px; color: #666; margin-bottom: 4px">BMI</div>
|
||||
<div style="font-size: 14px; color: #333; font-weight: 500">
|
||||
{{ formData.bmi || '' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二列:检查详情 -->
|
||||
<div>
|
||||
<div
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
检查详情
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 14px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 100px; font-size: 14px"
|
||||
>皮肤粘膜:</span
|
||||
>
|
||||
<span style="font-size: 13px; color: #666; line-height: 1.5">{{
|
||||
formData.skin || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 14px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 100px; font-size: 14px"
|
||||
>胸部:</span
|
||||
>
|
||||
<span style="font-size: 13px; color: #666; line-height: 1.5">{{
|
||||
formData.chest || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 14px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 100px; font-size: 14px"
|
||||
>腹部:</span
|
||||
>
|
||||
<span style="font-size: 13px; color: #666; line-height: 1.5">{{
|
||||
formData.abdomen || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start; margin-bottom: 14px">
|
||||
<span style="font-weight: 500; color: #333; min-width: 100px; font-size: 14px"
|
||||
>一般情况:</span
|
||||
>
|
||||
<span style="font-size: 13px; color: #666; line-height: 1.5">{{
|
||||
formData.general || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-start">
|
||||
<span style="font-weight: 500; color: #333; min-width: 100px; font-size: 14px"
|
||||
>四肢/神经:</span
|
||||
>
|
||||
<span style="font-size: 13px; color: #666; line-height: 1.5">{{
|
||||
formData.limbsNervous || ''
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 辅助检查模块 - 合并重复模块,优化显示 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
辅助检查
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
gap: 20px;
|
||||
"
|
||||
>
|
||||
<div style="padding: 15px; background: #f8f8f8; border-radius: 6px">
|
||||
<div style="font-weight: 500; color: #333; font-size: 15px; margin-bottom: 8px">
|
||||
检查结果:
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666; line-height: 1.6">
|
||||
{{ formData.auxExam || '' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 诊断信息模块 - 修正分类,优化布局 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
诊断信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
gap: 20px;
|
||||
"
|
||||
>
|
||||
<div style="padding: 18px; background: #f8f8f8; border-radius: 6px">
|
||||
<div style="font-weight: 500; color: #333; font-size: 15px; margin-bottom: 10px">
|
||||
中医诊断:
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666; line-height: 1.8">
|
||||
{{ formData.tcmDiagnosis || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 18px; background: #f8f8f8; border-radius: 6px">
|
||||
<div style="font-weight: 500; color: #333; font-size: 15px; margin-bottom: 10px">
|
||||
西医诊断:
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666; line-height: 1.8">
|
||||
{{ formData.westernDiagnosis || '' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 签名信息模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
签名信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 30px;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
"
|
||||
>
|
||||
<div style="text-align: center">
|
||||
<div
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
font-size: 15px;
|
||||
margin-bottom: 40px;
|
||||
border-bottom: 1px solid #333;
|
||||
padding-bottom: 2px;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
医师签名
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666">{{ formData.doctorSign || '' }}</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<div
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
font-size: 15px;
|
||||
margin-bottom: 40px;
|
||||
border-bottom: 1px solid #333;
|
||||
padding-bottom: 2px;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
上级医师
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666">{{ formData.superiorSign || '' }}</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<div
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
font-size: 15px;
|
||||
margin-bottom: 40px;
|
||||
border-bottom: 1px solid #333;
|
||||
padding-bottom: 2px;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
记录日期
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #666">{{ formData.signDate || '' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部备注 -->
|
||||
<div
|
||||
style="
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
margin-bottom: 20px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #eee;
|
||||
"
|
||||
>
|
||||
本记录由长春市朝阳区中医院医师根据患者病情如实记录,仅供临床诊疗参考 |
|
||||
地址:长春市朝阳区XX街XX号 | 联系电话:0431-XXXXXXX
|
||||
</div>
|
||||
|
||||
<!-- 打印按钮 - 优化样式,居中显示 -->
|
||||
<!-- <div style="text-align: center; margin-bottom: 30px">
|
||||
<el-button type="primary" @click="onPrint" style="padding: 10px 30px; font-size: 15px"
|
||||
>打印预览</el-button
|
||||
>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { previewPrint } from '../../../utils/printUtils';
|
||||
|
||||
const bodyRef = ref();
|
||||
|
||||
// 响应式表单数据
|
||||
const formData = reactive({
|
||||
// 基础信息
|
||||
patientName: '', // 原patient?.name
|
||||
hospitalNo: '', // 原patient?.busNo
|
||||
gender: '', // 原patient?.genderEnum_enumText
|
||||
age: '',
|
||||
nation: '',
|
||||
occupation: '', // 职业
|
||||
marriage: '', // 婚姻状况
|
||||
birthplace: '', // 出生地
|
||||
admissionTime: '', // 入院时间
|
||||
recordTime: '', // 记录时间
|
||||
historyReporter: '', // 病史陈述者
|
||||
reliability: '可靠', // 可靠程度
|
||||
// 病史信息
|
||||
complaint: '', // 主诉
|
||||
presentIllness: '', // 现病史
|
||||
pastIllness: '', // 既往史
|
||||
personalHistory: '', // 个人史
|
||||
allergyHistory: '', // 过敏史
|
||||
pastHistory: '', // 既往史(重复字段,保留兼容)
|
||||
familyHistory: '', // 家族史
|
||||
maritalHistory: '', // 婚姻史
|
||||
menstrualHistory: '', // 月经史
|
||||
// 中医信息
|
||||
tcmInfo: '',
|
||||
|
||||
// 体格检查
|
||||
temp: '',
|
||||
pulse: '',
|
||||
respiration: '',
|
||||
bp: '',
|
||||
height: '',
|
||||
weight: '',
|
||||
bmi: '',
|
||||
general: '',
|
||||
skin: '',
|
||||
chest: '',
|
||||
abdomen: '',
|
||||
limbsNervous: '',
|
||||
|
||||
// 辅助检查
|
||||
auxExam: '',
|
||||
|
||||
// 诊断信息
|
||||
tcmDiagnosis: '',
|
||||
westernDiagnosis: '',
|
||||
|
||||
// 签名信息
|
||||
doctorSign: '',
|
||||
superiorSign: '',
|
||||
signDate: '',
|
||||
});
|
||||
|
||||
// 打印方法
|
||||
const onPrint = () => {
|
||||
// previewPrint(bodyRef.value);
|
||||
};
|
||||
|
||||
const getDom = () => {
|
||||
return bodyRef.value;
|
||||
};
|
||||
const setData = (data) => {
|
||||
console.log('设置数据=========>', JSON.stringify(data));
|
||||
Object.assign(formData, data);
|
||||
};
|
||||
defineExpose({
|
||||
setData,
|
||||
getDom,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 打印样式优化,隐藏不必要元素 */
|
||||
@media print {
|
||||
.el-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body {
|
||||
print-color-adjust: exact;
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
div[style*='box-shadow'] {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,543 @@
|
||||
<template>
|
||||
<div
|
||||
ref="bodyRef"
|
||||
style="
|
||||
padding: 30px 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
min-height: 100vh;
|
||||
background: #f8f9fa;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
"
|
||||
>
|
||||
<!-- 标题区域 - 强化正式感与层次感 -->
|
||||
<div style="text-align: center; margin-bottom: 35px; padding: 20px 0">
|
||||
<div
|
||||
style="
|
||||
font-size: 24px;
|
||||
color: #2c3e50;
|
||||
letter-spacing: 2px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8px;
|
||||
"
|
||||
>
|
||||
长春市朝阳区中医院
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #1a2b48;
|
||||
padding: 12px 0;
|
||||
border-bottom: 2px solid #2c3e50;
|
||||
display: inline-block;
|
||||
letter-spacing: 1px;
|
||||
"
|
||||
>
|
||||
出院诊断病历
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 基础信息卡片 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e5e8eb;
|
||||
border-radius: 12px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
position: relative;
|
||||
"
|
||||
>
|
||||
基础信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 18px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>姓名:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.patientName }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>性别:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.gender }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>年龄:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.age }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>住院号:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.busNo }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>职业:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.temperature }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>入院时间:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.admissionDate }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>出院时间:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.dischargeDate }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>住院天数:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.hospitalDays }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 诊断信息卡片 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e5e8eb;
|
||||
border-radius: 12px;
|
||||
padding: 25px;
|
||||
margin-bottom: 25px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
position: relative;
|
||||
"
|
||||
>
|
||||
诊断
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 18px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>出诊诊断:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.DischargeDiagnosis }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
grid-column: 1 / -1;
|
||||
padding: 4px 0;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>出院病情摘要:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.SummaryAndDiagnosisAndTreatmentProcess }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
grid-column: 1 / -1;
|
||||
padding: 4px 0;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>出院后要求及注意事项:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.RequirementsAndPrecautionsAfterDischarge }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
grid-column: 1 / -1;
|
||||
padding: 4px 0;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #34495e;
|
||||
min-width: 80px;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
word-wrap: break-word;
|
||||
"
|
||||
>中医调护:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
"
|
||||
>{{ formData.TraditionalChineseMedicineNursing }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'; // 补充缺失的reactive导入
|
||||
|
||||
const bodyRef = ref(null);
|
||||
const showPrintPreview = ref(false); // 控制弹窗显隐
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
patientName: '', // 姓名
|
||||
age: '', // 年龄
|
||||
gender: '', // 性别
|
||||
busNo: '', // 住院号
|
||||
admissionDate: '', // 入院日期
|
||||
dischargeDate: '', // 出院日期
|
||||
hospitalDays: '', // 住院天数
|
||||
DischargeDiagnosis: '', // 出院诊断
|
||||
SummaryAndDiagnosisAndTreatmentProcess: '', // 出院病情摘要及诊疗经过
|
||||
RequirementsAndPrecautionsAfterDischarge: '', // 出院后要求及注意事项
|
||||
TraditionalChineseMedicineNursing: '', // 中医调护
|
||||
});
|
||||
|
||||
const getDom = () => {
|
||||
return bodyRef.value;
|
||||
};
|
||||
|
||||
const setData = (data) => {
|
||||
console.log('设置数据=========>', JSON.stringify(data));
|
||||
Object.assign(formData, data);
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
setData,
|
||||
getDom,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 以下是内联样式无法实现的样式(保留说明) */
|
||||
/* 1. 伪元素样式(card-title::after):内联样式不支持伪元素 */
|
||||
/* 2. hover效果:内联样式不支持:hover伪类 */
|
||||
/* 3. 媒体查询响应式:内联样式无法编写@media规则 */
|
||||
/* 4. 打印预览相关样式:若需要打印功能,需单独处理 */
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
<div style="padding: 20px; background: #f8f9fa; min-height: 100vh;" ref="bodyRef">
|
||||
<!-- 标题区域 - 强化正式感 -->
|
||||
<div
|
||||
style="text-align: center; margin-bottom: 30px; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.03);">
|
||||
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px;">长春市朝阳区中医院</div>
|
||||
<div
|
||||
style="font-size: 28px; font-weight: 700; margin: 12px 0; padding: 8px 0; border-bottom: 2px solid #e8f4f8; display: inline-block;">
|
||||
住院患者入院沟通记录单</div>
|
||||
<div style="display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 15px; ">
|
||||
<span style="font-weight: 500;">住院号:</span>
|
||||
<span style="font-weight: 600; text-decoration: underline;">20210001</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 基本信息模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">基本信息</span>
|
||||
</div>
|
||||
<div class="card-content grid-2col">
|
||||
<div class="info-item">
|
||||
<span class="info-label">姓名:</span>
|
||||
<span class="info-value">张三</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">性别:</span>
|
||||
<span class="info-value">男</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">年龄:</span>
|
||||
<span class="info-value">34 岁</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">科室/病区:</span>
|
||||
<span class="info-value">中医科</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">病房/床号:</span>
|
||||
<span class="info-value">305-2</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">入院日期:</span>
|
||||
<span class="info-value">2025-02-14</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 团队信息模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">团队信息</span>
|
||||
</div>
|
||||
<div class="card-content grid-2col">
|
||||
<div class="info-item">
|
||||
<span class="info-label">经治医生:</span>
|
||||
<span class="info-value">华佗</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">主治医生:</span>
|
||||
<span class="info-value">王海明</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">科主任:</span>
|
||||
<span class="info-value">特斯拉</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 病情与诊断模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">病情与诊断</span>
|
||||
</div>
|
||||
<div class="card-content grid-2col">
|
||||
<div class="info-item">
|
||||
<span class="info-label">病情状况:</span>
|
||||
<div class="info-value multi-line">
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">中医诊断:</span>
|
||||
<div class="info-value multi-line">
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">西医诊断:</span>
|
||||
<div class="info-value multi-line">
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 治疗与检查计划模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">治疗与检查计划</span>
|
||||
</div>
|
||||
<div class="card-content grid-2col">
|
||||
<div class="info-item">
|
||||
<span class="info-label">治疗方案:</span>
|
||||
<div class="info-value multi-line">
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">进一步检查项目:</span>
|
||||
<div class="info-value multi-line">血常规、肝肾功能、腹部B超、心电图、中医辨证分型检查、肿瘤标志物筛查</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 风险告知模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">风险告知</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="info-item full-width">
|
||||
<span class="info-label">告知内容:</span>
|
||||
<div class="info-value multi-line">
|
||||
1. 治疗过程中可能出现药物不良反应(如过敏、胃肠道不适等),若出现不适需及时告知医护人员;<br />
|
||||
2. 检查项目存在一定的操作风险(如穿刺出血、感染等),医护人员将严格按照规范操作;<br />
|
||||
3. 病情可能因个体差异出现变化,需根据实际情况调整治疗方案;<br />
|
||||
4. 若患者存在隐瞒病史、不配合治疗等情况,可能影响治疗效果,相关风险由患者自行承担。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 签署确认模块 -->
|
||||
<div class="card-container">
|
||||
<div class="card-header">
|
||||
<span class="card-title">签署确认</span>
|
||||
</div>
|
||||
<div class="card-content grid-2col">
|
||||
<div class="info-item">
|
||||
<span class="info-label">患者或家属:</span>
|
||||
<span class="info-value">张三</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">与患者关系:</span>
|
||||
<span class="info-value">妻子</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">签字日期:</span>
|
||||
<span class="info-value">2025-02-14</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">沟通医师签字:</span>
|
||||
<span class="info-value">华佗</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">沟通日期:</span>
|
||||
<span class="info-value">2025-02-14</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 全局卡片容器统一样式 */
|
||||
.card-container {
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
/* 卡片hover效果 */
|
||||
.card-container:hover {
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* 卡片头部样式 */
|
||||
.card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
background-color: #f5fafe;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 卡片标题样式 */
|
||||
.card-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* 卡片内容区统一样式 */
|
||||
.card-content {
|
||||
padding: 22px;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
/* 2列网格布局(桌面端) */
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
/* 信息项统一样式 */
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
/* 改为顶端对齐,适配多行文本 */
|
||||
padding: 9px 0;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* 信息标签样式 */
|
||||
.info-label {
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 110px;
|
||||
font-size: 15px;
|
||||
padding-top: 5px;
|
||||
/* 对齐多行文本的顶部 */
|
||||
}
|
||||
|
||||
/* 信息值样式(单行) */
|
||||
.info-value {
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
min-height: 28px;
|
||||
/* 确保单行和多行高度一致 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 多行文本样式(适配长内容) */
|
||||
.info-value.multi-line {
|
||||
align-items: flex-start;
|
||||
padding: 10px 12px;
|
||||
line-height: 1.6;
|
||||
min-height: 80px;
|
||||
/* 最小高度,避免内容过少时显得空旷 */
|
||||
white-space: pre-line;
|
||||
/* 支持换行符和空格 */
|
||||
}
|
||||
|
||||
/* 全屏宽度信息项(如风险告知) */
|
||||
.info-item.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 信息值hover效果 */
|
||||
.info-value:hover {
|
||||
background: #f2f2f2;
|
||||
border-color: #e0e0e0;
|
||||
}
|
||||
|
||||
/* 响应式适配(移动端1列布局) */
|
||||
@media (max-width: 768px) {
|
||||
.grid-2col {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: 16px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
min-width: 90px;
|
||||
font-size: 14px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 14px;
|
||||
padding: 4px 10px;
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
.info-value.multi-line {
|
||||
padding: 8px 10px;
|
||||
min-height: 60px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 标题区域适配移动端 */
|
||||
div[style*="font-size: 28px"] {
|
||||
font-size: 24px !important;
|
||||
}
|
||||
|
||||
div[style*="font-size: 22px"] {
|
||||
font-size: 20px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 打印样式优化 */
|
||||
@media print {
|
||||
body {
|
||||
print-color-adjust: exact;
|
||||
-webkit-print-color-adjust: exact;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
box-shadow: none !important;
|
||||
border: 1px solid #ddd !important;
|
||||
margin-bottom: 15px !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: #f8f8f8 !important;
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
background: #fff !important;
|
||||
border: 1px dashed #eee !important;
|
||||
}
|
||||
|
||||
.card-container:hover {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,877 @@
|
||||
<template>
|
||||
<div style="padding: 20px; background: #f8f9fa; min-height: 100vh" ref="bodyRef">
|
||||
<!-- 标题区域 - 强化正式感 -->
|
||||
<div
|
||||
style="
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
|
||||
"
|
||||
>
|
||||
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px">长春市朝阳区中医院</div>
|
||||
<div
|
||||
style="
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
margin: 12px 0;
|
||||
padding: 8px 0;
|
||||
border-bottom: 2px solid #e8f4f8;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
患者与手术基础信息
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 15px;
|
||||
color: #4a5568;
|
||||
"
|
||||
>
|
||||
<span style="font-weight: 500">住院号:</span>
|
||||
<span style="font-weight: 600; text-decoration: underline">{{ formData.busNo }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 基本信息模块(统一为card样式) -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="font-size: 18px; font-weight: 600; letter-spacing: 0.5px">基本信息</span>
|
||||
</div>
|
||||
<div style="padding: 22px; gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>姓名:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.patientName }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>性别:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.gender }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>年龄:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.age }}岁</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>科室:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.department }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>病房/床号:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.bedNo }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术日期:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.operationDateTime }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 手术团队信息模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="font-size: 18px; font-weight: 600; letter-spacing: 0.5px">手术团队信息</span>
|
||||
</div>
|
||||
<div style="padding: 22px; gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术者:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.surgeon }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>第一助手:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.firstAssistant }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>第二助手:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.secondAssistant }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>器械护士:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.scrubNurse }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>麻醉医师:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.anesthesiologist }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>巡逻护士:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.circulatingNurse }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 手术详情模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="font-size: 18px; font-weight: 600; letter-spacing: 0.5px">手术详情</span>
|
||||
</div>
|
||||
<div style="padding: 22px; gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术名称:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.operationName }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术方式:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.operationMethod }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术入路:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.surgicalApproach }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>术中发现:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.intraoperativeFindings }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术过程:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.operationProcess }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 术后情况模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="font-size: 18px; font-weight: 600; letter-spacing: 0.5px">术后情况</span>
|
||||
</div>
|
||||
<div style="padding: 22px; gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>术中出血量:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.bloodLoss }}ml</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>输血情况:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.bloodTransfusion }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>引流管放置:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.drainageTube }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>标本处理:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.specimenDisposal }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术结束时间:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.operationEndTime }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>患者去向:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.patientDestination }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 签署确认模块 -->
|
||||
<div
|
||||
style="
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
transition: box-shadow 0.3s ease, transform 0.2s ease;
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="font-size: 18px; font-weight: 600; letter-spacing: 0.5px">签署确认</span>
|
||||
</div>
|
||||
<div style="padding: 22px; gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>手术者签名:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.surgeonSignature }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>记录者签名:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.recorderSignature }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; padding: 9px 0">
|
||||
<span
|
||||
style="
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
>记录日期:</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 15px;
|
||||
color: #222;
|
||||
padding: 5px 12px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
border: 1px solid #f0f0f0;
|
||||
transition: all 0.2s ease;
|
||||
"
|
||||
>{{ formData.recordDate }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineExpose } from 'vue';
|
||||
const bodyRef = ref();
|
||||
// 响应式表单数据
|
||||
const formData = reactive({
|
||||
// 患者与手术基础信息
|
||||
busNo: '',
|
||||
patientName: '',
|
||||
gender: '',
|
||||
age: '',
|
||||
department: '',
|
||||
bedNo: '',
|
||||
operationDateTime: '', // 手术日期时间
|
||||
|
||||
// 手术团队信息
|
||||
surgeon: '', // 主刀医师
|
||||
firstAssistant: '', // 第一助手
|
||||
secondAssistant: '', // 第二助手
|
||||
anesthesiologist: '', // 麻醉医师
|
||||
circulatingNurse: '', // 巡回护士
|
||||
scrubNurse: '', // 器械护士
|
||||
|
||||
// 手术详情
|
||||
operationName: '', // 规范手术名称
|
||||
operationMethod: '', // 手术方式
|
||||
surgicalApproach: '', // 手术入路
|
||||
intraoperativeFindings: '', // 术中发现
|
||||
operationProcess: '', // 手术过程
|
||||
|
||||
// 术后情况
|
||||
bloodLoss: '', // 术中出血量
|
||||
bloodTransfusion: '', // 输血情况
|
||||
drainageTube: '', // 引流管放置
|
||||
specimenDisposal: '', // 标本处理
|
||||
operationEndTime: '', // 手术结束时间
|
||||
patientDestination: '', // 患者去向
|
||||
|
||||
// 签署信息
|
||||
surgeonSignature: '', // 手术者签名
|
||||
recorderSignature: '', // 记录者签名
|
||||
recordDate: '', // 记录日期
|
||||
});
|
||||
const getDom = () => {
|
||||
return bodyRef.value;
|
||||
};
|
||||
const setData = (data) => {
|
||||
console.log('设置数据=========>', JSON.stringify(data));
|
||||
Object.assign(formData, data);
|
||||
};
|
||||
defineExpose({
|
||||
setData,
|
||||
getDom,
|
||||
});
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,20 @@
|
||||
<template>
|
||||
<div style="width: 100%" class="medicalSec">
|
||||
<div style="margin-bottom: 5px;margin-top: 20px;">
|
||||
<el-button type="primary" @click="addItem" :disabled="false">
|
||||
新增
|
||||
</el-button>
|
||||
<div style="margin-bottom: 5px; margin-top: 20px">
|
||||
<el-button type="primary" @click="addItem" :disabled="false"> 新增 </el-button>
|
||||
<el-button type="danger" plain @click="handleDelete" :disabled="false"> 删除 </el-button>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="tableBoxInner">
|
||||
<div :class="{'borderBottom':!tableData_top.length}" class="tableBoxItemHeader">
|
||||
<div
|
||||
:class="{ borderBottom: !formData.medicalSecond.surgery_tableData.length }"
|
||||
class="tableBoxItemHeader"
|
||||
>
|
||||
<div class="item itemIndex">
|
||||
<div :class="{'itemCheckBox':!isChooseAll,'itemCheckBoxAct':isChooseAll}" @click="chooseAll">
|
||||
<div
|
||||
:class="{ itemCheckBox: !isChooseAll, itemCheckBoxAct: isChooseAll }"
|
||||
@click="chooseAll"
|
||||
>
|
||||
<span v-show="isChooseAll">✓</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,11 +22,13 @@
|
||||
<div class="item itemSurgeryLevel">手术级别</div>
|
||||
<div class="item itemSurgeryName">手术及操作名称</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec" style="width: 100%;border-bottom: 1px solid #ebeef5;">手术及操作医师</div>
|
||||
<div class="spec" style="width: 100%; border-bottom: 1px solid #ebeef5">
|
||||
手术及操作医师
|
||||
</div>
|
||||
<div class="spec">
|
||||
<div class="specItem">术者</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5;">Ⅰ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5;">Ⅱ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5">Ⅰ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5">Ⅱ助</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">切口愈合等级</div>
|
||||
@@ -31,82 +37,85 @@
|
||||
<div class="item itemTime borderRight">手术时长(H)</div>
|
||||
</div>
|
||||
<div
|
||||
class="tableBoxItem"
|
||||
:class="{'borderBottom':index+1===tableData_top.length}"
|
||||
v-for="(item,index) in tableData_top"
|
||||
:key="index">
|
||||
class="tableBoxItem"
|
||||
:class="{ borderBottom: index + 1 === formData.medicalSecond.surgery_tableData.length }"
|
||||
v-for="(item, index) in formData.medicalSecond.surgery_tableData"
|
||||
:key="index"
|
||||
>
|
||||
<div class="item itemIndex">
|
||||
<div :class="{'itemCheckBox':!item['isChoose'],'itemCheckBoxAct':item['isChoose']}" @click="checkItem(item)">
|
||||
<div
|
||||
:class="{ itemCheckBox: !item['isChoose'], itemCheckBoxAct: item['isChoose'] }"
|
||||
@click="checkItem(item, false)"
|
||||
>
|
||||
<span v-show="item['isChoose']">✓</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemDate">
|
||||
<el-date-picker
|
||||
v-model="item.ctrlDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="手术操作日期"
|
||||
:default-time="item.ctrlDate"
|
||||
v-model="item.oprn_oprt_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="手术操作日期"
|
||||
/>
|
||||
</div>
|
||||
<div class="item itemSurgeryLevel">
|
||||
<el-select v-model="item.surgeryLevel" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.oprn_lv_code" placeholder="请选择手术级别">
|
||||
<el-option
|
||||
v-for="item in item['surgeryLevelArr']"
|
||||
:key="item.value"
|
||||
:label="item.title"
|
||||
:value="item.value"
|
||||
v-for="item in surgeryLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemSurgeryName">
|
||||
<el-input v-model="item.surgeryName"></el-input>
|
||||
<el-input v-model="item.oprn_oprt_name"></el-input>
|
||||
</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem" style="padding: 10px;">
|
||||
<el-input v-model="item.surgeryMasterName"></el-input>
|
||||
<div class="specItem" style="padding: 10px">
|
||||
<el-input v-model="item.oper_name"></el-input>
|
||||
</div>
|
||||
<div class="specItem" style="padding: 10px;border-left: 1px solid #ebeef5;">
|
||||
<el-input v-model="item.surgeryMasterName_1"></el-input>
|
||||
<div class="specItem" style="padding: 10px; border-left: 1px solid #ebeef5">
|
||||
<el-input v-model="item.asit_1_name"></el-input>
|
||||
</div>
|
||||
<div class="specItem" style="padding: 10px;border-left: 1px solid #ebeef5;">
|
||||
<el-input v-model="item.surgeryMasterName_2"></el-input>
|
||||
<div class="specItem" style="padding: 10px; border-left: 1px solid #ebeef5">
|
||||
<el-input v-model="item.asit_name2"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.cutLevel">
|
||||
<el-select v-model="item.sinc_heal_lv_code">
|
||||
<el-option
|
||||
v-for="item in item['cutLevelArr']"
|
||||
:key="item.value"
|
||||
:label="item.title"
|
||||
:value="item.value"
|
||||
v-for="item in cutLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.anesthesiaType" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.anst_mtd_code" placeholder="请选择麻醉方式">
|
||||
<el-option
|
||||
v-for="item in operationLevelList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in anesthesiaTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.anesthesiaLevel" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.anst_lv_code" placeholder="请选择麻醉分级">
|
||||
<el-option
|
||||
v-for="item in item.anesthesiaLevelArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in anesthesiaLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemTime borderRight">
|
||||
<el-input v-model="item.surgeryTime"></el-input>
|
||||
<el-input v-model="item.oprn_con_time"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,96 +123,160 @@
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>手术方式:</label>
|
||||
<el-select v-model="formData['surgeryType']">
|
||||
<el-option v-for="(item,index) in formData['surgeryTypeArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="formData.medicalSecond.surgeryType">
|
||||
<el-option
|
||||
v-for="item in surgeryTypeOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>离院方式:</label>
|
||||
<el-select v-model="formData['leaveType']">
|
||||
<el-option v-for="(item,index) in formData['leaveTypeArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.dscg_way">
|
||||
<el-option
|
||||
v-for="item in leaveTypeOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>是否有出院31天内再住院计划:</label>
|
||||
<el-select v-model="formData['isPlan']">
|
||||
<el-option v-for="(item,index) in formData['isPlanArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.dscg_31days_rinp_flag">
|
||||
<el-option
|
||||
v-for="item in isPlanOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>目的:</label>
|
||||
<el-input v-model="formData['purpose']"></el-input>
|
||||
<el-input
|
||||
v-model="formData.medicalSecond.dscg_31days_rinp_pup"
|
||||
placeholder="请填写目的"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>颅脑损伤患者昏迷时间-入院前:</label>
|
||||
<el-input type="date" v-model="formData['comaDurationTime_before']" />
|
||||
<el-input type="date" v-model="formData.medicalSecond.brn_damg_bfadm_coma_dura" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>入院后:</label>
|
||||
<el-input type="date" v-model="formData['comaDurationTime_after']" />
|
||||
<el-input type="date" v-model="formData.medicalSecond.brn_damg_afadm_coma_dura" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>肿瘤分期:</label>
|
||||
<el-select v-model="formData['tumorStaging']">
|
||||
<el-option v-for="(item,index) in formData['tumorStagingArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.tumorStaging">
|
||||
<el-option
|
||||
v-for="item in tumorStagingOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>T:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_T']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_T"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>N:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_N']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_N"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>M:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_M']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_M"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>判断依据:</label>
|
||||
<el-select v-model="formData['judgmentBase']">
|
||||
<el-option v-for="(item,index) in formData['judgmentBaseArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.judgmentBase">
|
||||
<el-option
|
||||
v-for="item in judgmentBaseOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>分化程度:</label>
|
||||
<el-input type="date" v-model="formData['degreeDifferentiation']" />
|
||||
<!-- <el-input type="date" v-model="formData.medicalSecond.bkup_deg" /> -->
|
||||
<el-select v-model="formData.medicalSecond.bkup_deg_code" placeholder="请选择分化程度">
|
||||
<el-option
|
||||
v-for="item in bkup_deg_codeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>临床路径-进入路径:</label>
|
||||
<el-select v-model="formData['enterPath']">
|
||||
<el-option v-for="(item,index) in formData['enterPathArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-select v-model="formData.medicalSecond.enterPath">
|
||||
<el-option
|
||||
v-for="item in enterPathOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select> -->
|
||||
<el-input v-model="formData.medicalSecond.enterPath" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>变异:</label>
|
||||
<el-select v-model="formData['mutation']">
|
||||
<el-option v-for="(item,index) in formData['mutationArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.mutation">
|
||||
<el-option
|
||||
v-for="item in mutationOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>退出路径:</label>
|
||||
<el-select v-model="formData['outPath']">
|
||||
<el-option v-for="(item,index) in formData['outPathArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<!-- <el-select v-model="formData.medicalSecond.outPath">
|
||||
<el-option
|
||||
v-for="item in outPathOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select> -->
|
||||
<el-input v-model="formData.medicalSecond.outPath" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
<div class="form-item"></div>
|
||||
</div>
|
||||
<div class="form-row" styLe="margin: 0;">
|
||||
<div class="form-item" styLe="margin: 0;">
|
||||
@@ -212,426 +285,236 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">特级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_spec']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>特级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_spec"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">1级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_1']"></el-input></div> 小时</label>
|
||||
|
||||
<label class="form-item-specLabel"
|
||||
>1级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_1"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">2级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_2']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>2级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_2"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">3级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_3']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>3级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_3"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>呼吸机使用:</label>
|
||||
<el-select v-model="formData['ventilatorUse']">
|
||||
<el-option v-for="(item,index) in formData['ventilatorUseArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.use_vent_flag">
|
||||
<el-option
|
||||
v-for="item in ventilatorUseOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>有创呼吸机使用时间(小时):</label>
|
||||
<el-input v-model="formData['ventilatorUseTime']"></el-input>
|
||||
<el-input
|
||||
v-model="formData.medicalSecond.vent_used_dura"
|
||||
placeholder="请填写有创呼吸机使用时间(小时)"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {nextTick, reactive, ref, watch} from 'vue';
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
let chooseData = reactive([])//表格中选中的数据 TODO
|
||||
const tableData_top = reactive([])
|
||||
const tableData_sub = ref([
|
||||
{
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
}
|
||||
])
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { cloneDeep, forEach } from 'lodash';
|
||||
import formDataJs from '../../doctorstation/components/store/medicalpage';
|
||||
let chooseData = reactive([]); //表格中选中的数据 TODO
|
||||
let surgery_tableData = reactive([]);
|
||||
const tableData_sub = ref([{}, {}]);
|
||||
let isChooseAll = ref(false);
|
||||
const formData = ref({
|
||||
surgeryDate: '2025-10-10',
|
||||
surgeryType: '',
|
||||
surgeryTypeArr: [
|
||||
{
|
||||
title: '择期手术',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '限期手术',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '急诊手术',
|
||||
value: 3,
|
||||
}
|
||||
],
|
||||
leaveType: '',
|
||||
leaveTypeArr: [
|
||||
{
|
||||
title: '医嘱离院',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '医嘱转院',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '医嘱转社区卫生服务机构',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '非医嘱离院',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
title: '死亡',
|
||||
value: 5,
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
value: 6,
|
||||
}
|
||||
],
|
||||
isPlan: '',
|
||||
isPlanArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
purpose: '',
|
||||
comaDurationTime_before: '',//昏迷时间---入院前
|
||||
comaDurationTime_after: '',//昏迷时间---入院后
|
||||
|
||||
tumorStaging: '',
|
||||
tumorStagingArr: [
|
||||
{
|
||||
title: 'C',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: 'P',
|
||||
value: 2,
|
||||
}
|
||||
],
|
||||
judgmentBase: '',
|
||||
judgmentBaseArr: [
|
||||
{
|
||||
title: '0期',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
title: '1期',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2期',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '3期',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '4期',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
title: '不详',
|
||||
value: 5,
|
||||
}
|
||||
],
|
||||
tumor_T: '',
|
||||
tumor_N: '',
|
||||
tumor_M: '',
|
||||
degreeDifferentiation: '',
|
||||
|
||||
enterPath: '',
|
||||
enterPathArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
outPath: '',
|
||||
outPathArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
mutation: '',
|
||||
mutationArr: [
|
||||
{
|
||||
title: '有',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '无',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
|
||||
nursingLevel_spec: '',
|
||||
nursingLevel_1: '',
|
||||
nursingLevel_2: '',
|
||||
nursingLevel_3: '',
|
||||
|
||||
ventilatorUse: '',
|
||||
ventilatorUseArr: [
|
||||
{
|
||||
title: '未使用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '无创',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '有创',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '无创+有创',
|
||||
value: 4,
|
||||
}
|
||||
],
|
||||
|
||||
ventilatorUseTime: '',
|
||||
});
|
||||
|
||||
const operationLevelList = [
|
||||
{ name: '一级', id: 1 },
|
||||
{ name: '二级', id: 2 },
|
||||
{ name: '三级', id: 3 },
|
||||
];
|
||||
const formData = reactive(formDataJs);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
dscg_way,
|
||||
days_rinp_flag_31,
|
||||
use_vent,
|
||||
oprn_oprt_lv_code,
|
||||
sinc_heal_lv_code,
|
||||
anst_mtd_code,
|
||||
anst_lv_code,
|
||||
sys_tumor_staging,
|
||||
sys_according_to,
|
||||
sys_entry_path,
|
||||
sys_yes_no,
|
||||
sys_exit_path,
|
||||
oprn_patn_type_code,
|
||||
bkup_deg_code,
|
||||
} = proxy.useDict(
|
||||
'dscg_way',
|
||||
'days_rinp_flag_31',
|
||||
'use_vent',
|
||||
'oprn_oprt_lv_code',
|
||||
'sinc_heal_lv_code',
|
||||
'anst_mtd_code',
|
||||
'anst_lv_code',
|
||||
'sys_tumor_staging',
|
||||
'sys_according_to',
|
||||
'sys_entry_path',
|
||||
'sys_yes_no',
|
||||
'sys_exit_path',
|
||||
'oprn_patn_type_code',
|
||||
'bkup_deg_code'
|
||||
);
|
||||
|
||||
// 手术类型
|
||||
const surgeryTypeOptions = oprn_patn_type_code;
|
||||
// 离院方式
|
||||
const leaveTypeOptions = dscg_way;
|
||||
// 计划出院
|
||||
const isPlanOptions = days_rinp_flag_31;
|
||||
// 肿瘤分期
|
||||
const tumorStagingOptions = sys_tumor_staging;
|
||||
// 判断依据
|
||||
const judgmentBaseOptions = sys_according_to;
|
||||
// 临床路径
|
||||
const enterPathOptions = sys_entry_path;
|
||||
// 变异
|
||||
const mutationOptions = sys_yes_no;
|
||||
// 退出路径
|
||||
const outPathOptions = sys_exit_path;
|
||||
// 呼吸机使用
|
||||
const ventilatorUseOptions = use_vent;
|
||||
// 手术级别
|
||||
const surgeryLevelOptions = oprn_oprt_lv_code;
|
||||
// 切口愈合等级
|
||||
const cutLevelOptions = sinc_heal_lv_code;
|
||||
// 麻醉方式
|
||||
const anesthesiaTypeOptions = anst_mtd_code;
|
||||
// 麻醉分级
|
||||
const anesthesiaLevelOptions = anst_lv_code;
|
||||
// 分化程度
|
||||
const bkup_deg_codeOptions = bkup_deg_code;
|
||||
watch(
|
||||
() => formData.medicalSecond.surgery_tableData,
|
||||
(newValue) => {
|
||||
checkItem({}, false);
|
||||
}
|
||||
);
|
||||
// 新增
|
||||
const addItem = () => {
|
||||
let data = {
|
||||
//手术操作日期 oprn_oprt_date
|
||||
oprn_date: '',
|
||||
|
||||
//手术级别 手术级别名称--oprn_lv_code
|
||||
oprn_oprt_date: '',
|
||||
// 手术级别
|
||||
oprn_lv_code: '',
|
||||
|
||||
//手术及操作名称 oprn_oprt_code
|
||||
// 手术操作名称
|
||||
oprn_oprt_name: '',
|
||||
|
||||
//手术及操作医师
|
||||
//术者
|
||||
// 术者
|
||||
oper_name: '',
|
||||
//Ⅰ助
|
||||
// Ⅰ助
|
||||
asit_1_name: '',
|
||||
//Ⅱ助
|
||||
// Ⅱ助
|
||||
asit_name2: '',
|
||||
|
||||
//切口愈合等级 sinc_heal_lv_code
|
||||
sinc_heal_lv: '',
|
||||
|
||||
//麻醉方式
|
||||
anst_way: '',
|
||||
|
||||
//麻醉分级 anst_lv_code
|
||||
anst_lv_name: '',
|
||||
|
||||
//手术时长
|
||||
|
||||
|
||||
//手术方式
|
||||
|
||||
|
||||
//离院方式
|
||||
dscg_way: '',
|
||||
|
||||
//是否有出院31天内再住院计划-----不确定
|
||||
days_rinp_flag_31: '',
|
||||
|
||||
//目的
|
||||
days_rinp_pup_31: '',
|
||||
|
||||
//颅脑损伤患者昏迷时间 入院前
|
||||
brn_damg_bfadm_coma_dura: '',
|
||||
//颅脑损伤患者昏迷时间 入院后
|
||||
brn_damg_afadm_coma_dura: '',
|
||||
|
||||
//肿瘤分期
|
||||
//T
|
||||
//N
|
||||
//M
|
||||
//判断依据
|
||||
//分化程度 bkup_deg_code
|
||||
bkup_deg: '',
|
||||
|
||||
//临床路径-进入路径
|
||||
//变异
|
||||
//退出路径
|
||||
|
||||
//护理级别
|
||||
//特级护理
|
||||
spga_nurscare_days: '',
|
||||
//1级护理
|
||||
lv1_nurscare_days: '',
|
||||
//2级护理
|
||||
scd_nurscare_days: '',
|
||||
//3级护理
|
||||
lv3_nurscare_days: '',
|
||||
|
||||
//呼吸机使用 vent_used_days vent_used_h_cnt vent_used_m_cnt
|
||||
vent_used_dura: '',
|
||||
//有创呼吸机使用时间
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 切口愈合等级
|
||||
sinc_heal_lv_code: '',
|
||||
// 麻醉方式
|
||||
anst_mtd_code: '',
|
||||
// 麻醉分级
|
||||
anst_lv_code: '',
|
||||
// 手术时常
|
||||
oprn_con_time: '',
|
||||
// 是否选中
|
||||
isChoose: false,
|
||||
ctrlDate: '2025-10-10',
|
||||
surgeryLevel: '',
|
||||
surgeryLevelArr: [
|
||||
{
|
||||
title: '1级',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2级',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '3级',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '4级',
|
||||
value: 4,
|
||||
}
|
||||
],
|
||||
surgeryName: '',
|
||||
surgeryMasterName: '',
|
||||
surgeryMasterName_1: '',
|
||||
surgeryMasterName_2: '',
|
||||
cutLevel: '',
|
||||
cutLevelArr: [
|
||||
{
|
||||
title: '1/甲',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2/乙',
|
||||
value: 2,
|
||||
}
|
||||
],
|
||||
anesthesiaType: '',
|
||||
anesthesiaTypeArr: [],
|
||||
anesthesiaEr: '',
|
||||
anesthesiaLevel: '',
|
||||
anesthesiaLevelArr: [
|
||||
{
|
||||
title: '1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2',
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
surgeryTime: ''
|
||||
}
|
||||
};
|
||||
//push
|
||||
tableData_top.unshift(
|
||||
data
|
||||
)
|
||||
tableData_top.map((d,i) => {
|
||||
d.currentIndex = i
|
||||
})
|
||||
|
||||
}
|
||||
const checkItem = (e) => {
|
||||
chooseData = []
|
||||
e['isChoose'] = !e['isChoose']
|
||||
tableData_top.map((d) => {
|
||||
if (d['isChoose']) {
|
||||
chooseData.push(d)
|
||||
formData.medicalSecond.surgery_tableData.unshift(data);
|
||||
checkItem({}, true);
|
||||
};
|
||||
const checkItem = (e, isAdd) => {
|
||||
if (!isAdd) {
|
||||
e['isChoose'] = !e['isChoose'];
|
||||
}
|
||||
let isSeletAll = false;
|
||||
for (let index = 0; index < formData.medicalSecond.surgery_tableData.length; index++) {
|
||||
const obj = formData.medicalSecond.surgery_tableData[index];
|
||||
if (!obj.isChoose) {
|
||||
isSeletAll = false;
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
isSeletAll = true;
|
||||
}
|
||||
if (isSeletAll) {
|
||||
isChooseAll.value = true;
|
||||
} else {
|
||||
isChooseAll.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const chooseAll = () => {
|
||||
isChooseAll.value = !isChooseAll.value
|
||||
|
||||
if (tableData_top.length) {
|
||||
tableData_top.map((d) => {
|
||||
d['isChoose'] = !isChooseAll.value
|
||||
|
||||
checkItem(d)
|
||||
})
|
||||
isChooseAll.value = !isChooseAll.value;
|
||||
if (isChooseAll.value) {
|
||||
formData.medicalSecond.surgery_tableData.forEach((item) => {
|
||||
item.isChoose = true;
|
||||
});
|
||||
} else {
|
||||
formData.medicalSecond.surgery_tableData.forEach((item) => {
|
||||
item.isChoose = false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
//删除方法
|
||||
const handleDelete = () => {
|
||||
if (!tableData_top.length) { return }
|
||||
let deleteId = []
|
||||
chooseData.map((d) => {
|
||||
deleteId.push(d['currentIndex'])
|
||||
})
|
||||
|
||||
for (let i = tableData_top.length - 1; i >= 0; i--) {
|
||||
if (deleteId.includes(tableData_top[i].currentIndex)) {
|
||||
tableData_top.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
isChooseAll.value = false
|
||||
msgSuccess('删除成功')
|
||||
}
|
||||
if (!formData.medicalSecond.surgery_tableData.length) return;
|
||||
const newtableData_top = formData.medicalSecond.surgery_tableData.filter((item) => {
|
||||
return !item.isChoose;
|
||||
});
|
||||
formData.medicalSecond.surgery_tableData.length = 0;
|
||||
newtableData_top.forEach((item) => {
|
||||
formData.medicalSecond.surgery_tableData.push(item);
|
||||
});
|
||||
isChooseAll.value = false;
|
||||
msgSuccess('删除成功');
|
||||
};
|
||||
|
||||
const msgSuccess = (msg) => {
|
||||
ElMessage({
|
||||
message: msg,
|
||||
type: 'success',
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.medicalSec {
|
||||
.el-date-editor.el-input, .el-date-editor.el-input__wrapper {
|
||||
.el-date-editor.el-input,
|
||||
.el-date-editor.el-input__wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.el-table td.el-table__cell div {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
@@ -938,4 +821,4 @@ label {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,24 +18,31 @@
|
||||
<el-text size="large">
|
||||
<!-- <el-form-item label="费用性质:" prop="currentDate"> {{ '自费' }} </el-form-item> -->
|
||||
</el-text>
|
||||
|
||||
<!-- 支付方式选择 -->
|
||||
<div class="payment-method-container">
|
||||
<el-form-item label="支付方式:">
|
||||
<div class="payment-type-list">
|
||||
<div
|
||||
class="payment-type-item"
|
||||
:class="{ active: currentPayType === item.value }"
|
||||
v-for="item in payTypeOptions"
|
||||
:key="item.value"
|
||||
@click="selectPayType(item.value)"
|
||||
>
|
||||
<svg-icon
|
||||
:icon-class="item.iconClass || item.value"
|
||||
class="payment-icon"
|
||||
:style="{ color: currentPayType === item.value ? '#13C0B3' : '#666666' }"
|
||||
/>
|
||||
<span class="payment-label">{{ item.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<div class="payment-container">
|
||||
<!-- <el-form-item label="支付方式:" prop="payEnum" style="display: flex">
|
||||
<el-select
|
||||
v-model="form.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in props.payLists"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="支付金额:" prop="amount">
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
@@ -51,6 +58,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
@@ -65,6 +73,7 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
@@ -73,11 +82,12 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
// 原有逻辑代码保持不变
|
||||
import { savePayment } from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
|
||||
import { ElMessage } from 'element-plus';
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -99,58 +109,92 @@ const props = defineProps({
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {},
|
||||
form: {
|
||||
amount: undefined,
|
||||
displayAmount: 0,
|
||||
payLevelEnum: undefined,
|
||||
},
|
||||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: '请输入支付金额', trigger: 'blur' },
|
||||
{ type: 'number', min: 0.01, message: '支付金额必须大于0', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { form, rules } = toRefs(data);
|
||||
|
||||
// 支付方式选项
|
||||
const payTypeOptions = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 定义当前选中的支付方式,默认选中现金
|
||||
const currentPayType = ref(220400);
|
||||
|
||||
// 选择支付方式方法
|
||||
const selectPayType = (value) => {
|
||||
currentPayType.value = value;
|
||||
form.value.payLevelEnum = value;
|
||||
};
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
const payMethods = ref(undefined);
|
||||
|
||||
async function submit() {
|
||||
form.value.patientId = props.patientInfo.patientId;
|
||||
form.value.encounterId = props.patientInfo.encounterId;
|
||||
form.value.accountId = props.patientInfo.accountId;
|
||||
console.log(props.patientInfo, 'patientInfo');
|
||||
savePayment(form.value).then((res) => {
|
||||
// 表单验证
|
||||
if (!form.value.amount || form.value.amount <= 0) {
|
||||
ElMessage.error('请输入有效的支付金额');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!form.value.payLevelEnum) {
|
||||
ElMessage.error('请选择支付方式');
|
||||
return;
|
||||
}
|
||||
|
||||
form.value.patientId = props.patientInfo?.patientId;
|
||||
form.value.encounterId = props.patientInfo?.encounterId;
|
||||
form.value.accountId = props.patientInfo?.accountId;
|
||||
|
||||
console.log('表单数据:', form.value);
|
||||
|
||||
try {
|
||||
const res = await savePayment(form.value);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('收费成功');
|
||||
reset();
|
||||
emit('close', 'success');
|
||||
emit('close', {
|
||||
status: 'success',
|
||||
busNo: props.patientInfo?.busNo,
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(res.msg || '收费失败');
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
ElMessage.error('网络错误,请重试');
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
patientId: undefined,
|
||||
encounterId: undefined,
|
||||
displayAmount: 0,
|
||||
payEnum: undefined,
|
||||
amount: undefined,
|
||||
};
|
||||
proxy.resetForm('chargeDialogRef');
|
||||
form.value.amount = undefined;
|
||||
form.value.displayAmount = 0;
|
||||
form.value.payLevelEnum = undefined;
|
||||
currentPayType.value = 220400; // 重置选中状态为现金
|
||||
|
||||
if (proxy && proxy.resetForm) {
|
||||
proxy.resetForm('chargeDialogRef');
|
||||
}
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理金额变化事件
|
||||
*
|
||||
* 当表单中的金额发生变化时,将显示金额设置为实际金额
|
||||
*/
|
||||
function handleAmountChange() {
|
||||
form.value.displayAmount = form.value.amount;
|
||||
form.value.displayAmount = form.value.amount || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 变化支付方式事件
|
||||
*
|
||||
*/
|
||||
function clearAmount() {
|
||||
form.value.amount = 0;
|
||||
}
|
||||
@@ -160,12 +204,24 @@ function close() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
// 监听总金额变化,如果有默认值则自动填充
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newVal) => {
|
||||
if (newVal && newVal > 0) {
|
||||
form.value.amount = newVal;
|
||||
form.value.displayAmount = newVal;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
@@ -188,10 +244,49 @@ function close() {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
/* 支付方式容器样式 */
|
||||
.payment-method-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-type-list {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.payment-type-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.payment-type-item:hover {
|
||||
background-color: #eef2f7;
|
||||
}
|
||||
|
||||
.payment-type-item.active {
|
||||
background-color: #e8f8f5;
|
||||
border-color: #13c0b3;
|
||||
color: #13c0b3;
|
||||
}
|
||||
|
||||
.payment-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.payment-label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
@@ -248,7 +343,7 @@ function close() {
|
||||
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block; /* 保持行内布局 */
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.suffix-text {
|
||||
@@ -257,10 +352,9 @@ function close() {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 调整输入框内边距 */
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<el-table-column label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" @click.stop="viewPatient(scope.row)">
|
||||
查看
|
||||
选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { getWardList } from '../../../../drug/inpatientMedicationDispensing/components/api';
|
||||
import { getDepositInfo } from './api';
|
||||
|
||||
// Props
|
||||
@@ -78,10 +79,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
wardListOptions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
@@ -97,7 +94,7 @@ const data = reactive({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
// Emits
|
||||
const emits = defineEmits(['confirm', 'cancel', 'patientSelected']);
|
||||
const emits = defineEmits(['confirm', 'cancel', 'patientSelected', 'triggerSearch']);
|
||||
const total = ref(0);
|
||||
// // v-model for drawer visibility
|
||||
// const drawerVisible = defineModel('drawerVisible', {
|
||||
@@ -156,6 +153,7 @@ function viewPatient(patient) {
|
||||
console.log('View patient:', patient);
|
||||
selectedPatient.value = patient; // 选中患者
|
||||
emits('patientSelected', selectedPatient.value); // 发送选中的患者数据
|
||||
emits('triggerSearch', patient.busNo); // 触发预交金查询事件
|
||||
drawerVisible.value = false;
|
||||
reset(); // 重置筛选条件
|
||||
// 可以在这里做一些操作,比如高亮行,或者如果“查看”是选择并关闭,则触发confirm
|
||||
@@ -187,7 +185,20 @@ function show() {
|
||||
console.log('show', props);
|
||||
wardListOptions.value = props.wardListOptions;
|
||||
drawerVisible.value = props.drawerVisible;
|
||||
getList();
|
||||
getWardList()
|
||||
.then((res) => {
|
||||
if (res.length > 0) {
|
||||
wardListOptions.value = res.map((ward) => ({
|
||||
label: ward.name,
|
||||
value: ward.id,
|
||||
}));
|
||||
}
|
||||
getList();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('获取病区列表失败:', error);
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,8 +206,8 @@ function show() {
|
||||
*/
|
||||
function getList() {
|
||||
console.log('queryParams', queryParams.value);
|
||||
getDepositInfo().then((res) => {
|
||||
patientData.value = res.data.records;
|
||||
getDepositInfo(queryParams.value).then((res) => {
|
||||
patientData.value = res.data?.records || [];
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -118,7 +118,10 @@ async function submit() {
|
||||
refund(form.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
reset();
|
||||
emit('close', 'success');
|
||||
emit('close', {
|
||||
status: 'success',
|
||||
busNo: props.patientInfo?.busNo,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
ref="showPatientRef"
|
||||
:wardListOptions="wardListOptions"
|
||||
@patientSelected="handlePatientSelected"
|
||||
@triggerSearch="handleTriggerSearch"
|
||||
/>
|
||||
<ChargeDialog
|
||||
ref="chargeListRef"
|
||||
@@ -178,7 +179,6 @@ const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
searchKey: 'ZY202507310001',
|
||||
});
|
||||
const tableRowClassName = ({ row, rowIndex }) => {
|
||||
if (row.amount < 0) {
|
||||
@@ -201,6 +201,7 @@ function getPatientInfo() {
|
||||
}
|
||||
console.log(queryParams.value, 'queryParams.value');
|
||||
getDepositInfo({ busNo: queryParams.value.searchKey }).then((res) => {
|
||||
queryParams.value.searchKey = '';
|
||||
if (res.code == 200 && res.data.records[0].encounterId) {
|
||||
patientInfo.value = res.data.records[0];
|
||||
getDepositInfoPage({ encounterId: res.data.records[0].encounterId }).then((res) => {
|
||||
@@ -240,12 +241,12 @@ function refund() {
|
||||
|
||||
/** 选择病人 */
|
||||
function handlePatientSelected(row) {
|
||||
console.log(row, 'rowwwwwwwwhandlePatientSelected');
|
||||
queryParams.value.searchKey = row.admissionNo;
|
||||
// console.log(row, 'rowwwwwwwwhandlePatientSelected');
|
||||
// queryParams.value.searchKey = row.admissionNo;
|
||||
patientInfo.value = row;
|
||||
nextTick(() => {
|
||||
getPatientInfo();
|
||||
});
|
||||
// nextTick(() => {
|
||||
// getPatientInfo();
|
||||
// });
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -286,14 +287,19 @@ function formatValue(value) {
|
||||
*
|
||||
* @returns {void} 无返回值
|
||||
*/
|
||||
function handleClose(str) {
|
||||
function handleClose(data) {
|
||||
openDialog.value = false;
|
||||
openRefundDialog.value = false;
|
||||
if (str === 'success') {
|
||||
if (data?.status === 'success' && data?.busNo) {
|
||||
queryParams.value.searchKey = data.busNo;
|
||||
getPatientInfo();
|
||||
proxy.$modal.msgSuccess('操作成功!');
|
||||
}
|
||||
}
|
||||
//在院患者查询
|
||||
function handleTriggerSearch(busNo) {
|
||||
queryParams.value.searchKey = busNo; // 将选中患者的住院号赋值给搜索参数
|
||||
getPatientInfo(); // 调用现有查询方法
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,100 +1,166 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费患者列表 新
|
||||
*/
|
||||
export function getList1(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者处方列表
|
||||
*/
|
||||
export function getChargeList(row) {
|
||||
return request({
|
||||
url: `/charge-manage/inpa-charge/patient-prescription?encounterId=${row.encounterId}&startTime=${row.startTime}&endTime=${row.endTime}`,
|
||||
method: 'get',
|
||||
})
|
||||
export function getChargeList(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/patient-prescription?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 医保转自费
|
||||
*/
|
||||
export function changeToSelfPay(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 自费转医保
|
||||
*/
|
||||
export function changeToMedicalInsurance(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/medical-insurance?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/charge/medical-insurance?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
* 学生医保转学生自费
|
||||
*/
|
||||
export function changeStudentPayTosStudentSelf(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/student-self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*/
|
||||
export function changeStudentSelfToStudentPay(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/student-yb-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 住院结算
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function init1() {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
* 住院预结算
|
||||
*/
|
||||
export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pre-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pre-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预结算
|
||||
*/
|
||||
export function unprecharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/unprecharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-un-pay',
|
||||
method: 'post',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发耗材
|
||||
*/
|
||||
export function dispenseMedicalConsumables(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medical-consumables-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 补打小票
|
||||
*/
|
||||
export function getChargeInfo(param) {
|
||||
return request({
|
||||
url: '/payment/bill/getDetail',
|
||||
method: 'get',
|
||||
params: param,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function wxPay(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-query',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="props.paymentEnum == 1 ? '确认退费' : '确认收费'"
|
||||
title="确认收费"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@open="handleOpen"
|
||||
@close="close"
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
@@ -18,47 +19,60 @@
|
||||
{{ props.totalAmount.toFixed(2) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">折扣金额:</el-text>
|
||||
<el-text size="large" type="warning" class="amount">
|
||||
{{ discountAmount.toFixed(2) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<div class="payment-container">
|
||||
<div v-for="(item, index) in formData.selfPay" :key="index" class="payment-item">
|
||||
<span>支付方式:</span>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
<template v-for="(item, index) in formData.selfPay" :key="index">
|
||||
<div v-show="item.payEnum != 220500" class="payment-item">
|
||||
<span>支付方式:</span>
|
||||
<img
|
||||
v-if="item.payEnum == 220100 || item.payEnum == 220200"
|
||||
:src="imgs[item.payEnum == 220100 ? 0 : 1]"
|
||||
style="width: 20px; height: 20px"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="(value) => clearAmount(index, value)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -72,6 +86,29 @@
|
||||
金额已满足应收,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
<div style="margin-top: 10px" v-if="userStore.hospitalName == '长春市朝阳区中医院'">
|
||||
<span>折扣:</span>
|
||||
<el-radio-group v-model="discountRadio" @change="handleDiscountChange">
|
||||
<el-radio-button
|
||||
v-for="item in charge_discount"
|
||||
:key="item.value"
|
||||
link
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
@@ -93,7 +130,7 @@
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">{{ props.paymentEnum == 1 ? '退费合计:' : '收费合计:' }}</el-text>
|
||||
<el-text type="info">实收合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
@@ -105,9 +142,10 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading">
|
||||
确 定
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" @click="print()" :disabled="dialogLoading">打 印</el-button> -->
|
||||
<el-button @click="close" :disabled="dialogLoading">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -115,12 +153,24 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables } from './api';
|
||||
import {
|
||||
savePayment,
|
||||
unprecharge,
|
||||
dispenseMedicalConsumables,
|
||||
wxPay,
|
||||
WxPayResult,
|
||||
getChargeInfo,
|
||||
} from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import templateJson from './template.json';
|
||||
import { pa } from 'element-plus/es/locales.mjs';
|
||||
import image1 from '../../../../../assets/images/weixinzhifu.png';
|
||||
import image2 from '../../../../../assets/images/zhifubaozhifu.png';
|
||||
const imgs = ref([image1, image2]);
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -144,36 +194,43 @@ const props = defineProps({
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
consumablesIdList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
paymentEnum: {
|
||||
type: String,
|
||||
chargedItems: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
newId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
oldId: {
|
||||
type: String,
|
||||
}
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { charge_discount } = proxy.useDict('charge_discount');
|
||||
|
||||
const userStore = useUserStore();
|
||||
const discountRadio = ref();
|
||||
const discountAmount = ref(0);
|
||||
const txtCode = ref('');
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
selfPay: [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }],
|
||||
@@ -195,154 +252,186 @@ watch(
|
||||
);
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
async function printReceipt(param) {
|
||||
console.log(param, 'param');
|
||||
console.log(props.patientInfo, 'props.patientInfo');
|
||||
let displayAmountTemp = 0;
|
||||
|
||||
// 打印小票
|
||||
function printReceipt(param) {
|
||||
let total = 0;
|
||||
props.chargedItems.forEach((item) => {
|
||||
total += item.totalPrice || 0;
|
||||
});
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
YB_FUND_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 100000)?.amount.toFixed(2) + ' 元' ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
YB_TC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 110000)?.amount.toFixed(2) + ' 元' ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 120000)?.amount.toFixed(2) + ' 元' ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 130000)?.amount.toFixed(2) + ' 元' ?? 0, // 医疗救助基金支出
|
||||
// YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
// YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
// YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
// YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
// YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
// YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
// YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
// OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
// OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
// OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
// OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
// OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
// OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
// OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
// OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
// OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
// OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
// HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
FULAMT_OWNPAY_AMT:
|
||||
param.detail?.find((t) => t.payEnum === 1)?.amount.toFixed(2) + ' 元' ?? 0, // 全自费金额
|
||||
// OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
// PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail?.find((t) => t.payEnum === 5)?.amount.toFixed(2) + ' 元' ?? 0, // 符合政策范围金额
|
||||
// ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
// POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
// BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
SELF_YB_ZH_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 210000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人医保账户支付
|
||||
// SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
// SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
// SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
// SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
// SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
// SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
// SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
// BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
// RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
// URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
// URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
// MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
// GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
// ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
// CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
// FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
// HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
// SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
// HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
itemTotalAmount: total.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmountTemp + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
printer: 'xp',
|
||||
title: '门诊收费结算单',
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
|
||||
async function submit() {
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount.toFixed(2)) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
return;
|
||||
}
|
||||
|
||||
// if(chrome.webview === undefined) {
|
||||
// alert('当前版本不支持银联支付');
|
||||
// }
|
||||
// else {
|
||||
// try {
|
||||
// let jsonResult = await window.chrome.webview.hostObjects.CSharpAccessor.ReadCardAsync();
|
||||
// let cardInfo = JSON.parse(jsonResult);
|
||||
// console.log(cardInfo.CardType);
|
||||
// } catch (error) {
|
||||
// console.error('调用失败:', error);
|
||||
// }
|
||||
// }
|
||||
dialogLoading.value = true;
|
||||
savePayment({
|
||||
function handleWxPay() {
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
oldId: props.oldId,
|
||||
newId: props.newId,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
formData.totalAmount = props.totalAmount;
|
||||
formData.selfPay[0].amount = props.totalAmount;
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
displayAmountTemp = displayAmount.value;
|
||||
|
||||
let amount = formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
return sum + (Number(item.amount) || 0);
|
||||
}, 0)
|
||||
.toFixed(2);
|
||||
if (parseFloat(amount) < formData.totalAmount.toFixed(2)) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
return;
|
||||
}
|
||||
dialogLoading.value = true;
|
||||
console.log(props.newId, props.oldId);
|
||||
savePayment({
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
newId: props.newId,
|
||||
oldId: props.oldId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
printReceipt(res.data);
|
||||
(formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]),
|
||||
emit('close', 'success', res.msg);
|
||||
// 长春大学自动发耗材
|
||||
getChargeInfo({ paymentId: props.paymentId }).then((res) => {
|
||||
// printReceipt(res.data);
|
||||
});
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success', res.msg);
|
||||
emit('refresh'); // 发送刷新事件给父组件
|
||||
// 长春市朝阳区中医院自动发耗材
|
||||
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
|
||||
dispenseMedicalConsumables(props.consumablesIdList);
|
||||
}
|
||||
@@ -353,13 +442,51 @@ async function submit() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 打印收费结算单 */
|
||||
async function print() {
|
||||
console.log('patientInfo', props.patientInfo);
|
||||
console.log('category', props.category);
|
||||
console.log('totalAmount', props.totalAmount);
|
||||
console.log('chargeItemIds', props.chargeItemIds);
|
||||
console.log('consumablesIdList', props.consumablesIdList);
|
||||
console.log('userCardInfo', props.userCardInfo);
|
||||
console.log('paymentId', props.paymentId);
|
||||
console.log('details', props.details);
|
||||
console.log('chargedItems', props.chargedItems);
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmount.value + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
},
|
||||
],
|
||||
};
|
||||
console.log(result, '==result.data==');
|
||||
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
const printerList = hiprintTemplate.getPrinterList();
|
||||
console.log(hiprintTemplate, '打印机列表');
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
title: '门诊收费结算单',
|
||||
});
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
{ label: '优惠', value: 220500, isWebPay: false },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -381,9 +508,36 @@ const getMax = (index) => {
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 折扣计算
|
||||
function handleDiscountChange(value) {
|
||||
let amount = props.totalAmount * Number(value);
|
||||
discountAmount.value = props.totalAmount - amount;
|
||||
formData.selfPay = [
|
||||
{ payEnum: 220100, amount: amount, payLevelEnum: 2 },
|
||||
{ payEnum: 220500, amount: discountAmount.value, payLevelEnum: 2 },
|
||||
];
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
@@ -401,15 +555,31 @@ const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index, value) => {
|
||||
const selectedOption = selfPayMethods.find((item) => item.value === value);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
return formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
if (item.payEnum !== 220500) {
|
||||
return sum + (Number(item.amount) || 0);
|
||||
}
|
||||
return sum;
|
||||
}, 0)
|
||||
.toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
@@ -427,8 +597,25 @@ function close() {
|
||||
// proxy.$modal.msgError(res.message);
|
||||
// }
|
||||
// });
|
||||
txtCode.value = '';
|
||||
|
||||
formData.totalAmount = 0;
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
formData.medicalInsurance = {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
};
|
||||
|
||||
// 重置折扣相关状态
|
||||
discountRadio.value = undefined;
|
||||
discountAmount.value = 0;
|
||||
emit('close');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
printReceipt,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
{
|
||||
"panels": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": 1,
|
||||
"paperType": "自定义",
|
||||
"height": 160,
|
||||
"width": 80,
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 450.7086614173229,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {
|
||||
"content": "",
|
||||
"opacity": 0.7,
|
||||
"type": 1
|
||||
},
|
||||
"watermarkOptions": {
|
||||
"content": "",
|
||||
"fillStyle": "rgba(184, 184, 184, 0.3)",
|
||||
"fontSize": "36px",
|
||||
"rotate": 25,
|
||||
"width": 413,
|
||||
"height": 310,
|
||||
"timestamp": false,
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
"panelLayoutOptions": {
|
||||
"layoutType": "column",
|
||||
"layoutRowGap": 0,
|
||||
"layoutColumnGap": 0
|
||||
},
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 45,
|
||||
"top": 15,
|
||||
"height": 16.5,
|
||||
"width": 142.5,
|
||||
"title": "长春市朝阳区中医院门诊收费结算单",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontWeight": "bold",
|
||||
"letterSpacing": 0.75,
|
||||
"textAlign": "center",
|
||||
"qrCodeLevel": 0,
|
||||
"fontSize": 12
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 15,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 80,
|
||||
"title": "姓名",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "name"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 99,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 60,
|
||||
"title": "性别",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "gender"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 163.5,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 60,
|
||||
"title": "年龄",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "age"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 15,
|
||||
"top": 60,
|
||||
"height": 14,
|
||||
"width": 120,
|
||||
"title": "病人类型",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "medType"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 13.5,
|
||||
"top": 82.5,
|
||||
"height": 14,
|
||||
"width": 120,
|
||||
"title": "病历号",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "encounterBusNo"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 13.5,
|
||||
"top": 102,
|
||||
"height": 37.5,
|
||||
"width": 208.5,
|
||||
"title": "undefined+beforeDragIn",
|
||||
"field": "chargedItems",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"textAlign": "center",
|
||||
"tableBodyRowBorder": "border",
|
||||
"tableBodyCellBorder": "border",
|
||||
"columns": [
|
||||
[
|
||||
{
|
||||
"title": "项目名称",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 61.93559159547676,
|
||||
"field": "itemName",
|
||||
"checked": true,
|
||||
"columnId": "itemName",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "单价",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.1097311853845,
|
||||
"field": "unitPrice",
|
||||
"checked": true,
|
||||
"columnId": "unitPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "数量",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.12571954521698,
|
||||
"field": "quantityValue",
|
||||
"checked": true,
|
||||
"columnId": "quantityValue",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "总价",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 35.15170328143829,
|
||||
"field": "totalPrice",
|
||||
"checked": true,
|
||||
"columnId": "totalPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "费用性质",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.17725439248345,
|
||||
"field": "contractName",
|
||||
"checked": true,
|
||||
"columnId": "contractName",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "收费名称",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 56.86712269302148,
|
||||
"field": "chargeItem",
|
||||
"checked": false,
|
||||
"columnId": "chargeItem",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "表格",
|
||||
"type": "table",
|
||||
"editable": true,
|
||||
"columnDisplayEditable": true,
|
||||
"columnDisplayIndexEditable": true,
|
||||
"columnTitleEditable": true,
|
||||
"columnResizable": true,
|
||||
"columnAlignEditable": true,
|
||||
"isEnableEditField": true,
|
||||
"isEnableContextMenu": true,
|
||||
"isEnableInsertRow": true,
|
||||
"isEnableDeleteRow": true,
|
||||
"isEnableInsertColumn": true,
|
||||
"isEnableDeleteColumn": true,
|
||||
"isEnableMergeCell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 99,
|
||||
"top": 147,
|
||||
"height": 15,
|
||||
"width": 123,
|
||||
"title": "合计金额",
|
||||
"field": "itemTotalAmount",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "应收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "totalAmount"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 97.5,
|
||||
"title": "实收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "displayAmount"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 193.5,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "全自费金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "FULAMT_OWNPAY_AMT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 193.5,
|
||||
"height": 13.5,
|
||||
"width": 97.5,
|
||||
"title": "医保政策金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "INSCP_SCP_AMT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 216,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "基金支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "YB_FUND_PAY"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 216,
|
||||
"height": 13.5,
|
||||
"width": 97.5,
|
||||
"title": "统筹支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "YB_TC_FUND_AMOUNT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 240,
|
||||
"height": 14,
|
||||
"width": 216,
|
||||
"title": "个人医保账户支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "SELF_YB_ZH_PAY"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 268.5,
|
||||
"height": 14,
|
||||
"width": 106.5,
|
||||
"title": "收费员",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "userName"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 294,
|
||||
"height": 14,
|
||||
"width": 214.5,
|
||||
"title": "收费时间",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "currentDate"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名/病历号"
|
||||
placeholder="请输入患者名/住院号/床号"
|
||||
clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
@keyup.enter="getPatientList"
|
||||
@@ -22,9 +22,9 @@
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
v-model="queryParams.encounterStatus"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态"
|
||||
placeholder="结算状态"
|
||||
@change="getPatientList"
|
||||
>
|
||||
<el-option
|
||||
@@ -44,6 +44,7 @@
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
@change="getPatientList"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
|
||||
搜索
|
||||
@@ -57,14 +58,17 @@
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="住院号" align="center" prop="encounterBusNo" />
|
||||
<!-- <el-table-column label="床号" align="center" prop="bedNo" /> -->
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="账户余额" align="center" prop="balanceAmount" />
|
||||
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.receptionTime) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" />
|
||||
<el-table-column label="结算状态" align="center" prop="encounterStatus_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -73,21 +77,39 @@
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">基本信息</span>
|
||||
</template>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions :column="5">
|
||||
<el-descriptions-item label="姓名:">{{ patientInfo.patientName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别:">
|
||||
{{ patientInfo.genderEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同类型:">
|
||||
{{ patientInfo.categoryEnum_enumText }}
|
||||
<!-- <el-descriptions-item label="科室:">
|
||||
{{ patientInfo.organizationName }}
|
||||
</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="床号:">
|
||||
{{ patientInfo.bedNo }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="身份证号:">{{ patientInfo.idCard }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="手机号">{{ patientInfo.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">{{ patientInfo.name }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="就诊时间:">
|
||||
{{ formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss') }}
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="min-width: 1100px">
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="costSearchTime"
|
||||
type="daterange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 40%; margin-bottom: 10px; margin-right: 10px"
|
||||
@change="getPatientList"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="costSearch"> 搜索 </el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card style="min-width: 1100px; margin-top: 20px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">收费项目</span>
|
||||
</template>
|
||||
@@ -126,6 +148,22 @@
|
||||
>
|
||||
自费转医保
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentPayTosStudentSelf()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生医保转学生自费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentSelfToStudentPay()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生自费转学生医保
|
||||
</el-button>
|
||||
<span style="float: right"
|
||||
>合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span
|
||||
>
|
||||
@@ -133,25 +171,35 @@
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="530"
|
||||
:data="chargeList"
|
||||
:data="chargeFilterList"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
|
||||
<el-table-column label=" 开立科室" align="center" prop="requestingOrgId" width="180" />
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" width="180" />
|
||||
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
|
||||
<el-table-column label="数量" align="center" prop="quantityValue" width="80" />
|
||||
<el-table-column label="医疗类型" align="center" prop="medTypeCode_dictText" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<el-table-column label="结算状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="scope.row.statusEnum === 1 ? 'default' : 'success'"
|
||||
disable-transitions
|
||||
>
|
||||
<!-- 1代收费 2代结算 5已收费 8已退费 -->
|
||||
<el-tag v-if="scope.row.statusEnum === 1" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 5" type="success" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 8" type="danger" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -162,10 +210,66 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<el-table-column label="收费时间" align="center" prop="billDate" width="180" />
|
||||
<el-table-column
|
||||
label="应收金额"
|
||||
align="right"
|
||||
prop="receivableAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.receivableAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实收金额"
|
||||
align="right"
|
||||
prop="receivedAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.receivedAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="优惠金额"
|
||||
align="right"
|
||||
prop="discountAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.discountAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣率" align="right" prop="discountRate" header-align="center">
|
||||
<template #default="scope">
|
||||
<!-- discountRate是一个字符串类型的 -->
|
||||
{{ Number(scope.row.discountRate).toFixed(2) + '%' || '0.00' + '%' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
:disabled="!scope.row.paymentId"
|
||||
link
|
||||
type="primary"
|
||||
@click="printCharge(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
@@ -176,66 +280,122 @@
|
||||
:chrgBchnoList="chrgBchnoList"
|
||||
:userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId"
|
||||
:details="details"
|
||||
:chargedItems="chargedItems"
|
||||
@refresh="getPatientList"
|
||||
:newId="newId"
|
||||
:oldId="oldId"
|
||||
:details="details"
|
||||
:paymentEnum="paymentEnum"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicCharge">
|
||||
import {
|
||||
getList,
|
||||
getList1,
|
||||
getChargeList,
|
||||
changeToSelfPay,
|
||||
changeToMedicalInsurance,
|
||||
init,
|
||||
init1,
|
||||
precharge,
|
||||
getChargeInfo,
|
||||
changeStudentPayTosStudentSelf,
|
||||
changeStudentSelfToStudentPay,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin5001 } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import Decimal from 'decimal.js';
|
||||
import moment from 'moment';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
statusEnum: 1,
|
||||
encounterStatus: 4,
|
||||
});
|
||||
const totalAmounts = ref(0);
|
||||
const selectedRows = ref([]);
|
||||
const patientList = ref([]);
|
||||
// 收费项目列表
|
||||
const chargeList = ref([]);
|
||||
// 根据时间过滤的收费项目列表
|
||||
const chargeFilterList = ref([]);
|
||||
const chargeItemIdList = ref([]);
|
||||
const chrgBchnoList = ref([]);
|
||||
const chargeLoading = ref(false);
|
||||
const encounterId = ref('');
|
||||
const paymentId = ref('');
|
||||
const newId = ref('');
|
||||
const oldId = ref('');
|
||||
const patientInfo = ref({});
|
||||
const openDialog = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const chargeListRef = ref();
|
||||
const details = ref({});
|
||||
const chargeStatusOptions = ref([]);
|
||||
const consumablesIdList = ref([]);
|
||||
const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const newId = ref('');
|
||||
const oldId = ref('');
|
||||
const paymentEnum = ref(1);
|
||||
// 计算当前时间+6天
|
||||
const accumulateDay = () => {
|
||||
// 获取当前时间
|
||||
let now = moment();
|
||||
// 在当前时间上加一天
|
||||
let tomorrow = now.add(6, 'days');
|
||||
// 格式化为年-月-日的格式
|
||||
let formattedDate = tomorrow.format('YYYY-MM-DD');
|
||||
return formattedDate;
|
||||
};
|
||||
// 收费项目时间段搜索
|
||||
const costSearchTime = ref([formatDateStr(new Date(), 'YYYY-MM-DD'), accumulateDay()]);
|
||||
// 测试数据
|
||||
const items = [
|
||||
{ id: 1, name: 'Item 1', date: '2025-12-15' },
|
||||
{ id: 2, name: 'Item 2', date: '2025-12-18' },
|
||||
{ id: 3, name: 'Item 3', date: '2025-12-20' },
|
||||
];
|
||||
// 根据时间短搜索
|
||||
const costSearch = () => {
|
||||
console.log(costSearchTime.value === null);
|
||||
|
||||
if (costSearchTime.value === null) {
|
||||
chargeFilterList.value = chargeList.value;
|
||||
} else {
|
||||
const startTime = moment(costSearchTime.value[0], 'YYYY-MM-DD');
|
||||
const endTime = moment(costSearchTime.value[1], 'YYYY-MM-DD');
|
||||
const filterData = chargeList.value.filter((item) => {
|
||||
const itemDate = moment(item.billDate || '', 'YYYY-MM-DD'); // 将数据项的日期也格式化为moment对象
|
||||
return itemDate.isBetween(startTime, endTime, null, '[]'); // 使用isBetween方法进行范围判断,'[]'表示包含边界值
|
||||
});
|
||||
chargeFilterList.value = filterData;
|
||||
}
|
||||
};
|
||||
const buttonDisabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
const chargedItems = ref([]);
|
||||
|
||||
watch(
|
||||
() => selectedRows.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => chargeList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
chargeFilterList.value = newVlaue;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -245,7 +405,7 @@ function handleSelectionChange(selection) {
|
||||
}
|
||||
function handleTotalAmount() {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, 0);
|
||||
}
|
||||
getPatientList();
|
||||
@@ -261,20 +421,23 @@ function getPatientList() {
|
||||
queryParams.value.startTimeSTime = undefined;
|
||||
queryParams.value.startTimeETime = undefined;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.data.records;
|
||||
getList1(queryParams.value).then((res) => {
|
||||
console.log('患者列表', res);
|
||||
patientList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function initOption() {
|
||||
init().then((res) => {
|
||||
chargeStatusOptions.value = res.data.chargeItemStatusOptions;
|
||||
init1().then((res) => {
|
||||
console.log('初始化收费项目状态', res);
|
||||
chargeStatusOptions.value = res.data.encounterStatusOptions;
|
||||
console.log('res.data.chargeItemStatusOptions======>', JSON.stringify(res.data));
|
||||
});
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
// 已结算时禁用选择框
|
||||
return row.statusEnum === 1;
|
||||
return row.statusEnum == 1 || row.statusEnum == 2;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,8 +447,7 @@ function clickRow(row) {
|
||||
patientInfo.value = row;
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
const date = row.startTime.split('T')[0].split('-').join('');
|
||||
getChargeList({encounterId: row.encounterId, startTime:date, endTime: formatDateStr(new Date(), 'YYYYMMDD'),}).then((res) => {
|
||||
getChargeList(row.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
@@ -299,7 +461,7 @@ function handleClose(value, msg) {
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess(msg);
|
||||
chargeLoading.value = true;
|
||||
getChargeList({encounterId: patientInfo.value.encounterId, startTime:date, endTime: formatDateStr(new Date(), 'YYYYMMDD'),}).then((res) => {
|
||||
getChargeList(patientInfo.value.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
@@ -308,7 +470,7 @@ function handleClose(value, msg) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
@@ -319,6 +481,7 @@ function confirmCharge() {
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
//wor_device_request 器材
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
@@ -326,6 +489,7 @@ function confirmCharge() {
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
@@ -336,21 +500,18 @@ function confirmCharge() {
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
if(res.data.newPayment) {
|
||||
paymentEnum.value = res.data.newPayment.paymentEnum;
|
||||
paymentId.value = res.data.id.toString();
|
||||
newId.value = res.data.newId.toString();
|
||||
oldId.value = res.data.oldId.toString();
|
||||
encounterId.value = patientInfo.value.encounterId,
|
||||
chrgBchnoList.value = res.data.paymentRecDetailDtoList;
|
||||
totalAmount.value = res.data.newPayment.tenderedAmount;
|
||||
details.value = res.data.paymentRecDetailDtoList;
|
||||
openDialog.value = true;
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
const item = res.data.paymentRecDetailDtoList.find((i) => {
|
||||
return i.payEnum == 220000;
|
||||
});
|
||||
totalAmount.value = item?.amount;
|
||||
paymentId.value = res.data.id;
|
||||
newId.value = res.data.newId;
|
||||
oldId.value = res.data.oldId;
|
||||
chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
details.value = res.data.paymentRecDetailDtoList?.filter((item) => {
|
||||
return item.amount > 0;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
@@ -363,161 +524,172 @@ const readCardLoading = ref(false);
|
||||
const loadingText = ref('');
|
||||
const BusiCardInfo = ref(''); // miyao
|
||||
async function handleReadCard(value) {
|
||||
if (chrome.webview === undefined) {
|
||||
alert('请在医保版本中调用读卡功能!');
|
||||
} else {
|
||||
try {
|
||||
let webView = window.chrome.webview.hostObjects.CSharpAccessor;
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
// 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 webView
|
||||
.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;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(jsonResult);
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await webView
|
||||
.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', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
paymentId.value = res.data.paymentId;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details;
|
||||
// chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
consumablesIdList.value = selectRows.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
}).map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
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: '财务科',
|
||||
})
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
};
|
||||
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;
|
||||
});
|
||||
// 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', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
paymentId.value = res.data.id;
|
||||
totalAmount.value = res.data.paymentRecDetailDtoList.find(
|
||||
(item) => item.payEnum == 220000
|
||||
).amount;
|
||||
details.value = res.data.paymentRecDetailDtoList;
|
||||
// chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
// 打印项目赋值
|
||||
chargedItems.value = selectRows;
|
||||
newId.value = res.data.newId;
|
||||
oldId.value = res.data.oldId;
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,6 +713,80 @@ function patToMedicalInsurance() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生医保转学生自费
|
||||
*/
|
||||
function studentPayTosStudentSelf() {
|
||||
changeStudentPayTosStudentSelf(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*/
|
||||
function studentSelfToStudentPay() {
|
||||
changeStudentSelfToStudentPay(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加行合并方法
|
||||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 只对操作列进行合并(根据列索引判断,操作列为最后一列)
|
||||
if (columnIndex === 10) {
|
||||
// 操作列索引为10(从0开始计数)
|
||||
// 如果当前行的paymentId为空,则不合并
|
||||
if (!row.paymentId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找相同paymentId的连续行
|
||||
let spanCount = 1;
|
||||
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
||||
// 这是具有相同paymentId的第一行,计算需要合并的行数
|
||||
for (let i = rowIndex + 1; i < chargeList.value.length; i++) {
|
||||
if (chargeList.value[i].paymentId === row.paymentId) {
|
||||
spanCount++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
} else {
|
||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
// 其他列不合并
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
function printCharge(row) {
|
||||
// 打印功能实现
|
||||
let rows = [];
|
||||
chargeList.value.forEach((item, index) => {
|
||||
if (item.paymentId === row.paymentId) {
|
||||
rows.push(item);
|
||||
}
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
:deep(.no-hover-column) .cell:hover {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -23,8 +23,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入院日期" prop="admissionDate">
|
||||
<el-date-picker v-model="formData.admissionDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||
style="width: 100%" placeholder="请选择日期" />
|
||||
<el-date-picker
|
||||
v-model="formData.admissionDate"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
placeholder="请选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -46,7 +52,12 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="重复住院">
|
||||
<el-switch inline-prompt v-model="formData.isRepeatHospitalization" active-text="是" inactive-text="否" />
|
||||
<el-switch
|
||||
inline-prompt
|
||||
v-model="formData.isRepeatHospitalization"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -75,7 +86,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="急诊标志">
|
||||
<el-switch inline-prompt v-model="formData.isEmergency" active-text="是" inactive-text="否" />
|
||||
<el-switch
|
||||
inline-prompt
|
||||
v-model="formData.isEmergency"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -97,9 +113,11 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup >
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'YbregisterEdit',
|
||||
});
|
||||
// interface FormData {
|
||||
// medicalType: string;
|
||||
// diseaseName: string;
|
||||
@@ -141,7 +159,6 @@ import { ref } from 'vue';
|
||||
|
||||
const handleSubmit = () => {
|
||||
// 处理表单提交
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -24,14 +24,25 @@
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column type="index" width="80" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="申请患者" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column label="年龄" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="genderEnum_enumText" width="80" label="性别" align="center" />
|
||||
<el-table-column prop="age" width="80" label="年龄" align="center" />
|
||||
<el-table-column prop="busNo" align="center" label="患者住院号">
|
||||
<template #default="scope">
|
||||
{{ scope.row.busNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contractNo" align="center" label="费用性质">
|
||||
<template #default="scope">
|
||||
{{ scope.row.contractNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="admitSourceCode" align="center" label="入院类型">
|
||||
<template #default="scope">
|
||||
{{ scope.row.admitSourceCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源">
|
||||
<template #default="scope">
|
||||
{{ scope.row.sourceName || '-' }}
|
||||
@@ -63,13 +74,17 @@
|
||||
:registrationType="registrationType"
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:noFile="noFile"
|
||||
:is-registered="true"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
/>
|
||||
</template>
|
||||
<script setup >
|
||||
<script setup>
|
||||
import PatientRegister from './patientRegister.vue';
|
||||
import { getAdmissionPage, getPatientBasicInfo, getInHospitalInfo } from './api';
|
||||
import { getContractList } from './api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { admit_source_code } = proxy.useDict('admit_source_code');
|
||||
//const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
// const props = defineProps({});
|
||||
@@ -93,6 +108,7 @@ const patientRegisterVisible = ref(false);
|
||||
const noFile = ref(false);
|
||||
const registrationType = ref(true);
|
||||
const patient = ref({});
|
||||
const priceTypeList = ref({});
|
||||
const doEdit = (row) => {
|
||||
getPatientBasicInfo(row.patientId).then((res) => {
|
||||
patient.value = res.data;
|
||||
@@ -104,6 +120,7 @@ const doEdit = (row) => {
|
||||
});
|
||||
};
|
||||
onBeforeMount(() => {});
|
||||
getContract();
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
@@ -137,9 +154,47 @@ function resetQuery() {
|
||||
getList();
|
||||
}
|
||||
|
||||
// 入院登记
|
||||
const mapHospitalization = (admitSourceCode = '') => {
|
||||
console.log('admit_source_code=======>', admitSourceCode);
|
||||
const findObj = admit_source_code.value.find((item) => {
|
||||
return item.value == admitSourceCode;
|
||||
});
|
||||
return findObj?.label;
|
||||
};
|
||||
/** 查询费用性质 */
|
||||
function getContract() {
|
||||
getContractList().then((response) => {
|
||||
priceTypeList.value = response.data;
|
||||
});
|
||||
}
|
||||
// 映射费用性质
|
||||
const priceTypeDic = (contractNo) => {
|
||||
const findObj = priceTypeList.value.find((item) => {
|
||||
return item.busNo == contractNo;
|
||||
});
|
||||
return findObj?.contractName;
|
||||
};
|
||||
|
||||
const getList = () => {
|
||||
getAdmissionPage(queryParams.value).then((res) => {
|
||||
treatHospitalizedData.value = res.data.records;
|
||||
console.log('priceTypeList=======>', JSON.stringify(priceTypeList.value));
|
||||
let dataList = [];
|
||||
for (let index = 0; index < (res.data.records || []).length; index++) {
|
||||
const obj = (res.data.records || [])[index];
|
||||
const newObj = {
|
||||
...obj,
|
||||
};
|
||||
newObj.admitSourceCode = mapHospitalization(obj.admitSourceCode);
|
||||
dataList.push(newObj);
|
||||
}
|
||||
for (let index = 0; index < dataList.length; index++) {
|
||||
const obj = dataList[index];
|
||||
obj.contractNo = priceTypeDic(obj.contractNo);
|
||||
}
|
||||
|
||||
treatHospitalizedData.value = dataList;
|
||||
// treatHospitalizedData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取住院信息初期数据列表
|
||||
export function getInit(query) {
|
||||
return request({
|
||||
url: '/inpatient-manage/init',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取住院信息 分页显示
|
||||
@@ -22,8 +22,8 @@ export function getAdmissionPage(query) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/register-info',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院无档登记
|
||||
@@ -31,8 +31,8 @@ export function addAdmissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
@@ -40,8 +40,8 @@ export function admissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,17 +51,18 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病区下拉列表
|
||||
*/
|
||||
export function wardList() {
|
||||
export function wardList({ orgId } = {}) {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get'
|
||||
})
|
||||
url: '/inhospital-charge/register/ward-list',
|
||||
method: 'get',
|
||||
params: { orgId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,56 +72,55 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function doctorList(id) {
|
||||
return request({
|
||||
url: '/inpatient-manage/doctor-list?orgId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function getPatientInfo(id, statusEnum) {
|
||||
return request({
|
||||
url: `/inpatient-manage/admission-one?id=${id}&statusEnum=${statusEnum}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取患者基础信息
|
||||
export function getPatientBasicInfo(patientId) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/patient-info?patientId=${patientId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者入院信息
|
||||
export function getInHospitalInfo(encounterId) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/in-hospital-info?encounterId=${encounterId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取病区床位信息
|
||||
export function getBedInfo(wardBusNo) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/beds-num?wardBusNo=${wardBusNo}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
@@ -128,8 +128,8 @@ export function registerInHospital(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-cashier',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 无档登记
|
||||
@@ -137,16 +137,16 @@ export function noFilesRegister(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/no-files',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 表单初始化
|
||||
export function patientFormInit() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 合同
|
||||
@@ -154,7 +154,7 @@ export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +164,31 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者医保信息
|
||||
export function gerPreInfo(userMaessage) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-per-info',
|
||||
method: 'post',
|
||||
data: userMaessage,
|
||||
});
|
||||
}
|
||||
|
||||
// export function gerPreInfo(userMaessage) {
|
||||
// return request({
|
||||
// url: '/yb-request/per-info',
|
||||
// method: 'post',
|
||||
// params: userMaessage,
|
||||
// });
|
||||
// }
|
||||
|
||||
//获取省市医保字符串
|
||||
export function getProvincesAndCities(encounterId) {
|
||||
return request({
|
||||
url: `/payment/bill/get-encounter-type?encounterId=${encounterId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
title="登记"
|
||||
:registrationType="registrationType"
|
||||
:is-registered="false"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
:noFile="noFile"
|
||||
@@ -127,10 +128,12 @@ const patientYbRegisterVisible = ref(false);
|
||||
const patientRegisterOK = () => {
|
||||
patientRegisterVisible.value = false;
|
||||
queryParams.value.searchKey = '';
|
||||
getList();
|
||||
emits('okList');
|
||||
};
|
||||
|
||||
const cancelAct = () => {
|
||||
getList();
|
||||
patientRegisterVisible.value = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{{ isEditing ? '取消' : '编辑' }}
|
||||
</div> -->
|
||||
<div>
|
||||
<el-radio-group v-model="typeCode">
|
||||
<el-radio-group v-model="typeCode" :disabled="props.isRegistered">
|
||||
<el-radio label="电子凭证" value="01"></el-radio>
|
||||
<el-radio label="医保卡" value="03"></el-radio>
|
||||
<el-radio label="身份证" value="02"></el-radio>
|
||||
@@ -19,6 +19,7 @@
|
||||
<span
|
||||
@click="handleReadCard(typeCode)"
|
||||
style="cursor: pointer; margin: 0 12px 0 30px; color: #409eff"
|
||||
v-if="!props.isRegistered"
|
||||
>
|
||||
{{ '读卡' }}
|
||||
</span>
|
||||
@@ -38,16 +39,22 @@
|
||||
<el-text truncated>患者姓名:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.name || '-' }}</el-text>
|
||||
<el-text truncated>{{ patientInfo?.patientName || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<!-- <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-text truncated>{{ patientInfo?.ybClassEnum_enumText || '-' }}</el-text> -->
|
||||
<!-- TODO -->
|
||||
<!-- <svg-icon
|
||||
size="20"
|
||||
icon-class="hipEdit"
|
||||
style="cursor: pointer"
|
||||
@click="changFeeType"
|
||||
v-if="!props.isRegistered"
|
||||
/>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
@@ -73,7 +80,7 @@
|
||||
<el-text truncated>年龄:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.ageString || '-' }}</el-text>
|
||||
<el-text truncated>{{ patientInfo?.age || '-' }}</el-text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
@@ -87,7 +94,7 @@
|
||||
<el-text truncated>民族:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.nationalityCode || '-' }}</div>
|
||||
<div>{{ getDictLabel(nationality_code, patientInfo?.nationalityCode) || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>国籍:</el-text>
|
||||
@@ -139,7 +146,7 @@
|
||||
<el-text truncated>病人来源:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.organizationId_dictText || '-' }}</div>
|
||||
<div>{{ props.inHospitalInfo?.inHospitalOrgName || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>单位名称:</el-text>
|
||||
@@ -150,24 +157,37 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<PatientInfoForm ref="patientInfoFormRef" />
|
||||
<PatientInfoForm ref="patientInfoFormRef" :is-view-mode="props.isRegistered" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { ref, reactive, watch, onMounted } from 'vue';
|
||||
import PatientInfoForm from './patientInfoForm.vue';
|
||||
import { patientlLists, getOrgList } from './api';
|
||||
import { patientlLists, getOrgList, gerPreInfo } from './api';
|
||||
import { invokeYbPlugin5001 } from '@/api/public';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const typeList = ref({});
|
||||
const patientInfoFormRef = ref();
|
||||
let userCardInfo = ref({});
|
||||
const BusiCardInfo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
inHospitalInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
registrationType: {
|
||||
type: [String, Boolean, Number], // 根据实际类型调整
|
||||
default: null, // 或者 false、'' 等
|
||||
@@ -181,11 +201,25 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//待入院,已入院区分
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
inHospitalInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['onChangFeeType']);
|
||||
const emits = defineEmits(['onChangFeeType', 'carReading']);
|
||||
const registerRef = ref();
|
||||
const typeCode = ref('01');
|
||||
const organization = ref([]);
|
||||
const { nationality_code } = proxy.useDict('nationality_code');
|
||||
|
||||
const readCardLoading = ref(false);
|
||||
const loadingText = ref('正在读取...');
|
||||
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
@@ -242,136 +276,185 @@ const submitForm = async (callback) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
const getDictLabel = (dictList, value) => {
|
||||
if (!dictList || !value) return '';
|
||||
const item = dictList.find((item) => item.value === value);
|
||||
return item ? item.label : value;
|
||||
};
|
||||
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
|
||||
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)
|
||||
// readCardLoading.value = true;
|
||||
// let jsonResult = null;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
|
||||
// 调试日志,检查patientInfo中的值
|
||||
console.log('patientInfo:', props.patientInfo);
|
||||
console.log('patientInfo中的id:', props.patientInfo?.id);
|
||||
console.log('patientInfo中的encounterId:', props.patientInfo?.encounterId);
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
// await boundAsync
|
||||
// .getInfoByQrCodeAsync(
|
||||
|
||||
// )
|
||||
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: '财务科',
|
||||
})
|
||||
.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;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
console.log(res);
|
||||
jsonResult = res.data;
|
||||
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
console.log('patientInfo中的encounterId:', props.patientInfo);
|
||||
const encounterId = props.inHospitalInfo.encounterId || '1993854019030441985';
|
||||
console.log('1111111111111111111准备使用的encounterId:', encounterId);
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
|
||||
emits('carReading', jsonResult);
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
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);
|
||||
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
// 从patientInfo中获取encounterId,如果没有则尝试从住院号中获取
|
||||
// const encounterId =
|
||||
// props.patientInfo?.encounterId || props.patientInfo?.visitNo || props.patientInfo?.busNo;
|
||||
// console.log('准备使用的encounterId:', encounterId);
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
|
||||
emits('carReading', res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
function getPatientForm() {
|
||||
console.log(patientInfoFormRef.value.form);
|
||||
readCardLoading.value = true;
|
||||
// 调试日志,检查发送给gerPreInfo的参数
|
||||
console.log('发送给gerPreInfo的参数:', userMessage);
|
||||
|
||||
return patientInfoFormRef.value.form;
|
||||
if (userMessage && userMessage.certNo) {
|
||||
gerPreInfo(userMessage)
|
||||
.then((res) => {
|
||||
console.log('gerPreInfo返回结果:', res);
|
||||
if (res && res.code == 200 && res.data) {
|
||||
form.patientId = res.data.id;
|
||||
form.name = res.data.name;
|
||||
form.age = res.data.age;
|
||||
form.idCard = res.data.idCard;
|
||||
form.card = res.data.id;
|
||||
form.contractNo = res.data.contractBusNo;
|
||||
form.genderEnum = res.data.genderEnum;
|
||||
form.ybAreaNo = res.data.contractName;
|
||||
form.encounterId = res.data.encounterId;
|
||||
// 成功获取数据后跳转到 registerEdit 页面,并传递数据
|
||||
// router.push({
|
||||
// name: '/ybmanagement/inhospital/register/edit', // 需要根据实际路由名称调整
|
||||
// params: {
|
||||
// cardData: JSON.stringify(res.data), // 将完整数据作为参数传递
|
||||
// cardType: value, // 卡类型
|
||||
// },
|
||||
// });
|
||||
} else {
|
||||
// 处理无有效数据的情况
|
||||
ElMessage.error('未获取到有效的患者信息');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('gerPreInfo调用失败:', error);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
// 患者费别变更
|
||||
const changFeeType = () => {
|
||||
emits('onChangFeeType');
|
||||
};
|
||||
|
||||
// 无档登记收集信息
|
||||
const getPatientForm = () => {
|
||||
return patientInfoFormRef?.value?.form;
|
||||
};
|
||||
defineExpose({ submitForm, form, isEditing, getPatientForm });
|
||||
</script>
|
||||
|
||||
@@ -404,4 +487,4 @@ defineExpose({ submitForm, form, isEditing, getPatientForm });
|
||||
font-weight: 700 !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -210,9 +210,9 @@
|
||||
v-model="form.deceasedDate"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -266,6 +266,7 @@ const data = reactive({
|
||||
isViewMode: false,
|
||||
form: {
|
||||
typeCode: '01',
|
||||
genderEnum: 0,
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
<el-scrollbar height="650px">
|
||||
<PatientInfoComp
|
||||
:patientInfo="props.patientInfo"
|
||||
:inHospitalInfo="props.inHospitalInfo"
|
||||
:registrationType="props.registrationType"
|
||||
:initOptions="initOptions"
|
||||
:noFile="noFile"
|
||||
ref="patientInfoRef"
|
||||
:is-registered="props.isRegistered"
|
||||
@onChangFeeType="onChangFeeType"
|
||||
@carReading="onCarRead"
|
||||
/>
|
||||
<!-- <PatientRelationList
|
||||
class="relationList"
|
||||
@@ -32,10 +35,24 @@
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
:noFile="noFile"
|
||||
:is-registered="props.isRegistered"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<template v-slot:footer>
|
||||
<div class="advance-container">
|
||||
<div v-if="currentFeeType !== 'hipCash'" class="payment-item">
|
||||
<span>{{ payType() }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px; margin-left: 10px"
|
||||
:placeholder="payType() + '支付码'"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()" style="margin-left: 10px"
|
||||
>扫码支付</el-button
|
||||
>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<el-space>
|
||||
<div>缴费预交金</div>
|
||||
<el-input
|
||||
@@ -45,13 +62,20 @@
|
||||
@input="handleAdvanceInput"
|
||||
:formatter="handleAdvanceFormatter"
|
||||
:parser="handleAdvanceParser"
|
||||
:disabled="alreadyEdit"
|
||||
></el-input>
|
||||
<div
|
||||
class="feeType"
|
||||
:class="currentFeeType == typeitem.type ? 'activeFeeType' : ''"
|
||||
v-for="typeitem in feeTypeOptions"
|
||||
:key="typeitem.type"
|
||||
@click="currentFeeType = typeitem.type"
|
||||
@click="
|
||||
() => {
|
||||
!alreadyEdit && (currentFeeType = typeitem.type);
|
||||
payEnum = typeitem.payEnum;
|
||||
}
|
||||
"
|
||||
:style="{ cursor: alreadyEdit ? 'not-allowed' : 'pointer' }"
|
||||
>
|
||||
<svg-icon
|
||||
:icon-class="typeitem.type"
|
||||
@@ -65,13 +89,9 @@
|
||||
</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
|
||||
/> -->
|
||||
<el-button v-if="!props.isRegistered" size="fixed" type="primary" @click="handleSubmit">
|
||||
登记
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -80,7 +100,13 @@ const { proxy } = getCurrentInstance();
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import PatientInfoComp from './patientInfo.vue';
|
||||
import RegisterForm from './registerForm.vue';
|
||||
import { noFilesRegister, registerInHospital, getInit } from './api';
|
||||
import { noFilesRegister, registerInHospital, getProvincesAndCities } from './api';
|
||||
import { getInit } from '@/views/doctorstation/components/api';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { wxPay, WxPayResult } from '../../../../charge/cliniccharge/components/api';
|
||||
import printUtils from '@/utils/printUtils';
|
||||
const txtCode = ref('');
|
||||
const router = useRouter();
|
||||
const emits = defineEmits(['okAct', 'cancelAct']);
|
||||
|
||||
const props = defineProps({
|
||||
@@ -103,6 +129,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false, // false 表示待登记,true 表示已登记
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
@@ -122,6 +152,7 @@ import { ElMessage } from 'element-plus';
|
||||
const width = '1128px';
|
||||
const patientApiInfo = ref({});
|
||||
const initOptions = ref({});
|
||||
const payEnum = ref(220400);
|
||||
|
||||
/* 取消 */
|
||||
const cancelAct = () => {
|
||||
@@ -131,13 +162,78 @@ const patientInfoRef = ref();
|
||||
|
||||
/* 预交金 */
|
||||
const advancePaymentVisible = ref(false);
|
||||
/* 保存 */
|
||||
const jumpToYbRegisterEdit = () => {
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
query: {
|
||||
encounterId: '1993854019030441985',
|
||||
},
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('跳转医保登记页面失败:', error);
|
||||
});
|
||||
};
|
||||
/* 登记 */
|
||||
const handleSubmit = () => {
|
||||
let params = {};
|
||||
let params = {
|
||||
inHospitalInfo: {},
|
||||
payEnum: 0,
|
||||
};
|
||||
params.inHospitalInfo.payEnum = payEnum.value;
|
||||
params.payEnum = payEnum.value;
|
||||
console.log('params==========>', JSON.stringify(patientInfoRef?.value.getPatientForm()));
|
||||
if (props.noFile) {
|
||||
const paramsDic = patientInfoRef?.value.getPatientForm();
|
||||
const paramsDic1 = RegisterFormRef.value.submitForm;
|
||||
if (!paramsDic?.name) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请输入患者姓名',
|
||||
});
|
||||
return;
|
||||
} else if (!paramsDic?.phone) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请输入联系方式',
|
||||
});
|
||||
return;
|
||||
} else if (!paramsDic?.age) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请输入年龄',
|
||||
});
|
||||
return;
|
||||
} else if (!paramsDic1?.inHospitalOrgId) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择入院科室',
|
||||
});
|
||||
return;
|
||||
} else if (!paramsDic1?.wardLocationId) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择入院病区',
|
||||
});
|
||||
return;
|
||||
} else if (!paramsDic1?.diagnosisDefinitionId) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请选择入院诊断',
|
||||
});
|
||||
return;
|
||||
}
|
||||
// else if (!paramsDic1?.diagnosisDesc) {
|
||||
// ElMessage({
|
||||
// type: 'error',
|
||||
// message: '请输入诊断描述',
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
RegisterFormRef.value.validateData(async () => {
|
||||
params.inHospitalInfo = RegisterFormRef.value.submitForm;
|
||||
params.patientInformation = patientInfoRef.value.getPatientForm();
|
||||
params.inHospitalInfo.payEnum = payEnum.value;
|
||||
params.patientInformation = patientInfoRef?.value.getPatientForm();
|
||||
if (params.patientInformation.idCard) {
|
||||
// 验证身份证号长度是否为18位
|
||||
const idCard = params.patientInformation.idCard.toString();
|
||||
@@ -155,9 +251,53 @@ const handleSubmit = () => {
|
||||
const performRegistration = () => {
|
||||
noFilesRegister(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
ElMessage.success(res.msg);
|
||||
// 打印预交金收据
|
||||
printDepositReceipt(props.patientInfo, params.inHospitalInfo);
|
||||
cancelAct();
|
||||
// 询问是否需要医保登记
|
||||
// ElMessageBox.confirm('是否需要进行医保登记?', '医保登记确认', {
|
||||
// confirmButtonText: '确认',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'info',
|
||||
// })
|
||||
// .then(() => {
|
||||
// // 准备传递的数据
|
||||
// const cardData = {
|
||||
// patientInfo: params.patientInformation,
|
||||
// inHospitalInfo: params.inHospitalInfo,
|
||||
// encounterId: params.inHospitalInfo.encounterId,
|
||||
// };
|
||||
|
||||
// // 跳转到医保登记页面
|
||||
// try {
|
||||
// router
|
||||
// .push({
|
||||
// path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
// query: {
|
||||
// encounterId: props.patientInfo.encounterId,
|
||||
// cardData: encodeURIComponent(JSON.stringify(cardData)),
|
||||
// cardType: 'inHospital',
|
||||
// operationType: 'HospitalizationRegistration',
|
||||
// },
|
||||
// })
|
||||
// .then(() => {
|
||||
// console.log('路由跳转成功');
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.error('路由跳转失败:', error);
|
||||
// ElMessage.error('跳转到医保登记页面失败');
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error('跳转异常:', error);
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// // 用户取消医保登记,关闭当前弹窗
|
||||
// emits('okAct');
|
||||
// });
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
@@ -182,13 +322,64 @@ const handleSubmit = () => {
|
||||
params.patientId = props.patientInfo.patientId;
|
||||
RegisterFormRef.value.validateData(async () => {
|
||||
params = { ...params, ...RegisterFormRef.value.submitForm };
|
||||
console.log('params', params);
|
||||
const performRegistration = () => {
|
||||
console.log('params', params);
|
||||
registerInHospital(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
|
||||
// 打印预交金收据
|
||||
printDepositReceipt(
|
||||
props.patientInfo,
|
||||
params,
|
||||
RegisterFormRef.value.medicalInsuranceTitle
|
||||
);
|
||||
// 自费不需要弹医保
|
||||
if (params.contractNo != '0000') {
|
||||
// 询问是否需要医保登记
|
||||
ElMessageBox.confirm('是否需要进行医保登记?', '医保登记确认', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
})
|
||||
.then(() => {
|
||||
// 准备传递的数据
|
||||
const cardData = {
|
||||
patientInfo: props.patientInfo,
|
||||
inHospitalInfo: params,
|
||||
};
|
||||
|
||||
// 跳转到医保登记页面
|
||||
try {
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
query: {
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
cardData: encodeURIComponent(JSON.stringify(cardData)),
|
||||
cardType: 'inHospital',
|
||||
operationType: 'HospitalizationRegistration',
|
||||
certType: props.patientInfo.certType,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
console.log('路由跳转成功');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('路由跳转失败:', error);
|
||||
ElMessage.error('跳转到医保登记页面失败');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('跳转异常:', error);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消医保登记,关闭当前弹窗
|
||||
emits('okAct');
|
||||
});
|
||||
}
|
||||
cancelAct();
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
@@ -229,6 +420,8 @@ const closedAct = () => {
|
||||
|
||||
onMounted(() => {
|
||||
getInit().then((res) => {
|
||||
console.log('getInit=========>', JSON.stringify(res.data));
|
||||
|
||||
initOptions.value = res.data;
|
||||
});
|
||||
});
|
||||
@@ -239,18 +432,22 @@ const RegisterFormRef = ref();
|
||||
const feeTypeOptions = reactive([
|
||||
{
|
||||
type: 'hipCash',
|
||||
payEnum: 220400,
|
||||
label: '现金',
|
||||
},
|
||||
{
|
||||
type: 'hipAlipay',
|
||||
payEnum: 220200,
|
||||
label: '支付宝',
|
||||
},
|
||||
{
|
||||
type: 'wechat',
|
||||
payEnum: 220100,
|
||||
label: '微信',
|
||||
},
|
||||
{
|
||||
type: 'hipPayCard',
|
||||
payEnum: 220300,
|
||||
label: '银行卡',
|
||||
},
|
||||
]);
|
||||
@@ -279,7 +476,168 @@ const onChangFeeType = () => {
|
||||
medicalInsuranceVisible.value = true;
|
||||
};
|
||||
|
||||
/* */
|
||||
/* 打印预交金收据 */
|
||||
const printDepositReceipt = async (patientInfo, inHospitalInfo, medicalInsuranceTitle) => {
|
||||
try {
|
||||
// 构造支付方式详情文本
|
||||
const paymentDetails = `现金 ${
|
||||
currentFeeType.value === 'hipCash' ? advance.value || '0.00' : '0.00'
|
||||
} 微信 ${currentFeeType.value === 'wechat' ? advance.value || '0.00' : '0.00'} 支付宝 ${
|
||||
currentFeeType.value === 'hipAlipay' ? advance.value || '0.00' : '0.00'
|
||||
} 银行 ${currentFeeType.value === 'hipPayCard' ? advance.value || '0.00' : '0.00'}`;
|
||||
|
||||
// 构造打印数据
|
||||
const printData = {
|
||||
// 患者基本信息
|
||||
patientName: patientInfo.patientName || '', // 姓名
|
||||
patientId: patientInfo.idCard || patientInfo.patientCode || '', // ID号
|
||||
contractName: patientInfo.contractName || '自费', // 医保类别
|
||||
|
||||
// 住院信息
|
||||
encounterNo: inHospitalInfo.encounterNo || '', // 住院号
|
||||
inHospitalOrgName: inHospitalInfo.inHospitalOrgName || '', // 机构名称
|
||||
|
||||
// 费用信息
|
||||
balanceAmount: advance.value || '0.00', // 金额
|
||||
amountInWords: convertToChineseNumber(advance.value || '0.00'), // 人民币大写
|
||||
|
||||
// 支付方式详情
|
||||
paymentDetails: paymentDetails,
|
||||
|
||||
// 时间信息
|
||||
currentTime: new Date().toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
}),
|
||||
|
||||
// 其他信息
|
||||
cashier: userStore?.nickName || '', // 收款人(收费员)
|
||||
medicalInsuranceTitle: medicalInsuranceTitle || '', // 医保标题信息
|
||||
};
|
||||
|
||||
console.log(printData, 'dayin 预交金printData');
|
||||
|
||||
// 直接导入并使用指定的预交金打印模板
|
||||
const templateModule = await import('@/components/Print/AdvancePayment.json');
|
||||
let template = templateModule.default || templateModule;
|
||||
|
||||
// 使用printUtils执行打印
|
||||
await printUtils.executePrint(printData, template);
|
||||
console.log('预交金收据打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
ElMessage.error('打印失败: ' + error.message);
|
||||
}
|
||||
};
|
||||
|
||||
/* 将数字转换为人民币大写 */
|
||||
const convertToChineseNumber = (amount) => {
|
||||
// 数字转大写
|
||||
const digits = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
||||
const units = ['', '拾', '佰', '仟', '万', '拾', '佰', '仟', '亿'];
|
||||
const decimalUnits = ['角', '分'];
|
||||
|
||||
let [integer, decimal] = amount.toString().split('.');
|
||||
decimal = decimal || '00';
|
||||
decimal = decimal.padEnd(2, '0').substring(0, 2);
|
||||
|
||||
let result = '';
|
||||
|
||||
// 处理整数部分
|
||||
if (parseInt(integer) === 0) {
|
||||
result += '零元';
|
||||
} else {
|
||||
for (let i = 0; i < integer.length; i++) {
|
||||
const digit = parseInt(integer[i]);
|
||||
const position = integer.length - i - 1;
|
||||
|
||||
if (digit !== 0) {
|
||||
result += digits[digit] + units[position];
|
||||
} else {
|
||||
// 避免连续的零
|
||||
if (i > 0 && parseInt(integer[i - 1]) !== 0) {
|
||||
result += digits[digit];
|
||||
}
|
||||
// 但需要保留万、亿等单位
|
||||
if (position % 4 === 0 && position > 0) {
|
||||
result += units[position];
|
||||
}
|
||||
}
|
||||
}
|
||||
result += '元';
|
||||
}
|
||||
|
||||
// 处理小数部分
|
||||
if (parseInt(decimal) === 0) {
|
||||
result += '整';
|
||||
} else {
|
||||
if (parseInt(decimal[0]) > 0) {
|
||||
result += digits[parseInt(decimal[0])] + decimalUnits[0];
|
||||
}
|
||||
if (parseInt(decimal[1]) > 0) {
|
||||
result += digits[parseInt(decimal[1])] + decimalUnits[1];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/* 导入用户信息 */
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
function handleWxPay() {
|
||||
wxPay({
|
||||
// 支付码
|
||||
txtCode: txtCode.value,
|
||||
// 收费项id 住院怎么给
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
// 支付id 住院怎么给
|
||||
id: props.paymentId,
|
||||
// 支付详情 住院怎么给 格式[{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]
|
||||
paymentDetails: formData.selfPay,
|
||||
// 读卡的时候获取的
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
// 读卡获取
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据不同支付方式,显示不同的支付方式详情
|
||||
const payType = () => {
|
||||
switch (currentFeeType.value) {
|
||||
case 'hipCash':
|
||||
return '现金';
|
||||
case 'hipAlipay':
|
||||
return '支付宝';
|
||||
case 'wechat':
|
||||
return '微信卡';
|
||||
case 'hipPayCard':
|
||||
return '银行卡';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
};
|
||||
// 读卡操作
|
||||
const onCarRead = (a) => {
|
||||
console.log('读卡操作:', a);
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.patientRegister-container {
|
||||
@@ -290,7 +648,12 @@ const onChangFeeType = () => {
|
||||
.advance-container {
|
||||
width: 660px;
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.feeType {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
ref="registerRef"
|
||||
label-width="80px"
|
||||
:rules="rules"
|
||||
:disabled="props.isRegistered"
|
||||
>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="6">
|
||||
@@ -28,6 +29,7 @@
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="submitForm.inHospitalOrgId"
|
||||
:disabled="props.isRegistered"
|
||||
filterable
|
||||
:data="organization"
|
||||
:props="{
|
||||
@@ -47,7 +49,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院病区" prop="wardLocationId">
|
||||
<el-select :disabled="props.alreadyEdit" v-model="submitForm.wardLocationId">
|
||||
<el-select
|
||||
:disabled="props.isRegistered || !submitForm.inHospitalOrgId"
|
||||
v-model="submitForm.wardLocationId"
|
||||
placeholder="请先选择入院科室"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wardListOptions"
|
||||
:key="item.id"
|
||||
@@ -74,6 +80,7 @@
|
||||
<el-form-item label="诊断类别" prop="medTypeCode">
|
||||
<el-select
|
||||
v-model="submitForm.medTypeCode"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="诊断类别"
|
||||
clearable
|
||||
filterable
|
||||
@@ -101,6 +108,7 @@
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="入院诊断"
|
||||
clearable
|
||||
filterable
|
||||
@@ -124,11 +132,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="患者病情">
|
||||
<el-select v-model="submitForm.priorityEnum">
|
||||
<el-select v-model="submitForm.priorityEnum" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in props.initOptions.priorityEnumList"
|
||||
v-for="item in props.initOptions.priorityLevelOptionOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -136,7 +144,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院类型" prop="admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in admit_source_code"
|
||||
:key="item.value"
|
||||
@@ -148,7 +156,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院方式" prop="inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in in_way_code"
|
||||
:key="item.value"
|
||||
@@ -164,6 +172,7 @@
|
||||
v-model="submitForm.contractNo"
|
||||
placeholder="费用性质"
|
||||
clearable
|
||||
:disabled="props.isRegistered"
|
||||
@change="getValue"
|
||||
>
|
||||
<el-option
|
||||
@@ -179,6 +188,7 @@
|
||||
<el-form-item label="入院日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="submitForm.startTime"
|
||||
:disabled="props.isRegistered"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="date"
|
||||
placeholder="请选择日期"
|
||||
@@ -198,6 +208,7 @@ import {
|
||||
getBedInfo,
|
||||
getContractList,
|
||||
getDiagnosisDefinitionList,
|
||||
getProvincesAndCities,
|
||||
} from './api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { in_way_code, admit_source_code, med_type } = proxy.useDict(
|
||||
@@ -224,7 +235,7 @@ const props = defineProps({
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
alreadyEdit: {
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
@@ -239,6 +250,7 @@ const wardListOptions = ref([]);
|
||||
const contractList = ref([]);
|
||||
const verificationStatusOptions = ref([]);
|
||||
const diagnosisDefinitionList = ref([]);
|
||||
const wardLoading = ref(false);
|
||||
const rules = reactive({
|
||||
inHospitalOrgId: [
|
||||
{
|
||||
@@ -268,15 +280,52 @@ const rules = reactive({
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
diagnosisDesc: [
|
||||
{
|
||||
required: true,
|
||||
message: '诊断描述未填写',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
// diagnosisDesc: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '诊断描述未填写',
|
||||
// trigger: ['blur', 'change'],
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
|
||||
//获取省市医保字符串
|
||||
const medicalInsuranceTitle = ref('');
|
||||
|
||||
// 暴露给父组件使用
|
||||
// defineExpose({
|
||||
// medicalInsuranceTitle,
|
||||
// });
|
||||
const getProvincesAndCitiesInfo = async () => {
|
||||
try {
|
||||
if (inHospitalInfo.encounterId) {
|
||||
const res = await getProvincesAndCities(props.inHospitalInfo.encounterId);
|
||||
// console.log('获取省市医保字符串', res);
|
||||
if (res && res.code == 200) {
|
||||
// 确保有数据时才更新
|
||||
medicalInsuranceTitle.value = res.data?.insutype || res.data || '';
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// 静默处理错误,确保页面不会显示错误信息
|
||||
console.error('获取医保省市信息失败:', error);
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getProvincesAndCitiesInfo();
|
||||
});
|
||||
|
||||
// 监听inHospitalInfo.encounterId的变化,在弹窗打开时重新调用接口
|
||||
watch(
|
||||
() => props.inHospitalInfo.encounterId,
|
||||
(newEncounterId) => {
|
||||
if (newEncounterId) {
|
||||
getProvincesAndCitiesInfo();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/* 提交表单 */
|
||||
const submitForm = reactive({
|
||||
inHospitalOrgId: props.inHospitalInfo.inHospitalOrgId,
|
||||
@@ -289,25 +338,50 @@ const submitForm = reactive({
|
||||
ambDiagnosisName: props.inHospitalInfo.ambDiagnosisName,
|
||||
medTypeCode: '21',
|
||||
});
|
||||
/* 科室 病区 */
|
||||
// /* 科室 病区 */
|
||||
// watch(
|
||||
// () => submitForm.inDocterWorkGroupCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// if (newValue == '') {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// } else {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
// watch(
|
||||
// () => submitForm.inNurseDeptCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// getBedInfo(newValue);
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
watch(
|
||||
() => submitForm.inDocterWorkGroupCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
if (newValue == '') {
|
||||
submitForm.wardLocationId = '';
|
||||
() => submitForm.wardLocationId,
|
||||
(newWardId) => {
|
||||
if (newWardId && wardListOptions.value.length > 0) {
|
||||
const selectedWard = wardListOptions.value.find((item) => item.id === newWardId);
|
||||
if (selectedWard) {
|
||||
handleWardClick(selectedWard);
|
||||
}
|
||||
} else {
|
||||
submitForm.wardLocationId = '';
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => submitForm.inNurseDeptCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
getBedInfo(newValue);
|
||||
() => props.isRegistered,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
// 已登记状态可以做一些数据锁定操作
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -315,25 +389,51 @@ watch(
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
setValue();
|
||||
setDefaultAdmitSource();
|
||||
if (submitForm.inHospitalOrgId) {
|
||||
handleNodeClick({ id: submitForm.inHospitalOrgId });
|
||||
}
|
||||
});
|
||||
|
||||
const setDefaultAdmitSource = () => {
|
||||
if (props.noFile) return;
|
||||
const defaultItem = admit_source_code.value.find((item) => item.value === '1');
|
||||
if (defaultItem) {
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode || defaultItem.value;
|
||||
}
|
||||
};
|
||||
function handleWardClick(item) {
|
||||
submitForm.wardBusNo = item.busNo;
|
||||
getBedInfo(submitForm.wardBusNo).then((res) => {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
});
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
getBedInfo(submitForm.wardBusNo)
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
} else {
|
||||
submitForm.totalBedsNum = 0;
|
||||
submitForm.idleBedsNum = 0;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('查询病床失败:', err);
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
});
|
||||
}
|
||||
|
||||
function getInitOptions() {
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
});
|
||||
if (!props.noFile) {
|
||||
wardList().then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
// if (!props.noFile) {
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
// }
|
||||
diagnosisInit().then((res) => {
|
||||
verificationStatusOptions.value = res.data.verificationStatusOptions;
|
||||
});
|
||||
@@ -350,15 +450,40 @@ function getDiagnosisInfo(value) {
|
||||
}
|
||||
|
||||
function handleNodeClick(orgInfo) {
|
||||
wardList({ orgId: orgInfo.id }).then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
submitForm.wardLocationId = undefined; // 切换科室时,先清空原有病区
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardListOptions.value = []; // 先清空列表,避免旧数据残留
|
||||
wardLoading.value = true;
|
||||
wardList({ orgId: orgInfo.id })
|
||||
.then((res) => {
|
||||
wardListOptions.value = res.data || [];
|
||||
if (wardListOptions.value.length > 0 && !props.inHospitalInfo.wardLocationId) {
|
||||
submitForm.wardLocationId = wardListOptions.value[0].id;
|
||||
const defaultWard = wardListOptions.value.find(
|
||||
(item) => item.id === submitForm.wardLocationId
|
||||
);
|
||||
if (defaultWard) {
|
||||
handleWardClick(defaultWard);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('加载病区失败:', err);
|
||||
wardListOptions.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
wardLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
if (!value) {
|
||||
wardListOptions.value = [];
|
||||
submitForm.wardLocationId = undefined;
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardLoading.value = false; // 同步停止加载
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +510,7 @@ function setValue() {
|
||||
submitForm.ambDiagnosisName = props.inHospitalInfo?.ambDiagnosisName;
|
||||
submitForm.priorityEnum = props.inHospitalInfo?.priorityEnum;
|
||||
submitForm.priorityEnum_enumText = props.inHospitalInfo?.priorityEnum_enumText;
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
// submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
submitForm.admitSourceCode_dictText = props.inHospitalInfo?.admitSourceCode_dictText;
|
||||
submitForm.inWayCode = props.inHospitalInfo?.inWayCode;
|
||||
submitForm.inWayCode_dictText = props.inHospitalInfo?.inWayCode_dictText;
|
||||
@@ -406,10 +531,13 @@ const validateData = async (callback) => {
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
if (!props.isRegistered) {
|
||||
// 只有待登记状态才重置
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
}
|
||||
};
|
||||
defineExpose({ validateData, submitForm, init });
|
||||
defineExpose({ validateData, submitForm, init, medicalInsuranceTitle });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.registerForm-container {
|
||||
|
||||
@@ -22,7 +22,6 @@ const props = defineProps({});
|
||||
const state = reactive({});
|
||||
defineExpose({ state });
|
||||
const activeName = ref('first');
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sds {
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getCurrentInstance, onActivated, onBeforeMount, onMounted, reactive, ref } from 'vue'
|
||||
import { invoiceSkip } from './index'
|
||||
import invoiceSkip from './invoiceSkip.vue'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
|
||||
@@ -179,15 +179,13 @@ import {
|
||||
ref,
|
||||
watchEffect,
|
||||
} from 'vue'
|
||||
import {
|
||||
receipt,
|
||||
refund,
|
||||
patientList,
|
||||
invoiceSkip,
|
||||
derate,
|
||||
patientListDialog,
|
||||
preSettlement,
|
||||
} from './components/index'
|
||||
import receipt from './components/receipt.vue';
|
||||
import refund from './components/refund.vue';
|
||||
import patientList from './components/patientList.vue';
|
||||
import invoiceSkip from './components/invoiceSkip.vue';
|
||||
import derate from './components/derate.vue';
|
||||
import patientListDialog from './components/patientListDialog.vue';
|
||||
import preSettlement from './components/preSettlement.vue';
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container">
|
||||
<el-form :model="state.form">
|
||||
<div class="record-container">
|
||||
<div class="title">演示医院</div>
|
||||
<div class="title">长春市朝阳区中医院</div>
|
||||
<div class="subtitle">入院记录</div>
|
||||
<div class="header">
|
||||
<span>姓名: [<el-input v-model="state.form.name" class="inline-input" />]</span>
|
||||
|
||||
@@ -1,324 +1,58 @@
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<!-- 顶部导航栏 -->
|
||||
<header class="header">
|
||||
<div class="logo">
|
||||
<span class="logo-text">医院信息管理系统</span>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="notification-badge">
|
||||
<i class="header-icon">🔔</i>
|
||||
<span class="badge">2</span>
|
||||
</div>
|
||||
<i class="header-icon">⚙️</i>
|
||||
<div class="user-info">
|
||||
<span class="user-avatar">👤</span>
|
||||
<span>用户</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<div class="awaitingBtn">
|
||||
<el-button @click="awaitingMedicineBtn">
|
||||
效期预警
|
||||
<span>{{ total }}</span>
|
||||
</el-button>
|
||||
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<!-- 左侧导航栏 -->
|
||||
<nav class="sidebar">
|
||||
<div class="menu-item active">
|
||||
<span class="menu-icon">📊</span>
|
||||
<span>仪表盘</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">👥</span>
|
||||
<span>患者管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">💉</span>
|
||||
<span>预约管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">🏥</span>
|
||||
<span>门诊管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">⚕️</span>
|
||||
<span>住院管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">💊</span>
|
||||
<span>药房管理</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">📋</span>
|
||||
<span>报表统计</span>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span class="menu-icon">⚙️</span>
|
||||
<span>系统设置</span>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<div class="content-wrapper">
|
||||
<div class="awaitingBtn">
|
||||
<el-button @click="awaitingMedicineBtn">效期预警 <span>{{ total }}</span></el-button>
|
||||
</div>
|
||||
|
||||
<h1 class="section-title">仪表盘</h1>
|
||||
|
||||
<!-- 关键指标卡片 -->
|
||||
<div class="dashboard-grid">
|
||||
<div class="card">
|
||||
<div class="card-title">今日预约量</div>
|
||||
<div class="card-value">126</div>
|
||||
<div class="card-stats">
|
||||
<span class="stats-icon">↑</span>
|
||||
<span>12% 较昨日</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-title">门诊量统计</div>
|
||||
<div class="card-value">342</div>
|
||||
<div class="card-stats">
|
||||
<span class="stats-icon">↑</span>
|
||||
<span>8% 较上周</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-title">住院患者数</div>
|
||||
<div class="card-value">78</div>
|
||||
<div class="card-stats down">
|
||||
<span class="stats-icon">↓</span>
|
||||
<span>5% 较上周</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-title">药品库存预警</div>
|
||||
<div class="card-value">8</div>
|
||||
<div class="card-stats">
|
||||
<span class="stats-icon">!</span>
|
||||
<span>需要立即处理</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 图表展示区 -->
|
||||
<div class="chart-container">
|
||||
<canvas id="statsChart"></canvas>
|
||||
</div>
|
||||
|
||||
<!-- 重要通知和待办事项 -->
|
||||
<div class="bottom-content">
|
||||
<div class="notification-container">
|
||||
<div class="notification-title">重要通知</div>
|
||||
<ul class="notification-list">
|
||||
<li class="notification-item">系统将于周六凌晨2:00进行维护升级</li>
|
||||
<li class="notification-item">新的门诊排班系统已上线,请尽快熟悉</li>
|
||||
<li class="notification-item">三季度医疗质量分析报告已发布</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="todo-container">
|
||||
<div class="todo-title">待办事项</div>
|
||||
<ul class="todo-list">
|
||||
<li class="todo-item">
|
||||
<span>未完成预约</span>
|
||||
<span class="todo-count">12个</span>
|
||||
</li>
|
||||
<li class="todo-item">
|
||||
<span>待处理检查结果</span>
|
||||
<span class="todo-count">7份</span>
|
||||
</li>
|
||||
<li class="todo-item">
|
||||
<span>待开处方</span>
|
||||
<span class="todo-count">3张</span>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-primary">查看详情</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 患者列表 -->
|
||||
<h2 class="section-title">最近患者</h2>
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>患者姓名</th>
|
||||
<th>病历号</th>
|
||||
<th>年龄</th>
|
||||
<th>最后就诊时间</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>张明</td>
|
||||
<td>HN2023001</td>
|
||||
<td>45</td>
|
||||
<td>2023-10-20 09:30</td>
|
||||
<td><span style="color: #67c23a;">已完成</span></td>
|
||||
<td>
|
||||
<button class="btn btn-outline">详情</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>李红</td>
|
||||
<td>HN2023002</td>
|
||||
<td>32</td>
|
||||
<td>2023-10-20 10:15</td>
|
||||
<td><span style="color: #ff9800;">待检查</span></td>
|
||||
<td>
|
||||
<button class="btn btn-outline">详情</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>王建军</td>
|
||||
<td>HN2023003</td>
|
||||
<td>68</td>
|
||||
<td>2023-10-19 14:20</td>
|
||||
<td><span style="color: #d45d79;">住院中</span></td>
|
||||
<td>
|
||||
<button class="btn btn-outline">详情</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-select v-model="selectValue" @change="handelChange" @keyup.enter="handelEnter">
|
||||
<el-option label="测试1" value="1"/>
|
||||
<el-option label="测试2" value="2 "/>
|
||||
</el-select> -->
|
||||
</div>
|
||||
<!-- <div class="logo">
|
||||
<img src="/src/assets/images/jlau.jpg" />
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Index">
|
||||
import { ref, onMounted, onActivated } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import Chart from 'chart.js/auto';
|
||||
import {
|
||||
getExpirationWarning,
|
||||
} from "./medicationmanagement/statisticalManagement/statisticalManagent";
|
||||
import { getproductReturnPage } from './medicationmanagement/statisticalManagement/statisticalManagent';
|
||||
import { useStore } from '@/store/store';
|
||||
const store = useStore();
|
||||
|
||||
const router = useRouter();
|
||||
const version = ref('3.8.7');
|
||||
const total = ref(0);
|
||||
|
||||
const selectValue = ref('');
|
||||
function awaitingMedicineBtn() {
|
||||
router.push({ path: '/medicationmanagement/statisticalManagement/earlyWarning' });
|
||||
store.setRemainingDays(180);
|
||||
console.log(store.remainingDays);
|
||||
|
||||
router.push({
|
||||
path: '/medicationmanagement/statisticalManagement/statisticalManagement',
|
||||
});
|
||||
}
|
||||
function goTarget(url) {
|
||||
window.open(url, '__blank');
|
||||
}
|
||||
|
||||
function handelEnter() {
|
||||
console.log('enter');
|
||||
}
|
||||
|
||||
// function handelChange(val) {
|
||||
// console.log(val);
|
||||
// }
|
||||
|
||||
function getExpirationWarningCount() {
|
||||
getExpirationWarning({ pageNo: 1, pageSize: 10 }).then((res) => {
|
||||
getproductReturnPage({ pageNo: 1, pageSize: 10, remainingDays: 180 }).then((res) => {
|
||||
total.value = res.data.total || 0;
|
||||
}).catch((err) => {
|
||||
console.error('获取效期预警数量失败:', err);
|
||||
total.value = 0;
|
||||
});
|
||||
}
|
||||
|
||||
let chartInstance = null;
|
||||
|
||||
onActivated(() => {
|
||||
// getExpirationWarningCount();
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// getExpirationWarningCount();
|
||||
|
||||
const ctx = document.getElementById('statsChart');
|
||||
if (!ctx) return;
|
||||
|
||||
// 销毁已有实例
|
||||
if (chartInstance) {
|
||||
chartInstance.destroy();
|
||||
}
|
||||
|
||||
// 模拟数据:近7天门诊量与预约量
|
||||
const labels = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
|
||||
const outpatientData = [310, 335, 305, 345, 370, 270, 210]; // 门诊量(柱状图)
|
||||
const appointmentData = [100, 120, 110, 130, 140, 90, 70]; // 预约量(折线图)
|
||||
|
||||
chartInstance = new Chart(ctx.getContext('2d'), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: '门诊量',
|
||||
data: outpatientData,
|
||||
backgroundColor: '#91c8e5',
|
||||
borderColor: '#66a8cc',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
borderSkipped: false,
|
||||
},
|
||||
{
|
||||
label: '预约量',
|
||||
data: appointmentData,
|
||||
type: 'line',
|
||||
borderColor: '#f56c6c',
|
||||
backgroundColor: 'rgba(245, 108, 108, 0.1)',
|
||||
borderWidth: 2,
|
||||
pointBackgroundColor: '#f56c6c',
|
||||
pointBorderColor: '#fff',
|
||||
pointBorderWidth: 2,
|
||||
pointRadius: 4,
|
||||
fill: true,
|
||||
tension: 0.3,
|
||||
lineTension: 0.3,
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'top',
|
||||
labels: {
|
||||
font: {
|
||||
size: 12,
|
||||
weight: 'bold'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
mode: 'index',
|
||||
intersect: false,
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
||||
titleFont: {
|
||||
size: 13
|
||||
},
|
||||
bodyFont: {
|
||||
size: 12
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
grid: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
font: {
|
||||
size: 11
|
||||
}
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
max: 400,
|
||||
stepSize: 50,
|
||||
grid: {
|
||||
color: 'rgba(0, 0, 0, 0.05)'
|
||||
},
|
||||
ticks: {
|
||||
font: {
|
||||
size: 11
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
getExpirationWarningCount();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -330,142 +64,15 @@ onMounted(() => {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 60px;
|
||||
background-color: white;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #166773;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.notification-badge {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.header-icon:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #ff4d4f;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
min-width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.user-info:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
background-color: white;
|
||||
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16px 24px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
|
||||
.menu-item.active {
|
||||
background-color: #e6f7ff;
|
||||
border-left-color: #1890ff;
|
||||
color: #1890ff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
margin-right: 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.awaitingBtn {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.el-button{
|
||||
.el-button {
|
||||
border: 1px #166773 solid;
|
||||
span {
|
||||
color: red;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button:hover{
|
||||
.el-button:hover {
|
||||
border: 1px #166773 solid;
|
||||
color: #166773;
|
||||
span {
|
||||
@@ -473,6 +80,9 @@ onMounted(() => {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user