解决合并冲突
This commit is contained in:
@@ -116,7 +116,7 @@ const props = defineProps({
|
||||
})
|
||||
const userStore = useUserStore();
|
||||
const formRef = ref(null)
|
||||
|
||||
console.log(components,'----components');
|
||||
const dialogVisible= defineModel( 'dialogVisible', {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<div class="LaboratoryTests-container">
|
||||
<el-dialog
|
||||
title="批量导入项目"
|
||||
:model-value="props.dialogVisible"
|
||||
@update:modelValue="(val) => emit('update:dialogVisible', val)"
|
||||
width="842"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:draggable="true"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form ref="formEl" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item label="项目类型" prop="clinicalType">
|
||||
<el-select
|
||||
v-model="form.clinicalType"
|
||||
placeholder="请选择"
|
||||
@change="getList()"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in categoryCodeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="30" style="margin-top: 30px">
|
||||
<el-col :span="24">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="LaboratoryTests">
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import {
|
||||
getApplicationList,
|
||||
editImplementDepartment,
|
||||
addImplementDepartment,
|
||||
} from './implementDepartment.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 属性
|
||||
const props = defineProps({
|
||||
// 弹框显示信息
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 选择科室
|
||||
organizationId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:dialogVisible', 'confirm', 'cancel', 'submitOk']);
|
||||
// 申请项目列表
|
||||
const applicationListAll = ref();
|
||||
// 获取所有申请项目
|
||||
const applicationList = ref();
|
||||
// 申请项目列表
|
||||
const transferValue = ref([]);
|
||||
// 项目类型
|
||||
const formEl = ref();
|
||||
const form = reactive({ clinicalType: '23' });
|
||||
// 加载中
|
||||
const loading = ref(false);
|
||||
// 弹窗显隐由父组件控制,通过 v-model 事件同步
|
||||
// 项目类型
|
||||
const categoryCodeList = ref([
|
||||
{ label: '治疗', value: '21' },
|
||||
{ label: '检验', value: '22' },
|
||||
{ label: '检查', value: '23' },
|
||||
{ label: '手术', value: '24' },
|
||||
]);
|
||||
// 规则校验
|
||||
const rules = ref({
|
||||
clinicalType: [{ required: true, message: '请选择项目类型', trigger: 'change' }],
|
||||
});
|
||||
const getList = () => {
|
||||
if (!form.clinicalType) {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
// 项目类型 枚举类中
|
||||
categoryCode: form.clinicalType,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
loading.value = false;
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
return {
|
||||
label: item.adviceName + item.adviceDefinitionId,
|
||||
key: item.adviceDefinitionId,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function onCancel() {
|
||||
emit('cancel');
|
||||
emit('update:dialogVisible', false);
|
||||
}
|
||||
|
||||
// 批量添加
|
||||
async function onConfirm() {
|
||||
if (!formEl) return;
|
||||
formEl.value.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
if (!transferValue.value || transferValue.value.length === 0) {
|
||||
proxy.$message.error('请选择至少一个项目');
|
||||
return;
|
||||
}
|
||||
const requests = (transferValue.value || []).map((defId) => {
|
||||
const params = {
|
||||
// 诊疗定义id
|
||||
activityDefinitionId: defId,
|
||||
// 科室ID
|
||||
organizationId: props.organizationId,
|
||||
// 诊疗类型
|
||||
activityCategoryCode: form.clinicalType,
|
||||
// 开始时间
|
||||
startTime: '00:00:00',
|
||||
// 结束时间
|
||||
endTime: '23:59:59',
|
||||
/*
|
||||
方法类别:DistributionCategoryCodeEnum 枚举
|
||||
desription: 8代表诊疗
|
||||
*/
|
||||
distributionCategoryCode: '8',
|
||||
};
|
||||
return handleSave(params);
|
||||
});
|
||||
await Promise.all(requests);
|
||||
emit('submitOk');
|
||||
emit('update:dialogVisible', false);
|
||||
transferValue.value = [];
|
||||
});
|
||||
}
|
||||
// 保存
|
||||
async function handleSave(params) {
|
||||
if (params.id) {
|
||||
return editImplementDepartment(params).then((res) => {
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
return res;
|
||||
});
|
||||
} else {
|
||||
delete params.id;
|
||||
return addImplementDepartment(params).then((res) => {
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
return res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-transfer-panel) {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,68 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 初始化
|
||||
export function getImplementDepartmentList(query) {
|
||||
return request({
|
||||
export function getImplementDepartmentList (query) {
|
||||
return request ({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
export function getDiagnosisTreatmentList (query) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//查询诊疗目录详细
|
||||
export function getImplementDepartmentOne(query) {
|
||||
return request({
|
||||
export function getImplementDepartmentOne (query) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: query // 确保参数正确传递
|
||||
})
|
||||
params: query, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addImplementDepartment(data) {
|
||||
return request({
|
||||
export function addImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editImplementDepartment(data) {
|
||||
return request({
|
||||
export function editImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteImplementDepartment(data) {
|
||||
return request({
|
||||
export function deleteImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc?orgLocId=' + data.orgLocId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInit () {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 目录分类子查询
|
||||
export function getDiseaseTreatmentInitLoc(id) {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInitLoc (id) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//医嘱大下拉
|
||||
export function getApplicationList (queryParams) {
|
||||
return request ({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 获取所有诊疗项目
|
||||
export function getAllTreatmentList () {
|
||||
return request ({
|
||||
url: '/app-common/activity-definition',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -33,6 +33,17 @@
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Plus"
|
||||
:disabled="isAddDisable"
|
||||
@click="handleBacthAddItem"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>批量新增项目配置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -41,54 +52,49 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="100" align="center" />
|
||||
<el-table-column label="诊疗目录" width="150" align="center" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.activityCategoryCode"
|
||||
placeholder="请选择"
|
||||
ref="dropdown"
|
||||
@change="DiagnosisTreatmentList(scope.row,scope.$index,1)"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in catagoryDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
label="诊疗目录"
|
||||
width="150"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.activityDefinitionId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请选择"
|
||||
remote-show-suffix
|
||||
:remote-method="(query) => debouncedRemoteMethod(query, scope.row)"
|
||||
:loading="loading"
|
||||
style="width: 350px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in scope.row.projectList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="scope.row.activityCategoryCode"
|
||||
placeholder="请选择"
|
||||
ref="dropdown"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in catagoryDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.activityDefinitionId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请选择"
|
||||
remote-show-suffix
|
||||
style="width: 400px; max-width: 500px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in allImplementDepartmentList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -97,18 +103,15 @@
|
||||
key="startTime"
|
||||
prop="startTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-time-picker
|
||||
v-model="scope.row.startTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</div>
|
||||
<el-time-picker
|
||||
v-model="scope.row.startTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -117,19 +120,16 @@
|
||||
align="center"
|
||||
key="endTime"
|
||||
prop="endTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-time-picker
|
||||
v-model="scope.row.endTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</div>
|
||||
<el-time-picker
|
||||
v-model="scope.row.endTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -169,6 +169,11 @@
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<BacthAddItemDialog
|
||||
v-model:dialogVisible="bacthAddItemDialogVisible"
|
||||
:organizationId="organizationId"
|
||||
@submitOk="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -178,14 +183,12 @@ import {
|
||||
getImplementDepartmentList,
|
||||
getDiagnosisTreatmentList,
|
||||
getDiseaseTreatmentInit,
|
||||
getImplementDepartmentOne,
|
||||
// getDiseaseTreatmentInitLoc,
|
||||
getAllTreatmentList,
|
||||
addImplementDepartment,
|
||||
editImplementDepartment,
|
||||
deleteImplementDepartment,
|
||||
} from './components/implementDepartment';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { fa } from 'element-plus/es/locales.mjs';
|
||||
import BacthAddItemDialog from './components/batchAddDialog.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const organization = ref([]);
|
||||
const loading = ref(true);
|
||||
@@ -194,10 +197,11 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const catagoryList = ref([]);
|
||||
const projectList = ref([]);
|
||||
const catagoryDicts = ref([]);
|
||||
const isAddDisable = ref(true);
|
||||
const organizationId = ref('');
|
||||
// 批量添加
|
||||
const bacthAddItemDialogVisible = ref(false);
|
||||
//默认传8(诊疗)
|
||||
const distributionCategoryCode = ref('8');
|
||||
const data = reactive({
|
||||
@@ -212,29 +216,15 @@ const data = reactive({
|
||||
},
|
||||
isAdding: false,
|
||||
});
|
||||
const debouncedRemoteMethod = debounce((query, row) => {
|
||||
remoteMethod(query, row);
|
||||
}, 300);
|
||||
|
||||
const { queryParams, tableRules } = toRefs(data);
|
||||
|
||||
/** 查询表格数据列表 */
|
||||
function getList() {
|
||||
let params = {
|
||||
// 科室id
|
||||
organizationId: organizationId.value,
|
||||
// 类别
|
||||
distributionCategoryCode: distributionCategoryCode.value,
|
||||
};
|
||||
getDiagnosisTreatmentList(params).then((res) => {
|
||||
console.log(res.data.records)
|
||||
queryParams.value.organizationId = organizationId.value;
|
||||
queryParams.value.distributionCategoryCode = distributionCategoryCode.value;
|
||||
loading.value = true;
|
||||
getDiagnosisTreatmentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
catagoryList.value = res.data.records
|
||||
catagoryList.value.map((k,index)=>{
|
||||
// if(k.activityCategoryCode){
|
||||
DiagnosisTreatmentList(k,index, 2)
|
||||
// }
|
||||
})
|
||||
catagoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -243,69 +233,21 @@ const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
//下拉诊疗目录点击事件
|
||||
function DiagnosisTreatmentList(row,index,type) {
|
||||
let params = {
|
||||
statusEnum: 2, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
...row,
|
||||
categoryCode: row.activityCategoryCode,
|
||||
pageSize:100,
|
||||
}
|
||||
if(type == 1){
|
||||
catagoryList.value[index].activityDefinitionId =''
|
||||
}else if(type == 2){
|
||||
params.searchKey = row.activityDefinitionId_dictText
|
||||
}
|
||||
console.log(params,'params');
|
||||
getImplementDepartmentOne(params)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
projectList.value = [];
|
||||
row.name = null;
|
||||
projectList.value = res.data.records.map((item) => ({ value: item.id, info: item.name }));
|
||||
|
||||
catagoryList.value[index].projectList = projectList.value
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('请求失败', error);
|
||||
});
|
||||
}
|
||||
|
||||
function remoteMethod(query, row) {
|
||||
// 所有诊疗项目列表
|
||||
const allImplementDepartmentList = ref([]);
|
||||
function getAllImplementDepartment() {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
statusEnum: 2,
|
||||
activityCategoryCode: row.activityCategoryCode, // 确保已选诊疗目录
|
||||
searchKey: query, // 模糊搜索关键字
|
||||
...row,
|
||||
categoryCode: row.activityCategoryCode,
|
||||
pageSize:100,
|
||||
};
|
||||
console.log(params,row,query,'params');
|
||||
|
||||
getImplementDepartmentOne(params).then((res) => {
|
||||
getAllTreatmentList().then((res) => {
|
||||
allImplementDepartmentList.value = res.data.map((item) => ({
|
||||
value: item.activityDefinitionId,
|
||||
label: item.activityDefinitionName,
|
||||
}));
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
// 更新当前行的 projectList 数据
|
||||
row.projectList = res.data.records.map((item) => ({
|
||||
value: item.id,
|
||||
info: item.name,
|
||||
}));
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
@@ -317,13 +259,18 @@ function handleAddItem() {
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
startTime:'00:00:00',
|
||||
endTime:'23:59:59'
|
||||
startTime: '00:00:00',
|
||||
endTime: '23:59:59',
|
||||
};
|
||||
catagoryList.value.push(newRow);
|
||||
total.value = organization.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
}
|
||||
// 批量添加
|
||||
function handleBacthAddItem() {
|
||||
// 批量添加显示对话框
|
||||
bacthAddItemDialogVisible.value = true;
|
||||
}
|
||||
// 检验 编辑或 保存数据
|
||||
function handleBlur(row, index) {
|
||||
let hasError = false;
|
||||
@@ -336,8 +283,7 @@ function handleBlur(row, index) {
|
||||
if (message) {
|
||||
proxy.$message.error(message);
|
||||
} else {
|
||||
console.error(`No rule defined for field: ${field}`);
|
||||
proxy.$message.error(`No rule defined for field: ${field}`);
|
||||
proxy.$message.error(`检验未通过`);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -357,6 +303,7 @@ function openSaveImplementDepartment(row) {
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
return;
|
||||
}
|
||||
const startTime = params.startTime;
|
||||
const endTime = params.endTime;
|
||||
@@ -383,22 +330,22 @@ function openSaveImplementDepartment(row) {
|
||||
}
|
||||
// 删除当前所选行
|
||||
function deleteSelectedRows(row) {
|
||||
if (row.id) {
|
||||
deleteImplementDepartment({ orgLocId: row.id }).then((res) => {});
|
||||
} else {
|
||||
catagoryList.value.pop();
|
||||
}
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
data.isAdding = false;
|
||||
getList();
|
||||
proxy.$modal.confirm('是否删除选中数据').then(() => {
|
||||
if (row.id) {
|
||||
deleteImplementDepartment({ orgLocId: row.id }).then((res) => {});
|
||||
} else {
|
||||
catagoryList.value.pop();
|
||||
}
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
data.isAdding = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data, node) {
|
||||
catagoryList.value.map(k=>{
|
||||
if(!k.id){
|
||||
openSaveImplementDepartment(k)
|
||||
}
|
||||
})
|
||||
function handleNodeClick(res, node) {
|
||||
// 新增按钮是否 disable
|
||||
data.isAdding = false;
|
||||
|
||||
// 新增按钮是否 disable
|
||||
if (node.parent === null || node.level === 1) {
|
||||
isAddDisable.value = true;
|
||||
@@ -418,7 +365,10 @@ function handleNodeClick(data, node) {
|
||||
|
||||
/** 目录分类查询 */
|
||||
function getDiseaseTreatmentList() {
|
||||
loading.value = true;
|
||||
getDiseaseTreatmentInit().then(({ data }) => {
|
||||
loading.value = false;
|
||||
|
||||
//分类目录初始化获取
|
||||
catagoryDicts.value = data.diagnosisCategoryOptions.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
@@ -431,6 +381,7 @@ function getDiseaseTreatmentList() {
|
||||
}
|
||||
// 诊疗目录分类查询下拉树结d构
|
||||
function getImplDepartList() {
|
||||
loading.value = true;
|
||||
getImplementDepartmentList().then((res) => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
@@ -450,8 +401,10 @@ function getImplDepartList() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取左侧执行科室配置目录
|
||||
getDiseaseTreatmentList();
|
||||
onMounted(() => {
|
||||
getAllImplementDepartment();
|
||||
getDiseaseTreatmentList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
@@ -463,15 +416,4 @@ getDiseaseTreatmentList();
|
||||
.error-border {
|
||||
border: 1px solid red;
|
||||
}
|
||||
/* ::v-deep.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{ */
|
||||
/* background-color: #c5e1ff!important; */
|
||||
/* #d8ebff!important; */
|
||||
/* #c5e1ff!important; */
|
||||
/* #9fceff!important; */
|
||||
/* } */
|
||||
/* ::v-deep.el-tree--highlight-current{ */
|
||||
/* background-color:#f8f8f9 !important; */
|
||||
/* #ebf5ff!important; */
|
||||
/* } */
|
||||
|
||||
</style>
|
||||
@@ -48,7 +48,7 @@ const currentSelectRow = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 100,
|
||||
pageNum: 1,
|
||||
adviceTypes: '2,3',
|
||||
adviceTypes: '1,2,3',
|
||||
});
|
||||
const adviceBaseList = ref([]);
|
||||
// 节流函数
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,59 +35,27 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
>添加</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
<el-button type="danger" plain icon="Remove" :disabled="multiple" @click="handleClose"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
<el-button type="success" plain icon="CirclePlus" :disabled="multiple" @click="handleStart"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
>清空条件</el-button
|
||||
>
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">清空条件</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="supplierList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="编号" align="center" key="busNo" prop="busNo" />
|
||||
<el-table-column
|
||||
@@ -111,26 +79,9 @@
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="地址"
|
||||
align="center"
|
||||
key="address"
|
||||
prop="address"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系人电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系人邮箱"
|
||||
align="center"
|
||||
key="email"
|
||||
prop="email"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column label="地址" align="center" key="address" prop="address" width="120" />
|
||||
<el-table-column label="联系人电话" align="center" key="phone" prop="phone" />
|
||||
<el-table-column label="联系人邮箱" align="center" key="email" prop="email" width="160" />
|
||||
<el-table-column
|
||||
label="活动标识"
|
||||
align="center"
|
||||
@@ -152,20 +103,10 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -179,28 +120,16 @@
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="supplierRef"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form :model="form" :rules="rules" ref="supplierRef" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入名称"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.id != undefined">
|
||||
<el-form-item label="编码" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
disabled
|
||||
/>
|
||||
<el-input v-model="form.busNo" placeholder="请输入编码" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -261,17 +190,17 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-form-item label="机构编号" prop="orgId"> -->
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -297,14 +226,11 @@ import {
|
||||
startSupplier,
|
||||
getSupplierInit,
|
||||
deptTreeSelect,
|
||||
} from "./components/supplier";
|
||||
} from './components/supplier';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict('sys_normal_disable', 'sys_user_sex');
|
||||
|
||||
const supplierList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -314,7 +240,7 @@ const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const title = ref('');
|
||||
const supplierTypeOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
// 是否停用
|
||||
@@ -334,8 +260,10 @@ const data = reactive({
|
||||
// sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
typeEnum: [{ required: true, message: "类型不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
typeEnum: [{ required: true, message: '类型不能为空', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '提供部门不能为空', trigger: 'blur' }],
|
||||
|
||||
// address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
// phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }],
|
||||
// email: [{ required: true, message: "联系人邮箱不能为空", trigger: "blur" },
|
||||
@@ -347,30 +275,30 @@ const data = reactive({
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 验证邮箱地址是否有效*/
|
||||
function validateEmail (rule, value, callback) {
|
||||
function validateEmail(rule, value, callback) {
|
||||
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
if (!emailRegex.test(value)) {
|
||||
callback(new Error('请输入有效的邮箱地址'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** 厂商种类查询下拉树结构 */
|
||||
function getsupplierTypeList() {
|
||||
getSupplierInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
console.log(response, 'response');
|
||||
supplierTypeOptions.value = response.data.supplierTypeOptions;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
console.log('查询部门下拉树结构');
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
console.log(deptOptions.value, '部门下拉树结构');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -378,14 +306,14 @@ function getDeptTree() {
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
console.log(queryParams.value, 'queryParams.value');
|
||||
getSupplierList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res", res.data.records);
|
||||
console.log(res, 'res', res.data.records);
|
||||
supplierList.value = res.data.records;
|
||||
console.log(supplierList.value, "supplierList.value");
|
||||
console.log(supplierList.value, 'supplierList.value');
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, "total.value");
|
||||
console.log(total.value, 'total.value');
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -403,13 +331,13 @@ function handleQuery() {
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startSupplier(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -417,13 +345,13 @@ function handleStart(row) {
|
||||
function handleClose(row) {
|
||||
const stopIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopSupplier(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -435,13 +363,13 @@ function handleClear() {
|
||||
// queryParams.value.sourceEnum = undefined;
|
||||
// queryParams.value.busNo = undefined;
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
console.log(selection, 'selection');
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
@@ -457,7 +385,7 @@ function reset() {
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("supplierRef");
|
||||
proxy.resetForm('supplierRef');
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
@@ -468,34 +396,34 @@ function cancel() {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
title.value = '新增';
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
console.log(row, 'row');
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.activeFlag == 1 ? (form.value.activeFlag = true) : (form.value.activeFlag = false); //是否为活性
|
||||
// console.log(form.value.ty, "form.value");
|
||||
open.value = true;
|
||||
title.value = "厂商/产地编辑";
|
||||
title.value = '厂商/产地编辑';
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["supplierRef"].validate((valid) => {
|
||||
proxy.$refs['supplierRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.activeFlag == true ? (form.value.activeFlag = 1) : (form.value.activeFlag = 0); //是否为活性
|
||||
console.log(form.value, "*****************");
|
||||
console.log(form.value, '*****************');
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, "editSupplier");
|
||||
console.log(form.value, 'editSupplier');
|
||||
editSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -507,10 +435,10 @@ function submitForm() {
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = "查看";
|
||||
title.value = '查看';
|
||||
open.value = true;
|
||||
getSupplierOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
console.log(response, 'responsebbbb', row.id);
|
||||
form.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -523,4 +451,4 @@ getDeptTree();
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -753,6 +753,7 @@ const transformFormData = (form) => {
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
practitionerId,
|
||||
@@ -769,6 +770,7 @@ const transformFormData = (form) => {
|
||||
// locationId,
|
||||
name,
|
||||
contact,
|
||||
ybNo,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
@@ -782,6 +784,7 @@ const transformFormData = (form) => {
|
||||
description,
|
||||
typeCode: cwTypeCode,
|
||||
ybType,
|
||||
ybNo,
|
||||
price,
|
||||
},
|
||||
};
|
||||
@@ -807,6 +810,7 @@ const transformFormEditData = (form) => {
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
practitionerId,
|
||||
@@ -823,6 +827,7 @@ const transformFormEditData = (form) => {
|
||||
// locationId,
|
||||
name,
|
||||
contact,
|
||||
ybNo,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
|
||||
@@ -1,40 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询器材目录列表
|
||||
export function getDeviceList(query) {
|
||||
console.log(query,'aaaaa')
|
||||
return request({
|
||||
export function getDeviceList (query) {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询器材目录详细
|
||||
export function getDeviceOne(id) {
|
||||
return request({
|
||||
export function getDeviceOne (id) {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
params: {id}, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
// 校验器材是否可以编辑
|
||||
export function validateEditDevice (deviceId) {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/validate-edit',
|
||||
method: 'get',
|
||||
params: {deviceId}, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
|
||||
// 新增器材目录
|
||||
export function addDevice(data) {
|
||||
return request({
|
||||
export function addDevice (data) {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改器材目录
|
||||
export function editDevice(data) {
|
||||
return request({
|
||||
export function editDevice (data) {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// // 删除器材目录
|
||||
@@ -46,56 +53,56 @@ export function editDevice(data) {
|
||||
// }
|
||||
|
||||
// 器材目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInit () {
|
||||
return request ({
|
||||
url: '/data-dictionary/device/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 停用病种目录
|
||||
export function stopDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
export function stopDevice (ids) {
|
||||
console.log (ids);
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 启用病种目录
|
||||
export function startDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
export function startDevice (ids) {
|
||||
console.log (ids);
|
||||
return request ({
|
||||
url: '/data-dictionary/device/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
export function deptTreeSelect (queryParams) {
|
||||
return request ({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
export function locationTreeSelect (queryParams) {
|
||||
return request ({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取医疗服务项目目录
|
||||
export function getYbDeviceList(queryParams) {
|
||||
return request({
|
||||
export function getYbDeviceList (queryParams) {
|
||||
return request ({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8" v-if="form.id != undefined">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input v-model="form.busNo" placeholder="请输入编码" disabled />
|
||||
<el-input v-model="form.busNo" clearable placeholder="请输入编码" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入器材名称" />
|
||||
<el-input v-model="form.name" clearable placeholder="请输入器材名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -35,10 +35,10 @@
|
||||
<el-tree-select
|
||||
v-model="form.categoryCode"
|
||||
:data="deviceCategories"
|
||||
filterable
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
:disabled="false"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
@@ -48,7 +48,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材种类" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择" clearable>
|
||||
<el-select v-model="form.typeCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="dict in device_type_code"
|
||||
:key="dict.value"
|
||||
@@ -68,6 +68,7 @@
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
filterable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -81,6 +82,7 @@
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
filterable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -90,9 +92,10 @@
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select
|
||||
v-model="form.unitCode"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleUnitCodeChange"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
@@ -105,7 +108,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择" clearable>
|
||||
<el-select v-model="form.salesUnitCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
@@ -117,7 +120,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择" clearable>
|
||||
<el-select
|
||||
v-model="form.minUnitCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
@@ -131,95 +139,70 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装规格" prop="size">
|
||||
<el-input v-model="form.size" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.size"
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input-number v-model="form.partPercent" controls-position="right" placeholder="" :min="1"/>
|
||||
<el-input-number
|
||||
v-model="form.partPercent"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品型号" prop="modelNumber">
|
||||
<el-input v-model="form.modelNumber" placeholder="" />
|
||||
<el-input v-model="form.modelNumber" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号" prop="approvalNumber">
|
||||
<el-input v-model="form.approvalNumber" placeholder="" />
|
||||
<el-input v-model="form.approvalNumber" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
<el-input v-model="form.ybNo" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医药机构目录编码" prop="ybOrgNo" label-width="125px">
|
||||
<el-input v-model="form.ybOrgNo" placeholder="" />
|
||||
<el-input v-model="form.ybOrgNo" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主要成分" prop="substanceText">
|
||||
<el-input v-model="form.substanceText" placeholder="" />
|
||||
<el-input v-model="form.substanceText" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="警戒线最低值(常规单位)" prop="itemMinQuantity" label-width="180px">
|
||||
<el-input-number
|
||||
v-model="form.itemMinQuantity"
|
||||
placeholder=""
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
/>
|
||||
<el-input-number v-model="form.itemMinQuantity" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="警戒线最高值(常规单位)" prop="itemMaxQuantity" label-width="180px">
|
||||
<el-input-number
|
||||
v-model="form.itemMaxQuantity"
|
||||
placeholder=""
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
/>
|
||||
<el-input-number v-model="form.itemMaxQuantity" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="器材版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="form.statusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="manufacturerText">
|
||||
<el-input v-model="form.manufacturerText" placeholder="" />
|
||||
<el-input v-model="form.manufacturerText" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="supplyId">
|
||||
<el-select v-model="form.supplyId" placeholder="" clearable style="width: 150px">
|
||||
<el-select v-model="form.supplyId" filterable clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
@@ -255,7 +238,12 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select v-model="form.itemTypeCode" clearable>
|
||||
<el-select
|
||||
v-model="form.itemTypeCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -271,7 +259,9 @@
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -284,7 +274,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="适用范围" prop="jurisdiction">
|
||||
<el-input v-model="form.jurisdiction" placeholder="" />
|
||||
<el-input v-model="form.jurisdiction" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -293,20 +283,23 @@
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input
|
||||
v-model="form.purchasePrice"
|
||||
placeholder=""
|
||||
:disabled="false"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
@input="updatePrices"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input v-model="form.retailPrice" placeholder="" :disabled="false" />
|
||||
<el-input
|
||||
v-model="form.retailPrice"
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" :disabled="false" />
|
||||
<el-input v-model="form.maximumRetailPrice" clearable :disabled="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -317,7 +310,9 @@
|
||||
v-model="form.chrgitmLv"
|
||||
placeholder="医保等级"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in chrgitm_lv"
|
||||
@@ -336,7 +331,7 @@
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -376,52 +371,27 @@ const supplierListOptions = ref([]); // 供应商列表
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
// pyStr: [{ required: true, message: "拼音不能为空", trigger: "blur" }],
|
||||
// wbStr: [{ required: true, message: "五笔拼音不能为空", trigger: "blur" }],
|
||||
categoryCode: [{ required: true, message: '器材分类不能为空', trigger: 'blur' }],
|
||||
//typeCode: [{ required: true, message: '器材种类不能为空', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '包装单位不能为空', trigger: 'blur' }],
|
||||
size: [{ required: true, message: '包装规格不能为空', trigger: 'blur' }],
|
||||
partPercent: [{ required: true, message: '拆零比不能为空', trigger: 'blur' }],
|
||||
minUnitCode: [{ required: true, message: '最小使用单位不能为空', trigger: 'blur' }],
|
||||
// modelNumber: [{ required: true, message: '产品型号不能为空', trigger: 'blur' }],
|
||||
// hvcmFlag: [
|
||||
// { required: true, message: "高值器材标志不能为空", trigger: "blur" },
|
||||
// ],
|
||||
itemMinQuantity: [{ required: true, message: '警戒线最低值不能为空', trigger: 'blur' }],
|
||||
itemMaxQuantity: [{ required: true, message: '警戒线最高值不能为空', trigger: 'blur' }],
|
||||
salesUnitCode: [{ required: true, message: '销售单位不能为空', trigger: 'blur' }],
|
||||
//approvalNumber: [{ required: true, message: '批准文号不能为空', trigger: 'blur' }],
|
||||
// ybFlag: [{ required: true, message: "医保标记不能为空", trigger: "blur" }],
|
||||
// // ybNo: [{ required: true, message: "医保编码不能为空", trigger: "blur" }],
|
||||
// ybMatchFlag: [
|
||||
// { required: true, message: "医保对码标记不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
manufacturerId: [{ required: true, message: '生产厂家不能为空', trigger: 'blur' }],
|
||||
// supplyId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||
// description: [{ required: true, message: "说明不能为空", trigger: "blur" }],
|
||||
//jurisdiction: [{ required: true, message: '适用范围不能为空', trigger: 'blur' }],
|
||||
ruleId: [{ required: true, message: '执行科室不能为空', trigger: 'blur' }],
|
||||
// version: [{ required: true, message: "器材版本不能为空", trigger: "blur" }],
|
||||
// substanceText: [{ required: true, message: "主要成分不能为空", trigger: "blur" }],
|
||||
// allergenFlag: [
|
||||
// { required: true, message: "过敏标记不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// orgId: [{ required: true, message: '提供部门不能为空', trigger: 'blur' }],
|
||||
locationId: [{ required: true, message: '地点不能为空', trigger: 'blur' }],
|
||||
purchasePrice: [{ required: true, message: '购入价不能为空', trigger: 'blur' }],
|
||||
retailPrice: [{ required: true, message: '零售价不能为空', trigger: 'blur' }],
|
||||
//maximumRetailPrice: [{ required: true, message: '最高零售价不能为空', trigger: 'blur' }],
|
||||
ybType: [{ required: true, message: '医保类型不能为空', trigger: 'blur' }],
|
||||
chrgitmLv: [{ required: true, message: '医保等级不能为空', trigger: 'blur' }],
|
||||
itemTypeCode: [{ required: true, message: '财务类型不能为空', trigger: 'blur' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
@@ -465,8 +435,8 @@ function show() {
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
form.value.partPercent = 1;
|
||||
form.value.itemTypeCode = '2005';
|
||||
form.value.ybType = '8';
|
||||
console.log(props, '22222', title.value, props.deviceCategories);
|
||||
form.value.ybType = '08';
|
||||
form.value.size = '-';
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
@@ -476,21 +446,16 @@ function setValue(row) {
|
||||
form.value = {
|
||||
name: formatValue(row.consumableName), //医疗服务项目名称
|
||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||
// modelNumber: formatValue(row.productModel), // 产品型号
|
||||
modelNumber: formatValue(row.specification), // 规格
|
||||
manufacturerText: formatValue(row.manufacturerName), // 厂家名称
|
||||
partPercent: 1,
|
||||
itemMinQuantity: formatValue(row.itemMinQuantity), // 警戒线最低值
|
||||
itemMaxQuantity: formatValue(row.itemMaxQuantity), // 警戒线最高值
|
||||
// chrgitmLv: formatValue(
|
||||
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||
// ), // 医保等级
|
||||
};
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
@@ -538,13 +503,11 @@ function reset() {
|
||||
ybNo: undefined, // 医保编码
|
||||
ybOrgNo: undefined, //医药机构目录编码
|
||||
ybMatchFlag: undefined, // 医保对码标记
|
||||
// statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
manufacturerId: undefined, // 厂家编码
|
||||
supplyId: undefined, // 供应商编码
|
||||
description: undefined, // 说明
|
||||
jurisdiction: undefined, // 适用范围
|
||||
ruleId: undefined, // 执行科室
|
||||
// version: undefined, // 器材版本
|
||||
substanceText: undefined, // 主要成分
|
||||
allergenFlag: undefined, // 过敏标记
|
||||
orgId: undefined, // 科室ID
|
||||
@@ -567,7 +530,6 @@ function submitForm() {
|
||||
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
|
||||
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
|
||||
form.value.allergenFlag ? (form.value.allergenFlag = 1) : (form.value.allergenFlag = 0);
|
||||
console.log(form.value, 'form.value');
|
||||
if (form.value.id != undefined) {
|
||||
editDevice(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
|
||||
@@ -5,49 +5,81 @@
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">器材目录</div>
|
||||
<div class="head-container">
|
||||
<el-tree :data="deviceCategories" :props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false" :filter-node-method="filterNode" ref="treeRef" node-key="id" highlight-current
|
||||
default-expand-all @node-click="handleNodeClick" />
|
||||
<el-tree
|
||||
:data="deviceCategories"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--器材目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="6"> -->
|
||||
<el-form-item label="项目名" prop="searchKey" label-width="55">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="品名/商品名/英文品名/编码/拼音" clearable style="width: 220px"
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="状态" prop="statusEnum" label-width="50">
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option v-for="status in statusFlagOptions" :key="status.value" :label="status.info"
|
||||
:value="status.value" />
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="医保是否对码" prop="ybMatchFlag" label-width="100">
|
||||
<el-select v-model="queryParams.ybMatchFlag" placeholder="" clearable>
|
||||
<el-option v-for="item in statusYBWeatherOptions" :key="item.value" :label="item.info"
|
||||
:value="item.value" />
|
||||
<el-option
|
||||
v-for="item in statusYBWeatherOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddDevice">添加新项目</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddDevice"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Remove" :disabled="multiple" @click="handleClose">停用</el-button>
|
||||
<el-button type="danger" plain icon="Remove" :disabled="multiple" @click="handleClose"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="CirclePlus" :disabled="multiple" @click="handleStart">启用</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
@@ -66,50 +98,170 @@
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
: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="编码" align="center" key="busNo" prop="busNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="器材名称" align="center" key="name" prop="name" :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="categoryCode_dictText" prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="器材种类" align="center" key="typeCode_dictText" prop="typeCode_dictText"
|
||||
:show-overflow-tooltip="true" width="50" />
|
||||
<el-table-column label="包装单位" align="center" key="unitCode_dictText" prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="包装规格" align="center" key="size" prop="size" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="拆零比" align="center" key="partPercent" prop="partPercent"
|
||||
:show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="拼音"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="器材分类"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="器材种类"
|
||||
align="center"
|
||||
key="typeCode_dictText"
|
||||
prop="typeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="50"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
: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"
|
||||
key="partPercent"
|
||||
prop="partPercent"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.partPercent !== null && scope.row.partPercent !== undefined ? scope.row.partPercent : 1 }}
|
||||
{{
|
||||
scope.row.partPercent !== null && scope.row.partPercent !== undefined
|
||||
? scope.row.partPercent
|
||||
: 1
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="最小使用单位" align="center" key="minUnitCode_dictText" prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属科室" align="center" key="orgId_dictText" prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="所在位置" align="center" key="locationId_dictText" prop="locationId_dictText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="产品型号" align="center" key="modelNumber" prop="modelNumber"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="高值器材标志" align="center" key="hvcmFlag_enumText" prop="hvcmFlag_enumText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="最小使用单位"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="所属科室"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所在位置"
|
||||
align="center"
|
||||
key="locationId_dictText"
|
||||
prop="locationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="产品型号"
|
||||
align="center"
|
||||
key="modelNumber"
|
||||
prop="modelNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
|
||||
<el-table-column label="销售单位" align="center" key="salesUnitCode_dictText" prop="salesUnitCode_dictText"
|
||||
:show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="批准文号" align="center" key="approvalNumber" prop="approvalNumber"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="医保标记" align="center" key="ybFlag_enumText" prop="ybFlag_enumText"
|
||||
:show-overflow-tooltip="true" width="110" />
|
||||
<el-table-column label="医保编码" align="center" key="ybNo" prop="ybNo" :show-overflow-tooltip="true"
|
||||
width="110" />
|
||||
<el-table-column label="医药机构目录编码" align="center" key="ybOrgNo" prop="ybOrgNo" :show-overflow-tooltip="true"
|
||||
width="130" />
|
||||
<el-table-column label="医保对码标记" align="center" key="ybMatchFlag_enumText" prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true" width="105" />
|
||||
<el-table-column label="状态" align="center" key="statusEnum_enumText" prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true" width="90" />
|
||||
<el-table-column
|
||||
label="销售单位"
|
||||
align="center"
|
||||
key="salesUnitCode_dictText"
|
||||
prop="salesUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="批准文号"
|
||||
align="center"
|
||||
key="approvalNumber"
|
||||
prop="approvalNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
key="ybFlag_enumText"
|
||||
prop="ybFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医药机构目录编码"
|
||||
align="center"
|
||||
key="ybOrgNo"
|
||||
prop="ybOrgNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="130"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="医保对码标记"
|
||||
align="center"
|
||||
key="ybMatchFlag_enumText"
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="105"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
@@ -118,59 +270,165 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" key="manufacturerText" prop="manufacturerText"
|
||||
:show-overflow-tooltip="true" width="90" />
|
||||
<el-table-column label="供应商" align="center" key="supplyId_dictText" prop="supplyId_dictText"
|
||||
:show-overflow-tooltip="true" width="110" />
|
||||
<el-table-column label="说明" align="center" key="description" prop="description"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="适用范围" align="center" key="jurisdiction" prop="jurisdiction"
|
||||
:show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="器材版本" align="center" key="version" prop="version" :show-overflow-tooltip="true"
|
||||
width="120" />
|
||||
<el-table-column label="主要成分" align="center" key="substanceText" prop="substanceText"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="过敏标记" align="center" key="allergenFlag_enumText" prop="allergenFlag_enumText"
|
||||
:show-overflow-tooltip="true" width="90" />
|
||||
<el-table-column label="售价" align="center" key="retailPrice" prop="retailPrice" :show-overflow-tooltip="true"
|
||||
width="90" />
|
||||
<el-table-column label="财务类别" align="center" key="itemTypeCode_dictText" prop="itemTypeCode_dictText"
|
||||
:show-overflow-tooltip="true" width="90" />
|
||||
<el-table-column label="医保类别" align="center" key="ybType_dictText" prop="ybType_dictText"
|
||||
:show-overflow-tooltip="true" width="90" />
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
|
||||
<el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplyId_dictText"
|
||||
prop="supplyId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="说明"
|
||||
align="center"
|
||||
key="description"
|
||||
prop="description"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="适用范围"
|
||||
align="center"
|
||||
key="jurisdiction"
|
||||
prop="jurisdiction"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材版本"
|
||||
align="center"
|
||||
key="version"
|
||||
prop="version"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="主要成分"
|
||||
align="center"
|
||||
key="substanceText"
|
||||
prop="substanceText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="过敏标记"
|
||||
align="center"
|
||||
key="allergenFlag_enumText"
|
||||
prop="allergenFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="财务类别"
|
||||
align="center"
|
||||
key="itemTypeCode_dictText"
|
||||
prop="itemTypeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="高值器材标志"
|
||||
align="center"
|
||||
key="hvcmFlag_enumText"
|
||||
prop="hvcmFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="医保类别"
|
||||
align="center"
|
||||
key="ybType_dictText"
|
||||
prop="ybType_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="openEditDevice(scope.row)">编辑</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="openEditDevice(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<device-dialog ref="deviceRef" :title="title" :item="currentData" :currentCategoryEnum="currentCategoryEnum"
|
||||
:deviceCategories="deviceCategorieList" :statusFlagOptions="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions" @submit="getList()" @ybDialog="() => {
|
||||
proxy.$refs['deviceYbRef'].show()
|
||||
}" />
|
||||
<DeviceYbDialog ref="deviceYbRef" @selectDevice="
|
||||
(row) => {
|
||||
proxy.$refs['deviceRef'].setValue(row);
|
||||
}
|
||||
" />
|
||||
<device-dialog
|
||||
ref="deviceRef"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
:deviceCategories="deviceCategorieList"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
@submit="getList()"
|
||||
@ybDialog="
|
||||
() => {
|
||||
proxy.$refs['deviceYbRef'].show();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<DeviceYbDialog
|
||||
ref="deviceYbRef"
|
||||
@selectDevice="
|
||||
(row) => {
|
||||
proxy.$refs['deviceRef'].setValue(row);
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 器材目录导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate">下载模板</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
@@ -185,17 +443,18 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Device">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getToken } from '@/utils/auth';
|
||||
import {
|
||||
getDeviceList,
|
||||
stopDevice,
|
||||
startDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
} from "./components/device";
|
||||
import deviceDialog from "./components/deviceDialog";
|
||||
import DeviceYbDialog from "./components/deviceYbDialog";
|
||||
import { nextTick } from "vue";
|
||||
validateEditDevice,
|
||||
} from './components/device';
|
||||
import deviceDialog from './components/deviceDialog';
|
||||
import DeviceYbDialog from './components/deviceYbDialog';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -206,7 +465,7 @@ const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const title = ref('');
|
||||
const deviceCategories = ref(undefined);
|
||||
const deviceCategorieList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
@@ -216,22 +475,22 @@ const supplierListOptions = ref(undefined);
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看器材数据
|
||||
const viewData = ref({});
|
||||
const currentCategoryEnum = ref("");
|
||||
const currentCategoryEnum = ref('');
|
||||
|
||||
/*** 器材目录导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/data-dictionary/device/import-data"
|
||||
url: import.meta.env.VITE_APP_BASE_API + '/data-dictionary/device/import-data',
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
@@ -260,15 +519,15 @@ const filterNode = (value, data) => {
|
||||
/** 器材目录分类查询下拉树结构 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, "response器材目录分类查询下拉树结构");
|
||||
deviceCategories.value = JSON.parse(JSON.stringify(response.data.deviceCategories)).sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
deviceCategories.value.push({ info: "全部", value: "" });
|
||||
deviceCategories.value = JSON.parse(JSON.stringify(response.data.deviceCategories)).sort(
|
||||
(a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
}
|
||||
);
|
||||
deviceCategories.value.push({ info: '全部', value: '' });
|
||||
deviceCategorieList.value = response.data.deviceCategories.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
console.log(deviceCategorieList.value, "deviceCategorieList");
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
statusYBWeatherOptions.value = response.data.statusYBWeatherOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
@@ -281,7 +540,6 @@ function getList() {
|
||||
loading.value = false;
|
||||
deviceList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(deviceList.value, "getList", total.value);
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -301,34 +559,34 @@ function handleStart() {
|
||||
const stardIds = ids.value;
|
||||
// selectedData
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startDevice(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopDevice(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"system/user/export",
|
||||
'system/user/export',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
@@ -343,7 +601,11 @@ function handleImport() {
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/data-dictionary/device/import-template', {}, `device_template_${new Date().getTime()}.xlsx`);
|
||||
proxy.download(
|
||||
'/data-dictionary/device/import-template',
|
||||
{},
|
||||
`device_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
@@ -356,8 +618,8 @@ const handleFileSuccess = (response, file, fileList) => {
|
||||
proxy.$refs['uploadRef'].handleRemove(file);
|
||||
proxy.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
@@ -370,7 +632,6 @@ function submitFileForm() {
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
@@ -379,22 +640,29 @@ function handleSelectionChange(selection) {
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDevice() {
|
||||
// if (!currentCategoryEnum.value) {
|
||||
// return proxy.$modal.msgError("请选择器材目录分类");
|
||||
// }
|
||||
console.log("打开新增弹窗");
|
||||
title.value = "新增";
|
||||
title.value = '新增';
|
||||
nextTick(() => {
|
||||
proxy.$refs.deviceRef.show();
|
||||
});
|
||||
}
|
||||
const isEditInfoDisable = ref(0);
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDevice(row) {
|
||||
currentData.value = {};
|
||||
console.log("打开编辑弹窗");
|
||||
validateEditDevice(row.id).then((res) => {
|
||||
// res.data == 1 医生开过该耗材,不可编辑
|
||||
// res.data == 2 该耗材已经入库过,不可编辑
|
||||
isEditInfoDisable.value = res.data;
|
||||
getDeviceInfo(row);
|
||||
});
|
||||
}
|
||||
// 根据耗材id 查询耗材信息
|
||||
function getDeviceInfo(row) {
|
||||
getDeviceOne(row.id).then((response) => {
|
||||
console.log(response, "currentDataform");
|
||||
currentData.value = response.data;
|
||||
currentData.value = {
|
||||
...response.data,
|
||||
// 禁用编辑
|
||||
isEditInfoDisable: isEditInfoDisable.value,
|
||||
};
|
||||
if (currentData.value) {
|
||||
currentData.value.hvcmFlag == 1
|
||||
? (currentData.value.hvcmFlag = true)
|
||||
@@ -409,9 +677,9 @@ function openEditDevice(row) {
|
||||
? (currentData.value.allergenFlag = true)
|
||||
: (currentData.value.allergenFlag = false);
|
||||
}
|
||||
title.value = "编辑";
|
||||
title.value = '编辑';
|
||||
nextTick(() => {
|
||||
proxy.$refs["deviceRef"].edit();
|
||||
proxy.$refs['deviceRef'].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -74,7 +74,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目录分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" clearable filterable :disabled="false">
|
||||
<el-select
|
||||
v-model="form.categoryCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in activity_category_code"
|
||||
:key="category.value"
|
||||
@@ -96,18 +101,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-select v-model="form.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
@@ -136,6 +129,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -164,7 +158,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所需标本" prop="specimenCode">
|
||||
<el-select v-model="form.specimenCode" clearable filterable>
|
||||
@@ -181,7 +175,13 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select v-model="form.chrgitmLv" placeholder="" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.chrgitmLv"
|
||||
placeholder=""
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in chrgitm_lv"
|
||||
:key="item.value"
|
||||
@@ -191,18 +191,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="执行科室" prop="ruleId">
|
||||
<el-select v-model="form.ruleId" placeholder="" clearable>
|
||||
<el-option
|
||||
v-for="item in exeOrganizations"
|
||||
: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="permittedUnitCode">
|
||||
<el-select v-model="form.permittedUnitCode" clearable filterable>
|
||||
@@ -217,7 +206,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select v-model="form.itemTypeCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.itemTypeCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -229,22 +223,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input
|
||||
v-model="form.purchasePrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input
|
||||
v-model="form.retailPrice"
|
||||
placeholder=""
|
||||
:disabled="false"
|
||||
@input="updatePrices"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -268,14 +253,34 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="诊疗子项">
|
||||
<el-select v-model="item.adviceDefinitionId" placeholder="诊疗子项" filterable>
|
||||
<el-option
|
||||
v-for="item in diagnosisTreatmentList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
<div v-if="form.isEditInfoDisable === 0" style="position: relative">
|
||||
<PopoverList @search="handleSearch" :width="1000" :modelValue="item.name">
|
||||
<template #popover-content="{}">
|
||||
<medicineList
|
||||
@selectRow="(row) => selectRow(row, index)"
|
||||
:searchKey="medicineSearchKey"
|
||||
:shouldLoadData="isFirstOpen"
|
||||
:preloadedData="diagnosisTreatmentList"
|
||||
/>
|
||||
</template>
|
||||
</PopoverList>
|
||||
<!-- 清空按钮 -->
|
||||
<el-button
|
||||
v-if="item.name && item.name !== ''"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
size="small"
|
||||
@click.stop="clearItem(index)"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #909399;
|
||||
"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<span v-else>{{ item.name || '' }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -285,11 +290,22 @@
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:max="999"
|
||||
@change="calculateTotalPrice"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex; align-items: center; padding-bottom: 15px">
|
||||
<el-button @click="addItem" circle type="priamry" size="small" plain icon="Plus" />
|
||||
<!-- <div style="margin-right: 20px; font-weight: bold; color: #333">
|
||||
小计: ¥{{
|
||||
item.retailPrice && item.childrenRequestNum
|
||||
? (parseFloat(item.retailPrice) * parseInt(item.childrenRequestNum)).toFixed(
|
||||
2
|
||||
)
|
||||
: '0.00'
|
||||
}}
|
||||
</div> -->
|
||||
<el-button @click="addItem" circle type="primary" size="small" plain icon="Plus" />
|
||||
<el-button
|
||||
@click="removeItem(index)"
|
||||
circle
|
||||
@@ -313,6 +329,11 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex; align-items: center; justify-content: flex-start">
|
||||
<div style="font-size: 18px; font-weight: bold; color: #276ef1">
|
||||
总价: ¥{{ totalPrice }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
@@ -334,7 +355,10 @@ import {
|
||||
bodyTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from './diagnosistreatment';
|
||||
|
||||
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
||||
import medicineList from './medicineList.vue';
|
||||
import MedicineList from '../components/medicineList.vue';
|
||||
import { getCurrentInstance, nextTick, watch } from 'vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { unit_code, med_chrgitm_type, fin_type_code, activity_category_code, chrgitm_lv } =
|
||||
proxy.useDict(
|
||||
@@ -348,7 +372,6 @@ const { unit_code, med_chrgitm_type, fin_type_code, activity_category_code, chrg
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const categoryCode = ref('');
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const bodyOptions = ref(undefined); // 身体部位树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
@@ -363,26 +386,16 @@ const data = reactive({
|
||||
rules: {
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
||||
// typeEnum: [{ required: true, message: '器材种类不能为空', trigger: 'blur' }],
|
||||
permittedUnitCode: [{ required: true, message: '使用单位不能为空', trigger: 'blur' }],
|
||||
// ybFlag: [{ required: true, message: "医保标记不能为空", trigger: "blur" }],
|
||||
// ybMatchFlag: [
|
||||
// { required: true, message: "医保对码标记不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// purchasePrice: [
|
||||
// { required: true, message: "购入价不能为空", trigger: "blur" },
|
||||
// ],
|
||||
retailPrice: [{ required: true, message: '零售价不能为空', trigger: 'blur' }],
|
||||
// maximumRetailPrice: [{ required: true, message: '最高零售价不能为空', trigger: 'blur' }],
|
||||
ybType: [{ required: true, message: '医保类型不能为空', trigger: 'blur' }],
|
||||
chrgitmLv: [{ required: true, message: '医保等级不能为空', trigger: 'blur' }],
|
||||
itemTypeCode: [{ required: true, message: '财务类型不能为空', trigger: 'blur' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
@@ -416,17 +429,45 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
// 表单数组,初始一条记录
|
||||
const treatmentItems = ref([{ adviceDefinitionId: '', childrenRequestNum: 1 }]);
|
||||
const treatmentItems = ref([
|
||||
{ adviceDefinitionId: '', childrenRequestNum: 1, name: '', retailPrice: 0 },
|
||||
]);
|
||||
const medicineSearchKey = ref('');
|
||||
const isFirstOpen = ref(true); // 标记是否首次打开弹窗
|
||||
const totalPrice = ref('0.00'); // 总价
|
||||
|
||||
// 计算总价
|
||||
function calculateTotalPrice() {
|
||||
try {
|
||||
let sum = 0;
|
||||
treatmentItems.value.forEach((item) => {
|
||||
if (item.adviceDefinitionId && item.retailPrice && item.childrenRequestNum) {
|
||||
const price = parseFloat(item.retailPrice) || 0;
|
||||
const count = parseInt(item.childrenRequestNum) || 0;
|
||||
sum += price * count;
|
||||
}
|
||||
});
|
||||
totalPrice.value = sum.toFixed(2);
|
||||
} catch (error) {
|
||||
totalPrice.value = '0.00';
|
||||
proxy.$modal.msgWarning('价格计算过程中遇到错误,请检查输入数据');
|
||||
}
|
||||
}
|
||||
|
||||
// 添加表单项
|
||||
function addItem() {
|
||||
treatmentItems.value.push({ adviceDefinitionId: '', childrenRequestNum: 1 });
|
||||
treatmentItems.value.push({ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 });
|
||||
// 使用nextTick确保DOM更新后再计算
|
||||
nextTick(() => {
|
||||
calculateTotalPrice();
|
||||
});
|
||||
}
|
||||
|
||||
// 删除表单项
|
||||
function removeItem(index) {
|
||||
if (treatmentItems.value.length > 1) {
|
||||
treatmentItems.value.splice(index, 1);
|
||||
calculateTotalPrice();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,9 +479,10 @@ function handleImportYb() {
|
||||
function show() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
getItemList();
|
||||
getBodyTree();
|
||||
getDeptTree();
|
||||
getItemList();
|
||||
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
|
||||
@@ -457,9 +499,6 @@ function setValue(row) {
|
||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||
busNo: formatValue(row.medicalCatalogCode), // 项目编码使用医保编码
|
||||
categoryCode: props.currentCategoryEnum,
|
||||
// chrgitmLv: formatValue(
|
||||
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||
// ), // 医保等级
|
||||
};
|
||||
}
|
||||
|
||||
@@ -467,16 +506,24 @@ function setValue(row) {
|
||||
function edit() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
getItemList();
|
||||
getBodyTree();
|
||||
getDeptTree();
|
||||
getItemList();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
||||
treatmentItems.value = props.item.childrenJson
|
||||
? JSON.parse(props.item.childrenJson)
|
||||
: [{ adviceDefinitionId: '', childrenRequestNum: 1 }];
|
||||
|
||||
// 处理子项数据,确保包含retailPrice字段
|
||||
if (props.item.childrenJson) {
|
||||
const parsedItems = JSON.parse(props.item.childrenJson);
|
||||
treatmentItems.value = parsedItems.map((item) => ({
|
||||
...item,
|
||||
retailPrice: item.retailPrice || 0,
|
||||
}));
|
||||
} else {
|
||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 }];
|
||||
}
|
||||
form.value.permittedUnitCode = form.value.permittedUnitCode
|
||||
? form.value.permittedUnitCode.toString()
|
||||
: undefined;
|
||||
@@ -485,6 +532,11 @@ function edit() {
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
visible.value = true;
|
||||
|
||||
// 编辑时计算初始总价
|
||||
nextTick(() => {
|
||||
calculateTotalPrice();
|
||||
});
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -514,7 +566,8 @@ function reset() {
|
||||
descriptionText: undefined, // 说明
|
||||
chrgitmLv: undefined, //医保等级
|
||||
};
|
||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1 }];
|
||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 }];
|
||||
totalPrice.value = '0.00';
|
||||
proxy.resetForm('diagnosisTreatmentRef');
|
||||
}
|
||||
|
||||
@@ -552,51 +605,74 @@ function submitForm() {
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
/** 查询身体部位拉树结构 */
|
||||
function getBodyTree() {
|
||||
bodyTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询身体部位下拉树结构');
|
||||
bodyOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect({ formList: '8,4,10' }).then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取诊疗子项列表,只筛出无子项的数据
|
||||
function getItemList() {
|
||||
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 }).then((response) => {
|
||||
diagnosisTreatmentList.value = response.data.records.filter((item) => {
|
||||
return item.childrenJson == null;
|
||||
});
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 获取诊疗子项列表,只筛出无子项的数据
|
||||
function getItemList() {
|
||||
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
diagnosisTreatmentList.value = res.data.records.filter((item) => {
|
||||
return item.childrenJson == null;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function formatValue(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return undefined;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function handleSearch(value) {
|
||||
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;
|
||||
calculateTotalPrice();
|
||||
}
|
||||
|
||||
// 清空诊疗子项
|
||||
function clearItem(index) {
|
||||
treatmentItems.value[index].name = '';
|
||||
treatmentItems.value[index].adviceDefinitionId = '';
|
||||
treatmentItems.value[index].retailPrice = 0;
|
||||
calculateTotalPrice();
|
||||
}
|
||||
// 在这里可以根据购入价来更新零售价
|
||||
function updatePrices(value) {
|
||||
form.value.maximumRetailPrice = form.value.retailPrice;
|
||||
}
|
||||
|
||||
// 监听treatmentItems变化,实时更新总价
|
||||
watch(
|
||||
() => treatmentItems.value,
|
||||
() => {
|
||||
calculateTotalPrice();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
|
||||
@@ -1,99 +1,106 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
export function getDiagnosisTreatmentList (query) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询诊疗目录详细
|
||||
export function getDiagnosisTreatmentOne(id) {
|
||||
return request({
|
||||
export function getDiagnosisTreatmentOne (id) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one/',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
params: {id}, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
// 查询诊疗目录详细
|
||||
export function validateActivityEdit (activityId) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/validate-edit',
|
||||
method: 'get',
|
||||
params: {activityId}, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
|
||||
// 新增诊疗目录
|
||||
export function addDiagnosisTreatment(data) {
|
||||
return request({
|
||||
export function addDiagnosisTreatment (data) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改诊疗目录
|
||||
export function editDiagnosisTreatment(data) {
|
||||
return request({
|
||||
export function editDiagnosisTreatment (data) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊疗目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInit () {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 停用诊疗目录
|
||||
export function stopDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
export function stopDiseaseTreatment (ids) {
|
||||
console.log (ids);
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 启用诊疗目录
|
||||
export function startDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
export function startDiseaseTreatment (ids) {
|
||||
console.log (ids);
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
export function deptTreeSelect (queryParams) {
|
||||
return request ({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
param: queryParams,
|
||||
});
|
||||
}
|
||||
// 查询身体部位树形数据
|
||||
export function bodyTreeSelect(queryParams) {
|
||||
return request({
|
||||
export function bodyTreeSelect (queryParams) {
|
||||
return request ({
|
||||
url: '/base-data-manage/body-structure/body',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
export function locationTreeSelect (queryParams) {
|
||||
return request ({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取医用耗材目录
|
||||
export function getYbDiagnosisTreatmentList(queryParams) {
|
||||
return request({
|
||||
export function getYbDiagnosisTreatmentList (queryParams) {
|
||||
return request ({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="medicineRef" height="300" :data="filteredList" @cell-click="clickRow">
|
||||
<el-table-column label="项目名称" align="center" prop="name" width="300" />
|
||||
<el-table-column label="零售价" align="center" prop="retailPrice" />
|
||||
<el-table-column label="最高零售价" align="center" prop="maximumRetailPrice" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDiagnosisTreatmentList } from './diagnosistreatment';
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
itemType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
shouldLoadData: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 新增:从父组件接收预加载的数据
|
||||
preloadedData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectRow']);
|
||||
|
||||
const diagnosisTreatmentList = ref([]); // 原始数据列表
|
||||
const filteredList = ref([]); // 过滤后的数据列表
|
||||
const hasLoaded = ref(false); // 标记是否已加载数据
|
||||
|
||||
// 获取诊疗项目列表
|
||||
function getList() {
|
||||
if (hasLoaded.value) return; // 如果已经加载过数据,则不再重复请求
|
||||
|
||||
// 优先使用父组件传递的数据
|
||||
if (props.preloadedData && props.preloadedData.length > 0) {
|
||||
diagnosisTreatmentList.value = props.preloadedData;
|
||||
filterList(); // 初始化过滤
|
||||
hasLoaded.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果父组件没有传递数据或数据为空,则自己请求
|
||||
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 })
|
||||
.then((res) => {
|
||||
diagnosisTreatmentList.value =
|
||||
res.data?.records?.filter((item) => item.childrenJson == null) || [];
|
||||
filterList(); // 初始化过滤
|
||||
hasLoaded.value = true; // 标记为已加载
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('获取诊疗项目数据失败:', err);
|
||||
});
|
||||
}
|
||||
|
||||
// 监听shouldLoadData属性变化,仅在首次为true时加载数据
|
||||
watch(
|
||||
() => props.shouldLoadData,
|
||||
(newValue) => {
|
||||
if (newValue && !hasLoaded.value) {
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 监听preloadedData变化,当父组件数据更新时同步更新列表
|
||||
watch(
|
||||
() => props.preloadedData,
|
||||
(newData) => {
|
||||
if (newData && newData.length > 0) {
|
||||
diagnosisTreatmentList.value = newData;
|
||||
filterList(); // 更新过滤
|
||||
hasLoaded.value = true;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 监听搜索关键词变化,实时过滤数据
|
||||
watch(
|
||||
() => props.searchKey,
|
||||
() => {
|
||||
filterList();
|
||||
}
|
||||
);
|
||||
|
||||
// 根据搜索关键词过滤列表
|
||||
function filterList() {
|
||||
if (!props.searchKey || props.searchKey.trim() === '') {
|
||||
filteredList.value = diagnosisTreatmentList.value;
|
||||
} else {
|
||||
const searchTerm = props.searchKey.toLowerCase().trim();
|
||||
filteredList.value = diagnosisTreatmentList.value.filter(
|
||||
(item) => item.name && item.name.toLowerCase().includes(searchTerm)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectRow', row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -28,7 +28,6 @@
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="项目名" prop="searchKey" label-width="55">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
@@ -38,8 +37,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
|
||||
<el-form-item label="状态" prop="statusEnum" label-width="80">
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
@@ -50,8 +48,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="医保是否对码" prop="ybMatchFlag" label-width="120">
|
||||
<el-select v-model="queryParams.ybMatchFlag" placeholder="" clearable>
|
||||
<el-option
|
||||
@@ -62,24 +58,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="执行科室" prop="ruleId" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.ruleId"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in exeOrganizations"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="4"> -->
|
||||
|
||||
<el-form-item label="类型" prop="typeEnum" label-width="100">
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="" clearable>
|
||||
<el-option
|
||||
@@ -116,9 +95,9 @@
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
@@ -148,7 +127,7 @@
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="150"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
@@ -156,22 +135,9 @@
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拼音"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="五笔码"
|
||||
align="center"
|
||||
key="wbStr"
|
||||
prop="wbStr"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="目录类别"
|
||||
align="center"
|
||||
@@ -180,94 +146,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="业务类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用单位"
|
||||
align="center"
|
||||
key="permittedUnitCode_dictText"
|
||||
prop="permittedUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
key="ybFlag_enumText"
|
||||
prop="ybFlag_enumText"
|
||||
: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_enumText"
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="归属科室"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所在位置"
|
||||
align="center"
|
||||
key="locationId_dictText"
|
||||
prop="locationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身体部位"
|
||||
align="center"
|
||||
key="bodySiteCode_dictText"
|
||||
prop="bodySiteCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所需标本"
|
||||
align="center"
|
||||
key="specimenCode_dictText"
|
||||
prop="specimenCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="财务类别"
|
||||
align="center"
|
||||
key="itemTypeCode_dictText"
|
||||
prop="itemTypeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保类别"
|
||||
align="center"
|
||||
key="ybType_dictText"
|
||||
prop="ybType_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
@@ -277,20 +155,34 @@
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="说明"
|
||||
label="财务类别"
|
||||
align="center"
|
||||
key="descriptionText"
|
||||
prop="descriptionText"
|
||||
key="itemTypeCode_dictText"
|
||||
prop="itemTypeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用单位"
|
||||
align="center"
|
||||
key="permittedUnitCode_dictText"
|
||||
prop="permittedUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="执行科室"
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="ruleId"
|
||||
prop="ruleId"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@@ -345,16 +237,30 @@
|
||||
|
||||
<!-- 诊疗目录导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate">下载模板</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
@@ -369,13 +275,14 @@
|
||||
</template>
|
||||
|
||||
<script setup name="DiagnosisTreatment">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getToken } from '@/utils/auth';
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
stopDiseaseTreatment,
|
||||
startDiseaseTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
validateActivityEdit,
|
||||
} from './components/diagnosistreatment';
|
||||
import diagnosisTreatmentDialog from './components/diagnosisTreatmentDialog';
|
||||
import DiagTreYbDialog from './components/diagTreYbDialog';
|
||||
@@ -407,18 +314,17 @@ const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/data-dictionary/diagnosis-treatment/import-data"
|
||||
url: import.meta.env.VITE_APP_BASE_API + '/data-dictionary/diagnosis-treatment/import-data',
|
||||
});
|
||||
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
@@ -445,7 +351,6 @@ const filterNode = (value, data) => {
|
||||
/** 诊断目录分类查询下拉树结构 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, 'response诊疗目录分类查询下拉树结构');
|
||||
diagnosisCategoryOptions.value = response.data.diagnosisCategoryOptions.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
@@ -458,18 +363,15 @@ function getDiseaseTreatmentList() {
|
||||
}
|
||||
/** 查询诊断目录列表 */
|
||||
function getList() {
|
||||
console.log(queryParams.value, 'queryParams***********************');
|
||||
loading.value = true;
|
||||
getDiagnosisTreatmentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
diagnosisTreatmentList.value = res.data.records;
|
||||
console.log(diagnosisTreatmentList, 'res.data');
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
console.log(data, '节点单击事件');
|
||||
queryParams.value.categoryCode = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
@@ -477,7 +379,6 @@ function handleNodeClick(data) {
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams, 'queryParams搜索');
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -528,7 +429,11 @@ function handleImport() {
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/data-dictionary/diagnosis-treatment/import-template', {}, `diagnosis_treatment_template_${new Date().getTime()}.xlsx`);
|
||||
proxy.download(
|
||||
'/data-dictionary/diagnosis-treatment/import-template',
|
||||
{},
|
||||
`diagnosis_treatment_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
@@ -541,8 +446,8 @@ const handleFileSuccess = (response, file, fileList) => {
|
||||
proxy.$refs['uploadRef'].handleRemove(file);
|
||||
proxy.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
@@ -555,7 +460,6 @@ function submitFileForm() {
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, 'selection');
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
@@ -564,22 +468,28 @@ function handleSelectionChange(selection) {
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDiagnosisTreatment() {
|
||||
// if (currentCategoryEnum.value) {
|
||||
console.log('打开新增弹窗');
|
||||
title.value = '新增';
|
||||
nextTick(() => {
|
||||
proxy.$refs.diagnosisTreatmentRef.show();
|
||||
});
|
||||
// } else {
|
||||
// proxy.$modal.msgError("请先选择目录分类!");
|
||||
// }
|
||||
}
|
||||
const isEditInfoDisable = ref(0);
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDiagnosisTreatment(row) {
|
||||
validateActivityEdit(row.id).then((res) => {
|
||||
// res.data == 1 医生开过该诊疗项目,不可编辑
|
||||
isEditInfoDisable.value = res.data;
|
||||
getDiagnosisTreatmentInfo(row);
|
||||
});
|
||||
}
|
||||
// 根据诊疗id 查询诊疗信息
|
||||
function getDiagnosisTreatmentInfo(row) {
|
||||
getDiagnosisTreatmentOne(row.id).then((response) => {
|
||||
console.log(response, 'response88888');
|
||||
|
||||
currentData.value = response.data;
|
||||
currentData.value = {
|
||||
...response.data,
|
||||
// 禁用编辑
|
||||
isEditInfoDisable: isEditInfoDisable.value,
|
||||
};
|
||||
currentData.value.ybFlag == 1
|
||||
? (currentData.value.ybFlag = true)
|
||||
: (currentData.value.ybFlag = false);
|
||||
|
||||
@@ -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,6 +101,84 @@
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<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
|
||||
<!-- 添加外层滚动容器,确保表格可以水平滚动 -->
|
||||
<div class="table-scroll-container">
|
||||
<!-- 移除style="width: 100%",让Element UI表格根据内容自动调整 -->
|
||||
@@ -211,7 +304,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"
|
||||
|
||||
@@ -18,6 +18,13 @@ export function getMedicationList(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getYbCatalogResult(address,v) {
|
||||
return request({
|
||||
url: '/yb-request/query-catalog?address=1301&v=1',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询药品目录详细
|
||||
export function getMedicationOne(id) {
|
||||
return request({
|
||||
@@ -26,6 +33,14 @@ export function getMedicationOne(id) {
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
// 校验药品是否可以编辑
|
||||
export function validateEditMedictaion(medicationId) {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/validate-edit',
|
||||
method: 'get',
|
||||
params: { medicationId } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增药品目录
|
||||
export function addMedication(data) {
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
clearable
|
||||
@change="handleLvChange"
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in chrgitm_lv"
|
||||
:key="dict.value"
|
||||
@@ -70,7 +72,12 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" clearable>
|
||||
<el-select
|
||||
v-model="form.categoryCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in med_category_code"
|
||||
:key="category.value"
|
||||
@@ -107,17 +114,31 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input v-model="form.totalVolume" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.totalVolume"
|
||||
placeholder=""
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计量换算" prop="totalVolume">
|
||||
<el-input v-model="form.unitConversionRatio" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.unitConversionRatio"
|
||||
placeholder=""
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂量单位" prop="doseUnitCode">
|
||||
<el-select v-model="form.doseUnitCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.doseUnitCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -131,7 +152,12 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂型" prop="doseFormCode">
|
||||
<el-select v-model="form.doseFormCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.doseFormCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in dose_form_code"
|
||||
:key="category.value"
|
||||
@@ -182,6 +208,18 @@
|
||||
<el-input v-model="form.maxUnit" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用法说明" prop="dosageInstruction">
|
||||
<el-select v-model="form.dosageInstruction" clearable filterable>
|
||||
<el-option
|
||||
v-for="category in dosage_instruction"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">库存信息</div>
|
||||
<el-row :gutter="24">
|
||||
@@ -222,7 +260,12 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select v-model="form.unitCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.unitCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -234,7 +277,12 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select v-model="form.minUnitCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.minUnitCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -245,8 +293,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="警戒线最低值(常规单位)" prop="itemMinQuantity" label-width="180px">
|
||||
<el-input-number
|
||||
<el-form-item
|
||||
label="警戒线最低值(常规单位)"
|
||||
prop="itemMinQuantity"
|
||||
label-width="180px"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.itemMinQuantity"
|
||||
placeholder=""
|
||||
controls-position="right"
|
||||
@@ -287,12 +339,23 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input-number v-model="form.partPercent" controls-position="right" placeholder="" :min="1"/>
|
||||
<el-input-number
|
||||
v-model="form.partPercent"
|
||||
controls-position="right"
|
||||
placeholder=""
|
||||
:min="1"
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="警戒线最高值(常规单位)" prop="itemMaxQuantity" label-width="180px">
|
||||
<el-form-item
|
||||
label="警戒线最高值(常规单位)"
|
||||
prop="itemMaxQuantity"
|
||||
label-width="180px"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.itemMaxQuantity"
|
||||
placeholder=""
|
||||
@@ -306,12 +369,22 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input v-model="form.purchasePrice" placeholder="" :disabled="false" />
|
||||
<el-input
|
||||
v-model="form.purchasePrice"
|
||||
placeholder=""
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input v-model="form.retailPrice" placeholder="" :disabled="false" />
|
||||
<el-input
|
||||
v-model="form.retailPrice"
|
||||
placeholder=""
|
||||
clearable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -324,7 +397,12 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="财务类型" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" clearable filterable>
|
||||
<el-select
|
||||
v-model="form.typeCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 2 || form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -375,6 +453,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -399,19 +478,28 @@
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="基药标识" prop="basicFlag">
|
||||
<el-checkbox v-model="form.basicFlag"></el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="form.basicFlag"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="皮试判别" prop="skinTestFlag">
|
||||
<el-checkbox v-model="form.skinTestFlag"></el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="form.skinTestFlag"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="注射药品" prop="injectFlag">
|
||||
<el-checkbox v-model="form.injectFlag"></el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="form.injectFlag"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -448,8 +536,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="处方标志" prop="rxFlag">
|
||||
<el-radio-group v-model="form.rxFlag">
|
||||
<el-radio v-for="item in rx_flag" :key="item.value" :label="item.value">
|
||||
<el-radio-group v-model="form.rxFlag" :disabled="form.isEditInfoDisable === 1">
|
||||
<el-radio v-for="item in rx_flag" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -583,6 +671,7 @@ const {
|
||||
ddd_code,
|
||||
dose_from_code,
|
||||
rx_flag,
|
||||
dosage_instruction,
|
||||
chrgitm_lv,
|
||||
} = proxy.useDict(
|
||||
'med_category_code',
|
||||
@@ -598,6 +687,7 @@ const {
|
||||
'ddd_code',
|
||||
'dose_from_code',
|
||||
'rx_flag',
|
||||
'dosage_instruction',
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
@@ -639,23 +729,11 @@ const data = reactive({
|
||||
form: {},
|
||||
antibioticForm: {},
|
||||
rules: {
|
||||
// statusEnum: [
|
||||
// { required: true, message: "药品状态不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// orgId: [{ required: true, message: "所属科室不能为空", trigger: "blur" }],
|
||||
locationId: [{ required: true, message: '所在位置不能为空', trigger: 'blur' }],
|
||||
doseFormCode: [{ required: true, message: '剂型不能为空', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
|
||||
// activeFlag: [{ required: true, message: "活性不能为空", trigger: "blur" }],
|
||||
// methodCode: [{ required: true, message: '用法不能为空', trigger: 'blur' }],
|
||||
// rateCode: [{ required: true, message: '用药频次不能为空', trigger: 'blur' }],
|
||||
// dose: [{ required: true, message: '单次剂量不能为空', trigger: 'blur' }],
|
||||
doseUnitCode: [{ required: true, message: '剂量单位不能为空', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '生产厂家不能为空', trigger: 'blur' }],
|
||||
// maxUnit: [
|
||||
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
||||
// { validator: validateMaxUnit, trigger: 'blur' },
|
||||
// ],
|
||||
busNo: [{ required: true, message: '药品编号不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '药品名称不能为空', trigger: 'blur' }],
|
||||
categoryCode: [{ required: true, message: '药品分类不能为空', trigger: 'blur' }],
|
||||
@@ -665,29 +743,10 @@ const data = reactive({
|
||||
minUnitCode: [{ required: true, message: '最小单位不能为空', trigger: 'blur' }],
|
||||
ingredient: [{ required: true, message: '成分不能为空', trigger: 'blur' }],
|
||||
partPercent: [{ required: true, message: '拆零比不能为空', trigger: 'blur' }],
|
||||
// itemMinQuantity: [{ required: true, message: '警戒线最低值不能为空', trigger: 'blur' }],
|
||||
// itemMaxQuantity: [{ required: true, message: '警戒线最高值不能为空', trigger: 'blur' }],
|
||||
doseFrom: [{ required: true, message: '剂量形式不能为空', trigger: 'blur' }],
|
||||
// approvalNumber: [{ required: true, message: '批准文号不能为空', trigger: 'blur' }],
|
||||
// ybMatchFlag: [
|
||||
// { required: true, message: "医保对码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
ybNo: [{ required: false, message: '医保编码不能为空', trigger: 'blur' }],
|
||||
pharmacologyCategoryCode: [{ required: true, message: '药品性质不能为空', trigger: 'blur' }],
|
||||
// skinTestFlag: [
|
||||
// { required: true, message: "皮试不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// injectFlag: [{ required: true, message: "注射不能为空", trigger: "blur" }],
|
||||
supplyId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||
// restrictedFlag: [
|
||||
// { required: true, message: "限制使用不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// childrenFlag: [
|
||||
// { required: true, message: "儿童用药不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// restrictedScope: [
|
||||
// { required: true, message: "限制使用范围不能为空", trigger: "blur" },
|
||||
// ],
|
||||
nationalDrugCode: [{ required: false, message: '贯标国家编码不能为空', trigger: 'blur' }],
|
||||
partAttributeEnum: [{ required: true, message: '拆分属性不能为空', trigger: 'blur' }],
|
||||
thoPartAttributeEnum: [
|
||||
@@ -697,16 +756,8 @@ const data = reactive({
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
// basicFlag: [
|
||||
// { required: true, message: "基药标识不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// antibioticFlag: [
|
||||
// { required: true, message: "抗生素不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// selfFlag: [{ required: true, message: "自制不能为空", trigger: "blur" }],
|
||||
purchasePrice: [{ required: true, message: '购入价不能为空', trigger: 'blur' }],
|
||||
retailPrice: [{ required: true, message: '零售价不能为空', trigger: 'blur' }],
|
||||
// maximumRetailPrice: [{ required: true, message: '最高零售价不能为空', trigger: 'blur' }],
|
||||
ybType: [{ required: true, message: '医保类型不能为空', trigger: 'blur' }],
|
||||
rxFlag: [{ required: true, message: '处方标志不能为空', trigger: 'blur' }],
|
||||
chrgitmLv: [{ required: true, message: '医保等级不能为空', trigger: 'blur' }],
|
||||
@@ -762,15 +813,12 @@ function validateMaxUnit(rule, value, callback) {
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, '部门下拉树结构');
|
||||
});
|
||||
}
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect({ formList: '11,16' }).then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
@@ -787,10 +835,7 @@ function show(row) {
|
||||
statusRestrictedOptions.value = props.statusRestrictedOptions;
|
||||
partAttributeEnumOptions.value = props.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
|
||||
console.log(form.value.categoryCode, 'form.value.categoryCode');
|
||||
// setValue(row);
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
console.log(form.value, 1234567890);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
@@ -799,38 +844,22 @@ function setValue(row) {
|
||||
name: formatValue(props.currentCategoryEnum == '4' ? row.singleDrugName : row.registeredName), // 通用名称
|
||||
merchandiseName: formatValue(row.registeredName), // 商品名称
|
||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||
// categoryCode: row.drugCategory, // 药品分类
|
||||
// ybMatchFlag: row., // 医保对码
|
||||
// pharmacologyCategoryCode: row., // 药品性质
|
||||
totalVolume: formatValue(
|
||||
props.currentCategoryEnum == '4' ? row.conventionalUsage : row.drugSpecification
|
||||
), // 规格
|
||||
doseode: formatValue(row.drugForm), // 剂型
|
||||
doseUnitCode: formatValue(row.minMeasurementUnit), // 剂量单位
|
||||
// usageLimit: row.dosage, // 用量限定
|
||||
methodCode: formatValue(row.usage), // 用法
|
||||
rateCode: formatValue(row.frequency), // 用药频次
|
||||
// maxUnit: row., // 单次最大剂量
|
||||
// skinTestFlag: row., // 皮试判别
|
||||
// locationId: row., // 采购入库位置
|
||||
unitCode: formatValue(row.packagingUnit), // 包装单位
|
||||
minUnitCode: formatValue(row.minUseUnit), // 最小单位
|
||||
// partAttributeEnum: row., // 门诊拆分属性
|
||||
// thoPartAttributeEnum: row., // 住院临时医嘱拆分属性
|
||||
partPercent: formatValue(row.conversionRatio), // 拆零比
|
||||
itemMinQuantity: formatValue(row.itemMinQuantity), // 警戒线最低值
|
||||
itemMaxQuantity: formatValue(row.itemMaxQuantity), // 警戒线最高值
|
||||
|
||||
// purchasePrice: row., // 购入价
|
||||
// retailPrice: row., // 零售价
|
||||
// maximumRetailPrice: row., // 最高零售价
|
||||
// typeCode: row., // 财务类型
|
||||
nationalDrugCode: formatValue(row.nationalDrugCode), // 贯标国家编码
|
||||
version: formatValue(row.version), // 药品版本
|
||||
approvalNumber: formatValue(row.approvalNo), // 批准文号
|
||||
// ybType: formatValue(row.insuranceClass), // 医保类别
|
||||
manufacturerText: formatValue(row.manufacturerName), // 生产厂家
|
||||
// supplyId: row., // 供应商
|
||||
basicFlag: formatValue(row.essentialDrugFlag), // 基药标识
|
||||
// injectFlag: row., // 注射药物
|
||||
// childrenFlag: row.pediatricUse, // 儿童用药标志
|
||||
@@ -887,7 +916,6 @@ function edit() {
|
||||
antibioticForm.value.maxRateCode = form.value.maxRateCode;
|
||||
antibioticForm.value.dddUnitCode = form.value.dddUnitCode;
|
||||
antibioticForm.value.dddCode = form.value.dddCode;
|
||||
//antibioticForm.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
||||
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
||||
visible.value = true;
|
||||
}
|
||||
@@ -941,7 +969,6 @@ function reset() {
|
||||
minUnitCode: undefined,
|
||||
doseUnitCode: undefined,
|
||||
doseFormCode: undefined,
|
||||
// statusEnum: undefined,
|
||||
skinTestFlag: undefined,
|
||||
injectFlag: undefined,
|
||||
childrenFlag: undefined,
|
||||
@@ -968,8 +995,6 @@ function reset() {
|
||||
nationalDrugCode: undefined,
|
||||
antibioticFlag: undefined,
|
||||
selfFlag: undefined,
|
||||
// minRateCode: undefined,
|
||||
// maxRateCode: undefined,
|
||||
partAttributeEnum: undefined,
|
||||
thoPartAttributeEnum: undefined,
|
||||
usageLimit: undefined,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-dialog
|
||||
title="医保药品目录"
|
||||
v-model="visible"
|
||||
width="1500px"
|
||||
width="1800px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="cancel"
|
||||
@@ -29,22 +29,32 @@
|
||||
<span v-else>{{ scope.row.registeredName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="药品类别" prop="drugCategoryName">
|
||||
<el-table-column align="center" label="药品类别" prop="drugCategoryName" width="120">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.drugCategoryName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="国药准字" prop="drugCategoryName">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.approvalNo) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="药品规格" prop="drugSpecification">
|
||||
<template #default="scope">
|
||||
<span v-if="props.currentCategoryEnum == '4'">{{ scope.row.conventionalUsage }}</span>
|
||||
<span v-else>{{ scope.row.drugSpecification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="处方药" prop="otcFlagName">
|
||||
<el-table-column align="center" label="处方药" prop="otcFlagName" width="120">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.otcFlagName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="厂家" prop="manufacturerName">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.manufacturerName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="批准文号" prop="approvalNo" />
|
||||
<el-table-column align="center" label="操作" width="80">
|
||||
<template #default="scope">
|
||||
|
||||
@@ -62,6 +62,24 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保接口编号" prop="searchKey" label-width="120">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="1301-1321"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="searchKey" label-width="120">
|
||||
<el-input
|
||||
v-model="queryParams.v"
|
||||
placeholder="版本号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<!-- <el-form-item>
|
||||
@@ -91,20 +109,17 @@
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="Upload"
|
||||
@click="handleImport"
|
||||
>导入</el-button
|
||||
>
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="getYbCatalog">查询目录</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -129,7 +144,8 @@
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
min-width="90"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
@@ -137,7 +153,17 @@
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
min-width="110"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
min-width="200px"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品状态"
|
||||
@@ -146,11 +172,13 @@
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum == 2" type="success" >{{ scope.row.statusEnum_enumText }}</el-tag>
|
||||
<el-tag v-else type="error">{{ scope.row.statusEnum_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum == 2" type="success">{{
|
||||
scope.row.statusEnum_enumText
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="error">{{ scope.row.statusEnum_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="药品分类"
|
||||
align="center"
|
||||
@@ -166,21 +194,14 @@
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="采购入库位置"
|
||||
align="center"
|
||||
key="locationId_dictText"
|
||||
prop="locationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200px"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
@@ -310,15 +331,17 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Medication">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getToken } from '@/utils/auth';
|
||||
import {
|
||||
getMedicationList,
|
||||
editMedication,
|
||||
addMedication,
|
||||
getMedicationCategory,
|
||||
validateEditMedictaion,
|
||||
getMedicationOne,
|
||||
startMedication,
|
||||
stopMedication,
|
||||
getYbCatalogResult,
|
||||
} from './components/medicine';
|
||||
import medicineDialog from './components/medicineDialog';
|
||||
import MedicineYbDialog from './components/medicineYbDialog';
|
||||
@@ -356,15 +379,15 @@ const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/data-dictionary/medication/import-data"
|
||||
url: import.meta.env.VITE_APP_BASE_API + '/data-dictionary/medication/import-data',
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
@@ -376,6 +399,8 @@ const data = reactive({
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
categoryCode: undefined, // 目录
|
||||
address: undefined, // 目录
|
||||
v: undefined, // 目录
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -391,7 +416,6 @@ const filterNode = (value, data) => {
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, 'response药品目录分类查询下拉树结构');
|
||||
medicationOptions.value = response.data.medicationCategoryCodeOptions;
|
||||
medicationOptions.value.unshift({ info: '全部', value: '' });
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
@@ -406,14 +430,20 @@ function getMedicationCategoryList() {
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
console.log(queryParams.value, 'queryParams***********************');
|
||||
getMedicationList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, 'res');
|
||||
medicationList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询病种目录列表 */
|
||||
function getYbCatalog() {
|
||||
loading.value = true;
|
||||
getYbCatalogResult(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.categoryCode = data.value;
|
||||
@@ -423,7 +453,6 @@ function handleNodeClick(data) {
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams.value, 'queryParams');
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -444,7 +473,6 @@ function handleStart() {
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
console.log(data, 'data');
|
||||
proxy.$modal
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
@@ -474,7 +502,11 @@ function handleImport() {
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/data-dictionary/medication/import-template', {}, `medication_template_${new Date().getTime()}.xlsx`);
|
||||
proxy.download(
|
||||
'/data-dictionary/medication/import-template',
|
||||
{},
|
||||
`medication_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
@@ -508,25 +540,34 @@ function handleSelectionChange(selection) {
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddMedicine() {
|
||||
// if (!currentCategoryEnum.value) {
|
||||
// return proxy.$modal.msgError("请选择药品目录分类");
|
||||
// }
|
||||
// proxy.$refs['medicineYbRef'].show();
|
||||
proxy.$refs['medicineRef'].show();
|
||||
}
|
||||
const isEditInfoDisable = ref(0);
|
||||
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditMedicine(row) {
|
||||
validateEditMedictaion(row.id).then((res) => {
|
||||
// res.data == 1 医生开过该药品,不可编辑
|
||||
// res.data == 2 该药品已经入库过,不可编辑
|
||||
isEditInfoDisable.value = res.data;
|
||||
getMedicationInfo(row);
|
||||
});
|
||||
}
|
||||
// 根据药品id 查询药品信息
|
||||
function getMedicationInfo(row) {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
currentData.value = response.data;
|
||||
currentData.value = {
|
||||
...response.data,
|
||||
// 禁用编辑
|
||||
isEditInfoDisable: isEditInfoDisable.value,
|
||||
};
|
||||
nextTick(() => {
|
||||
proxy.$refs['medicineRef'].edit();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(formData) {
|
||||
console.log(formData, 'submitForm');
|
||||
if (formData.id != undefined) {
|
||||
editMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
|
||||
477
openhis-ui-vue3/src/views/catalog/national/index.vue
Normal file
477
openhis-ui-vue3/src/views/catalog/national/index.vue
Normal file
@@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 搜索条件区域 -->
|
||||
<el-col :span="24">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" size="small">
|
||||
<el-form-item label="项目名">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="国临编码/国临名称/医保编码/医保名称" clearable style="width: 280px" />
|
||||
</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-col>
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd">添加新项目</el-button>
|
||||
<el-button type="danger" icon="Stop" @click="handleDelete">删除</el-button>
|
||||
<el-button type="success" icon="Check">启用</el-button>
|
||||
<el-button type="info" icon="Download">导入</el-button>
|
||||
</el-col>
|
||||
|
||||
<!-- 数据表格区域 -->
|
||||
<el-col :span="24">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="glNo"
|
||||
label="国临版疾病编码"
|
||||
key="glNo"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
width="180" />
|
||||
|
||||
<el-table-column prop="glName"
|
||||
label="国临版疾病名称"
|
||||
key="glName"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
min-width="200" />
|
||||
|
||||
<el-table-column prop="icd10No"
|
||||
label="医保版疾病编码"
|
||||
key="icd10No"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
width="180" />
|
||||
|
||||
<el-table-column prop="icd10Name"
|
||||
label="医保版疾病名称"
|
||||
key="icd10Name"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
min-width="200" />
|
||||
<el-table-column label="操作" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link size="small" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页控件 -->
|
||||
<el-pagination
|
||||
v-model:current-page="queryParams.pageNum"
|
||||
v-model:page-size="queryParams.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加对话框 -->
|
||||
<el-dialog
|
||||
v-model="addDialogVisible"
|
||||
title="添加国临编码"
|
||||
width="600px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
|
||||
<el-form
|
||||
ref="addFormRef"
|
||||
:model="addFormData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="国临版疾病编码" prop="glNo">
|
||||
<el-input v-model="addFormData.glNo" placeholder="请输入国临版疾病编码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="国临版疾病名称" prop="glName">
|
||||
<el-input v-model="addFormData.glName" placeholder="请输入国临版疾病名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保版疾病编码" prop="icd10No">
|
||||
<el-input v-model="addFormData.icd10No" placeholder="请输入医保版疾病编码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保版疾病名称" prop="icd10Name">
|
||||
<el-input v-model="addFormData.icd10Name" placeholder="请输入医保版疾病名称" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 编辑对话框 -->
|
||||
<el-dialog
|
||||
v-model="editDialogVisible"
|
||||
title="编辑国临编码"
|
||||
width="600px"
|
||||
:before-close="handleEditClose"
|
||||
>
|
||||
<el-form
|
||||
ref="editFormRef"
|
||||
:model="editFormData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="国临版疾病编码" prop="glNo">
|
||||
<el-input v-model="editFormData.glNo" placeholder="请输入国临版疾病编码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="国临版疾病名称" prop="glName">
|
||||
<el-input v-model="editFormData.glName" placeholder="请输入国临版疾病名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保版疾病编码" prop="icd10No">
|
||||
<el-input v-model="editFormData.icd10No" placeholder="请输入医保版疾病编码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保版疾病名称" prop="icd10Name">
|
||||
<el-input v-model="editFormData.icd10Name" placeholder="请输入医保版疾病名称" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="handleEditClose">取消</el-button>
|
||||
<el-button type="primary" @click="handleEditSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="NationalCode">
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import request from '@/utils/request';
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
// 页面数据
|
||||
const loading = ref(true);
|
||||
const dataList = ref([]);
|
||||
const total = ref(0);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
|
||||
// 对话框相关
|
||||
const addDialogVisible = ref(false);
|
||||
const editDialogVisible = ref(false); // 编辑对话框可见性
|
||||
const addFormRef = ref(null);
|
||||
const editFormRef = ref(null); // 编辑表单引用
|
||||
const addFormData = reactive({
|
||||
glNo: '',
|
||||
glName: '',
|
||||
icd10No: '',
|
||||
icd10Name: ''
|
||||
});
|
||||
// 编辑表单数据
|
||||
const editFormData = reactive({
|
||||
id: '',
|
||||
glNo: '',
|
||||
glName: '',
|
||||
icd10No: '',
|
||||
icd10Name: ''
|
||||
});
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
glNo: [
|
||||
{ required: true, message: '请输入国临版疾病编码', trigger: 'blur' }
|
||||
],
|
||||
glName: [
|
||||
{ required: true, message: '请输入国临版疾病名称', trigger: 'blur' }
|
||||
],
|
||||
icd10No: [
|
||||
{ required: true, message: '请输入医保版疾病编码', trigger: 'blur' }
|
||||
],
|
||||
icd10Name: [
|
||||
{ required: true, message: '请输入医保版疾病名称', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined
|
||||
});
|
||||
|
||||
// 查询
|
||||
function handleQuery() {
|
||||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置
|
||||
function resetQuery() {
|
||||
Object.assign(queryParams, {
|
||||
searchKey: undefined,
|
||||
status: undefined,
|
||||
ybFlag: undefined,
|
||||
type: undefined
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 分页变化
|
||||
function handleSizeChange(size) {
|
||||
queryParams.pageSize = size;
|
||||
getList();
|
||||
}
|
||||
|
||||
function handleCurrentChange(current) {
|
||||
queryParams.pageNum = current;
|
||||
getList();
|
||||
}
|
||||
function handleDelete() {
|
||||
// 安全检查ids.value是否存在且为数组
|
||||
if (!ids.value || ids.value.length === 0) {
|
||||
ElMessage.warning('请先选择要删除的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
// 显示确认对话框
|
||||
ElMessageBox.confirm('确定要删除选中的数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
loading.value = true;
|
||||
|
||||
// 修复:确保ids.value是数组并过滤掉无效值
|
||||
const validIds = Array.isArray(ids.value) ? ids.value.filter(id => id) : [];
|
||||
|
||||
if (validIds.length === 0) {
|
||||
loading.value = false;
|
||||
ElMessage.warning('没有有效的数据可删除');
|
||||
return;
|
||||
}
|
||||
|
||||
// 简化删除逻辑,改为单个请求,因为后端可能不支持批量删除
|
||||
// 先删除第一个,后续可以根据需要调整
|
||||
const firstId = validIds[0];
|
||||
|
||||
request({
|
||||
url: '/base-data-manage/ICD10/delete-icd-Information',
|
||||
method: 'delete',
|
||||
params: { glNo: firstId } // 传递glNo参数
|
||||
}).then(res => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('删除成功');
|
||||
// 刷新列表
|
||||
getList();
|
||||
// 清空选中状态
|
||||
ids.value = [];
|
||||
} else {
|
||||
ElMessage.error(res.msg || '删除失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
loading.value = false;
|
||||
console.error('删除数据失败:', error);
|
||||
ElMessage.error('删除失败,请稍后重试');
|
||||
});
|
||||
}).catch(() => {
|
||||
// 用户取消删除操作
|
||||
});
|
||||
}
|
||||
|
||||
// 同时修复handleSelectionChange函数,确保正确设置ids
|
||||
function handleSelectionChange(selection) {
|
||||
// 确保selection是数组
|
||||
if (Array.isArray(selection)) {
|
||||
ids.value = selection.map(item => {
|
||||
// 尝试使用glNo,如果没有则使用id,确保返回有效的值
|
||||
return item.glNo || item.id || '';
|
||||
}).filter(Boolean); // 过滤掉空值
|
||||
single.value = ids.value.length <= 1;
|
||||
multiple.value = !single.value;
|
||||
} else {
|
||||
// 如果selection不是数组,重置ids
|
||||
ids.value = [];
|
||||
single.value = true;
|
||||
multiple.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 打开添加对话框
|
||||
function handleAdd() {
|
||||
// 重置表单
|
||||
addFormRef.value?.resetFields();
|
||||
Object.assign(addFormData, {
|
||||
glNo: '',
|
||||
glName: '',
|
||||
icd10No: '',
|
||||
icd10Name: ''
|
||||
});
|
||||
// 显示对话框
|
||||
addDialogVisible.value = true;
|
||||
}
|
||||
|
||||
// 关闭对话框
|
||||
function handleClose() {
|
||||
addDialogVisible.value = false;
|
||||
}
|
||||
function handleEdit(row) {
|
||||
// 填充编辑表单数据
|
||||
Object.assign(editFormData, {
|
||||
id: row.id || '',
|
||||
glNo: row.glNo || '',
|
||||
glName: row.glName || '',
|
||||
icd10No: row.icd10No || '',
|
||||
icd10Name: row.icd10Name || ''
|
||||
});
|
||||
// 显示编辑对话框
|
||||
editDialogVisible.value = true;
|
||||
}
|
||||
|
||||
function handleEditClose() {
|
||||
editDialogVisible.value = false;
|
||||
}
|
||||
|
||||
function handleEditSubmit() {
|
||||
editFormRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
// 移除查重校验,直接进行编辑操作
|
||||
loading.value = true;
|
||||
// 调用后端编辑接口
|
||||
request({
|
||||
url: '/base-data-manage/ICD10/update-icd-Information',
|
||||
method: 'put',
|
||||
data: editFormData
|
||||
}).then(res => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
console.log('编辑国临编码成功');
|
||||
ElMessage.success('编辑成功');
|
||||
editDialogVisible.value = false;
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(res.msg || '编辑失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
loading.value = false;
|
||||
console.error('编辑国临编码失败:', error);
|
||||
ElMessage.error('编辑失败,请稍后重试');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 提交表单
|
||||
function handleSubmit() {
|
||||
addFormRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
// 先进行查重校验
|
||||
checkAddDuplicate().then(isDuplicate => {
|
||||
if (isDuplicate) {
|
||||
ElMessage.warning('该项目已存在,请检查国临编码或医保编码是否重复');
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
// 调用后端添加接口
|
||||
request({
|
||||
url: '/base-data-manage/ICD10/add-icd-Information',
|
||||
method: 'post',
|
||||
data: addFormData // 直接提交表单数据
|
||||
}).then(res => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
// 成功提示
|
||||
ElMessage.success('添加成功');
|
||||
// 关闭对话框
|
||||
addDialogVisible.value = false;
|
||||
// 刷新列表
|
||||
getList();
|
||||
} else {
|
||||
// 失败提示
|
||||
ElMessage.error(res.msg || '添加失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
loading.value = false;
|
||||
console.error('添加国临编码失败:', error);
|
||||
ElMessage.error('添加失败,请稍后重试');
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error('查重校验失败:', error);
|
||||
ElMessage.error('校验失败,请稍后重试');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 查重校验函数
|
||||
async function checkAddDuplicate() {
|
||||
try {
|
||||
// 查询现有数据列表
|
||||
const res = await request({
|
||||
url: '/base-data-manage/ICD10/information-page',
|
||||
method: 'get',
|
||||
params: {
|
||||
pageNum: 1,
|
||||
pageSize: 1000, // 查询足够多的数据进行校验
|
||||
searchKey: undefined
|
||||
}
|
||||
});
|
||||
|
||||
if (res.code === 200 && res.data.records) {
|
||||
// 检查是否存在相同的国临编码或医保编码
|
||||
const isExist = res.data.records.some(item =>
|
||||
item.glNo === addFormData.glNo || item.icd10No === addFormData.icd10No
|
||||
);
|
||||
return isExist;
|
||||
}
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('查重校验请求失败:', error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取列表数据
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
request({
|
||||
url: '/base-data-manage/ICD10/information-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
}).then(res => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
dataList.value = res.data.records || [];
|
||||
total.value = res.data.total || 0;
|
||||
}
|
||||
}).catch(error => {
|
||||
loading.value = false;
|
||||
console.error('获取国临编码数据失败:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// 页面初始化
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
}
|
||||
.mb20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -20,6 +20,19 @@
|
||||
@keyup.enter="getClinicRecord"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票状态:" prop="invoiceStatus">
|
||||
<el-select
|
||||
v-model="queryParams.invoiceStatus"select
|
||||
placeholder="发票状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="getClinicRecord"
|
||||
>
|
||||
<el-option v-for="item in invoiceStatusList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间:" prop="activeFlag">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
@@ -38,6 +51,12 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="float: right; margin: 0 20px 10px 0">
|
||||
<span style="margin-right: 20px">
|
||||
{{ '总数:' + count + '/' + '成功:' + successCount }}
|
||||
</span>
|
||||
<el-button type="primary" :loading="loading" plain @click="handleBatchProcess">批量开具</el-button>
|
||||
</div>
|
||||
<el-table :data="clinicRecord" border>
|
||||
<!-- <el-table-column label="计算类型" align="center" prop="statusEnum_enumText" /> -->
|
||||
<el-table-column label="患者姓名" align="center" prop="patientName" :show-overflow-tooltip="true"/>
|
||||
@@ -140,10 +159,17 @@ const queryParams = ref({
|
||||
billDateSTime:"",
|
||||
billDateETime:"",
|
||||
searchKey:"",
|
||||
invoiceStatus:1,
|
||||
kinsEnum: 1
|
||||
});
|
||||
const invoiceStatusList = ref([
|
||||
{ value: 1, label: '已开具' },
|
||||
{ value: 0, label: '未开具' },
|
||||
]);
|
||||
const paymentDetailShow = ref(false)
|
||||
const clinicRecord = ref([]);
|
||||
const successCount = ref(0);
|
||||
const count = ref(0);
|
||||
const reasonDialogVisible = ref(false);
|
||||
const reasonForm = ref({
|
||||
reason: ''
|
||||
@@ -215,6 +241,49 @@ function handleReset() {
|
||||
// function handleEdit(row){
|
||||
|
||||
// }
|
||||
|
||||
const loading = ref(false)
|
||||
async function handleBatchProcess() {
|
||||
// 遍历list并异步执行invoiceReissue方法
|
||||
let list = clinicRecord.value.filter(item =>{
|
||||
return item.statusEnum == 1 && (item.invoiceNo == undefined || item.invoiceNo == null)
|
||||
})
|
||||
loading.value = true
|
||||
count.value = list.length;
|
||||
for (const item of list) {
|
||||
try {
|
||||
const res = await invoiceReissue({
|
||||
paymentId: item.id,
|
||||
encounterId: item.encounterId ? item.encounterId : ""
|
||||
});
|
||||
|
||||
if (res.data) {
|
||||
// 门诊电子发票开具失败 住院电子发票开具失败 电子发票类型不明确
|
||||
if (
|
||||
res.data.includes(" 挂号电子发票开具失败") ||
|
||||
res.data.includes(" 住院电子发票开具失败") ||
|
||||
res.data.includes(" 门诊电子发票开具失败") ||
|
||||
res.data.includes(" 电子发票类型不明确")
|
||||
) {
|
||||
// proxy.$message.error(res.data);
|
||||
} else {
|
||||
successCount.value++;
|
||||
// window.open(res.data);
|
||||
}
|
||||
}
|
||||
if (res.code == 200) {
|
||||
// getLists();
|
||||
} else {
|
||||
// proxy.$message.error(res.data);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
loading.value = false
|
||||
getLists()
|
||||
}
|
||||
|
||||
function handleOpen(row,type){
|
||||
if(type==1){
|
||||
invoiceReissue({paymentId:row.id,encounterId:row.encounterId?row.encounterId:""}).then((res) => {
|
||||
|
||||
@@ -5,41 +5,62 @@ import request from '@/utils/request'
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
url: '/charge-manage/charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 患者处方列表
|
||||
*/
|
||||
export function getChargeList(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 医保转自费
|
||||
*/
|
||||
export function changeToSelfPay(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
url: '/charge-manage/charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 自费转医保
|
||||
*/
|
||||
export function changeToMedicalInsurance(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/medical-insurance?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
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',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -48,9 +69,9 @@ export function changeToMedicalInsurance(encounterId) {
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/charge',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/payment/payment/charge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -59,8 +80,8 @@ export function savePayment(data) {
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,9 +90,9 @@ export function init() {
|
||||
*/
|
||||
export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -80,21 +101,32 @@ export function precharge(data) {
|
||||
*/
|
||||
export function unprecharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/unprecharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
url: '/payment/payment/unprecharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发耗材
|
||||
*/
|
||||
export function dispenseMedicalConsumables(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@open="handleOpen"
|
||||
@close="close"
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
@@ -18,47 +19,55 @@
|
||||
{{ 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>
|
||||
<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>
|
||||
<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"
|
||||
/>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -72,6 +81,18 @@
|
||||
金额已满足应收,不可继续添加
|
||||
</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>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
@@ -105,10 +126,10 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button type="primary" @click="print()" :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>
|
||||
@@ -116,7 +137,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables } from './api';
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables, getChargeInfo } from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
@@ -170,7 +191,11 @@ const props = defineProps({
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { charge_discount } = proxy.useDict('charge_discount');
|
||||
|
||||
const userStore = useUserStore();
|
||||
const discountRadio = ref(undefined);
|
||||
const discountAmount = ref(0);
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -186,97 +211,105 @@ const dialogLoading = ref(false);
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newValue) => {
|
||||
nextTick(() => {});
|
||||
formData.totalAmount = newValue;
|
||||
formData.selfPay[0].amount = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
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, // 年龄
|
||||
@@ -284,85 +317,59 @@ async function printReceipt(param) {
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmount.value + ' 元', // 实收金额
|
||||
itemTotalAmount: total.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmountTemp + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
|
||||
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], {
|
||||
printer: 'xp',
|
||||
title: '门诊收费结算单',
|
||||
});
|
||||
// // 将对象转换为 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 throttledGetList = debounce(submit, 300);
|
||||
|
||||
function handleOpen() {
|
||||
formData.totalAmount = props.totalAmount;
|
||||
formData.selfPay[0].amount = props.totalAmount;
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
displayAmountTemp = displayAmount.value;
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount.toFixed(2)) {
|
||||
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;
|
||||
}
|
||||
|
||||
// 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({
|
||||
// paymentEnum: 0,
|
||||
// kindEnum: 1,
|
||||
// patientId: props.patientInfo.patientId,
|
||||
// chrgBchnoList: props.chrgBchnoList,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
})
|
||||
.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) {
|
||||
@@ -419,6 +426,7 @@ const selfPayMethods = [
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '优惠', value: 220500 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -440,6 +448,16 @@ 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);
|
||||
@@ -466,9 +484,15 @@ const clearAmount = (index) => {
|
||||
|
||||
// 计算属性
|
||||
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) {
|
||||
@@ -486,8 +510,23 @@ function close() {
|
||||
// proxy.$modal.msgError(res.message);
|
||||
// }
|
||||
// });
|
||||
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>
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
"paperType": "自定义",
|
||||
"height": 160,
|
||||
"width": 80,
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 450.7086614173229,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {
|
||||
"content": "",
|
||||
"opacity": 0.7,
|
||||
@@ -28,8 +31,6 @@
|
||||
"layoutRowGap": 0,
|
||||
"layoutColumnGap": 0
|
||||
},
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 841.8897637795277,
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
@@ -258,10 +259,10 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 138,
|
||||
"left": 99,
|
||||
"top": 147,
|
||||
"height": 9.75,
|
||||
"width": 84,
|
||||
"height": 15,
|
||||
"width": 123,
|
||||
"title": "合计金额",
|
||||
"field": "itemTotalAmount",
|
||||
"coordinateSync": false,
|
||||
@@ -278,7 +279,7 @@
|
||||
"left": 6,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 88.5,
|
||||
"width": 108,
|
||||
"title": "应收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
@@ -292,10 +293,10 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 132,
|
||||
"left": 124.5,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 88.5,
|
||||
"width": 97.5,
|
||||
"title": "实收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
@@ -310,9 +311,43 @@
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 190.5,
|
||||
"top": 193.5,
|
||||
"height": 14,
|
||||
"width": 117,
|
||||
"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,
|
||||
@@ -326,10 +361,10 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 132,
|
||||
"top": 190.5,
|
||||
"left": 124.5,
|
||||
"top": 216,
|
||||
"height": 13.5,
|
||||
"width": 88.5,
|
||||
"width": 97.5,
|
||||
"title": "统筹支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
@@ -344,9 +379,9 @@
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 211.5,
|
||||
"top": 240,
|
||||
"height": 14,
|
||||
"width": 117,
|
||||
"width": 216,
|
||||
"title": "个人医保账户支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
@@ -361,43 +396,9 @@
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 235.5,
|
||||
"top": 268.5,
|
||||
"height": 14,
|
||||
"width": 115.5,
|
||||
"title": "全自费金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "FULAMT_OWNPAY_AMT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 133.5,
|
||||
"top": 235.5,
|
||||
"height": 14,
|
||||
"width": 87,
|
||||
"title": "应找零",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "returnedAmount"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 256.5,
|
||||
"height": 14,
|
||||
"width": 100,
|
||||
"width": 106.5,
|
||||
"title": "收费员",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
@@ -412,9 +413,9 @@
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 277.5,
|
||||
"top": 294,
|
||||
"height": 14,
|
||||
"width": 170,
|
||||
"width": 214.5,
|
||||
"title": "收费时间",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
|
||||
@@ -1,63 +1,31 @@
|
||||
<template>
|
||||
<div
|
||||
style="display: flex; justify-content: space-between"
|
||||
class="app-container"
|
||||
v-loading="readCardLoading"
|
||||
:element-loading-text="loadingText"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between" class="app-container" v-loading="readCardLoading"
|
||||
:element-loading-text="loadingText">
|
||||
<el-card style="width: 30%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">患者列表</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名/病历号"
|
||||
clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
@keyup.enter="getPatientList"
|
||||
>
|
||||
<el-input v-model="queryParams.searchKey" placeholder="请输入患者名/病历号" clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px" @keyup.enter="getPatientList">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getPatientList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in chargeStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态" @change="getPatientList">
|
||||
<el-option v-for="item in chargeStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<div style="width: 100%">
|
||||
<el-date-picker
|
||||
v-model="receptionTime"
|
||||
type="daterange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
@change="getPatientList"
|
||||
/>
|
||||
<el-date-picker v-model="receptionTime" type="daterange" range-separator="~" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" 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">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
height="620"
|
||||
:data="patientList"
|
||||
row-key="encounterId"
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table ref="patientListRef" height="620" :data="patientList" row-key="encounterId" @cell-click="clickRow"
|
||||
highlight-current-row>
|
||||
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
@@ -80,12 +48,12 @@
|
||||
{{ patientInfo.genderEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
|
||||
<el-descriptions-item label="科室:">{{
|
||||
patientInfo.organizationName
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊时间:">{{
|
||||
formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss')
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="科室:">
|
||||
{{ patientInfo.organizationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊时间:">
|
||||
{{ formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss') }}
|
||||
</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> -->
|
||||
@@ -102,47 +70,31 @@
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
电子凭证
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleReadCard('02')"
|
||||
style="width: 65px"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px" :disabled="true">
|
||||
身份证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||
医保卡
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="payToSelt()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
<el-button type="primary" @click="payToSelt()" style="margin-left: 20px" :disabled="buttonDisabled">
|
||||
医保转自费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="patToMedicalInsurance()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
<el-button type="primary" @click="patToMedicalInsurance()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
自费转医保
|
||||
</el-button>
|
||||
<span style="float: right"
|
||||
>合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="530"
|
||||
:data="chargeList"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
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" />
|
||||
@@ -152,10 +104,7 @@
|
||||
<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 :type="scope.row.statusEnum === 1 ? 'default' : 'success'" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -166,9 +115,17 @@
|
||||
</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">
|
||||
<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
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
@@ -197,11 +154,15 @@ import {
|
||||
changeToMedicalInsurance,
|
||||
init,
|
||||
precharge,
|
||||
getChargeInfo,
|
||||
changeStudentPayTosStudentSelf,
|
||||
changeStudentSelfToStudentPay,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
@@ -241,6 +202,20 @@ watch(
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => chargeList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -249,9 +224,16 @@ function handleSelectionChange(selection) {
|
||||
selectedRows.value = selection;
|
||||
}
|
||||
function handleTotalAmount() {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
}, 0);
|
||||
if (selectedRows.value.length == 0) {
|
||||
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);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
getPatientList();
|
||||
initOption();
|
||||
@@ -346,7 +328,9 @@ function confirmCharge() {
|
||||
paymentId.value = res.data.paymentId;
|
||||
chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details;
|
||||
details.value = res.data.details.filter((item) => {
|
||||
return item.amount > 0;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
@@ -502,6 +486,8 @@ async function handleReadCard(value) {
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
// 打印项目赋值
|
||||
chargedItems.value = selectRows;
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
@@ -543,5 +529,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>
|
||||
<style scoped>
|
||||
: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>
|
||||
@@ -322,9 +322,13 @@ function handleRefund(row) {
|
||||
// }, 0);
|
||||
getReturnDetail({ id: row.paymentId }).then((res) => {
|
||||
if (res.data.length > 0) {
|
||||
totalAmount.value = res.data.find((item) => item.payEnum === 220000).amount;
|
||||
totalAmount.value =
|
||||
res.data.find((item) => item.payEnum === 220000).amount -
|
||||
(res.data.find((item) => item.payEnum === 220500)?.amount || 0);
|
||||
}
|
||||
details.value = res.data;
|
||||
details.value = res.data.filter((item) => {
|
||||
return item.amount > 0;
|
||||
});
|
||||
});
|
||||
paymentId.value = row.paymentId;
|
||||
patientInfo.value.patientId = row.patientId;
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="PatientAddDialog">
|
||||
import { watch } from 'vue';
|
||||
import { watch, defineProps } from "vue";
|
||||
import pcas from 'china-division/dist/pcas-code.json';
|
||||
import { addPatient, patientlLists, getOutpatientRegistrationList } from './outpatientregistration';
|
||||
@@ -711,22 +712,22 @@ watch(
|
||||
const birthYear = parseInt(newIdCard.substring(6, 10));
|
||||
const birthMonth = parseInt(newIdCard.substring(10, 12));
|
||||
const birthDay = parseInt(newIdCard.substring(12, 14));
|
||||
|
||||
// 设置出生日期
|
||||
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;
|
||||
|
||||
|
||||
// 如果当前月份小于出生月份,或者月份相同但当前日期小于出生日期,则年龄减1
|
||||
if (
|
||||
currentMonth < birthMonth ||
|
||||
(currentMonth === birthMonth && currentDay < birthDay)
|
||||
) {
|
||||
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
|
||||
form.value.age = age ;
|
||||
}
|
||||
|
||||
@@ -239,6 +239,12 @@
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
@change="
|
||||
() => {
|
||||
form.serviceTypeId = undefined;
|
||||
setchargeItem;
|
||||
}
|
||||
"
|
||||
@clear="handleOrgClear"
|
||||
clearable
|
||||
/>
|
||||
@@ -414,6 +420,7 @@
|
||||
key="genderEnum_enumText"
|
||||
prop="genderEnum_enumText"
|
||||
/>
|
||||
<el-table-column label="联系电话" align="center" key="phone" prop="phone" />
|
||||
<el-table-column
|
||||
label="科室名称"
|
||||
align="center"
|
||||
@@ -758,6 +765,8 @@ const patientInfoList = ref(undefined);
|
||||
// 费用性质
|
||||
const contractList = ref(undefined);
|
||||
// const locationOptions = ref(undefined); // 地点树选项
|
||||
const doctorList = ref(undefined); // 医生选项
|
||||
const healthcareList = ref([]); // 挂号项目选项
|
||||
const doctorList = ref(undefined); // 医生选项(过滤后的)
|
||||
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
|
||||
const healthcareList = ref(undefined); // 挂号项目选项
|
||||
@@ -1068,15 +1077,17 @@ function setInfo() {
|
||||
|
||||
// 设定费用项管理表单
|
||||
function setchargeItem() {
|
||||
const healthcareData = healthcareList.value.filter(
|
||||
(healthcare) => healthcare.id === form.value.serviceTypeId
|
||||
);
|
||||
form.value.locationId_dictText = healthcareData.length > 0 ? healthcareData[0].name : '';
|
||||
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : '';
|
||||
form.value.activityPrice = healthcareData.length > 0 ? healthcareData[0].activityPrice : '';
|
||||
form.value.totalPrice =
|
||||
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
|
||||
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
|
||||
if (healthcareList.value.length > 0) {
|
||||
const healthcareData = healthcareList.value.filter(
|
||||
(healthcare) => healthcare.id === form.value.serviceTypeId
|
||||
);
|
||||
form.value.locationId_dictText = healthcareData.length > 0 ? healthcareData[0].name : '';
|
||||
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : '';
|
||||
form.value.activityPrice = healthcareData.length > 0 ? healthcareData[0].activityPrice : '';
|
||||
form.value.totalPrice =
|
||||
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
|
||||
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
|
||||
}
|
||||
}
|
||||
|
||||
/** 处理挂号类型变化 */
|
||||
|
||||
@@ -300,16 +300,16 @@ function handleCardClick(item, index) {
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-tabs__header {
|
||||
:deep(.el-tabs__header) {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: 0 0 5px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
:deep(.el-drawer__header) {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
::v-deep .el-drawer__body {
|
||||
:deep(.el-drawer__body) {
|
||||
padding: 10px !important;
|
||||
}
|
||||
.el-badge {
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
"top": 58.5,
|
||||
"height": 13.5,
|
||||
"width": 145.5,
|
||||
"title": "机构名称:医院",
|
||||
"title": "机构名称:长春大学医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 9,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">机构:</span>
|
||||
<span class="value">{{ '医院' }}</span>
|
||||
<span class="value">{{ userStore.hospitalName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<span class="label">时间:</span>
|
||||
@@ -449,7 +449,7 @@ async function print() {
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: '医院',
|
||||
fixmedinsName: userStore.hospitalName,
|
||||
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
|
||||
scheduler: userStore.nickName,
|
||||
timeRange: queryTime.value[0] + '~' + queryTime.value[1],
|
||||
|
||||
@@ -1,92 +1,94 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
export function getList (queryParams) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/encounter-list',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗列表
|
||||
*/
|
||||
export function getDisposalList(encounterId) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/treatment-list?encounterId=' + encounterId,
|
||||
export function getDisposalList (encounterId, serviceCategory) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/treatment-list?encounterId=' +
|
||||
encounterId +
|
||||
(serviceCategory ? '&serviceCategory=' + serviceCategory : ''),
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行列表
|
||||
*/
|
||||
export function getExecuteList(queryParams) {
|
||||
return request({
|
||||
export function getExecuteList (queryParams) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/execute-list',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
export function init () {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行
|
||||
*/
|
||||
export function execute(data) {
|
||||
return request({
|
||||
export function execute (data) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/perform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
export function cancel(data) {
|
||||
return request({
|
||||
export function cancel (data) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/cancel-perform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取执行记录
|
||||
*/
|
||||
export function getPerformRecord(params) {
|
||||
return request({
|
||||
export function getPerformRecord (params) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/perform-record',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function listWesternmedicine(query) {
|
||||
return request({
|
||||
export function listWesternmedicine (query) {
|
||||
return request ({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/prescription-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function printBloodCode(query) {
|
||||
return request({
|
||||
export function printBloodCode (query) {
|
||||
return request ({
|
||||
url: '/outpatient-manage/treatment/blood-transfusion-patch',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"top": 22.5,
|
||||
"height": 12,
|
||||
"width": 88.5,
|
||||
"title": "医院",
|
||||
"title": "长春大学医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 13.5,
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="执行记录"
|
||||
v-model="props.open"
|
||||
:model-value="props.open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="openDialog"
|
||||
>
|
||||
<el-table
|
||||
:data="recordList"
|
||||
highlight-current-row
|
||||
@row-click="handlePatientSelect"
|
||||
max-height="650"
|
||||
style="width: 100%"
|
||||
border
|
||||
>
|
||||
<el-table-column prop="occurrenceTime" label="执行时间" align="center" width="150" />
|
||||
<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="statusEnum_enumText" label="执行状态" align="center" />
|
||||
<el-table-column prop="orgName" label="执行科室" align="center" width="100" />
|
||||
<el-table-column prop="practitionerName" label="执行人" align="center" width="100" />
|
||||
<el-table-column prop="orgName" label="执行科室" align="center" />
|
||||
<el-table-column prop="practitionerName" label="执行人" align="center" />
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -36,7 +28,7 @@ const props = defineProps({
|
||||
default: false,
|
||||
},
|
||||
recordList: {
|
||||
type: [],
|
||||
type: Array,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"top": 16.5,
|
||||
"height": 22.5,
|
||||
"width": 120,
|
||||
"title": "医院",
|
||||
"title": "长春大学医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontFamily": "Microsoft YaHei",
|
||||
|
||||
@@ -1,222 +1,311 @@
|
||||
<template>
|
||||
<div class="his-container">
|
||||
<!-- 主体内容区域 -->
|
||||
<div class="main-content">
|
||||
<!-- 左侧患者列表区域 -->
|
||||
<div class="section patient-section">
|
||||
<div class="section-header">
|
||||
<div class="section-title">
|
||||
<i class="el-icon-user"></i>
|
||||
<h2>患者列表</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-area">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="width: 45%; margin-bottom: 10px"
|
||||
placeholder="搜索患者"
|
||||
clearable
|
||||
class="search-input"
|
||||
@keydown.enter="getPatientList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-date-picker
|
||||
v-model="receptionTime"
|
||||
@change="getPatientList"
|
||||
type="daterange"
|
||||
style="width: 55%; margin-bottom: 10px"
|
||||
placeholder="挂号时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</div>
|
||||
<el-table
|
||||
:data="patientList"
|
||||
highlight-current-row
|
||||
@row-click="handlePatientSelect"
|
||||
max-height="650"
|
||||
style="width: 100%"
|
||||
border
|
||||
>
|
||||
<el-table-column prop="encounterNo" label="就诊号" align="center" width="150" />
|
||||
<el-table-column prop="patientName" label="姓名" align="center" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" width="100" />
|
||||
<el-table-column prop="age" label="年龄" align="center" width="100" />
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 右侧区域 -->
|
||||
<div class="right-section">
|
||||
<!-- 处置项目区域 -->
|
||||
<div class="section treatment-section">
|
||||
<div class="section-header">
|
||||
<div class="section-title">
|
||||
<i class="el-icon-first-aid-kit"></i>
|
||||
<h2>处置项目</h2>
|
||||
<el-button type="primary" plain @click="printBottleLabel()">打印瓶签</el-button>
|
||||
<el-button type="primary" plain @click="printBloodBarcode()">打印采血条码</el-button>
|
||||
<el-button type="primary" plain @click="printPrescription()">打印处方</el-button>
|
||||
<el-button type="primary" plain @click="printDisposal()">打印处置单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="activityList"
|
||||
ref="activityListRef"
|
||||
height="calc(100% - 60px)"
|
||||
style="width: 100%"
|
||||
border
|
||||
v-loading="loading"
|
||||
:span-method="operationSpanMethod"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="序号" align="center" prop="sortNumber" width="60" />
|
||||
<el-table-column align="center" prop="busNo" label="项目编号" width="150" />
|
||||
<el-table-column align="center" prop="itemName" label="项目名称" />
|
||||
<!-- <el-table-column align="center" prop="medicationName" label="药品名称" /> -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="serviceCategory_dictText"
|
||||
label="项目类型"
|
||||
width="80"
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="6">
|
||||
<el-card>
|
||||
<template #header>患者信息</template>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10" :xs="24" :sm="10" :md="10">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
clearable
|
||||
class="search-input"
|
||||
style="width: 100%"
|
||||
@keydown.enter="getPatientList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="14" :xs="24" :sm="14" :md="14">
|
||||
<el-date-picker
|
||||
v-model="receptionTime"
|
||||
@change="getPatientList"
|
||||
type="daterange"
|
||||
placeholder="挂号时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-table
|
||||
:data="patientList"
|
||||
highlight-current-row
|
||||
@row-click="handlePatientSelect"
|
||||
style="width: 100%; height: calc(100vh - 300px)"
|
||||
border
|
||||
>
|
||||
<el-table-column prop="encounterNo" label="就诊号" align="center" width="150" />
|
||||
<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>
|
||||
<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"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="18">
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :md="12" class="mb8">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Printer"
|
||||
@click="printBottleLabel()"
|
||||
:disabled="isCurrentPatient"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.medCategory
|
||||
? scope.row.medCategory_dictText
|
||||
: scope.row.serviceCategory_dictText
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="size" label="数量" width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="size" label="规格" width="100" />
|
||||
<el-table-column align="center" prop="executeNum" label="执行次数" width="90" />
|
||||
<el-table-column align="center" label="已执行次数" width="90">
|
||||
<template #default="scope">
|
||||
{{ scope.row.performCount - scope.row.cancelCount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="unitPrice"
|
||||
label="单价"
|
||||
width="90"
|
||||
打印瓶签
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Printer"
|
||||
@click="printBloodBarcode()"
|
||||
:disabled="isCurrentPatient"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>
|
||||
打印采血条码
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Printer"
|
||||
@click="printPrescription()"
|
||||
:disabled="isCurrentPatient"
|
||||
>
|
||||
打印处方
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Printer"
|
||||
@click="printDisposal()"
|
||||
:disabled="isCurrentPatient"
|
||||
>
|
||||
打印处置单
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="6">
|
||||
<el-form
|
||||
ref="queryRef"
|
||||
:model="queryParams"
|
||||
inline-style="width: 100%"
|
||||
label-width="150px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item label="处置类型" prop="serviceCategory" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.serviceCategory"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="handleServiceCategoryChange"
|
||||
:disabled="isCurrentPatient"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activityCategoryList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="6" class="mb8">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="Check"
|
||||
@click="handleBatchExecute()"
|
||||
:disabled="isMultiple"
|
||||
>
|
||||
批量执行
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleBatchCancel()"
|
||||
:disabled="isMultiple"
|
||||
>
|
||||
批量取消
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="cards-column">
|
||||
<el-card class="half-card">
|
||||
<template #header>处置项目</template>
|
||||
<el-table
|
||||
:data="activityList"
|
||||
ref="activityListRef"
|
||||
style="width: 100%; height: 100%"
|
||||
border
|
||||
v-loading="loading"
|
||||
:span-method="operationSpanMethod"
|
||||
@select="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="组" align="center" width="40" prop="groupIcon" />
|
||||
<!-- <el-table-column label="序号" align="center" prop="sortNumber" width="60" /> -->
|
||||
<el-table-column align="center" prop="busNo" label="项目编号" width="150" />
|
||||
<el-table-column align="center" prop="itemName" label="项目名称" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="serviceStatus_enumText"
|
||||
label="状态"
|
||||
width="100"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary" size="small">
|
||||
{{
|
||||
row.serviceStatus_enumText
|
||||
? row.serviceStatus_enumText
|
||||
: row.chargeStatus_enumText
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="serviceCategory_dictText"
|
||||
label="项目类型"
|
||||
width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.unitPrice ? scope.row.unitPrice.toFixed(2) + ' 元' : '0.00' + ' 元'
|
||||
scope.row.medCategory
|
||||
? scope.row.medCategory_dictText
|
||||
: scope.row.serviceCategory_dictText
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="90"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '0.00' + ' 元'
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="serviceStatus_enumText" label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary" size="small">
|
||||
{{
|
||||
row.serviceStatus_enumText
|
||||
? row.serviceStatus_enumText
|
||||
: row.chargeStatus_enumText
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="handleExecute(row)"> 执行 </el-button>
|
||||
<el-button type="danger" link @click="handleCancel(row)"> 取消 </el-button>
|
||||
<el-button type="text" @click="getRecord(row)">执行记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="size" label="数量" width="100">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.quantity !== 0 && scope.row.unitCode_dictText">
|
||||
{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}
|
||||
</span>
|
||||
<span v-else> - </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="size" label="规格" width="100" />
|
||||
<el-table-column align="center" prop="executeNum" label="执行次数" width="90" />
|
||||
<el-table-column align="center" label="已执行次数" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.performCount - scope.row.cancelCount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="unitPrice"
|
||||
label="单价"
|
||||
width="90"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.unitPrice ? scope.row.unitPrice.toFixed(2) + ' 元' : '0.00' + ' 元'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="90"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.totalPrice
|
||||
? scope.row.totalPrice.toFixed(2) + ' 元'
|
||||
: '0.00' + ' 元'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 耗材区域 -->
|
||||
<div class="section material-section">
|
||||
<div class="section-header">
|
||||
<div class="section-title">
|
||||
<i class="el-icon-box"></i>
|
||||
<h2>耗材使用</h2>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="deviceList"
|
||||
height="calc(100% - 60px)"
|
||||
style="width: 100%"
|
||||
ref="deviceListRef"
|
||||
v-loading="loading"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column prop="itemName" align="center" label="耗材名称" />
|
||||
<el-table-column prop="size" align="center" label="规格" />
|
||||
<el-table-column prop="quantity" align="center" label="使用数量">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="right" header-align="center" prop="unitPrice" label="单价">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.unitPrice ? scope.unitPrice.toFixed(2) : '0.00' + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="right" header-align="center" prop="totalPrice" label="总价">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.totalPrice ? scope.totalPrice.toFixed(2) : '0.00' + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="serviceStatus_enumText" label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary" size="small">
|
||||
{{ row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="80">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" size="small" @click="removeMaterial(row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
fixed="right"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button type="text" @click="handleExecute(row)"> 执行 </el-button> -->
|
||||
<!-- <el-button type="danger" link @click="handleCancel(row)"> 取消 </el-button> -->
|
||||
<el-button link type="primary" icon="EditPen" @click="getRecord(row)">
|
||||
执行记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="half-card">
|
||||
<template #header> 耗材使用 </template>
|
||||
<el-table
|
||||
:data="deviceList"
|
||||
style="width: 100%; height: 100%"
|
||||
ref="deviceListRef"
|
||||
v-loading="loading"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column prop="itemName" align="center" label="耗材名称" />
|
||||
<el-table-column align="center" prop="serviceStatus_enumText" label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary" size="small">
|
||||
{{ row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="size" align="center" label="规格" />
|
||||
<el-table-column prop="quantity" align="center" label="使用数量">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="unitPrice" label="单价">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.unitPrice ? scope.unitPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="totalPrice" label="总价">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.totalPrice ? scope.totalPrice.toFixed(2) : '0.00' + ' 元' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<PerformRecordDialog :open="openDialog" :recordList="recordList" @close="openDialog = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getCurrentInstance, ref, computed } from 'vue';
|
||||
import {
|
||||
getList,
|
||||
getDisposalList,
|
||||
@@ -235,6 +324,7 @@ 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';
|
||||
// 患者搜索
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
@@ -254,6 +344,7 @@ const deviceList = ref([]);
|
||||
// 诊疗项目 + 耗材 打印处置单用
|
||||
const deviceActivityList = ref([]);
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// 当前选中的患者
|
||||
const currentPatient = ref({});
|
||||
@@ -261,21 +352,40 @@ const recordList = ref([]);
|
||||
const openDialog = ref(false);
|
||||
const loading = ref(false);
|
||||
const activityListRef = ref(null);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// 总费用计算
|
||||
const totalCost = computed(() => {
|
||||
if (!currentPatient.value.id) return 0;
|
||||
|
||||
const treatmentCost = currentPatient.value.treatments.reduce((sum, item) => sum + item.cost, 0);
|
||||
|
||||
const materialCost = currentPatient.value.materials.reduce(
|
||||
(sum, item) => sum + item.cost * item.quantity,
|
||||
0
|
||||
const deviceListRef = ref(null);
|
||||
const rules = ref({
|
||||
serviceCategory: [{ required: true, message: '请选择处置类型', trigger: 'blur' }],
|
||||
});
|
||||
//
|
||||
const { activity_category_code } = proxy.useDict('activity_category_code');
|
||||
const activityCategoryList = computed(() => {
|
||||
const keywords = ['检验', '检查', '治疗'];
|
||||
return (activity_category_code.value || []).filter((item) =>
|
||||
keywords.some((k) => String(item.label || '').includes(k))
|
||||
);
|
||||
});
|
||||
const activitySelectedList = ref([]);
|
||||
const deviceSelectedList = ref([]);
|
||||
// 是否有批量选择:无任何选择时禁用
|
||||
const isMultiple = computed(() => {
|
||||
// 未选择患者或为空对象时禁用
|
||||
if (!currentPatient.value || Object.keys(currentPatient.value).length === 0) {
|
||||
return true;
|
||||
}
|
||||
// 选中 处置列表
|
||||
activitySelectedList.value = activityListRef.value?.getSelectionRows
|
||||
? activityListRef.value.getSelectionRows()
|
||||
: [];
|
||||
|
||||
return treatmentCost + materialCost;
|
||||
// 选中 耗材列表
|
||||
deviceSelectedList.value = deviceListRef.value?.getSelectionRows
|
||||
? deviceListRef.value.getSelectionRows()
|
||||
: [];
|
||||
return deviceSelectedList.value.length === 0 && activitySelectedList.value.length === 0;
|
||||
});
|
||||
// 是否为当前患者
|
||||
const isCurrentPatient = computed(() => {
|
||||
return Object.keys(currentPatient.value).length === 0;
|
||||
});
|
||||
getPatientList();
|
||||
function getPatientList() {
|
||||
@@ -286,9 +396,32 @@ function getPatientList() {
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
// 切换处置类型
|
||||
function handleServiceCategoryChange(value) {
|
||||
// 就诊id
|
||||
let encounterId = currentPatient.value.encounterId;
|
||||
// 处置类型
|
||||
let serviceCategory = value;
|
||||
// 如果就诊id和处置类型不为空,则获取处置列表
|
||||
if (encounterId && serviceCategory) {
|
||||
getDisposalList(encounterId, serviceCategory).then((res) => {
|
||||
deviceList.value = res.data.records.filter((item) => {
|
||||
return item.requestTable == 'wor_device_request';
|
||||
});
|
||||
activityList.value = res.data.records.filter((item) => {
|
||||
return (
|
||||
item.requestTable == 'wor_service_request' ||
|
||||
item.requestTable == 'med_medication_request'
|
||||
);
|
||||
});
|
||||
deviceActivityList.value = res.data.records.filter((item) => {
|
||||
return item.deviceCategory == '7' || item.serviceCategory == '21';
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function handlePatientSelect(row) {
|
||||
console.log(row, 3456789);
|
||||
loading.value = true;
|
||||
currentPatient.value = row;
|
||||
getDisposalList(row.encounterId).then((res) => {
|
||||
@@ -300,14 +433,84 @@ function handlePatientSelect(row) {
|
||||
item.requestTable == 'wor_service_request' || item.requestTable == 'med_medication_request'
|
||||
);
|
||||
});
|
||||
activityList.value = getGroupMarkers(activityList.value);
|
||||
deviceActivityList.value = res.data.records.filter((item) => {
|
||||
return item.deviceCategory == '7' || item.serviceCategory == '21';
|
||||
});
|
||||
loading.value = false;
|
||||
console.log(activityList.value, 345678);
|
||||
});
|
||||
}
|
||||
// 批量操作校验
|
||||
function handleBatchValidate(type) {
|
||||
let params = [];
|
||||
// 是否批量选择了数据
|
||||
if (isMultiple.value) {
|
||||
proxy.$modal.msgError('请选择要执行的项目');
|
||||
return;
|
||||
}
|
||||
if (type === 'execute') {
|
||||
let activityList = activitySelectedList.value
|
||||
.filter((item) => {
|
||||
return item.chargeStatus === 5;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
chargeStatus: item.chargeStatus_enumText,
|
||||
dispenseStatus: item.dispenseStatus_enumText,
|
||||
name: item.itemName,
|
||||
};
|
||||
});
|
||||
let deviceList = deviceSelectedList.value
|
||||
.filter((item) => {
|
||||
return item.dispenseStatus === 2;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
chargeStatus: item.chargeStatus_enumText,
|
||||
dispenseStatus: item.dispenseStatus_enumText,
|
||||
name: item.itemName,
|
||||
};
|
||||
});
|
||||
|
||||
return [...activityList, ...deviceList];
|
||||
} else if (type === 'cancel') {
|
||||
let list = [...activitySelectedList.value, ...deviceSelectedList.value];
|
||||
list.forEach((item) => {
|
||||
params.push({
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
});
|
||||
});
|
||||
return list;
|
||||
}
|
||||
}
|
||||
// 批量执行
|
||||
function handleBatchExecute() {
|
||||
// 获取校验后数据
|
||||
let params = handleBatchValidate('execute');
|
||||
// 如果参数数组为空 不执行
|
||||
if (params.length == 0) {
|
||||
proxy.$modal.msgError('不存在需要执行的处置或耗材!');
|
||||
return;
|
||||
}
|
||||
// 执行批量操作
|
||||
execute(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('执行成功');
|
||||
handlePatientSelect(currentPatient.value);
|
||||
} else {
|
||||
proxy.$modal.msgError(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 单个执行
|
||||
function handleExecute(row) {
|
||||
let data = {
|
||||
requestId: row.requestId,
|
||||
@@ -316,7 +519,9 @@ function handleExecute(row) {
|
||||
};
|
||||
let params = activityList.value
|
||||
.filter((item) => {
|
||||
return item.groupId == row.groupId;
|
||||
return (
|
||||
(item.medCategory != null || item.medCategory != undefined) && item.groupId == row.groupId
|
||||
);
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
@@ -325,14 +530,16 @@ function handleExecute(row) {
|
||||
requestTable: item.requestTable,
|
||||
};
|
||||
});
|
||||
let list = proxy.$refs.deviceListRef.getSelectionRows().map((item) => {
|
||||
let list = (
|
||||
deviceListRef.value?.getSelectionRows ? deviceListRef.value.getSelectionRows() : []
|
||||
).map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
};
|
||||
});
|
||||
list.push(data);
|
||||
params.push(...list);
|
||||
execute(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('执行成功');
|
||||
@@ -346,7 +553,7 @@ function handleExecute(row) {
|
||||
// 添加操作列的合并方法
|
||||
function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 操作列是最后一列,索引为11 (从0开始)
|
||||
if (columnIndex === 11) {
|
||||
if (columnIndex === 12) {
|
||||
const groupId = row.groupId;
|
||||
// 如果没有groupId,则不合并
|
||||
if (groupId === undefined || groupId === null) {
|
||||
@@ -377,6 +584,7 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 打印处方
|
||||
function printPrescription() {
|
||||
// 取出状态为已收费已发药的requestId
|
||||
let requestIds = activityList.value
|
||||
@@ -387,6 +595,10 @@ function printPrescription() {
|
||||
return item.requestId;
|
||||
})
|
||||
.join(',');
|
||||
if (requestIds.length == 0) {
|
||||
proxy.$modal.msgWarning('没有可打印的处方!');
|
||||
return;
|
||||
}
|
||||
advicePrint({ requestIds: requestIds, isPrescription: 1 }).then((res) => {
|
||||
// 按 sortNumber 排序
|
||||
const sortedList = res.data.adviceItemList.sort((a, b) => {
|
||||
@@ -430,7 +642,7 @@ function printPrescription() {
|
||||
}); //开始打印
|
||||
});
|
||||
}
|
||||
|
||||
// 打印处置单
|
||||
function printDisposal() {
|
||||
let requestIds = deviceActivityList.value
|
||||
.map((item) => {
|
||||
@@ -469,6 +681,7 @@ function isFirstRowInGroup(rowIndex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 打印血条码
|
||||
function printBloodBarcode() {
|
||||
const selectedRows = activityListRef.value.getSelectionRows();
|
||||
if (selectedRows.length === 0) {
|
||||
@@ -488,6 +701,27 @@ function printBloodBarcode() {
|
||||
}
|
||||
}
|
||||
|
||||
// 批量取消
|
||||
function handleBatchCancel() {
|
||||
// 获取校验后数据
|
||||
let params = handleBatchValidate('cancel');
|
||||
|
||||
// 如果参数数组为空 不执行
|
||||
if (params.length == 0) {
|
||||
proxy.$modal.msgError('不存在需要执行的处置或耗材!');
|
||||
return;
|
||||
}
|
||||
//
|
||||
cancel(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
handlePatientSelect(currentPatient.value);
|
||||
} else {
|
||||
proxy.$modal.msgError(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 单个取消
|
||||
function handleCancel(row) {
|
||||
let data = {
|
||||
requestId: row.requestId,
|
||||
@@ -514,13 +748,22 @@ function handleCancel(row) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 打印瓶贴
|
||||
function printBottleLabel() {
|
||||
let result = [];
|
||||
// 过滤出全部输液药品
|
||||
let printLiist = activityList.value.filter((item) => {
|
||||
return item.medCategory == '2';
|
||||
});
|
||||
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 = [];
|
||||
|
||||
@@ -585,6 +828,7 @@ function printBottleLabel() {
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
console.log(result, '打印机列表');
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'Xprinter XP-365B',
|
||||
height: 210,
|
||||
width: 148,
|
||||
});
|
||||
@@ -599,6 +843,18 @@ function printBottleLabel() {
|
||||
});
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
function handleSelectionChange(selection, row) {
|
||||
const isSelected = selection.some((item) => item.requestId === row.requestId);
|
||||
activityList.value
|
||||
.filter((item) => {
|
||||
return item.groupId && item.groupId == row?.groupId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
activityListRef.value.toggleRowSelection(row, isSelected);
|
||||
});
|
||||
}
|
||||
|
||||
function getRecord(row) {
|
||||
getPerformRecord({ reqId: row.requestId }).then((res) => {
|
||||
recordList.value = res.data;
|
||||
@@ -618,26 +874,6 @@ function getRecord(row) {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
gap: 20px;
|
||||
overflow: hidden;
|
||||
height: calc(100% - 70px);
|
||||
}
|
||||
|
||||
.patient-section {
|
||||
min-width: 400px;
|
||||
width: 28%;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.right-section {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
@@ -646,6 +882,28 @@ function getRecord(row) {
|
||||
min-width: 600px;
|
||||
}
|
||||
|
||||
.cards-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
height: calc(90vh - 140px);
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.half-card {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.half-card :deep(.el-card__body) {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.current-patient {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
@@ -773,4 +1031,12 @@ function getRecord(row) {
|
||||
width: 200px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
: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>
|
||||
@@ -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>
|
||||
|
||||
@@ -112,7 +112,7 @@ import historicalPrescriptionDetail from './component/details.vue';
|
||||
import Prescription from './component/prescription.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_type } = proxy.useDict('item_type');
|
||||
const { item_category_code } = proxy.useDict('item_category_code');
|
||||
const prescriptionNo = ref('');
|
||||
const typeDetail = ref('1');
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
<el-table-column label="单次剂量" align="center">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{
|
||||
parseFloat(scope.row.dose).toFixed(2) === '0.00'
|
||||
{{
|
||||
!scope.row.dose || isNaN(parseFloat(scope.row.dose))
|
||||
? '-'
|
||||
: parseFloat(scope.row.dose).toFixed(2) === '0.00'
|
||||
? '-'
|
||||
: parseFloat(scope.row.dose).toFixed(2) + scope.row.doseUnitCode_dictText
|
||||
}}
|
||||
@@ -46,8 +48,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="库存名称" align="center">
|
||||
<template #default="scope">{{ getLocationName(scope.row) }}</template>
|
||||
<!-- 修改价格列,从inventoryList中获取价格 -->
|
||||
<el-table-column label="价格" align="center">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ getPriceFromInventory(scope.row) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center">
|
||||
<template #default="scope">{{ handleQuantity(scope.row) }}</template>
|
||||
@@ -199,19 +206,31 @@ watch(
|
||||
// 全部类型
|
||||
queryParams.value.adviceTypes = '1,2,3';
|
||||
}
|
||||
|
||||
// 设置categoryCode筛选条件(用于筛选西药和中成药)
|
||||
if (newValue.categoryCode) {
|
||||
queryParams.value.categoryCode = newValue.categoryCode;
|
||||
} else {
|
||||
queryParams.value.categoryCode = undefined;
|
||||
}
|
||||
|
||||
console.log('发送请求参数:', queryParams.value);
|
||||
getList();
|
||||
throttledGetList();
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
{ 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]);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
@@ -441,6 +460,7 @@ defineExpose({
|
||||
|
||||
<style scoped>
|
||||
.popover-table-wrapper:focus {
|
||||
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
|
||||
outline: 2px solid #409eff;
|
||||
/* 聚焦时的高亮效果 */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -543,6 +543,16 @@ export function saveTcmDiagnosis(data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除中医诊断
|
||||
*/
|
||||
export function deleteTcmDiagnosis(syndromeGroupNo) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-diagnosis?syndromeGroupNo=' + syndromeGroupNo,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存中医医嘱
|
||||
*/
|
||||
@@ -707,11 +717,11 @@ export function getOrderGroup(data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗项目耗材绑定信息
|
||||
* 查询项目绑定信息
|
||||
*/
|
||||
export function getActivityBindDevice(data) {
|
||||
export function getBindDevice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/activity-bind-device-info',
|
||||
url: '/doctor-station/advice/order-bind-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
|
||||
@@ -2,61 +2,36 @@
|
||||
<div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-input
|
||||
v-model="diagnosis"
|
||||
placeholder="诊断名称"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<el-input v-model="diagnosis" placeholder="诊断名称" clearable style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse">
|
||||
<template #append>
|
||||
<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" @node-click="handleNodeClick">
|
||||
<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-icon><Plus /></el-icon>
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<el-popconfirm
|
||||
width="200"
|
||||
:hide-after="10"
|
||||
title="确认删除此常用诊断吗"
|
||||
placement="top-start"
|
||||
@confirm="deleteChild(data)"
|
||||
>
|
||||
<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-icon><Minus /></el-icon>
|
||||
<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>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
@@ -78,25 +53,15 @@
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||
:rules="rules.diagSrtNo"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.diagSrtNo"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 80px"
|
||||
/>
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
|
||||
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
|
||||
style="width: 80px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.medTypeCode`"
|
||||
:rules="rules.medTypeCode"
|
||||
>
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in diag_type"
|
||||
@@ -111,25 +76,12 @@
|
||||
<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)"
|
||||
/>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
@@ -169,11 +121,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDeleteDiagnosis(scope.row, scope.$index)"
|
||||
>
|
||||
<el-button link type="primary" @click="handleDeleteDiagnosis(scope.row, scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -182,16 +130,9 @@
|
||||
</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" :patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -208,6 +149,7 @@ import {
|
||||
getChronicDisease,
|
||||
getTcmDiagnosis,
|
||||
delEncounterDiagnosis,
|
||||
deleteTcmDiagnosis,
|
||||
isFoodDiseasesNew,
|
||||
} from '../api';
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
@@ -280,7 +222,6 @@ function getList() {
|
||||
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
|
||||
|
||||
emits('diagnosisSave', false);
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -298,7 +239,6 @@ function getList() {
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -553,7 +493,7 @@ function closeDiagnosisDialog(str) {
|
||||
getTree();
|
||||
}
|
||||
|
||||
function queryDiagnosisUse(value) {}
|
||||
function queryDiagnosisUse(value) { }
|
||||
|
||||
function handleChange(value) {
|
||||
diagnosisSearchkey.value = value;
|
||||
@@ -627,6 +567,7 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
@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">
|
||||
<!-- <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>
|
||||
@@ -43,7 +43,11 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
getList();
|
||||
=======
|
||||
getList();
|
||||
>>>>>>> upstream/develop
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
|
||||
@@ -743,7 +743,6 @@ function selectMedRow(key, row, index) {
|
||||
const item = list.sort((a, b) => {
|
||||
return new Date(b.begndate) - new Date(a.begndate);
|
||||
});
|
||||
//debugger
|
||||
if (item.length > 0) {
|
||||
if (item[0].medChrgitmType != '11' && item[0].medChrgitmType != '09') {
|
||||
form.medicationInfoList.shift();
|
||||
|
||||
@@ -11,14 +11,8 @@
|
||||
</div>
|
||||
|
||||
<div>处方信息</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="eprescriptionRef"
|
||||
:data="prescriptionList"
|
||||
row-key="prescriptionNo"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table max-height="650" ref="eprescriptionRef" :data="prescriptionList" row-key="prescriptionNo" border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" :selectable="selectable" />
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" width="200" sortable>
|
||||
<template #default="scope">
|
||||
@@ -46,16 +40,8 @@
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.validityDays }}
|
||||
</span>
|
||||
<el-input-number
|
||||
v-else
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
v-model="scope.row.validityDays"
|
||||
placeholder=""
|
||||
@input="handleValidityDaysChange(scope.$index, $event)"
|
||||
style="width: 90%"
|
||||
/>
|
||||
<el-input-number v-else :min="0" controls-position="right" :controls="false" v-model="scope.row.validityDays"
|
||||
placeholder="" @input="handleValidityDaysChange(scope.$index, $event)" style="width: 90%" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText" width="80">
|
||||
@@ -65,13 +51,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开方医师"
|
||||
align="center"
|
||||
prop="practitionerName"
|
||||
header-align="center"
|
||||
width="90"
|
||||
>
|
||||
<el-table-column label="开方医师" align="center" prop="practitionerName" header-align="center" width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.practitionerName }}
|
||||
@@ -138,44 +118,19 @@
|
||||
<el-table-column label="操作" align="center" width="220" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleEdit(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Plus"
|
||||
@click="savePrescriptionData(scope.row, scope.$index)"
|
||||
:disabled="!scope.row.isEdit"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Edit" @click="handleEdit(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6">编辑</el-button>
|
||||
<el-button link type="primary" icon="Plus" @click="savePrescriptionData(scope.row, scope.$index)"
|
||||
:disabled="!scope.row.isEdit">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
style="margin-bottom: 5px"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" style="margin-bottom: 5px" />
|
||||
|
||||
<eprescriptiondialog
|
||||
ref="prescriptionDialogRef"
|
||||
:openPrescription="openPrescription"
|
||||
:patient="props.patientInfo"
|
||||
:prescriptionType="prescriptionTypeList"
|
||||
:medicationInfo="medicationInfoList"
|
||||
:prescriptionData="prescriptionInfo"
|
||||
:title="title"
|
||||
@close="closePrescriptionDialog"
|
||||
/>
|
||||
<eprescriptiondialog ref="prescriptionDialogRef" :openPrescription="openPrescription" :patient="props.patientInfo"
|
||||
:prescriptionType="prescriptionTypeList" :medicationInfo="medicationInfoList" :prescriptionData="prescriptionInfo"
|
||||
:title="title" @close="closePrescriptionDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -285,20 +240,12 @@ getElepPrescriptionInit();
|
||||
|
||||
/** 处方信息取得 */
|
||||
function getList() {
|
||||
console.log(
|
||||
queryParams.value,
|
||||
'queryParams.value电子处方',
|
||||
props.patientInfo,
|
||||
'props.patientInfo'
|
||||
);
|
||||
prescriptionList.value = [];
|
||||
medicationInfoList.value = [];
|
||||
prescriptionNoTemp.value = undefined;
|
||||
queryParams.value.patientId = props.patientInfo.patientId;
|
||||
console.log(queryParams.value, 'queryParams.value电子处方');
|
||||
getPrescriptionInfo(queryParams.value).then((res) => {
|
||||
prescriptionList.value = res.data.records;
|
||||
console.log(res, '电子处方列表');
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -307,13 +254,11 @@ function getList() {
|
||||
function getElepPrescriptionInit() {
|
||||
elepPrescriptionInit().then((res) => {
|
||||
prescriptionTypeList.value = res.data.rxTypeCodeListOptions;
|
||||
console.log(res, '电子处方下拉框');
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, 'selection');
|
||||
selectDataList.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
prescriptionNos.value = selection.map((item) => item.prescriptionNo);
|
||||
ids.value = selection
|
||||
@@ -341,7 +286,6 @@ function handleAddPrescription() {
|
||||
*/
|
||||
function selectable(row, index) {
|
||||
// 返回 true 表示该行可选,返回 false 表示该行不可选
|
||||
// console.log(row, 'selectable', rowIndex.value);
|
||||
return ![2, 3, 6].includes(row.statusEnum);
|
||||
}
|
||||
|
||||
@@ -359,7 +303,6 @@ function handleView(row) {
|
||||
prescriptionInfo.value.extensionReason = row.extensionReason;
|
||||
prescriptionInfo.value.rxTypeCode = row.rxTypeCode;
|
||||
prescriptionInfo.value.prescriptionNo = row.prescriptionNo;
|
||||
console.log(queryMedicationParams.value, '处方详细的药品信息参数', row.prescriptionNo);
|
||||
getMedicationInfo(queryMedicationParams.value).then((response) => {
|
||||
medicationInfoList.value = response.data.records;
|
||||
medicationInfoList.value.forEach((medicationInfo) => {
|
||||
@@ -369,7 +312,6 @@ function handleView(row) {
|
||||
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
|
||||
openPrescriptionDialog();
|
||||
|
||||
console.log(response, '处方详细的药品信息', medicationInfoList.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -385,7 +327,6 @@ function handleEdit(row) {
|
||||
prescriptionInfo.value.extensionReason = row.extensionReason;
|
||||
prescriptionInfo.value.rxTypeCode = row.rxTypeCode;
|
||||
prescriptionInfo.value.prescriptionNo = row.prescriptionNo;
|
||||
console.log(queryMedicationParams.value, '处方详细的药品信息参数', row.prescriptionNo);
|
||||
getMedicationInfo(queryMedicationParams.value).then((response) => {
|
||||
medicationInfoList.value = response.data.records;
|
||||
medicationInfoList.value.forEach((medicationInfo) => {
|
||||
@@ -393,7 +334,6 @@ function handleEdit(row) {
|
||||
});
|
||||
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
|
||||
openPrescriptionDialog();
|
||||
console.log(response, '处方详细的药品信息', medicationInfoList.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -419,7 +359,6 @@ function openPrescriptionDialog() {
|
||||
nextTick(() => {
|
||||
proxy.$refs['prescriptionDialogRef'].getPrescriptionNoInit();
|
||||
});
|
||||
console.log(openPrescription.value, '打开新增处方弹窗');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,10 +395,8 @@ async function savePrescriptionData(row, index) {
|
||||
rxTypeCode: row.rxTypeCode,
|
||||
};
|
||||
|
||||
console.log(updateParam, ' 保存处方updateParam');
|
||||
updatePrescriptionInfo(updateParam).then((response) => {
|
||||
if (response.code == 200) {
|
||||
console.log(response, '保存成功');
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
} else {
|
||||
@@ -467,7 +404,6 @@ async function savePrescriptionData(row, index) {
|
||||
}
|
||||
});
|
||||
// } catch (error) {
|
||||
// console.log('验证失败:', error);
|
||||
// // 验证失败,不执行保存
|
||||
// }
|
||||
}
|
||||
@@ -513,7 +449,6 @@ function deletePrescription(index) {
|
||||
idList: ids.value,
|
||||
prescriptionNoList: prescriptionNos.value,
|
||||
};
|
||||
console.log('deletePrescription删除', data);
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据!')
|
||||
.then(function () {
|
||||
@@ -530,13 +465,12 @@ function deletePrescription(index) {
|
||||
// form.value.medicationInfoList.forEach((medicationInfo) => {
|
||||
// medicationInfo.isEdit = false;
|
||||
// });
|
||||
// console.log(response, '处方详细的药品信息', form.value.medicationInfoList);
|
||||
// totalMedication.value = response.data.total;
|
||||
// });
|
||||
// }
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
defineExpose({ getList });
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// ====== 文书记录
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
// 新增模板
|
||||
export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
params: {definitionId}
|
||||
})
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div class="emr-history-container">
|
||||
<div class="search-box">
|
||||
<el-input placeholder="病历名称搜索..." v-model="queryParams.searchKey">
|
||||
<template #append>
|
||||
<el-button @click="queryList">查询</el-button>
|
||||
</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-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-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['historyClick']);
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
default: '',
|
||||
});
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
};
|
||||
const queryParams = ref({
|
||||
searchKey: '',
|
||||
isPage: 0,
|
||||
});
|
||||
const historyData = ref([]);
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if (patientInfo.value.encounterId && unref(definitionId) && unref(definitionId) !== '') {
|
||||
const res = await getRecordByEncounterIdList({
|
||||
...queryParams.value,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
definitionId: unref(definitionId),
|
||||
});
|
||||
historyData.value = res.data || [];
|
||||
} else {
|
||||
historyData.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
const currentSelectTemplate = ref({});
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-history-container {
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
.search-box {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.emr-history-scrollbar-container {
|
||||
padding: 8px;
|
||||
height: calc(100% - 40px);
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div class="emr-template-container">
|
||||
<!-- <div class="search-box">
|
||||
<el-input placeholder="病历名称搜索..." v-model="queryParams.searchKey">
|
||||
<template #append>
|
||||
<el-button @click="queryList">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</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-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>
|
||||
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getListByDefinitionId } 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 props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
default: '',
|
||||
});
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
};
|
||||
const queryParams = ref({
|
||||
searchKey: '',
|
||||
isPage: 0,
|
||||
});
|
||||
const templateData = ref([]);
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if ( unref(definitionId)&&unref(definitionId) !== '') {
|
||||
const res = await getListByDefinitionId(unref(definitionId));
|
||||
templateData.value = res.data || [];
|
||||
}else{
|
||||
templateData.value = [];
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板失败');
|
||||
templateData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('templateClick', data);
|
||||
};
|
||||
const handleEdit = (data) => {
|
||||
emits('edit', data);
|
||||
};
|
||||
const currentSelectTemplate = ref({});
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-template-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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<!-- 病历文件基本信息弹窗 -->
|
||||
<el-dialog
|
||||
:title="formData.id ? '编辑模板' : '新增模板'"
|
||||
v-model="dialogVisible"
|
||||
width="900px"
|
||||
destroy-on-close
|
||||
@open="handleOpen"
|
||||
>
|
||||
<!-- 使用el-form包裹表单 -->
|
||||
<el-form :model="formData" ref="formRef" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="24" class="mb8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="模板名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入模板名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="使用范围" prop="useRange">
|
||||
<el-radio-group v-model="formData.useRange">
|
||||
<el-radio :value="0" size="large">全院</el-radio>
|
||||
<el-radio :value="1" size="large">指定机构</el-radio>
|
||||
<el-radio :value="2" size="large">指定用户</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入版本"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer"></div>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { addTemplate, updateTemplate } from '../api';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { components } from '@/template';
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const formRef = ref(null);
|
||||
|
||||
const dialogVisible = defineModel('dialogVisible', {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
id: 0,
|
||||
name: '',
|
||||
displayOrder: 0,
|
||||
contextJson: '',
|
||||
definitionId: 0,
|
||||
useRange: 2,
|
||||
organizationId: 0,
|
||||
userId: 0,
|
||||
remark: '',
|
||||
});
|
||||
// 表单验证规则(响应式,支持动态验证)
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
});
|
||||
const handleOpen = () => {
|
||||
if (props.formData) {
|
||||
formData.value = props.formData;
|
||||
} else {
|
||||
resetForm();
|
||||
}
|
||||
};
|
||||
|
||||
// 提交表单
|
||||
const submitForm = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
// 表单验证通过,执行保存操作
|
||||
saveForm();
|
||||
} else {
|
||||
// 表单验证失败
|
||||
ElMessage.error('请填写必填项');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
// 保存表单
|
||||
const saveForm = async () => {
|
||||
try {
|
||||
// 如果有当前节点数据,表示是编辑操作
|
||||
if (formData.value.id && formData.value.id !== '') {
|
||||
const res = await updateTemplate(formData.value);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
emits('submitOk');
|
||||
} else {
|
||||
ElMessage.error('更新失败', error);
|
||||
}
|
||||
} else {
|
||||
// 新建操作
|
||||
const res = await addTemplate(formData.value);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('保存成功');
|
||||
emits('submitOk');
|
||||
} else {
|
||||
ElMessage.error('保存失败', error);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// ElMessage.error('保存失败',error);
|
||||
}
|
||||
};
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
formRef.value?.resetFields();
|
||||
};
|
||||
|
||||
onMounted(() => {});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,584 @@
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-18 15:41:10
|
||||
* @Description: 门诊病历组件
|
||||
-->
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div
|
||||
class="disBtn"
|
||||
:class="{ disLeftBtnNor: leftShow, disLeftBtnAct: !leftShow }"
|
||||
@click="disNode"
|
||||
>
|
||||
<img src="../../../../assets/icons/svg/foldup.svg" />
|
||||
</div>
|
||||
<div
|
||||
class="disBtn"
|
||||
:class="{ disRightBtnNor: rightShow, disRightBtnAct: !rightShow }"
|
||||
@click="disNode_R"
|
||||
>
|
||||
<img src="../../../../assets/icons/svg/foldup.svg" />
|
||||
</div>
|
||||
<transition name="el-zoom-in-left">
|
||||
<div class="template-tree-container" v-if="leftShow">
|
||||
<div class="search-box">
|
||||
<el-input placeholder="病历名称搜索..." v-model="queryParams.name">
|
||||
<template #append>
|
||||
<el-button @click="queryTemplateTree">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<el-tree
|
||||
ref="templateTree"
|
||||
:data="templateData"
|
||||
:props="defaultProps"
|
||||
auto-expand-parent
|
||||
node-key="id"
|
||||
@node-click="handleNodeClick"
|
||||
class="template-tree"
|
||||
></el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<div class="operate-container">
|
||||
<div class="operate-btns">
|
||||
<el-space>
|
||||
<!-- <el-button type="primary" @click="newEmr">新建</el-button> -->
|
||||
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
|
||||
<el-button @click="refresh">刷新</el-button>
|
||||
<el-button type="primary" @click="save">保存</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"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<transition name="el-zoom-in-left">
|
||||
<div class="quickly-container" v-if="rightShow">
|
||||
<el-tabs v-model="quicklyactiveName" type="card">
|
||||
<el-tab-pane label="历史" name="history">
|
||||
<History
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
<Template
|
||||
@templateClick="handleTemplateClick"
|
||||
ref="templateRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
@edit="templateEdit"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<TemplateEdit
|
||||
ref="templateEditRef"
|
||||
:formData="editTemplateForm"
|
||||
v-model:dialogVisible="templateEditVisible"
|
||||
@submitOk="templateEditSubmitOk"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { addRecord, addTemplate } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
// import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['emrSaved']);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
activeTab: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
const state = reactive({});
|
||||
import History from './components/history';
|
||||
import Template from './components/template';
|
||||
import TemplateEdit from './components/templateEdit.vue';
|
||||
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
// 定义响应式变量
|
||||
const templateData = ref([]);
|
||||
const queryParams = ref({
|
||||
name: '',
|
||||
useRanges: [1, 2], // 0 暂不使用 1 全院 2 科室 3 个人
|
||||
organizationId: userStore.orgId,
|
||||
});
|
||||
|
||||
const currentSelectTemplate = ref({
|
||||
id: '',
|
||||
});
|
||||
const currentComponent = ref('');
|
||||
const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
};
|
||||
/** 初始化病历模板树(按科室筛选) */
|
||||
const queryTemplateTree = async () => {
|
||||
try {
|
||||
const res = await getTreeList(queryParams.value);
|
||||
templateData.value = res.data || [];
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
templateData.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 处理节点点击,根据后台返回的路径加载组件
|
||||
const handleNodeClick = (data, node) => {
|
||||
if (node.isLeaf) {
|
||||
// 存储当前节点数据
|
||||
currentSelectTemplate.value = data.document;
|
||||
currentComponent.value = currentSelectTemplate.value.vueRouter || '';
|
||||
// currentComponent.value = data.document.vueRouter || '';
|
||||
} else {
|
||||
currentSelectTemplate.value = {
|
||||
id: '',
|
||||
};
|
||||
// currentComponent.value = null;
|
||||
}
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
const newEmr = () => {
|
||||
if (currentSelectTemplate.value) {
|
||||
currentComponent.value = currentSelectTemplate.value.vueRouter || '';
|
||||
return;
|
||||
}
|
||||
ElMessage.error('请选择模版!');
|
||||
};
|
||||
|
||||
const saveAsModel = async () => {
|
||||
try {
|
||||
currentOperate.value = 'addTemplate';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
ElMessage.error('存为模版失败');
|
||||
}
|
||||
};
|
||||
const editForm = ref({
|
||||
id: '',
|
||||
definitionId: '',
|
||||
definitionBusNo: '',
|
||||
contentJson: '',
|
||||
statusEnum: 1, // 0草稿/暂存 1提交 2归档 3修改
|
||||
organizationId: 0,
|
||||
encounterId: '',
|
||||
patientId: '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy: '',
|
||||
source: '',
|
||||
});
|
||||
const editTemplateForm = ref({
|
||||
id: '',
|
||||
name: '',
|
||||
displayOrder: 0,
|
||||
contextJson: '',
|
||||
definitionId: '',
|
||||
useRange: 2,
|
||||
organizationId: '',
|
||||
userId: '',
|
||||
remark: '',
|
||||
});
|
||||
|
||||
const currentOperate = ref('add');
|
||||
const handleSubmitOk = async (data) => {
|
||||
if (currentOperate.value === 'add') {
|
||||
//
|
||||
try {
|
||||
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
|
||||
ElMessage.error('请先选择患者!');
|
||||
return;
|
||||
}
|
||||
editForm.value.definitionId = currentSelectTemplate.value.id;
|
||||
editForm.value.definitionBusNo = currentSelectTemplate.value.busNo;
|
||||
editForm.value.contentJson = JSON.stringify(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('病历保存成功');
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
// 通知父组件病历保存成功
|
||||
emits('emrSaved', true);
|
||||
} 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);
|
||||
editTemplateForm.value.definitionId = currentSelectTemplate.value.id;
|
||||
templateEditVisible.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const refresh = () => {
|
||||
queryTemplateTree();
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
const deleteEmr = async () => {
|
||||
try {
|
||||
// 这里应该添加实际的删除逻辑
|
||||
ElMessage.success('删除成功!');
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
ElMessage.error('保存失败');
|
||||
}
|
||||
};
|
||||
|
||||
const historyRef = ref(null);
|
||||
const handleHistoryClick = (data) => {
|
||||
newEmr();
|
||||
editForm.value = data;
|
||||
nextTick(() => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
|
||||
});
|
||||
};
|
||||
const templateRef = ref(null);
|
||||
|
||||
const handleTemplateClick = (data) => {
|
||||
newEmr();
|
||||
editForm.value = data;
|
||||
nextTick(() => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contextJson));
|
||||
});
|
||||
};
|
||||
const templateEdit = (data) => {
|
||||
editTemplateForm.value = data;
|
||||
templateEditVisible.value = true;
|
||||
};
|
||||
// ====dialog
|
||||
const templateEditVisible = ref(false);
|
||||
// const templateEditSubmitOk = () => {};
|
||||
|
||||
// 打印方法实现
|
||||
const print = async () => {
|
||||
try {
|
||||
// 检查是否有选中的病历模板
|
||||
if (!currentSelectTemplate.value || !currentSelectTemplate.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,
|
||||
// };
|
||||
|
||||
const printData = {
|
||||
// 模板信息
|
||||
templateName: currentSelectTemplate.value.name || '住院病历',
|
||||
templateId: currentSelectTemplate.value.id || '',
|
||||
|
||||
// 医生信息
|
||||
doctorName: userStore.nickName,
|
||||
|
||||
// 患者信息
|
||||
patientName: props.patientInfo.patientName || '',
|
||||
patientId: props.patientInfo.patientId || '',
|
||||
medicalRecordNo: props.patientInfo.medicalRecordNo || '',
|
||||
gender: props.patientInfo.gender || '',
|
||||
age: props.patientInfo.age || '',
|
||||
genderEnum_enumText: props.patientInfo.genderEnum_enumText || '',
|
||||
idCard: props.patientInfo.idCard || '',
|
||||
phone: props.patientInfo.phone || '',
|
||||
registerTime: props.patientInfo.registerTime || '',
|
||||
// 就诊信息
|
||||
encounterId: props.patientInfo.encounterId || '',
|
||||
department: props.patientInfo.department || '',
|
||||
attendingDoctor: props.patientInfo.attendingDoctor || '',
|
||||
|
||||
// 病历信息
|
||||
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'),
|
||||
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
|
||||
// 执行打印
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD, printData);
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
ElMessage.error('打印失败: ' + (error.message || '未知错误'));
|
||||
}
|
||||
};
|
||||
// 辅助函数:将嵌套对象扁平化为单层结构
|
||||
const flattenObject = (obj, prefix = '') => {
|
||||
const flattened = {};
|
||||
|
||||
for (let key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
const newKey = prefix ? `${prefix}_${key}` : key;
|
||||
|
||||
if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {
|
||||
// 递归处理嵌套对象
|
||||
Object.assign(flattened, flattenObject(obj[key], newKey));
|
||||
} else if (Array.isArray(obj[key])) {
|
||||
// 数组转换为字符串
|
||||
flattened[newKey] = JSON.stringify(obj[key]);
|
||||
} else {
|
||||
// 基本类型直接赋值
|
||||
flattened[newKey] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return flattened;
|
||||
};
|
||||
|
||||
// 重新添加被覆盖的函数定义
|
||||
const templateEditSubmitOk = () => {
|
||||
templateEditVisible.value = false;
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
// onBeforeMount(() => {});
|
||||
// 刚进页面默认显示门诊病历
|
||||
const selectDefaultTemplate = () => {
|
||||
nextTick(() => {
|
||||
// 查找门诊病历(1.0.0)节点
|
||||
const findTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findTemplate(node.children);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
// 根据ID查找门诊病历模板
|
||||
if (node.document && node.document.id === '1963474077201162242') {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const defaultTemplate = findTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(async () => {
|
||||
console.log('hospitalizationEmr mounted', userStore);
|
||||
await queryTemplateTree();
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
};
|
||||
const disNode_R = () => {
|
||||
rightShow.value = !rightShow.value;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.emr-use-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
img {
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
}
|
||||
.disBtn {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.disLeftBtnNor {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 18%;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
.disLeftBtnAct {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 0;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
.disRightBtnNor {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 18.5%;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
.disRightBtnAct {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 0;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.template-tree-container {
|
||||
border-right: 1px solid #ebeef5;
|
||||
width: 300px;
|
||||
flex: none;
|
||||
height: 100%;
|
||||
padding: 0 8px 8px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.search-box {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: none;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.template-tree-scrollbar {
|
||||
height: calc(100% - 48px);
|
||||
flex: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.operate-container {
|
||||
width: 100%;
|
||||
//width: 300px;
|
||||
//flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 8px 8px 8px;
|
||||
|
||||
.operate-btns {
|
||||
height: 40px;
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.operate-main {
|
||||
height: calc(100vh - 150px);
|
||||
flex: auto;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.quickly-container {
|
||||
border-left: 1px solid #ebeef5;
|
||||
width: 300px;
|
||||
padding: 0 8px 8px 8px;
|
||||
flex: none;
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.transition-width {
|
||||
transition-property: width;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,210 @@
|
||||
<!-- 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="orderDefinitionName" 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">
|
||||
<el-input-number
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
size="small"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
@change="handleQuantityChange(scope.row)"
|
||||
/>
|
||||
</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 handleQuantityChange = (row) => {
|
||||
if (row.quantity < 1) {
|
||||
row.quantity = 1;
|
||||
}
|
||||
};
|
||||
|
||||
// 删除行处理
|
||||
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>
|
||||
@@ -42,7 +42,7 @@ const props = defineProps({
|
||||
organizationId: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const drawer = ref(false);
|
||||
@@ -59,7 +59,7 @@ function handleOpen() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function handelRadioChange(value){
|
||||
function handelRadioChange(value) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
orderList.value = result.value.personalList;
|
||||
@@ -74,24 +74,14 @@ function handelRadioChange(value){
|
||||
}
|
||||
|
||||
function handleUseOrderGroup(row) {
|
||||
// let value = JSON.parse(row.groupJson);
|
||||
// value = value.map((item) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// conditionId: props.diagnosis.conditionId,
|
||||
// conditionDefinitionId: props.diagnosis.definitionId,
|
||||
// };
|
||||
// });
|
||||
// value.conditionId = props.diagnosis.conditionId;
|
||||
// value.conditionDefinitionId = props.diagnosis.definitionId;
|
||||
emit('useOrderGroup', row.detailList);
|
||||
drawer.value = false;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
getOrderGroup({ organizationId: props.organizationId }).then((res) => {
|
||||
result.value = res.data
|
||||
orderList.value = res.data.organizationList;
|
||||
result.value = res.data;
|
||||
handelRadioChange(queryParams.value.rangeCode);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -76,7 +76,7 @@
|
||||
<div class="medicen-list">
|
||||
<div
|
||||
style="margin-bottom: 3px"
|
||||
v-for="(medItem, index) in item.prescriptionInfoDetail"
|
||||
v-for="(medItem, index) in item.prescriptionInfoDetailList"
|
||||
:key="medItem.requestId"
|
||||
>
|
||||
<span>{{ index + 1 + '. ' }}</span>
|
||||
@@ -104,7 +104,7 @@
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">医师:</span>
|
||||
<span class="item-value"></span>
|
||||
<span class="item-value">{{ item.practitionerName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">收费:</span>
|
||||
@@ -112,7 +112,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">合计:</span>
|
||||
<span class="item-value"></span>
|
||||
<span class="item-value">{{ getTotalPrice(item) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
@@ -139,9 +139,11 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
//高精度库
|
||||
import Decimal from 'decimal.js';
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -154,6 +156,17 @@ const props = defineProps({
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
//合计
|
||||
function getTotalPrice(item) {
|
||||
let totalPrice = new Decimal(0);
|
||||
item.prescriptionInfoDetailList.forEach((medItem) => {
|
||||
const price = new Decimal(medItem.totalPrice);
|
||||
const qty = new Decimal(medItem.quantity);
|
||||
totalPrice = totalPrice.plus(price.times(qty));
|
||||
});
|
||||
return totalPrice.toNumber();
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
@@ -202,4 +215,4 @@ function clickRow(row) {
|
||||
width: 87px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<el-form-item prop="lotNumber" label="药房:">
|
||||
<el-select
|
||||
v-model="scope.row.inventoryId"
|
||||
style="width: 400px; margin-right: 20px"
|
||||
style="width: 330px; margin-right: 20px"
|
||||
placeholder="药房"
|
||||
>
|
||||
<el-option
|
||||
@@ -167,7 +167,11 @@
|
||||
</el-form-item>
|
||||
<span class="medicine-info"> 注射药品:{{ scope.row.injectFlag_enumText }} </span>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
总金额:{{
|
||||
scope.row.totalPrice
|
||||
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
|
||||
: '0.00 元'
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 12px; flex-wrap: wrap">
|
||||
@@ -198,11 +202,7 @@
|
||||
>
|
||||
<template v-for="item in scope.row.unitCodeList" :key="item.value">
|
||||
<el-option
|
||||
v-if="
|
||||
scope.row.unitCodeList.length == 3
|
||||
? item.type == unitMap['minUnit']
|
||||
: item.type == unitMap['unit']
|
||||
"
|
||||
v-if="item.type == unitMap['minUnit']"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
@@ -264,6 +264,8 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
@click="() => (scope.row.methodCode_dictText = dict.label)"
|
||||
@keyup="handleEnter('methodCode', scope.row, scope.$index)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@@ -292,12 +294,14 @@
|
||||
if (!value) {
|
||||
handleEnter('rateCode', scope.row, scope.$index);
|
||||
}
|
||||
// inputRefs.rateCode.blur();
|
||||
}
|
||||
"
|
||||
:ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].rateCode = el; }"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in rate_code"
|
||||
@click="() => (scope.row.rateCode_dictText = dict.label)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@@ -371,7 +375,7 @@
|
||||
>
|
||||
<template v-for="item in scope.row.unitCodeList" :key="item.value">
|
||||
<el-option
|
||||
v-if="item.type != unitMap['dose']"
|
||||
v-if="checkUnit(item, scope.row)"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
@click="
|
||||
@@ -750,7 +754,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
总金额:
|
||||
{{
|
||||
scope.row.totalPrice
|
||||
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
|
||||
: '0.00 元'
|
||||
}}
|
||||
</span>
|
||||
<span style="font-size: 16px; font-weight: 600">
|
||||
<!-- 金额: {{ scope.row.priceList[0].price }} -->
|
||||
@@ -798,7 +807,7 @@
|
||||
<!-- 医嘱类型列 -->
|
||||
<el-table-column label="医嘱类型" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<template v-if="getRowDisabled(scope.row)">
|
||||
<template v-if="scope.row.isEdit">
|
||||
<el-select
|
||||
v-model="scope.row.adviceType"
|
||||
:ref="'adviceTypeRef_' + prescription.id + '_' + scope.$index"
|
||||
@@ -832,7 +841,11 @@
|
||||
:popoverVisible="scope.row.showPopover"
|
||||
:adviceQueryParams="adviceQueryParams"
|
||||
:patientInfo="props.patientInfo"
|
||||
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)"
|
||||
@selectAdviceBase="
|
||||
(row) => {
|
||||
selectAdviceBase(scope.row.uniqueKey, row);
|
||||
}
|
||||
"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
@@ -841,6 +854,7 @@
|
||||
placeholder="请选择项目"
|
||||
@input="handleChange"
|
||||
@click="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
||||
@keydown="handleInputKeyDown(scope.row, $event)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
@@ -964,9 +978,38 @@
|
||||
:patientInfo="props.patientInfo"
|
||||
@userPrescriptionHistory="handleSaveHistory"
|
||||
/>
|
||||
<OrderBindInfo ref="orderBindInfoRef" @submit="handleOrderBindInfo" />
|
||||
</div>
|
||||
<!-- 打印机选择对话框 -->
|
||||
<!-- <el-dialog
|
||||
v-model="isPrinterDialogVisible"
|
||||
title="选择打印机"
|
||||
width="400px"
|
||||
:before-close="cancelPrinter"
|
||||
>
|
||||
<div class="printer-dialog-content">
|
||||
<el-form label-position="top">
|
||||
<el-form-item label="可用打印机">
|
||||
<el-select v-model="selectedPrinter" placeholder="请选择打印机" style="width: 100%">
|
||||
<el-option
|
||||
v-for="printer in printerList"
|
||||
:key="printer.name"
|
||||
:label="printer.name"
|
||||
:value="printer.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="cancelPrinter">取消</el-button>
|
||||
<el-button type="primary" @click="confirmPrinter">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog> -->
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
@@ -981,16 +1024,25 @@ import {
|
||||
updateGroupId,
|
||||
getContract,
|
||||
getAdviceBaseInfo,
|
||||
getActivityBindDevice,
|
||||
getBindDevice,
|
||||
} from '../api';
|
||||
import adviceBaseList from '../adviceBaseList.vue';
|
||||
import { computed, getCurrentInstance, nextTick, watch, unref, reactive } from 'vue';
|
||||
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import OrderGroupDrawer from './orderGroupDrawer';
|
||||
import PrescriptionHistory from './prescriptionHistory';
|
||||
import OrderBindInfo from './orderBindInfo';
|
||||
import Decimal from 'decimal.js';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ArrowDown } from '@element-plus/icons-vue';
|
||||
import { advicePrint } from '@/api/public';
|
||||
// import printUtils, {
|
||||
// PRINT_TEMPLATE,
|
||||
// getPrinterList,
|
||||
// getCachedPrinter,
|
||||
// savePrinterToCache,
|
||||
// } from '@/utils/printUtils';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
@@ -1006,7 +1058,6 @@ const adviceQueryParams = ref({
|
||||
});
|
||||
const rowIndex = ref(-1);
|
||||
const groupIndex = ref(1);
|
||||
const groupIndexList = ref([]);
|
||||
const diagnosisList = ref([]);
|
||||
const nextId = ref(1);
|
||||
const unitCodeList = ref([]);
|
||||
@@ -1047,6 +1098,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const isAdding = ref(false);
|
||||
const isSaving = ref(false);
|
||||
const prescriptionRef = ref();
|
||||
const expandOrder = ref([]); //目前的展开行
|
||||
const stockList = ref([]);
|
||||
@@ -1054,6 +1106,7 @@ const contractList = ref([]);
|
||||
const conditionId = ref('');
|
||||
const accountId = ref('');
|
||||
const checkAll = ref(false);
|
||||
const bindMethod = ref({});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const inputRefs = ref({}); // 存储输入框实例,格式: { rowIndex: { fieldName: el } }
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
@@ -1164,7 +1217,6 @@ watch(
|
||||
() => prescriptionList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
console.log(prescriptionList.value, 'prescriptionList.value');
|
||||
handleTotalAmount();
|
||||
}
|
||||
},
|
||||
@@ -1256,16 +1308,16 @@ function handleAdviceTypeChange(row, index) {
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = prescriptionList.value.reduce((accumulator, currentRow) => {
|
||||
if (currentRow.chargeStatus != 8) {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice || 0);
|
||||
} else {
|
||||
return 0;
|
||||
// 跳过已退费项目,保持累加结果不变
|
||||
return accumulator;
|
||||
}
|
||||
}, 0);
|
||||
}, new Decimal(0));
|
||||
}
|
||||
getList();
|
||||
function getList() {
|
||||
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
||||
// prescriptionList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -1565,6 +1617,16 @@ function clickRow(row, column, cell, event, prescriptionId) {
|
||||
emit('selectDiagnosis', row);
|
||||
}
|
||||
|
||||
function checkUnit(item, row) {
|
||||
if (item.type == 'dose') {
|
||||
return false;
|
||||
} else if (row.partAttributeEnum == '2' && item.type == 'minUnit') {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 行双击打开编辑块,仅待发送的可编辑
|
||||
function clickRowDb(row, event, prescriptionId) {
|
||||
// 如果传入了处方ID,先切换到该处方
|
||||
@@ -1573,9 +1635,7 @@ function clickRowDb(row, event, prescriptionId) {
|
||||
}
|
||||
|
||||
if (row.statusEnum == 1) {
|
||||
row = { ...row, ...JSON.parse(row.contentJson), uniqueKey: row.uniqueKey };
|
||||
row.isEdit = true;
|
||||
row.doseUnitCode == JSON.parse(JSON.stringify(row.minUnitCode));
|
||||
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||
prescriptionList.value[index] = row;
|
||||
// 确保只有当前行展开,先清空数组再添加当前行的uniqueKey
|
||||
@@ -2018,11 +2078,12 @@ function handleDelete(prescriptionId) {
|
||||
let sum = 0; // 未保存总数量
|
||||
for (let i = prescriptionList.value.length - 1; i >= 0; i--) {
|
||||
let deleteItem = prescriptionList.value[i];
|
||||
let index = selectRows.findIndex((item) => item.uniqueKey === deleteItem.uniqueKey);
|
||||
// 通过requestId判断是否已保存,如果选中项未保存 直接从数组中移除,如果已保存,调接口删除
|
||||
if (deleteItem.check && deleteItem.statusEnum == 1 && !deleteItem.requestId) {
|
||||
if (index != -1 && deleteItem.statusEnum == 1 && !deleteItem.requestId) {
|
||||
prescriptionList.value.splice(i, 1);
|
||||
sum++;
|
||||
} else if (deleteItem.check && deleteItem.statusEnum == 1 && deleteItem.requestId) {
|
||||
} else if (index != -1 && deleteItem.statusEnum == 1 && deleteItem.requestId) {
|
||||
deleteList.push({
|
||||
requestId: deleteItem.requestId,
|
||||
dbOpType: '3',
|
||||
@@ -2037,14 +2098,12 @@ function handleDelete(prescriptionId) {
|
||||
adviceQueryParams.value.categoryCode = undefined;
|
||||
if (sum == selectRow.length) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
groupIndexList.value = [];
|
||||
return;
|
||||
}
|
||||
if (deleteList.length > 0) {
|
||||
savePrescription({ adviceSaveList: deleteList }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
groupIndexList.value = [];
|
||||
getListInfo(false);
|
||||
}
|
||||
});
|
||||
@@ -2052,7 +2111,6 @@ function handleDelete(prescriptionId) {
|
||||
proxy.$modal.msgWarning('所选医嘱不可删除,请先撤回后再删除');
|
||||
return;
|
||||
}
|
||||
groupMarkers.value = getGroupMarkers(prescriptionList.value); // 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
}
|
||||
|
||||
// 选择药房/耗材房处理
|
||||
@@ -2173,9 +2231,11 @@ function handleEmrTreatment() {
|
||||
// 病历辅助检查字符串拼接
|
||||
let auxiliaryExamination = '';
|
||||
let auxiliaryExaminationIndex = 1;
|
||||
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
if (item.chargeStatus != 8) {
|
||||
if (item.adviceType == 1) {
|
||||
// 药品处方
|
||||
treatment += '处方[' + (index + 1) + ']' + ' ';
|
||||
treatment += item.adviceName + ' ' + item.volume + ' ';
|
||||
treatment +=
|
||||
@@ -2188,9 +2248,22 @@ function handleEmrTreatment() {
|
||||
item.methodCode_dictText +
|
||||
'; ';
|
||||
treatmentIndex++;
|
||||
} else if (item.adviceType == 2) {
|
||||
// 诊疗项目
|
||||
treatment += '诊疗[' + (index + 1) + ']' + ' ';
|
||||
treatment += item.adviceName + ' ';
|
||||
if (item.quantity) {
|
||||
treatment += '数量:' + item.quantity + item.unitCode_dictText + ' ';
|
||||
}
|
||||
treatment += '频次:' + item.rateCode_dictText + ' ';
|
||||
if (item.methodCode_dictText) {
|
||||
treatment += '方式:' + item.methodCode_dictText + ' ';
|
||||
}
|
||||
treatment += '; ';
|
||||
} else if (item.adviceType == 3) {
|
||||
treatment += '[' + (index + 1) + ']' + ' ';
|
||||
treatment += item.adviceName + '; ';
|
||||
// 检查项目
|
||||
auxiliaryExamination += '[' + (index + 1) + ']' + ' ';
|
||||
auxiliaryExamination += item.adviceName + '; ';
|
||||
auxiliaryExaminationIndex++;
|
||||
}
|
||||
}
|
||||
@@ -2207,23 +2280,79 @@ function handleEmrTreatment() {
|
||||
});
|
||||
}
|
||||
|
||||
function handleClickOutside(row, index) {
|
||||
nextTick(() => {
|
||||
handleSaveSign(row, index);
|
||||
});
|
||||
}
|
||||
function stockFormat(partPercent, unitList, quantity) {
|
||||
let unitCode = unitList.find((item) => {
|
||||
return item.type == 'unit';
|
||||
})?.label;
|
||||
let minUnitCode = unitList.find((item) => {
|
||||
return item.type == 'minUnit';
|
||||
})?.label;
|
||||
|
||||
function stockFormat(partPercent, unit, minUnit, quantity) {
|
||||
let a = quantity % partPercent;
|
||||
let b = Math.floor(quantity / partPercent);
|
||||
console.log(partPercent, unit, minUnit, quantity);
|
||||
|
||||
if (a == 0) {
|
||||
return b + ' ' + unit;
|
||||
return b + ' ' + unitCode;
|
||||
}
|
||||
return b + ' ' + unit + ' ' + a + ' ' + minUnit;
|
||||
return b + ' ' + unitCode + ' ' + a + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
// 处理自动带出的诊疗或者耗材
|
||||
function handleOrderBindInfo(bindIdInfo) {
|
||||
const adviceDefinitionIds = bindIdInfo.map((row) => row.orderDefinitionId);
|
||||
getAdviceBaseInfo({ adviceDefinitionIdParamList: adviceDefinitionIds.join(',') }).then((res) => {
|
||||
const list = res.data.records.map((item) => {
|
||||
const info = bindIdInfo.find((k) => k.orderDefinitionId == item.adviceDefinitionId);
|
||||
return {
|
||||
...item,
|
||||
quantity: info.quantity,
|
||||
unitCode: info.unitCode,
|
||||
};
|
||||
});
|
||||
|
||||
list?.forEach((item) => {
|
||||
rowIndex.value = prescriptionList.value.length;
|
||||
setValue(item);
|
||||
|
||||
// 创建新的处方项目
|
||||
const newRow = {
|
||||
...prescriptionList.value[rowIndex.value],
|
||||
uniqueKey: nextId.value++,
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
accountId: accountId.value,
|
||||
quantity: item.quantity,
|
||||
methodCode: item.methodCode,
|
||||
rateCode: item.rateCode,
|
||||
dispensePerDuration: item.dispensePerDuration,
|
||||
dose: item.dose,
|
||||
doseQuantity: item.doseQuantity,
|
||||
executeNum: 1,
|
||||
unitCode: item.unitCode,
|
||||
unitCode_dictText: item.unitCodeName || '',
|
||||
statusEnum: 1,
|
||||
dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1',
|
||||
conditionId: conditionId.value,
|
||||
conditionDefinitionId: conditionDefinitionId.value,
|
||||
encounterDiagnosisId: encounterDiagnosisId.value,
|
||||
};
|
||||
|
||||
// 计算价格和总量
|
||||
const unitInfo = unitCodeList.value.find((k) => k.value == item.unitCode);
|
||||
if (unitInfo && unitInfo.type == 'minUnit') {
|
||||
newRow.price = newRow.minUnitPrice;
|
||||
newRow.totalPrice = (item.quantity * newRow.minUnitPrice).toFixed(6);
|
||||
newRow.minUnitQuantity = item.quantity;
|
||||
} else {
|
||||
newRow.price = newRow.unitPrice;
|
||||
newRow.totalPrice = (item.quantity * newRow.unitPrice).toFixed(6);
|
||||
newRow.minUnitQuantity = item.quantity * item.partPercent;
|
||||
}
|
||||
|
||||
newRow.contentJson = JSON.stringify(newRow);
|
||||
prescriptionList.value[rowIndex.value] = newRow;
|
||||
});
|
||||
});
|
||||
}
|
||||
// 单行处方保存
|
||||
function handleSaveSign(row, index, prescriptionId) {
|
||||
// 如果传入了处方ID,先切换到该处方
|
||||
@@ -2272,6 +2401,29 @@ function handleSaveSign(row, index, prescriptionId) {
|
||||
|
||||
formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (row.adviceType != 2) {
|
||||
// 1:用法绑东西 2:诊疗绑东西
|
||||
let typeCode = row.adviceType == 1 ? '1' : '2';
|
||||
// 用法字典值/诊疗定义id
|
||||
let itemNo = row.adviceType == 1 ? row.methodCode : row.adviceDefinitionId;
|
||||
getBindDevice({ typeCode: typeCode, itemNo: itemNo }).then((res) => {
|
||||
if (res.data.length == 0) {
|
||||
return;
|
||||
}
|
||||
// 是否需要打开弹窗
|
||||
let openBindDialog = localStorage.getItem('doctor' + userStore.id);
|
||||
if (!JSON.parse(openBindDialog)) {
|
||||
proxy.$refs['orderBindInfoRef'].open(res.data);
|
||||
} else {
|
||||
// 如果弹窗不提示带出的项目,自动带出
|
||||
// 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出
|
||||
if (!bindMethod.value[itemNo]) {
|
||||
handleOrderBindInfo(res.data);
|
||||
bindMethod.value[itemNo] = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
row.isEdit = false;
|
||||
isAdding.value = false;
|
||||
updateExpandOrder([]);
|
||||
@@ -2453,23 +2605,17 @@ function handleSaveBatch(prescriptionId) {
|
||||
function setValue(row) {
|
||||
unitCodeList.value = [];
|
||||
unitCodeList.value.push({ value: row.unitCode, label: row.unitCode_dictText, type: 'unit' });
|
||||
if (row.doseUnitCode != row.minUnitCode) {
|
||||
unitCodeList.value.push({
|
||||
value: row.doseUnitCode,
|
||||
label: row.doseUnitCode_dictText,
|
||||
type: 'dose',
|
||||
});
|
||||
}
|
||||
if (
|
||||
(row.partAttributeEnum == 1 || row.partAttributeEnum == 3) &&
|
||||
row.minUnitCode != row.unitCode
|
||||
) {
|
||||
unitCodeList.value.push({
|
||||
value: row.minUnitCode,
|
||||
label: row.minUnitCode_dictText,
|
||||
type: 'minUnit',
|
||||
});
|
||||
}
|
||||
unitCodeList.value.push({
|
||||
value: row.doseUnitCode,
|
||||
label: row.doseUnitCode_dictText,
|
||||
type: 'dose',
|
||||
});
|
||||
|
||||
unitCodeList.value.push({
|
||||
value: row.minUnitCode,
|
||||
label: row.minUnitCode_dictText,
|
||||
type: 'minUnit',
|
||||
});
|
||||
if (row.adviceType == 2 && row.minUnitCode != row.unitCode) {
|
||||
unitCodeList.value.push({
|
||||
value: row.minUnitCode,
|
||||
@@ -2527,10 +2673,9 @@ function setValue(row) {
|
||||
return item.quantity > 0 && item.locationId == row.positionId;
|
||||
})[0];
|
||||
if (stock == {} || stock == undefined) {
|
||||
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
|
||||
proxy.$modal.msgWarning(row.adviceName + '库存不足,请选择其它库房');
|
||||
return;
|
||||
}
|
||||
// proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
|
||||
// return;
|
||||
}
|
||||
prescriptionList.value[targetIndex].lotNumber = stock.lotNumber;
|
||||
prescriptionList.value[targetIndex].inventoryId = stock.inventoryId;
|
||||
@@ -2539,7 +2684,8 @@ function setValue(row) {
|
||||
prescriptionList.value[targetIndex].positionName = stock.locationName;
|
||||
prescriptionList.value[targetIndex].minUnitPrice = new Decimal(stock.price)
|
||||
.div(row.partPercent)
|
||||
.toFixed(2);
|
||||
.toFixed(6);
|
||||
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
||||
}
|
||||
} else {
|
||||
// 执行科室默认逻辑:优先使用诊疗项目维护的所属科室,如果没有则使用开单科室
|
||||
@@ -2549,34 +2695,11 @@ function setValue(row) {
|
||||
}
|
||||
}
|
||||
|
||||
// 组套保存
|
||||
// 选择组套
|
||||
function handleSaveGroup(orderGroupList) {
|
||||
// orderGroupList.map((item) => {
|
||||
// item.patientId = props.patientInfo.patientId;
|
||||
// item.encounterId = props.patientInfo.encounterId;
|
||||
// item.accountId = accountId.value;
|
||||
// item.dbOpType = item.requestId ? '2' : '1';
|
||||
// item.minUnitQuantity = item.quantity * item.partPercent;
|
||||
// item.conditionId = conditionId.value;
|
||||
// item.conditionDefinitionId = conditionDefinitionId.value;
|
||||
// item.encounterDiagnosisId = encounterDiagnosisId.value;
|
||||
// item.contentJson = JSON.stringify(item);
|
||||
// prescriptionList.value.push(item);
|
||||
// });
|
||||
// let paramList = orderGroupList.map((item) => {
|
||||
// return item.adviceDefinitionId;
|
||||
// });
|
||||
// getAdviceBaseInfo({
|
||||
// adviceDefinitionIdParamList: paramList.join(','),
|
||||
// organizationId: props.patientInfo.orgId,
|
||||
// }).then((res) => {
|
||||
// getOrgList();
|
||||
orderGroupList.forEach((item, index) => {
|
||||
orderGroupList.forEach((item) => {
|
||||
rowIndex.value = prescriptionList.value.length;
|
||||
setValue(item.orderDetailInfos);
|
||||
// let orderGroupValue = orderGroupList.find(
|
||||
// (k) => k.adviceDefinitionId == item.adviceDefinitionId
|
||||
// );
|
||||
|
||||
prescriptionList.value[targetIndex] = {
|
||||
...prescriptionList.value[targetIndex],
|
||||
@@ -2698,7 +2821,7 @@ function escKeyListener(e) {
|
||||
}
|
||||
prescriptionList.value.shift();
|
||||
isAdding.value = false;
|
||||
groupMarkers.value = getGroupMarkers(prescriptionList.value); // 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
getGroupMarkers(); // 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2712,13 +2835,14 @@ function handleSingOut(prescriptionId) {
|
||||
|
||||
let requestIdList = prescriptionList.value
|
||||
.filter((item) => {
|
||||
return item.check && item.statusEnum == 2;
|
||||
return item.statusEnum == 2;
|
||||
})
|
||||
.map((item) => {
|
||||
return item.requestId;
|
||||
});
|
||||
if (requestIdList.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择已签发医嘱撤回');
|
||||
return;
|
||||
}
|
||||
singOut(requestIdList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@@ -2726,12 +2850,11 @@ function handleSingOut(prescriptionId) {
|
||||
getListInfo(false);
|
||||
}
|
||||
});
|
||||
prescriptionRef.value.clearSelection();
|
||||
}
|
||||
|
||||
function handleGroupId(paramList) {
|
||||
updateGroupId(paramList).then(() => {
|
||||
getListInfo(false);
|
||||
});
|
||||
updateGroupId(paramList);
|
||||
}
|
||||
|
||||
// 组合
|
||||
@@ -2747,31 +2870,22 @@ function combination(prescriptionId) {
|
||||
proxy.$modal.msgWarning('至少选择两项');
|
||||
return;
|
||||
}
|
||||
|
||||
// 相同分组用法需要相同
|
||||
let uniqueValues = new Set();
|
||||
// 相同分组诊断需要相同
|
||||
let uniqDiagnosis = new Set();
|
||||
// 相同分组诊断需要相同
|
||||
let uniqInjectFlag = new Set();
|
||||
// 相同状态
|
||||
let statusEnum = new Set();
|
||||
let status = false;
|
||||
let isSave = false;
|
||||
groupIndexList.value.forEach((index) => {
|
||||
if (prescriptionList.value[index].statusEnum == 2) {
|
||||
selectRows.forEach((item) => {
|
||||
if (item.statusEnum == 2) {
|
||||
status = true;
|
||||
}
|
||||
if (prescriptionList.value[index].statusEnum == 1 && !prescriptionList.value[index].requestId) {
|
||||
isSave = true;
|
||||
}
|
||||
uniqueValues.add(prescriptionList.value[index].methodCode);
|
||||
uniqDiagnosis.add(prescriptionList.value[index].diagnosisName);
|
||||
uniqInjectFlag.add(prescriptionList.value[index].injectFlag);
|
||||
uniqueValues.add(item.methodCode);
|
||||
uniqDiagnosis.add(item.diagnosisName);
|
||||
statusEnum.add(item.statusEnumf);
|
||||
});
|
||||
// 校验是否有已签发的医嘱
|
||||
if (isSave) {
|
||||
proxy.$modal.msgWarning('请先保存当前医嘱后再进行分组');
|
||||
return;
|
||||
}
|
||||
if (status) {
|
||||
proxy.$modal.msgWarning('已签发医嘱不允许分组');
|
||||
return;
|
||||
@@ -2784,28 +2898,31 @@ function combination(prescriptionId) {
|
||||
proxy.$modal.msgWarning('同一分组诊断必须相同');
|
||||
return;
|
||||
}
|
||||
if (uniqInjectFlag.size != 1) {
|
||||
proxy.$modal.msgWarning('同一分组必须全部为输液药品');
|
||||
if (statusEnum.size != 1) {
|
||||
proxy.$modal.msgWarning('不同状态医嘱无法组合');
|
||||
return;
|
||||
}
|
||||
// 获取当前时间戳拼接组号做唯一组号
|
||||
let timestamp = Date.now().toString();
|
||||
let updateList = [];
|
||||
groupIndexList.value.forEach((index) => {
|
||||
|
||||
selectRows.forEach((item) => {
|
||||
// 直接更新表格数据中的groupId
|
||||
const index = prescriptionList.value.findIndex((row) => row.uniqueKey === item.uniqueKey);
|
||||
if (index !== -1) {
|
||||
prescriptionList.value[index].groupId = timestamp + groupIndex.value;
|
||||
}
|
||||
updateList.push({
|
||||
requestId: prescriptionList.value[index].requestId,
|
||||
requestId: item.requestId,
|
||||
groupId: timestamp + groupIndex.value,
|
||||
});
|
||||
// prescriptionList.value[index].groupId = JSON.parse(JSON.stringify(groupIndex.value));
|
||||
prescriptionList.value[index].check = false;
|
||||
});
|
||||
// 更新组号
|
||||
handleGroupId({ groupList: updateList });
|
||||
// 根据组号排序
|
||||
sortPrescriptionList();
|
||||
groupMarkers.value = getGroupMarkers(prescriptionList.value); // 更新标记
|
||||
groupIndex.value++;
|
||||
groupIndexList.value = [];
|
||||
if (selectRows[0].statusEnum == 1 && selectRows[0].requestId) {
|
||||
// 更新组号
|
||||
handleGroupId({ groupList: updateList });
|
||||
}
|
||||
prescriptionRef.value.clearSelection();
|
||||
getGroupMarkers(); // 更新标记
|
||||
}
|
||||
|
||||
// 拆组
|
||||
@@ -2819,84 +2936,51 @@ function split(prescriptionId) {
|
||||
proxy.$modal.msgWarning('至少选择一项');
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取选中的所有行
|
||||
const selectedRows = groupIndexList.value.map((index) => prescriptionList.value[index]);
|
||||
|
||||
// 校验是否包含已签发的医嘱
|
||||
if (selectedRows.some((row) => row.statusEnum === 2)) {
|
||||
if (selectRows.some((row) => row.statusEnum === 2)) {
|
||||
proxy.$modal.msgWarning('已签发医嘱不允许拆组');
|
||||
return;
|
||||
}
|
||||
|
||||
// 提取出这些行涉及的所有 groupId
|
||||
const selectedGroupIds = [...new Set(selectedRows.map((row) => row.groupId).filter(Boolean))];
|
||||
if (selectedGroupIds.length === 0) {
|
||||
if (selectRows.length === 0) {
|
||||
proxy.$modal.msgWarning('请选择已分组的医嘱');
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建最终要更新的列表
|
||||
let updateList = [];
|
||||
|
||||
// 遍历每个 groupId
|
||||
selectedGroupIds.forEach((groupId) => {
|
||||
// 当前分组下所有的医嘱
|
||||
const groupItems = prescriptionList.value.filter((item) => item.groupId === groupId);
|
||||
|
||||
// 当前分组中被选中的医嘱
|
||||
const selectedInGroup = selectedRows.filter((row) => row.groupId === groupId);
|
||||
|
||||
// 如果选中数 = 总数 - 1 → 拆掉整个分组
|
||||
if (selectedInGroup.length === groupItems.length - 1) {
|
||||
updateList.push(
|
||||
...groupItems.map((item) => ({
|
||||
requestId: item.requestId,
|
||||
groupId: '',
|
||||
}))
|
||||
);
|
||||
} else {
|
||||
// 否则只更新选中的
|
||||
updateList.push(
|
||||
...selectedInGroup.map((item) => ({
|
||||
requestId: item.requestId,
|
||||
groupId: '',
|
||||
}))
|
||||
);
|
||||
selectRows.forEach((item) => {
|
||||
// 直接更新表格数据中的groupId
|
||||
const index = prescriptionList.value.findIndex((row) => row.uniqueKey === item.uniqueKey);
|
||||
if (index !== -1) {
|
||||
prescriptionList.value[index].groupId = undefined;
|
||||
}
|
||||
updateList.push({
|
||||
requestId: item.requestId,
|
||||
groupId: null,
|
||||
});
|
||||
});
|
||||
|
||||
// 清除本地数据中的 groupId
|
||||
prescriptionList.value.forEach((item) => {
|
||||
if (updateList.some((u) => u.requestId === item.requestId)) {
|
||||
item.groupId = undefined;
|
||||
item.check = false; // 取消勾选
|
||||
}
|
||||
});
|
||||
|
||||
// 更新分组号
|
||||
handleGroupId({ groupList: updateList });
|
||||
|
||||
if (selectRows[0].statusEnum == 1 && selectRows[0].requestId) {
|
||||
// 更新组号
|
||||
handleGroupId({ groupList: updateList });
|
||||
}
|
||||
prescriptionRef.value.clearSelection();
|
||||
// 更新分组标记
|
||||
groupMarkers.value = getGroupMarkers(prescriptionList.value);
|
||||
|
||||
// 排序保持一致性
|
||||
sortPrescriptionList();
|
||||
|
||||
// 清空选中索引
|
||||
groupIndexList.value = [];
|
||||
|
||||
getGroupMarkers();
|
||||
proxy.$modal.msgSuccess('拆组成功');
|
||||
}
|
||||
// 分组标记处理
|
||||
function getGroupMarkers(prescriptionList) {
|
||||
const groupMap = {};
|
||||
const markers = [];
|
||||
function getGroupMarkers() {
|
||||
// 初始化所有行的 groupIcon 为 null
|
||||
prescriptionList.value.forEach((item) => {
|
||||
item.groupIcon = null;
|
||||
});
|
||||
|
||||
// 遍历处方列表,记录每组的索引范围(忽略无 groupId 的项)
|
||||
prescriptionList.forEach((item, index) => {
|
||||
// 创建一个映射来存储每个 groupId 对应的行索引
|
||||
const groupMap = {};
|
||||
|
||||
// 遍历处方列表,按 groupId 分组(忽略无 groupId 的项)
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
if (!item.groupId) {
|
||||
markers[index] = null; // 没有组号的标记为 null
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2906,37 +2990,36 @@ function getGroupMarkers(prescriptionList) {
|
||||
groupMap[item.groupId].push(index);
|
||||
});
|
||||
|
||||
// 根据每组的索引范围设置标记
|
||||
// 为每个组设置 groupIcon
|
||||
Object.values(groupMap).forEach((indices) => {
|
||||
if (indices.length === 1) {
|
||||
// 单个组成员,显示上下括号
|
||||
markers[indices[0]] = 'all';
|
||||
} else {
|
||||
// 只有当组内元素大于1个时才需要显示分组标记
|
||||
if (indices.length > 1) {
|
||||
indices.forEach((index, i) => {
|
||||
if (i === 0) {
|
||||
markers[index] = '┏';
|
||||
// 第一行
|
||||
prescriptionList.value[index].groupIcon = '┏';
|
||||
} else if (i === indices.length - 1) {
|
||||
markers[index] = '┗';
|
||||
// 最后一行
|
||||
prescriptionList.value[index].groupIcon = '┗';
|
||||
} else {
|
||||
markers[index] = '┃';
|
||||
// 中间行
|
||||
prescriptionList.value[index].groupIcon = '┃';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return markers;
|
||||
}
|
||||
const groupMarkers = ref([]);
|
||||
|
||||
// 计算总价
|
||||
function calculateTotalPrice(row, index) {
|
||||
nextTick(() => {
|
||||
if (row.adviceType == 3) {
|
||||
row.totalPrice = (row.unitPrice * row.quantity * 100) / 100;
|
||||
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
|
||||
} else {
|
||||
if (row.unitCode == row.minUnitCode) {
|
||||
row.totalPrice = row.minUnitPrice * row.quantity;
|
||||
row.totalPrice = (row.minUnitPrice * row.quantity).toFixed(6);
|
||||
} else {
|
||||
row.totalPrice = (row.unitPrice * row.quantity * 100) / 100;
|
||||
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2945,7 +3028,7 @@ function calculateTotalPrice(row, index) {
|
||||
// 单位切换时 自动计算对应单位的总量
|
||||
function convertValues(row, index) {
|
||||
nextTick(() => {
|
||||
let code = unitCodeList.value.filter((item) => {
|
||||
let code = row.unitCodeList.filter((item) => {
|
||||
return item.value == row.doseUnitCode;
|
||||
})[0];
|
||||
|
||||
@@ -2966,13 +3049,13 @@ function convertValues(row, index) {
|
||||
break;
|
||||
}
|
||||
});
|
||||
calculateTotalAmount(row, index);
|
||||
// calculateTotalAmount(row, index);
|
||||
}
|
||||
|
||||
// 单次剂量数量改变时自动计算总量
|
||||
function convertDoseValues(row, index) {
|
||||
nextTick(() => {
|
||||
let code = unitCodeList.value.filter((item) => {
|
||||
let code = row.unitCodeList.filter((item) => {
|
||||
return item.value == row.doseUnitCode;
|
||||
})[0];
|
||||
|
||||
@@ -2993,7 +3076,7 @@ function convertDoseValues(row, index) {
|
||||
break;
|
||||
}
|
||||
});
|
||||
calculateTotalAmount(row, index);
|
||||
// calculateTotalAmount(row, index);
|
||||
}
|
||||
|
||||
// 总量计算,仅适用只有两种单位的情况
|
||||
@@ -3002,7 +3085,7 @@ function calculateTotalAmount(row, index) {
|
||||
// 项目为西药或中成药时,根据用药天数和用药频次自动计算总量
|
||||
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||
if (row.rateCode && row.dispensePerDuration) {
|
||||
// 根据用药天数和用药频次计算数量
|
||||
// 根据用药天数和用药频次计算数量,医生按顺序填的情况
|
||||
let count = calculateQuantityByDays(row.rateCode, row.dispensePerDuration);
|
||||
if (count) {
|
||||
let quantity;
|
||||
@@ -3038,6 +3121,13 @@ function calculateTotalAmount(row, index) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (row.quantity) {
|
||||
// 如果医生开药先填总量 直接计算总价格
|
||||
if (row.unitCode == row.minUnitCode) {
|
||||
prescriptionList.value[index].totalPrice = (row.quantity * row.minUnitPrice).toFixed(6);
|
||||
} else {
|
||||
prescriptionList.value[index].totalPrice = (row.quantity * row.unitPrice).toFixed(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -3577,11 +3667,12 @@ function getSignedPrescriptionInfo() {
|
||||
|
||||
defineExpose({ getListInfo, getDiagnosisInfo, getSignedPrescriptionInfo });
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -3623,6 +3714,7 @@ defineExpose({ getListInfo, getDiagnosisInfo, getSignedPrescriptionInfo });
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
@@ -3683,4 +3775,4 @@ defineExpose({ getListInfo, getDiagnosisInfo, getSignedPrescriptionInfo });
|
||||
display: inline-block !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
>
|
||||
<div class="footer">
|
||||
<div class="statistics">
|
||||
<span>共 {{ total }} 个项目</span>
|
||||
<span> 共 </span>
|
||||
<el-tag type="danger" style="font-size: 20px">{{ total }}</el-tag>
|
||||
<span> 个项目 </span>
|
||||
<!-- <span class="total">合计金额:¥ {{ totalAmount.toFixed(2) }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,6 +40,7 @@
|
||||
v-loading="tableLoading"
|
||||
border
|
||||
height="600"
|
||||
:span-method="tableSpanMethod"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
@@ -50,14 +53,15 @@
|
||||
}
|
||||
"
|
||||
/>
|
||||
<el-table-column label="支付单据号" align="center" prop="paymentId" width="180" />
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" />
|
||||
<el-table-column label="项目名" align="center" prop="itemName" />
|
||||
<el-table-column label="项目名" align="center" prop="itemName" width="180" />
|
||||
<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="default">
|
||||
<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>
|
||||
@@ -110,7 +114,7 @@ const props = defineProps({
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
const emit = defineEmits(['close', 'refresh']);
|
||||
const total = ref(0);
|
||||
const tableLoading = ref(false);
|
||||
const queryParams = ref({
|
||||
@@ -126,7 +130,6 @@ const totalAmount = ref(0);
|
||||
function openDialog() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function getList() {
|
||||
refundList.value = [];
|
||||
tableLoading.value = true;
|
||||
@@ -140,6 +143,40 @@ function getList() {
|
||||
});
|
||||
}
|
||||
|
||||
// 计算相同支付单据号的行合并信息(仅对相邻行生效)
|
||||
const paymentIdRowSpans = computed(() => {
|
||||
const data = refundList.value || [];
|
||||
const spans = [];
|
||||
let index = 0;
|
||||
while (index < data.length) {
|
||||
let next = index + 1;
|
||||
while (next < data.length && data[next].paymentId === data[index].paymentId) {
|
||||
next++;
|
||||
}
|
||||
const groupSize = next - index;
|
||||
spans[index] = groupSize; // 首行显示合并行数
|
||||
for (let i = index + 1; i < next; i++) {
|
||||
spans[i] = 0; // 其余行隐藏
|
||||
}
|
||||
index = next;
|
||||
}
|
||||
return spans;
|
||||
});
|
||||
|
||||
function tableSpanMethod({ row, column, rowIndex }) {
|
||||
// 仅合并“支付单据号”列
|
||||
if (column && column.property === 'paymentId') {
|
||||
const rowspan = paymentIdRowSpans.value[rowIndex] ?? 1;
|
||||
return { rowspan, colspan: rowspan > 0 ? 1 : 0 };
|
||||
}
|
||||
// 仅合并“处方号”列
|
||||
if (column && column.property === 'prescriptionNo') {
|
||||
const rowspan = paymentIdRowSpans.value[rowIndex] ?? 1;
|
||||
return { rowspan, colspan: rowspan > 0 ? 1 : 0 };
|
||||
}
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
function submit() {
|
||||
// 1. 获取当前选中行并提取去重的 paymentId 列表
|
||||
const selectedRows = proxy.$refs['refundListRef'].getSelectionRows();
|
||||
@@ -162,6 +199,7 @@ function submit() {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
emit('refresh');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-04-09 17:55:05
|
||||
* @Description:
|
||||
*/
|
||||
// import { IInPatient } from '@/model/IInPatient'
|
||||
import { ref } from 'vue';
|
||||
|
||||
// 定义护士等级(没接口前mock)
|
||||
export const nursingLevel = ref('0');
|
||||
|
||||
export function updateNursingLevel(level) {
|
||||
nursingLevel.value = level;
|
||||
}
|
||||
|
||||
// 选择患者信息
|
||||
export const patientInfo = ref();
|
||||
export function updatePatientInfo(info) {
|
||||
patientInfo.value = info;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@
|
||||
<el-date-picker
|
||||
v-model="registerTime"
|
||||
@change="handleTimeChange"
|
||||
type="daterange"
|
||||
type="date"
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
:clearable="false"
|
||||
placeholder="挂号时间"
|
||||
@@ -78,8 +78,8 @@
|
||||
</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 +
|
||||
@@ -88,13 +88,47 @@
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
patientInfo.contractName
|
||||
patientInfo.contractName +
|
||||
'/' +
|
||||
patientInfo.phone
|
||||
: '-'
|
||||
}}
|
||||
</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="250">
|
||||
{{ userStore.nickName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
|
||||
暂离
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
|
||||
退费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="getEnPrescription(patientInfo.encounterId)"
|
||||
>
|
||||
处方单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="
|
||||
() => {
|
||||
openDialog = true;
|
||||
}
|
||||
"
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
@@ -145,6 +179,13 @@
|
||||
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"
|
||||
@@ -174,14 +215,16 @@
|
||||
:patientInfo="patientInfo"
|
||||
ref="prescriptionRef"
|
||||
:activeTab="activeTab"
|
||||
:outpatientEmrSaved="outpatientEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<!-- <el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
-->
|
||||
</el-tabs>
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
@@ -193,6 +236,7 @@
|
||||
:open="openRefundListDialog"
|
||||
:encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false"
|
||||
@refresh="() => prescriptionRef.getListInfo()"
|
||||
/>
|
||||
<HospitalizationDialog
|
||||
:open="openDialog"
|
||||
@@ -208,6 +252,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import Emr from './components/emr/emr.vue';
|
||||
import {
|
||||
getList,
|
||||
@@ -222,13 +267,14 @@ import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import Diagnosis from './components/diagnosis/diagnosis.vue';
|
||||
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
import eprescriptionlist from './components/eprescriptionlist.vue';
|
||||
// import eprescriptionlist from './components/eprescriptionlist.vue';
|
||||
import HospitalizationDialog from './components/hospitalizationDialog.vue';
|
||||
import tcmAdvice from './components/tcm/tcmAdvice.vue';
|
||||
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';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -257,15 +303,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 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();
|
||||
@@ -279,12 +328,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();
|
||||
// const eprescriptionRef = ref();
|
||||
onMounted(() => {
|
||||
getWaitPatient();
|
||||
});
|
||||
|
||||
getPatientList();
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
@@ -373,9 +451,9 @@ function handleClick(tab) {
|
||||
case 'tcm':
|
||||
tcmRef.value.getDiagnosisInfo();
|
||||
break;
|
||||
case 'eprescription':
|
||||
eprescriptionRef.value.getList();
|
||||
break;
|
||||
// case 'eprescription':
|
||||
// eprescriptionRef.value.getList();
|
||||
// break;
|
||||
}
|
||||
// if (tab != 'emr') {
|
||||
// if (!saveStatus.value) {
|
||||
@@ -393,6 +471,11 @@ function handleClick(tab) {
|
||||
|
||||
// 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息)
|
||||
function getEnPrescription(encounterId) {
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
// 检查是否有选中的患者
|
||||
if (!patientInfo.value || !patientInfo.value.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
@@ -470,6 +553,9 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
// 将患者信息保存到store中,供hospitalizationEmr组件使用
|
||||
updatePatientInfo(item);
|
||||
activeTab.value = 'hospitalizationEmr';
|
||||
|
||||
// 优先使用数据库中保存的初复诊值
|
||||
if (item.visitType) {
|
||||
@@ -489,7 +575,7 @@ function handleCardClick(item, index) {
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
diagnosisRef.value.getList();
|
||||
eprescriptionRef.value.getList();
|
||||
// eprescriptionRef.value.getList();
|
||||
emrRef.value.getDetail(item.encounterId);
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
@@ -520,8 +606,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();
|
||||
}
|
||||
|
||||
@@ -534,6 +620,11 @@ function handleReceive(row) {
|
||||
getWaitPatient();
|
||||
}
|
||||
|
||||
// 处理门诊病历保存成功事件
|
||||
function handleEmrSaved(isSaved) {
|
||||
outpatientEmrSaved.value = isSaved;
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
@@ -564,6 +655,16 @@ function handleCancelEncounter(){
|
||||
</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",
|
||||
|
||||
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<div
|
||||
class="app-container"
|
||||
style="border: 1px solid #e0e0e0; border-radius: 4px; box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1)"
|
||||
>
|
||||
<el-row :gutter="10" justify="end" align="middle" style="margin-bottom: 10px">
|
||||
<el-button type="danger" plain icon="Refresh" @click="handleSendDrug" :disabled="!encounterId"
|
||||
>发药</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport" :disabled="!encounterId"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Refresh"
|
||||
@click="handleDispense"
|
||||
:disabled="!encounterId"
|
||||
>退药</el-button
|
||||
>
|
||||
</el-row>
|
||||
<div class="tableContainer">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="displayTableData"
|
||||
style="width: 100%; height: 70vh"
|
||||
border
|
||||
stripe
|
||||
:header-cell-style="headerCellStyle"
|
||||
:row-style="rowStyle"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 基础信息 -->
|
||||
<el-table-column prop="itemName" label="项目名称" min-width="120" />
|
||||
<el-table-column prop="totalVolume" label="规格" min-width="100" />
|
||||
<el-table-column prop="locationName" label="发放药房" min-width="100" />
|
||||
<el-table-column prop="lotNumber" label="批次号" min-width="100" />
|
||||
<el-table-column prop="departmentName" label="科室" min-width="100" />
|
||||
<el-table-column prop="doctorName" label="开单医生" min-width="100" />
|
||||
<el-table-column prop="dispenseDoctorName" label="发药医生" min-width="100" />
|
||||
<el-table-column prop="itemType_dictText" label="项目类型" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemType_dictText || scope.row.itemType || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="statusEnum_enumText" label="发药状态" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.statusEnum_enumText || scope.row.statusEnum || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="conditionName" label="诊断名称" min-width="100" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" min-width="120" />
|
||||
|
||||
<!-- 用药信息 -->
|
||||
<el-table-column prop="dose" label="单次剂量" min-width="100" />
|
||||
<el-table-column prop="rateCode_dictText" label="用药频次" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.rateCode_dictText || scope.row.rateCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="methodCode_dictText" label="用法" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.methodCode_dictText || scope.row.methodCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="doseUnitCode_dictText" label="剂量单位" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.doseUnitCode_dictText || scope.row.doseUnitCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unitCode_dictText" label="单位" min-width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCode_dictText || scope.row.unitCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dispensePerQuantity" label="单次发药数" min-width="100" />
|
||||
<el-table-column prop="dispensePerDuration" label="每次发药供应天数" min-width="150" />
|
||||
<el-table-column prop="quantity" label="数量" min-width="80" />
|
||||
<el-table-column prop="unitPrice" label="单价" min-width="80" />
|
||||
<el-table-column prop="totalPrice" label="金额" min-width="80" />
|
||||
|
||||
<!-- 其他信息 -->
|
||||
<el-table-column prop="manufacturerText" label="生产厂家" min-width="150" />
|
||||
<el-table-column prop="traceNo" label="追溯码" min-width="120" />
|
||||
<el-table-column prop="encounterBusNo" label="就诊NO" min-width="120" />
|
||||
<el-table-column prop="reqAuthoredTime" label="开具日期" min-width="150">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.reqAuthoredTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="skinTestFlag" label="皮试标志" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.skinTestFlag === 1 ? '是' : scope.row.skinTestFlag === 0 ? '否' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="tcmFlag" label="中药标识" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.tcmFlag === 1 ? '是' : scope.row.tcmFlag === 0 ? '否' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="itemTable" label="所在表" min-width="100" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { totalSendDrug, totalReturnDrug } from './api';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(['call-medication-summary-detail']);
|
||||
// 定义props,接收父组件传递的表格数据和选中的ID
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
encounterId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// 定义响应式数据
|
||||
const selectedRows = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
// 计算属性,直接使用props.tableData,并添加日志用于调试
|
||||
const displayTableData = computed(() => {
|
||||
return props.tableData;
|
||||
});
|
||||
|
||||
// 处理表格选择变化
|
||||
function handleSelectionChange(rows) {
|
||||
selectedRows.value = rows;
|
||||
}
|
||||
|
||||
// 格式化日期
|
||||
function formatDate(dateTime) {
|
||||
if (!dateTime) return '-';
|
||||
|
||||
const date = new Date(dateTime);
|
||||
if (isNaN(date.getTime())) return '-';
|
||||
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
// 监听props.tableData变化,当外部数据变化时清空选中状态
|
||||
watch(
|
||||
() => props.tableData,
|
||||
() => {
|
||||
selectedRows.value = [];
|
||||
}
|
||||
);
|
||||
|
||||
// 表格样式
|
||||
const headerCellStyle = {
|
||||
backgroundColor: '#f5f7fa',
|
||||
color: '#333',
|
||||
fontWeight: 'bold',
|
||||
height: '48px',
|
||||
textAlign: 'center',
|
||||
lineHeight: '48px',
|
||||
padding: '0',
|
||||
fontSize: '14px',
|
||||
};
|
||||
|
||||
const rowStyle = {
|
||||
height: '40px',
|
||||
};
|
||||
// 发药功能
|
||||
const handleSendDrug = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择需要发药的数据');
|
||||
return;
|
||||
}
|
||||
let data = [];
|
||||
selectedRows.value.forEach((row) => {
|
||||
data.push({
|
||||
dispenseId: row.dispenseId,
|
||||
});
|
||||
});
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要发药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const response = await totalSendDrug(data);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('发药成功');
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
// 导出功能
|
||||
const handleExport = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
if (displayTableData.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可导出');
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择要导出的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
// 这里可以实现导出逻辑
|
||||
console.log('导出数据:', selectedRows.value);
|
||||
ElMessage.success('导出成功');
|
||||
};
|
||||
|
||||
// 退药功能
|
||||
const handleDispense = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择需要退药的数据');
|
||||
return;
|
||||
}
|
||||
let data = [];
|
||||
selectedRows.value.forEach((row) => {
|
||||
data.push({
|
||||
dispenseId: row.dispenseId,
|
||||
});
|
||||
});
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要退药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const response = await totalReturnDrug(data);
|
||||
emit('call-medication-summary-detail', props.encounterId);
|
||||
console.log(response);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('退药成功');
|
||||
loading.value = false;
|
||||
// 通知父组件刷新明细数据
|
||||
emit('call-medication-summary-detail', props.encounterId);
|
||||
} else {
|
||||
console.log(response.message);
|
||||
ElMessage.error('退药失败');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 定义暴露给父组件的数据和方法
|
||||
defineExpose({
|
||||
selectedRows,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.tableContainer {
|
||||
flex: 1;
|
||||
overflow-x: auto; /* 启用横向滚动 */
|
||||
overflow-y: auto; /* 同时启用纵向滚动 */
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
|
||||
:deep(.el-table) {
|
||||
height: 100%;
|
||||
|
||||
.el-table__header {
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
height: 48px !important;
|
||||
line-height: 48px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__row:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div
|
||||
class="app-container"
|
||||
style="border: 1px solid #e0e0e0; border-radius: 4px; box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1)"
|
||||
>
|
||||
<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 class="tableContainer">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%; height: 70vh"
|
||||
:header-cell-style="headerCellStyle"
|
||||
:row-style="rowStyle"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column prop="currentIndex" label="序号" min-width="60" />
|
||||
<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">
|
||||
<el-tag v-if="scope.row.quantity" size="mini">
|
||||
{{ scope.row.quantity }}
|
||||
</el-tag>
|
||||
<el-tag v-if="scope.row.maxUnitCode_dictText" size="mini" type="danger">
|
||||
{{ scope.row.maxUnitCode_dictText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sourceLocationName" label="发放地点" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.sourceLocationName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="manufacturerText" label="生产厂家" min-width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.manufacturerText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="busNo" label="单据号" min-width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.busNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { totalSendDrug } from './api.js';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 定义组件属性
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
selectedId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
busNo: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// 定义响应式数据
|
||||
const selectedRows = ref([]);
|
||||
// 定义loading状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 表格样式
|
||||
const headerCellStyle = {
|
||||
backgroundColor: '#f5f7fa',
|
||||
color: '#333',
|
||||
fontWeight: 'bold',
|
||||
height: '48px',
|
||||
textAlign: 'center',
|
||||
lineHeight: '48px',
|
||||
padding: '0',
|
||||
fontSize: '14px',
|
||||
};
|
||||
|
||||
const rowStyle = {
|
||||
height: '40px',
|
||||
};
|
||||
|
||||
// 发药功能
|
||||
const handleSendDrug = () => {
|
||||
if (!props.busNo) {
|
||||
ElMessage.warning('请先选择单据号');
|
||||
return;
|
||||
}
|
||||
let data = [{ busNo: props.busNo }];
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要发药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const response = await totalSendDrug(data);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('发药成功');
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 定义暴露给父组件的数据和方法
|
||||
defineExpose({
|
||||
selectedRows,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.tableContainer {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
|
||||
:deep(.el-table) {
|
||||
height: 100%;
|
||||
|
||||
.el-table__header {
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
height: 48px !important;
|
||||
lineheight: 48px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__row:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,123 @@
|
||||
import request from '@/utils/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',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院汇总发药单右侧
|
||||
export function getFromDetailList (queryParams) {
|
||||
return request ({
|
||||
url: 'pharmacy-manage/summary-dispense-medicine/from-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 明细左侧
|
||||
export function getEncounterList (queryParams) {
|
||||
return request ({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/encounter-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
//明细 右侧
|
||||
export function getMedicationSummaryDetail (queryParams) {
|
||||
return request ({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medication_summary-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
//以下是组件的接口
|
||||
|
||||
/**
|
||||
* 获取住院患者列表
|
||||
*/
|
||||
export function getPatientList (queryParams) {
|
||||
return request ({
|
||||
url: '/nurse-station/advice-process/inpatient',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人管理病区
|
||||
*/
|
||||
export function getWardList (queryParams) {
|
||||
return request ({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前选中患者全部医嘱
|
||||
*/
|
||||
export function getPrescriptionList (queryParams) {
|
||||
return request ({
|
||||
url: '/nurse-station/advice-process/inpatient-advice',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行医嘱
|
||||
*/
|
||||
export function adviceExecute (data) {
|
||||
return request ({
|
||||
url: '/nurse-station/advice-process/advice-execute',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消执行医嘱
|
||||
*/
|
||||
export function adviceCancel (data) {
|
||||
return request ({
|
||||
url: '/nurse-station/advice-process/advice-cancel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细发药
|
||||
*
|
||||
*/
|
||||
export function totalSendDrug (data) {
|
||||
return request ({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/summary-dispense-medicine',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 明细退药
|
||||
*/
|
||||
export function totalReturnDrug (data) {
|
||||
return request ({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,456 @@
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import MedicationTable from './components/MedicationTable.vue';
|
||||
import DetailMedicationTable from './components/DetailMedicationTable.vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import {
|
||||
getFromSummaryList,
|
||||
getEncounterList,
|
||||
getMedicationSummaryDetail,
|
||||
getFromDetailList,
|
||||
} from './components/api';
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(false);
|
||||
const patientList = ref([]);
|
||||
const total = ref(0);
|
||||
const showSearch = ref(true);
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
searchKey: '',
|
||||
statusEnum: '',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
windowDataText: '',
|
||||
medicationListText: '',
|
||||
timeRange: 1,
|
||||
});
|
||||
const queryParamsPatient = ref({
|
||||
searchKey: '',
|
||||
statusEnum: '1',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
// 日期范围
|
||||
const dateRange = ref([
|
||||
new Date().toISOString().split('T')[0],
|
||||
new Date().toISOString().split('T')[0],
|
||||
]);
|
||||
|
||||
// 发药状态选项
|
||||
const dispenseStatusOptions = ref([
|
||||
{ label: '待发药', value: '1' },
|
||||
{ label: '已发药', value: '2' },
|
||||
{ label: '全部', value: '0' },
|
||||
]);
|
||||
|
||||
// 加载患者列表数据
|
||||
async function getList() {
|
||||
if (dateRange.value == null) {
|
||||
proxy.$message.warning('请选择日期');
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
let response;
|
||||
// 构建查询参数 - 只保留必要的分页和筛选条件
|
||||
const params = {
|
||||
searchKey: queryParamsPatient.value.searchKey,
|
||||
statusEnum: queryParamsPatient.value.statusEnum,
|
||||
pageNo: queryParamsPatient.value.pageNo,
|
||||
pageSize: queryParamsPatient.value.pageSize,
|
||||
startTime: dateRange.value[0],
|
||||
endTime: dateRange.value[1],
|
||||
};
|
||||
// 根据当前标签页调用不同的接口
|
||||
if (selectType.value === 'total') {
|
||||
// 汇总标签页
|
||||
response = await getFromSummaryList(params);
|
||||
patientList.value = response.data;
|
||||
total.value = response.data.length || 0;
|
||||
} else {
|
||||
// 明细标签页
|
||||
response = await getEncounterList(params);
|
||||
patientList.value = response.data.records;
|
||||
total.value = response.data.total || 0;
|
||||
}
|
||||
} catch (error) {
|
||||
patientList.value = [];
|
||||
total.value = 0;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索处理
|
||||
async function handleQuery() {
|
||||
queryParamsPatient.value.pageNo = 1; // 重置为第一页
|
||||
await getList();
|
||||
}
|
||||
const busNo = ref('');
|
||||
const encounterId = ref('');
|
||||
// 处理表格行点击
|
||||
function handleCurrentChange(row) {
|
||||
busNo.value = row.busNo;
|
||||
encounterId.value = row.encounterId;
|
||||
if (selectType.value === 'total') {
|
||||
// 汇总标签页
|
||||
callSummaryMedicationDetail(row.busNo);
|
||||
} else {
|
||||
// 明细标签页
|
||||
callMedicationSummaryDetail(row.encounterId);
|
||||
}
|
||||
}
|
||||
|
||||
// 明细标签页
|
||||
async function callMedicationSummaryDetail(encounterId) {
|
||||
console.log('点击明细标签页', encounterId);
|
||||
// 显示加载提示
|
||||
loading.value = true;
|
||||
try {
|
||||
const params = {
|
||||
encounterId,
|
||||
};
|
||||
|
||||
const response = await getMedicationSummaryDetail(params);
|
||||
// 处理药品汇总详情数据
|
||||
handleMedicationSummaryDetail(response.data);
|
||||
} catch (error) {
|
||||
ElMessage.error('获取药品汇总详情失败:' + (error.message || '未知错误'));
|
||||
// 发生错误时清空数据
|
||||
handleMedicationSummaryDetail([]);
|
||||
} finally {
|
||||
// 无论成功失败都关闭加载状态
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 汇总标签页
|
||||
async function callSummaryMedicationDetail(busNo) {
|
||||
// 显示加载提示
|
||||
loading.value = true;
|
||||
try {
|
||||
const params = {
|
||||
busNo,
|
||||
};
|
||||
|
||||
const response = await getFromDetailList(params);
|
||||
|
||||
// 处理汇总药品详情数据
|
||||
handleMedicationSummaryDetail(response.data);
|
||||
} catch (error) {
|
||||
ElMessage.error('获取汇总药品详情失败:' + (error.message || '未知错误'));
|
||||
// 发生错误时清空数据
|
||||
handleMedicationSummaryDetail([]);
|
||||
} finally {
|
||||
// 无论成功失败都关闭加载状态
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 窗口数据
|
||||
const windowData = reactive([
|
||||
{
|
||||
label: '窗口1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '窗口2',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '窗口3',
|
||||
value: 3,
|
||||
},
|
||||
]);
|
||||
|
||||
// 摆药单数据
|
||||
const medicationList = reactive([
|
||||
{
|
||||
label: '药单1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '药单2',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '药单3',
|
||||
value: 3,
|
||||
},
|
||||
]);
|
||||
|
||||
// 时间范围选项
|
||||
const timeRangeList = [
|
||||
{
|
||||
label: '全部',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '长期',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '临时',
|
||||
value: 3,
|
||||
},
|
||||
];
|
||||
|
||||
// 表格类型
|
||||
const selectType = ref('total');
|
||||
|
||||
// 表格数据,用于显示右侧药品列表(汇总tab)
|
||||
const tableData = reactive([]);
|
||||
|
||||
// 明细表格数据,用于明细tab
|
||||
const detailTableData = reactive([]);
|
||||
|
||||
// 切换表格类型
|
||||
function handleSelectType(type) {
|
||||
selectType.value = type;
|
||||
reset();
|
||||
getList();
|
||||
}
|
||||
function reset() {
|
||||
busNo.value = '';
|
||||
encounterId.value = '';
|
||||
patientList.value = [];
|
||||
total.value = 0;
|
||||
// 保持响应式引用不变,逐字段还原默认
|
||||
queryParamsPatient.value.searchKey = '';
|
||||
queryParamsPatient.value.statusEnum = '1';
|
||||
queryParamsPatient.value.pageNo = 1;
|
||||
queryParamsPatient.value.pageSize = 10;
|
||||
}
|
||||
// 处理子组件传递的药品汇总详情数据
|
||||
function handleMedicationSummaryDetail(data) {
|
||||
// 检查数据是否为数组
|
||||
const medicationData = Array.isArray(data)
|
||||
? data
|
||||
: typeof data === 'object' && data !== null && Array.isArray(data.records)
|
||||
? data.records
|
||||
: [];
|
||||
|
||||
// 根据当前tab将数据分配到不同的表格
|
||||
if (selectType.value === 'total') {
|
||||
// 汇总tab - 清空表格数据
|
||||
tableData.splice(0, tableData.length);
|
||||
if (medicationData.length > 0) {
|
||||
medicationData.forEach((item, index) => {
|
||||
tableData.push({
|
||||
currentIndex: index + 1,
|
||||
...item,
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 明细tab - 将数据渲染到DetailMedicationTable组件
|
||||
detailTableData.splice(0, detailTableData.length);
|
||||
medicationData.forEach((item) => {
|
||||
detailTableData.push({
|
||||
...item,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 组件挂载时初始化数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.left-container {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #f5f5f5;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
1416
openhis-ui-vue3/src/views/gf/ratioApplicationRecord/index.vue
Normal file
1416
openhis-ui-vue3/src/views/gf/ratioApplicationRecord/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
664
openhis-ui-vue3/src/views/gf/ratioManage/index.vue
Normal file
664
openhis-ui-vue3/src/views/gf/ratioManage/index.vue
Normal file
@@ -0,0 +1,664 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-row class="section-title">公费医疗自付总体比例</el-row>
|
||||
<el-form :inline="true" label-width="68px">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Edit" @click="handleEdit">修改</el-button>
|
||||
<el-button icon="Refresh" @click="resetTypeQuery">刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="typeLoading" :data="typeRatioList" height="600" stripe>
|
||||
<el-table-column label="医保分项编码" prop="ybClass" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="医保分项名称" prop="ybClassName" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="医保等级" prop="ybLvName" :show-overflow-tooltip="true" align="center" />
|
||||
<!-- 自付比例列 -->
|
||||
<el-table-column label="自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.selfRatio !== null && scope.row.selfRatio !== undefined && scope.row.selfRatio !== ''">
|
||||
{{ scope.row.selfRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-row class="section-title">单个药品/诊疗现行自付比例</el-row>
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="68px">
|
||||
<el-form-item label="项目" prop="searchKey">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="项目编号/项目名称/医保编码" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目分类" prop="itemType" label-width="100">
|
||||
<el-select v-model="queryParams.itemType" clearable style="width: 200px;">
|
||||
<el-option label="药品" value="1"></el-option>
|
||||
<el-option label="诊疗" value="2"></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="resetIndividualQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="individualLoading" :data="individualRatioList">
|
||||
<el-table-column label="项目编号" prop="busNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目名称" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="医保编码" width="250">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.ybNo !== null && scope.row.ybNo !== undefined && scope.row.ybNo !== ''">
|
||||
{{ scope.row.ybNo }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目分类" prop="itemTypeName" :show-overflow-tooltip="true" width="110" align="center" />
|
||||
<el-table-column label="医保等级" prop="chrgitmLvName" :show-overflow-tooltip="true" width="110" align="center" />
|
||||
<!-- 自付比例列 -->
|
||||
<el-table-column label="自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.selfRatio !== null && scope.row.selfRatio !== undefined && scope.row.selfRatio !== ''">
|
||||
{{ scope.row.selfRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 二次自付比例列 -->
|
||||
<el-table-column label="二次自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.twiceRatio !== null && scope.row.twiceRatio !== undefined && scope.row.twiceRatio !== ''">
|
||||
{{ scope.row.twiceRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="startDate" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="结束时间" prop="endDate" :show-overflow-tooltip="true" align="center" />
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="individualTotal > 0" :total="individualTotal" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getIndividualList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 修改对话框 -->
|
||||
<el-dialog title="修改总体自付比例" v-model="typeRatioOpen" width="1000px" append-to-body>
|
||||
<el-form ref="typeRatioRef" :model="typeRatioForm" :rules="rules" label-width="180px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="床位费比例(甲类)" prop="a01ratio">
|
||||
<el-input v-model="typeRatioForm.a01ratio" placeholder="请输入床位费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊察费比例(甲类)" prop="a02ratio">
|
||||
<el-input v-model="typeRatioForm.a02ratio" placeholder="请输入诊察费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查费比例(甲类)" prop="a03ratio">
|
||||
<el-input v-model="typeRatioForm.a03ratio" placeholder="请输入检查费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="化验费比例(甲类)" prop="a04ratio">
|
||||
<el-input v-model="typeRatioForm.a04ratio" placeholder="请输入化验费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="治疗费比例(甲类)" prop="a05ratio">
|
||||
<el-input v-model="typeRatioForm.a05ratio" placeholder="请输入治疗费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手术费比例(甲类)" prop="a06ratio">
|
||||
<el-input v-model="typeRatioForm.a06ratio" placeholder="请输入手术费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理费比例(甲类)" prop="a07ratio">
|
||||
<el-input v-model="typeRatioForm.a07ratio" placeholder="请输入护理费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卫生材料费比例(甲类)" prop="a08ratio">
|
||||
<el-input v-model="typeRatioForm.a08ratio" placeholder="请输入卫生材料费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="西药费比例(甲类)" prop="a09ratio">
|
||||
<el-input v-model="typeRatioForm.a09ratio" placeholder="请输入西药费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中药饮片费比例(甲类)" prop="a10ratio">
|
||||
<el-input v-model="typeRatioForm.a10ratio" placeholder="请输入中药饮片费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中成药费比例(甲类)" prop="a11ratio">
|
||||
<el-input v-model="typeRatioForm.a11ratio" placeholder="请输入中成药费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一般诊疗费比例(甲类)" prop="a12ratio">
|
||||
<el-input v-model="typeRatioForm.a12ratio" placeholder="请输入一般诊疗费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="挂号费比例(甲类)" prop="a13ratio">
|
||||
<el-input v-model="typeRatioForm.a13ratio" placeholder="请输入挂号费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费比例(甲类)" prop="a14ratio">
|
||||
<el-input v-model="typeRatioForm.a14ratio" placeholder="请输入其他费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="床位费比例(乙类)" prop="b01ratio">
|
||||
<el-input v-model="typeRatioForm.b01ratio" placeholder="请输入床位费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊察费比例(乙类)" prop="b02ratio">
|
||||
<el-input v-model="typeRatioForm.b02ratio" placeholder="请输入诊察费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查费比例(乙类)" prop="b03ratio">
|
||||
<el-input v-model="typeRatioForm.b03ratio" placeholder="请输入检查费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="化验费比例(乙类)" prop="b04ratio">
|
||||
<el-input v-model="typeRatioForm.b04ratio" placeholder="请输入化验费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="治疗费比例(乙类)" prop="b05ratio">
|
||||
<el-input v-model="typeRatioForm.b05ratio" placeholder="请输入治疗费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手术费比例(乙类)" prop="b06ratio">
|
||||
<el-input v-model="typeRatioForm.b06ratio" placeholder="请输入手术费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理费比例(乙类)" prop="b07ratio">
|
||||
<el-input v-model="typeRatioForm.b07ratio" placeholder="请输入护理费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卫生材料费比例(乙类)" prop="b08ratio">
|
||||
<el-input v-model="typeRatioForm.b08ratio" placeholder="请输入卫生材料费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="西药费比例(乙类)" prop="b09ratio">
|
||||
<el-input v-model="typeRatioForm.b09ratio" placeholder="请输入西药费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中药饮片费比例(乙类)" prop="b10ratio">
|
||||
<el-input v-model="typeRatioForm.b10ratio" placeholder="请输入中药饮片费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中成药费比例(乙类)" prop="b11ratio">
|
||||
<el-input v-model="typeRatioForm.b11ratio" placeholder="请输入中成药费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一般诊疗费比例(乙类)" prop="b12ratio">
|
||||
<el-input v-model="typeRatioForm.b12ratio" placeholder="请输入一般诊疗费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="挂号费比例(乙类)" prop="b13ratio">
|
||||
<el-input v-model="typeRatioForm.b13ratio" placeholder="请输入挂号费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费比例(乙类)" prop="b14ratio">
|
||||
<el-input v-model="typeRatioForm.b14ratio" placeholder="请输入其他费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="GfRatioManage">
|
||||
import {
|
||||
getTypeRatioList,
|
||||
saveTypeRatioList,
|
||||
getIndividualRatioPage
|
||||
} from "@/api/gf/ratioManage";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const typeRatioOpen = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const individualRatioList = ref([]);
|
||||
const individualLoading = ref(true);
|
||||
const individualTotal = ref(0);
|
||||
const individualDateRange = ref([]);
|
||||
const typeRatioList = ref([]);
|
||||
const typeLoading = ref(true);
|
||||
const typeDateRange = ref([]);
|
||||
|
||||
// 验证规则
|
||||
const validateRatio = (rule, value, callback) => {
|
||||
if (value === '' || value === null) {
|
||||
return callback(new Error('自付比例不能为空'));
|
||||
}
|
||||
const numValue = parseFloat(value);
|
||||
if (isNaN(numValue)) {
|
||||
return callback(new Error('请输入有效数字'));
|
||||
}
|
||||
if (numValue < 0 || numValue > 100) {
|
||||
return callback(new Error('自付比例必须在0~100之间'));
|
||||
}
|
||||
// 验证小数位(可选)
|
||||
if (value.toString().includes('.') && value.toString().split('.')[1].length > 2) {
|
||||
return callback(new Error('最多保留两位小数'));
|
||||
}
|
||||
callback();
|
||||
};
|
||||
|
||||
const data = reactive({
|
||||
typeRatioForm: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
itemType: undefined,
|
||||
},
|
||||
rules: {
|
||||
a01ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b01ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a02ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b02ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a03ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b03ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a04ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b04ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a05ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b05ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a06ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b06ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a07ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b07ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a08ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b08ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a09ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b09ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a10ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b10ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a11ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b11ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a12ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b12ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a13ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b13ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a14ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b14ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, typeRatioForm, rules } = toRefs(data);
|
||||
|
||||
/** 查询单项比例分页 */
|
||||
function getIndividualList() {
|
||||
individualLoading.value = true;
|
||||
getIndividualRatioPage(proxy.addDateRange(queryParams.value, individualDateRange.value)).then(response => {
|
||||
individualRatioList.value = response.data.records;
|
||||
individualTotal.value = response.data.total;
|
||||
individualLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询单项比例分页 */
|
||||
function getTypeList() {
|
||||
typeLoading.value = true;
|
||||
getTypeRatioList(proxy.addDateRange(queryParams.value, typeDateRange.value)).then(response => {
|
||||
typeRatioList.value = response.data;
|
||||
typeLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 刷新按钮操作 */
|
||||
function resetTypeQuery() {
|
||||
getTypeList();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getIndividualList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetIndividualQuery() {
|
||||
individualDateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 修改总体比例 */
|
||||
function handleEdit() {
|
||||
typeRatioOpen.value = true;
|
||||
getTypeRatioList(proxy.addDateRange(queryParams.value, typeDateRange.value)).then(response => {
|
||||
typeRatioList.value = response.data;
|
||||
for (const r of typeRatioList.value) {
|
||||
if (r.ybClass == '01' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a01ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '01' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b01ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '02' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a02ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '02' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b02ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '03' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a03ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '03' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b03ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '04' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a04ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '04' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b04ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '05' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a05ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '05' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b05ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '06' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a06ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '06' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b06ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '07' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a07ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '07' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b07ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '08' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a08ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '08' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b08ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '09' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a09ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '09' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b09ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '10' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a10ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '10' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b10ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '11' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a11ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '11' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b11ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '12' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a12ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '12' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b12ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '13' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a13ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '13' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b13ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '14' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a14ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '14' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b14ratio = r.selfRatio
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
let form = {
|
||||
typeRatioList: [{
|
||||
ybClass: "01",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a01ratio
|
||||
}, {
|
||||
ybClass: "01",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b01ratio
|
||||
}, {
|
||||
ybClass: "02",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a02ratio
|
||||
}, {
|
||||
ybClass: "02",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b02ratio
|
||||
}, {
|
||||
ybClass: "03",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a03ratio
|
||||
}, {
|
||||
ybClass: "03",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b03ratio
|
||||
}, {
|
||||
ybClass: "04",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a04ratio
|
||||
}, {
|
||||
ybClass: "04",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b04ratio
|
||||
}, {
|
||||
ybClass: "05",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a05ratio
|
||||
}, {
|
||||
ybClass: "05",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b05ratio
|
||||
}, {
|
||||
ybClass: "06",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a06ratio
|
||||
}, {
|
||||
ybClass: "06",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b06ratio
|
||||
}, {
|
||||
ybClass: "07",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a07ratio
|
||||
}, {
|
||||
ybClass: "07",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b07ratio
|
||||
}, {
|
||||
ybClass: "08",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a08ratio
|
||||
}, {
|
||||
ybClass: "08",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b08ratio
|
||||
}, {
|
||||
ybClass: "09",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a09ratio
|
||||
}, {
|
||||
ybClass: "09",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b09ratio
|
||||
}, {
|
||||
ybClass: "10",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a10ratio
|
||||
}, {
|
||||
ybClass: "10",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b10ratio
|
||||
}, {
|
||||
ybClass: "11",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a11ratio
|
||||
}, {
|
||||
ybClass: "11",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b11ratio
|
||||
}, {
|
||||
ybClass: "12",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a12ratio
|
||||
}, {
|
||||
ybClass: "12",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b12ratio
|
||||
}, {
|
||||
ybClass: "13",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a13ratio
|
||||
}, {
|
||||
ybClass: "13",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b13ratio
|
||||
}, {
|
||||
ybClass: "14",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a14ratio
|
||||
}, {
|
||||
ybClass: "14",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b14ratio
|
||||
}]
|
||||
}
|
||||
proxy.$refs["typeRatioRef"].validate(valid => {
|
||||
if (valid) {
|
||||
saveTypeRatioList(form).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
typeRatioOpen.value = false;
|
||||
getTypeList();
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
getIndividualList();
|
||||
getTypeList();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px 15px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.grid-item :deep(.el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 描述文本样式 */
|
||||
.item-description {
|
||||
font-size: 12px;
|
||||
color: #7f8c8d;
|
||||
margin-top: 8px;
|
||||
line-height: 1.4;
|
||||
padding: 5px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 550;
|
||||
font-size: 18px;
|
||||
color: #515A6E;
|
||||
}
|
||||
</style>
|
||||
459
openhis-ui-vue3/src/views/gf/studentList/index.vue
Normal file
459
openhis-ui-vue3/src/views/gf/studentList/index.vue
Normal file
@@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="68px">
|
||||
<el-form-item label="学生" prop="searchKey">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="学号/姓名/身份证号" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="在校状态" prop="studentStatus" label-width="100">
|
||||
<el-select v-model="queryParams.studentStatus" clearable style="width: 200px;">
|
||||
<el-option v-for="dict in student_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="体检结果" prop="physicalExamResult" label-width="100">
|
||||
<el-select v-model="queryParams.physicalExamResult" clearable style="width: 200px;">
|
||||
<el-option v-for="dict in physical_exam_result" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="studentList">
|
||||
<el-table-column label="学号" prop="studentId" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="姓名" prop="name" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="性别" prop="gender_dictText" :show-overflow-tooltip="true" width="70" align="center" />
|
||||
<el-table-column label="年龄" prop="age" :show-overflow-tooltip="true" width="70" align="center" />
|
||||
<el-table-column label="身份证号" prop="idNumber" :show-overflow-tooltip="true" width="200" />
|
||||
<el-table-column label="电话" prop="phone" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="学院" prop="college" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="专业" prop="major" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="年级" prop="grade" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="学历层次" prop="educationLevel_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="入校时间" prop="enrollmentDate" :show-overflow-tooltip="true" width="120" align="center" />
|
||||
<el-table-column label="离校时间" prop="graduationDate" :show-overflow-tooltip="true" width="120" align="center" />
|
||||
<el-table-column label="学习形式" prop="studyMode_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="在校状态" prop="studentStatus_dictText" :show-overflow-tooltip="true" width="100"
|
||||
align="center" />
|
||||
<el-table-column label="体检结果" prop="physicalExamResult_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="辅导员" width="120">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.counselor !== null && scope.row.counselor !== undefined && scope.row.counselor !== ''">
|
||||
{{ scope.row.counselor }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="辅导员电话" width="170">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.counselorPhone !== null && scope.row.counselorPhone !== undefined && scope.row.counselorPhone !== ''">
|
||||
{{ scope.row.counselorPhone }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="700px" append-to-body>
|
||||
<el-form ref="studentListRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学号" prop="studentId">
|
||||
<el-input v-model="form.studentId" placeholder="请输入学号" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-radio-group v-model="form.gender">
|
||||
<el-radio v-for="dict in sys_user_sex" :key="dict.value" :label="dict.value">
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input :disabled="true" v-model="form.age" placeholder="根据身份证自动计算,无需填写" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="college">
|
||||
<el-input v-model="form.college" placeholder="请输入学院" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业" prop="major">
|
||||
<el-input v-model="form.major" placeholder="请输入专业" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年级" prop="grade">
|
||||
<el-input v-model="form.grade" placeholder="请输入年级" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学历层次" prop="educationLevel">
|
||||
<el-select v-model="form.educationLevel" clearable style="width: 100%">
|
||||
<el-option v-for="dict in education_level" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入校时间" prop="enrollmentDate">
|
||||
<el-date-picker v-model="form.enrollmentDate" type="date" placeholder="请选择入校时间" value-format="YYYY-MM-DD"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="离校时间" prop="graduationDate">
|
||||
<el-date-picker v-model="form.graduationDate" type="date" placeholder="请选择离校时间" value-format="YYYY-MM-DD"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="学习形式" prop="studyMode">
|
||||
<el-select v-model="form.studyMode" clearable style="width: 100%">
|
||||
<el-option v-for="dict in study_mode" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="在校状态" prop="studentStatus">
|
||||
<el-select v-model="form.studentStatus" clearable style="width: 100%">
|
||||
<el-option v-for="dict in student_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="体检结果" prop="physicalExamResult">
|
||||
<el-select v-model="form.physicalExamResult" clearable style="width: 100%">
|
||||
<el-option v-for="dict in physical_exam_result" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="辅导员" prop="counselor">
|
||||
<el-input v-model="form.counselor" placeholder="请输入辅导员" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="辅导员电话" prop="counselorPhone">
|
||||
<el-input v-model="form.counselorPhone" placeholder="请输入辅导员电话" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="GfStudentList">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
getPage,
|
||||
getDetail,
|
||||
add,
|
||||
edit,
|
||||
remove
|
||||
} from "@/api/gf/studentList";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
sys_user_sex,
|
||||
education_level,
|
||||
study_mode,
|
||||
student_status,
|
||||
physical_exam_result
|
||||
} = proxy.useDict(
|
||||
"sys_user_sex",
|
||||
"education_level",
|
||||
"study_mode",
|
||||
"student_status",
|
||||
"physical_exam_result",
|
||||
);
|
||||
|
||||
const studentList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
|
||||
/*** 器材目录导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/nenu/gf-student-list/import-data"
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
studentStatus: undefined,
|
||||
physicalExamResult: undefined,
|
||||
},
|
||||
rules: {
|
||||
studentId: [
|
||||
{ required: true, message: "学号不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: "性别不能为空", trigger: "blur" }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: "身份证号不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "电话不能为空", trigger: "blur" }
|
||||
],
|
||||
college: [
|
||||
{ required: true, message: "学院不能为空", trigger: "blur" }
|
||||
],
|
||||
major: [
|
||||
{ required: true, message: "专业不能为空", trigger: "blur" }
|
||||
],
|
||||
grade: [
|
||||
{ required: true, message: "年级不能为空", trigger: "blur" }
|
||||
],
|
||||
educationLevel: [
|
||||
{ required: true, message: "学历层次不能为空", trigger: "blur" }
|
||||
],
|
||||
enrollmentDate: [
|
||||
{ required: true, message: "入校时间不能为空", trigger: "blur" }
|
||||
],
|
||||
graduationDate: [
|
||||
{ required: true, message: "离校时间不能为空", trigger: "blur" }
|
||||
],
|
||||
studyMode: [
|
||||
{ required: true, message: "学习形式不能为空", trigger: "blur" }
|
||||
],
|
||||
studentStatus: [
|
||||
{ required: true, message: "在校状态不能为空", trigger: "blur" }
|
||||
],
|
||||
physicalExamResult: [
|
||||
{ required: true, message: "体检结果不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询学生名单 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getPage(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
||||
studentList.value = response.data.records;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 重置新增的表单以及其他数据 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
gender: undefined,
|
||||
age: undefined,
|
||||
studentId: undefined,
|
||||
idNumber: undefined,
|
||||
phone: undefined,
|
||||
college: undefined,
|
||||
major: undefined,
|
||||
educationLevel: undefined,
|
||||
enrollmentDate: undefined,
|
||||
graduationDate: undefined,
|
||||
grade: undefined,
|
||||
studyMode: undefined,
|
||||
studentStatus: undefined,
|
||||
physicalExamResult: undefined,
|
||||
counselor: undefined,
|
||||
counselorPhone: undefined,
|
||||
patientId: undefined,
|
||||
};
|
||||
proxy.resetForm("studentListRef");
|
||||
}
|
||||
/** 添加学生 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加学生信息";
|
||||
}
|
||||
/** 修改学生 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
getDetail(row.id).then(response => {
|
||||
form.value = response.data;
|
||||
//字典str与实际值num不匹配导致无法回显加了这个
|
||||
form.value.gender = response.data.gender.toString()
|
||||
form.value.educationLevel = response.data.educationLevel.toString()
|
||||
form.value.studyMode = response.data.studyMode.toString()
|
||||
form.value.studentStatus = response.data.studentStatus.toString()
|
||||
form.value.physicalExamResult = response.data.physicalExamResult.toString()
|
||||
open.value = true;
|
||||
title.value = "修改学生信息";
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["studentListRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
edit(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
add(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
/** 导入按钮操作 */
|
||||
function handleImport() {
|
||||
upload.title = '学生名单导入';
|
||||
upload.open = true;
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/nenu/gf-student-list/import-template', {}, `student_template_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
upload.isUploading = true;
|
||||
};
|
||||
/** 文件上传成功处理 */
|
||||
const handleFileSuccess = (response, file, fileList) => {
|
||||
upload.open = false;
|
||||
upload.isUploading = false;
|
||||
proxy.$refs['uploadRef'].handleRemove(file);
|
||||
proxy.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
getList();
|
||||
};
|
||||
/** 提交上传文件 */
|
||||
function submitFileForm() {
|
||||
proxy.$refs['uploadRef'].submit();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px 15px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.grid-item :deep(.el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 描述文本样式 */
|
||||
.item-description {
|
||||
font-size: 12px;
|
||||
color: #7f8c8d;
|
||||
margin-top: 8px;
|
||||
line-height: 1.4;
|
||||
padding: 5px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,269 +0,0 @@
|
||||
<template>
|
||||
<div class="hospital-record-form">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="病案首页(一)" name="first">
|
||||
<medicalRecordFirst :formData="formData"></medicalRecordFirst>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="病案首页(二)" name="second">
|
||||
<medicalRecordSecond :formData="formData"></medicalRecordSecond>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="病案附页(一)" name="third"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div class="form-footer">
|
||||
<button @click="printForm" class="print-btn">打印表单</button>
|
||||
<button @click="resetForm" class="reset-btn">重置表单</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import medicalRecordFirst from './components/medicalRecordFirst.vue';
|
||||
import medicalRecordSecond from './components/medicalRecordSecond.vue';
|
||||
import medicalRecordFirstPrint from './components/medicalRecordFirstPrint.json';
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
hospital: {
|
||||
orgCode: '41275054-7',
|
||||
paymentMethod: '城乡居民基本医疗保险'
|
||||
},
|
||||
patient: {
|
||||
healthCardNo: '',
|
||||
name: '',
|
||||
gender: '',
|
||||
birthDate: '',
|
||||
age: '',
|
||||
nationality: '中国',
|
||||
nativePlace: '',
|
||||
ethnicity: '汉族',
|
||||
idCardNo: '',
|
||||
householdAddress: '',
|
||||
workUnit: '',
|
||||
contactName: '',
|
||||
contactRelation: '',
|
||||
contactAddress: '',
|
||||
contactPhone: ''
|
||||
},
|
||||
admission: {
|
||||
times: 1,
|
||||
hospitalNo: '',
|
||||
recordNo: '',
|
||||
channel: '',
|
||||
admitTime: '',
|
||||
department: '',
|
||||
ward: '',
|
||||
confirmDate: '',
|
||||
dischargeTime: '',
|
||||
dischargeDepartment: '',
|
||||
dischargeWard: '',
|
||||
hospitalDays: ''
|
||||
},
|
||||
diagnosis: {
|
||||
mainDiagnosis: '',
|
||||
otherDiagnosis: ''
|
||||
},
|
||||
medicalInfo: {
|
||||
bloodTransfusion: '2',
|
||||
bloodType: '',
|
||||
rhType: '',
|
||||
drugAllergy: '1'
|
||||
},
|
||||
doctorInfo: {
|
||||
departmentDirector: '',
|
||||
chiefPhysician: '',
|
||||
attendingPhysician: '',
|
||||
residentPhysician: '',
|
||||
chargeNurse: '',
|
||||
chiefResident: '',
|
||||
intern: '',
|
||||
recordQuality: '1',
|
||||
coder: '',
|
||||
qualityControlDate: ''
|
||||
}
|
||||
});
|
||||
|
||||
const activeName = ref('first');
|
||||
|
||||
// 打印表单
|
||||
const printForm = () => {
|
||||
// 创建一个新的打印窗口
|
||||
const printWindow = window.open('', '_blank');
|
||||
let printContent
|
||||
// 获取模板字符串并替换转义的插值标记
|
||||
if(activeName.value == 'first') {
|
||||
printContent = medicalRecordFirstPrint.printContent;
|
||||
}else if(activeName.value == 'second') {
|
||||
|
||||
}else {
|
||||
|
||||
}
|
||||
// 这里可以进行实际的数据替换操作
|
||||
printContent = printContent.replace(/\$\{([^}]+)\}/g, (match, expr) => {
|
||||
// 简单示例:实际应根据expr内容进行数据提取
|
||||
return eval(expr); // 注意:实际使用中应避免eval,这里仅为示例
|
||||
});
|
||||
|
||||
// 将内容写入打印窗口并打印
|
||||
printWindow.document.write(printContent);
|
||||
printWindow.document.close();
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
Object.keys(formData).forEach(key => {
|
||||
if (typeof formData[key] === 'object') {
|
||||
Object.keys(formData[key]).forEach(subKey => {
|
||||
formData[key][subKey] = '';
|
||||
});
|
||||
} else {
|
||||
formData[key] = '';
|
||||
}
|
||||
});
|
||||
|
||||
// 重置默认值
|
||||
formData.hospital.orgCode = '41275054-7';
|
||||
formData.hospital.paymentMethod = '城乡居民基本医疗保险';
|
||||
formData.patient.nationality = '中国';
|
||||
formData.patient.ethnicity = '汉族';
|
||||
formData.admission.times = 1;
|
||||
formData.medicalInfo.bloodTransfusion = '2';
|
||||
formData.medicalInfo.drugAllergy = '1';
|
||||
formData.doctorInfo.recordQuality = '1';
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hospital-record-form {
|
||||
font-family: 'SimSun', serif;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.form-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.hospital-name {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-size: 20px;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 30px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.form-item.full-width {
|
||||
flex: 0 0 100%;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-height: 80px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.print-btn, .reset-btn {
|
||||
padding: 10px 20px;
|
||||
margin: 0 10px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.print-btn {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.reset-btn {
|
||||
background-color: #f44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 打印样式 */
|
||||
@media print {
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.hospital-record-form {
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 2cm;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -302,6 +302,149 @@ import { ref, reactive } from 'vue';
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
//组织机构代码
|
||||
medins_orgcode: '',
|
||||
|
||||
//医疗付费方式
|
||||
|
||||
|
||||
//健康卡号
|
||||
|
||||
|
||||
//姓名--患者姓名
|
||||
patient_name: '',
|
||||
|
||||
//性别--患者性别
|
||||
gend: '',
|
||||
|
||||
//出生日期
|
||||
brdy: '',
|
||||
|
||||
//年龄
|
||||
age: '',
|
||||
|
||||
//国籍
|
||||
ntly: '',
|
||||
|
||||
//籍贯
|
||||
napl: '',
|
||||
|
||||
//民族
|
||||
naty: '',
|
||||
|
||||
//身份证号
|
||||
certNo: '',
|
||||
|
||||
//户口地址
|
||||
resd_addr:'',
|
||||
|
||||
//工作单位及地址
|
||||
empr_addr: '',
|
||||
|
||||
//联系人姓名
|
||||
coner_name: '',
|
||||
|
||||
//关系
|
||||
patn_rlts: '',
|
||||
|
||||
//地址
|
||||
addr: '',
|
||||
|
||||
//电话
|
||||
tel: '',
|
||||
|
||||
//第几次住院
|
||||
patn_ipt_cnt: '',
|
||||
|
||||
//住院号 mdtrtsn
|
||||
ipt_no: '',
|
||||
|
||||
//病案号
|
||||
medcasno: '',
|
||||
|
||||
//入院途径
|
||||
adm_way: '',
|
||||
|
||||
//入院时间
|
||||
adm_time: '',
|
||||
|
||||
//入院科室 adm_dept_codg
|
||||
adm_dept_name: '',
|
||||
|
||||
//病房 入院病房
|
||||
adm_ward: '',
|
||||
|
||||
//实际住院天数
|
||||
act_ipt_days: '',
|
||||
|
||||
//主要诊断----不确定
|
||||
diag_code: '',
|
||||
|
||||
//其他诊断
|
||||
|
||||
|
||||
//是否输血
|
||||
|
||||
|
||||
//血型
|
||||
|
||||
|
||||
//Rh
|
||||
|
||||
|
||||
//药物过敏史
|
||||
|
||||
|
||||
//科主任 科主任姓名--deptort_name:
|
||||
deptort: '',
|
||||
|
||||
//主任(副主任)医师
|
||||
chfdr_name: '',
|
||||
|
||||
//主治医师 主诊医师姓名--chfpdr_name
|
||||
atddr_no: '',
|
||||
|
||||
//住院医师 住院医师姓名--ipdr_name
|
||||
ipdr_code: '',
|
||||
|
||||
//责任护士 责任护士姓名--resp_nurs_name
|
||||
resp_nurs_code: '',
|
||||
|
||||
//住院总医师
|
||||
|
||||
|
||||
//实习医师
|
||||
intn_dr_name: '',
|
||||
|
||||
//病案质量 病案质量名称--medcas_qlt_name
|
||||
medcas_qlt_code: '',
|
||||
|
||||
//编码员
|
||||
codr_name: '',
|
||||
|
||||
//质控日期
|
||||
qltctrl_date: '',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
hospital: {
|
||||
orgCode: '41275054-7',
|
||||
paymentMethod: '城乡居民基本医疗保险'
|
||||
|
||||
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
File diff suppressed because one or more lines are too long
1004
openhis-ui-vue3/src/views/hospitalRecord/components/testHtmlSec.html
Normal file
1004
openhis-ui-vue3/src/views/hospitalRecord/components/testHtmlSec.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,804 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.hisSec {
|
||||
padding: 10px 0;
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.font_1 {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.font_2 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.font_3 {
|
||||
font-size: 13px;
|
||||
}
|
||||
.font_4 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.hisSecInner {
|
||||
width: 1000px;
|
||||
height: 100%;
|
||||
}
|
||||
.tableBox {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.tableBoxInner {
|
||||
|
||||
}
|
||||
.borderRight {
|
||||
border-right: 1px solid #333333;
|
||||
}
|
||||
.borderBottom {
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
.tableBoxItemHeader {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
|
||||
}
|
||||
.tableBoxItemHeader .item {
|
||||
white-space: wrap;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 2px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItemHeader .itemIndex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 3.5%;
|
||||
}
|
||||
.tableBoxItemHeader .chooseAllBtn {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.tableBoxItemHeader .itemDate {
|
||||
width: 10%;
|
||||
}
|
||||
.tableBoxItemHeader .itemSurgeryLevel {
|
||||
width: 7%;
|
||||
}
|
||||
.tableBoxItemHeader .itemSurgeryName {
|
||||
width: 23%;
|
||||
}
|
||||
.tableBoxItemHeader .itemCutLevel {
|
||||
width: 9%;
|
||||
}
|
||||
.tableBoxItemHeader .itemCutLevel1 {
|
||||
width: 12%;
|
||||
}
|
||||
.tableBoxItemHeader .itemCutLevel2 {
|
||||
width: 7%;
|
||||
}
|
||||
.tableBoxItemHeader .itemTime {
|
||||
width: 9%;
|
||||
}
|
||||
.tableBoxItemHeader .itemSpec {
|
||||
width: 20%;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
height: 50px;
|
||||
}
|
||||
.tableBoxItemHeader .itemSpec .spec {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 50%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItemHeader .itemSpec .spec .specItem {
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
line-height: 25px;
|
||||
}
|
||||
.tableBoxItemHeader .itemSpec .spec_ {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.tableBoxItemHeader .itemSpec .spec_ .specItem {
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItemHeader .itemCheckBox {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.tableBoxItemHeader .itemCheckBoxAct {
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background: #333333;
|
||||
color: #fff;
|
||||
}
|
||||
.tableBoxItemHeader .itemCheckBox:hover {
|
||||
border: 1px solid #333333;
|
||||
}
|
||||
.tableBoxItem {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 55px;
|
||||
}
|
||||
.tableBoxItem .item {
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
//line-height: 40px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 2px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.tableBoxItem .itemIndex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 3.5%;
|
||||
}
|
||||
.tableBoxItem .itemDate {
|
||||
width: 10%;
|
||||
}
|
||||
.tableBoxItem .itemSurgeryLevel {
|
||||
width: 7%;
|
||||
}
|
||||
.tableBoxItem .itemSurgeryName {
|
||||
width: 23%;
|
||||
}
|
||||
.tableBoxItem .itemCutLevel {
|
||||
width: 9%;
|
||||
}
|
||||
.tableBoxItem .itemCutLevel1 {
|
||||
width: 12%;
|
||||
}
|
||||
.tableBoxItem .itemCutLevel2 {
|
||||
width: 7%;
|
||||
}
|
||||
.tableBoxItem .itemTime {
|
||||
width: 9%;
|
||||
}
|
||||
.tableBoxItem .itemSpec {
|
||||
width: 20%;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
height: 55px;
|
||||
}
|
||||
.tableBoxItem .itemSpec .spec {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 50%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItem .itemSpec .spec .specItem {
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
line-height: 25px;
|
||||
}
|
||||
.tableBoxItem .itemSpec .spec_ {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItem .itemSpec .spec_ .specItem {
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tableBoxItem .itemCheckBox {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.tableBoxItem .itemCheckBoxAct {
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
.tableBoxItem .itemCheckBox:hover {
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.topBar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #333333;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.secItem {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
//align-items: center;
|
||||
justify-content: left;
|
||||
border-bottom: 1px solid #333333;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.secItem1 {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #333333;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.chooseBox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 1px solid #333;
|
||||
font-size: 12px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.rowBox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.writeArea {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
border-bottom: 1px solid #333333;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.writeAreaCenter {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
border-bottom: 1px solid #333333;
|
||||
padding-bottom: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
.writeAreaSort {
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
border-bottom: 1px solid #333333;
|
||||
//padding-bottom: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
.marginSmall {
|
||||
margin: 0 5px;
|
||||
}
|
||||
.marginNor {
|
||||
margin: 0 10px;
|
||||
}
|
||||
.marginBig {
|
||||
margin: 0 20px;
|
||||
}
|
||||
.marginB {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.marginR_B {
|
||||
margin-right: 40px;
|
||||
}
|
||||
.marginR_S {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.subTable {
|
||||
|
||||
}
|
||||
.tableBarHeader {
|
||||
text-align: center;
|
||||
height: 35px;line-height: 35px;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
border-right: 1px solid #333333;
|
||||
font-size: 15px;
|
||||
}
|
||||
.tableBar {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
height: 35px;
|
||||
}
|
||||
.barItem {
|
||||
height: 100%;
|
||||
width: 33.33%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
}
|
||||
.barItem1 {
|
||||
height: 100%;
|
||||
width: 120%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
}
|
||||
.barItem2 {
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #333333;
|
||||
border-left: 1px solid #333333;
|
||||
}
|
||||
|
||||
.borderR {
|
||||
border-right: 1px solid #333333;
|
||||
}
|
||||
.borderB {
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="hisSec">
|
||||
<div class="hisSecInner">
|
||||
<div class="topBar">
|
||||
<div class="font_2">姓名:金长存</div>
|
||||
<div class="font_2">病案号:12345678</div>
|
||||
</div>
|
||||
|
||||
<div class="secItem">
|
||||
<div class="font_1">住院费用(元):</div>
|
||||
<div class="rowBox">
|
||||
<div class="marginSmall font_3">总费用:<span class="writeAreaCenter">—</span> (自付金额:<span class="writeAreaCenter">—</span>)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">1.综合医疗服务类:</div>
|
||||
<div class="marginSmall font_3">(1)一般医疗服务费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="marginSmall font_3">(2)一般治疗操作费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(3)护理费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(4)其他费用:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">2.诊断类:</div>
|
||||
<div class="marginSmall font_3">(5)病理诊断费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(6)实验室诊断费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="marginSmall font_3">(7)影像学诊断费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(8)临床诊断项目费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">3.医疗类:</div>
|
||||
<div class="marginSmall font_3">(9)非手术治疗项目费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(临床物理治疗费:<span class="writeAreaCenter">—</span>)</div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="marginSmall font_3">(10)手术治疗费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(麻醉费:<span class="writeAreaCenter">—</span>手术费:<span class="writeAreaCenter">—</span>)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">4.康复类:</div>
|
||||
<div class="marginSmall font_3">(11)康复费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">5.中医类:</div>
|
||||
<div class="marginSmall font_3">(12)中医治疗费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">6.西药类:</div>
|
||||
<div class="marginSmall font_3">(13)西药费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(抗菌药物费用:<span class="writeAreaCenter">—</span>)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">7.中药类:</div>
|
||||
<div class="marginSmall font_3">(14)中成药费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="marginSmall font_3">(15)中草药费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">8.血液和血液制品类:</div>
|
||||
<div class="font_3">(16)血费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="font_3">(17)白蛋白类制品费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="font_3">(18)球蛋白类制品费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="font_3">(19)凝血因子类制品费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="font_3">(20)细胞因子类制品费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">9.耗材类:</div>
|
||||
<div class="font_3">(21)检查用一次性医用材料费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
<div class="rowBox">
|
||||
<div class="font_3">(22)治疗用一次性医用材料费:<span class="writeAreaCenter">—</span></div>
|
||||
<div class="font_3">(23)手术用用一次性医用材料费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">10.其他类:</div>
|
||||
<div class="font_3">(24)其他费:<span class="writeAreaCenter">—</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1">
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_1">说明:</div>
|
||||
<div class="font_3 marginNor">(一)医疗付费方式 </div>
|
||||
<div class="font_3 marginNor">1.城镇职工基本医疗保险 </div>
|
||||
<div class="font_3 marginNor">2.城镇居民基本医疗保险 </div>
|
||||
</div>
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_3 marginNor">3.新型农村合作医疗 </div>
|
||||
<div class="font_3 marginNor">4.贫困救助 </div>
|
||||
<div class="font_3 marginNor">5.商业医疗保险 </div>
|
||||
</div>
|
||||
<div class="rowBox" style="margin-bottom: 10px;">
|
||||
<div class="font_3 marginNor">6.全公费 </div>
|
||||
<div class="font_3 marginNor">7.全自费 </div>
|
||||
<div class="font_3 marginNor">8.其他社会保险 </div>
|
||||
<div class="font_3 marginNor">9.其他 </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="subTable">
|
||||
<div class="tableBarHeader font_1">其他诊断及手术附加页</div>
|
||||
<div class="tableBar">
|
||||
<div class="font_1 barItem1">出院诊断</div>
|
||||
<div class="font_1 barItem2">疾病编码</div>
|
||||
<div class="font_1 barItem2">入院病情</div>
|
||||
<div class="font_1 barItem2 borderR">转归情况</div>
|
||||
</div>
|
||||
<div class="tableBar">
|
||||
<div class="font_3 barItem1">—</div>
|
||||
<div class="font_3 barItem2">—</div>
|
||||
<div class="font_3 barItem2">—</div>
|
||||
<div class="font_3 barItem2 borderR">—</div>
|
||||
</div>
|
||||
<div class="tableBar borderB">
|
||||
<div class="font_3 barItem1">—</div>
|
||||
<div class="font_3 barItem2">—</div>
|
||||
<div class="font_3 barItem2">—</div>
|
||||
<div class="font_3 barItem2 borderR">—</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secItem1" style="padding: 0;">
|
||||
<div class="rowBox" style="margin: 10px 0 5px;">
|
||||
<div class="font_2 marginR_S">入院病情:</div>
|
||||
<div class="font_2 marginR_S">1.有 </div>
|
||||
<div class="font_2 marginR_S">2.临床未确定</div>
|
||||
<div class="font_2 marginR_S">3.情况不明</div>
|
||||
<div class="font_2 marginR_B">4.无 </div>
|
||||
</div>
|
||||
<div class="rowBox" style="margin: 10px 0 5px;">
|
||||
<div class="font_2 marginR_S">转归:</div>
|
||||
<div class="font_2 marginR_S">1.治愈 </div>
|
||||
<div class="font_2 marginR_S">2.好转</div>
|
||||
<div class="font_2 marginR_S">3.未愈</div>
|
||||
<div class="font_2 marginR_S">4.死亡</div>
|
||||
<div class="font_2 marginR_S">5.其他</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tableBox">
|
||||
<div class="tableBoxInner">
|
||||
<div class="tableBoxItemHeader font_4">
|
||||
<div class="item itemDate">手术操作日期</div>
|
||||
<div class="item itemSurgeryLevel">手术级别</div>
|
||||
<div class="item itemSurgeryName">手术及操作名称</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec" style="width: 100%;border-bottom: 1px solid #333333;">手术及操作医师</div>
|
||||
<div class="spec">
|
||||
<div class="specItem">术者</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">Ⅰ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">Ⅱ助</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">切口愈合等级</div>
|
||||
<div class="item itemCutLevel1">麻醉方式</div>
|
||||
<div class="item itemCutLevel">麻醉医师</div>
|
||||
<div class="item itemCutLevel2">麻醉分级</div>
|
||||
<div class="item itemTime borderRight">手术时长(H)</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">2023-11-6</div>
|
||||
<div class="item itemSurgeryLevel">5</div>
|
||||
<div class="item itemSurgeryName">腰椎间盘切除,椎管减压,植骨融合内固定术</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
牛粪
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
渣渣辉
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
长存
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">1/甲</div>
|
||||
<div class="item itemCutLevel1">静吸复合麻醉</div>
|
||||
<div class="item itemCutLevel">马本慧</div>
|
||||
<div class="item itemCutLevel2">2</div>
|
||||
<div class="item itemTime borderRight">2.35</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">2023-11-6</div>
|
||||
<div class="item itemSurgeryLevel">1</div>
|
||||
<div class="item itemSurgeryName">PICC管去除</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
牛粪
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
渣渣辉
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
长存
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">1/甲</div>
|
||||
<div class="item itemCutLevel1">静吸复合麻醉</div>
|
||||
<div class="item itemCutLevel">马本慧</div>
|
||||
<div class="item itemCutLevel2">2</div>
|
||||
<div class="item itemTime borderRight">2.35</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">2023-11-6</div>
|
||||
<div class="item itemSurgeryLevel">1</div>
|
||||
<div class="item itemSurgeryName">经外周静脉穿刺中心静脉置管技术</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
王丽丽
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">1/甲</div>
|
||||
<div class="item itemCutLevel1">静吸复合麻醉</div>
|
||||
<div class="item itemCutLevel">马本慧</div>
|
||||
<div class="item itemCutLevel2">2</div>
|
||||
<div class="item itemTime borderRight">2.35</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
<div class="tableBoxItem font_4 borderBottom">
|
||||
<div class="item itemDate">—</div>
|
||||
<div class="item itemSurgeryLevel">—</div>
|
||||
<div class="item itemSurgeryName">—</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
<div class="specItem" style="border-left: 1px solid #333333;">
|
||||
—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel1">—</div>
|
||||
<div class="item itemCutLevel">—</div>
|
||||
<div class="item itemCutLevel2">—</div>
|
||||
<div class="item itemTime borderRight">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
<script setup >
|
||||
import { ref, inject } from 'vue';
|
||||
import { FormInstance } from 'element-plus';
|
||||
|
||||
// const form = inject('formState') as any;
|
||||
// const formRef = ref<FormInstance>();
|
||||
@@ -49,7 +48,6 @@ const handleUpload = () => {
|
||||
border-radius: 4px;
|
||||
padding-left: 16px;
|
||||
|
||||
|
||||
:deep(.el-form) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -83,9 +81,6 @@ const handleUpload = () => {
|
||||
|
||||
.operate-btns {
|
||||
.main-btn {
|
||||
// margin-left: 16px;
|
||||
// width: 100px;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ onMounted(() => {
|
||||
|
||||
.el-button{
|
||||
border: 1px #166773 solid;
|
||||
span{
|
||||
span {
|
||||
color: red;
|
||||
margin-left: 5px;
|
||||
}
|
||||
@@ -471,7 +471,7 @@ onMounted(() => {
|
||||
.el-button:hover{
|
||||
border: 1px #166773 solid;
|
||||
color: #166773;
|
||||
span{
|
||||
span {
|
||||
color: red;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-07 12:09:26
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
// 申请单相关接口
|
||||
|
||||
@@ -48,6 +44,46 @@ export function getSurgery(queryParams) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询护理医嘱信息
|
||||
*/
|
||||
export function getNursingOrdersInfos() {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/nursing-orders',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存护理医嘱信息
|
||||
* @param {Object} data - 护理医嘱数据
|
||||
* @param {number} data.encounterId - 就诊id
|
||||
* @param {number} data.patientId - 患者id
|
||||
* @param {number} data.conditionId - 诊断ID
|
||||
* @param {number} data.encounterDiagnosisId - 就诊诊断id
|
||||
* @param {string} data.startTime - 医嘱开始时间 (yyyy-MM-dd HH:mm:ss)
|
||||
* @param {Array} data.nursingOrdersSaveDetailDtoList - 护理医嘱详情保存集合
|
||||
* @param {number} data.nursingOrdersSaveDetailDtoList[].definitionId - 护理项目定义ID
|
||||
* @param {number} data.nursingOrdersSaveDetailDtoList[].categoryEnum - 护理项目类别编码:
|
||||
* 26(护理级别)、38(病情)、39(护理常规)、27(膳食)、40(体位)、41(陪护)、42(隔离等级)
|
||||
*/
|
||||
export function saveNursingOrders(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/nursing-orders',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取患者护理状态信息(用于回显)
|
||||
*/
|
||||
export function getEncounterNursingOrders(params) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/encounter-nursing-orders',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4" :xs="24">
|
||||
<<<<<<< HEAD
|
||||
<el-input
|
||||
v-model="diagnosis"
|
||||
placeholder="诊断名称"
|
||||
@@ -23,40 +24,40 @@
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
=======
|
||||
<div style="height: 44px; display: flex; align-items: center; flex: none">
|
||||
<el-input v-model="diagnosis" placeholder="诊断名称" clearable style="width: 100%"
|
||||
@keyup.enter="queryDiagnosisUse">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<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">
|
||||
>>>>>>> upstream/develop
|
||||
<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-icon><Plus /></el-icon>
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<el-popconfirm
|
||||
width="200"
|
||||
:hide-after="10"
|
||||
title="确认删除此常用诊断吗"
|
||||
placement="top-start"
|
||||
@confirm="deleteChild(data)"
|
||||
>
|
||||
<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-icon><Minus /></el-icon>
|
||||
<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>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
@@ -82,32 +83,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||
:rules="rules.diagSrtNo"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.diagSrtNo"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 80px"
|
||||
/>
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
|
||||
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
|
||||
style="width: 80px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.medTypeCode`"
|
||||
:rules="rules.medTypeCode"
|
||||
>
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item in med_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -115,25 +101,12 @@
|
||||
<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)"
|
||||
/>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
@@ -145,6 +118,7 @@
|
||||
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
@@ -167,17 +141,21 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
=======
|
||||
<el-checkbox label="主诊断" :trueLabel="1" :falseLabel="0" v-model="scope.row.maindiseFlag" border
|
||||
size="small" @change="(value) => handleMaindise(value, scope.$index)" />
|
||||
<el-select v-model="scope.row.verificationStatusEnum" placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px" size="small">
|
||||
<el-option v-for="item in diagnosisOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
>>>>>>> upstream/develop
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDeleteDiagnosis(scope.row, scope.$index)"
|
||||
>
|
||||
<el-button link type="primary" @click="handleDeleteDiagnosis(scope.row, scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -186,6 +164,7 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
@@ -196,6 +175,11 @@
|
||||
:patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
=======
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
>>>>>>> upstream/develop
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -292,7 +276,6 @@ function getList() {
|
||||
|
||||
form.value.diagnosisList = diagnosisList;
|
||||
emits('diagnosisSave', false);
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -321,7 +304,6 @@ function getList() {
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -594,7 +576,7 @@ function closeDiagnosisDialog(str) {
|
||||
getTree();
|
||||
}
|
||||
|
||||
function queryDiagnosisUse(value) {}
|
||||
function queryDiagnosisUse(value) { }
|
||||
|
||||
function handleChange(value) {
|
||||
diagnosisSearchkey.value = value;
|
||||
@@ -658,6 +640,7 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -93,6 +93,17 @@ export function geturger(data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 住院患者转科
|
||||
*/
|
||||
export function transferOrganization(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/transfer-organization-orders',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@ const submitApplicationForm = () => {
|
||||
}
|
||||
};
|
||||
const submitOk = () => {
|
||||
debugger;
|
||||
applicationFormDialogVisible.value = false;
|
||||
applicationFormName.value = null;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
destroy-on-close
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
title="出院申请"
|
||||
@close="closeDialog"
|
||||
>
|
||||
<div style="padding: 0 80px">
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
<el-form-item label="出院方式">
|
||||
<el-select v-model="form.outpatientType">
|
||||
<el-option
|
||||
v-for="(item, index) in dscg_way"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出院时间">
|
||||
<el-radio-group v-model="form.outpatientTime">
|
||||
<el-radio value="1">今日</el-radio>
|
||||
<el-radio value="2">明日</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="出院描述"
|
||||
><el-input v-model="form.outpatientDescription" type="textarea" rows="5" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitApplicationForm"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { dscg_way } = proxy.useDict('dscg_way');
|
||||
const dialogVisible = ref(false);
|
||||
const form = reactive({
|
||||
outpatientType: [],
|
||||
outpatientTime: '',
|
||||
outpatientDescription: '',
|
||||
});
|
||||
|
||||
function openDialog() {
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
destroy-on-close
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
title="转科申请"
|
||||
@close="closeDialog"
|
||||
>
|
||||
<div style="padding: 0 80px">
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
<el-form-item label="转入科室" prop="targetOrganizationId">
|
||||
<el-select
|
||||
v-model="form.targetOrganizationId"
|
||||
@change="fetchWardList"
|
||||
placeholder="请选择转入科室"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转入病区" prop="targetLocationId">
|
||||
<el-select v-model="form.targetLocationId" no-data-text="请先选择科室" placeholder="请选择转入病区">
|
||||
<el-option
|
||||
v-for="item in wardList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转科时间" prop="startTime">
|
||||
<el-radio-group v-model="form.startTime">
|
||||
<el-radio :value="today">今日</el-radio>
|
||||
<el-radio :value="tomorrow">明日</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转科原因" prop="reasonText">
|
||||
<el-input
|
||||
v-model="form.reasonText"
|
||||
type="textarea"
|
||||
rows="5"
|
||||
placeholder="请输入转科原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitApplicationForm"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { transferOrganization } from './api.js';
|
||||
import { getWardList, getOrgList } from '@/api/public.js';
|
||||
import { patientInfo } from '../../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogVisible = ref(false);
|
||||
const deptList = ref([]); // 科室列表
|
||||
const wardList = ref([]); // 病区列表
|
||||
const today = ref(proxy.formatDateStr(new Date(),'YYYY-MM-DD HH:mm:ss'))
|
||||
const tomorrow = ref(proxy.formatDateStr(new Date().setDate(new Date + 1),'YYYY-MM-DD HH:mm:ss'))
|
||||
|
||||
const form = reactive({
|
||||
targetOrganizationId: '',
|
||||
targetLocationId: '',
|
||||
startTime: '',
|
||||
reasonText: '',
|
||||
});
|
||||
|
||||
// 表单校验规则
|
||||
const rules = ref({
|
||||
targetOrganizationId: [{ required: true, message: '请选择转入科室', trigger: 'change' }],
|
||||
targetLocationId: [{ required: true, message: '请选择转入病区', trigger: 'change' }],
|
||||
startTime: [{ required: true, message: '请选择转科时间', trigger: 'change' }],
|
||||
reasonText: [{ required: false }],
|
||||
});
|
||||
|
||||
// 获取科室列表
|
||||
function fetchDeptList() {
|
||||
getOrgList().then((response) => {
|
||||
deptList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取病区列表
|
||||
function fetchWardList() {
|
||||
getWardList({ orgId: form.targetOrganizationId }).then((response) => {
|
||||
wardList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
function openDialog() {
|
||||
dialogVisible.value = true;
|
||||
// 打开对话框时获取数据
|
||||
fetchDeptList();
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
function submitApplicationForm() {
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
console.log(patientInfo.value);
|
||||
if (valid) {
|
||||
form.encounterId = patientInfo.value.encounterId
|
||||
form.patientId = patientInfo.value.patientId
|
||||
// 表单校验通过,执行提交逻辑
|
||||
transferOrganization(form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('转科申请已提交');
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 表单校验不通过
|
||||
proxy.$modal.msgWarning('请完善必填信息');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭对话框
|
||||
function closeDialog() {
|
||||
// 重置表单
|
||||
proxy.$refs.formRef.resetFields();
|
||||
// 重置数据
|
||||
Object.assign(form, {
|
||||
targetOrganizationId: '',
|
||||
targetLocationId: '',
|
||||
startTime: '',
|
||||
reasonText: '',
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
@@ -10,10 +10,20 @@
|
||||
<el-button type="warning" plain @click="handleSingOut()" :disabled="false">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="proxy.$refs.orderFroupRef.handleOpen()" :disabled="false">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="proxy.$refs.orderFroupRef.handleOpen()"
|
||||
:disabled="false"
|
||||
>
|
||||
组套
|
||||
</el-button>
|
||||
<el-button type="primary" plain :disabled="false" @click="proxy.$refs.prescriptionHistoryRef.handleOpen()">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
:disabled="false"
|
||||
@click="proxy.$refs.prescriptionHistoryRef.handleOpen()"
|
||||
>
|
||||
历史
|
||||
</el-button>
|
||||
<el-button type="default" @click="combination()" :disabled="false"> 组合 </el-button>
|
||||
@@ -24,13 +34,22 @@
|
||||
<el-button type="danger" plain @click="handleDelete()" :disabled="false"> 删除 </el-button>
|
||||
<span class="descriptions-item-label"> 诊断: </span>
|
||||
<el-select v-model="conditionDefinitionId" placeholder="诊断" style="width: 180px">
|
||||
<el-option v-for="item in diagnosisList" :key="item.conditionId" :label="item.name" :value="item.definitionId"
|
||||
@click="handleDiagnosisChange(item)" />
|
||||
<el-option
|
||||
v-for="item in diagnosisList"
|
||||
:key="item.conditionId"
|
||||
:label="item.name"
|
||||
:value="item.definitionId"
|
||||
@click="handleDiagnosisChange(item)"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="descriptions-item-label"> 费用性质: </span>
|
||||
<el-select v-model="accountId" placeholder="费用性质" style="width: 180px">
|
||||
<el-option v-for="item in contractList" :key="item.accountId" :label="item.contractName"
|
||||
:value="item.accountId" />
|
||||
<el-option
|
||||
v-for="item in contractList"
|
||||
:key="item.accountId"
|
||||
:label="item.contractName"
|
||||
:value="item.accountId"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="descriptions-item-label">
|
||||
合计金额:{{ totalAmount ? totalAmount.toFixed(2) : 0 }}元
|
||||
@@ -47,19 +66,38 @@
|
||||
<el-radio-button label="临时" value="2" />
|
||||
</el-radio-group>
|
||||
<el-select v-model="orderClassCode" placeholder="医嘱类型" style="width: 240px">
|
||||
<el-option v-for="item in adviceTypeList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option
|
||||
v-for="item in adviceTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select v-model="orderStatus" placeholder="医嘱状态" style="width: 240px"> </el-select>
|
||||
<el-button link type="primary" @click="handleTransferOrg">转科</el-button>
|
||||
<el-button link type="primary" @click="handleLeaveHospital">出院</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inpatientDoctor-order-table">
|
||||
<el-table max-height="650" ref="prescriptionRef" :data="prescriptionList" row-key="uniqueKey" border
|
||||
@cell-click="clickRow" @row-dblclick="clickRowDb" v-loading="loading" :expand-row-keys="expandOrder">
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="prescriptionRef"
|
||||
:data="prescriptionList"
|
||||
row-key="uniqueKey"
|
||||
border
|
||||
@cell-click="clickRow"
|
||||
@row-dblclick="clickRowDb"
|
||||
v-loading="loading"
|
||||
:expand-row-keys="expandOrder"
|
||||
>
|
||||
<el-table-column type="expand" width="1" style="width: 0">
|
||||
<template #default="scope">
|
||||
<el-form :model="scope.row" :rules="rowRules" :ref="'formRef' + scope.$index">
|
||||
<div class="expend_div" style="padding: 16px; background: #f8f9fa; border-radius: 8px">
|
||||
<div
|
||||
class="expend_div"
|
||||
style="padding: 16px; background: #f8f9fa; border-radius: 8px"
|
||||
>
|
||||
<template v-if="scope.row.adviceType == 1">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
|
||||
<span class="medicine-title">
|
||||
@@ -92,10 +130,17 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="lotNumber" label="药房:">
|
||||
<el-select v-model="scope.row.inventoryId" style="width: 180px; margin-right: 20px"
|
||||
placeholder="药房">
|
||||
<el-option v-for="item in scope.row.stockList" :key="item.inventoryId" :value="item.inventoryId"
|
||||
:label="item.locationName +
|
||||
<el-select
|
||||
v-model="scope.row.inventoryId"
|
||||
style="width: 180px; margin-right: 20px"
|
||||
placeholder="药房"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in scope.row.stockList"
|
||||
:key="item.inventoryId"
|
||||
:value="item.inventoryId"
|
||||
:label="
|
||||
item.locationName +
|
||||
' ' +
|
||||
'批次号: ' +
|
||||
item.lotNumber +
|
||||
@@ -111,19 +156,32 @@
|
||||
item.price.toFixed(2) +
|
||||
'/' +
|
||||
item.unitCode_dictText
|
||||
" @click="handleNumberClick(item, scope.$index)" />
|
||||
"
|
||||
@click="handleNumberClick(item, scope.$index)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行次数:" prop="executeNum" class="required-field" data-prop="executeNum"
|
||||
v-if="scope.row.injectFlag == 1">
|
||||
<el-input-number :min="1" v-model="scope.row.executeNum" controls-position="right"
|
||||
:controls="false" :ref="(el) => (inputRefs.executeNum = el)"
|
||||
<el-form-item
|
||||
label="执行次数:"
|
||||
prop="executeNum"
|
||||
class="required-field"
|
||||
data-prop="executeNum"
|
||||
v-if="scope.row.injectFlag == 1"
|
||||
>
|
||||
<el-input-number
|
||||
:min="1"
|
||||
v-model="scope.row.executeNum"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
:ref="(el) => (inputRefs.executeNum = el)"
|
||||
@keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.$index)"
|
||||
style="width: 70px; margin-right: 20px" />
|
||||
</el-form-item>x
|
||||
<span class="medicine-info"> 诊断:{{ diagnosisName }} </span>x
|
||||
style="width: 70px; margin-right: 20px"
|
||||
/> </el-form-item
|
||||
>x <span class="medicine-info"> 诊断:{{ diagnosisName }} </span>x
|
||||
<span class="medicine-info"> 皮试:{{ scope.row.skinTestFlag_enumText }} </span>
|
||||
<span class="medicine-info"> 注射药品:{{ scope.row.injectFlag_enumText }} </span>
|
||||
<span class="medicine-info">
|
||||
注射药品:{{ scope.row.injectFlag_enumText }}
|
||||
</span>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
</span>
|
||||
@@ -131,104 +189,200 @@
|
||||
<div style="display: flex; align-items: center; gap: 12px; flex-wrap: wrap">
|
||||
<div class="form-group">
|
||||
<!-- 单次剂量 -->
|
||||
<el-form-item label="单次用量:" prop="doseQuantity" class="required-field" data-prop="doseQuantity">
|
||||
<el-input-number :min="0" v-model="scope.row.doseQuantity" controls-position="right"
|
||||
:controls="false" style="width: 70px; margin-right: 20px"
|
||||
:ref="(el) => (inputRefs.doseQuantity = el)" @input="convertValues(scope.row, scope.$index)"
|
||||
@keyup.enter.prevent="handleEnter('doseQuantity', scope.row, scope.$index)" />
|
||||
<el-form-item
|
||||
label="单次用量:"
|
||||
prop="doseQuantity"
|
||||
class="required-field"
|
||||
data-prop="doseQuantity"
|
||||
>
|
||||
<el-input-number
|
||||
:min="0"
|
||||
v-model="scope.row.doseQuantity"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 70px; margin-right: 20px"
|
||||
:ref="(el) => (inputRefs.doseQuantity = el)"
|
||||
@input="convertValues(scope.row, scope.$index)"
|
||||
@keyup.enter.prevent="
|
||||
handleEnter('doseQuantity', scope.row, scope.$index)
|
||||
"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 剂量单位 -->
|
||||
<el-select v-model="scope.row.minUnitCode" style="width: 70px; margin-right: 20px"
|
||||
placeholder=" ">
|
||||
<el-select
|
||||
v-model="scope.row.minUnitCode"
|
||||
style="width: 70px; margin-right: 20px"
|
||||
placeholder=" "
|
||||
>
|
||||
<template v-for="item in scope.row.unitCodeList" :key="item.value">
|
||||
<el-option v-if="
|
||||
scope.row.unitCodeList.length == 3
|
||||
? item.type == unitMap['minUnit']
|
||||
: item.type == unitMap['unit']
|
||||
" :value="item.value" :label="item.label" />
|
||||
<el-option
|
||||
v-if="
|
||||
scope.row.unitCodeList.length == 3
|
||||
? item.type == unitMap['minUnit']
|
||||
: item.type == unitMap['unit']
|
||||
"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<span>=</span>
|
||||
<!-- 单次剂量 -->
|
||||
<el-form-item prop="dose" class="required-field" data-prop="dose">
|
||||
<el-input-number v-model="scope.row.dose" controls-position="right" :controls="false"
|
||||
style="width: 70px; margin: 0 20px" :ref="(el) => (inputRefs.dose = el)"
|
||||
<el-input-number
|
||||
v-model="scope.row.dose"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 70px; margin: 0 20px"
|
||||
:ref="(el) => (inputRefs.dose = el)"
|
||||
@input="convertDoseValues(scope.row, scope.$index)"
|
||||
@keyup.enter.prevent="handleEnter('dose', scope.row, scope.$index)" />
|
||||
@keyup.enter.prevent="handleEnter('dose', scope.row, scope.$index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 全部单位 -->
|
||||
<el-select v-model="scope.row.doseUnitCode" style="width: 70px" placeholder=" "
|
||||
@change="convertValues(scope.row, scope.$index)">
|
||||
<el-option v-for="item in scope.row.unitCodeList" :value="item.value" :label="item.label"
|
||||
:key="item.value" />
|
||||
<el-select
|
||||
v-model="scope.row.doseUnitCode"
|
||||
style="width: 70px"
|
||||
placeholder=" "
|
||||
@change="convertValues(scope.row, scope.$index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in scope.row.unitCodeList"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<el-form-item label="给药途径:" prop="methodCode" class="required-field" data-prop="methodCode">
|
||||
<el-select v-model="scope.row.methodCode" placeholder="给药途径" clearable filterable
|
||||
:ref="(el) => (inputRefs.methodCode = el)" @keyup.enter.prevent="
|
||||
<el-form-item
|
||||
label="给药途径:"
|
||||
prop="methodCode"
|
||||
class="required-field"
|
||||
data-prop="methodCode"
|
||||
>
|
||||
<el-select
|
||||
v-model="scope.row.methodCode"
|
||||
placeholder="给药途径"
|
||||
clearable
|
||||
filterable
|
||||
:ref="(el) => (inputRefs.methodCode = el)"
|
||||
@keyup.enter.prevent="
|
||||
() => {
|
||||
inputRefs.methodCode.blur();
|
||||
}
|
||||
" @visible-change="
|
||||
(value) => {
|
||||
if (!value) {
|
||||
handleEnter('methodCode', scope.row, scope.$index);
|
||||
"
|
||||
@visible-change="
|
||||
(value) => {
|
||||
if (!value) {
|
||||
handleEnter('methodCode', scope.row, scope.$index);
|
||||
}
|
||||
}
|
||||
}
|
||||
">
|
||||
<el-option v-for="dict in method_code" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用药频次:" prop="rateCode" class="required-field" data-prop="rateCode">
|
||||
<el-select v-model="scope.row.rateCode" placeholder="频次" style="width: 120px" filterable
|
||||
<el-form-item
|
||||
label="用药频次:"
|
||||
prop="rateCode"
|
||||
class="required-field"
|
||||
data-prop="rateCode"
|
||||
>
|
||||
<el-select
|
||||
v-model="scope.row.rateCode"
|
||||
placeholder="频次"
|
||||
style="width: 120px"
|
||||
filterable
|
||||
@keyup.enter.prevent="
|
||||
() => {
|
||||
inputRefs.rateCode.blur();
|
||||
}
|
||||
" @change="calculateTotalAmount(scope.row, scope.$index)" @visible-change="
|
||||
(value) => {
|
||||
if (!value) {
|
||||
handleEnter('rateCode', scope.row, scope.$index);
|
||||
"
|
||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
||||
@visible-change="
|
||||
(value) => {
|
||||
if (!value) {
|
||||
handleEnter('rateCode', scope.row, scope.$index);
|
||||
}
|
||||
}
|
||||
}
|
||||
" :ref="(el) => (inputRefs.rateCode = el)">
|
||||
<el-option v-for="dict in rate_code" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
"
|
||||
:ref="(el) => (inputRefs.rateCode = el)"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in rate_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
"
|
||||
>
|
||||
<div class="form-group">
|
||||
<el-form-item label="用药天数:" prop="dispensePerDuration" class="required-field"
|
||||
data-prop="dispensePerDuration">
|
||||
<el-input-number v-model="scope.row.dispensePerDuration" style="width: 80px" :min="1"
|
||||
controls-position="right" :controls="false"
|
||||
:ref="(el) => (inputRefs.dispensePerDuration = el)" @keyup.enter.prevent="
|
||||
<el-form-item
|
||||
label="用药天数:"
|
||||
prop="dispensePerDuration"
|
||||
class="required-field"
|
||||
data-prop="dispensePerDuration"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.dispensePerDuration"
|
||||
style="width: 80px"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
:ref="(el) => (inputRefs.dispensePerDuration = el)"
|
||||
@keyup.enter.prevent="
|
||||
handleEnter('dispensePerDuration', scope.row, scope.$index)
|
||||
">
|
||||
"
|
||||
>
|
||||
<template #suffix>天</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="总量:" prop="quantity" class="required-field" data-prop="quantity">
|
||||
<el-input-number v-model="scope.row.quantity" style="width: 70px" controls-position="right"
|
||||
:controls="false" :ref="(el) => (inputRefs.quantity = el)"
|
||||
<el-form-item
|
||||
label="总量:"
|
||||
prop="quantity"
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.quantity"
|
||||
style="width: 70px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
:ref="(el) => (inputRefs.quantity = el)"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
|
||||
@input="calculateTotalPrice(scope.row, scope.$index)" />
|
||||
@input="calculateTotalPrice(scope.row, scope.$index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-select v-model="scope.row.unitCode" style="width: 70px; margin-right: 20px" placeholder=" "
|
||||
@change="calculateTotalAmount(scope.row, scope.$index)">
|
||||
<el-select
|
||||
v-model="scope.row.unitCode"
|
||||
style="width: 70px; margin-right: 20px"
|
||||
placeholder=" "
|
||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
||||
>
|
||||
<template v-for="item in scope.row.unitCodeList" :key="item.value">
|
||||
<el-option v-if="item.type != unitMap['dose']" :value="item.value" :label="item.label" />
|
||||
<el-option
|
||||
v-if="item.type != unitMap['dose']"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -251,10 +405,17 @@
|
||||
}}
|
||||
</span>
|
||||
<div class="form-group">
|
||||
<el-select v-model="scope.row.lotNumber" style="width: 180px; margin-right: 20px"
|
||||
placeholder="药房">
|
||||
<el-option v-for="item in scope.row.stockList" :key="item.lotNumber" :value="item.lotNumber"
|
||||
:label="item.locationName +
|
||||
<el-select
|
||||
v-model="scope.row.lotNumber"
|
||||
style="width: 180px; margin-right: 20px"
|
||||
placeholder="药房"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in scope.row.stockList"
|
||||
:key="item.lotNumber"
|
||||
:value="item.lotNumber"
|
||||
:label="
|
||||
item.locationName +
|
||||
' ' +
|
||||
'批次号: ' +
|
||||
item.lotNumber +
|
||||
@@ -270,26 +431,49 @@
|
||||
item.price.toFixed(2) +
|
||||
'/' +
|
||||
item.unitCode_dictText
|
||||
" @click="handleNumberClick(item, scope.$index)" />
|
||||
"
|
||||
@click="handleNumberClick(item, scope.$index)"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="数量:" prop="quantity" class="required-field" data-prop="quantity">
|
||||
<el-input-number placeholder="数量" v-model="scope.row.quantity" style="width: 70px"
|
||||
controls-position="right" :controls="false"
|
||||
<el-form-item
|
||||
label="数量:"
|
||||
prop="quantity"
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
placeholder="数量"
|
||||
v-model="scope.row.quantity"
|
||||
style="width: 70px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
|
||||
@input="calculateTotalAmount(scope.row, scope.$index)" />
|
||||
@input="calculateTotalAmount(scope.row, scope.$index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-select v-model="scope.row.unitCode" style="width: 70px; margin-right: 20px" placeholder=" "
|
||||
@change="calculateTotalAmount(scope.row, scope.$index)">
|
||||
<el-select
|
||||
v-model="scope.row.unitCode"
|
||||
style="width: 70px; margin-right: 20px"
|
||||
placeholder=" "
|
||||
@change="calculateTotalAmount(scope.row, scope.$index)"
|
||||
>
|
||||
<template v-for="item in scope.row.unitCodeList" :key="item.value">
|
||||
<el-option v-if="item.type != unitMap['dose']" :value="item.value" :label="item.label" @click="
|
||||
() => {
|
||||
scope.row.unitCode_dictText = item.label;
|
||||
}
|
||||
" />
|
||||
<el-option
|
||||
v-if="item.type != unitMap['dose']"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
@click="
|
||||
() => {
|
||||
scope.row.unitCode_dictText = item.label;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
总金额:{{
|
||||
scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元'
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
|
||||
@@ -308,20 +492,45 @@
|
||||
}}
|
||||
</span>
|
||||
<div class="form-group">
|
||||
<el-form-item label="执行次数:" prop="quantity" class="required-field" data-prop="quantity">
|
||||
<el-input-number placeholder="执行次数" style="width: 100px; margin: 0 20px"
|
||||
v-model="scope.row.quantity" controls-position="right" :controls="false"
|
||||
<el-form-item
|
||||
label="执行次数:"
|
||||
prop="quantity"
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
placeholder="执行次数"
|
||||
style="width: 100px; margin: 0 20px"
|
||||
v-model="scope.row.quantity"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
|
||||
@input="calculateTotalPrice(scope.row, scope.$index)" />
|
||||
@input="calculateTotalPrice(scope.row, scope.$index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行科室:" prop="orgId" class="required-field" data-prop="orgId">
|
||||
<el-tree-select clearable v-model="scope.row.orgId" style="width: 200px" :data="organization"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }" value-key="id" check-strictly
|
||||
default-expand-all @change="(value) => handleOrgChange(value, scope.$index)"
|
||||
placeholder="请选择执行科室" />
|
||||
<el-form-item
|
||||
label="执行科室:"
|
||||
prop="orgId"
|
||||
class="required-field"
|
||||
data-prop="orgId"
|
||||
>
|
||||
<el-tree-select
|
||||
clearable
|
||||
v-model="scope.row.orgId"
|
||||
style="width: 200px"
|
||||
:data="organization"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
default-expand-all
|
||||
@change="(value) => handleOrgChange(value, scope.$index)"
|
||||
placeholder="请选择执行科室"
|
||||
/>
|
||||
</el-form-item>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
总金额:{{
|
||||
scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元'
|
||||
}}
|
||||
</span>
|
||||
<span style="font-size: 16px; font-weight: 600">
|
||||
<!-- 金额: {{ scope.row.priceList[0].price }} -->
|
||||
@@ -338,18 +547,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="" align="center" prop="groupId" width="60">
|
||||
<template #header>
|
||||
<el-checkbox v-model="checkAll" @change="
|
||||
(value) => {
|
||||
prescriptionList.forEach((item, index) => {
|
||||
groupIndexList.push(index);
|
||||
item.check = value;
|
||||
});
|
||||
}
|
||||
" />
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="
|
||||
(value) => {
|
||||
prescriptionList.forEach((item, index) => {
|
||||
groupIndexList.push(index);
|
||||
item.check = value;
|
||||
});
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-checkbox v-model="scope.row.check" @dblclick.stop="" placeholder=""
|
||||
@change="(value) => handleCheckBoxChange(value, scope.$index, scope.row)" />
|
||||
<el-checkbox
|
||||
v-model="scope.row.check"
|
||||
@dblclick.stop=""
|
||||
placeholder=""
|
||||
@change="(value) => handleCheckBoxChange(value, scope.$index, scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组" align="center" width="60">
|
||||
@@ -363,11 +579,18 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="" width="120">
|
||||
<template #default="scope">
|
||||
<el-radio-group v-model="scope.row.therapyEnum" size="small" v-if="getRowDisabled(scope.row)">
|
||||
<el-radio-group
|
||||
v-model="scope.row.therapyEnum"
|
||||
size="small"
|
||||
v-if="getRowDisabled(scope.row)"
|
||||
>
|
||||
<el-radio-button label="长期" value="1" />
|
||||
<el-radio-button label="临时" value="2" />
|
||||
</el-radio-group>
|
||||
<span v-else :style="scope.row.therapyEnum == '1' ? 'color: #a6745c' : 'color: #3787a5'">
|
||||
<span
|
||||
v-else
|
||||
:style="scope.row.therapyEnum == '1' ? 'color: #a6745c' : 'color: #3787a5'"
|
||||
>
|
||||
{{ scope.row.therapyEnum_enumText }}
|
||||
</span>
|
||||
</template>
|
||||
@@ -375,31 +598,54 @@
|
||||
<el-table-column label="医嘱" align="center" prop="productName" width="300">
|
||||
<template #default="scope">
|
||||
<template v-if="getRowDisabled(scope.row)">
|
||||
<el-select style="width: 35%; margin-right: 20px" v-model="scope.row.adviceType"
|
||||
:ref="'adviceTypeRef' + scope.$index" @change="
|
||||
<el-select
|
||||
style="width: 35%; margin-right: 20px"
|
||||
v-model="scope.row.adviceType"
|
||||
:ref="'adviceTypeRef' + scope.$index"
|
||||
@change="
|
||||
(value) => {
|
||||
expandOrder = [];
|
||||
prescriptionList[scope.$index].adviceName = undefined;
|
||||
adviceQueryParams.adviceType = value;
|
||||
}
|
||||
">
|
||||
<el-option v-for="item in adviceTypeList" :key="item.value" :label="item.label" :value="item.value"
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in adviceTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@click="
|
||||
() => {
|
||||
prescriptionList[scope.$index].adviceType = item.value;
|
||||
prescriptionList[scope.$index].adviceType_dictText = item.label;
|
||||
}
|
||||
" />
|
||||
"
|
||||
/>
|
||||
</el-select>
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
:width="1200">
|
||||
<adviceBaseList ref="adviceTableRef" :popoverVisible="scope.row.showPopover"
|
||||
:adviceQueryParams="adviceQueryParams" :patientInfo="patientInfo"
|
||||
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)" />
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
:width="1200"
|
||||
>
|
||||
<adviceBaseList
|
||||
ref="adviceTableRef"
|
||||
:popoverVisible="scope.row.showPopover"
|
||||
:adviceQueryParams="adviceQueryParams"
|
||||
:patientInfo="patientInfo"
|
||||
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input :ref="'adviceRef' + scope.$index" style="width: 50%" v-model="scope.row.adviceName"
|
||||
placeholder="请选择项目" @input="handleChange" @click="handleFocus(scope.row, scope.$index)"
|
||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)" @keydown="
|
||||
<el-input
|
||||
:ref="'adviceRef' + scope.$index"
|
||||
style="width: 50%"
|
||||
v-model="scope.row.adviceName"
|
||||
placeholder="请选择项目"
|
||||
@input="handleChange"
|
||||
@click="handleFocus(scope.row, scope.$index)"
|
||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
||||
@keydown="
|
||||
(e) => {
|
||||
if (!scope.row.showPopover) return;
|
||||
// 拦截上下键和回车事件
|
||||
@@ -409,7 +655,9 @@
|
||||
adviceTableRef.handleKeyDown(e);
|
||||
}
|
||||
}
|
||||
" @blur="handleBlur(scope.row)" />
|
||||
"
|
||||
@blur="handleBlur(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
@@ -464,11 +712,11 @@
|
||||
{{
|
||||
scope.row.rateCode_dictText
|
||||
? scope.row.rateCode_dictText +
|
||||
' ' +
|
||||
scope.row.dispensePerDuration +
|
||||
'天' +
|
||||
' ' +
|
||||
scope.row.methodCode_dictText
|
||||
' ' +
|
||||
scope.row.dispensePerDuration +
|
||||
'天' +
|
||||
' ' +
|
||||
scope.row.methodCode_dictText
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
@@ -510,8 +758,8 @@
|
||||
:patientInfo="patientInfo.value"
|
||||
@userPrescriptionHistory="handleSaveHistory"
|
||||
/> -->
|
||||
|
||||
|
||||
<LeaveHospitalDialog ref="leaveHospitalDialogRef" />
|
||||
<TransferOrganizationDialog ref="transferOrganizationRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -537,6 +785,8 @@ import { patientInfo } from '../../store/patient.js';
|
||||
import Decimal from 'decimal.js';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import ApplicationFormBottomBtn from './applicationForm/applicationFormBottomBtn.vue';
|
||||
import LeaveHospitalDialog from './applicationForm/leaveHospitalDialog.vue';
|
||||
import TransferOrganizationDialog from './applicationForm/transferOrganizationDialog.vue';
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
@@ -1376,7 +1626,7 @@ function handleSingOut() {
|
||||
function handleStopAdvice() {
|
||||
let requestIdList = prescriptionList.value
|
||||
.filter((item) => {
|
||||
return item.check && item.therapyEnum == '1';
|
||||
return item.check;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
@@ -1384,10 +1634,10 @@ function handleStopAdvice() {
|
||||
adviceType: item.adviceType,
|
||||
};
|
||||
});
|
||||
if (requestIdList.length == 0) {
|
||||
proxy.$modal.msgWarning('仅长期医嘱可停止');
|
||||
return;
|
||||
}
|
||||
// if (requestIdList.length == 0) {
|
||||
// proxy.$modal.msgWarning('仅长期医嘱可停止');
|
||||
// return;
|
||||
// }
|
||||
stopAdvice(requestIdList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
@@ -1743,10 +1993,12 @@ function sortPrescriptionList() {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取全部选中行
|
||||
// function getSelectRows() {
|
||||
// return prescriptionList.value.filter((item) => item.check);
|
||||
// }
|
||||
function handleLeaveHospital() {
|
||||
proxy.$refs['leaveHospitalDialogRef'].openDialog();
|
||||
}
|
||||
function handleTransferOrg() {
|
||||
proxy.$refs['transferOrganizationRef'].openDialog();
|
||||
}
|
||||
|
||||
// 处理行chexkbox选中
|
||||
function handleCheckBoxChange(value, index, row) {
|
||||
@@ -1893,7 +2145,7 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.order-operate-btn {
|
||||
flex: none;
|
||||
}
|
||||
.inpatientDoctor-order-table{
|
||||
.inpatientDoctor-order-table {
|
||||
flex: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -5,26 +5,31 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div class="template-tree-container">
|
||||
<div class="search-box">
|
||||
<el-input placeholder="病历名称搜索..." v-model="queryParams.name">
|
||||
<template #append>
|
||||
<el-button @click="queryTemplateTree">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="disBtn" :class="{'disLeftBtnNor':leftShow,'disLeftBtnAct':!leftShow}" @click="disNode"><img src="../../../../assets/icons/svg/foldup.svg"></div>
|
||||
<div class="disBtn" :class="{'disRightBtnNor':rightShow,'disRightBtnAct':!rightShow}" @click="disNode_R"><img src="../../../../assets/icons/svg/foldup.svg"></div>
|
||||
<transition name="el-zoom-in-left">
|
||||
<div class="template-tree-container" v-if="leftShow">
|
||||
<div class="search-box">
|
||||
<el-input placeholder="病历名称搜索..." v-model="queryParams.name">
|
||||
<template #append>
|
||||
<el-button @click="queryTemplateTree">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<el-tree
|
||||
ref="templateTree"
|
||||
:data="templateData"
|
||||
:props="defaultProps"
|
||||
auto-expand-parent
|
||||
node-key="id"
|
||||
@node-click="handleNodeClick"
|
||||
class="template-tree"
|
||||
></el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<el-tree
|
||||
ref="templateTree"
|
||||
:data="templateData"
|
||||
:props="defaultProps"
|
||||
auto-expand-parent
|
||||
node-key="id"
|
||||
@node-click="handleNodeClick"
|
||||
class="template-tree"
|
||||
></el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<div class="operate-container">
|
||||
<div class="operate-btns">
|
||||
<el-space>
|
||||
@@ -40,25 +45,29 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quickly-container">
|
||||
<el-tabs v-model="quicklyactiveName" type="card">
|
||||
<el-tab-pane label="历史" name="history">
|
||||
<History
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
<Template
|
||||
@templateClick="handleTemplateClick"
|
||||
ref="templateRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
@edit="templateEdit"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<transition name="el-zoom-in-left">
|
||||
<div class="quickly-container" v-if="rightShow">
|
||||
<el-tabs v-model="quicklyactiveName" type="card">
|
||||
<el-tab-pane label="历史" name="history">
|
||||
<History
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
<Template
|
||||
@templateClick="handleTemplateClick"
|
||||
ref="templateRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
@edit="templateEdit"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<TemplateEdit
|
||||
ref="templateEditRef"
|
||||
:formData="editTemplateForm"
|
||||
@@ -93,6 +102,9 @@ const currentSelectTemplate = ref({
|
||||
const currentComponent = ref('');
|
||||
const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
@@ -175,7 +187,6 @@ const handleSubmitOk = async (data) => {
|
||||
if (currentOperate.value === 'add') {
|
||||
//
|
||||
try {
|
||||
// debugger;
|
||||
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
|
||||
ElMessage.error('请先选择患者!');
|
||||
return;
|
||||
@@ -263,11 +274,77 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
}
|
||||
const disNode_R = () => {
|
||||
rightShow.value = !rightShow.value;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.emr-use-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
img {
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
}
|
||||
.disBtn {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.disLeftBtnNor {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 18%;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(-90deg) ;
|
||||
}
|
||||
}
|
||||
.disLeftBtnAct {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 0;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
.disRightBtnNor {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 18.5%;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
.disRightBtnAct {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 0;
|
||||
width: 20px;
|
||||
height: 60px;
|
||||
z-index: 1111;
|
||||
img {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.template-tree-container {
|
||||
border-right: 1px solid #ebeef5;
|
||||
@@ -293,8 +370,9 @@ defineExpose({ state });
|
||||
}
|
||||
|
||||
.operate-container {
|
||||
width: 300px;
|
||||
flex: auto;
|
||||
width: 100%;
|
||||
//width: 300px;
|
||||
//flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 8px 8px 8px;
|
||||
@@ -323,4 +401,12 @@ defineExpose({ state });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.transition-width {
|
||||
transition-property: width;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,4 +11,5 @@ import BloodTtransfusionAapplication from './components/applicationShow/bloodTtr
|
||||
import ExamineApplication from './components/applicationShow/examineApplication.vue'
|
||||
import SurgeryApplication from './components/applicationShow/surgeryApplication.vue'
|
||||
import TestApplication from './components/applicationShow/testApplication.vue'
|
||||
export { PatientList, PatientCard, Advice,Diagnose, BloodTtransfusionAapplication, ExamineApplication, SurgeryApplication, TestApplication }
|
||||
import NursingStatus from './components/applicationShow/nursingStatus.vue'
|
||||
export { PatientList, PatientCard, Advice,Diagnose, BloodTtransfusionAapplication, ExamineApplication, SurgeryApplication, TestApplication, NursingStatus }
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<el-tab-pane label="诊断录入" name="diagnosis">
|
||||
<Diagnose ref="diagnosisRef" :patientInfo="patientInfo" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="住院病历" name="emr">
|
||||
<emr />
|
||||
<el-tab-pane label="住院病历" name="inhospitalEmr">
|
||||
<Emr ref="inhospitalEmrRef"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane>
|
||||
<el-tab-pane label="检验申请" name="test">
|
||||
@@ -37,6 +37,9 @@
|
||||
<el-tab-pane label="输血申请" name="blood">
|
||||
<BloodTtransfusionAapplication />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="护理状态" name="nursing">
|
||||
<NursingStatus />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-main>
|
||||
</el-container>
|
||||
@@ -48,7 +51,7 @@ import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue
|
||||
// const { proxy } = getCurrentInstance()
|
||||
// const emits = defineEmits([])
|
||||
// const props = defineProps({})
|
||||
import Emr from "./emr/index.vue";
|
||||
import Emr from './emr/index.vue';
|
||||
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
|
||||
import {
|
||||
PatientList,
|
||||
@@ -58,6 +61,7 @@ import {
|
||||
ExamineApplication,
|
||||
SurgeryApplication,
|
||||
TestApplication,
|
||||
NursingStatus,
|
||||
} from './index.js';
|
||||
const state = reactive({});
|
||||
onBeforeMount(() => {});
|
||||
|
||||
@@ -0,0 +1,510 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="补费" width="90%" :close-on-click-modal="false">
|
||||
<!-- 弹窗内容 - 左右布局 -->
|
||||
<div style="display: flex; gap: 20px; height: 70vh">
|
||||
<!-- 左侧:收费组套列表 - 卡片式布局 -->
|
||||
<div
|
||||
style="
|
||||
width: 250px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
"
|
||||
>
|
||||
<!-- 搜索框 -->
|
||||
<div style="padding: 10px; border-bottom: 1px solid #e4e7ed">
|
||||
<el-input v-model="groupSearchText" placeholder="输入组套名称" clearable />
|
||||
</div>
|
||||
<!-- 收费组套列表 - 卡片式布局 -->
|
||||
<div style="flex: 1; overflow-y: auto; padding: 10px">
|
||||
<div
|
||||
v-for="group in chargeGroups"
|
||||
:key="group.id"
|
||||
class="group-card"
|
||||
@click="selectChargeGroup(group)"
|
||||
>
|
||||
<div class="group-status">
|
||||
<span class="status-dot"></span>
|
||||
{{ getGroupType(group.name) }}
|
||||
</div>
|
||||
<div class="group-name">{{ group.name }}</div>
|
||||
<div class="group-info">
|
||||
{{ getGroupInfo(group.id) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 只显示暂无数据文本 -->
|
||||
<div
|
||||
v-if="chargeGroups.length === 0"
|
||||
style="text-align: center; color: #909399; padding: 20px"
|
||||
>
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:费用项目和信息 -->
|
||||
<div style="flex: 1; display: flex; flex-direction: column">
|
||||
<!-- 费用项目表格 -->
|
||||
<el-table :data="feeItemsList" border style="width: 100%; flex: 1">
|
||||
<el-table-column label="收费项目" prop="itemName" min-width="200">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.itemName"
|
||||
placeholder="请输入收费项目"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="unitPrice" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.unitPrice"
|
||||
:min="0"
|
||||
:step="0.01"
|
||||
precision="2"
|
||||
style="width: 100px"
|
||||
@change="calculateTotalAmount"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计费数量" prop="quantity" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
:step="1"
|
||||
style="width: 100px"
|
||||
@change="calculateTotalAmount"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" prop="amount" width="100" align="center" />
|
||||
<el-table-column label="医保类型" prop="insuranceType" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.insuranceType"
|
||||
placeholder="医保类型"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="特限符合" prop="special" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.special" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加项目按钮 - 移到右侧费用项目表格下方 -->
|
||||
<div
|
||||
style="
|
||||
margin-top: 10px;
|
||||
padding: 15px;
|
||||
border: 1px dashed #dcdfe6;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
transition: all 0.3s;
|
||||
"
|
||||
@click="addEmptyItem"
|
||||
>
|
||||
+ 添加项目
|
||||
</div>
|
||||
|
||||
<!-- 底部信息区域 -->
|
||||
<div style="margin-top: 20px; display: flex; flex-wrap: wrap; gap: 15px">
|
||||
<div style="display: flex; align-items: center">
|
||||
<span style="margin-right: 8px">执行时间:</span>
|
||||
<el-date-picker
|
||||
v-model="executeTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<span style="margin-right: 8px">执行科室:</span>
|
||||
<el-select v-model="selectedDept" placeholder="选择科室" style="width: 150px">
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<span style="margin-right: 8px">开方医生:</span>
|
||||
<el-select v-model="selectedDoctor" placeholder="选择医生" style="width: 150px">
|
||||
<el-option label="内科医生" value="doctor1" />
|
||||
<el-option label="外科医生" value="doctor2" />
|
||||
<el-option label="儿科医生" value="doctor3" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<span style="margin-right: 8px">执行人:</span>
|
||||
<el-select v-model="executor" placeholder="选择执行人" style="width: 150px">
|
||||
<el-option label="系统管理员" value="admin" />
|
||||
<el-option label="护士甲" value="nurse1" />
|
||||
<el-option label="护士乙" value="nurse2" />
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 总金额和操作按钮 -->
|
||||
<div
|
||||
style="
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 14px; font-weight: bold; text-align: right">
|
||||
本次补费总金额:<span style="color: #ff4d4f">{{ totalAmount.toFixed(2) }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
|
||||
// Props定义
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
initialData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
patientInfo: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// Emits定义
|
||||
const emit = defineEmits(['update:visible', 'confirm', 'cancel']);
|
||||
|
||||
// 响应式数据
|
||||
const dialogVisible = computed({
|
||||
get: () => props.visible,
|
||||
set: (value) => emit('update:visible', value),
|
||||
});
|
||||
const searchItemText = ref('');
|
||||
const selectedItemName = ref('');
|
||||
const feeTabs = ref('chargeItems');
|
||||
const feeItemsList = ref([]);
|
||||
const executeTime = ref('');
|
||||
const selectedDept = ref('');
|
||||
const selectedDoctor = ref('');
|
||||
const executor = ref('');
|
||||
const departmentOptions = ref([]);
|
||||
// 收费组套相关数据
|
||||
const chargeGroups = ref([]);
|
||||
const groupSearchText = ref('');
|
||||
|
||||
// 计算总金额
|
||||
const totalAmount = computed(() => {
|
||||
return feeItemsList.value.reduce((sum, item) => {
|
||||
return sum + (item.unitPrice || 0) * (item.quantity || 0);
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
// 加载科室选项
|
||||
loadDepartmentOptions();
|
||||
// 加载收费组套数据
|
||||
loadChargeGroups();
|
||||
});
|
||||
|
||||
// 监听初始数据变化
|
||||
watch(
|
||||
() => props.initialData,
|
||||
(newData) => {
|
||||
if (newData && newData.length > 0) {
|
||||
initFeeDialogData(newData);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
// 监听弹窗显示状态
|
||||
watch(
|
||||
() => props.visible,
|
||||
(visible) => {
|
||||
if (visible) {
|
||||
// 设置默认执行时间为当前时间
|
||||
executeTime.value = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
|
||||
} else {
|
||||
// 弹窗关闭时重置数据
|
||||
resetData();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 加载科室选项
|
||||
function loadDepartmentOptions() {
|
||||
// 模拟科室数据
|
||||
departmentOptions.value = [
|
||||
{ label: '内科', value: 'internal' },
|
||||
{ label: '外科', value: 'surgery' },
|
||||
{ label: '儿科', value: 'pediatrics' },
|
||||
{ label: '妇产科', value: 'obstetrics' },
|
||||
{ label: '其他科室', value: 'others' },
|
||||
];
|
||||
}
|
||||
|
||||
// 加载收费组套数据
|
||||
function loadChargeGroups() {
|
||||
// 模拟收费组套数据
|
||||
chargeGroups.value = [
|
||||
{ id: '1', name: '血常规检查组套' },
|
||||
{ id: '2', name: '生化检查组套' },
|
||||
{ id: '3', name: '心电图检查组套' },
|
||||
{ id: '4', name: 'CT检查组套' },
|
||||
{ id: '5', name: '输液治疗组套' },
|
||||
];
|
||||
}
|
||||
|
||||
// 获取组套类型
|
||||
function getGroupType(name) {
|
||||
if (name.includes('检查')) return '检查';
|
||||
if (name.includes('治疗')) return '治疗';
|
||||
return '常规';
|
||||
}
|
||||
|
||||
// 获取组套信息
|
||||
function getGroupInfo(id) {
|
||||
const infoMap = {
|
||||
1: '检验科/基础检查',
|
||||
2: '检验科/生化项目',
|
||||
3: '心电图室/常规检查',
|
||||
4: '影像科/影像学检查',
|
||||
5: '内科/治疗项目',
|
||||
};
|
||||
return infoMap[id] || '标准收费项目';
|
||||
}
|
||||
|
||||
// 初始化费用数据
|
||||
function initFeeDialogData(selectedRows) {
|
||||
// 将选中的项目转换为弹窗中的费用项目格式
|
||||
feeItemsList.value = selectedRows.map((row) => ({
|
||||
itemName: row.chargeItem,
|
||||
unitPrice: row.unitPrice,
|
||||
quantity: row.quantity,
|
||||
amount: row.unitPrice * row.quantity,
|
||||
dept: '内科',
|
||||
special: false,
|
||||
insuranceType: '',
|
||||
}));
|
||||
}
|
||||
|
||||
// 选择收费组套
|
||||
function selectChargeGroup(group) {
|
||||
// 模拟根据选中的组套添加对应的费用项目
|
||||
const groupItems = {
|
||||
1: [
|
||||
{
|
||||
itemName: '红细胞计数',
|
||||
unitPrice: 15.0,
|
||||
quantity: 1,
|
||||
dept: '检验科',
|
||||
special: false,
|
||||
insuranceType: '甲类',
|
||||
},
|
||||
],
|
||||
2: [
|
||||
{
|
||||
itemName: '肝功能检查',
|
||||
unitPrice: 80.0,
|
||||
quantity: 1,
|
||||
dept: '检验科',
|
||||
special: false,
|
||||
insuranceType: '甲类',
|
||||
},
|
||||
],
|
||||
3: [
|
||||
{
|
||||
itemName: '心电图检查',
|
||||
unitPrice: 45.0,
|
||||
quantity: 1,
|
||||
dept: '心电图室',
|
||||
special: false,
|
||||
insuranceType: '甲类',
|
||||
},
|
||||
],
|
||||
4: [
|
||||
{
|
||||
itemName: 'CT扫描',
|
||||
unitPrice: 300.0,
|
||||
quantity: 1,
|
||||
dept: '影像科',
|
||||
special: false,
|
||||
insuranceType: '乙类',
|
||||
},
|
||||
],
|
||||
5: [
|
||||
{
|
||||
itemName: '静脉输液',
|
||||
unitPrice: 20.0,
|
||||
quantity: 1,
|
||||
dept: '内科',
|
||||
special: false,
|
||||
insuranceType: '甲类',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const items = groupItems[group.id] || [];
|
||||
// 计算金额
|
||||
items.forEach((item) => {
|
||||
item.amount = item.unitPrice * item.quantity;
|
||||
});
|
||||
|
||||
// 添加到费用项目列表
|
||||
feeItemsList.value = [...feeItemsList.value, ...items];
|
||||
}
|
||||
|
||||
// 添加空白项目
|
||||
function addEmptyItem() {
|
||||
const newItem = {
|
||||
itemName: '', // 空白项目名称
|
||||
unitPrice: 0, // 默认单价为0
|
||||
quantity: 1, // 默认数量为1
|
||||
amount: 0, // 默认金额为0
|
||||
dept: '内科', // 默认科室
|
||||
special: false, // 默认特限不符合
|
||||
insuranceType: '', // 空白医保类型
|
||||
};
|
||||
|
||||
// 添加到费用项目列表
|
||||
feeItemsList.value.push(newItem);
|
||||
|
||||
// 显示提示信息
|
||||
ElMessage.success('已添加空白项目,请填写相关信息');
|
||||
}
|
||||
|
||||
// 计算总金额(当数量变化时调用)
|
||||
function calculateTotalAmount() {
|
||||
// 更新每个项目的金额
|
||||
feeItemsList.value.forEach((item) => {
|
||||
item.amount = (item.unitPrice || 0) * (item.quantity || 0);
|
||||
});
|
||||
}
|
||||
|
||||
// 取消操作
|
||||
function handleCancel() {
|
||||
emit('cancel');
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
|
||||
// 确认操作
|
||||
function handleConfirm() {
|
||||
// 构建提交数据
|
||||
const submitData = {
|
||||
feeItems: feeItemsList.value,
|
||||
executeTime: executeTime.value,
|
||||
department: selectedDept.value,
|
||||
doctor: selectedDoctor.value,
|
||||
executor: executor.value,
|
||||
totalAmount: totalAmount.value,
|
||||
};
|
||||
|
||||
// 发送确认事件
|
||||
emit('confirm', submitData);
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
|
||||
// 重置数据
|
||||
function resetData() {
|
||||
feeItemsList.value = [];
|
||||
executeTime.value = '';
|
||||
selectedDept.value = '';
|
||||
selectedDoctor.value = '';
|
||||
executor.value = '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.el-dialog__body) {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* 添加项目按钮样式 */
|
||||
:deep(
|
||||
.el-dialog div[style*='flex: 1; display: flex; flex-direction: column'] > div:nth-child(2):hover
|
||||
) {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
/* 收费组套卡片样式 */
|
||||
.group-card {
|
||||
background: #ffffff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.group-card:hover {
|
||||
border-color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
|
||||
}
|
||||
|
||||
.group-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: #67c23a;
|
||||
border-radius: 50%;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.group-name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin-bottom: 8px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.group-info {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
border-top: 1px dashed #ebeef5;
|
||||
padding-top: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,528 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh - 126px)">
|
||||
<!-- 操作工具栏 -->
|
||||
|
||||
<!-- 主内容区域 - 左右布局 -->
|
||||
<div style="display: flex; height: calc(100% - 51px)">
|
||||
<!-- 左侧:医嘱列表 -->
|
||||
<div style="width: 50%; border-right: 1px solid #e4e7ed; overflow-y: auto">
|
||||
<!--筛选条件 -->
|
||||
<div style="display: flex; align-items: center; gap: 10px; padding: 10px 0 0 10px">
|
||||
<!-- 医嘱类型tabs -->
|
||||
<el-tabs
|
||||
v-model="orderType"
|
||||
type="card"
|
||||
class="date-tabs"
|
||||
@tab-click="handleOrderTypeClick"
|
||||
style="width: auto; margin-right: 0"
|
||||
>
|
||||
<el-tab-pane label="全部" name="all"></el-tab-pane>
|
||||
<el-tab-pane label="长期" name="long"></el-tab-pane>
|
||||
<el-tab-pane label="临时" name="temp"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 医嘱类型选择 -->
|
||||
<el-form-item label="医嘱类型:" style="margin-bottom: 0">
|
||||
<el-select
|
||||
v-model="specificOrderType"
|
||||
placeholder="医嘱类型"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="请选择" value="" />
|
||||
<el-option
|
||||
v-for="type in orderTypeOptions"
|
||||
:key="type.value"
|
||||
:label="type.label"
|
||||
:value="type.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 显示有效勾选框 -->
|
||||
<el-checkbox v-model="showValid">显示有效</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 10px; padding: 10px">
|
||||
<el-form-item label="开方科室:" style="margin-bottom: 0">
|
||||
<el-select
|
||||
v-model="prescribeDept"
|
||||
placeholder="开方科室"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="请选择" value="" />
|
||||
<el-option
|
||||
v-for="type in departmentOptions"
|
||||
:key="type.value"
|
||||
:label="type.label"
|
||||
:value="type.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="执行科室:" style="margin-bottom: 0">
|
||||
<el-select
|
||||
v-model="execDepartment"
|
||||
placeholder="执行科室"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="请选择" value="" />
|
||||
<el-option
|
||||
v-for="type in departmentOptions"
|
||||
:key="type.value"
|
||||
:label="type.label"
|
||||
:value="type.value"
|
||||
/>
|
||||
</el-select>
|
||||
<button class="reset-btn" @click="resetExecDepartment" title="重置">
|
||||
<el-icon><Refresh /></el-icon>
|
||||
</button>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 执行科室选择 -->
|
||||
</div>
|
||||
<!-- 非医嘱计费 -->
|
||||
<div
|
||||
style="margin: 10px 0; border: 1px solid #e4e7ed; border-radius: 4px; overflow: hidden"
|
||||
>
|
||||
<div style="background-color: #f5f7fa; padding: 8px 12px; font-weight: bold">
|
||||
非医嘱计费
|
||||
</div>
|
||||
<table
|
||||
style="
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-top: none;
|
||||
"
|
||||
>
|
||||
<tbody>
|
||||
<tr style="border-bottom: 1px solid #e4e7ed">
|
||||
<td style="padding: 10px; width: 100px">床位计费</td>
|
||||
<td style="padding: 10px; text-align: right">
|
||||
住院天数:{{ hospitalDays }}天 / 计费数量:{{ billingQuantity }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 10px; width: 100px">其他</td>
|
||||
<td style="padding: 10px; text-align: right">总费用:{{ totalCost.toFixed(2) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 医嘱表格 -->
|
||||
<div v-loading="loading">
|
||||
<el-table
|
||||
ref="orderTableRef"
|
||||
:data="orderList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#f5f7fa !important' }"
|
||||
>
|
||||
<!-- <el-table-column type="selection" align="center" width="50" /> -->
|
||||
<el-table-column label="类型" prop="type" width="80" align="center" />
|
||||
<el-table-column label="医嘱内容" prop="content" />
|
||||
<el-table-column label="预计执行" prop="unit" width="100" align="center" />
|
||||
<el-table-column label="开始/停止" prop="period" width="180" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.startDate }}<br />
|
||||
{{ scope.row.endDate || '未停止' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:费用列表 -->
|
||||
<div style="width: 50%; overflow-y: auto">
|
||||
<div
|
||||
style="
|
||||
height: 51px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 15px;
|
||||
"
|
||||
>
|
||||
<div style="display: flex; align-items: center; gap: 10px">
|
||||
<el-tabs
|
||||
v-model="orderType"
|
||||
type="card"
|
||||
class="date-tabs"
|
||||
@tab-click="handleOrderTypeClick"
|
||||
style="width: auto; margin-right: 0"
|
||||
>
|
||||
<el-tab-pane label="费用明细" name="all"></el-tab-pane>
|
||||
<el-tab-pane label="按天汇总" name="long"></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center; gap: 10px; margin-left: 10px">
|
||||
<!-- 项目选择 -->
|
||||
<el-form-item label="项目:" style="margin-bottom: 0">
|
||||
<el-select
|
||||
v-model="selectedProject"
|
||||
placeholder="项目"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="请选择" value="" />
|
||||
<el-option
|
||||
v-for="project in projectOptions"
|
||||
:key="project.value"
|
||||
:label="project.label"
|
||||
:value="project.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 显示静脉勾选框 -->
|
||||
<el-checkbox v-model="showVenous">显示静脉</el-checkbox>
|
||||
|
||||
<!-- 补费按钮 -->
|
||||
<el-button type="primary">补费</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-loading="loading">
|
||||
<el-table
|
||||
ref="feeTableRef"
|
||||
:data="feeList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#f5f7fa !important' }"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="收费项目" prop="itemName" min-width="180" />
|
||||
<el-table-column label="单价" prop="unitPrice" width="100" align="center" />
|
||||
<el-table-column label="使用数量" prop="quantity" width="100" align="center" />
|
||||
<el-table-column label="金额" prop="amount" width="100" align="center" />
|
||||
<el-table-column label="退费审核" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="text" style="color: #409eff">退费申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { patientInfoList } from '../../medicalOrderExecution/store/patient.js';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(false);
|
||||
const orderList = ref([]); // 医嘱列表
|
||||
const feeList = ref([]); // 费用列表
|
||||
const hospitalDays = ref(0); // 住院天数
|
||||
const billingQuantity = ref(0); // 计费数量
|
||||
const totalCost = ref(0.0); // 总费用
|
||||
const execDepartment = ref('');
|
||||
const orderType = ref('all'); // all, long, temp
|
||||
const specificOrderType = ref('');
|
||||
const showValid = ref(true);
|
||||
const prescribeDept = ref('');
|
||||
const selectedProject = ref('');
|
||||
const showVenous = ref(false);
|
||||
const departmentOptions = ref([]);
|
||||
const orderTypeOptions = ref([]);
|
||||
const projectOptions = ref([]);
|
||||
const orderTableRef = ref(null);
|
||||
const feeTableRef = ref(null);
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
// 加载选项数据
|
||||
loadOptions();
|
||||
// 加载初始数据
|
||||
handleQuery();
|
||||
// 生成模拟床位计费数据
|
||||
generateBedBillingData();
|
||||
});
|
||||
|
||||
// 加载选项数据
|
||||
function loadOptions() {
|
||||
// 模拟科室数据
|
||||
departmentOptions.value = [
|
||||
{ label: '内科', value: 'internal' },
|
||||
{ label: '外科', value: 'surgery' },
|
||||
{ label: '儿科', value: 'pediatrics' },
|
||||
{ label: '妇产科', value: 'obstetrics' },
|
||||
{ label: '其他科室', value: 'others' },
|
||||
];
|
||||
|
||||
// 模拟医嘱类型数据
|
||||
orderTypeOptions.value = [
|
||||
{ label: '药品', value: 'drug' },
|
||||
{ label: '检查', value: 'check' },
|
||||
{ label: '检验', value: 'test' },
|
||||
{ label: '治疗', value: 'treatment' },
|
||||
];
|
||||
|
||||
// 模拟项目数据
|
||||
projectOptions.value = [
|
||||
{ label: '药品', value: 'drug' },
|
||||
{ label: '检查', value: 'check' },
|
||||
{ label: '检验', value: 'test' },
|
||||
{ label: '治疗', value: 'treatment' },
|
||||
];
|
||||
}
|
||||
|
||||
// 处理医嘱类型切换
|
||||
function handleOrderTypeClick(tab) {
|
||||
orderType.value = tab.paneName;
|
||||
// 只更新医嘱列表,不影响费用列表
|
||||
orderList.value = filterOrderList();
|
||||
}
|
||||
|
||||
// 生成模拟床位计费数据
|
||||
function generateBedBillingData() {
|
||||
// 模拟从接口获取的数据
|
||||
// 住院天数随机生成1-30天
|
||||
hospitalDays.value = Math.floor(Math.random() * 30) + 1;
|
||||
// 计费数量根据住院天数生成
|
||||
billingQuantity.value = Math.ceil(hospitalDays.value / 7);
|
||||
// 总费用根据计费数量计算
|
||||
totalCost.value = billingQuantity.value * 200; // 假设每部分费用200元
|
||||
}
|
||||
|
||||
// 生成模拟医嘱数据
|
||||
function generateMockOrderData() {
|
||||
return [
|
||||
{
|
||||
type: '长期',
|
||||
content: '维生素C片【0.1g*100片/瓶】(住院西药房)',
|
||||
unit: '0.1g(1片)',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '盐酸地芬尼多片【25mg*30片】(住院西药房)',
|
||||
unit: '25mg(1片)',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '注射用头孢他啶【0.5g/瓶】(住院西药房)',
|
||||
unit: '0.5g(1瓶)',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '3',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '静脉注射2.0分/每日一次(9点)',
|
||||
unit: '',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '4',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '注射用苄星青霉素(基)【120万单位/瓶*10瓶/盒】(住院西药房)',
|
||||
unit: '120万u/1瓶',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '5',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '维生素K1注射液(国基)【10mg*1ml*10支/盒】(住院西药房)',
|
||||
unit: '10mg/1支',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '6',
|
||||
},
|
||||
{
|
||||
type: '护理',
|
||||
content: '护理级别:III级护理',
|
||||
unit: '',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '7',
|
||||
},
|
||||
{
|
||||
type: '长期',
|
||||
content: '病情:病重',
|
||||
unit: '',
|
||||
startDate: '2025-07-01',
|
||||
endDate: '',
|
||||
id: '8',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
// 生成模拟费用数据
|
||||
function generateMockFeeData() {
|
||||
return [
|
||||
{
|
||||
itemName: '盐酸地芬尼多片',
|
||||
unitPrice: 20.3,
|
||||
quantity: 5,
|
||||
amount: 3.4,
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
itemName: '维生素C片',
|
||||
unitPrice: 12,
|
||||
quantity: 5,
|
||||
amount: 0.6,
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
itemName: '盐酸地芬尼多片',
|
||||
unitPrice: 20.3,
|
||||
quantity: 1,
|
||||
amount: 0.68,
|
||||
id: '3',
|
||||
},
|
||||
];
|
||||
}
|
||||
// 重置执行科室
|
||||
function resetExecDepartment() {
|
||||
execDepartment.value = '';
|
||||
}
|
||||
|
||||
// 处理医嘱列表筛选
|
||||
function filterOrderList() {
|
||||
let filteredOrders = generateMockOrderData();
|
||||
|
||||
// 应用红色框内的筛选条件(医嘱列表专用)
|
||||
if (orderType.value === 'long') {
|
||||
filteredOrders = filteredOrders.filter((item) => item.type === '长期');
|
||||
} else if (orderType.value === 'temp') {
|
||||
filteredOrders = filteredOrders.filter((item) => item.type === '临时');
|
||||
}
|
||||
|
||||
// 执行科室筛选
|
||||
if (execDepartment.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
// 医嘱类型筛选
|
||||
if (specificOrderType.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
// 显示有效筛选
|
||||
if (showValid.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
// 开方科室筛选
|
||||
if (prescribeDept.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
return filteredOrders;
|
||||
}
|
||||
|
||||
// 处理费用列表筛选
|
||||
function filterFeeList() {
|
||||
let filteredFees = generateMockFeeData();
|
||||
|
||||
// 应用绿色框内的筛选条件(费用列表专用)
|
||||
|
||||
// 项目筛选
|
||||
if (selectedProject.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
// 显示静脉筛选
|
||||
if (showVenous.value) {
|
||||
// 这里可以根据实际业务逻辑进行筛选
|
||||
}
|
||||
|
||||
return filteredFees;
|
||||
}
|
||||
|
||||
// 查询按钮点击
|
||||
function handleQuery() {
|
||||
if (patientInfoList.value.length === 0) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 模拟API调用延迟
|
||||
setTimeout(() => {
|
||||
// 分别独立筛选医嘱列表和费用列表
|
||||
orderList.value = filterOrderList();
|
||||
feeList.value = filterFeeList();
|
||||
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 暴露方法供父组件调用
|
||||
defineExpose({
|
||||
handleQuery,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 日期tabs样式 */
|
||||
.date-tabs .el-tabs__header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.date-tabs .el-tabs__content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.el-table__header th) {
|
||||
background-color: #f5f7fa !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
:deep(.el-table__row:hover > td) {
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
|
||||
/* 自定义复选框样式 */
|
||||
:deep(.el-checkbox__label) {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* 调整按钮样式 */
|
||||
:deep(.el-button--primary) {
|
||||
background-color: #409eff;
|
||||
border-color: #409eff;
|
||||
}
|
||||
|
||||
:deep(.el-button--text) {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.reset-btn {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
padding: 0;
|
||||
border-radius: 50%;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reset-btn:hover {
|
||||
background-color: #f5f7fa;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.reset-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,56 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取住院患者列表
|
||||
*/
|
||||
export function getPatientList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人管理病区
|
||||
*/
|
||||
export function getWardList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前选中患者全部医嘱
|
||||
*/
|
||||
export function getPrescriptionList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient-advice',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行医嘱
|
||||
*/
|
||||
export function adviceExecute(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-execute',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消执行医嘱
|
||||
*/
|
||||
export function adviceCancel(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-cancel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh - 126px)">
|
||||
<!-- 操作工具栏 -->
|
||||
<div
|
||||
style="
|
||||
height: 51px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
"
|
||||
>
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 日期选择tabs -->
|
||||
<el-tabs
|
||||
v-model="dateRange"
|
||||
type="card"
|
||||
class="date-tabs"
|
||||
@tab-click="handleDateTabClick"
|
||||
style="margin-right: 20px"
|
||||
>
|
||||
<el-tab-pane label="今日" name="today"></el-tab-pane>
|
||||
<el-tab-pane label="昨日" name="yesterday"></el-tab-pane>
|
||||
<el-tab-pane label="其他" name="other"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 日期选择器 -->
|
||||
<el-date-picker
|
||||
v-model="dateRangeValue"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="handleDatePickerChange"
|
||||
style="width: 240px; margin-right: 20px"
|
||||
/>
|
||||
|
||||
<!-- 执行科室选择 -->
|
||||
<el-select
|
||||
v-model="execDepartment"
|
||||
placeholder="请选择执行科室"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 20px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 全选开关 -->
|
||||
<div style="display: flex; align-items: center; margin-right: 20px">
|
||||
<span style="margin-right: 8px">全选:</span>
|
||||
<el-switch v-model="selectAll" @change="handleSelectAll" />
|
||||
</div>
|
||||
|
||||
<!-- 计费按钮 -->
|
||||
<el-button type="primary" @click="handleCalculate">计费</el-button>
|
||||
|
||||
<!-- 批量划价按钮 -->
|
||||
<el-button type="primary" plain @click="handleBatchPrice" style="margin-left: 20px"
|
||||
>批量划价</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 费用列表区域 -->
|
||||
<div
|
||||
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="billingList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="医嘱内容" prop="orderContent" min-width="200" />
|
||||
<el-table-column label="应执行日期" prop="executeDate" width="120" align="center" />
|
||||
<el-table-column label="执行收费项目" prop="chargeItem" min-width="180" />
|
||||
<el-table-column label="单价" prop="unitPrice" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.unitPrice"
|
||||
:min="0"
|
||||
:step="0.01"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用数量" prop="quantity" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.quantity" :min="1" :step="1" style="width: 100px" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <el-button type="primary" size="small" @click="handlePrice(scope.row)">划价</el-button> -->
|
||||
|
||||
<el-button type="primary" size="small" @click="handleDelete(scope.row)">撤销</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 无数据提示 -->
|
||||
<el-empty v-if="!loading && billingList.length === 0" description="暂无数据" />
|
||||
</div>
|
||||
|
||||
<!-- 使用计费弹窗组件 -->
|
||||
<FeeDialog
|
||||
v-model:visible="dialogVisible"
|
||||
:initial-data="selectedFeeItems"
|
||||
:patient-info="currentPatientInfo"
|
||||
@confirm="handleFeeDialogConfirm"
|
||||
@cancel="handleFeeDialogCancel"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { patientInfoList } from '../../medicalOrderExecution/store/patient.js';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import FeeDialog from './FeeDialog.vue';
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(false);
|
||||
const billingList = ref([]);
|
||||
const dateRange = ref('today'); // today, yesterday, other
|
||||
const dateRangeValue = ref([]);
|
||||
const execDepartment = ref('');
|
||||
const selectAll = ref(false);
|
||||
const departmentOptions = ref([]);
|
||||
const tableRef = ref(null);
|
||||
|
||||
// 计费弹窗相关数据
|
||||
const dialogVisible = ref(false);
|
||||
const selectedFeeItems = ref([]);
|
||||
const currentPatientInfo = ref('');
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
// 设置默认日期
|
||||
const today = new Date();
|
||||
dateRangeValue.value = [formatDateStr(today, 'YYYY-MM-DD'), formatDateStr(today, 'YYYY-MM-DD')];
|
||||
|
||||
// 加载科室选项
|
||||
loadDepartmentOptions();
|
||||
});
|
||||
|
||||
// 加载科室选项
|
||||
function loadDepartmentOptions() {
|
||||
// 模拟科室数据
|
||||
departmentOptions.value = [
|
||||
{ label: '内科', value: 'internal' },
|
||||
{ label: '外科', value: 'surgery' },
|
||||
{ label: '儿科', value: 'pediatrics' },
|
||||
{ label: '妇产科', value: 'obstetrics' },
|
||||
{ label: '其他科室', value: 'others' },
|
||||
];
|
||||
}
|
||||
|
||||
// 处理日期tabs点击
|
||||
function handleDateTabClick(tab) {
|
||||
const rangeType = tab.paneName;
|
||||
const today = new Date();
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(today.getDate() - 1);
|
||||
|
||||
switch (rangeType) {
|
||||
case 'today':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
case 'yesterday':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
// other 情况保持用户选择的值
|
||||
}
|
||||
}
|
||||
|
||||
// 处理日期选择器变化
|
||||
function handleDatePickerChange() {
|
||||
if (dateRangeValue.value.length > 0) {
|
||||
dateRange.value = 'other';
|
||||
}
|
||||
}
|
||||
|
||||
// 生成模拟数据
|
||||
function generateMockData() {
|
||||
const mockData = [
|
||||
{
|
||||
orderContent: '血常规检查',
|
||||
executeDate: dateRangeValue.value[0],
|
||||
chargeItem: '血液分析',
|
||||
unitPrice: 35.0,
|
||||
quantity: 1,
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
orderContent: '静脉注射',
|
||||
executeDate: dateRangeValue.value[0],
|
||||
chargeItem: '静脉输液',
|
||||
unitPrice: 20.0,
|
||||
quantity: 2,
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
orderContent: 'CT检查',
|
||||
executeDate: dateRangeValue.value[0],
|
||||
chargeItem: '胸部CT平扫',
|
||||
unitPrice: 320.0,
|
||||
quantity: 1,
|
||||
id: '3',
|
||||
},
|
||||
{
|
||||
orderContent: '药物治疗',
|
||||
executeDate: dateRangeValue.value[0],
|
||||
chargeItem: '抗生素注射',
|
||||
unitPrice: 58.5,
|
||||
quantity: 1,
|
||||
id: '4',
|
||||
},
|
||||
];
|
||||
|
||||
// 根据科室筛选模拟数据
|
||||
if (execDepartment.value) {
|
||||
// 模拟根据科室筛选
|
||||
return mockData.filter((_, index) => index % 2 === 0);
|
||||
}
|
||||
|
||||
return mockData;
|
||||
}
|
||||
|
||||
// 查询按钮点击
|
||||
function handleQuery() {
|
||||
if (patientInfoList.value.length === 0) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 模拟API调用延迟
|
||||
setTimeout(() => {
|
||||
// 使用模拟数据
|
||||
billingList.value = generateMockData();
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 全选/取消全选
|
||||
function handleSelectAll(value) {
|
||||
selectAll.value = value;
|
||||
if (tableRef.value) {
|
||||
if (value) {
|
||||
tableRef.value.toggleAllSelection();
|
||||
} else {
|
||||
// 取消全选
|
||||
tableRef.value.clearSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 打开计费弹窗
|
||||
function handleCalculate() {
|
||||
// 获取选中的数据
|
||||
const selectedRows = getSelectedRows();
|
||||
// if (selectedRows.length === 0) {
|
||||
// ElMessage.warning('请先选择要计费的项目');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 设置弹窗初始数据
|
||||
selectedFeeItems.value = [...selectedRows];
|
||||
|
||||
// 设置患者信息
|
||||
if (patientInfoList.value.length > 0) {
|
||||
const patient = patientInfoList.value[0];
|
||||
currentPatientInfo.value = `${patient.patientName || '未知患者'}`;
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
// 处理计费弹窗确认
|
||||
function handleFeeDialogConfirm(data) {
|
||||
// 模拟计费操作
|
||||
setTimeout(() => {
|
||||
ElMessage.success('计费成功');
|
||||
// 刷新数据
|
||||
handleQuery();
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// 处理计费弹窗取消
|
||||
function handleFeeDialogCancel() {
|
||||
// 可以在这里添加取消后的处理逻辑
|
||||
}
|
||||
|
||||
// 批量划价
|
||||
function handleBatchPrice() {
|
||||
// 获取选中的数据
|
||||
const selectedRows = getSelectedRows();
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请先选择要划价的项目');
|
||||
return;
|
||||
}
|
||||
|
||||
// 模拟批量划价操作
|
||||
setTimeout(() => {
|
||||
ElMessage.success(`批量划价成功,共${selectedRows.length}项`);
|
||||
// 更新状态,模拟已划价
|
||||
selectedRows.forEach((row) => {
|
||||
row.status = 'priced';
|
||||
});
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// 单项划价
|
||||
function handlePrice(row) {
|
||||
// 模拟单项划价操作
|
||||
setTimeout(() => {
|
||||
ElMessage.success('划价成功');
|
||||
// 更新状态,模拟已划价
|
||||
row.status = 'priced';
|
||||
}, 300);
|
||||
}
|
||||
function handleDelete(row) {
|
||||
// 从数据列表中删除当前行
|
||||
const index = billingList.value.findIndex((item) => item.id === row.id);
|
||||
if (index !== -1) {
|
||||
billingList.value.splice(index, 1);
|
||||
ElMessage.success('撤销成功');
|
||||
}
|
||||
}
|
||||
|
||||
// 获取选中的行
|
||||
function getSelectedRows() {
|
||||
if (tableRef.value) {
|
||||
return tableRef.value.selection || [];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
// 暴露方法供父组件调用
|
||||
defineExpose({
|
||||
handleQuery,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 日期tabs样式 */
|
||||
.date-tabs .el-tabs__header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.date-tabs .el-tabs__content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.el-table__header th) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__row:hover > td) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,490 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh - 126px)">
|
||||
<!-- 操作工具栏 -->
|
||||
<div
|
||||
style="
|
||||
height: 51px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
"
|
||||
>
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 日期选择tabs -->
|
||||
<el-tabs
|
||||
v-model="dateRange"
|
||||
type="card"
|
||||
class="date-tabs"
|
||||
@tab-click="handleDateTabClick"
|
||||
style="margin-right: 20px"
|
||||
>
|
||||
<el-tab-pane label="今日" name="today"></el-tab-pane>
|
||||
<el-tab-pane label="昨日" name="yesterday"></el-tab-pane>
|
||||
<el-tab-pane label="其他" name="other"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 日期选择器 -->
|
||||
<el-date-picker
|
||||
v-model="dateRangeValue"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="handleDatePickerChange"
|
||||
style="width: 240px; margin-right: 20px"
|
||||
/>
|
||||
|
||||
<!-- 缴费方式选择 -->
|
||||
<el-select
|
||||
v-model="paymentMethod"
|
||||
placeholder="请选择缴费方式"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 20px"
|
||||
>
|
||||
<el-option
|
||||
v-for="method in paymentMethodOptions"
|
||||
:key="method.value"
|
||||
:label="method.label"
|
||||
:value="method.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 导出按钮 -->
|
||||
<el-button @click="handleExport">导出</el-button>
|
||||
|
||||
<!-- 打印按钮 -->
|
||||
<el-button @click="handlePrint" style="margin-left: 15px">打印</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 预交金列表区域 -->
|
||||
<div
|
||||
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
|
||||
v-loading="loading"
|
||||
>
|
||||
<!-- 费用汇总信息 -->
|
||||
<div style="background-color: white; padding: 15px; margin-bottom: 10px; border-radius: 4px;">
|
||||
<div style="display: flex; justify-content: flex-end; align-items: center">
|
||||
<div style="text-align: right;">
|
||||
<p style="margin: 0; font-size: 18px; font-weight: bold; color: #ff4d4f;">
|
||||
合计金额:¥{{ totalAmount.toFixed(2) }}
|
||||
</p>
|
||||
<p style="margin: 5px 0; color: #606266; font-size: 14px;">缴费次数:{{ depositList.length }}次</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="depositList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="预交金编号" prop="depositNo" min-width="180" />
|
||||
<el-table-column label="金额" prop="amount" width="120" align="center" sortable>
|
||||
<template #default="scope">
|
||||
<span style="color: #ff4d4f">{{ scope.row.amount.toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费方式" prop="paymentMethodName" width="120" align="center" />
|
||||
<el-table-column label="缴费时间" prop="paymentTime" width="150" align="center" sortable />
|
||||
<el-table-column label="收费员" prop="cashier" width="100" align="center" />
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div style="margin-top: 15px; display: flex; justify-content: flex-end;">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 无数据提示 -->
|
||||
<el-empty v-if="!loading && depositList.length === 0" description="暂无预交金数据" />
|
||||
</div>
|
||||
|
||||
<!-- 打印预览弹窗 -->
|
||||
<el-dialog v-model="printDialogVisible" title="打印预览" width="80%" :close-on-click-modal="false">
|
||||
<div id="print-content">
|
||||
<div style="text-align: center; margin-bottom: 20px;">
|
||||
<h2 style="margin: 0;">预交金清单</h2>
|
||||
<p style="margin: 5px 0;">患者姓名:{{ patientInfo || '未选择患者' }}</p>
|
||||
<p style="margin: 5px 0;">费用周期:{{ formatDateRange() }}</p>
|
||||
</div>
|
||||
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr style="background-color: #eef9fd;">
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">序号</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">预交金编号</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">金额</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">缴费方式</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">缴费时间</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">收费员</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in depositList" :key="item.id">
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ index + 1 }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.depositNo }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.amount.toFixed(2) }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.paymentMethodName }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.paymentTime }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.cashier }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="background-color: #f5f7fa;">
|
||||
<td colspan="2" style="border: 1px solid #e4e7ed; padding: 8px; text-align: right; font-weight: bold;">合计:</td>
|
||||
<td colspan="4" style="border: 1px solid #e4e7ed; padding: 8px; color: #ff4d4f; font-weight: bold;">¥{{ totalAmount.toFixed(2) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="printDialogVisible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="doPrint">打印</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { patientInfoList } from '../../medicalOrderExecution/store/patient.js';
|
||||
import { getSinglePatient } from '../store/patient.js'; // 导入获取单选患者信息的方法
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(false);
|
||||
const depositList = ref([]);
|
||||
const dateRange = ref('today'); // today, yesterday, other
|
||||
const dateRangeValue = ref([]);
|
||||
const paymentMethod = ref('');
|
||||
const paymentMethodOptions = ref([]);
|
||||
const tableRef = ref(null);
|
||||
const patientInfo = ref('');
|
||||
|
||||
// 分页相关
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(20);
|
||||
const total = ref(0);
|
||||
|
||||
// 打印相关
|
||||
const printDialogVisible = ref(false);
|
||||
|
||||
// 计算总金额
|
||||
const totalAmount = computed(() => {
|
||||
return depositList.value.reduce((sum, item) => {
|
||||
return sum + (item.amount || 0);
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
// 设置默认日期
|
||||
const today = new Date();
|
||||
dateRangeValue.value = [formatDateStr(today, 'YYYY-MM-DD'), formatDateStr(today, 'YYYY-MM-DD')];
|
||||
|
||||
// 加载缴费方式选项
|
||||
loadPaymentMethodOptions();
|
||||
|
||||
// 监听患者选择变化
|
||||
watchPatientSelection();
|
||||
});
|
||||
|
||||
// 监听患者选择变化
|
||||
function watchPatientSelection() {
|
||||
// 定期检查患者选择状态变化
|
||||
setInterval(() => {
|
||||
// 使用getSinglePatient方法获取单选患者信息
|
||||
const selectedPatient = getSinglePatient();
|
||||
if (selectedPatient) {
|
||||
patientInfo.value = selectedPatient.patientName || '';
|
||||
} else {
|
||||
patientInfo.value = '未选择患者';
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// 加载缴费方式选项
|
||||
function loadPaymentMethodOptions() {
|
||||
// 模拟缴费方式数据
|
||||
paymentMethodOptions.value = [
|
||||
{ label: '现金', value: 'cash' },
|
||||
{ label: '银行卡', value: 'bankcard' },
|
||||
{ label: '微信支付', value: 'wechat' },
|
||||
{ label: '支付宝', value: 'alipay' },
|
||||
{ label: '其他', value: 'others' },
|
||||
];
|
||||
}
|
||||
|
||||
// 处理日期tabs点击
|
||||
function handleDateTabClick(tab) {
|
||||
const rangeType = tab.paneName;
|
||||
const today = new Date();
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(today.getDate() - 1);
|
||||
|
||||
switch (rangeType) {
|
||||
case 'today':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
case 'yesterday':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
// other 情况保持用户选择的值
|
||||
}
|
||||
}
|
||||
|
||||
// 处理日期选择器变化
|
||||
function handleDatePickerChange() {
|
||||
if (dateRangeValue.value.length > 0) {
|
||||
dateRange.value = 'other';
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化日期范围显示
|
||||
function formatDateRange() {
|
||||
if (dateRangeValue.value && dateRangeValue.value.length === 2) {
|
||||
return `${dateRangeValue.value[0]} 至 ${dateRangeValue.value[1]}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
// 生成模拟数据
|
||||
function generateMockData() {
|
||||
// 缴费方式映射
|
||||
const paymentMethodMap = {
|
||||
'cash': '现金',
|
||||
'bankcard': '银行卡',
|
||||
'wechat': '微信支付',
|
||||
'alipay': '支付宝',
|
||||
'others': '其他'
|
||||
};
|
||||
|
||||
// 生成模拟数据
|
||||
const mockData = [];
|
||||
const baseDate = new Date(dateRangeValue.value[0]);
|
||||
const endDate = new Date(dateRangeValue.value[1]);
|
||||
const daysDiff = Math.ceil((endDate - baseDate) / (1000 * 60 * 60 * 24)) + 1;
|
||||
|
||||
// 收费员池
|
||||
const cashiers = ['收费员A', '收费员B', '收费员C', '收费员D'];
|
||||
|
||||
// 生成数据
|
||||
let id = 1;
|
||||
for (let day = 0; day < daysDiff; day++) {
|
||||
const currentDate = new Date(baseDate);
|
||||
currentDate.setDate(baseDate.getDate() + day);
|
||||
|
||||
// 每天生成1-3条记录
|
||||
const recordsCount = Math.floor(Math.random() * 3) + 1;
|
||||
for (let i = 0; i < recordsCount; i++) {
|
||||
// 随机选择一个缴费方式
|
||||
const paymentMethods = paymentMethod.value ? [paymentMethod.value] : Object.keys(paymentMethodMap);
|
||||
const randomMethod = paymentMethods[Math.floor(Math.random() * paymentMethods.length)];
|
||||
|
||||
// 生成随机金额 (500-5000元)
|
||||
const amount = Math.floor(Math.random() * 4500) + 500;
|
||||
|
||||
// 生成时间
|
||||
const hours = Math.floor(Math.random() * 8) + 8; // 8-16点
|
||||
const minutes = Math.floor(Math.random() * 60);
|
||||
const seconds = Math.floor(Math.random() * 60);
|
||||
currentDate.setHours(hours, minutes, seconds);
|
||||
const timeStr = formatDateStr(currentDate, 'YYYY-MM-DD HH:mm:ss');
|
||||
|
||||
// 生成预交金编号 (示例格式:5000120200001)
|
||||
const dateCode = formatDateStr(currentDate, 'YYYYMMDD');
|
||||
const serialNum = String(id).padStart(6, '0');
|
||||
const depositNo = `500${dateCode.slice(2)}${serialNum}`;
|
||||
|
||||
mockData.push({
|
||||
id: id++,
|
||||
depositNo: depositNo,
|
||||
amount: amount,
|
||||
paymentMethod: randomMethod,
|
||||
paymentMethodName: paymentMethodMap[randomMethod],
|
||||
paymentTime: timeStr,
|
||||
cashier: cashiers[Math.floor(Math.random() * cashiers.length)]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return mockData;
|
||||
}
|
||||
|
||||
// 查询按钮点击
|
||||
function handleQuery() {
|
||||
// 添加调试日志,查看患者列表数据结构
|
||||
console.log('患者列表数据:', patientInfoList.value);
|
||||
|
||||
// 使用getSinglePatient方法获取单选患者信息
|
||||
const selectedPatient = getSinglePatient();
|
||||
|
||||
if (!selectedPatient) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新患者信息显示
|
||||
const patientName = selectedPatient.patientName ||
|
||||
selectedPatient.name ||
|
||||
selectedPatient.patientInfo ||
|
||||
selectedPatient.patient ||
|
||||
'未命名患者';
|
||||
patientInfo.value = patientName;
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 模拟API调用延迟
|
||||
setTimeout(() => {
|
||||
try {
|
||||
// 使用模拟数据
|
||||
const allData = generateMockData();
|
||||
total.value = allData.length;
|
||||
|
||||
// 分页处理
|
||||
const start = (currentPage.value - 1) * pageSize.value;
|
||||
const end = start + pageSize.value;
|
||||
depositList.value = allData.slice(start, end);
|
||||
} catch (error) {
|
||||
console.error('查询错误:', error);
|
||||
ElMessage.error('查询失败,请重试');
|
||||
depositList.value = [];
|
||||
total.value = 0;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 处理排序变化
|
||||
function handleSortChange({ prop, order }) {
|
||||
const sortedData = [...depositList.value];
|
||||
|
||||
if (order === 'ascending') {
|
||||
sortedData.sort((a, b) => (a[prop] > b[prop]) ? 1 : -1);
|
||||
} else if (order === 'descending') {
|
||||
sortedData.sort((a, b) => (a[prop] < b[prop]) ? 1 : -1);
|
||||
}
|
||||
|
||||
depositList.value = sortedData;
|
||||
}
|
||||
|
||||
// 处理分页大小变化
|
||||
function handleSizeChange(newSize) {
|
||||
pageSize.value = newSize;
|
||||
currentPage.value = 1;
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 处理当前页变化
|
||||
function handleCurrentChange(newCurrent) {
|
||||
currentPage.value = newCurrent;
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 导出
|
||||
function handleExport() {
|
||||
if (depositList.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可导出');
|
||||
return;
|
||||
}
|
||||
|
||||
// 模拟导出操作
|
||||
ElMessage.success('导出成功');
|
||||
// 实际项目中这里应该调用导出API或使用Excel库生成文件
|
||||
}
|
||||
|
||||
// 打印预览
|
||||
function handlePrint() {
|
||||
if (depositList.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可打印');
|
||||
return;
|
||||
}
|
||||
|
||||
printDialogVisible.value = true;
|
||||
}
|
||||
|
||||
// 执行打印
|
||||
function doPrint() {
|
||||
try {
|
||||
// 获取要打印的内容
|
||||
const printContent = document.getElementById('print-content').innerHTML;
|
||||
|
||||
// 创建临时窗口
|
||||
const printWindow = window.open('', '_blank');
|
||||
|
||||
// 写入内容
|
||||
printWindow.document.write(`
|
||||
<html>
|
||||
<head>
|
||||
<title>预交金清单</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 20px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { border: 1px solid #ccc; padding: 8px; }
|
||||
th { background-color: #f2f2f2; }
|
||||
tfoot { font-weight: bold; }
|
||||
.total-row { background-color: #f5f5f5; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${printContent}
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
|
||||
// 打印
|
||||
printWindow.document.close();
|
||||
printWindow.focus();
|
||||
printWindow.print();
|
||||
} catch (e) {
|
||||
ElMessage.error('打印失败');
|
||||
console.error('Print error:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法供父组件调用
|
||||
defineExpose({
|
||||
handleQuery,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 日期tabs样式 */
|
||||
.date-tabs .el-tabs__header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.date-tabs .el-tabs__content {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,611 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh - 126px)">
|
||||
<!-- 操作工具栏 -->
|
||||
<div
|
||||
style="
|
||||
height: 51px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
"
|
||||
>
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 日期选择tabs -->
|
||||
<el-tabs
|
||||
v-model="dateRange"
|
||||
type="card"
|
||||
class="date-tabs"
|
||||
@tab-click="handleDateTabClick"
|
||||
style="margin-right: 20px"
|
||||
>
|
||||
<el-tab-pane label="今日" name="today"></el-tab-pane>
|
||||
<el-tab-pane label="昨日" name="yesterday"></el-tab-pane>
|
||||
<el-tab-pane label="其他" name="other"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 日期选择器 -->
|
||||
<el-date-picker
|
||||
v-model="dateRangeValue"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="handleDatePickerChange"
|
||||
style="width: 240px; margin-right: 20px"
|
||||
/>
|
||||
|
||||
<!-- 费用类型选择 -->
|
||||
<el-select
|
||||
v-model="feeType"
|
||||
placeholder="请选择费用类型"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 20px"
|
||||
>
|
||||
<el-option
|
||||
v-for="type in feeTypeOptions"
|
||||
:key="type.value"
|
||||
:label="type.label"
|
||||
:value="type.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- 执行科室选择 -->
|
||||
<el-select
|
||||
v-model="execDepartment"
|
||||
placeholder="请选择执行科室"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 20px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- 导出按钮 -->
|
||||
<el-button @click="handleExport">导出</el-button>
|
||||
|
||||
<!-- 打印按钮 -->
|
||||
<el-button @click="handlePrint" style="margin-left: 15px">打印</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 费用明细列表区域 -->
|
||||
<div
|
||||
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
|
||||
v-loading="loading"
|
||||
>
|
||||
<!-- 费用汇总信息 -->
|
||||
<div style="background-color: white; padding: 15px; margin-bottom: 10px; border-radius: 4px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<h3 style="margin: 0; font-weight: normal; color: #303133;">费用汇总</h3>
|
||||
<p style="margin: 5px 0; color: #606266; font-size: 14px;">费用周期:{{ formatDateRange() }}</p>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<p style="margin: 0; font-size: 18px; font-weight: bold; color: #ff4d4f;">
|
||||
合计金额:¥{{ totalAmount.toFixed(2) }}
|
||||
</p>
|
||||
<p style="margin: 5px 0; color: #606266; font-size: 14px;">明细项数:{{ feeDetailList.length }}项</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="feeDetailList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<el-table-column label="项目名称" prop="itemName" min-width="200" />
|
||||
<el-table-column label="费用类型" prop="feeTypeName" width="120" align="center" />
|
||||
<el-table-column label="单价" prop="unitPrice" width="100" align="center" sortable />
|
||||
<el-table-column label="数量" prop="quantity" width="100" align="center" sortable />
|
||||
<el-table-column label="金额" prop="amount" width="100" align="center" sortable>
|
||||
<template #default="scope">
|
||||
<span style="color: #ff4d4f">{{ scope.row.amount.toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行科室" prop="execDept" width="120" align="center" />
|
||||
<el-table-column label="执行人" prop="executor" width="100" align="center" />
|
||||
<el-table-column label="执行日期" prop="executeDate" width="120" align="center" />
|
||||
<el-table-column label="医保类型" prop="insuranceType" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.insuranceType" size="small">{{ scope.row.insuranceType }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" min-width="150" />
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div style="margin-top: 15px; display: flex; justify-content: flex-end;">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 无数据提示 -->
|
||||
<el-empty v-if="!loading && feeDetailList.length === 0" description="暂无费用明细数据" />
|
||||
</div>
|
||||
|
||||
<!-- 打印预览弹窗 -->
|
||||
<el-dialog v-model="printDialogVisible" title="打印预览" width="80%" :close-on-click-modal="false">
|
||||
<div id="print-content">
|
||||
<div style="text-align: center; margin-bottom: 20px;">
|
||||
<h2 style="margin: 0;">费用明细清单</h2>
|
||||
<p style="margin: 5px 0;">患者姓名:{{ patientInfo || '未选择患者' }}</p>
|
||||
<p style="margin: 5px 0;">费用周期:{{ formatDateRange() }}</p>
|
||||
</div>
|
||||
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr style="background-color: #eef9fd;">
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">项目名称</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">费用类型</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">单价</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">数量</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">金额</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">执行科室</th>
|
||||
<th style="border: 1px solid #e4e7ed; padding: 8px;">执行日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in feeDetailList" :key="item.id">
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.itemName }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.feeTypeName }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.unitPrice.toFixed(2) }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.quantity }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.amount.toFixed(2) }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.execDept }}</td>
|
||||
<td style="border: 1px solid #e4e7ed; padding: 8px;">{{ item.executeDate }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="background-color: #f5f7fa;">
|
||||
<td colspan="4" style="border: 1px solid #e4e7ed; padding: 8px; text-align: right; font-weight: bold;">合计:</td>
|
||||
<td colspan="3" style="border: 1px solid #e4e7ed; padding: 8px; color: #ff4d4f; font-weight: bold;">¥{{ totalAmount.toFixed(2) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="printDialogVisible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="doPrint">打印</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { patientInfoList } from '../../medicalOrderExecution/store/patient.js';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
|
||||
// 响应式数据
|
||||
const loading = ref(false);
|
||||
const feeDetailList = ref([]);
|
||||
const dateRange = ref('today'); // today, yesterday, other
|
||||
const dateRangeValue = ref([]);
|
||||
const feeType = ref('');
|
||||
const execDepartment = ref('');
|
||||
const departmentOptions = ref([]);
|
||||
const feeTypeOptions = ref([]);
|
||||
const tableRef = ref(null);
|
||||
const patientInfo = ref('');
|
||||
|
||||
// 分页相关
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(20);
|
||||
const total = ref(0);
|
||||
|
||||
// 打印相关
|
||||
const printDialogVisible = ref(false);
|
||||
|
||||
// 计算总金额
|
||||
const totalAmount = computed(() => {
|
||||
return feeDetailList.value.reduce((sum, item) => {
|
||||
return sum + (item.amount || 0);
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
// 设置默认日期
|
||||
const today = new Date();
|
||||
dateRangeValue.value = [formatDateStr(today, 'YYYY-MM-DD'), formatDateStr(today, 'YYYY-MM-DD')];
|
||||
|
||||
// 加载科室选项
|
||||
loadDepartmentOptions();
|
||||
|
||||
// 加载费用类型选项
|
||||
loadFeeTypeOptions();
|
||||
|
||||
// 监听患者选择变化
|
||||
watchPatientSelection();
|
||||
});
|
||||
|
||||
// 监听患者选择变化
|
||||
function watchPatientSelection() {
|
||||
// 定期检查患者选择状态变化
|
||||
setInterval(() => {
|
||||
if (patientInfoList.value && patientInfoList.value.length > 0) {
|
||||
const selectedPatient = patientInfoList.value.find(patient => patient.selected === true);
|
||||
if (selectedPatient) {
|
||||
patientInfo.value = selectedPatient.patientName || '';
|
||||
} else {
|
||||
patientInfo.value = '未选择患者';
|
||||
}
|
||||
} else {
|
||||
patientInfo.value = '未选择患者';
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// 加载科室选项
|
||||
function loadDepartmentOptions() {
|
||||
// 模拟科室数据
|
||||
departmentOptions.value = [
|
||||
{ label: '内科', value: 'internal' },
|
||||
{ label: '外科', value: 'surgery' },
|
||||
{ label: '儿科', value: 'pediatrics' },
|
||||
{ label: '妇产科', value: 'obstetrics' },
|
||||
{ label: '检验科', value: 'laboratory' },
|
||||
{ label: '影像科', value: 'imaging' },
|
||||
{ label: '其他科室', value: 'others' },
|
||||
];
|
||||
}
|
||||
|
||||
// 加载费用类型选项
|
||||
function loadFeeTypeOptions() {
|
||||
// 模拟费用类型数据
|
||||
feeTypeOptions.value = [
|
||||
{ label: '检查费', value: 'examine' },
|
||||
{ label: '治疗费', value: 'treatment' },
|
||||
{ label: '药品费', value: 'medicine' },
|
||||
{ label: '材料费', value: 'material' },
|
||||
{ label: '床位费', value: 'bed' },
|
||||
{ label: '其他费用', value: 'others' },
|
||||
];
|
||||
}
|
||||
|
||||
// 处理日期tabs点击
|
||||
function handleDateTabClick(tab) {
|
||||
const rangeType = tab.paneName;
|
||||
const today = new Date();
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(today.getDate() - 1);
|
||||
|
||||
switch (rangeType) {
|
||||
case 'today':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
case 'yesterday':
|
||||
dateRangeValue.value = [
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
formatDateStr(yesterday, 'YYYY-MM-DD'),
|
||||
];
|
||||
break;
|
||||
// other 情况保持用户选择的值
|
||||
}
|
||||
}
|
||||
|
||||
// 处理日期选择器变化
|
||||
function handleDatePickerChange() {
|
||||
if (dateRangeValue.value.length > 0) {
|
||||
dateRange.value = 'other';
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化日期范围显示
|
||||
function formatDateRange() {
|
||||
if (dateRangeValue.value && dateRangeValue.value.length === 2) {
|
||||
return `${dateRangeValue.value[0]} 至 ${dateRangeValue.value[1]}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
// 生成模拟数据
|
||||
function generateMockData() {
|
||||
// 费用类型映射
|
||||
const feeTypeMap = {
|
||||
'examine': '检查费',
|
||||
'treatment': '治疗费',
|
||||
'medicine': '药品费',
|
||||
'material': '材料费',
|
||||
'bed': '床位费',
|
||||
'others': '其他费用'
|
||||
};
|
||||
|
||||
// 科室映射
|
||||
const deptMap = {
|
||||
'internal': '内科',
|
||||
'surgery': '外科',
|
||||
'pediatrics': '儿科',
|
||||
'obstetrics': '妇产科',
|
||||
'laboratory': '检验科',
|
||||
'imaging': '影像科',
|
||||
'others': '其他科室'
|
||||
};
|
||||
|
||||
// 项目数据池
|
||||
const itemPools = {
|
||||
'examine': ['血常规检查', '尿常规检查', '肝功能检查', '肾功能检查', '胸部CT', '心电图', 'B超'],
|
||||
'treatment': ['静脉输液', '肌肉注射', '氧气吸入', '导尿', '换药', '雾化吸入'],
|
||||
'medicine': ['抗生素注射液', '维生素C片', '感冒药', '止痛药', '降压药', '消炎药'],
|
||||
'material': ['一次性输液器', '注射器', '医用棉花', '纱布', '胶带', '一次性手套'],
|
||||
'bed': ['普通病房床位', 'ICU床位', '单人病房床位', '双人病房床位'],
|
||||
'others': ['护理费', '诊疗费', '挂号费', '病历费']
|
||||
};
|
||||
|
||||
// 合并所有项目到allItems数组中(修复:添加这部分代码)
|
||||
let allItems = [];
|
||||
Object.keys(itemPools).forEach(type => {
|
||||
itemPools[type].forEach(item => {
|
||||
allItems.push({
|
||||
type: type,
|
||||
name: item
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 筛选条件
|
||||
if (feeType.value) {
|
||||
allItems = allItems.filter(item => item.type === feeType.value);
|
||||
}
|
||||
|
||||
// 生成模拟数据
|
||||
const mockData = [];
|
||||
const baseDate = new Date(dateRangeValue.value[0]);
|
||||
const endDate = new Date(dateRangeValue.value[1]);
|
||||
const daysDiff = Math.ceil((endDate - baseDate) / (1000 * 60 * 60 * 24)) + 1;
|
||||
|
||||
// 执行人池
|
||||
const executors = ['护士A', '护士B', '医生A', '医生B', '技师A'];
|
||||
|
||||
// 生成数据
|
||||
let id = 1;
|
||||
for (let day = 0; day < daysDiff; day++) {
|
||||
const currentDate = new Date(baseDate);
|
||||
currentDate.setDate(baseDate.getDate() + day);
|
||||
const dateStr = formatDateStr(currentDate, 'YYYY-MM-DD');
|
||||
|
||||
// 每天生成3-8条记录
|
||||
const recordsCount = Math.floor(Math.random() * 6) + 3;
|
||||
for (let i = 0; i < recordsCount; i++) {
|
||||
// 随机选择一个项目
|
||||
const randomItemIndex = Math.floor(Math.random() * allItems.length);
|
||||
const selectedItem = allItems[randomItemIndex];
|
||||
|
||||
// 随机选择一个科室
|
||||
const deptKeys = Object.keys(deptMap);
|
||||
const randomDeptKey = deptKeys[Math.floor(Math.random() * deptKeys.length)];
|
||||
|
||||
// 如果有科室筛选且不符合,则跳过
|
||||
if (execDepartment.value && randomDeptKey !== execDepartment.value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 生成随机单价和数量
|
||||
const unitPrice = Math.floor(Math.random() * 190) + 10; // 10-200元
|
||||
const quantity = Math.floor(Math.random() * 3) + 1; // 1-4
|
||||
|
||||
// 医保类型
|
||||
const insuranceTypes = ['', '甲类', '乙类', '丙类'];
|
||||
const insuranceType = insuranceTypes[Math.floor(Math.random() * insuranceTypes.length)];
|
||||
|
||||
mockData.push({
|
||||
id: `item-${id++}`,
|
||||
itemName: selectedItem.name,
|
||||
feeType: selectedItem.type,
|
||||
feeTypeName: feeTypeMap[selectedItem.type],
|
||||
unitPrice: unitPrice,
|
||||
quantity: quantity,
|
||||
amount: unitPrice * quantity,
|
||||
execDept: deptMap[randomDeptKey],
|
||||
executor: executors[Math.floor(Math.random() * executors.length)],
|
||||
executeDate: dateStr,
|
||||
insuranceType: insuranceType,
|
||||
remark: ''
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return mockData;
|
||||
}
|
||||
|
||||
// 查询按钮点击
|
||||
function handleQuery() {
|
||||
// 添加调试日志,查看患者列表数据结构
|
||||
console.log('患者列表数据:', patientInfoList.value);
|
||||
|
||||
// 更灵活的患者选择检测逻辑
|
||||
let selectedPatient = null;
|
||||
|
||||
if (patientInfoList.value && patientInfoList.value.length > 0) {
|
||||
// 尝试查找选中状态的患者
|
||||
selectedPatient = patientInfoList.value.find(patient =>
|
||||
patient.selected === true ||
|
||||
patient.checked === true ||
|
||||
patient.isChecked === true ||
|
||||
(typeof patient.selected === 'string' && patient.selected === '1')
|
||||
);
|
||||
|
||||
// 如果没有明确选中的患者,就使用列表中的第一个患者
|
||||
if (!selectedPatient) {
|
||||
selectedPatient = patientInfoList.value[0];
|
||||
}
|
||||
}
|
||||
|
||||
// 即使没有明确选中的患者标志,也应该允许查询
|
||||
if (!selectedPatient) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新患者信息显示 - 修复:确保正确获取患者姓名
|
||||
const patientName = selectedPatient.patientName ||
|
||||
selectedPatient.name ||
|
||||
selectedPatient.patientInfo ||
|
||||
selectedPatient.patient ||
|
||||
'未命名患者';
|
||||
patientInfo.value = patientName;
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 模拟API调用延迟
|
||||
setTimeout(() => {
|
||||
try {
|
||||
// 使用模拟数据
|
||||
const allData = generateMockData();
|
||||
total.value = allData.length;
|
||||
|
||||
// 分页处理
|
||||
const start = (currentPage.value - 1) * pageSize.value;
|
||||
const end = start + pageSize.value;
|
||||
feeDetailList.value = allData.slice(start, end);
|
||||
} catch (error) {
|
||||
console.error('查询错误:', error);
|
||||
ElMessage.error('查询失败,请重试');
|
||||
feeDetailList.value = [];
|
||||
total.value = 0;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 处理排序变化
|
||||
function handleSortChange({ prop, order }) {
|
||||
const sortedData = [...feeDetailList.value];
|
||||
|
||||
if (order === 'ascending') {
|
||||
sortedData.sort((a, b) => (a[prop] > b[prop]) ? 1 : -1);
|
||||
} else if (order === 'descending') {
|
||||
sortedData.sort((a, b) => (a[prop] < b[prop]) ? 1 : -1);
|
||||
}
|
||||
|
||||
feeDetailList.value = sortedData;
|
||||
}
|
||||
|
||||
// 处理分页大小变化
|
||||
function handleSizeChange(newSize) {
|
||||
pageSize.value = newSize;
|
||||
currentPage.value = 1;
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 处理当前页变化
|
||||
function handleCurrentChange(newCurrent) {
|
||||
currentPage.value = newCurrent;
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 导出
|
||||
function handleExport() {
|
||||
if (feeDetailList.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可导出');
|
||||
return;
|
||||
}
|
||||
|
||||
// 模拟导出操作
|
||||
ElMessage.success('导出成功');
|
||||
// 实际项目中这里应该调用导出API或使用Excel库生成文件
|
||||
}
|
||||
|
||||
// 打印预览
|
||||
function handlePrint() {
|
||||
if (feeDetailList.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可打印');
|
||||
return;
|
||||
}
|
||||
|
||||
printDialogVisible.value = true;
|
||||
}
|
||||
|
||||
// 执行打印
|
||||
function doPrint() {
|
||||
try {
|
||||
// 获取要打印的内容
|
||||
const printContent = document.getElementById('print-content').innerHTML;
|
||||
|
||||
// 创建临时窗口
|
||||
const printWindow = window.open('', '_blank');
|
||||
|
||||
// 写入内容
|
||||
printWindow.document.write(`
|
||||
<html>
|
||||
<head>
|
||||
<title>费用明细清单</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 20px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { border: 1px solid #ccc; padding: 8px; }
|
||||
th { background-color: #f2f2f2; }
|
||||
tfoot { font-weight: bold; }
|
||||
.total-row { background-color: #f5f5f5; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${printContent}
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
|
||||
// 打印
|
||||
printWindow.document.close();
|
||||
printWindow.focus();
|
||||
printWindow.print();
|
||||
} catch (e) {
|
||||
ElMessage.error('打印失败');
|
||||
console.error('Print error:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法供父组件调用
|
||||
defineExpose({
|
||||
handleQuery,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 日期tabs样式 */
|
||||
.date-tabs .el-tabs__header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.date-tabs .el-tabs__content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.el-table__header th) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__row:hover > td) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!-- 左侧患者列表 -->
|
||||
<div style="width: 20%; height: 90vh; border-right: solid 2px #e4e7ed">
|
||||
<div
|
||||
style="
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
border-bottom: solid 2px #e4e7ed;
|
||||
"
|
||||
>
|
||||
<el-icon
|
||||
@click="refresh"
|
||||
class="refresh-icon"
|
||||
style="cursor: pointer; font-size: 20px; margin-right: 10px"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-tabs v-model="active" class="demo-tabs centered-tabs tab-header" @tab-click="handleClick">
|
||||
<el-tab-pane label="在科" name="first" style="padding: 15px 10px">
|
||||
<PatientList />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="转科" name="second" style="padding: 0 10px">
|
||||
<PatientList />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<!-- 右侧划价确费功能区 -->
|
||||
<div style="width: 80%; padding: 10px">
|
||||
<!-- 标签页导航 -->
|
||||
<el-tabs v-model="activeTab" class="demo-tabs" @tab-change="handleTabChange">
|
||||
<el-tab-pane label="划价确费" name="billing">
|
||||
<BillingList ref="billingRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="医嘱计费" name="orderBilling">
|
||||
<OrderBilling ref="orderBillingRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="费用明细查询" name="expenseDetail">
|
||||
<FeeDetailQuery ref="feeDetailQueryRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="预交金查询" name="depositQuery">
|
||||
<deposit-query ref="depositQueryRef" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="患者流转日志" name="patientFlow">
|
||||
<div style="padding: 20px; text-align: center; color: #909399">患者流转日志功能区域</div>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, nextTick } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import PatientList from '../medicalOrderExecution/components/patientList.vue';
|
||||
import BillingList from './components/billingList.vue';
|
||||
import FeeDetailQuery from './components/feeDetailQuery.vue';
|
||||
import DepositQuery from './components/depositQuery.vue';
|
||||
import OrderBilling from './components/OrderBilling.vue';
|
||||
|
||||
// 预交金查询组件引用
|
||||
const depositQueryRef = ref(null);
|
||||
|
||||
// 响应式数据
|
||||
const active = ref('first');
|
||||
const activeTab = ref('billing');
|
||||
const billingRef = ref(null);
|
||||
const feeDetailQueryRef = ref(null);
|
||||
const orderBillingRef = ref(null);
|
||||
|
||||
// 刷新功能
|
||||
function refresh() {
|
||||
ElMessage.success('刷新成功');
|
||||
// 刷新患者列表
|
||||
}
|
||||
|
||||
// 左侧标签页点击
|
||||
function handleClick() {
|
||||
// 可以在这里添加左侧标签切换的逻辑
|
||||
}
|
||||
|
||||
// 右侧标签页切换
|
||||
function handleTabChange() {
|
||||
// 切换到划价确费标签时,刷新数据
|
||||
if (activeTab.value === 'billing' && billingRef.value) {
|
||||
nextTick(() => {
|
||||
billingRef.value.handleQuery();
|
||||
});
|
||||
}
|
||||
// 切换到医嘱计费标签时,刷新数据
|
||||
if (activeTab.value === 'orderBilling' && orderBillingRef.value) {
|
||||
nextTick(() => {
|
||||
orderBillingRef.value.handleQuery();
|
||||
});
|
||||
}
|
||||
// 切换到费用明细查询标签时,可以刷新数据
|
||||
if (activeTab.value === 'expenseDetail' && feeDetailQueryRef.value) {
|
||||
nextTick(() => {
|
||||
// 根据feeDetailQuery组件提供的方法进行数据刷新
|
||||
});
|
||||
}
|
||||
// 切换到预交金查询标签时,刷新数据
|
||||
if (activeTab.value === 'depositQuery' && depositQueryRef.value) {
|
||||
nextTick(() => {
|
||||
depositQueryRef.value.handleQuery();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.centered-tabs :deep(.el-tabs__nav-wrap) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav-scroll) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tab-header :deep(.el-tabs__item) {
|
||||
height: 50px !important;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,21 @@
|
||||
// 选择患者信息
|
||||
export const patientInfo = ref()
|
||||
export function updatePatientInfo(info) {
|
||||
patientInfo.value = info
|
||||
}
|
||||
|
||||
// 多选患者
|
||||
export const patientInfoList = ref([])
|
||||
export function updatePatientInfoList(info) {
|
||||
patientInfoList.value = info
|
||||
}
|
||||
|
||||
// 获取单选患者信息(去掉复选框模式下使用)
|
||||
export function getSinglePatient() {
|
||||
// 如果有选中的患者,只返回第一个患者信息,实现单选效果
|
||||
if (patientInfoList.value && patientInfoList.value.length > 0) {
|
||||
return patientInfoList.value[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取住院患者列表
|
||||
*/
|
||||
export function getPatientList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人管理病区
|
||||
*/
|
||||
export function getWardList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前选中患者全部已执行医嘱
|
||||
*/
|
||||
export function getPrescriptionList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/medicine-summary/dispensing-form',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行医嘱
|
||||
*/
|
||||
export function adviceExecute(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-execute',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消执行医嘱
|
||||
*/
|
||||
export function adviceCancel(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-cancel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 汇总领药申请
|
||||
*/
|
||||
export function medicineSummary(data) {
|
||||
return request({
|
||||
url: '/nurse-station/medicine-summary/medicine-summary',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询汇总领药单
|
||||
*/
|
||||
export function getMedicineSummary(param) {
|
||||
return request({
|
||||
url: '/nurse-station/medicine-summary/summary-form',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取汇总单详细信息
|
||||
*/
|
||||
export function getMedicineSummaryDetail(param) {
|
||||
return request({
|
||||
url: '/nurse-station/medicine-summary/summary-form-detail',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-input placeholder="住院号/姓名">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
@node-click="handleNodeClick"
|
||||
@check="handleCheckChange"
|
||||
@node-expand="onNodeExpand"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node" v-if="node.level === 2">
|
||||
<span>{{ data.bedName + ' / ' + node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
{{ data.genderEnum_enumText + ' / ' + data.age }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPatientList, getWardList } from './api';
|
||||
import { updatePatientInfoList } from '../store/patient';
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
|
||||
const treeRef = ref(null);
|
||||
const allNodesLoaded = ref(false);
|
||||
// 树节点加载完成后的回调
|
||||
function onTreeLoaded() {
|
||||
if (!allNodesLoaded.value && treeRef.value) {
|
||||
// 等待DOM更新后设置全选
|
||||
nextTick(() => {
|
||||
// 获取所有节点并设置为选中状态
|
||||
const allNodes = getAllNodes(treeRef.value.store.root.childNodes);
|
||||
const allKeys = allNodes.map((node) => node.key);
|
||||
|
||||
treeRef.value.setCheckedKeys(allKeys, true); // 第二个参数设为true表示级联选中
|
||||
allNodesLoaded.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 递归获取所有节点
|
||||
function getAllNodes(nodes) {
|
||||
let result = [];
|
||||
if (nodes && nodes.length > 0) {
|
||||
nodes.forEach((node) => {
|
||||
result.push(node);
|
||||
if (node.childNodes && node.childNodes.length > 0) {
|
||||
result = result.concat(getAllNodes(node.childNodes));
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadNode(node, resolve) {
|
||||
// 初始加载:获取所有病区(父级节点)
|
||||
if (node.level === 0) {
|
||||
getWardList().then((res) => {
|
||||
// 确保病区节点不是叶子节点
|
||||
const wards = res.map((ward) => ({
|
||||
...ward,
|
||||
leaf: false,
|
||||
}));
|
||||
return resolve(wards);
|
||||
});
|
||||
}
|
||||
// 展开病区节点时:获取该病区下的患者列表
|
||||
else if (node.level === 1) {
|
||||
const wardId = node.data.id;
|
||||
getPatientList({ wardId: wardId }).then((res) => {
|
||||
let children = res.data.records.map((item) => {
|
||||
return {
|
||||
leaf: true, // 患者节点为叶子节点
|
||||
...item,
|
||||
name: item.patientName,
|
||||
};
|
||||
});
|
||||
return resolve(children);
|
||||
});
|
||||
}
|
||||
// 更深层级直接返回空数组
|
||||
else {
|
||||
return resolve([]);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有选中的子节点(叶子节点)
|
||||
function getCheckedLeafNodes() {
|
||||
if (!treeRef.value) return [];
|
||||
|
||||
// 获取所有选中的节点key
|
||||
const checkedKeys = treeRef.value.getCheckedKeys();
|
||||
// 获取所有半选中的节点key(父节点)
|
||||
const halfCheckedKeys = treeRef.value.getHalfCheckedKeys();
|
||||
|
||||
// 获取所有选中的节点数据
|
||||
const checkedNodes = treeRef.value.getCheckedNodes();
|
||||
|
||||
// 只返回叶子节点(患者节点)
|
||||
return checkedNodes.filter((node) => node.leaf === true);
|
||||
}
|
||||
|
||||
// 处理节点选中状态变化
|
||||
function handleCheckChange(data, checked) {
|
||||
// 可以在这里处理选中状态变化的逻辑
|
||||
let list = getCheckedLeafNodes();
|
||||
console.log(list, '2345678');
|
||||
|
||||
updatePatientInfoList(list);
|
||||
handleGetPrescription();
|
||||
}
|
||||
const handleGetPrescription = inject('handleGetPrescription');
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree-node-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content) {
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh - 176px)">
|
||||
<div
|
||||
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-collapse
|
||||
v-model="activeNames"
|
||||
expand-icon-position="left"
|
||||
v-if="prescriptionList.length > 0"
|
||||
style="
|
||||
border-bottom: 0px;
|
||||
border-top: 0px;
|
||||
border-radius: 0px;
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 200px);
|
||||
"
|
||||
>
|
||||
<el-collapse-item
|
||||
v-for="(item, index) in prescriptionList"
|
||||
:key="index"
|
||||
:name="item[0].encounterId"
|
||||
style="
|
||||
border: 2px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>
|
||||
<template #title>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span>{{ item[0].bedName + '【' + item[0].busNo + '】' }}</span>
|
||||
<span>
|
||||
{{
|
||||
item[0].patientName + ' / ' + item[0].genderEnum_enumText + ' / ' + item[0].age
|
||||
}}
|
||||
</span>
|
||||
<el-tag style="margin-left: 10px">{{ item[0].contractName }}</el-tag>
|
||||
<span style="margin-left: 30px; font-weight: 600">
|
||||
{{ item[0].conditionNames }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
"
|
||||
>
|
||||
<div style="display: inline-block; margin-right: 10px">
|
||||
<span class="descriptions-item-label">住院医生:</span>
|
||||
<span>{{ item[0].requesterId_dictText }}</span>
|
||||
</div>
|
||||
<div style="display: inline-block; margin-right: 10px">
|
||||
<div
|
||||
class="descriptions-item-label"
|
||||
style="height: 20px; line-height: 20px; text-align: center; margin: 0"
|
||||
>
|
||||
预交金额
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
color: #ec8c43;
|
||||
"
|
||||
>
|
||||
{{ item[0].balanceAmount?.toFixed(2) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-table
|
||||
:data="item"
|
||||
border
|
||||
:ref="'tableRef' + index"
|
||||
:header-cell-style="{ background: '#eef9fd !important' }"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="类型" align="center" prop="therapyEnum_enumText" width="80">
|
||||
<template #default="scope">
|
||||
<span :style="scope.row.therapyEnum == '1' ? 'color: #a6745c' : 'color: #3787a5'">
|
||||
{{ scope.row.therapyEnum_enumText }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医嘱内容" prop="adviceName">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.row.adviceName }}
|
||||
</span>
|
||||
<template v-if="scope.row.adviceTable == 'med_medication_request'">
|
||||
<span>
|
||||
{{ ' 【' + scope.row.volume + '】' }}
|
||||
</span>
|
||||
<span style="color: #447c95 !important">
|
||||
{{
|
||||
'(' +
|
||||
scope.row.methodCode_dictText +
|
||||
' ' +
|
||||
scope.row.dose +
|
||||
scope.row.doseUnitCode_dictText +
|
||||
' ' +
|
||||
scope.row.rateCode_dictText +
|
||||
')'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领药总量" prop="requestTime" width="150">
|
||||
<template #default="scope">
|
||||
{{ '1支' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="取药科室" prop="requestTime" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.positionName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领药时间" prop="times">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-for="(item, timeIndex) in scope.row.times"
|
||||
:key="timeIndex"
|
||||
style="padding-bottom: 5px"
|
||||
>
|
||||
<span>{{ item }}</span>
|
||||
<el-checkbox-group
|
||||
v-model="scope.row.checkedRates[item]"
|
||||
style="display: inline-block; margin-left: 15px"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="(rateItem, rateIndex) in scope.row.rate[item]"
|
||||
:key="rateIndex"
|
||||
:value="rateItem.rate"
|
||||
@change="(value) => handleRateChange(value, rateItem, scope.row)"
|
||||
border
|
||||
size="small"
|
||||
style="margin-right: 15px"
|
||||
>
|
||||
{{ rateItem.rate }}
|
||||
<template v-if="rateItem.practitionerName">
|
||||
{{ rateItem.practitionerName }}
|
||||
</template>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<el-empty v-else description="点击查询获取患者医嘱信息"></el-empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPrescriptionList, adviceExecute, adviceCancel, medicineSummary } from './api';
|
||||
import { patientInfoList } from '../store/patient.js';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const activeNames = ref([]);
|
||||
|
||||
const userStore = useUserStore();
|
||||
const prescriptionList = ref([]);
|
||||
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
||||
const therapyEnum = ref(undefined);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(false);
|
||||
const chooseAll = ref(false);
|
||||
const props = defineProps({
|
||||
exeStatus: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
requestStatus: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
deadline: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
function handleGetPrescription() {
|
||||
if (patientInfoList.value.length > 0) {
|
||||
loading.value = true;
|
||||
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
|
||||
getPrescriptionList({
|
||||
encounterIds: encounterIds,
|
||||
pageSize: 10000,
|
||||
pageNo: 1,
|
||||
therapyEnum: therapyEnum.value,
|
||||
exeStatus: props.exeStatus,
|
||||
requestStatus: props.requestStatus,
|
||||
}).then((res) => {
|
||||
// try {
|
||||
// 根据encounterId分组
|
||||
const groupedPrescriptions = res.data.records.reduce((groups, prescription) => {
|
||||
let times = new Set();
|
||||
let rate = {};
|
||||
let checkedRates = {};
|
||||
// 汇总时间点 默认全部汇总
|
||||
prescription.dispenseIds = [];
|
||||
prescription.medicineSummaryParamList.forEach((item) => {
|
||||
// 已汇总的时间点不需要显示
|
||||
if (item.dispenseStatus != 8) {
|
||||
prescription.dispenseIds.push({
|
||||
dispenseId: item.dispenseId,
|
||||
receiverId: userStore.id,
|
||||
});
|
||||
|
||||
// 将全部的时间点拆分 把日期去重,页面显示示例 05-15 [01:30 02:30 03:30]
|
||||
let time = item.dispenseTime.substring(5, 10);
|
||||
let rateTime = item.dispenseTime.substring(11, 16);
|
||||
times.add(time);
|
||||
rate[time] = rate[time] || [];
|
||||
rate[time].push({ rate: rateTime, dispenseId: item.dispenseId });
|
||||
checkedRates[time] = checkedRates[time] || [];
|
||||
checkedRates[time].push(rateTime);
|
||||
}
|
||||
});
|
||||
|
||||
prescription.times = Array.from(times);
|
||||
prescription.rate = rate;
|
||||
prescription.checkedRates = checkedRates;
|
||||
// 把相同encounterId的医嘱放在同一个数组中
|
||||
const encounterId = prescription.encounterId;
|
||||
if (!groups[encounterId]) {
|
||||
groups[encounterId] = [];
|
||||
}
|
||||
if (!activeNames.value.includes(encounterId)) {
|
||||
activeNames.value.push(encounterId);
|
||||
}
|
||||
groups[encounterId].push(prescription);
|
||||
return groups;
|
||||
}, {});
|
||||
|
||||
// 将分组结果转换为数组形式
|
||||
prescriptionList.value = Object.values(groupedPrescriptions);
|
||||
loading.value = false;
|
||||
// } catch {
|
||||
// loading.value = false;
|
||||
// }
|
||||
});
|
||||
chooseAll.value = false;
|
||||
} else {
|
||||
prescriptionList.value = [];
|
||||
// proxy.$message.warning('请选择患者');
|
||||
}
|
||||
}
|
||||
|
||||
function handleMedicineSummary() {
|
||||
let paramList = getSelectRows();
|
||||
let ids = [];
|
||||
paramList = paramList.forEach((item) => {
|
||||
ids.push(...item.dispenseIds);
|
||||
});
|
||||
medicineSummary(ids).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$message.success('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getSelectRows() {
|
||||
// 获取选中的医嘱信息
|
||||
let list = [];
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
|
||||
});
|
||||
return list;
|
||||
}
|
||||
function handleRateChange(value, item, row) {
|
||||
// 拼接当前选中时间
|
||||
if (value) {
|
||||
row.dispenseIds.push({ dispenseId: item.dispenseId, receiverId: userStore.id });
|
||||
} else {
|
||||
row.dispenseIds.splice(
|
||||
row.dispenseIds.findIndex((k) => {
|
||||
return k.dispenseId === item.dispenseId;
|
||||
}),
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleGetPrescription,
|
||||
handleMedicineSummary,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-collapse-icon-position-left :deep(.el-collapse-item__header) {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
:deep(.el-collapse-item__wrap) {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* 表头背景色 */
|
||||
:deep(.prescription-table .el-table__header th) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__row:hover > td) {
|
||||
background-color: #eef9fd !important;
|
||||
}
|
||||
|
||||
.item-value {
|
||||
color: #606266;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user